Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104980,6 +104980,8 @@ components:
id:
description: The `RoleTemplateData` `id`.
type: string
relationships:
$ref: "#/components/schemas/RoleResponseRelationships"
type:
$ref: "#/components/schemas/RoleTemplateDataType"
required:
Expand Down Expand Up @@ -216424,8 +216426,14 @@ paths:
value:
data:
- attributes:
description: Role template with permissions for standard access.
name: Datadog Standard Role
id: 00000000-0000-0000-0000-000000000012
id: "2"
relationships:
permissions:
data:
- id: 984d2ee2-dbb1-11e8-a1b5-1b33e7f4e7a0
type: permissions
type: roles
schema:
$ref: "#/components/schemas/RoleTemplateArray"
Expand Down
10 changes: 10 additions & 0 deletions src/datadog_api_client/v2/model/role_template_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.role_template_data_attributes import RoleTemplateDataAttributes
from datadog_api_client.v2.model.role_response_relationships import RoleResponseRelationships
from datadog_api_client.v2.model.role_template_data_type import RoleTemplateDataType


class RoleTemplateData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.role_template_data_attributes import RoleTemplateDataAttributes
from datadog_api_client.v2.model.role_response_relationships import RoleResponseRelationships
from datadog_api_client.v2.model.role_template_data_type import RoleTemplateDataType

return {
"attributes": (RoleTemplateDataAttributes,),
"id": (str,),
"relationships": (RoleResponseRelationships,),
"type": (RoleTemplateDataType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"relationships": "relationships",
"type": "type",
}

Expand All @@ -41,6 +45,7 @@ def __init__(
type: RoleTemplateDataType,
attributes: Union[RoleTemplateDataAttributes, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
relationships: Union[RoleResponseRelationships, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -52,13 +57,18 @@ def __init__(
:param id: The ``RoleTemplateData`` ``id``.
:type id: str, optional

:param relationships: Relationships of the role object returned by the API.
:type relationships: RoleResponseRelationships, optional

:param type: Roles resource type.
:type type: RoleTemplateDataType
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if id is not unset:
kwargs["id"] = id
if relationships is not unset:
kwargs["relationships"] = relationships
super().__init__(kwargs)

self_.type = type
Loading