From 83ad6b10a8bd2c1de98052a493c780823db2dbc7 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:34:49 +0000 Subject: [PATCH 1/4] Document new api/app key schemas (#1755) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +-- .generator/schemas/v2/openapi.yaml | 40 ++++++++++++++ docs/datadog_api_client.v2.model.rst | 28 ++++++++++ .../v2/model/api_keys_response.py | 10 ++++ .../v2/model/api_keys_response_meta.py | 54 +++++++++++++++++++ .../v2/model/api_keys_response_meta_page.py | 36 +++++++++++++ .../v2/model/application_key_response_meta.py | 54 +++++++++++++++++++ .../application_key_response_meta_page.py | 36 +++++++++++++ .../model/list_application_keys_response.py | 10 ++++ src/datadog_api_client/v2/models/__init__.py | 8 +++ 10 files changed, 280 insertions(+), 4 deletions(-) create mode 100644 src/datadog_api_client/v2/model/api_keys_response_meta.py create mode 100644 src/datadog_api_client/v2/model/api_keys_response_meta_page.py create mode 100644 src/datadog_api_client/v2/model/application_key_response_meta.py create mode 100644 src/datadog_api_client/v2/model/application_key_response_meta_page.py diff --git a/.apigentools-info b/.apigentools-info index 52833acb97..eb7a197801 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 12:18:28.002474", - "spec_repo_commit": "d2efeed9" + "regenerated": "2023-11-17 18:13:33.996478", + "spec_repo_commit": "46090fc1" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 12:18:28.020826", - "spec_repo_commit": "d2efeed9" + "regenerated": "2023-11-17 18:13:34.052011", + "spec_repo_commit": "46090fc1" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5c17bd74e9..a7f2df358f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -689,6 +689,26 @@ components: items: $ref: '#/components/schemas/APIKeyResponseIncludedItem' type: array + meta: + $ref: '#/components/schemas/APIKeysResponseMeta' + type: object + APIKeysResponseMeta: + description: Additional information related to api keys response. + properties: + max_allowed: + description: Max allowed number of API keys. + format: int64 + type: integer + page: + $ref: '#/components/schemas/APIKeysResponseMetaPage' + type: object + APIKeysResponseMetaPage: + description: Additional information related to the API keys response. + properties: + total_filtered_count: + description: Total filtered application key count. + format: int64 + type: integer type: object APIKeysSort: default: name @@ -833,6 +853,24 @@ components: oneOf: - $ref: '#/components/schemas/User' - $ref: '#/components/schemas/Role' + ApplicationKeyResponseMeta: + description: Additional information related to the application key response. + properties: + max_allowed_per_user: + description: Max allowed number of application keys per user. + format: int64 + type: integer + page: + $ref: '#/components/schemas/ApplicationKeyResponseMetaPage' + type: object + ApplicationKeyResponseMetaPage: + description: Additional information related to the application key response. + properties: + total_filtered_count: + description: Total filtered application key count. + format: int64 + type: integer + type: object ApplicationKeyUpdateAttributes: description: Attributes used to update an application Key. properties: @@ -8667,6 +8705,8 @@ components: items: $ref: '#/components/schemas/ApplicationKeyResponseIncludedItem' type: array + meta: + $ref: '#/components/schemas/ApplicationKeyResponseMeta' type: object ListDowntimesResponse: description: Response for retrieving all downtimes. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 1007210491..558e9a1ec0 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -106,6 +106,20 @@ api\_keys\_response :members: :show-inheritance: +api\_keys\_response\_meta +------------------------- + +.. automodule:: datadog_api_client.v2.model.api_keys_response_meta + :members: + :show-inheritance: + +api\_keys\_response\_meta\_page +------------------------------- + +.. automodule:: datadog_api_client.v2.model.api_keys_response_meta_page + :members: + :show-inheritance: + api\_keys\_sort --------------- @@ -169,6 +183,20 @@ application\_key\_response\_included\_item :members: :show-inheritance: +application\_key\_response\_meta +-------------------------------- + +.. automodule:: datadog_api_client.v2.model.application_key_response_meta + :members: + :show-inheritance: + +application\_key\_response\_meta\_page +-------------------------------------- + +.. automodule:: datadog_api_client.v2.model.application_key_response_meta_page + :members: + :show-inheritance: + application\_key\_update\_attributes ------------------------------------ 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 6dfa83aa54..750f17110b 100644 --- a/src/datadog_api_client/v2/model/api_keys_response.py +++ b/src/datadog_api_client/v2/model/api_keys_response.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.partial_api_key import PartialAPIKey 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 @@ -24,21 +25,25 @@ class APIKeysResponse(ModelNormal): def openapi_types(_): from datadog_api_client.v2.model.partial_api_key import PartialAPIKey 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 return { "data": ([PartialAPIKey],), "included": ([APIKeyResponseIncludedItem],), + "meta": (APIKeysResponseMeta,), } attribute_map = { "data": "data", "included": "included", + "meta": "meta", } def __init__( self_, data: Union[List[PartialAPIKey], UnsetType] = unset, included: Union[List[Union[APIKeyResponseIncludedItem, User]], UnsetType] = unset, + meta: Union[APIKeysResponseMeta, UnsetType] = unset, **kwargs, ): """ @@ -49,9 +54,14 @@ def __init__( :param included: Array of objects related to the API key. :type included: [APIKeyResponseIncludedItem], optional + + :param meta: Additional information related to api keys response. + :type meta: APIKeysResponseMeta, optional """ if data is not unset: kwargs["data"] = data if included is not unset: kwargs["included"] = included + if meta is not unset: + kwargs["meta"] = meta super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/api_keys_response_meta.py b/src/datadog_api_client/v2/model/api_keys_response_meta.py new file mode 100644 index 0000000000..d08bacbe76 --- /dev/null +++ b/src/datadog_api_client/v2/model/api_keys_response_meta.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.api_keys_response_meta_page import APIKeysResponseMetaPage + + +class APIKeysResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.api_keys_response_meta_page import APIKeysResponseMetaPage + + return { + "max_allowed": (int,), + "page": (APIKeysResponseMetaPage,), + } + + attribute_map = { + "max_allowed": "max_allowed", + "page": "page", + } + + def __init__( + self_, + max_allowed: Union[int, UnsetType] = unset, + page: Union[APIKeysResponseMetaPage, UnsetType] = unset, + **kwargs, + ): + """ + Additional information related to api keys response. + + :param max_allowed: Max allowed number of API keys. + :type max_allowed: int, optional + + :param page: Additional information related to the API keys response. + :type page: APIKeysResponseMetaPage, optional + """ + if max_allowed is not unset: + kwargs["max_allowed"] = max_allowed + if page is not unset: + kwargs["page"] = page + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/api_keys_response_meta_page.py b/src/datadog_api_client/v2/model/api_keys_response_meta_page.py new file mode 100644 index 0000000000..2744042e88 --- /dev/null +++ b/src/datadog_api_client/v2/model/api_keys_response_meta_page.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 APIKeysResponseMetaPage(ModelNormal): + @cached_property + def openapi_types(_): + return { + "total_filtered_count": (int,), + } + + attribute_map = { + "total_filtered_count": "total_filtered_count", + } + + def __init__(self_, total_filtered_count: Union[int, UnsetType] = unset, **kwargs): + """ + Additional information related to the API keys response. + + :param total_filtered_count: Total filtered application key count. + :type total_filtered_count: int, optional + """ + if total_filtered_count is not unset: + kwargs["total_filtered_count"] = total_filtered_count + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/application_key_response_meta.py b/src/datadog_api_client/v2/model/application_key_response_meta.py new file mode 100644 index 0000000000..3798e65f8f --- /dev/null +++ b/src/datadog_api_client/v2/model/application_key_response_meta.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.application_key_response_meta_page import ApplicationKeyResponseMetaPage + + +class ApplicationKeyResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.application_key_response_meta_page import ApplicationKeyResponseMetaPage + + return { + "max_allowed_per_user": (int,), + "page": (ApplicationKeyResponseMetaPage,), + } + + attribute_map = { + "max_allowed_per_user": "max_allowed_per_user", + "page": "page", + } + + def __init__( + self_, + max_allowed_per_user: Union[int, UnsetType] = unset, + page: Union[ApplicationKeyResponseMetaPage, UnsetType] = unset, + **kwargs, + ): + """ + Additional information related to the application key response. + + :param max_allowed_per_user: Max allowed number of application keys per user. + :type max_allowed_per_user: int, optional + + :param page: Additional information related to the application key response. + :type page: ApplicationKeyResponseMetaPage, optional + """ + if max_allowed_per_user is not unset: + kwargs["max_allowed_per_user"] = max_allowed_per_user + if page is not unset: + kwargs["page"] = page + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/application_key_response_meta_page.py b/src/datadog_api_client/v2/model/application_key_response_meta_page.py new file mode 100644 index 0000000000..862d297dfb --- /dev/null +++ b/src/datadog_api_client/v2/model/application_key_response_meta_page.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 ApplicationKeyResponseMetaPage(ModelNormal): + @cached_property + def openapi_types(_): + return { + "total_filtered_count": (int,), + } + + attribute_map = { + "total_filtered_count": "total_filtered_count", + } + + def __init__(self_, total_filtered_count: Union[int, UnsetType] = unset, **kwargs): + """ + Additional information related to the application key response. + + :param total_filtered_count: Total filtered application key count. + :type total_filtered_count: int, optional + """ + if total_filtered_count is not unset: + kwargs["total_filtered_count"] = total_filtered_count + super().__init__(kwargs) 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 830a9ebe94..be24002a36 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 @@ -16,6 +16,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.partial_application_key import PartialApplicationKey from datadog_api_client.v2.model.application_key_response_included_item import ApplicationKeyResponseIncludedItem + 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 @@ -27,21 +28,25 @@ def openapi_types(_): from datadog_api_client.v2.model.application_key_response_included_item import ( ApplicationKeyResponseIncludedItem, ) + from datadog_api_client.v2.model.application_key_response_meta import ApplicationKeyResponseMeta return { "data": ([PartialApplicationKey],), "included": ([ApplicationKeyResponseIncludedItem],), + "meta": (ApplicationKeyResponseMeta,), } attribute_map = { "data": "data", "included": "included", + "meta": "meta", } def __init__( self_, data: Union[List[PartialApplicationKey], UnsetType] = unset, included: Union[List[Union[ApplicationKeyResponseIncludedItem, User, Role]], UnsetType] = unset, + meta: Union[ApplicationKeyResponseMeta, UnsetType] = unset, **kwargs, ): """ @@ -52,9 +57,14 @@ def __init__( :param included: Array of objects related to the application key. :type included: [ApplicationKeyResponseIncludedItem], optional + + :param meta: Additional information related to the application key response. + :type meta: ApplicationKeyResponseMeta, optional """ if data is not unset: kwargs["data"] = data if included is not unset: kwargs["included"] = included + if meta is not unset: + kwargs["meta"] = meta super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 0864fc2e76..a783f23121 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -9,6 +9,8 @@ from datadog_api_client.v2.model.api_key_update_data import APIKeyUpdateData from datadog_api_client.v2.model.api_key_update_request import APIKeyUpdateRequest from datadog_api_client.v2.model.api_keys_response import APIKeysResponse +from datadog_api_client.v2.model.api_keys_response_meta import APIKeysResponseMeta +from datadog_api_client.v2.model.api_keys_response_meta_page import APIKeysResponseMetaPage from datadog_api_client.v2.model.api_keys_sort import APIKeysSort from datadog_api_client.v2.model.api_keys_type import APIKeysType from datadog_api_client.v2.model.active_billing_dimensions_attributes import ActiveBillingDimensionsAttributes @@ -22,6 +24,8 @@ from datadog_api_client.v2.model.application_key_relationships import ApplicationKeyRelationships from datadog_api_client.v2.model.application_key_response import ApplicationKeyResponse from datadog_api_client.v2.model.application_key_response_included_item import ApplicationKeyResponseIncludedItem +from datadog_api_client.v2.model.application_key_response_meta import ApplicationKeyResponseMeta +from datadog_api_client.v2.model.application_key_response_meta_page import ApplicationKeyResponseMetaPage from datadog_api_client.v2.model.application_key_update_attributes import ApplicationKeyUpdateAttributes from datadog_api_client.v2.model.application_key_update_data import ApplicationKeyUpdateData from datadog_api_client.v2.model.application_key_update_request import ApplicationKeyUpdateRequest @@ -1520,6 +1524,8 @@ "APIKeyUpdateData", "APIKeyUpdateRequest", "APIKeysResponse", + "APIKeysResponseMeta", + "APIKeysResponseMetaPage", "APIKeysSort", "APIKeysType", "ActiveBillingDimensionsAttributes", @@ -1533,6 +1539,8 @@ "ApplicationKeyRelationships", "ApplicationKeyResponse", "ApplicationKeyResponseIncludedItem", + "ApplicationKeyResponseMeta", + "ApplicationKeyResponseMetaPage", "ApplicationKeyUpdateAttributes", "ApplicationKeyUpdateData", "ApplicationKeyUpdateRequest", From a37fc92bc620ff20cd962087abd60eeffe7d5e21 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:22:08 +0000 Subject: [PATCH 2/4] Document new field `filters` for `CloudWorkloadSecurityAgentRule` (#1774) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 5 +++++ .../cloud_workload_security_agent_rule_attributes.py | 10 +++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index eb7a197801..8942b95556 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 18:13:33.996478", - "spec_repo_commit": "46090fc1" + "regenerated": "2023-11-17 18:38:44.802761", + "spec_repo_commit": "ea610108" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 18:13:34.052011", - "spec_repo_commit": "46090fc1" + "regenerated": "2023-11-17 18:38:44.817898", + "spec_repo_commit": "ea610108" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a7f2df358f..6c9b5a922f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -3042,6 +3042,11 @@ components: description: The SECL expression of the Agent rule. example: exec.file.name == \"sh\" type: string + filters: + description: The platforms the Agent rule is supported on. + items: + type: string + type: array name: description: The name of the Agent rule. example: my_agent_rule diff --git a/src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_attributes.py b/src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_attributes.py index baf2174e19..b7e72fd693 100644 --- a/src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_attributes.py +++ b/src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -42,6 +42,7 @@ def openapi_types(_): "description": (str,), "enabled": (bool,), "expression": (str,), + "filters": ([str],), "name": (str,), "update_author_uu_id": (str,), "update_date": (int,), @@ -60,6 +61,7 @@ def openapi_types(_): "description": "description", "enabled": "enabled", "expression": "expression", + "filters": "filters", "name": "name", "update_author_uu_id": "updateAuthorUuId", "update_date": "updateDate", @@ -79,6 +81,7 @@ def __init__( description: Union[str, UnsetType] = unset, enabled: Union[bool, UnsetType] = unset, expression: Union[str, UnsetType] = unset, + filters: Union[List[str], UnsetType] = unset, name: Union[str, UnsetType] = unset, update_author_uu_id: Union[str, UnsetType] = unset, update_date: Union[int, UnsetType] = unset, @@ -117,6 +120,9 @@ def __init__( :param expression: The SECL expression of the Agent rule. :type expression: str, optional + :param filters: The platforms the Agent rule is supported on. + :type filters: [str], optional + :param name: The name of the Agent rule. :type name: str, optional @@ -153,6 +159,8 @@ def __init__( kwargs["enabled"] = enabled if expression is not unset: kwargs["expression"] = expression + if filters is not unset: + kwargs["filters"] = filters if name is not unset: kwargs["name"] = name if update_author_uu_id is not unset: From becbb3dce60e8cc3bec85833b3897fdf8e3c0810 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:01:16 +0000 Subject: [PATCH 3/4] Fix Powerpack schema (#1752) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 3 ++- .../v2/model/powerpack_relationships.py | 12 ++++++------ .../v2/model/powerpacks_response_meta_pagination.py | 7 ++++--- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 8942b95556..f8fae8e0b6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 18:38:44.802761", - "spec_repo_commit": "ea610108" + "regenerated": "2023-11-17 19:36:50.156877", + "spec_repo_commit": "506ed2d8" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 18:38:44.817898", - "spec_repo_commit": "ea610108" + "regenerated": "2023-11-17 19:36:50.254511", + "spec_repo_commit": "506ed2d8" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6c9b5a922f..8b8e69b310 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12084,7 +12084,7 @@ components: description: Powerpack relationship object. properties: author: - $ref: '#/components/schemas/Creator' + $ref: '#/components/schemas/RelationshipToUser' type: object PowerpackResponse: description: Response object which includes a single powerpack configuration. @@ -12156,6 +12156,7 @@ components: last_offset: description: The last offset. format: int64 + nullable: true type: integer limit: description: Pagination limit. diff --git a/src/datadog_api_client/v2/model/powerpack_relationships.py b/src/datadog_api_client/v2/model/powerpack_relationships.py index e7e2c23e0f..a60e940854 100644 --- a/src/datadog_api_client/v2/model/powerpack_relationships.py +++ b/src/datadog_api_client/v2/model/powerpack_relationships.py @@ -14,28 +14,28 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.creator import Creator + from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser class PowerpackRelationships(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.creator import Creator + from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser return { - "author": (Creator,), + "author": (RelationshipToUser,), } attribute_map = { "author": "author", } - def __init__(self_, author: Union[Creator, UnsetType] = unset, **kwargs): + def __init__(self_, author: Union[RelationshipToUser, UnsetType] = unset, **kwargs): """ Powerpack relationship object. - :param author: Creator of the object. - :type author: Creator, optional + :param author: Relationship to user. + :type author: RelationshipToUser, optional """ if author is not unset: kwargs["author"] = author diff --git a/src/datadog_api_client/v2/model/powerpacks_response_meta_pagination.py b/src/datadog_api_client/v2/model/powerpacks_response_meta_pagination.py index 364aa1bb47..16a2f5626c 100644 --- a/src/datadog_api_client/v2/model/powerpacks_response_meta_pagination.py +++ b/src/datadog_api_client/v2/model/powerpacks_response_meta_pagination.py @@ -8,6 +8,7 @@ from datadog_api_client.model_utils import ( ModelNormal, cached_property, + none_type, unset, UnsetType, ) @@ -18,7 +19,7 @@ class PowerpacksResponseMetaPagination(ModelNormal): def openapi_types(_): return { "first_offset": (int,), - "last_offset": (int,), + "last_offset": (int, none_type), "limit": (int,), "next_offset": (int,), "offset": (int,), @@ -41,7 +42,7 @@ def openapi_types(_): def __init__( self_, first_offset: Union[int, UnsetType] = unset, - last_offset: Union[int, UnsetType] = unset, + last_offset: Union[int, none_type, UnsetType] = unset, limit: Union[int, UnsetType] = unset, next_offset: Union[int, UnsetType] = unset, offset: Union[int, UnsetType] = unset, @@ -57,7 +58,7 @@ def __init__( :type first_offset: int, optional :param last_offset: The last offset. - :type last_offset: int, optional + :type last_offset: int, none_type, optional :param limit: Pagination limit. :type limit: int, optional From 7efdeda10021627a2734665b59e64bab68d38095 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:50:05 +0000 Subject: [PATCH 4/4] Live and historical custom timeseries docs (#1765) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 ++++---- .generator/schemas/v1/openapi.yaml | 20 +++++++++++++++++++ .../v1/model/usage_summary_date_org.py | 16 +++++++++++++++ .../v1/model/usage_summary_response.py | 16 +++++++++++++++ 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index f8fae8e0b6..829ed3a08e 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 19:36:50.156877", - "spec_repo_commit": "506ed2d8" + "regenerated": "2023-11-17 20:28:38.988410", + "spec_repo_commit": "7fb616ae" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-17 19:36:50.254511", - "spec_repo_commit": "506ed2d8" + "regenerated": "2023-11-17 20:28:39.002128", + "spec_repo_commit": "7fb616ae" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 25f744649d..fc38d34761 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -19226,6 +19226,16 @@ components: Pro hosts over all hours in the current date for the given org. format: int64 type: integer + custom_historical_ts_avg: + description: Shows the average number of distinct historical custom metrics + over all hours in the current date for the given org. + format: int64 + type: integer + custom_live_ts_avg: + description: Shows the average number of distinct live custom metrics over + all hours in the current date for the given org. + format: int64 + type: integer custom_ts_avg: description: Shows the average number of distinct custom metrics over all hours in the current date for the given org. @@ -19757,6 +19767,16 @@ components: Pro hosts over all hours in the current months for all organizations. format: int64 type: integer + custom_historical_ts_sum: + description: Shows the average number of distinct historical custom metrics + over all hours in the current months for all organizations. + format: int64 + type: integer + custom_live_ts_sum: + description: Shows the average number of distinct live custom metrics over + all hours in the current months for all organizations. + format: int64 + type: integer custom_ts_sum: description: Shows the average number of distinct custom metrics over all hours in the current months for all organizations. diff --git a/src/datadog_api_client/v1/model/usage_summary_date_org.py b/src/datadog_api_client/v1/model/usage_summary_date_org.py index 0ee1586142..5d6a8aa866 100644 --- a/src/datadog_api_client/v1/model/usage_summary_date_org.py +++ b/src/datadog_api_client/v1/model/usage_summary_date_org.py @@ -62,6 +62,8 @@ def openapi_types(_): "cspm_container_hwm": (int,), "cspm_gcp_host_top99p": (int,), "cspm_host_top99p": (int,), + "custom_historical_ts_avg": (int,), + "custom_live_ts_avg": (int,), "custom_ts_avg": (int,), "cws_container_count_avg": (int,), "cws_host_top99p": (int,), @@ -169,6 +171,8 @@ def openapi_types(_): "cspm_container_hwm": "cspm_container_hwm", "cspm_gcp_host_top99p": "cspm_gcp_host_top99p", "cspm_host_top99p": "cspm_host_top99p", + "custom_historical_ts_avg": "custom_historical_ts_avg", + "custom_live_ts_avg": "custom_live_ts_avg", "custom_ts_avg": "custom_ts_avg", "cws_container_count_avg": "cws_container_count_avg", "cws_host_top99p": "cws_host_top99p", @@ -277,6 +281,8 @@ def __init__( cspm_container_hwm: Union[int, UnsetType] = unset, cspm_gcp_host_top99p: Union[int, UnsetType] = unset, cspm_host_top99p: Union[int, UnsetType] = unset, + custom_historical_ts_avg: Union[int, UnsetType] = unset, + custom_live_ts_avg: Union[int, UnsetType] = unset, custom_ts_avg: Union[int, UnsetType] = unset, cws_container_count_avg: Union[int, UnsetType] = unset, cws_host_top99p: Union[int, UnsetType] = unset, @@ -476,6 +482,12 @@ def __init__( :param cspm_host_top99p: Shows the 99th percentile of all Cloud Security Management Pro hosts over all hours in the current date for the given org. :type cspm_host_top99p: int, optional + :param custom_historical_ts_avg: Shows the average number of distinct historical custom metrics over all hours in the current date for the given org. + :type custom_historical_ts_avg: int, optional + + :param custom_live_ts_avg: Shows the average number of distinct live custom metrics over all hours in the current date for the given org. + :type custom_live_ts_avg: int, optional + :param custom_ts_avg: Shows the average number of distinct custom metrics over all hours in the current date for the given org. :type custom_ts_avg: int, optional @@ -745,6 +757,10 @@ def __init__( kwargs["cspm_gcp_host_top99p"] = cspm_gcp_host_top99p if cspm_host_top99p is not unset: kwargs["cspm_host_top99p"] = cspm_host_top99p + if custom_historical_ts_avg is not unset: + kwargs["custom_historical_ts_avg"] = custom_historical_ts_avg + if custom_live_ts_avg is not unset: + kwargs["custom_live_ts_avg"] = custom_live_ts_avg if custom_ts_avg is not unset: kwargs["custom_ts_avg"] = custom_ts_avg if cws_container_count_avg is not unset: diff --git a/src/datadog_api_client/v1/model/usage_summary_response.py b/src/datadog_api_client/v1/model/usage_summary_response.py index 4812d29e40..3b755bf82a 100644 --- a/src/datadog_api_client/v1/model/usage_summary_response.py +++ b/src/datadog_api_client/v1/model/usage_summary_response.py @@ -72,6 +72,8 @@ def openapi_types(_): "cspm_container_hwm_sum": (int,), "cspm_gcp_host_top99p_sum": (int,), "cspm_host_top99p_sum": (int,), + "custom_historical_ts_sum": (int,), + "custom_live_ts_sum": (int,), "custom_ts_sum": (int,), "cws_containers_avg_sum": (int,), "cws_host_top99p_sum": (int,), @@ -186,6 +188,8 @@ def openapi_types(_): "cspm_container_hwm_sum": "cspm_container_hwm_sum", "cspm_gcp_host_top99p_sum": "cspm_gcp_host_top99p_sum", "cspm_host_top99p_sum": "cspm_host_top99p_sum", + "custom_historical_ts_sum": "custom_historical_ts_sum", + "custom_live_ts_sum": "custom_live_ts_sum", "custom_ts_sum": "custom_ts_sum", "cws_containers_avg_sum": "cws_containers_avg_sum", "cws_host_top99p_sum": "cws_host_top99p_sum", @@ -301,6 +305,8 @@ def __init__( cspm_container_hwm_sum: Union[int, UnsetType] = unset, cspm_gcp_host_top99p_sum: Union[int, UnsetType] = unset, cspm_host_top99p_sum: Union[int, UnsetType] = unset, + custom_historical_ts_sum: Union[int, UnsetType] = unset, + custom_live_ts_sum: Union[int, UnsetType] = unset, custom_ts_sum: Union[int, UnsetType] = unset, cws_containers_avg_sum: Union[int, UnsetType] = unset, cws_host_top99p_sum: Union[int, UnsetType] = unset, @@ -509,6 +515,12 @@ def __init__( :param cspm_host_top99p_sum: Shows the 99th percentile of all Cloud Security Management Pro hosts over all hours in the current months for all organizations. :type cspm_host_top99p_sum: int, optional + :param custom_historical_ts_sum: Shows the average number of distinct historical custom metrics over all hours in the current months for all organizations. + :type custom_historical_ts_sum: int, optional + + :param custom_live_ts_sum: Shows the average number of distinct live custom metrics over all hours in the current months for all organizations. + :type custom_live_ts_sum: int, optional + :param custom_ts_sum: Shows the average number of distinct custom metrics over all hours in the current months for all organizations. :type custom_ts_sum: int, optional @@ -800,6 +812,10 @@ def __init__( kwargs["cspm_gcp_host_top99p_sum"] = cspm_gcp_host_top99p_sum if cspm_host_top99p_sum is not unset: kwargs["cspm_host_top99p_sum"] = cspm_host_top99p_sum + if custom_historical_ts_sum is not unset: + kwargs["custom_historical_ts_sum"] = custom_historical_ts_sum + if custom_live_ts_sum is not unset: + kwargs["custom_live_ts_sum"] = custom_live_ts_sum if custom_ts_sum is not unset: kwargs["custom_ts_sum"] = custom_ts_sum if cws_containers_avg_sum is not unset: