Source code for aas_core3_2.stringification

"""De-serialize enumerations from string representations."""

# This code has been automatically generated by aas-core-codegen.
# Do NOT edit or append.


from typing import (
    Mapping,
    Optional,
)

import aas_core3_2.types as our_types

_MODELLING_KIND_FROM_STR: Mapping[str, our_types.ModellingKind] = {
    "Template": our_types.ModellingKind.TEMPLATE,
    "Instance": our_types.ModellingKind.INSTANCE,
}


[docs]def modelling_kind_from_str(text: str) -> Optional[our_types.ModellingKind]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.ModellingKind`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.ModellingKind`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.ModellingKind` or ``None``, if :paramref:`text` invalid. """ return _MODELLING_KIND_FROM_STR.get(text)
_QUALIFIER_KIND_FROM_STR: Mapping[str, our_types.QualifierKind] = { "ValueQualifier": our_types.QualifierKind.VALUE_QUALIFIER, "ConceptQualifier": our_types.QualifierKind.CONCEPT_QUALIFIER, "TemplateQualifier": our_types.QualifierKind.TEMPLATE_QUALIFIER, }
[docs]def qualifier_kind_from_str(text: str) -> Optional[our_types.QualifierKind]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.QualifierKind`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.QualifierKind`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.QualifierKind` or ``None``, if :paramref:`text` invalid. """ return _QUALIFIER_KIND_FROM_STR.get(text)
_ASSET_KIND_FROM_STR: Mapping[str, our_types.AssetKind] = { "Type": our_types.AssetKind.TYPE, "Instance": our_types.AssetKind.INSTANCE, "Batch": our_types.AssetKind.BATCH, "Role": our_types.AssetKind.ROLE, "NotApplicable": our_types.AssetKind.NOT_APPLICABLE, }
[docs]def asset_kind_from_str(text: str) -> Optional[our_types.AssetKind]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.AssetKind`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.AssetKind`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.AssetKind` or ``None``, if :paramref:`text` invalid. """ return _ASSET_KIND_FROM_STR.get(text)
_AAS_SUBMODEL_ELEMENTS_FROM_STR: Mapping[str, our_types.AASSubmodelElements] = { "AnnotatedRelationshipElement": our_types.AASSubmodelElements.ANNOTATED_RELATIONSHIP_ELEMENT, "BasicEventElement": our_types.AASSubmodelElements.BASIC_EVENT_ELEMENT, "Blob": our_types.AASSubmodelElements.BLOB, "Capability": our_types.AASSubmodelElements.CAPABILITY, "DataElement": our_types.AASSubmodelElements.DATA_ELEMENT, "Entity": our_types.AASSubmodelElements.ENTITY, "EventElement": our_types.AASSubmodelElements.EVENT_ELEMENT, "File": our_types.AASSubmodelElements.FILE, "MultiLanguageProperty": our_types.AASSubmodelElements.MULTI_LANGUAGE_PROPERTY, "Operation": our_types.AASSubmodelElements.OPERATION, "Property": our_types.AASSubmodelElements.PROPERTY, "Range": our_types.AASSubmodelElements.RANGE, "ReferenceElement": our_types.AASSubmodelElements.REFERENCE_ELEMENT, "RelationshipElement": our_types.AASSubmodelElements.RELATIONSHIP_ELEMENT, "SubmodelElement": our_types.AASSubmodelElements.SUBMODEL_ELEMENT, "SubmodelElementList": our_types.AASSubmodelElements.SUBMODEL_ELEMENT_LIST, "SubmodelElementCollection": our_types.AASSubmodelElements.SUBMODEL_ELEMENT_COLLECTION, }
[docs]def aas_submodel_elements_from_str( text: str, ) -> Optional[our_types.AASSubmodelElements]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.AASSubmodelElements`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.AASSubmodelElements`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.AASSubmodelElements` or ``None``, if :paramref:`text` invalid. """ return _AAS_SUBMODEL_ELEMENTS_FROM_STR.get(text)
_ENTITY_TYPE_FROM_STR: Mapping[str, our_types.EntityType] = { "CoManagedEntity": our_types.EntityType.CO_MANAGED_ENTITY, "SelfManagedEntity": our_types.EntityType.SELF_MANAGED_ENTITY, }
[docs]def entity_type_from_str(text: str) -> Optional[our_types.EntityType]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.EntityType`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.EntityType`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.EntityType` or ``None``, if :paramref:`text` invalid. """ return _ENTITY_TYPE_FROM_STR.get(text)
_DIRECTION_FROM_STR: Mapping[str, our_types.Direction] = { "input": our_types.Direction.INPUT, "output": our_types.Direction.OUTPUT, }
[docs]def direction_from_str(text: str) -> Optional[our_types.Direction]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.Direction`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.Direction`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.Direction` or ``None``, if :paramref:`text` invalid. """ return _DIRECTION_FROM_STR.get(text)
_STATE_OF_EVENT_FROM_STR: Mapping[str, our_types.StateOfEvent] = { "on": our_types.StateOfEvent.ON, "off": our_types.StateOfEvent.OFF, }
[docs]def state_of_event_from_str(text: str) -> Optional[our_types.StateOfEvent]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.StateOfEvent`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.StateOfEvent`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.StateOfEvent` or ``None``, if :paramref:`text` invalid. """ return _STATE_OF_EVENT_FROM_STR.get(text)
_REFERENCE_TYPES_FROM_STR: Mapping[str, our_types.ReferenceTypes] = { "ExternalReference": our_types.ReferenceTypes.EXTERNAL_REFERENCE, "ModelReference": our_types.ReferenceTypes.MODEL_REFERENCE, }
[docs]def reference_types_from_str(text: str) -> Optional[our_types.ReferenceTypes]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.ReferenceTypes`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.ReferenceTypes`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.ReferenceTypes` or ``None``, if :paramref:`text` invalid. """ return _REFERENCE_TYPES_FROM_STR.get(text)
_KEY_TYPES_FROM_STR: Mapping[str, our_types.KeyTypes] = { "AnnotatedRelationshipElement": our_types.KeyTypes.ANNOTATED_RELATIONSHIP_ELEMENT, "AssetAdministrationShell": our_types.KeyTypes.ASSET_ADMINISTRATION_SHELL, "BasicEventElement": our_types.KeyTypes.BASIC_EVENT_ELEMENT, "Blob": our_types.KeyTypes.BLOB, "Capability": our_types.KeyTypes.CAPABILITY, "ConceptDescription": our_types.KeyTypes.CONCEPT_DESCRIPTION, "DataElement": our_types.KeyTypes.DATA_ELEMENT, "Entity": our_types.KeyTypes.ENTITY, "EventElement": our_types.KeyTypes.EVENT_ELEMENT, "File": our_types.KeyTypes.FILE, "FragmentReference": our_types.KeyTypes.FRAGMENT_REFERENCE, "GlobalReference": our_types.KeyTypes.GLOBAL_REFERENCE, "Identifiable": our_types.KeyTypes.IDENTIFIABLE, "MultiLanguageProperty": our_types.KeyTypes.MULTI_LANGUAGE_PROPERTY, "Operation": our_types.KeyTypes.OPERATION, "Property": our_types.KeyTypes.PROPERTY, "Range": our_types.KeyTypes.RANGE, "Referable": our_types.KeyTypes.REFERABLE, "ReferenceElement": our_types.KeyTypes.REFERENCE_ELEMENT, "RelationshipElement": our_types.KeyTypes.RELATIONSHIP_ELEMENT, "Submodel": our_types.KeyTypes.SUBMODEL, "SubmodelElement": our_types.KeyTypes.SUBMODEL_ELEMENT, "SubmodelElementCollection": our_types.KeyTypes.SUBMODEL_ELEMENT_COLLECTION, "SubmodelElementList": our_types.KeyTypes.SUBMODEL_ELEMENT_LIST, }
[docs]def key_types_from_str(text: str) -> Optional[our_types.KeyTypes]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.KeyTypes`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.KeyTypes`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.KeyTypes` or ``None``, if :paramref:`text` invalid. """ return _KEY_TYPES_FROM_STR.get(text)
_DATA_TYPE_DEF_XSD_FROM_STR: Mapping[str, our_types.DataTypeDefXSD] = { "xs:anyURI": our_types.DataTypeDefXSD.ANY_URI, "xs:base64Binary": our_types.DataTypeDefXSD.BASE_64_BINARY, "xs:boolean": our_types.DataTypeDefXSD.BOOLEAN, "xs:byte": our_types.DataTypeDefXSD.BYTE, "xs:date": our_types.DataTypeDefXSD.DATE, "xs:dateTime": our_types.DataTypeDefXSD.DATE_TIME, "xs:decimal": our_types.DataTypeDefXSD.DECIMAL, "xs:double": our_types.DataTypeDefXSD.DOUBLE, "xs:duration": our_types.DataTypeDefXSD.DURATION, "xs:float": our_types.DataTypeDefXSD.FLOAT, "xs:gDay": our_types.DataTypeDefXSD.G_DAY, "xs:gMonth": our_types.DataTypeDefXSD.G_MONTH, "xs:gMonthDay": our_types.DataTypeDefXSD.G_MONTH_DAY, "xs:gYear": our_types.DataTypeDefXSD.G_YEAR, "xs:gYearMonth": our_types.DataTypeDefXSD.G_YEAR_MONTH, "xs:hexBinary": our_types.DataTypeDefXSD.HEX_BINARY, "xs:int": our_types.DataTypeDefXSD.INT, "xs:integer": our_types.DataTypeDefXSD.INTEGER, "xs:long": our_types.DataTypeDefXSD.LONG, "xs:negativeInteger": our_types.DataTypeDefXSD.NEGATIVE_INTEGER, "xs:nonNegativeInteger": our_types.DataTypeDefXSD.NON_NEGATIVE_INTEGER, "xs:nonPositiveInteger": our_types.DataTypeDefXSD.NON_POSITIVE_INTEGER, "xs:positiveInteger": our_types.DataTypeDefXSD.POSITIVE_INTEGER, "xs:short": our_types.DataTypeDefXSD.SHORT, "xs:string": our_types.DataTypeDefXSD.STRING, "xs:time": our_types.DataTypeDefXSD.TIME, "xs:unsignedByte": our_types.DataTypeDefXSD.UNSIGNED_BYTE, "xs:unsignedInt": our_types.DataTypeDefXSD.UNSIGNED_INT, "xs:unsignedLong": our_types.DataTypeDefXSD.UNSIGNED_LONG, "xs:unsignedShort": our_types.DataTypeDefXSD.UNSIGNED_SHORT, }
[docs]def data_type_def_xsd_from_str(text: str) -> Optional[our_types.DataTypeDefXSD]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.DataTypeDefXSD`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.DataTypeDefXSD`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.DataTypeDefXSD` or ``None``, if :paramref:`text` invalid. """ return _DATA_TYPE_DEF_XSD_FROM_STR.get(text)
_DATA_TYPE_IEC_61360_FROM_STR: Mapping[str, our_types.DataTypeIEC61360] = { "DATE": our_types.DataTypeIEC61360.DATE, "STRING": our_types.DataTypeIEC61360.STRING, "STRING_TRANSLATABLE": our_types.DataTypeIEC61360.STRING_TRANSLATABLE, "INTEGER_MEASURE": our_types.DataTypeIEC61360.INTEGER_MEASURE, "INTEGER_COUNT": our_types.DataTypeIEC61360.INTEGER_COUNT, "INTEGER_CURRENCY": our_types.DataTypeIEC61360.INTEGER_CURRENCY, "REAL_MEASURE": our_types.DataTypeIEC61360.REAL_MEASURE, "REAL_COUNT": our_types.DataTypeIEC61360.REAL_COUNT, "REAL_CURRENCY": our_types.DataTypeIEC61360.REAL_CURRENCY, "BOOLEAN": our_types.DataTypeIEC61360.BOOLEAN, "IRI": our_types.DataTypeIEC61360.IRI, "IRDI": our_types.DataTypeIEC61360.IRDI, "RATIONAL": our_types.DataTypeIEC61360.RATIONAL, "RATIONAL_MEASURE": our_types.DataTypeIEC61360.RATIONAL_MEASURE, "TIME": our_types.DataTypeIEC61360.TIME, "TIMESTAMP": our_types.DataTypeIEC61360.TIMESTAMP, "FILE": our_types.DataTypeIEC61360.FILE, "HTML": our_types.DataTypeIEC61360.HTML, "BLOB": our_types.DataTypeIEC61360.BLOB, }
[docs]def data_type_iec_61360_from_str(text: str) -> Optional[our_types.DataTypeIEC61360]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.DataTypeIEC61360`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.DataTypeIEC61360`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.DataTypeIEC61360` or ``None``, if :paramref:`text` invalid. """ return _DATA_TYPE_IEC_61360_FROM_STR.get(text)
_SERIALIZATION_FORMAT_FROM_STR: Mapping[str, our_types.SerializationFormat] = { "application/json": our_types.SerializationFormat.JSON, "application/xml": our_types.SerializationFormat.XML, "application/aasx+xml": our_types.SerializationFormat.AASX, }
[docs]def serialization_format_from_str(text: str) -> Optional[our_types.SerializationFormat]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.SerializationFormat`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.SerializationFormat`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.SerializationFormat` or ``None``, if :paramref:`text` invalid. """ return _SERIALIZATION_FORMAT_FROM_STR.get(text)
_SECURITY_TYPE_ENUM_FROM_STR: Mapping[str, our_types.SecurityTypeEnum] = { "NONE": our_types.SecurityTypeEnum.NO_SECURITY, "RFC_TLSA": our_types.SecurityTypeEnum.RFC_TLSA, "W3C_DID": our_types.SecurityTypeEnum.W3C_DID, }
[docs]def security_type_enum_from_str(text: str) -> Optional[our_types.SecurityTypeEnum]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.SecurityTypeEnum`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.SecurityTypeEnum`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.SecurityTypeEnum` or ``None``, if :paramref:`text` invalid. """ return _SECURITY_TYPE_ENUM_FROM_STR.get(text)
_SERVICE_SPECIFICATION_PROFILE_ENUM_FROM_STR: Mapping[ str, our_types.ServiceSpecificationProfileEnum ] = { "https://admin-shell.io/aas/API/3/0/AssetAdministrationShellServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/0/AssetAdministrationShellServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_SERVICE_SPECIFICATION_SSP_002_V3_0, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_002_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_003_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_003_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_SERVICE_SPECIFICATION_SSP_003_V3_2, "https://admin-shell.io/aas/API/3/0/AasxFileServerServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/AasxFileServerServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/AasxFileServerServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/1/AasxFileServerServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/AasxFileServerServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/0/AssetAdministrationShellRegistryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRegistryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRegistryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/0/AssetAdministrationShellRegistryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_002_V3_0, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRegistryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRegistryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRegistryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_003_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRegistryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_003_V3_2, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRegistryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_004_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRegistryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_004_V3_2, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRegistryServiceSpecification/SSP-005": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_005_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRegistryServiceSpecification/SSP-005": our_types.ServiceSpecificationProfileEnum.AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_005_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelRegistryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelRegistryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelRegistryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_002_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelRegistryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/1/SubmodelRegistryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_003_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_003_V3_2, "https://admin-shell.io/aas/API/3/1/SubmodelRegistryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_004_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_004_V3_2, "https://admin-shell.io/aas/API/3/0/DiscoveryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.DISCOVERY_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/DiscoveryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.DISCOVERY_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/DiscoveryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.DISCOVERY_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/2/DiscoveryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.DISCOVERY_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/0/AssetAdministrationShellRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/0/AssetAdministrationShellRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_0, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/1/AssetAdministrationShellRepositoryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_003_V3_1, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRepositoryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_003_V3_2, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRepositoryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_004_V3_2, "https://admin-shell.io/aas/API/3/2/AssetAdministrationShellRepositoryServiceSpecification/SSP-005": our_types.ServiceSpecificationProfileEnum.AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_005_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelRepositoryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_003_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelRepositoryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_003_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRepositoryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_003_V3_2, "https://admin-shell.io/aas/API/3/0/SubmodelRepositoryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_004_V3_0, "https://admin-shell.io/aas/API/3/1/SubmodelRepositoryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_004_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRepositoryServiceSpecification/SSP-004": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_004_V3_2, "https://admin-shell.io/aas/API/3/1/SubmodelRepositoryServiceSpecification/SSP-005": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_005_V3_1, "https://admin-shell.io/aas/API/3/2/SubmodelRepositoryServiceSpecification/SSP-005": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_005_V3_2, "https://admin-shell.io/aas/API/3/2/SubmodelRepositoryServiceSpecification/SSP-006": our_types.ServiceSpecificationProfileEnum.SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_006_V3_2, "https://admin-shell.io/aas/API/3/0/ConceptDescriptionRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_0, "https://admin-shell.io/aas/API/3/1/ConceptDescriptionRepositoryServiceSpecification/SSP-001": our_types.ServiceSpecificationProfileEnum.CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_001_V3_1, "https://admin-shell.io/aas/API/3/2/ConceptDescriptionRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_2, "https://admin-shell.io/aas/API/3/1/ConceptDescriptionRepositoryServiceSpecification/SSP-002": our_types.ServiceSpecificationProfileEnum.CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_002_V3_1, "https://admin-shell.io/aas/API/3/2/ConceptDescriptionRepositoryServiceSpecification/SSP-003": our_types.ServiceSpecificationProfileEnum.CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_003_V3_2, }
[docs]def service_specification_profile_enum_from_str( text: str, ) -> Optional[our_types.ServiceSpecificationProfileEnum]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.ServiceSpecificationProfileEnum`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.ServiceSpecificationProfileEnum`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.ServiceSpecificationProfileEnum` or ``None``, if :paramref:`text` invalid. """ return _SERVICE_SPECIFICATION_PROFILE_ENUM_FROM_STR.get(text)
_STATUS_CODE_FROM_STR: Mapping[str, our_types.StatusCode] = { "Success": our_types.StatusCode.SUCCESS, "SuccessCreated": our_types.StatusCode.SUCCESS_CREATED, "SuccessAccepted": our_types.StatusCode.SUCCESS_ACCEPTED, "SuccessNoContent": our_types.StatusCode.SUCCESS_NO_CONTENT, "ClientErrorBadRequest": our_types.StatusCode.CLIENT_ERROR_BAD_REQUEST, "ClientNotAuthorized": our_types.StatusCode.CLIENT_NOT_AUTHORIZED, "ClientForbidden": our_types.StatusCode.CLIENT_FORBIDDEN, "ClientMethodNotAllowed": our_types.StatusCode.CLIENT_METHOD_NOT_ALLOWED, "ClientErrorResourceNotFound": our_types.StatusCode.CLIENT_ERROR_RESOURCE_NOT_FOUND, "ClientResourceConflict": our_types.StatusCode.CLIENT_RESOURCE_CONFLICT, "ServerInternalError": our_types.StatusCode.SERVER_INTERNAL_ERROR, "ServerNotImplemented": our_types.StatusCode.SERVER_NOT_IMPLEMENTED, "ServerErrorBadGateway": our_types.StatusCode.SERVER_ERROR_BAD_GATEWAY, }
[docs]def status_code_from_str(text: str) -> Optional[our_types.StatusCode]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.StatusCode`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.StatusCode`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.StatusCode` or ``None``, if :paramref:`text` invalid. """ return _STATUS_CODE_FROM_STR.get(text)
_MESSAGE_TYPE_ENUM_FROM_STR: Mapping[str, our_types.MessageTypeEnum] = { "Undefined": our_types.MessageTypeEnum.UNDEFINED, "Info": our_types.MessageTypeEnum.INFO, "Warning": our_types.MessageTypeEnum.WARNING, "Error": our_types.MessageTypeEnum.ERROR, "Exception": our_types.MessageTypeEnum.EXCEPTION, }
[docs]def message_type_enum_from_str(text: str) -> Optional[our_types.MessageTypeEnum]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.MessageTypeEnum`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.MessageTypeEnum`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.MessageTypeEnum` or ``None``, if :paramref:`text` invalid. """ return _MESSAGE_TYPE_ENUM_FROM_STR.get(text)
_EXECUTION_STATE_FROM_STR: Mapping[str, our_types.ExecutionState] = { "Initiated": our_types.ExecutionState.INITIATED, "Running": our_types.ExecutionState.RUNNING, "Completed": our_types.ExecutionState.COMPLETED, "Canceled": our_types.ExecutionState.CANCELED, "Failed": our_types.ExecutionState.FAILED, "Timeout": our_types.ExecutionState.TIMEOUT, }
[docs]def execution_state_from_str(text: str) -> Optional[our_types.ExecutionState]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.ExecutionState`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.ExecutionState`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.ExecutionState` or ``None``, if :paramref:`text` invalid. """ return _EXECUTION_STATE_FROM_STR.get(text)
_LEVEL_FROM_STR: Mapping[str, our_types.Level] = { "deep": our_types.Level.DEEP, "core": our_types.Level.CORE, }
[docs]def level_from_str(text: str) -> Optional[our_types.Level]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.Level`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.Level`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.Level` or ``None``, if :paramref:`text` invalid. """ return _LEVEL_FROM_STR.get(text)
_CONTENT_FROM_STR: Mapping[str, our_types.Content] = { "Normal": our_types.Content.NORMAL, "Metadata": our_types.Content.METADATA, "Value": our_types.Content.VALUE, "Reference": our_types.Content.REFERENCE, "Path": our_types.Content.PATH, }
[docs]def content_from_str(text: str) -> Optional[our_types.Content]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.Content`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.Content`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.Content` or ``None``, if :paramref:`text` invalid. """ return _CONTENT_FROM_STR.get(text)
_EXTENT_FROM_STR: Mapping[str, our_types.Extent] = { "withoutBlobValue": our_types.Extent.WITHOUT_BLOB_VALUE, "withBlobValue": our_types.Extent.WITH_BLOB_VALUE, }
[docs]def extent_from_str(text: str) -> Optional[our_types.Extent]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.Extent`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.Extent`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.Extent` or ``None``, if :paramref:`text` invalid. """ return _EXTENT_FROM_STR.get(text)
_GLOBAL_ATTRIBUTE_KIND_FROM_STR: Mapping[str, our_types.GlobalAttributeKind] = { "LOCALNOW": our_types.GlobalAttributeKind.LOCAL_NOW, "UTCNOW": our_types.GlobalAttributeKind.UTC_NOW, "CLIENTNOW": our_types.GlobalAttributeKind.CLIENT_NOW, "ANONYMOUS": our_types.GlobalAttributeKind.ANONYMOUS, }
[docs]def global_attribute_kind_from_str( text: str, ) -> Optional[our_types.GlobalAttributeKind]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.GlobalAttributeKind`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.GlobalAttributeKind`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.GlobalAttributeKind` or ``None``, if :paramref:`text` invalid. """ return _GLOBAL_ATTRIBUTE_KIND_FROM_STR.get(text)
_DATE_TIME_GLOBAL_ATTRIBUTE_KIND_FROM_STR: Mapping[ str, our_types.DateTimeGlobalAttributeKind ] = { "LOCALNOW": our_types.DateTimeGlobalAttributeKind.LOCAL_NOW, "UTCNOW": our_types.DateTimeGlobalAttributeKind.UTC_NOW, "CLIENTNOW": our_types.DateTimeGlobalAttributeKind.CLIENT_NOW, }
[docs]def date_time_global_attribute_kind_from_str( text: str, ) -> Optional[our_types.DateTimeGlobalAttributeKind]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.DateTimeGlobalAttributeKind`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.DateTimeGlobalAttributeKind`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.DateTimeGlobalAttributeKind` or ``None``, if :paramref:`text` invalid. """ return _DATE_TIME_GLOBAL_ATTRIBUTE_KIND_FROM_STR.get(text)
_QUERY_SELECT_FROM_STR: Mapping[str, our_types.QuerySelect] = { "id": our_types.QuerySelect.ID, }
[docs]def query_select_from_str(text: str) -> Optional[our_types.QuerySelect]: """ Parse :paramref:`text` as string representation of :py:class:`aas_core3_2.QuerySelect`. If :paramref:`text` is not a valid string representation of a literal of :py:class:`aas_core3_2.QuerySelect`, return ``None``. :param text: to be parsed :return: the corresponding literal of :py:class:`aas_core3_2.QuerySelect` or ``None``, if :paramref:`text` invalid. """ return _QUERY_SELECT_FROM_STR.get(text)
# This code has been automatically generated by aas-core-codegen. # Do NOT edit or append.