Skip to content

Commit b6ecf2e

Browse files
committed
[generator] Regenerated latest typedef models
1 parent add9892 commit b6ecf2e

File tree

7 files changed

+57
-31
lines changed

7 files changed

+57
-31
lines changed

pyatlan/generator/class_generator.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ class AssetInfo:
213213
entity_defs_by_name: Dict[str, EntityDef] = {}
214214
sub_type_names_to_ignore: Set[str] = set()
215215
is_core_asset: bool = False
216+
_ASSETS_REQUIRE_CLIENT = {
217+
"Badge",
218+
"Collection",
219+
"Connection",
220+
"DataProduct",
221+
"Referenceable",
222+
"Purpose",
223+
}
216224
_CORE_ASSETS = {
217225
"Referenceable",
218226
"Asset",

pyatlan/generator/templates/imports.jinja2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,3 @@ from pyatlan.model.data_mesh import DataProductsAssetsDSL
127127
from pyatlan.model.contract import DataContractSpec
128128
from pyatlan.model.lineage_ref import LineageRef
129129
from pyatlan.model.utils import construct_object_key
130-
if TYPE_CHECKING:
131-
from pyatlan.client.atlan import AtlanClient

pyatlan/generator/templates/methods/asset/data_product.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"""
9090
Reterieves list of all assets linked to the provided data product.
9191

92-
:param client: connectivity to an Atlan tenant.
92+
:param client: connectivity to an Atlan tenant
9393
:raises InvalidRequestError: if DataProduct asset DSL cannot be found (does not exist) in Atlan
9494
:raises AtlanError: if there is an issue interacting with the API
9595
:returns: instance of `IndexSearchResults` with list of all assets linked to the provided data product

pyatlan/generator/templates/module.jinja2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{% include 'imports.jinja2' %}
88

9-
{% if asset_info.name != 'DataProduct' %}
9+
{% if asset_info.name not in asset_info._ASSETS_REQUIRE_CLIENT %}
1010
from pyatlan.client.atlan import AtlanClient
1111
{% endif %}
1212

@@ -32,7 +32,7 @@ from .asset import SelfAsset
3232

3333
{{ asset_info.import_super_class }}
3434

35-
{% if asset_info.name == 'DataProduct' %}
35+
{% if asset_info.name in asset_info._ASSETS_REQUIRE_CLIENT %}
3636
if TYPE_CHECKING:
3737
from pyatlan.client.atlan import AtlanClient
3838
{% endif %}

pyatlan/model/assets/collection.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44

55
from __future__ import annotations
66

7-
from typing import ClassVar, List, Optional
7+
from typing import TYPE_CHECKING, ClassVar, List, Optional
88
from uuid import uuid4
99

1010
from pydantic.v1 import Field, validator
1111

12-
from pyatlan.client.atlan import AtlanClient
1312
from pyatlan.errors import AtlanError, ErrorCode
1413
from pyatlan.model.enums import IconType
1514
from pyatlan.model.fields.atlan_fields import KeywordField, TextField
1615
from pyatlan.utils import init_guid, validate_required_fields
1716

1817
from .core.namespace import Namespace
1918

19+
if TYPE_CHECKING:
20+
from pyatlan.client.atlan import AtlanClient
21+
2022

2123
class Collection(Namespace):
2224
"""Description"""

pyatlan/model/assets/core/access_control.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def __setattr__(self, name, value):
4040
"""
4141
TBC
4242
"""
43+
DENY_SIDEBAR_TABS: ClassVar[KeywordField] = KeywordField(
44+
"denySidebarTabs", "denySidebarTabs"
45+
)
46+
"""
47+
TBC
48+
"""
4349
DENY_CUSTOM_METADATA_GUIDS: ClassVar[KeywordField] = KeywordField(
4450
"denyCustomMetadataGuids", "denyCustomMetadataGuids"
4551
)
@@ -100,6 +106,7 @@ def __setattr__(self, name, value):
100106

101107
_convenience_properties: ClassVar[List[str]] = [
102108
"is_access_control_enabled",
109+
"deny_sidebar_tabs",
103110
"deny_custom_metadata_guids",
104111
"deny_asset_metadata_types",
105112
"deny_asset_tabs",
@@ -126,6 +133,16 @@ def is_access_control_enabled(self, is_access_control_enabled: Optional[bool]):
126133
self.attributes = self.Attributes()
127134
self.attributes.is_access_control_enabled = is_access_control_enabled
128135

136+
@property
137+
def deny_sidebar_tabs(self) -> Optional[Set[str]]:
138+
return None if self.attributes is None else self.attributes.deny_sidebar_tabs
139+
140+
@deny_sidebar_tabs.setter
141+
def deny_sidebar_tabs(self, deny_sidebar_tabs: Optional[Set[str]]):
142+
if self.attributes is None:
143+
self.attributes = self.Attributes()
144+
self.attributes.deny_sidebar_tabs = deny_sidebar_tabs
145+
129146
@property
130147
def deny_custom_metadata_guids(self) -> Optional[Set[str]]:
131148
return (
@@ -240,6 +257,7 @@ def policies(self, policies: Optional[List[AuthPolicy]]):
240257

241258
class Attributes(Asset.Attributes):
242259
is_access_control_enabled: Optional[bool] = Field(default=None, description="")
260+
deny_sidebar_tabs: Optional[Set[str]] = Field(default=None, description="")
243261
deny_custom_metadata_guids: Optional[Set[str]] = Field(
244262
default=None, description=""
245263
)

pyatlan/model/structs.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ def flatten_structs_attributes(cls, values: Dict[str, Any]) -> Dict[str, Any]:
4545
return values
4646

4747

48-
class MCRuleSchedule(AtlanObject):
49-
"""Description"""
50-
51-
mc_rule_schedule_type: Optional[str] = Field(default=None, description="")
52-
mc_rule_schedule_interval_in_minutes: Optional[int] = Field(
53-
default=None, description=""
54-
)
55-
mc_rule_schedule_start_time: Optional[datetime] = Field(
56-
default=None, description=""
57-
)
58-
mc_rule_schedule_crontab: Optional[str] = Field(default=None, description="")
59-
60-
6148
class DbtJobRun(AtlanObject):
6249
"""Description"""
6350

@@ -74,6 +61,19 @@ class DbtJobRun(AtlanObject):
7461
dbt_compiled_code: Optional[str] = Field(default=None, description="")
7562

7663

64+
class MCRuleSchedule(AtlanObject):
65+
"""Description"""
66+
67+
mc_rule_schedule_type: Optional[str] = Field(default=None, description="")
68+
mc_rule_schedule_interval_in_minutes: Optional[int] = Field(
69+
default=None, description=""
70+
)
71+
mc_rule_schedule_start_time: Optional[datetime] = Field(
72+
default=None, description=""
73+
)
74+
mc_rule_schedule_crontab: Optional[str] = Field(default=None, description="")
75+
76+
7777
class AwsCloudWatchMetric(AtlanObject):
7878
"""Description"""
7979

@@ -104,6 +104,13 @@ class ColumnValueFrequencyMap(AtlanObject):
104104
column_value_frequency: Optional[int] = Field(default=None, description="")
105105

106106

107+
class SourceTagAttachmentValue(AtlanObject):
108+
"""Description"""
109+
110+
tag_attachment_key: Optional[str] = Field(default=None, description="")
111+
tag_attachment_value: Optional[str] = Field(default=None, description="")
112+
113+
107114
class BadgeCondition(AtlanObject):
108115
"""Description"""
109116

@@ -136,13 +143,6 @@ def create(
136143
badge_condition_colorhex: Optional[str] = Field(default=None, description="")
137144

138145

139-
class SourceTagAttachmentValue(AtlanObject):
140-
"""Description"""
141-
142-
tag_attachment_key: Optional[str] = Field(default=None, description="")
143-
tag_attachment_value: Optional[str] = Field(default=None, description="")
144-
145-
146146
class StarredDetails(AtlanObject):
147147
"""Description"""
148148

@@ -444,10 +444,10 @@ class SourceTagAttribute(AtlanObject):
444444
)
445445

446446

447-
MCRuleSchedule.update_forward_refs()
448-
449447
DbtJobRun.update_forward_refs()
450448

449+
MCRuleSchedule.update_forward_refs()
450+
451451
AwsCloudWatchMetric.update_forward_refs()
452452

453453
Histogram.update_forward_refs()
@@ -456,10 +456,10 @@ class SourceTagAttribute(AtlanObject):
456456

457457
ColumnValueFrequencyMap.update_forward_refs()
458458

459-
BadgeCondition.update_forward_refs()
460-
461459
SourceTagAttachmentValue.update_forward_refs()
462460

461+
BadgeCondition.update_forward_refs()
462+
463463
StarredDetails.update_forward_refs()
464464

465465
AwsTag.update_forward_refs()

0 commit comments

Comments
 (0)