@@ -1088,7 +1088,7 @@ class Entity(SubmodelElement, base.UniqueIdShortNamespace):
10881088
10891089 def __init__ (self ,
10901090 id_short : Optional [base .NameType ],
1091- entity_type : base .EntityType ,
1091+ entity_type : Optional [ base .EntityType ] ,
10921092 statement : Iterable [SubmodelElement ] = (),
10931093 global_asset_id : Optional [base .Identifier ] = None ,
10941094 specific_asset_id : Iterable [base .SpecificAssetId ] = (),
@@ -1108,7 +1108,7 @@ def __init__(self,
11081108 supplemental_semantic_id , embedded_data_specifications )
11091109 self .statement = base .NamespaceSet (self , [("id_short" , True )], statement )
11101110 # assign private attributes, bypassing setters, as constraints will be checked below
1111- self ._entity_type : base .EntityType = entity_type
1111+ self ._entity_type : Optional [ base .EntityType ] = entity_type
11121112 self ._global_asset_id : Optional [base .Identifier ] = global_asset_id
11131113 self ._specific_asset_id : base .ConstrainedList [base .SpecificAssetId ] = base .ConstrainedList (
11141114 specific_asset_id ,
@@ -1120,11 +1120,11 @@ def __init__(self,
11201120 self ._validate_aasd_014 (entity_type , global_asset_id , bool (specific_asset_id ))
11211121
11221122 @property
1123- def entity_type (self ) -> base .EntityType :
1123+ def entity_type (self ) -> Optional [ base .EntityType ] :
11241124 return self ._entity_type
11251125
11261126 @entity_type .setter
1127- def entity_type (self , entity_type : base .EntityType ) -> None :
1127+ def entity_type (self , entity_type : Optional [ base .EntityType ] ) -> None :
11281128 self ._validate_aasd_014 (entity_type , self .global_asset_id , bool (self .specific_asset_id ))
11291129 self ._entity_type = entity_type
11301130
@@ -1167,9 +1167,11 @@ def _validate_global_asset_id(global_asset_id: Optional[base.Identifier]) -> Non
11671167 _string_constraints .check_identifier (global_asset_id )
11681168
11691169 @staticmethod
1170- def _validate_aasd_014 (entity_type : base .EntityType ,
1170+ def _validate_aasd_014 (entity_type : Optional [ base .EntityType ] ,
11711171 global_asset_id : Optional [base .Identifier ],
11721172 specific_asset_id_nonempty : bool ) -> None :
1173+ if entity_type is None :
1174+ return
11731175 if entity_type == base .EntityType .SELF_MANAGED_ENTITY and global_asset_id is None \
11741176 and not specific_asset_id_nonempty :
11751177 raise base .AASConstraintViolation (
0 commit comments