@@ -5,6 +5,7 @@ from datetime import datetime
55from pyatlan.model.core import AtlanObject, Classification, Announcement
66from pyatlan.model.enums import CertificateStatus, EntityStatus, google_datastudio_asset_type, powerbi_endorsement, \
77 IconType, AnnouncementType, SourceCostUnitType
8+ from pyatlan.utils import next_id
89
910class Internal(AtlanObject):
1011 """For internal usage"""
@@ -29,7 +30,8 @@ class {{ entity_def.name }}({{super_classes[0]}}):
2930 class Attributes(AtlanObject):
3031 {% - for attribute_def in entity_def .attribute_defs %}
3132 {% - set type = attribute_def .typeName | get_type %}
32- {{attribute_def.name | to_snake_case }}: {% if attribute_def .isOptional %} Optional[{% endif %} {{type}}{% if attribute_def .isOptional %} ]{% endif %} = Field(None, description='' , alias='{{attribute_def.name}}')
33+ {% - set default_value = "''" if attribute_def .name == "qualifiedName" else "None" %}
34+ {{attribute_def.name | to_snake_case }}: {% if attribute_def .isOptional %} Optional[{% endif %} {{type}}{% if attribute_def .isOptional %} ]{% endif %} = Field({{ default_value }}, description='' , alias='{{attribute_def.name}}')
3335 {% - endfor %}
3436 {% - for attribute_def in entity_def .relationship_attribute_defs %}
3537 {% - set type = attribute_def .typeName | get_type %}
@@ -56,9 +58,9 @@ class {{ entity_def.name }}({{super_classes[0]}}):
5658 example=1648852296555,
5759 )
5860 guid: Optional[str] = Field(
59- None,
6061 description='Unique identifier of the entity instance.\n',
6162 example='917ffec9-fa84-4c59-8e6c-c7b114d04be3',
63+ default_factory=next_id,
6264 )
6365 is_incomplete: Optional[bool] = Field(False, description='', example=False)
6466 labels: Optional[List[str]] = Field(None, description='Internal use only.')
@@ -124,7 +126,7 @@ class {{ entity_def.name }}({{super_classes[0]}}):
124126 {% - if entity_def .attribute_defs %}
125127 {% - if not entity_def .sub_types %}
126128
127- type_name: Literal['{{ entity_def.name }}']
129+ type_name: Literal['{{ entity_def.name }}'] = Field("{{ entity_def.name }}")
128130
129131 {% - endif %}
130132 class Attributes({{super_classes[0] }}.Attributes):
0 commit comments