diff --git a/.apigentools-info b/.apigentools-info index 3e1a790fd0..57c2dd4359 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-14 22:02:36.053386", - "spec_repo_commit": "5e33062a" + "regenerated": "2024-08-14 22:32:00.966604", + "spec_repo_commit": "07d72513" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-14 22:02:36.070633", - "spec_repo_commit": "5e33062a" + "regenerated": "2024-08-14 22:32:00.983631", + "spec_repo_commit": "07d72513" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e77e016336..5bc7b9beb7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -673,10 +673,16 @@ components: APIKeyCreateAttributes: description: Attributes used to create an API Key. properties: + category: + description: The APIKeyCreateAttributes category. + type: string name: description: Name of the API key. example: API Key for submitting metrics type: string + remote_config_read_enabled: + description: The APIKeyCreateAttributes remote_config_read_enabled. + type: boolean required: - name type: object @@ -722,13 +728,20 @@ components: description: An object related to an API key. oneOf: - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/LeakedKey' APIKeyUpdateAttributes: description: Attributes used to update an API Key. properties: + category: + description: The APIKeyUpdateAttributes category. + type: string name: description: Name of the API key. example: API Key for submitting metrics type: string + remote_config_read_enabled: + description: The APIKeyUpdateAttributes remote_config_read_enabled. + type: boolean required: - name type: object @@ -981,6 +994,7 @@ components: oneOf: - $ref: '#/components/schemas/User' - $ref: '#/components/schemas/Role' + - $ref: '#/components/schemas/LeakedKey' ApplicationKeyResponseMeta: description: Additional information related to the application key response. properties: @@ -8461,6 +8475,7 @@ components: created_at: description: Creation date of the API key. example: '2020-11-23T10:00:00.000Z' + format: date-time readOnly: true type: string key: @@ -8477,6 +8492,7 @@ components: modified_at: description: Date the API key was last modified. example: '2020-11-23T10:00:00.000Z' + format: date-time readOnly: true type: string name: @@ -11140,6 +11156,45 @@ components: description: Jira project key type: string type: object + LeakedKey: + description: The definition of LeakedKey object. + properties: + attributes: + $ref: '#/components/schemas/LeakedKeyAttributes' + id: + description: The LeakedKey id. + example: id + type: string + type: + $ref: '#/components/schemas/LeakedKeyType' + required: + - attributes + - id + - type + type: object + LeakedKeyAttributes: + description: The definition of LeakedKeyAttributes object. + properties: + date: + description: The LeakedKeyAttributes date. + example: '2017-07-21T17:32:28Z' + format: date-time + type: string + leak_source: + description: The LeakedKeyAttributes leak_source. + type: string + required: + - date + type: object + LeakedKeyType: + default: leaked_keys + description: The definition of LeakedKeyType object. + enum: + - leaked_keys + example: leaked_keys + type: string + x-enum-varnames: + - LEAKED_KEYS ListAPIsResponse: description: Response for `ListAPIs`. properties: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 0e71b98212..6325f16a99 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -4652,6 +4652,27 @@ datadog\_api\_client.v2.model.jsonapi\_error\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.leaked\_key module +------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.leaked_key + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.leaked\_key\_attributes module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.leaked_key_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.leaked\_key\_type module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.leaked_key_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.list\_apis\_response module --------------------------------------------------------- diff --git a/src/datadog_api_client/v2/model/api_key_create_attributes.py b/src/datadog_api_client/v2/model/api_key_create_attributes.py index f5490c67b3..704bb83bff 100644 --- a/src/datadog_api_client/v2/model/api_key_create_attributes.py +++ b/src/datadog_api_client/v2/model/api_key_create_attributes.py @@ -3,10 +3,13 @@ # 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, ) @@ -14,20 +17,40 @@ class APIKeyCreateAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "category": (str,), "name": (str,), + "remote_config_read_enabled": (bool,), } attribute_map = { + "category": "category", "name": "name", + "remote_config_read_enabled": "remote_config_read_enabled", } - def __init__(self_, name: str, **kwargs): + def __init__( + self_, + name: str, + category: Union[str, UnsetType] = unset, + remote_config_read_enabled: Union[bool, UnsetType] = unset, + **kwargs, + ): """ Attributes used to create an API Key. + :param category: The APIKeyCreateAttributes category. + :type category: str, optional + :param name: Name of the API key. :type name: str + + :param remote_config_read_enabled: The APIKeyCreateAttributes remote_config_read_enabled. + :type remote_config_read_enabled: bool, optional """ + if category is not unset: + kwargs["category"] = category + if remote_config_read_enabled is not unset: + kwargs["remote_config_read_enabled"] = remote_config_read_enabled super().__init__(kwargs) self_.name = name diff --git a/src/datadog_api_client/v2/model/api_key_response.py b/src/datadog_api_client/v2/model/api_key_response.py index ecf8b88814..7dc9d7af57 100644 --- a/src/datadog_api_client/v2/model/api_key_response.py +++ b/src/datadog_api_client/v2/model/api_key_response.py @@ -17,6 +17,7 @@ from datadog_api_client.v2.model.full_api_key import FullAPIKey from datadog_api_client.v2.model.api_key_response_included_item import APIKeyResponseIncludedItem from datadog_api_client.v2.model.user import User + from datadog_api_client.v2.model.leaked_key import LeakedKey class APIKeyResponse(ModelNormal): @@ -38,7 +39,7 @@ def openapi_types(_): def __init__( self_, data: Union[FullAPIKey, UnsetType] = unset, - included: Union[List[Union[APIKeyResponseIncludedItem, User]], UnsetType] = unset, + included: Union[List[Union[APIKeyResponseIncludedItem, User, LeakedKey]], UnsetType] = unset, **kwargs, ): """ diff --git a/src/datadog_api_client/v2/model/api_key_response_included_item.py b/src/datadog_api_client/v2/model/api_key_response_included_item.py index 7158b26e61..f0ee56c9c3 100644 --- a/src/datadog_api_client/v2/model/api_key_response_included_item.py +++ b/src/datadog_api_client/v2/model/api_key_response_included_item.py @@ -39,9 +39,11 @@ def _composed_schemas(_): # 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.leaked_key import LeakedKey return { "oneOf": [ User, + LeakedKey, ], } diff --git a/src/datadog_api_client/v2/model/api_key_update_attributes.py b/src/datadog_api_client/v2/model/api_key_update_attributes.py index 438633a900..5cfa79599e 100644 --- a/src/datadog_api_client/v2/model/api_key_update_attributes.py +++ b/src/datadog_api_client/v2/model/api_key_update_attributes.py @@ -3,10 +3,13 @@ # 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, ) @@ -14,20 +17,40 @@ class APIKeyUpdateAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "category": (str,), "name": (str,), + "remote_config_read_enabled": (bool,), } attribute_map = { + "category": "category", "name": "name", + "remote_config_read_enabled": "remote_config_read_enabled", } - def __init__(self_, name: str, **kwargs): + def __init__( + self_, + name: str, + category: Union[str, UnsetType] = unset, + remote_config_read_enabled: Union[bool, UnsetType] = unset, + **kwargs, + ): """ Attributes used to update an API Key. + :param category: The APIKeyUpdateAttributes category. + :type category: str, optional + :param name: Name of the API key. :type name: str + + :param remote_config_read_enabled: The APIKeyUpdateAttributes remote_config_read_enabled. + :type remote_config_read_enabled: bool, optional """ + if category is not unset: + kwargs["category"] = category + if remote_config_read_enabled is not unset: + kwargs["remote_config_read_enabled"] = remote_config_read_enabled super().__init__(kwargs) self_.name = name diff --git a/src/datadog_api_client/v2/model/api_keys_response.py b/src/datadog_api_client/v2/model/api_keys_response.py index 750f17110b..a1a11baf44 100644 --- a/src/datadog_api_client/v2/model/api_keys_response.py +++ b/src/datadog_api_client/v2/model/api_keys_response.py @@ -18,6 +18,7 @@ from datadog_api_client.v2.model.api_key_response_included_item import APIKeyResponseIncludedItem from datadog_api_client.v2.model.api_keys_response_meta import APIKeysResponseMeta from datadog_api_client.v2.model.user import User + from datadog_api_client.v2.model.leaked_key import LeakedKey class APIKeysResponse(ModelNormal): @@ -42,7 +43,7 @@ def openapi_types(_): def __init__( self_, data: Union[List[PartialAPIKey], UnsetType] = unset, - included: Union[List[Union[APIKeyResponseIncludedItem, User]], UnsetType] = unset, + included: Union[List[Union[APIKeyResponseIncludedItem, User, LeakedKey]], UnsetType] = unset, meta: Union[APIKeysResponseMeta, UnsetType] = unset, **kwargs, ): diff --git a/src/datadog_api_client/v2/model/application_key_response.py b/src/datadog_api_client/v2/model/application_key_response.py index f0cd3a4880..1140848abd 100644 --- a/src/datadog_api_client/v2/model/application_key_response.py +++ b/src/datadog_api_client/v2/model/application_key_response.py @@ -18,6 +18,7 @@ from datadog_api_client.v2.model.application_key_response_included_item import ApplicationKeyResponseIncludedItem from datadog_api_client.v2.model.user import User from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.leaked_key import LeakedKey class ApplicationKeyResponse(ModelNormal): @@ -41,7 +42,7 @@ def openapi_types(_): def __init__( self_, data: Union[FullApplicationKey, UnsetType] = unset, - included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role]], UnsetType] = unset, + included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role, LeakedKey]], UnsetType] = unset, **kwargs, ): """ diff --git a/src/datadog_api_client/v2/model/application_key_response_included_item.py b/src/datadog_api_client/v2/model/application_key_response_included_item.py index 6aa22db044..f063e6159c 100644 --- a/src/datadog_api_client/v2/model/application_key_response_included_item.py +++ b/src/datadog_api_client/v2/model/application_key_response_included_item.py @@ -40,10 +40,12 @@ def _composed_schemas(_): # loading from datadog_api_client.v2.model.user import User from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.leaked_key import LeakedKey return { "oneOf": [ User, Role, + LeakedKey, ], } diff --git a/src/datadog_api_client/v2/model/full_api_key_attributes.py b/src/datadog_api_client/v2/model/full_api_key_attributes.py index c9baa3201c..4bbab90d9b 100644 --- a/src/datadog_api_client/v2/model/full_api_key_attributes.py +++ b/src/datadog_api_client/v2/model/full_api_key_attributes.py @@ -8,6 +8,7 @@ from datadog_api_client.model_utils import ( ModelNormal, cached_property, + datetime, unset, UnsetType, ) @@ -25,10 +26,10 @@ class FullAPIKeyAttributes(ModelNormal): def openapi_types(_): return { "category": (str,), - "created_at": (str,), + "created_at": (datetime,), "key": (str,), "last4": (str,), - "modified_at": (str,), + "modified_at": (datetime,), "name": (str,), "remote_config_read_enabled": (bool,), } @@ -52,10 +53,10 @@ def openapi_types(_): def __init__( self_, category: Union[str, UnsetType] = unset, - created_at: Union[str, UnsetType] = unset, + created_at: Union[datetime, UnsetType] = unset, key: Union[str, UnsetType] = unset, last4: Union[str, UnsetType] = unset, - modified_at: Union[str, UnsetType] = unset, + modified_at: Union[datetime, UnsetType] = unset, name: Union[str, UnsetType] = unset, remote_config_read_enabled: Union[bool, UnsetType] = unset, **kwargs, @@ -67,7 +68,7 @@ def __init__( :type category: str, optional :param created_at: Creation date of the API key. - :type created_at: str, optional + :type created_at: datetime, optional :param key: The API key. :type key: str, optional @@ -76,7 +77,7 @@ def __init__( :type last4: str, optional :param modified_at: Date the API key was last modified. - :type modified_at: str, optional + :type modified_at: datetime, optional :param name: Name of the API key. :type name: str, optional diff --git a/src/datadog_api_client/v2/model/leaked_key.py b/src/datadog_api_client/v2/model/leaked_key.py new file mode 100644 index 0000000000..144870047e --- /dev/null +++ b/src/datadog_api_client/v2/model/leaked_key.py @@ -0,0 +1,54 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.leaked_key_attributes import LeakedKeyAttributes + from datadog_api_client.v2.model.leaked_key_type import LeakedKeyType + + +class LeakedKey(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.leaked_key_attributes import LeakedKeyAttributes + from datadog_api_client.v2.model.leaked_key_type import LeakedKeyType + + return { + "attributes": (LeakedKeyAttributes,), + "id": (str,), + "type": (LeakedKeyType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: LeakedKeyAttributes, id: str, type: LeakedKeyType, **kwargs): + """ + The definition of LeakedKey object. + + :param attributes: The definition of LeakedKeyAttributes object. + :type attributes: LeakedKeyAttributes + + :param id: The LeakedKey id. + :type id: str + + :param type: The definition of LeakedKeyType object. + :type type: LeakedKeyType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/leaked_key_attributes.py b/src/datadog_api_client/v2/model/leaked_key_attributes.py new file mode 100644 index 0000000000..53b78d8cb0 --- /dev/null +++ b/src/datadog_api_client/v2/model/leaked_key_attributes.py @@ -0,0 +1,44 @@ +# 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, + datetime, + unset, + UnsetType, +) + + +class LeakedKeyAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "date": (datetime,), + "leak_source": (str,), + } + + attribute_map = { + "date": "date", + "leak_source": "leak_source", + } + + def __init__(self_, date: datetime, leak_source: Union[str, UnsetType] = unset, **kwargs): + """ + The definition of LeakedKeyAttributes object. + + :param date: The LeakedKeyAttributes date. + :type date: datetime + + :param leak_source: The LeakedKeyAttributes leak_source. + :type leak_source: str, optional + """ + if leak_source is not unset: + kwargs["leak_source"] = leak_source + super().__init__(kwargs) + + self_.date = date diff --git a/src/datadog_api_client/v2/model/leaked_key_type.py b/src/datadog_api_client/v2/model/leaked_key_type.py new file mode 100644 index 0000000000..dba37a6d93 --- /dev/null +++ b/src/datadog_api_client/v2/model/leaked_key_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 LeakedKeyType(ModelSimple): + """ + The definition of LeakedKeyType object. + + :param value: If omitted defaults to "leaked_keys". Must be one of ["leaked_keys"]. + :type value: str + """ + + allowed_values = { + "leaked_keys", + } + LEAKED_KEYS: ClassVar["LeakedKeyType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LeakedKeyType.LEAKED_KEYS = LeakedKeyType("leaked_keys") diff --git a/src/datadog_api_client/v2/model/list_application_keys_response.py b/src/datadog_api_client/v2/model/list_application_keys_response.py index be24002a36..d7e4913f63 100644 --- a/src/datadog_api_client/v2/model/list_application_keys_response.py +++ b/src/datadog_api_client/v2/model/list_application_keys_response.py @@ -19,6 +19,7 @@ from datadog_api_client.v2.model.application_key_response_meta import ApplicationKeyResponseMeta from datadog_api_client.v2.model.user import User from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.leaked_key import LeakedKey class ListApplicationKeysResponse(ModelNormal): @@ -45,7 +46,7 @@ def openapi_types(_): def __init__( self_, data: Union[List[PartialApplicationKey], UnsetType] = unset, - included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role]], UnsetType] = unset, + included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role, LeakedKey]], UnsetType] = unset, meta: Union[ApplicationKeyResponseMeta, UnsetType] = unset, **kwargs, ): diff --git a/src/datadog_api_client/v2/model/partial_application_key_response.py b/src/datadog_api_client/v2/model/partial_application_key_response.py index 411c5f6ff5..067a534286 100644 --- a/src/datadog_api_client/v2/model/partial_application_key_response.py +++ b/src/datadog_api_client/v2/model/partial_application_key_response.py @@ -18,6 +18,7 @@ from datadog_api_client.v2.model.application_key_response_included_item import ApplicationKeyResponseIncludedItem from datadog_api_client.v2.model.user import User from datadog_api_client.v2.model.role import Role + from datadog_api_client.v2.model.leaked_key import LeakedKey class PartialApplicationKeyResponse(ModelNormal): @@ -41,7 +42,7 @@ def openapi_types(_): def __init__( self_, data: Union[PartialApplicationKey, UnsetType] = unset, - included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role]], UnsetType] = unset, + included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role, LeakedKey]], UnsetType] = unset, **kwargs, ): """ diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 3e89a6ea76..e192db2ed3 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -812,6 +812,9 @@ from datadog_api_client.v2.model.jira_integration_metadata_issues_item import JiraIntegrationMetadataIssuesItem from datadog_api_client.v2.model.jira_issue import JiraIssue from datadog_api_client.v2.model.jira_issue_result import JiraIssueResult +from datadog_api_client.v2.model.leaked_key import LeakedKey +from datadog_api_client.v2.model.leaked_key_attributes import LeakedKeyAttributes +from datadog_api_client.v2.model.leaked_key_type import LeakedKeyType from datadog_api_client.v2.model.list_apis_response import ListAPIsResponse from datadog_api_client.v2.model.list_apis_response_data import ListAPIsResponseData from datadog_api_client.v2.model.list_apis_response_data_attributes import ListAPIsResponseDataAttributes @@ -2539,6 +2542,9 @@ "JiraIntegrationMetadataIssuesItem", "JiraIssue", "JiraIssueResult", + "LeakedKey", + "LeakedKeyAttributes", + "LeakedKeyType", "ListAPIsResponse", "ListAPIsResponseData", "ListAPIsResponseDataAttributes",