-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathcreate_component_request_data.py
More file actions
73 lines (60 loc) · 2.56 KB
/
create_component_request_data.py
File metadata and controls
73 lines (60 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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.create_component_request_data_attributes import (
CreateComponentRequestDataAttributes,
)
from datadog_api_client.v2.model.create_component_request_data_relationships import (
CreateComponentRequestDataRelationships,
)
from datadog_api_client.v2.model.status_pages_component_group_type import StatusPagesComponentGroupType
class CreateComponentRequestData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.create_component_request_data_attributes import (
CreateComponentRequestDataAttributes,
)
from datadog_api_client.v2.model.create_component_request_data_relationships import (
CreateComponentRequestDataRelationships,
)
from datadog_api_client.v2.model.status_pages_component_group_type import StatusPagesComponentGroupType
return {
"attributes": (CreateComponentRequestDataAttributes,),
"relationships": (CreateComponentRequestDataRelationships,),
"type": (StatusPagesComponentGroupType,),
}
attribute_map = {
"attributes": "attributes",
"relationships": "relationships",
"type": "type",
}
def __init__(
self_,
attributes: CreateComponentRequestDataAttributes,
type: StatusPagesComponentGroupType,
relationships: Union[CreateComponentRequestDataRelationships, UnsetType] = unset,
**kwargs,
):
"""
The data object for creating a component.
:param attributes: The supported attributes for creating a component.
:type attributes: CreateComponentRequestDataAttributes
:param relationships: The supported relationships for creating a component.
:type relationships: CreateComponentRequestDataRelationships, optional
:param type: Components resource type.
:type type: StatusPagesComponentGroupType
"""
if relationships is not unset:
kwargs["relationships"] = relationships
super().__init__(kwargs)
self_.attributes = attributes
self_.type = type