|
| 1 | +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 2 | +# This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 3 | +# Copyright 2019-Present Datadog, Inc. |
| 4 | +from __future__ import annotations |
| 5 | + |
| 6 | +from typing import Any, Dict, Union, TYPE_CHECKING |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + date, |
| 12 | + datetime, |
| 13 | + none_type, |
| 14 | + unset, |
| 15 | + UnsetType, |
| 16 | + UUID, |
| 17 | +) |
| 18 | + |
| 19 | + |
| 20 | +if TYPE_CHECKING: |
| 21 | + from datadog_api_client.v2.model.entity_v3_api_version import EntityV3APIVersion |
| 22 | + from datadog_api_client.v2.model.entity_v3_api_datadog import EntityV3APIDatadog |
| 23 | + from datadog_api_client.v2.model.entity_v3_integrations import EntityV3Integrations |
| 24 | + from datadog_api_client.v2.model.entity_v3_api_kind import EntityV3APIKind |
| 25 | + from datadog_api_client.v2.model.entity_v3_metadata import EntityV3Metadata |
| 26 | + from datadog_api_client.v2.model.entity_v3_api_spec import EntityV3APISpec |
| 27 | + |
| 28 | + |
| 29 | +class EntityV3API(ModelNormal): |
| 30 | + @cached_property |
| 31 | + def additional_properties_type(_): |
| 32 | + return None |
| 33 | + |
| 34 | + @cached_property |
| 35 | + def openapi_types(_): |
| 36 | + from datadog_api_client.v2.model.entity_v3_api_version import EntityV3APIVersion |
| 37 | + from datadog_api_client.v2.model.entity_v3_api_datadog import EntityV3APIDatadog |
| 38 | + from datadog_api_client.v2.model.entity_v3_integrations import EntityV3Integrations |
| 39 | + from datadog_api_client.v2.model.entity_v3_api_kind import EntityV3APIKind |
| 40 | + from datadog_api_client.v2.model.entity_v3_metadata import EntityV3Metadata |
| 41 | + from datadog_api_client.v2.model.entity_v3_api_spec import EntityV3APISpec |
| 42 | + |
| 43 | + return { |
| 44 | + "api_version": (EntityV3APIVersion,), |
| 45 | + "datadog": (EntityV3APIDatadog,), |
| 46 | + "extensions": ( |
| 47 | + { |
| 48 | + str: ( |
| 49 | + bool, |
| 50 | + date, |
| 51 | + datetime, |
| 52 | + dict, |
| 53 | + float, |
| 54 | + int, |
| 55 | + list, |
| 56 | + str, |
| 57 | + UUID, |
| 58 | + none_type, |
| 59 | + ) |
| 60 | + }, |
| 61 | + ), |
| 62 | + "integrations": (EntityV3Integrations,), |
| 63 | + "kind": (EntityV3APIKind,), |
| 64 | + "metadata": (EntityV3Metadata,), |
| 65 | + "spec": (EntityV3APISpec,), |
| 66 | + } |
| 67 | + |
| 68 | + attribute_map = { |
| 69 | + "api_version": "apiVersion", |
| 70 | + "datadog": "datadog", |
| 71 | + "extensions": "extensions", |
| 72 | + "integrations": "integrations", |
| 73 | + "kind": "kind", |
| 74 | + "metadata": "metadata", |
| 75 | + "spec": "spec", |
| 76 | + } |
| 77 | + |
| 78 | + def __init__( |
| 79 | + self_, |
| 80 | + api_version: EntityV3APIVersion, |
| 81 | + kind: EntityV3APIKind, |
| 82 | + metadata: EntityV3Metadata, |
| 83 | + datadog: Union[EntityV3APIDatadog, UnsetType] = unset, |
| 84 | + extensions: Union[Dict[str, Any], UnsetType] = unset, |
| 85 | + integrations: Union[EntityV3Integrations, UnsetType] = unset, |
| 86 | + spec: Union[EntityV3APISpec, UnsetType] = unset, |
| 87 | + **kwargs, |
| 88 | + ): |
| 89 | + """ |
| 90 | + Schema for API entities. |
| 91 | +
|
| 92 | + :param api_version: The schema version of entity type. The field is known as schema-version in the previous version. |
| 93 | + :type api_version: EntityV3APIVersion |
| 94 | +
|
| 95 | + :param datadog: Datadog product integrations for the API entity. |
| 96 | + :type datadog: EntityV3APIDatadog, optional |
| 97 | +
|
| 98 | + :param extensions: Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field. |
| 99 | + :type extensions: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional |
| 100 | +
|
| 101 | + :param integrations: A base schema for defining third-party integrations. |
| 102 | + :type integrations: EntityV3Integrations, optional |
| 103 | +
|
| 104 | + :param kind: The definition of Entity V3 API Kind object. |
| 105 | + :type kind: EntityV3APIKind |
| 106 | +
|
| 107 | + :param metadata: The definition of Entity V3 Metadata object. |
| 108 | + :type metadata: EntityV3Metadata |
| 109 | +
|
| 110 | + :param spec: The definition of Entity V3 API Spec object. |
| 111 | + :type spec: EntityV3APISpec, optional |
| 112 | + """ |
| 113 | + if datadog is not unset: |
| 114 | + kwargs["datadog"] = datadog |
| 115 | + if extensions is not unset: |
| 116 | + kwargs["extensions"] = extensions |
| 117 | + if integrations is not unset: |
| 118 | + kwargs["integrations"] = integrations |
| 119 | + if spec is not unset: |
| 120 | + kwargs["spec"] = spec |
| 121 | + super().__init__(kwargs) |
| 122 | + |
| 123 | + self_.api_version = api_version |
| 124 | + self_.kind = kind |
| 125 | + self_.metadata = metadata |
0 commit comments