Enum Classes¶
Versioned Enum Value Collection¶
- class CommonVersionedEnumValueCollection(enum_values, version=None)¶
Bases:
CommonSerializable,Generic[CommonEnumType]A collection of enum values with a version.
- Parameters:
enum_values (Iterator[CommonEnumType]) – A collection of enum values.
version (str, optional) – The version of the data. Default is the version of the enum.
- classmethod deserialize(data)¶
Deserialize the object from a JSON Serializable form.
- Returns:
The deserialized form of the object or None if it fails to deserialize.
- Return type:
Union[CommonSerializableType, None]
- property enum_values¶
A collection of enum values.
- classmethod get_enum_type()¶
The type of enum.
- Return type:
Type[TypeVar(CommonEnumType,CommonVersionedIntFlags,CommonVersionedInt)]
- serialize()¶
Serialize the object into a JSON Serializable form.
- Returns:
A serializable representation of the object.
- Return type:
Union[str, Dict[str, Any]]
- property version¶
The version of the enum values.
Versioned Sim Demographic Type Collection¶
- class CommonVersionedSimDemographicTypeCollection(demographic_types, version=None)¶
Bases:
CommonVersionedEnumValueCollection[CommonSimDemographicType]A collection of demographic types with a version.
- Parameters:
demographic_types (Iterator[CommonSimDemographicType]) – A collection of demographic types.
version (str, optional) – The version of the data. Default is the version of CommonSimDemographicType.
- property demographic_types¶
Types of demographics.
- classmethod get_enum_type()¶
The type of enum.
- Return type:
Type[CommonSimDemographicType]