AAS HTTP Client Documentation
Loading...
Searching...
No Matches
implementations.shell_implementation.ShellRepoImplementation Class Reference

Implementation of Asset Administration Shell related API calls. More...

Inheritance diagram for implementations.shell_implementation.ShellRepoImplementation:
[legend]
Collaboration diagram for implementations.shell_implementation.ShellRepoImplementation:
[legend]

Public Member Functions

 __init__ (self, "AasHttpClient" client)
 Initializes the ShellImplementation with the given parameters.
 
dict|None get_asset_administration_shell_by_id (self, str aas_identifier)
 Returns a specific Asset Administration Shell.
 
bool put_asset_administration_shell_by_id (self, str aas_identifier, dict request_body)
 Creates or replaces an existing Asset Administration Shell.
 
bool delete_asset_administration_shell_by_id (self, str aas_identifier)
 Deletes an Asset Administration Shell.
 
bytes|None get_thumbnail_aas_repository (self, str aas_identifier)
 Returns the thumbnail of the Asset Administration Shell.
 
bool put_thumbnail_aas_repository (self, str aas_identifier, str file_name, Path file)
 Creates or updates the thumbnail of the Asset Administration Shell.
 
bool delete_thumbnail_aas_repository (self, str aas_identifier)
 Deletes the thumbnail of the Asset Administration Shell.
 
dict|None get_all_asset_administration_shells (self, list[dict]|None asset_ids=None, str id_short="", int limit=100, str cursor="")
 Returns all Asset Administration Shells.
 
dict|None post_asset_administration_shell (self, dict request_body)
 Creates a new Asset Administration Shell.
 
dict|None get_all_submodel_references_aas_repository (self, str aas_identifier, int limit=100, str cursor="")
 Returns all submodel references.
 
dict|None post_submodel_reference_aas_repository (self, str aas_identifier, dict request_body)
 Creates a submodel reference at the Asset Administration Shell.
 
bool delete_submodel_reference_by_id_aas_repository (self, str aas_identifier, str submodel_identifier)
 Deletes the submodel reference from the Asset Administration Shell.
 
bool put_submodel_by_id_aas_repository (self, str aas_identifier, str submodel_identifier, dict request_body)
 Updates the Submodel.
 
dict|None get_asset_administration_shell_by_id_reference_aas_repository (self, str aas_identifier)
 Returns a specific Asset Administration Shell as a Reference.
 
dict|None get_submodel_by_id_aas_repository (self, str aas_identifier, str submodel_identifier)
 Returns the Submodel.
 

Protected Attributes

 _client
 

Detailed Description

Implementation of Asset Administration Shell related API calls.

Definition at line 31 of file shell_implementation.py.

Constructor & Destructor Documentation

◆ __init__()

implementations.shell_implementation.ShellRepoImplementation.__init__ (   self,
"AasHttpClient"  client 
)

Initializes the ShellImplementation with the given parameters.

Definition at line 34 of file shell_implementation.py.

Member Function Documentation

◆ delete_asset_administration_shell_by_id()

bool implementations.shell_implementation.ShellRepoImplementation.delete_asset_administration_shell_by_id (   self,
str  aas_identifier 
)

Deletes an Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
Returns
True if the deletion was successful, False otherwise

Definition at line 119 of file shell_implementation.py.

◆ delete_submodel_reference_by_id_aas_repository()

bool implementations.shell_implementation.ShellRepoImplementation.delete_submodel_reference_by_id_aas_repository (   self,
str  aas_identifier,
str  submodel_identifier 
)

Deletes the submodel reference from the Asset Administration Shell.

Does not delete the submodel itself.

Parameters
aas_identifierThe Asset Administration Shells unique id
submodel_identifierThe Submodels unique id
Returns
True if the deletion was successful, False otherwise

Definition at line 414 of file shell_implementation.py.

◆ delete_thumbnail_aas_repository()

bool implementations.shell_implementation.ShellRepoImplementation.delete_thumbnail_aas_repository (   self,
str  aas_identifier 
)

Deletes the thumbnail of the Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
Returns
True if the deletion was successful, False otherwise

Definition at line 232 of file shell_implementation.py.

◆ get_all_asset_administration_shells()

dict | None implementations.shell_implementation.ShellRepoImplementation.get_all_asset_administration_shells (   self,
list[dict] | None   asset_ids = None,
str   id_short = "",
int   limit = 100,
str   cursor = "" 
)

Returns all Asset Administration Shells.

Parameters
assetIdsA list of specific Asset identifiers (format: {"identifier": "string", "encodedIdentifier": "string"})
idShortThe Asset Administration Shells IdShort
limitThe maximum number of elements in the response array
cursorA server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
Returns
List of paginated Asset Administration Shells data or None if an error occurred

