Skip to content

Commit

Permalink
Regenerate client from commit 2c46d95c of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 3, 2024
1 parent 3696e4d commit d9482a3
Show file tree
Hide file tree
Showing 10 changed files with 209 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-02 20:43:03.737189",
"spec_repo_commit": "76b7b19d"
"regenerated": "2024-10-03 13:53:51.226723",
"spec_repo_commit": "2c46d95c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-02 20:43:03.750932",
"spec_repo_commit": "76b7b19d"
"regenerated": "2024-10-03 13:53:51.241484",
"spec_repo_commit": "2c46d95c"
}
}
}
33 changes: 32 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10930,7 +10930,7 @@ components:
IncidentResponseIncludedItem:
description: An object related to an incident that is included in the response.
oneOf:
- $ref: '#/components/schemas/User'
- $ref: '#/components/schemas/IncidentUserData'
- $ref: '#/components/schemas/IncidentAttachmentData'
IncidentResponseMeta:
description: The metadata object containing pagination metadata.
Expand Down Expand Up @@ -11869,6 +11869,37 @@ components:
required:
- data
type: object
IncidentUserAttributes:
description: Attributes of user object returned by the API.
properties:
email:
description: Email of the user.
type: string
handle:
description: Handle of the user.
type: string
icon:
description: URL of the user's icon.
type: string
name:
description: Name of the user.
nullable: true
type: string
uuid:
description: UUID of the user.
type: string
type: object
IncidentUserData:
description: User object returned by the API.
properties:
attributes:
$ref: '#/components/schemas/IncidentUserAttributes'
id:
description: ID of the user.
type: string
type:
$ref: '#/components/schemas/UsersType'
type: object
IncidentUserDefinedFieldType:
description: The incident user defined fields type.
enum:
Expand Down
14 changes: 14 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4876,6 +4876,20 @@ datadog\_api\_client.v2.model.incident\_update\_request module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_user\_attributes module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_user_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_user\_data module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_user_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_user\_defined\_field\_type module
-------------------------------------------------------------------------

Expand Down
6 changes: 4 additions & 2 deletions src/datadog_api_client/v2/model/incident_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if TYPE_CHECKING:
from datadog_api_client.v2.model.incident_response_data import IncidentResponseData
from datadog_api_client.v2.model.incident_response_included_item import IncidentResponseIncludedItem
from datadog_api_client.v2.model.user import User
from datadog_api_client.v2.model.incident_user_data import IncidentUserData
from datadog_api_client.v2.model.incident_attachment_data import IncidentAttachmentData


Expand All @@ -42,7 +42,9 @@ def openapi_types(_):
def __init__(
self_,
data: IncidentResponseData,
included: Union[List[Union[IncidentResponseIncludedItem, User, IncidentAttachmentData]], UnsetType] = unset,
included: Union[
List[Union[IncidentResponseIncludedItem, IncidentUserData, IncidentAttachmentData]], UnsetType
] = unset,
**kwargs,
):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ def __init__(self, **kwargs):
An object related to an incident that is included in the response.
:param attributes: Attributes of user object returned by the API.
:type attributes: UserAttributes, optional
:type attributes: IncidentUserAttributes, optional
:param id: ID of the user.
:type id: str, optional
:param relationships: Relationships of the user object returned by the API.
:type relationships: UserResponseRelationships, optional
:param type: Users resource type.
:type type: UsersType, optional
:param relationships: The incident attachment's relationships.
:type relationships: IncidentAttachmentRelationships
"""
super().__init__(kwargs)

Expand All @@ -38,12 +38,12 @@ def _composed_schemas(_):
# code would be run when this module is imported, and these composed
# classes don't exist yet because their module has not finished
# loading
from datadog_api_client.v2.model.user import User
from datadog_api_client.v2.model.incident_user_data import IncidentUserData
from datadog_api_client.v2.model.incident_attachment_data import IncidentAttachmentData

return {
"oneOf": [
User,
IncidentUserData,
IncidentAttachmentData,
],
}
6 changes: 4 additions & 2 deletions src/datadog_api_client/v2/model/incident_search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from datadog_api_client.v2.model.incident_search_response_data import IncidentSearchResponseData
from datadog_api_client.v2.model.incident_response_included_item import IncidentResponseIncludedItem
from datadog_api_client.v2.model.incident_search_response_meta import IncidentSearchResponseMeta
from datadog_api_client.v2.model.user import User
from datadog_api_client.v2.model.incident_user_data import IncidentUserData
from datadog_api_client.v2.model.incident_attachment_data import IncidentAttachmentData


Expand Down Expand Up @@ -47,7 +47,9 @@ def openapi_types(_):
def __init__(
self_,
data: IncidentSearchResponseData,
included: Union[List[Union[IncidentResponseIncludedItem, User, IncidentAttachmentData]], UnsetType] = unset,
included: Union[
List[Union[IncidentResponseIncludedItem, IncidentUserData, IncidentAttachmentData]], UnsetType
] = unset,
meta: Union[IncidentSearchResponseMeta, UnsetType] = unset,
**kwargs,
):
Expand Down
73 changes: 73 additions & 0 deletions src/datadog_api_client/v2/model/incident_user_attributes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)


class IncidentUserAttributes(ModelNormal):
@cached_property
def openapi_types(_):
return {
"email": (str,),
"handle": (str,),
"icon": (str,),
"name": (str, none_type),
"uuid": (str,),
}

attribute_map = {
"email": "email",
"handle": "handle",
"icon": "icon",
"name": "name",
"uuid": "uuid",
}

def __init__(
self_,
email: Union[str, UnsetType] = unset,
handle: Union[str, UnsetType] = unset,
icon: Union[str, UnsetType] = unset,
name: Union[str, none_type, UnsetType] = unset,
uuid: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Attributes of user object returned by the API.
:param email: Email of the user.
:type email: str, optional
:param handle: Handle of the user.
:type handle: str, optional
:param icon: URL of the user's icon.
:type icon: str, optional
:param name: Name of the user.
:type name: str, none_type, optional
:param uuid: UUID of the user.
:type uuid: str, optional
"""
if email is not unset:
kwargs["email"] = email
if handle is not unset:
kwargs["handle"] = handle
if icon is not unset:
kwargs["icon"] = icon
if name is not unset:
kwargs["name"] = name
if uuid is not unset:
kwargs["uuid"] = uuid
super().__init__(kwargs)
64 changes: 64 additions & 0 deletions src/datadog_api_client/v2/model/incident_user_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.incident_user_attributes import IncidentUserAttributes
from datadog_api_client.v2.model.users_type import UsersType


