From 59ff45560c148ce10a4d92bba051f02d4dcb94d9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 14 Jul 2023 13:33:32 +0000 Subject: [PATCH] Regenerate client from commit 2bd58701 of spec repo --- .apigentools-info | 8 +-- .generator/schemas/v2/openapi.yaml | 27 +++++++++ docs/datadog_api_client.v2.model.rst | 7 +++ .../v2/model/service_definition_data.py | 8 +++ .../v2/model/service_definition_meta.py | 32 ++++++++++- .../model/service_definition_meta_warnings.py | 56 +++++++++++++++++++ src/datadog_api_client/v2/models/__init__.py | 2 + 7 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 src/datadog_api_client/v2/model/service_definition_meta_warnings.py diff --git a/.apigentools-info b/.apigentools-info index 0bd8c394cc..ff2ab3a169 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-13 21:23:39.298296", - "spec_repo_commit": "70f8c389" + "regenerated": "2023-07-14 13:32:03.152627", + "spec_repo_commit": "2bd58701" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-13 21:23:39.311523", - "spec_repo_commit": "70f8c389" + "regenerated": "2023-07-14 13:32:03.246638", + "spec_repo_commit": "2bd58701" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3f7b978b38..ce4a0c7bd6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -14217,6 +14217,9 @@ components: properties: attributes: $ref: '#/components/schemas/ServiceDefinitionDataAttributes' + id: + description: Service definition id. + type: string type: description: Service definition type. type: string @@ -14250,6 +14253,30 @@ components: last-modified-time: description: Last modified time of the service definition. type: string + origin: + description: User defined origin of the service definition. + type: string + origin-detail: + description: User defined origin's detail of the service definition. + type: string + warnings: + description: A list of schema validation warnings. + items: + $ref: '#/components/schemas/ServiceDefinitionMetaWarnings' + type: array + type: object + ServiceDefinitionMetaWarnings: + description: Schema validation warnings. + properties: + instance-location: + description: The warning instance location. + type: string + keyword-location: + description: The warning keyword location. + type: string + message: + description: The warning message. + type: string type: object ServiceDefinitionRaw: description: Service Definition in raw JSON/YAML representation. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 7dc9811231..c7e317dceb 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6413,6 +6413,13 @@ service\_definition\_meta :members: :show-inheritance: +service\_definition\_meta\_warnings +----------------------------------- + +.. automodule:: datadog_api_client.v2.model.service_definition_meta_warnings + :members: + :show-inheritance: + service\_definition\_schema --------------------------- diff --git a/src/datadog_api_client/v2/model/service_definition_data.py b/src/datadog_api_client/v2/model/service_definition_data.py index 2be498b9ac..a131c562ce 100644 --- a/src/datadog_api_client/v2/model/service_definition_data.py +++ b/src/datadog_api_client/v2/model/service_definition_data.py @@ -24,17 +24,20 @@ def openapi_types(_): return { "attributes": (ServiceDefinitionDataAttributes,), + "id": (str,), "type": (str,), } attribute_map = { "attributes": "attributes", + "id": "id", "type": "type", } def __init__( self_, attributes: Union[ServiceDefinitionDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, type: Union[str, UnsetType] = unset, **kwargs, ): @@ -44,11 +47,16 @@ def __init__( :param attributes: Service definition attributes. :type attributes: ServiceDefinitionDataAttributes, optional + :param id: Service definition id. + :type id: str, optional + :param type: Service definition type. :type type: str, 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) diff --git a/src/datadog_api_client/v2/model/service_definition_meta.py b/src/datadog_api_client/v2/model/service_definition_meta.py index 466bc3f8b4..13112db82e 100644 --- a/src/datadog_api_client/v2/model/service_definition_meta.py +++ b/src/datadog_api_client/v2/model/service_definition_meta.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,14 +13,23 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.service_definition_meta_warnings import ServiceDefinitionMetaWarnings + + class ServiceDefinitionMeta(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.service_definition_meta_warnings import ServiceDefinitionMetaWarnings + return { "github_html_url": (str,), "ingested_schema_version": (str,), "ingestion_source": (str,), "last_modified_time": (str,), + "origin": (str,), + "origin_detail": (str,), + "warnings": ([ServiceDefinitionMetaWarnings],), } attribute_map = { @@ -28,6 +37,9 @@ def openapi_types(_): "ingested_schema_version": "ingested-schema-version", "ingestion_source": "ingestion-source", "last_modified_time": "last-modified-time", + "origin": "origin", + "origin_detail": "origin-detail", + "warnings": "warnings", } def __init__( @@ -36,6 +48,9 @@ def __init__( ingested_schema_version: Union[str, UnsetType] = unset, ingestion_source: Union[str, UnsetType] = unset, last_modified_time: Union[str, UnsetType] = unset, + origin: Union[str, UnsetType] = unset, + origin_detail: Union[str, UnsetType] = unset, + warnings: Union[List[ServiceDefinitionMetaWarnings], UnsetType] = unset, **kwargs, ): """ @@ -52,6 +67,15 @@ def __init__( :param last_modified_time: Last modified time of the service definition. :type last_modified_time: str, optional + + :param origin: User defined origin of the service definition. + :type origin: str, optional + + :param origin_detail: User defined origin's detail of the service definition. + :type origin_detail: str, optional + + :param warnings: A list of schema validation warnings. + :type warnings: [ServiceDefinitionMetaWarnings], optional """ if github_html_url is not unset: kwargs["github_html_url"] = github_html_url @@ -61,4 +85,10 @@ def __init__( kwargs["ingestion_source"] = ingestion_source if last_modified_time is not unset: kwargs["last_modified_time"] = last_modified_time + if origin is not unset: + kwargs["origin"] = origin + if origin_detail is not unset: + kwargs["origin_detail"] = origin_detail + if warnings is not unset: + kwargs["warnings"] = warnings super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/service_definition_meta_warnings.py b/src/datadog_api_client/v2/model/service_definition_meta_warnings.py new file mode 100644 index 0000000000..0ac2cd7c05 --- /dev/null +++ b/src/datadog_api_client/v2/model/service_definition_meta_warnings.py @@ -0,0 +1,56 @@ +# 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 ServiceDefinitionMetaWarnings(ModelNormal): + @cached_property + def openapi_types(_): + return { + "instance_location": (str,), + "keyword_location": (str,), + "message": (str,), + } + + attribute_map = { + "instance_location": "instance-location", + "keyword_location": "keyword-location", + "message": "message", + } + + def __init__( + self_, + instance_location: Union[str, UnsetType] = unset, + keyword_location: Union[str, UnsetType] = unset, + message: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Schema validation warnings. + + :param instance_location: The warning instance location. + :type instance_location: str, optional + + :param keyword_location: The warning keyword location. + :type keyword_location: str, optional + + :param message: The warning message. + :type message: str, optional + """ + if instance_location is not unset: + kwargs["instance_location"] = instance_location + if keyword_location is not unset: + kwargs["keyword_location"] = keyword_location + if message is not unset: + kwargs["message"] = message + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 31b6ffe417..e30baa0ec5 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1136,6 +1136,7 @@ from datadog_api_client.v2.model.service_definition_data_attributes import ServiceDefinitionDataAttributes from datadog_api_client.v2.model.service_definition_get_response import ServiceDefinitionGetResponse from datadog_api_client.v2.model.service_definition_meta import ServiceDefinitionMeta +from datadog_api_client.v2.model.service_definition_meta_warnings import ServiceDefinitionMetaWarnings from datadog_api_client.v2.model.service_definition_schema import ServiceDefinitionSchema from datadog_api_client.v2.model.service_definition_schema_versions import ServiceDefinitionSchemaVersions from datadog_api_client.v2.model.service_definition_v1 import ServiceDefinitionV1 @@ -2253,6 +2254,7 @@ "ServiceDefinitionDataAttributes", "ServiceDefinitionGetResponse", "ServiceDefinitionMeta", + "ServiceDefinitionMetaWarnings", "ServiceDefinitionSchema", "ServiceDefinitionSchemaVersions", "ServiceDefinitionV1",