diff --git a/.apigentools-info b/.apigentools-info index 2cb1430fcc..988fe50631 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-09-23 19:10:10.087479", - "spec_repo_commit": "41592dc6" + "regenerated": "2024-09-24 14:14:08.062785", + "spec_repo_commit": "77d3d5e5" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-09-23 19:10:10.101269", - "spec_repo_commit": "41592dc6" + "regenerated": "2024-09-24 14:14:08.076432", + "spec_repo_commit": "77d3d5e5" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ee4788c60a..ba2e7be926 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -24635,16 +24635,36 @@ components: UserCreateAttributes: description: Attributes of the created user. properties: + created_at: + description: The `UserCreateAttributes` `created_at`. + format: date-time + type: string + disabled: + description: The `UserCreateAttributes` `disabled`. + type: boolean email: description: The email of the user. example: jane.doe@example.com type: string + handle: + description: The `UserCreateAttributes` `handle`. + type: string + modified_at: + description: The `UserCreateAttributes` `modified_at`. + format: date-time + type: string name: description: The name of the user. type: string + service_account: + description: The `UserCreateAttributes` `service_account`. + type: boolean title: description: The title of the user. type: string + verified: + description: The `UserCreateAttributes` `verified`. + type: boolean required: - email type: object @@ -24694,6 +24714,10 @@ components: invite_type: description: Type of invitation. type: string + login_method: + description: The `UserInvitationDataAttributes` `login_method`. + nullable: true + type: string uuid: description: UUID of the user invitation. type: string @@ -24755,6 +24779,79 @@ components: type: string x-enum-varnames: - USER_INVITATIONS + UserOrgsSerializable: + description: The definition of `UserOrgsSerializable` object. + properties: + attributes: + $ref: '#/components/schemas/UserOrgsSerializableAttributes' + id: + description: The `UserOrgsSerializable` `id`. + type: string + type: + $ref: '#/components/schemas/UserOrgsSerializableType' + required: + - type + type: object + UserOrgsSerializableAttributes: + description: The definition of `UserOrgsSerializableAttributes` object. + properties: + disabled: + description: The `UserOrgsSerializableAttributes` `disabled`. + type: boolean + email: + description: The `UserOrgsSerializableAttributes` `email`. + type: string + name: + description: The `UserOrgsSerializableAttributes` `name`. + type: string + org_id: + description: The `UserOrgsSerializableAttributes` `org_id`. + type: string + title: + description: The `UserOrgsSerializableAttributes` `title`. + type: string + verified: + description: The `UserOrgsSerializableAttributes` `verified`. + type: boolean + type: object + UserOrgsSerializableType: + default: users + description: The definition of `UserOrgsSerializableType` object. + enum: + - users + example: users + type: string + x-enum-varnames: + - USERS + UserOverrideIdentityProvider: + description: The definition of `UserOverrideIdentityProvider` object. + properties: + attributes: + $ref: '#/components/schemas/UserOverrideIdentityProviderAttributes' + id: + description: The `UserOverrideIdentityProvider` `id`. + type: string + type: + $ref: '#/components/schemas/UserOverrideIdentityProviderType' + required: + - type + type: object + UserOverrideIdentityProviderAttributes: + description: The definition of `UserOverrideIdentityProviderAttributes` object. + properties: + authentication_method: + description: The `UserOverrideIdentityProviderAttributes` `authentication_method`. + type: string + type: object + UserOverrideIdentityProviderType: + default: identity_providers + description: The definition of `UserOverrideIdentityProviderType` object. + enum: + - identity_providers + example: identity_providers + type: string + x-enum-varnames: + - IDENTITY_PROVIDERS UserRelationshipData: description: Relationship to user object. properties: @@ -24800,6 +24897,8 @@ components: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Permission' - $ref: '#/components/schemas/Role' + - $ref: '#/components/schemas/UserOverrideIdentityProvider' + - $ref: '#/components/schemas/UserOrgsSerializable' UserResponseRelationships: description: Relationships of the user object returned by the API. properties: @@ -25038,15 +25137,36 @@ components: UserUpdateAttributes: description: Attributes of the edited user. properties: + created_at: + description: The `UserUpdateAttributes` `created_at`. + format: date-time + type: string disabled: description: If the user is enabled or disabled. type: boolean email: description: The email of the user. type: string + handle: + description: The `UserUpdateAttributes` `handle`. + type: string + modified_at: + description: The `UserUpdateAttributes` `modified_at`. + format: date-time + type: string name: description: The name of the user. type: string + service_account: + description: The `UserUpdateAttributes` `service_account`. + type: boolean + title: + description: The `UserUpdateAttributes` `title`. + nullable: true + type: string + verified: + description: The `UserUpdateAttributes` `verified`. + type: boolean type: object UserUpdateData: description: Object to update a user. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 4cd0f78081..29ac942f32 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -11029,6 +11029,48 @@ datadog\_api\_client.v2.model.user\_invitations\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.user\_orgs\_serializable module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_orgs_serializable + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.user\_orgs\_serializable\_attributes module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_orgs_serializable_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.user\_orgs\_serializable\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_orgs_serializable_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.user\_override\_identity\_provider module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_override_identity_provider + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.user\_override\_identity\_provider\_attributes module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_override_identity_provider_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.user\_override\_identity\_provider\_type module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_override_identity_provider_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.user\_relationship\_data module ------------------------------------------------------------- diff --git a/src/datadog_api_client/v2/model/user_create_attributes.py b/src/datadog_api_client/v2/model/user_create_attributes.py index 2660c4ab06..7a1c8b82ec 100644 --- a/src/datadog_api_client/v2/model/user_create_attributes.py +++ b/src/datadog_api_client/v2/model/user_create_attributes.py @@ -8,6 +8,7 @@ from datadog_api_client.model_utils import ( ModelNormal, cached_property, + datetime, unset, UnsetType, ) @@ -17,36 +18,88 @@ class UserCreateAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "created_at": (datetime,), + "disabled": (bool,), "email": (str,), + "handle": (str,), + "modified_at": (datetime,), "name": (str,), + "service_account": (bool,), "title": (str,), + "verified": (bool,), } attribute_map = { + "created_at": "created_at", + "disabled": "disabled", "email": "email", + "handle": "handle", + "modified_at": "modified_at", "name": "name", + "service_account": "service_account", "title": "title", + "verified": "verified", } def __init__( - self_, email: str, name: Union[str, UnsetType] = unset, title: Union[str, UnsetType] = unset, **kwargs + self_, + email: str, + created_at: Union[datetime, UnsetType] = unset, + disabled: Union[bool, UnsetType] = unset, + handle: Union[str, UnsetType] = unset, + modified_at: Union[datetime, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + service_account: Union[bool, UnsetType] = unset, + title: Union[str, UnsetType] = unset, + verified: Union[bool, UnsetType] = unset, + **kwargs, ): """ Attributes of the created user. + :param created_at: The ``UserCreateAttributes`` ``created_at``. + :type created_at: datetime, optional + + :param disabled: The ``UserCreateAttributes`` ``disabled``. + :type disabled: bool, optional + :param email: The email of the user. :type email: str + :param handle: The ``UserCreateAttributes`` ``handle``. + :type handle: str, optional + + :param modified_at: The ``UserCreateAttributes`` ``modified_at``. + :type modified_at: datetime, optional + :param name: The name of the user. :type name: str, optional + :param service_account: The ``UserCreateAttributes`` ``service_account``. + :type service_account: bool, optional + :param title: The title of the user. :type title: str, optional + + :param verified: The ``UserCreateAttributes`` ``verified``. + :type verified: bool, optional """ + if created_at is not unset: + kwargs["created_at"] = created_at + if disabled is not unset: + kwargs["disabled"] = disabled + if handle is not unset: + kwargs["handle"] = handle + if modified_at is not unset: + kwargs["modified_at"] = modified_at if name is not unset: kwargs["name"] = name + if service_account is not unset: + kwargs["service_account"] = service_account if title is not unset: kwargs["title"] = title + if verified is not unset: + kwargs["verified"] = verified super().__init__(kwargs) self_.email = email diff --git a/src/datadog_api_client/v2/model/user_invitation_data_attributes.py b/src/datadog_api_client/v2/model/user_invitation_data_attributes.py index 62cd6b3d2c..8c1bd15b8c 100644 --- a/src/datadog_api_client/v2/model/user_invitation_data_attributes.py +++ b/src/datadog_api_client/v2/model/user_invitation_data_attributes.py @@ -9,6 +9,7 @@ ModelNormal, cached_property, datetime, + none_type, unset, UnsetType, ) @@ -21,6 +22,7 @@ def openapi_types(_): "created_at": (datetime,), "expires_at": (datetime,), "invite_type": (str,), + "login_method": (str, none_type), "uuid": (str,), } @@ -28,6 +30,7 @@ def openapi_types(_): "created_at": "created_at", "expires_at": "expires_at", "invite_type": "invite_type", + "login_method": "login_method", "uuid": "uuid", } @@ -36,6 +39,7 @@ def __init__( created_at: Union[datetime, UnsetType] = unset, expires_at: Union[datetime, UnsetType] = unset, invite_type: Union[str, UnsetType] = unset, + login_method: Union[str, none_type, UnsetType] = unset, uuid: Union[str, UnsetType] = unset, **kwargs, ): @@ -51,6 +55,9 @@ def __init__( :param invite_type: Type of invitation. :type invite_type: str, optional + :param login_method: The ``UserInvitationDataAttributes`` ``login_method``. + :type login_method: str, none_type, optional + :param uuid: UUID of the user invitation. :type uuid: str, optional """ @@ -60,6 +67,8 @@ def __init__( kwargs["expires_at"] = expires_at if invite_type is not unset: kwargs["invite_type"] = invite_type + if login_method is not unset: + kwargs["login_method"] = login_method if uuid is not unset: kwargs["uuid"] = uuid super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/user_orgs_serializable.py b/src/datadog_api_client/v2/model/user_orgs_serializable.py new file mode 100644 index 0000000000..d64d51c459 --- /dev/null +++ b/src/datadog_api_client/v2/model/user_orgs_serializable.py @@ -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.user_orgs_serializable_attributes import UserOrgsSerializableAttributes + from datadog_api_client.v2.model.user_orgs_serializable_type import UserOrgsSerializableType + + +class UserOrgsSerializable(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.user_orgs_serializable_attributes import UserOrgsSerializableAttributes + from datadog_api_client.v2.model.user_orgs_serializable_type import UserOrgsSerializableType + + return { + "attributes": (UserOrgsSerializableAttributes,), + "id": (str,), + "type": (UserOrgsSerializableType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: UserOrgsSerializableType, + attributes: Union[UserOrgsSerializableAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``UserOrgsSerializable`` object. + + :param attributes: The definition of ``UserOrgsSerializableAttributes`` object. + :type attributes: UserOrgsSerializableAttributes, optional + + :param id: The ``UserOrgsSerializable`` ``id``. + :type id: str, optional + + :param type: The definition of ``UserOrgsSerializableType`` object. + :type type: UserOrgsSerializableType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/user_orgs_serializable_attributes.py b/src/datadog_api_client/v2/model/user_orgs_serializable_attributes.py new file mode 100644 index 0000000000..d0eb9e0773 --- /dev/null +++ b/src/datadog_api_client/v2/model/user_orgs_serializable_attributes.py @@ -0,0 +1,80 @@ +# 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, + unset, + UnsetType, +) + + +class UserOrgsSerializableAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "disabled": (bool,), + "email": (str,), + "name": (str,), + "org_id": (str,), + "title": (str,), + "verified": (bool,), + } + + attribute_map = { + "disabled": "disabled", + "email": "email", + "name": "name", + "org_id": "org_id", + "title": "title", + "verified": "verified", + } + + def __init__( + self_, + disabled: Union[bool, UnsetType] = unset, + email: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + org_id: Union[str, UnsetType] = unset, + title: Union[str, UnsetType] = unset, + verified: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``UserOrgsSerializableAttributes`` object. + + :param disabled: The ``UserOrgsSerializableAttributes`` ``disabled``. + :type disabled: bool, optional + + :param email: The ``UserOrgsSerializableAttributes`` ``email``. + :type email: str, optional + + :param name: The ``UserOrgsSerializableAttributes`` ``name``. + :type name: str, optional + + :param org_id: The ``UserOrgsSerializableAttributes`` ``org_id``. + :type org_id: str, optional + + :param title: The ``UserOrgsSerializableAttributes`` ``title``. + :type title: str, optional + + :param verified: The ``UserOrgsSerializableAttributes`` ``verified``. + :type verified: bool, optional + """ + if disabled is not unset: + kwargs["disabled"] = disabled + if email is not unset: + kwargs["email"] = email + if name is not unset: + kwargs["name"] = name + if org_id is not unset: + kwargs["org_id"] = org_id + if title is not unset: + kwargs["title"] = title + if verified is not unset: + kwargs["verified"] = verified + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/user_orgs_serializable_type.py b/src/datadog_api_client/v2/model/user_orgs_serializable_type.py new file mode 100644 index 0000000000..574849631e --- /dev/null +++ b/src/datadog_api_client/v2/model/user_orgs_serializable_type.py @@ -0,0 +1,35 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class UserOrgsSerializableType(ModelSimple): + """ + The definition of `UserOrgsSerializableType` object. + + :param value: If omitted defaults to "users". Must be one of ["users"]. + :type value: str + """ + + allowed_values = { + "users", + } + USERS: ClassVar["UserOrgsSerializableType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +UserOrgsSerializableType.USERS = UserOrgsSerializableType("users") diff --git a/src/datadog_api_client/v2/model/user_override_identity_provider.py b/src/datadog_api_client/v2/model/user_override_identity_provider.py new file mode 100644 index 0000000000..355f449989 --- /dev/null +++ b/src/datadog_api_client/v2/model/user_override_identity_provider.py @@ -0,0 +1,68 @@ +# 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.user_override_identity_provider_attributes import ( + UserOverrideIdentityProviderAttributes, + ) + from datadog_api_client.v2.model.user_override_identity_provider_type import UserOverrideIdentityProviderType + + +class UserOverrideIdentityProvider(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.user_override_identity_provider_attributes import ( + UserOverrideIdentityProviderAttributes, + ) + from datadog_api_client.v2.model.user_override_identity_provider_type import UserOverrideIdentityProviderType + + return { + "attributes": (UserOverrideIdentityProviderAttributes,), + "id": (str,), + "type": (UserOverrideIdentityProviderType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: UserOverrideIdentityProviderType, + attributes: Union[UserOverrideIdentityProviderAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``UserOverrideIdentityProvider`` object. + + :param attributes: The definition of ``UserOverrideIdentityProviderAttributes`` object. + :type attributes: UserOverrideIdentityProviderAttributes, optional + + :param id: The ``UserOverrideIdentityProvider`` ``id``. + :type id: str, optional + + :param type: The definition of ``UserOverrideIdentityProviderType`` object. + :type type: UserOverrideIdentityProviderType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/user_override_identity_provider_attributes.py b/src/datadog_api_client/v2/model/user_override_identity_provider_attributes.py new file mode 100644 index 0000000000..1b83e665bf --- /dev/null +++ b/src/datadog_api_client/v2/model/user_override_identity_provider_attributes.py @@ -0,0 +1,36 @@ +# 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, + unset, + UnsetType, +) + + +class UserOverrideIdentityProviderAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "authentication_method": (str,), + } + + attribute_map = { + "authentication_method": "authentication_method", + } + + def __init__(self_, authentication_method: Union[str, UnsetType] = unset, **kwargs): + """ + The definition of ``UserOverrideIdentityProviderAttributes`` object. + + :param authentication_method: The ``UserOverrideIdentityProviderAttributes`` ``authentication_method``. + :type authentication_method: str, optional + """ + if authentication_method is not unset: + kwargs["authentication_method"] = authentication_method + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/user_override_identity_provider_type.py b/src/datadog_api_client/v2/model/user_override_identity_provider_type.py new file mode 100644 index 0000000000..d4fd77007c --- /dev/null +++ b/src/datadog_api_client/v2/model/user_override_identity_provider_type.py @@ -0,0 +1,35 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class UserOverrideIdentityProviderType(ModelSimple): + """ + The definition of `UserOverrideIdentityProviderType` object. + + :param value: If omitted defaults to "identity_providers". Must be one of ["identity_providers"]. + :type value: str + """ + + allowed_values = { + "identity_providers", + } + IDENTITY_PROVIDERS: ClassVar["UserOverrideIdentityProviderType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +UserOverrideIdentityProviderType.IDENTITY_PROVIDERS = UserOverrideIdentityProviderType("identity_providers") diff --git a/src/datadog_api_client/v2/model/user_response.py b/src/datadog_api_client/v2/model/user_response.py index 85857a1433..f045f41c18 100644 --- a/src/datadog_api_client/v2/model/user_response.py +++ b/src/datadog_api_client/v2/model/user_response.py @@ -19,6 +19,8 @@ from datadog_api_client.v2.model.organization import Organization from datadog_api_client.v2.model.permission import Permission from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.user_override_identity_provider import UserOverrideIdentityProvider + from datadog_api_client.v2.model.user_orgs_serializable import UserOrgsSerializable class UserResponse(ModelNormal): @@ -40,7 +42,19 @@ def openapi_types(_): def __init__( self_, data: Union[User, UnsetType] = unset, - included: Union[List[Union[UserResponseIncludedItem, Organization, Permission, Role]], UnsetType] = unset, + included: Union[ + List[ + Union[ + UserResponseIncludedItem, + Organization, + Permission, + Role, + UserOverrideIdentityProvider, + UserOrgsSerializable, + ] + ], + UnsetType, + ] = unset, **kwargs, ): """ diff --git a/src/datadog_api_client/v2/model/user_response_included_item.py b/src/datadog_api_client/v2/model/user_response_included_item.py index 705eeccfc9..a148869e03 100644 --- a/src/datadog_api_client/v2/model/user_response_included_item.py +++ b/src/datadog_api_client/v2/model/user_response_included_item.py @@ -41,11 +41,15 @@ def _composed_schemas(_): from datadog_api_client.v2.model.organization import Organization from datadog_api_client.v2.model.permission import Permission from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.user_override_identity_provider import UserOverrideIdentityProvider + from datadog_api_client.v2.model.user_orgs_serializable import UserOrgsSerializable return { "oneOf": [ Organization, Permission, Role, + UserOverrideIdentityProvider, + UserOrgsSerializable, ], } diff --git a/src/datadog_api_client/v2/model/user_update_attributes.py b/src/datadog_api_client/v2/model/user_update_attributes.py index 6ef0277ffa..f85e3b582f 100644 --- a/src/datadog_api_client/v2/model/user_update_attributes.py +++ b/src/datadog_api_client/v2/model/user_update_attributes.py @@ -8,6 +8,8 @@ from datadog_api_client.model_utils import ( ModelNormal, cached_property, + datetime, + none_type, unset, UnsetType, ) @@ -17,40 +19,88 @@ class UserUpdateAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "created_at": (datetime,), "disabled": (bool,), "email": (str,), + "handle": (str,), + "modified_at": (datetime,), "name": (str,), + "service_account": (bool,), + "title": (str, none_type), + "verified": (bool,), } attribute_map = { + "created_at": "created_at", "disabled": "disabled", "email": "email", + "handle": "handle", + "modified_at": "modified_at", "name": "name", + "service_account": "service_account", + "title": "title", + "verified": "verified", } def __init__( self_, + created_at: Union[datetime, UnsetType] = unset, disabled: Union[bool, UnsetType] = unset, email: Union[str, UnsetType] = unset, + handle: Union[str, UnsetType] = unset, + modified_at: Union[datetime, UnsetType] = unset, name: Union[str, UnsetType] = unset, + service_account: Union[bool, UnsetType] = unset, + title: Union[str, none_type, UnsetType] = unset, + verified: Union[bool, UnsetType] = unset, **kwargs, ): """ Attributes of the edited user. + :param created_at: The ``UserUpdateAttributes`` ``created_at``. + :type created_at: datetime, optional + :param disabled: If the user is enabled or disabled. :type disabled: bool, optional :param email: The email of the user. :type email: str, optional + :param handle: The ``UserUpdateAttributes`` ``handle``. + :type handle: str, optional + + :param modified_at: The ``UserUpdateAttributes`` ``modified_at``. + :type modified_at: datetime, optional + :param name: The name of the user. :type name: str, optional + + :param service_account: The ``UserUpdateAttributes`` ``service_account``. + :type service_account: bool, optional + + :param title: The ``UserUpdateAttributes`` ``title``. + :type title: str, none_type, optional + + :param verified: The ``UserUpdateAttributes`` ``verified``. + :type verified: bool, optional """ + if created_at is not unset: + kwargs["created_at"] = created_at if disabled is not unset: kwargs["disabled"] = disabled if email is not unset: kwargs["email"] = email + if handle is not unset: + kwargs["handle"] = handle + if modified_at is not unset: + kwargs["modified_at"] = modified_at if name is not unset: kwargs["name"] = name + if service_account is not unset: + kwargs["service_account"] = service_account + if title is not unset: + kwargs["title"] = title + if verified is not unset: + kwargs["verified"] = verified super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/users_response.py b/src/datadog_api_client/v2/model/users_response.py index b0432a4252..4b38f9748c 100644 --- a/src/datadog_api_client/v2/model/users_response.py +++ b/src/datadog_api_client/v2/model/users_response.py @@ -20,6 +20,8 @@ from datadog_api_client.v2.model.organization import Organization from datadog_api_client.v2.model.permission import Permission from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.user_override_identity_provider import UserOverrideIdentityProvider + from datadog_api_client.v2.model.user_orgs_serializable import UserOrgsSerializable class UsersResponse(ModelNormal): @@ -44,7 +46,19 @@ def openapi_types(_): def __init__( self_, data: Union[List[User], UnsetType] = unset, - included: Union[List[Union[UserResponseIncludedItem, Organization, Permission, Role]], UnsetType] = unset, + included: Union[ + List[ + Union[ + UserResponseIncludedItem, + Organization, + Permission, + Role, + UserOverrideIdentityProvider, + UserOrgsSerializable, + ] + ], + UnsetType, + ] = unset, meta: Union[ResponseMetaAttributes, UnsetType] = unset, **kwargs, ): diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 18f6d4bdea..1abe49c91e 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1912,6 +1912,14 @@ from datadog_api_client.v2.model.user_invitations_request import UserInvitationsRequest from datadog_api_client.v2.model.user_invitations_response import UserInvitationsResponse from datadog_api_client.v2.model.user_invitations_type import UserInvitationsType +from datadog_api_client.v2.model.user_orgs_serializable import UserOrgsSerializable +from datadog_api_client.v2.model.user_orgs_serializable_attributes import UserOrgsSerializableAttributes +from datadog_api_client.v2.model.user_orgs_serializable_type import UserOrgsSerializableType +from datadog_api_client.v2.model.user_override_identity_provider import UserOverrideIdentityProvider +from datadog_api_client.v2.model.user_override_identity_provider_attributes import ( + UserOverrideIdentityProviderAttributes, +) +from datadog_api_client.v2.model.user_override_identity_provider_type import UserOverrideIdentityProviderType from datadog_api_client.v2.model.user_relationship_data import UserRelationshipData from datadog_api_client.v2.model.user_relationships import UserRelationships from datadog_api_client.v2.model.user_resource_type import UserResourceType @@ -3541,6 +3549,12 @@ "UserInvitationsRequest", "UserInvitationsResponse", "UserInvitationsType", + "UserOrgsSerializable", + "UserOrgsSerializableAttributes", + "UserOrgsSerializableType", + "UserOverrideIdentityProvider", + "UserOverrideIdentityProviderAttributes", + "UserOverrideIdentityProviderType", "UserRelationshipData", "UserRelationships", "UserResourceType", diff --git a/tests/v2/features/users.feature b/tests/v2/features/users.feature index ce27d72998..3e1b152810 100644 --- a/tests/v2/features/users.feature +++ b/tests/v2/features/users.feature @@ -151,7 +151,7 @@ Feature: Users Scenario: Update a user returns "Bad Request" response Given new "UpdateUser" request And request contains "user_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "id": "00000000-0000-feed-0000-000000000000", "type": "users"}} + And body with value {"data": {"attributes": {"title": null}, "id": "00000000-0000-feed-0000-000000000000", "type": "users"}} When the request is sent Then the response status is 400 Bad Request @@ -189,6 +189,6 @@ Feature: Users Scenario: Update a user returns "Unprocessable Entity" response Given new "UpdateUser" request And request contains "user_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "id": "00000000-0000-feed-0000-000000000000", "type": "users"}} + And body with value {"data": {"attributes": {"title": null}, "id": "00000000-0000-feed-0000-000000000000", "type": "users"}} When the request is sent Then the response status is 422 Unprocessable Entity