class IncidentUserData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.incident_user_attributes import IncidentUserAttributes
from datadog_api_client.v2.model.users_type import UsersType

return {
"attributes": (IncidentUserAttributes,),
"id": (str,),
"type": (UsersType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(
self_,
attributes: Union[IncidentUserAttributes, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
type: Union[UsersType, UnsetType] = unset,
**kwargs,
):
"""
User object returned by the API.
:param attributes: Attributes of user object returned by the API.
:type attributes: IncidentUserAttributes, optional
:param id: ID of the user.
:type id: str, optional
:param type: Users resource type.
:type type: UsersType, optional
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if id is not unset:
kwargs["id"] = id
if type is not unset:
kwargs["type"] = type
super().__init__(kwargs)
6 changes: 4 additions & 2 deletions src/datadog_api_client/v2/model/incidents_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from datadog_api_client.v2.model.incident_response_data import IncidentResponseData
from datadog_api_client.v2.model.incident_response_included_item import IncidentResponseIncludedItem
from datadog_api_client.v2.model.incident_response_meta import IncidentResponseMeta
from datadog_api_client.v2.model.user import User
from datadog_api_client.v2.model.incident_user_data import IncidentUserData
from datadog_api_client.v2.model.incident_attachment_data import IncidentAttachmentData


Expand Down Expand Up @@ -47,7 +47,9 @@ def openapi_types(_):
def __init__(
self_,
data: List[IncidentResponseData],
included: Union[List[Union[IncidentResponseIncludedItem, User, IncidentAttachmentData]], UnsetType] = unset,
included: Union[
List[Union[IncidentResponseIncludedItem, IncidentUserData, IncidentAttachmentData]], UnsetType
] = unset,
meta: Union[IncidentResponseMeta, UnsetType] = unset,
**kwargs,
):
Expand Down
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@
from datadog_api_client.v2.model.incident_update_data import IncidentUpdateData
from datadog_api_client.v2.model.incident_update_relationships import IncidentUpdateRelationships
from datadog_api_client.v2.model.incident_update_request import IncidentUpdateRequest
from datadog_api_client.v2.model.incident_user_attributes import IncidentUserAttributes
from datadog_api_client.v2.model.incident_user_data import IncidentUserData
from datadog_api_client.v2.model.incident_user_defined_field_type import IncidentUserDefinedFieldType
from datadog_api_client.v2.model.incidents_response import IncidentsResponse
from datadog_api_client.v2.model.include_type import IncludeType
Expand Down Expand Up @@ -2696,6 +2698,8 @@
"IncidentUpdateData",
"IncidentUpdateRelationships",
"IncidentUpdateRequest",
"IncidentUserAttributes",
"IncidentUserData",
"IncidentUserDefinedFieldType",
"IncidentsResponse",
"IncludeType",
Expand Down

0 comments on commit d9482a3

Please sign in to comment.