Enum Classes¶
Versioned Enum Value Collection¶
-
class
CommonVersionedEnumValueCollection
(enum_values, version=None)¶ Bases:
sims4communitylib.classes.serialization.common_serializable.CommonSerializable
,typing.Generic
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]
-
enum_values
¶ A collection of enum values.
-
classmethod
get_enum_type
() → Type[CommonEnumType]¶ The type of enum.
-
serialize
()¶ Serialize the object into a JSON Serializable form.
Returns: A serializable representation of the object. Return type: Union[str, Dict[str, Any]]
-
version
¶ The version of the enum values.
Versioned Sim Demographic Type Collection¶
-
class
CommonVersionedSimDemographicTypeCollection
(demographic_types, version=None)¶ -
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.
-
demographic_types
¶ Types of demographics.
-
classmethod
get_enum_type
() → Type[sims4communitylib.enums.common_sim_demographic_types.CommonSimDemographicType]¶ The type of enum.