Skip to content

Commit ac704ea

Browse files
authored
Merge pull request #437 from atlanhq/FT-838
FT-838: Fix generator to correctly handle the DOMAIN_GUIDS keyword field
2 parents 1f0ce43 + 8c1a585 commit ac704ea

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

pyatlan/generator/class_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ def get_mapped_type(type_name: str) -> MappedType:
517517

518518

519519
def get_class_var_for_attr(attr_name: str) -> str:
520+
attr_name = re.sub(r"GUIDs$", "Guids", attr_name)
520521
replace1 = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", attr_name.replace("_", ""))
521522
replace2 = re.sub(r"([a-z])([A-Z])", r"\1_\2", replace1)
522523
return replace2.upper()

pyatlan/model/assets/business_policy_incident.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __setattr__(self, name, value):
3636
"""
3737
count of noncompliant assets in the incident
3838
"""
39-
BUSINESS_POLICY_INCIDENT_RELATED_POLICY_GUI_DS: ClassVar[KeywordField] = (
39+
BUSINESS_POLICY_INCIDENT_RELATED_POLICY_GUIDS: ClassVar[KeywordField] = (
4040
KeywordField(
4141
"businessPolicyIncidentRelatedPolicyGUIDs",
4242
"businessPolicyIncidentRelatedPolicyGUIDs",

pyatlan/model/assets/core/asset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ def __setattr__(self, name, value):
10611061
"""
10621062
Whether this asset has contract (true) or not (false).
10631063
"""
1064-
ASSET_POLICY_GUI_DS: ClassVar[KeywordField] = KeywordField(
1064+
ASSET_POLICY_GUIDS: ClassVar[KeywordField] = KeywordField(
10651065
"assetPolicyGUIDs", "assetPolicyGUIDs"
10661066
)
10671067
"""
@@ -1073,11 +1073,11 @@ def __setattr__(self, name, value):
10731073
"""
10741074
Count of policies inside the asset
10751075
"""
1076-
DOMAIN_GUI_DS: ClassVar[KeywordField] = KeywordField("domainGUIDs", "domainGUIDs")
1076+
DOMAIN_GUIDS: ClassVar[KeywordField] = KeywordField("domainGUIDs", "domainGUIDs")
10771077
"""
10781078
Array of domain guids linked to this asset
10791079
"""
1080-
NON_COMPLIANT_ASSET_POLICY_GUI_DS: ClassVar[KeywordField] = KeywordField(
1080+
NON_COMPLIANT_ASSET_POLICY_GUIDS: ClassVar[KeywordField] = KeywordField(
10811081
"nonCompliantAssetPolicyGUIDs", "nonCompliantAssetPolicyGUIDs"
10821082
)
10831083
"""

pyatlan/model/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,6 +2545,7 @@ class DataProductStatus(str, Enum):
25452545
ACTIVE = "Active"
25462546
SUNSET = "Sunset"
25472547
ARCHIVED = "Archived"
2548+
DRAFT = "Draft"
25482549

25492550

25502551
class DataProductVisibility(str, Enum):

0 commit comments

Comments
 (0)