Skip to content

Commit b9004f3

Browse files
ErnestoLomaAryamanz29
authored andcommitted
Add missing classes
1 parent 8e187b6 commit b9004f3

File tree

3 files changed

+430
-0
lines changed

3 files changed

+430
-0
lines changed

pyatlan/model/assets/dataverse.py

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2022 Atlan Pte. Ltd.
3+
4+
5+
from __future__ import annotations
6+
7+
from typing import ClassVar, List, Optional
8+
9+
from pydantic.v1 import Field, validator
10+
11+
from pyatlan.model.fields.atlan_fields import BooleanField
12+
13+
from .saa_s import SaaS
14+
15+
16+
class Dataverse(SaaS):
17+
"""Description"""
18+
19+
type_name: str = Field(default="Dataverse", allow_mutation=False)
20+
21+
@validator("type_name")
22+
def validate_type_name(cls, v):
23+
if v != "Dataverse":
24+
raise ValueError("must be Dataverse")
25+
return v
26+
27+
def __setattr__(self, name, value):
28+
if name in Dataverse._convenience_properties:
29+
return object.__setattr__(self, name, value)
30+
super().__setattr__(name, value)
31+
32+
DATAVERSE_IS_CUSTOM: ClassVar[BooleanField] = BooleanField(
33+
"dataverseIsCustom", "dataverseIsCustom"
34+
)
35+
"""
36+
Indicator if DataverseEntity is custom built.
37+
"""
38+
DATAVERSE_IS_CUSTOMIZABLE: ClassVar[BooleanField] = BooleanField(
39+
"dataverseIsCustomizable", "dataverseIsCustomizable"
40+
)
41+
"""
42+
Indicator if DataverseEntity is customizable.
43+
"""
44+
DATAVERSE_IS_AUDIT_ENABLED: ClassVar[BooleanField] = BooleanField(
45+
"dataverseIsAuditEnabled", "dataverseIsAuditEnabled"
46+
)
47+
"""
48+
Indicator if DataverseEntity has auditing enabled.
49+
"""
50+
51+
_convenience_properties: ClassVar[List[str]] = [
52+
"dataverse_is_custom",
53+
"dataverse_is_customizable",
54+
"dataverse_is_audit_enabled",
55+
]
56+
57+
@property
58+
def dataverse_is_custom(self) -> Optional[bool]:
59+
return None if self.attributes is None else self.attributes.dataverse_is_custom
60+
61+
@dataverse_is_custom.setter
62+
def dataverse_is_custom(self, dataverse_is_custom: Optional[bool]):
63+
if self.attributes is None:
64+
self.attributes = self.Attributes()
65+
self.attributes.dataverse_is_custom = dataverse_is_custom
66+
67+
@property
68+
def dataverse_is_customizable(self) -> Optional[bool]:
69+
return (
70+
None
71+
if self.attributes is None
72+
else self.attributes.dataverse_is_customizable
73+
)
74+
75+
@dataverse_is_customizable.setter
76+
def dataverse_is_customizable(self, dataverse_is_customizable: Optional[bool]):
77+
if self.attributes is None:
78+
self.attributes = self.Attributes()
79+
self.attributes.dataverse_is_customizable = dataverse_is_customizable
80+
81+
@property
82+
def dataverse_is_audit_enabled(self) -> Optional[bool]:
83+
return (
84+
None
85+
if self.attributes is None
86+
else self.attributes.dataverse_is_audit_enabled
87+
)
88+
89+
@dataverse_is_audit_enabled.setter
90+
def dataverse_is_audit_enabled(self, dataverse_is_audit_enabled: Optional[bool]):
91+
if self.attributes is None:
92+
self.attributes = self.Attributes()
93+
self.attributes.dataverse_is_audit_enabled = dataverse_is_audit_enabled
94+
95+
class Attributes(SaaS.Attributes):
96+
dataverse_is_custom: Optional[bool] = Field(default=None, description="")
97+
dataverse_is_customizable: Optional[bool] = Field(default=None, description="")
98+
dataverse_is_audit_enabled: Optional[bool] = Field(default=None, description="")
99+
100+
attributes: Dataverse.Attributes = Field(
101+
default_factory=lambda: Dataverse.Attributes(),
102+
description=(
103+
"Map of attributes in the instance and their values. "
104+
"The specific keys of this map will vary by type, "
105+
"so are described in the sub-types of this schema."
106+
),
107+
)
108+
109+
110+
Dataverse.Attributes.update_forward_refs()
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2022 Atlan Pte. Ltd.
3+
4+
5+
from __future__ import annotations
6+
7+
from typing import ClassVar, List, Optional
8+
9+
from pydantic.v1 import Field, validator
10+
11+
from pyatlan.model.fields.atlan_fields import BooleanField, KeywordField, RelationField
12+
13+
from .dataverse import Dataverse
14+
15+
16+
class DataverseAttribute(Dataverse):
17+
"""Description"""
18+
19+
type_name: str = Field(default="DataverseAttribute", allow_mutation=False)
20+
21+
@validator("type_name")
22+
def validate_type_name(cls, v):
23+
if v != "DataverseAttribute":
24+
raise ValueError("must be DataverseAttribute")
25+
return v
26+
27+
def __setattr__(self, name, value):
28+
if name in DataverseAttribute._convenience_properties:
29+
return object.__setattr__(self, name, value)
30+
super().__setattr__(name, value)
31+
32+
DATAVERSE_ENTITY_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField(
33+
"dataverseEntityQualifiedName", "dataverseEntityQualifiedName"
34+
)
35+
"""
36+
Entity Qualified Name of the DataverseAttribute.
37+
"""
38+
DATAVERSE_ATTRIBUTE_SCHEMA_NAME: ClassVar[KeywordField] = KeywordField(
39+
"dataverseAttributeSchemaName", "dataverseAttributeSchemaName"
40+
)
41+
"""
42+
Schema Name of the DataverseAttribute.
43+
"""
44+
DATAVERSE_ATTRIBUTE_TYPE: ClassVar[KeywordField] = KeywordField(
45+
"dataverseAttributeType", "dataverseAttributeType"
46+
)
47+
"""
48+
Type of the DataverseAttribute.
49+
"""
50+
DATAVERSE_ATTRIBUTE_IS_PRIMARY_ID: ClassVar[BooleanField] = BooleanField(
51+
"dataverseAttributeIsPrimaryId", "dataverseAttributeIsPrimaryId"
52+
)
53+
"""
54+
Indicator if DataverseAttribute is the primary key.
55+
"""
56+
DATAVERSE_ATTRIBUTE_IS_SEARCHABLE: ClassVar[BooleanField] = BooleanField(
57+
"dataverseAttributeIsSearchable", "dataverseAttributeIsSearchable"
58+
)
59+
"""
60+
Indicator if DataverseAttribute is searchable.
61+
"""
62+
63+
DATAVERSE_ENTITY: ClassVar[RelationField] = RelationField("dataverseEntity")
64+
"""
65+
TBC
66+
"""
67+
68+
_convenience_properties: ClassVar[List[str]] = [
69+
"dataverse_entity_qualified_name",
70+
"dataverse_attribute_schema_name",
71+
"dataverse_attribute_type",
72+
"dataverse_attribute_is_primary_id",
73+
"dataverse_attribute_is_searchable",
74+
"dataverse_entity",
75+
]
76+
77+
@property
78+
def dataverse_entity_qualified_name(self) -> Optional[str]:
79+
return (
80+
None
81+
if self.attributes is None
82+
else self.attributes.dataverse_entity_qualified_name
83+
)
84+
85+
@dataverse_entity_qualified_name.setter
86+
def dataverse_entity_qualified_name(
87+
self, dataverse_entity_qualified_name: Optional[str]
88+
):
89+
if self.attributes is None:
90+
self.attributes = self.Attributes()
91+
self.attributes.dataverse_entity_qualified_name = (
92+
dataverse_entity_qualified_name
93+
)
94+
95+
@property
96+
def dataverse_attribute_schema_name(self) -> Optional[str]:
97+
return (
98+
None
99+
if self.attributes is None
100+
else self.attributes.dataverse_attribute_schema_name
101+
)
102+
103+
@dataverse_attribute_schema_name.setter
104+
def dataverse_attribute_schema_name(
105+
self, dataverse_attribute_schema_name: Optional[str]
106+
):
107+
if self.attributes is None:
108+
self.attributes = self.Attributes()
109+
self.attributes.dataverse_attribute_schema_name = (
110+
dataverse_attribute_schema_name
111+
)
112+
113+
@property
114+
def dataverse_attribute_type(self) -> Optional[str]:
115+
return (
116+
None
117+
if self.attributes is None
118+
else self.attributes.dataverse_attribute_type
119+
)
120+
121+
@dataverse_attribute_type.setter
122+
def dataverse_attribute_type(self, dataverse_attribute_type: Optional[str]):
123+
if self.attributes is None:
124+
self.attributes = self.Attributes()
125+
self.attributes.dataverse_attribute_type = dataverse_attribute_type
126+
127+
@property
128+
def dataverse_attribute_is_primary_id(self) -> Optional[bool]:
129+
return (
130+
None
131+
if self.attributes is None
132+
else self.attributes.dataverse_attribute_is_primary_id
133+
)
134+
135+
@dataverse_attribute_is_primary_id.setter
136+
def dataverse_attribute_is_primary_id(
137+
self, dataverse_attribute_is_primary_id: Optional[bool]
138+
):
139+
if self.attributes is None:
140+
self.attributes = self.Attributes()
141+
self.attributes.dataverse_attribute_is_primary_id = (
142+
dataverse_attribute_is_primary_id
143+
)
144+
145+
@property
146+
def dataverse_attribute_is_searchable(self) -> Optional[bool]:
147+
return (
148+
None
149+
if self.attributes is None
150+
else self.attributes.dataverse_attribute_is_searchable
151+
)
152+
153+
@dataverse_attribute_is_searchable.setter
154+
def dataverse_attribute_is_searchable(
155+
self, dataverse_attribute_is_searchable: Optional[bool]
156+
):
157+
if self.attributes is None:
158+
self.attributes = self.Attributes()
159+
self.attributes.dataverse_attribute_is_searchable = (
160+
dataverse_attribute_is_searchable
161+
)
162+
163+
@property
164+
def dataverse_entity(self) -> Optional[DataverseEntity]:
165+
return None if self.attributes is None else self.attributes.dataverse_entity
166+
167+
@dataverse_entity.setter
168+
def dataverse_entity(self, dataverse_entity: Optional[DataverseEntity]):
169+
if self.attributes is None:
170+
self.attributes = self.Attributes()
171+
self.attributes.dataverse_entity = dataverse_entity
172+
173+
class Attributes(Dataverse.Attributes):
174+
dataverse_entity_qualified_name: Optional[str] = Field(
175+
default=None, description=""
176+
)
177+
dataverse_attribute_schema_name: Optional[str] = Field(
178+
default=None, description=""
179+
)
180+
dataverse_attribute_type: Optional[str] = Field(default=None, description="")
181+
dataverse_attribute_is_primary_id: Optional[bool] = Field(
182+
default=None, description=""
183+
)
184+
dataverse_attribute_is_searchable: Optional[bool] = Field(
185+
default=None, description=""
186+
)
187+
dataverse_entity: Optional[DataverseEntity] = Field(
188+
default=None, description=""
189+
) # relationship
190+
191+
attributes: DataverseAttribute.Attributes = Field(
192+
default_factory=lambda: DataverseAttribute.Attributes(),
193+
description=(
194+
"Map of attributes in the instance and their values. "
195+
"The specific keys of this map will vary by type, "
196+
"so are described in the sub-types of this schema."
197+
),
198+
)
199+
200+
201+
from .dataverse_entity import DataverseEntity # noqa
202+
203+
DataverseAttribute.Attributes.update_forward_refs()

0 commit comments

Comments
 (0)