Definition at line 268 of file shell_implementation.py.

◆ get_all_submodel_references_aas_repository()

dict | None implementations.shell_implementation.ShellRepoImplementation.get_all_submodel_references_aas_repository (   self,
str  aas_identifier,
int   limit = 100,
str   cursor = "" 
)

Returns all submodel references.

Parameters
aas_identifierThe Asset Administration Shells unique id
limitThe maximum number of elements in the response array
cursorA server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
Returns
List of Submodel references or None if an error occurred

Definition at line 338 of file shell_implementation.py.

◆ get_asset_administration_shell_by_id()

dict | None implementations.shell_implementation.ShellRepoImplementation.get_asset_administration_shell_by_id (   self,
str  aas_identifier 
)

Returns a specific Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
Returns
Asset Administration Shells data or None if an error occurred

Definition at line 51 of file shell_implementation.py.

Here is the caller graph for this function:

◆ get_asset_administration_shell_by_id_reference_aas_repository()

dict | None implementations.shell_implementation.ShellRepoImplementation.get_asset_administration_shell_by_id_reference_aas_repository (   self,
str  aas_identifier 
)

Returns a specific Asset Administration Shell as a Reference.

Parameters
aas_identifierID of the AAS reference to retrieve
Returns
Asset Administration Shells reference data or None if an error occurred

Definition at line 486 of file shell_implementation.py.

◆ get_submodel_by_id_aas_repository()

dict | None implementations.shell_implementation.ShellRepoImplementation.get_submodel_by_id_aas_repository (   self,
str  aas_identifier,
str  submodel_identifier 
)

Returns the Submodel.

Parameters
aas_identifierID of the AAS to retrieve the submodel from
submodel_identifierID of the submodel to retrieve
Returns
Submodel object or None if an error occurred

Definition at line 521 of file shell_implementation.py.

◆ get_thumbnail_aas_repository()

bytes | None implementations.shell_implementation.ShellRepoImplementation.get_thumbnail_aas_repository (   self,
str  aas_identifier 
)

Returns the thumbnail of the Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
Returns
Thumbnail file data as bytes (octet-stream) or None if an error occurred

Definition at line 152 of file shell_implementation.py.

◆ post_asset_administration_shell()

dict | None implementations.shell_implementation.ShellRepoImplementation.post_asset_administration_shell (   self,
dict  request_body 
)

Creates a new Asset Administration Shell.

Parameters
request_bodyJson data of the Asset Administration Shell to post
Returns
Response data as a dictionary or None if an error occurred

Definition at line 310 of file shell_implementation.py.

◆ post_submodel_reference_aas_repository()

dict | None implementations.shell_implementation.ShellRepoImplementation.post_submodel_reference_aas_repository (   self,
str  aas_identifier,
dict  request_body 
)

Creates a submodel reference at the Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
request_bodyReference to the Submodel
Returns
Response data as a dictionary or None if an error occurred

Definition at line 379 of file shell_implementation.py.

◆ put_asset_administration_shell_by_id()

bool implementations.shell_implementation.ShellRepoImplementation.put_asset_administration_shell_by_id (   self,
str  aas_identifier,
dict  request_body 
)

Creates or replaces an existing Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
request_bodyJson data of the Asset Administration Shell data to put
Returns
True if the update was successful, False otherwise

Definition at line 86 of file shell_implementation.py.

◆ put_submodel_by_id_aas_repository()

bool implementations.shell_implementation.ShellRepoImplementation.put_submodel_by_id_aas_repository (   self,
str  aas_identifier,
str  submodel_identifier,
dict  request_body 
)

Updates the Submodel.

Parameters
aas_identifierID of the AAS to update the submodel for
submodel_identifierID of the submodel to update
request_bodyJson data to the Submodel to put
Returns
True if the update was successful, False otherwise

Definition at line 452 of file shell_implementation.py.

◆ put_thumbnail_aas_repository()

bool implementations.shell_implementation.ShellRepoImplementation.put_thumbnail_aas_repository (   self,
str  aas_identifier,
str  file_name,
Path  file 
)

Creates or updates the thumbnail of the Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
file_nameThe name of the thumbnail file
filePath to the thumbnail file to upload as attachment
Returns
True if the update was successful, False otherwise

Definition at line 187 of file shell_implementation.py.

Member Data Documentation

◆ _client

implementations.shell_implementation.ShellRepoImplementation._client
protected

Definition at line 35 of file shell_implementation.py.


The documentation for this class was generated from the following file: