# SPDX-FileCopyrightText: 2026 aas-client3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT
"""
List the service specification profiles of Part 2 with the functions they cover.
A profile is a subset of the operations of a service specification, such as
the read profile of the Submodel Repository. A server announces its profiles
only at runtime through the Description API, so the profiles are given here as
data rather than as separate classes or modules. For example, check what a server
supports with:
.. code-block:: python
from aas_client3_2 import description
from aas_client3_2 import profiles
from aas_client3_2 import submodel_repository
supported = profiles.functions_of(
description.get_self_description_profiles(server)
)
if submodel_repository.put_submodel_by_id in supported:
...
Each profile is defined by a normative OpenAPI of Part 2, and lists the operations of
the version of Part 2 which this client implements; besides the operations of the
service itself, every profile includes ``GetDescription``, and some include
``GenerateSerializationByIds``. A profile covers all the functions which implement its
operations, including the variants such as
:py:func:`aas_client3_2.description.get_self_description_profiles` and the functions
``query_*_ids``.
Part 2 also lets a profile restrict the serialization modifiers, which this module
does not capture: it covers only which operations a server supports.
"""
from typing import Callable, Final, FrozenSet, Iterable, Mapping, Sequence, Set
from aas_client3_2 import aas
from aas_client3_2 import aas_registry
from aas_client3_2 import aas_repository
from aas_client3_2 import aasx_file_server
from aas_client3_2 import async_bulk
from aas_client3_2 import concept_description_repository
from aas_client3_2 import description
from aas_client3_2 import discovery
from aas_client3_2 import serialization
from aas_client3_2 import submodel
from aas_client3_2 import submodel_registry
from aas_client3_2 import submodel_repository
[docs]
class Profile:
"""Represent a service specification profile with the functions it covers."""
#: Identifier of the profile, as a server lists it in its description
identifier: str
#: Functions of the client which implement the operations of the profile
functions: FrozenSet[Callable[..., object]]
[docs]
def __init__(
self, identifier: str, functions: Iterable[Callable[..., object]]
) -> None:
"""Initialize with the given values."""
self.identifier = identifier
self.functions = frozenset(functions)
[docs]
def __repr__(self) -> str:
"""Represent the profile for debugging."""
return f"{self.__class__.__name__}(identifier={self.identifier!r}, ...)"
# region Generated by dev/dev_scripts/generate_profiles.py; do not edit by hand
#: Full profile of the Asset Administration Shell Service Specification
AAS_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellServiceSpecification/SSP-001"
),
functions=[
aas.delete_file_by_path,
aas.delete_submodel_by_id,
aas.delete_submodel_element_by_path,
aas.delete_submodel_reference,
aas.delete_thumbnail,
aas.get_all_submodel_elements,
aas.get_all_submodel_elements_metadata,
aas.get_all_submodel_elements_path,
aas.get_all_submodel_elements_reference,
aas.get_all_submodel_elements_value_only,
aas.get_all_submodel_references,
aas.get_asset_administration_shell,
aas.get_asset_administration_shell_reference,
aas.get_asset_information,
aas.get_file_by_path,
aas.get_operation_async_result,
aas.get_operation_async_result_value_only,
aas.get_operation_async_status,
aas.get_submodel_by_id,
aas.get_submodel_by_id_metadata,
aas.get_submodel_by_id_path,
aas.get_submodel_by_id_reference,
aas.get_submodel_by_id_value_only,
aas.get_submodel_element_by_path,
aas.get_submodel_element_by_path_metadata,
aas.get_submodel_element_by_path_path,
aas.get_submodel_element_by_path_reference,
aas.get_submodel_element_by_path_value_only,
aas.get_thumbnail,
aas.invoke_operation_async,
aas.invoke_operation_async_value_only,
aas.invoke_operation_sync,
aas.invoke_operation_sync_value_only,
aas.patch_submode_by_id_metadata,
aas.patch_submodel_by_id,
aas.patch_submodel_by_id_value_only,
aas.patch_submodel_element_value_by_path,
aas.patch_submodel_element_value_by_path_metadata,
aas.patch_submodel_element_value_by_path_value_only,
aas.post_submodel_element,
aas.post_submodel_element_by_path,
aas.post_submodel_reference,
aas.put_asset_administration_shell,
aas.put_asset_information,
aas.put_file_by_path,
aas.put_submodel_by_id,
aas.put_submodel_element_by_path,
aas.put_thumbnail,
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
],
)
#: Read profile of the Asset Administration Shell Service Specification
AAS_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellServiceSpecification/SSP-002"
),
functions=[
aas.get_all_submodel_elements,
aas.get_all_submodel_elements_metadata,
aas.get_all_submodel_elements_path,
aas.get_all_submodel_elements_reference,
aas.get_all_submodel_elements_value_only,
aas.get_all_submodel_references,
aas.get_asset_administration_shell,
aas.get_asset_administration_shell_reference,
aas.get_asset_information,
aas.get_file_by_path,
aas.get_submodel_by_id,
aas.get_submodel_by_id_metadata,
aas.get_submodel_by_id_path,
aas.get_submodel_by_id_reference,
aas.get_submodel_by_id_value_only,
aas.get_submodel_element_by_path,
aas.get_submodel_element_by_path_metadata,
aas.get_submodel_element_by_path_path,
aas.get_submodel_element_by_path_reference,
aas.get_submodel_element_by_path_value_only,
aas.get_thumbnail,
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
],
)
#: Full profile of the Submodel Service Specification
SUBMODEL_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/SubmodelServiceSpecification/SSP-001"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
submodel.delete_file_by_path,
submodel.delete_submodel_element_by_path,
submodel.get_all_submodel_elements,
submodel.get_all_submodel_elements_metadata,
submodel.get_all_submodel_elements_path,
submodel.get_all_submodel_elements_reference,
submodel.get_all_submodel_elements_value_only,
submodel.get_file_by_path,
submodel.get_operation_async_result,
submodel.get_operation_async_result_value_only,
submodel.get_operation_async_status,
submodel.get_submodel,
submodel.get_submodel_element_by_path,
submodel.get_submodel_element_by_path_metadata,
submodel.get_submodel_element_by_path_path,
submodel.get_submodel_element_by_path_reference,
submodel.get_submodel_element_by_path_value_only,
submodel.get_submodel_metadata,
submodel.get_submodel_path,
submodel.get_submodel_reference,
submodel.get_submodel_value_only,
submodel.invoke_operation,
submodel.invoke_operation_async,
submodel.invoke_operation_async_value_only,
submodel.invoke_operation_sync_value_only,
submodel.patch_submodel,
submodel.patch_submodel_element_by_path,
submodel.patch_submodel_element_by_path_metadata,
submodel.patch_submodel_element_by_path_value_only,
submodel.patch_submodel_metadata,
submodel.patch_submodel_value_only,
submodel.post_submodel_element,
submodel.post_submodel_element_by_path,
submodel.put_file_by_path,
submodel.put_submodel,
submodel.put_submodel_element_by_path,
],
)
#: Read profile of the Submodel Service Specification
SUBMODEL_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/SubmodelServiceSpecification/SSP-002"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
submodel.get_all_submodel_elements,
submodel.get_all_submodel_elements_metadata,
submodel.get_all_submodel_elements_path,
submodel.get_all_submodel_elements_reference,
submodel.get_all_submodel_elements_value_only,
submodel.get_file_by_path,
submodel.get_submodel,
submodel.get_submodel_element_by_path,
submodel.get_submodel_element_by_path_metadata,
submodel.get_submodel_element_by_path_path,
submodel.get_submodel_element_by_path_reference,
submodel.get_submodel_element_by_path_value_only,
submodel.get_submodel_metadata,
submodel.get_submodel_path,
submodel.get_submodel_reference,
submodel.get_submodel_value_only,
],
)
#: Value profile of the Submodel Service Specification
SUBMODEL_SERVICE_SPECIFICATION_SSP_003: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/SubmodelServiceSpecification/SSP-003"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel.get_submodel,
submodel.get_submodel_value_only,
submodel.invoke_operation,
submodel.invoke_operation_sync_value_only,
],
)
#: Full profile of the AASX File Server Service Specification
AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/AasxFileServerServiceSpecification/SSP-001"
),
functions=[
aasx_file_server.delete_aasx_by_package_id,
aasx_file_server.get_aasx_by_package_id,
aasx_file_server.get_all_aasx_package_ids,
aasx_file_server.post_aasx_package,
aasx_file_server.put_aasx_by_package_id,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Async profile of the AASX File Server Service Specification
AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/AasxFileServerServiceSpecification/SSP-002"
),
functions=[
aasx_file_server.get_aasx_async_result,
aasx_file_server.get_aasx_async_status,
aasx_file_server.post_async_aasx_package,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Full profile of the Asset Administration Shell Registry Service Specification
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRegistryServiceSpecification/SSP-001"
),
functions=[
aas_registry.delete_asset_administration_shell_descriptor_by_id,
aas_registry.delete_submodel_descriptor_by_id_through_superpath,
aas_registry.get_all_asset_administration_shell_descriptors,
aas_registry.get_all_submodel_descriptors_through_superpath,
aas_registry.get_asset_administration_shell_descriptor_by_id,
aas_registry.get_submodel_descriptor_by_id_through_superpath,
aas_registry.post_asset_administration_shell_descriptor,
aas_registry.post_submodel_descriptor_through_superpath,
aas_registry.put_asset_administration_shell_descriptor_by_id,
aas_registry.put_submodel_descriptor_by_id_through_superpath,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Read profile of the Asset Administration Shell Registry Service Specification
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRegistryServiceSpecification/SSP-002"
),
functions=[
aas_registry.get_all_asset_administration_shell_descriptors,
aas_registry.get_all_submodel_descriptors_through_superpath,
aas_registry.get_asset_administration_shell_descriptor_by_id,
aas_registry.get_submodel_descriptor_by_id_through_superpath,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Bulk profile of the Asset Administration Shell Registry Service Specification
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_003: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRegistryServiceSpecification/SSP-003"
),
functions=[
aas_registry.bulk_delete_asset_administration_shell_descriptor_by_id,
aas_registry.bulk_post_asset_administration_shell_descriptor,
aas_registry.bulk_put_asset_administration_shell_descriptor_by_id,
async_bulk.bulk_get_async_result,
async_bulk.bulk_get_async_status,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Query profile of the Asset Administration Shell Registry Service Specification
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_004: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRegistryServiceSpecification/SSP-004"
),
functions=[
aas_registry.query_asset_administration_shell_descriptor_ids,
aas_registry.query_asset_administration_shell_descriptors,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Minimal read profile of the Asset Administration Shell Registry Service Specification
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_005: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRegistryServiceSpecification/SSP-005"
),
functions=[
aas_registry.get_all_asset_administration_shell_descriptors,
aas_registry.get_asset_administration_shell_descriptor_by_id,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Full profile of the Submodel Registry Service Specification
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRegistryServiceSpecification/SSP-001"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel_registry.delete_submodel_descriptor_by_id,
submodel_registry.get_all_submodel_descriptors,
submodel_registry.get_submodel_descriptor_by_id,
submodel_registry.post_submodel_descriptor,
submodel_registry.put_submodel_descriptor_by_id,
],
)
#: Read profile of the Submodel Registry Service Specification
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRegistryServiceSpecification/SSP-002"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel_registry.get_all_submodel_descriptors,
submodel_registry.get_submodel_descriptor_by_id,
],
)
#: Bulk profile of the Submodel Registry Service Specification
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_003: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRegistryServiceSpecification/SSP-003"
),
functions=[
async_bulk.bulk_get_async_result,
async_bulk.bulk_get_async_status,
description.get_self_description,
description.get_self_description_profiles,
submodel_registry.bulk_delete_submodel_descriptors_by_id,
submodel_registry.bulk_post_submodel,
submodel_registry.bulk_put_submodel_descriptors_by_id,
],
)
#: Query profile of the Submodel Registry Service Specification
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_004: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRegistryServiceSpecification/SSP-004"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel_registry.query_submodel_descriptor_ids,
submodel_registry.query_submodel_descriptors,
],
)
#: Full profile of the Discovery Service Specification
DISCOVERY_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/DiscoveryServiceSpecification/SSP-001"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
discovery.delete_all_asset_links_by_id,
discovery.get_all_asset_administration_shell_ids_by_asset_link,
discovery.get_all_asset_links_by_id,
discovery.post_all_asset_links_by_id,
discovery.search_all_asset_administration_shell_ids_by_asset_link,
],
)
#: Read profile of the Discovery Service Specification
DISCOVERY_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/DiscoveryServiceSpecification/SSP-002"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
discovery.get_all_asset_links_by_id,
discovery.search_all_asset_administration_shell_ids_by_asset_link,
],
)
#: Full profile of the Asset Administration Shell Repository Service Specification
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRepositoryServiceSpecification/SSP-001"
),
functions=[
aas_repository.delete_asset_administration_shell_by_id,
aas_repository.delete_file_by_path,
aas_repository.delete_submodel_by_id,
aas_repository.delete_submodel_element_by_path,
aas_repository.delete_submodel_reference,
aas_repository.delete_thumbnail,
aas_repository.get_all_asset_administration_shells,
aas_repository.get_all_asset_administration_shells_recent_changes,
aas_repository.get_all_asset_administration_shells_reference,
aas_repository.get_all_submodel_elements,
aas_repository.get_all_submodel_elements_metadata,
aas_repository.get_all_submodel_elements_path,
aas_repository.get_all_submodel_elements_reference,
aas_repository.get_all_submodel_elements_value_only,
aas_repository.get_all_submodel_references,
aas_repository.get_asset_administration_shell_by_id,
aas_repository.get_asset_administration_shell_by_id_reference,
aas_repository.get_asset_information,
aas_repository.get_file_by_path,
aas_repository.get_operation_async_result,
aas_repository.get_operation_async_result_value_only,
aas_repository.get_operation_async_status,
aas_repository.get_submodel_by_id,
aas_repository.get_submodel_by_id_metadata,
aas_repository.get_submodel_by_id_path,
aas_repository.get_submodel_by_id_reference,
aas_repository.get_submodel_by_id_value_only,
aas_repository.get_submodel_element_by_path,
aas_repository.get_submodel_element_by_path_metadata,
aas_repository.get_submodel_element_by_path_path,
aas_repository.get_submodel_element_by_path_reference,
aas_repository.get_submodel_element_by_path_value_only,
aas_repository.get_thumbnail,
aas_repository.invoke_operation,
aas_repository.invoke_operation_async,
aas_repository.invoke_operation_async_value_only,
aas_repository.invoke_operation_value_only,
aas_repository.patch_submodel,
aas_repository.patch_submodel_by_id_metadata,
aas_repository.patch_submodel_by_id_value_only,
aas_repository.patch_submodel_element_value_by_path,
aas_repository.patch_submodel_element_value_by_path_metadata,
aas_repository.patch_submodel_element_value_by_path_value_only,
aas_repository.post_asset_administration_shell,
aas_repository.post_submodel_element,
aas_repository.post_submodel_element_by_path,
aas_repository.post_submodel_reference,
aas_repository.put_asset_administration_shell_by_id,
aas_repository.put_asset_information,
aas_repository.put_file_by_path,
aas_repository.put_submodel_by_id,
aas_repository.put_submodel_element_by_path,
aas_repository.put_thumbnail,
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
],
)
#: Read profile of the Asset Administration Shell Repository Service Specification
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRepositoryServiceSpecification/SSP-002"
),
functions=[
aas_repository.get_all_asset_administration_shells,
aas_repository.get_all_asset_administration_shells_recent_changes,
aas_repository.get_all_asset_administration_shells_reference,
aas_repository.get_all_submodel_elements,
aas_repository.get_all_submodel_elements_metadata,
aas_repository.get_all_submodel_elements_path,
aas_repository.get_all_submodel_elements_reference,
aas_repository.get_all_submodel_elements_value_only,
aas_repository.get_all_submodel_references,
aas_repository.get_asset_administration_shell_by_id,
aas_repository.get_asset_administration_shell_by_id_reference,
aas_repository.get_asset_information,
aas_repository.get_file_by_path,
aas_repository.get_submodel_by_id,
aas_repository.get_submodel_by_id_metadata,
aas_repository.get_submodel_by_id_path,
aas_repository.get_submodel_by_id_reference,
aas_repository.get_submodel_by_id_value_only,
aas_repository.get_submodel_element_by_path,
aas_repository.get_submodel_element_by_path_metadata,
aas_repository.get_submodel_element_by_path_path,
aas_repository.get_submodel_element_by_path_reference,
aas_repository.get_submodel_element_by_path_value_only,
aas_repository.get_thumbnail,
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
],
)
#: Query profile of the Asset Administration Shell Repository Service Specification
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_003: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRepositoryServiceSpecification/SSP-003"
),
functions=[
aas_repository.query_asset_administration_shell_ids,
aas_repository.query_asset_administration_shells,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Signature profile of the Asset Administration Shell Repository Service Specification
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_004: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRepositoryServiceSpecification/SSP-004"
),
functions=[
aas_repository.get_asset_administration_shell_by_id_signed,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Identifiable profile of the Asset Administration Shell Repository Service Specification
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_005: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRepositoryServiceSpecification/SSP-005"
),
functions=[
aas_repository.delete_asset_administration_shell_by_id,
aas_repository.delete_file_by_path,
aas_repository.delete_submodel_by_id,
aas_repository.delete_submodel_reference,
aas_repository.delete_thumbnail,
aas_repository.get_all_submodel_references,
aas_repository.get_asset_administration_shell_by_id,
aas_repository.get_asset_information,
aas_repository.get_file_by_path,
aas_repository.get_submodel_by_id,
aas_repository.get_thumbnail,
aas_repository.post_submodel_reference,
aas_repository.put_asset_administration_shell_by_id,
aas_repository.put_asset_information,
aas_repository.put_file_by_path,
aas_repository.put_submodel_by_id,
aas_repository.put_thumbnail,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: History profile of the Asset Administration Shell Repository Service Specification
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_006: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"AssetAdministrationShellRepositoryServiceSpecification/SSP-006"
),
functions=[
aas_repository.get_asset_administration_shell_version_by_id_and_date,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Full profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-001"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
submodel_repository.delete_file_by_path,
submodel_repository.delete_submodel_by_id,
submodel_repository.delete_submodel_element_by_path,
submodel_repository.get_all_submodel_elements,
submodel_repository.get_all_submodel_elements_metadata,
submodel_repository.get_all_submodel_elements_path,
submodel_repository.get_all_submodel_elements_reference,
submodel_repository.get_all_submodel_elements_value_only,
submodel_repository.get_all_submodels,
submodel_repository.get_all_submodels_metadata,
submodel_repository.get_all_submodels_path,
submodel_repository.get_all_submodels_recent_changes,
submodel_repository.get_all_submodels_reference,
submodel_repository.get_all_submodels_value_only,
submodel_repository.get_file_by_path,
submodel_repository.get_operation_async_result,
submodel_repository.get_operation_async_result_value_only,
submodel_repository.get_operation_async_status,
submodel_repository.get_submodel_by_id,
submodel_repository.get_submodel_by_id_metadata,
submodel_repository.get_submodel_by_id_path,
submodel_repository.get_submodel_by_id_reference,
submodel_repository.get_submodel_by_id_value_only,
submodel_repository.get_submodel_element_by_path,
submodel_repository.get_submodel_element_by_path_metadata,
submodel_repository.get_submodel_element_by_path_path,
submodel_repository.get_submodel_element_by_path_reference,
submodel_repository.get_submodel_element_by_path_value_only,
submodel_repository.invoke_operation,
submodel_repository.invoke_operation_async,
submodel_repository.invoke_operation_async_value_only,
submodel_repository.invoke_operation_value_only,
submodel_repository.patch_submodel_by_id,
submodel_repository.patch_submodel_by_id_metadata,
submodel_repository.patch_submodel_by_id_value_only,
submodel_repository.patch_submodel_element_by_path,
submodel_repository.patch_submodel_element_by_path_metadata,
submodel_repository.patch_submodel_element_by_path_value_only,
submodel_repository.post_submodel,
submodel_repository.post_submodel_element,
submodel_repository.post_submodel_element_by_path,
submodel_repository.put_file_by_path,
submodel_repository.put_submodel_by_id,
submodel_repository.put_submodel_element_by_path,
],
)
#: Read profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-002"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
submodel_repository.get_all_submodel_elements,
submodel_repository.get_all_submodel_elements_metadata,
submodel_repository.get_all_submodel_elements_path,
submodel_repository.get_all_submodel_elements_reference,
submodel_repository.get_all_submodel_elements_value_only,
submodel_repository.get_all_submodels,
submodel_repository.get_all_submodels_metadata,
submodel_repository.get_all_submodels_path,
submodel_repository.get_all_submodels_recent_changes,
submodel_repository.get_all_submodels_reference,
submodel_repository.get_all_submodels_value_only,
submodel_repository.get_file_by_path,
submodel_repository.get_submodel_by_id,
submodel_repository.get_submodel_by_id_metadata,
submodel_repository.get_submodel_by_id_path,
submodel_repository.get_submodel_by_id_reference,
submodel_repository.get_submodel_by_id_value_only,
submodel_repository.get_submodel_element_by_path,
submodel_repository.get_submodel_element_by_path_metadata,
submodel_repository.get_submodel_element_by_path_path,
submodel_repository.get_submodel_element_by_path_reference,
submodel_repository.get_submodel_element_by_path_value_only,
],
)
#: Template profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_003: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-003"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
submodel_repository.delete_file_by_path,
submodel_repository.delete_submodel_by_id,
submodel_repository.delete_submodel_element_by_path,
submodel_repository.get_all_submodel_elements,
submodel_repository.get_all_submodel_elements_metadata,
submodel_repository.get_all_submodels,
submodel_repository.get_all_submodels_metadata,
submodel_repository.get_all_submodels_recent_changes,
submodel_repository.get_all_submodels_value_only,
submodel_repository.get_file_by_path,
submodel_repository.get_submodel_by_id,
submodel_repository.get_submodel_by_id_metadata,
submodel_repository.get_submodel_element_by_path,
submodel_repository.get_submodel_element_by_path_metadata,
submodel_repository.get_submodel_element_by_path_path,
submodel_repository.get_submodel_element_by_path_reference,
submodel_repository.get_submodel_element_by_path_value_only,
submodel_repository.patch_submodel_by_id,
submodel_repository.patch_submodel_by_id_metadata,
submodel_repository.patch_submodel_element_by_path,
submodel_repository.patch_submodel_element_by_path_metadata,
submodel_repository.patch_submodel_element_by_path_value_only,
submodel_repository.post_submodel,
submodel_repository.post_submodel_element,
submodel_repository.post_submodel_element_by_path,
submodel_repository.put_file_by_path,
submodel_repository.put_submodel_by_id,
submodel_repository.put_submodel_element_by_path,
],
)
#: Template read profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_004: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-004"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
submodel_repository.get_all_submodel_elements,
submodel_repository.get_all_submodel_elements_metadata,
submodel_repository.get_all_submodels,
submodel_repository.get_all_submodels_metadata,
submodel_repository.get_all_submodels_recent_changes,
submodel_repository.get_all_submodels_value_only,
submodel_repository.get_file_by_path,
submodel_repository.get_submodel_by_id,
submodel_repository.get_submodel_by_id_metadata,
submodel_repository.get_submodel_element_by_path,
submodel_repository.get_submodel_element_by_path_metadata,
submodel_repository.get_submodel_element_by_path_path,
submodel_repository.get_submodel_element_by_path_reference,
submodel_repository.get_submodel_element_by_path_value_only,
],
)
#: Query profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_005: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-005"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel_repository.query_submodel_ids,
submodel_repository.query_submodels,
],
)
#: Signature profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_006: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-006"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel_repository.get_submodel_by_id_signed,
],
)
#: History profile of the Submodel Repository Service Specification
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_007: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"SubmodelRepositoryServiceSpecification/SSP-007"
),
functions=[
description.get_self_description,
description.get_self_description_profiles,
submodel_repository.get_submodel_version_by_id_and_date,
],
)
#: Full profile of the Concept Description Repository Service Specification
CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_001: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"ConceptDescriptionRepositoryServiceSpecification/SSP-001"
),
functions=[
concept_description_repository.delete_concept_description_by_id,
concept_description_repository.get_all_concept_descriptions,
concept_description_repository.get_all_concept_descriptions_recent_changes,
concept_description_repository.get_concept_description_by_id,
concept_description_repository.post_concept_description,
concept_description_repository.put_concept_description_by_id,
description.get_self_description,
description.get_self_description_profiles,
serialization.generate_serialization_by_ids,
],
)
#: Query profile of the Concept Description Repository Service Specification
CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_002: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"ConceptDescriptionRepositoryServiceSpecification/SSP-002"
),
functions=[
concept_description_repository.query_concept_description_ids,
concept_description_repository.query_concept_descriptions,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: Signature profile of the Concept Description Repository Service Specification
CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_003: Final[Profile] = Profile(
identifier=(
"https://admin-shell.io/aas/API/3/2/"
"ConceptDescriptionRepositoryServiceSpecification/SSP-003"
),
functions=[
concept_description_repository.get_concept_description_by_id_signed,
description.get_self_description,
description.get_self_description_profiles,
],
)
#: All the profiles of Part 2 in the version which this client implements, in
#: the order of the specification
PROFILES: Final[Sequence[Profile]] = (
AAS_SERVICE_SPECIFICATION_SSP_001,
AAS_SERVICE_SPECIFICATION_SSP_002,
SUBMODEL_SERVICE_SPECIFICATION_SSP_001,
SUBMODEL_SERVICE_SPECIFICATION_SSP_002,
SUBMODEL_SERVICE_SPECIFICATION_SSP_003,
AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_001,
AASX_FILE_SERVER_SERVICE_SPECIFICATION_SSP_002,
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_001,
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_002,
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_003,
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_004,
AAS_REGISTRY_SERVICE_SPECIFICATION_SSP_005,
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_001,
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_002,
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_003,
SUBMODEL_REGISTRY_SERVICE_SPECIFICATION_SSP_004,
DISCOVERY_SERVICE_SPECIFICATION_SSP_001,
DISCOVERY_SERVICE_SPECIFICATION_SSP_002,
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_001,
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_002,
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_003,
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_004,
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_005,
AAS_REPOSITORY_SERVICE_SPECIFICATION_SSP_006,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_001,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_002,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_003,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_004,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_005,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_006,
SUBMODEL_REPOSITORY_SERVICE_SPECIFICATION_SSP_007,
CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_001,
CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_002,
CONCEPT_DESCRIPTION_REPOSITORY_SERVICE_SPECIFICATION_SSP_003,
)
# endregion
#: Profiles by their identifiers
BY_IDENTIFIER: Final[Mapping[str, Profile]] = {
profile.identifier: profile for profile in PROFILES
}
[docs]
def functions_of(identifiers: Iterable[str]) -> FrozenSet[Callable[..., object]]:
"""
Give all the functions covered by the profiles of :paramref:`identifiers`.
The identifiers which are not in :py:data:`BY_IDENTIFIER` are ignored, since
the OpenAPI of Part 2 lets a server list proprietary profiles, and asks the
clients to ignore the unknown ones. This includes the profiles of the earlier
versions of Part 2: their operations need not match those of the version which
this client implements, so we do not assume that they are supported.
"""
result: Set[Callable[..., object]] = set()
for identifier in identifiers:
profile = BY_IDENTIFIER.get(identifier, None)
if profile is not None:
result.update(profile.functions)
return frozenset(result)