|
| 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 Union, TYPE_CHECKING |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + unset, |
| 12 | + UnsetType, |
| 13 | +) |
| 14 | + |
| 15 | + |
| 16 | +if TYPE_CHECKING: |
| 17 | + from datadog_api_client.v2.model.role_template_data_attributes import RoleTemplateDataAttributes |
| 18 | + from datadog_api_client.v2.model.role_template_data_type import RoleTemplateDataType |
| 19 | + |
| 20 | + |
| 21 | +class RoleTemplateData(ModelNormal): |
| 22 | + @cached_property |
| 23 | + def openapi_types(_): |
| 24 | + from datadog_api_client.v2.model.role_template_data_attributes import RoleTemplateDataAttributes |
| 25 | + from datadog_api_client.v2.model.role_template_data_type import RoleTemplateDataType |
| 26 | + |
| 27 | + return { |
| 28 | + "attributes": (RoleTemplateDataAttributes,), |
| 29 | + "id": (str,), |
| 30 | + "type": (RoleTemplateDataType,), |
| 31 | + } |
| 32 | + |
| 33 | + attribute_map = { |
| 34 | + "attributes": "attributes", |
| 35 | + "id": "id", |
| 36 | + "type": "type", |
| 37 | + } |
| 38 | + |
| 39 | + def __init__( |
| 40 | + self_, |
| 41 | + type: RoleTemplateDataType, |
| 42 | + attributes: Union[RoleTemplateDataAttributes, UnsetType] = unset, |
| 43 | + id: Union[str, UnsetType] = unset, |
| 44 | + **kwargs, |
| 45 | + ): |
| 46 | + """ |
| 47 | + The definition of ``RoleTemplateData`` object. |
| 48 | +
|
| 49 | + :param attributes: The definition of ``RoleTemplateDataAttributes`` object. |
| 50 | + :type attributes: RoleTemplateDataAttributes, optional |
| 51 | +
|
| 52 | + :param id: The ``RoleTemplateData`` ``id``. |
| 53 | + :type id: str, optional |
| 54 | +
|
| 55 | + :param type: Roles resource type. |
| 56 | + :type type: RoleTemplateDataType |
| 57 | + """ |
| 58 | + if attributes is not unset: |
| 59 | + kwargs["attributes"] = attributes |
| 60 | + if id is not unset: |
| 61 | + kwargs["id"] = id |
| 62 | + super().__init__(kwargs) |
| 63 | + |
| 64 | + self_.type = type |
0 commit comments