Source code for nisystemlink.clients.assetmanagement.models._asset_location

from enum import Enum

from nisystemlink.clients.core._uplink._json_model import JsonModel


[docs]class AssetPresenceStatus(Enum): """Status of an asset's presence in a system.""" INITIALIZING = "INITIALIZING" UNKNOWN = "UNKNOWN" NOT_PRESENT = "NOT_PRESENT" PRESENT = "PRESENT"
class SystemConnection(Enum): """Whether or not the minion is connected to the server and has updated the server with its data. To maintain compatibility with previous versions of SystemLink, the values [APPROVED, UNSUPPORTED, ACTIVATED] are considered equivalent to DISCONNECTED and [CONNECTED_UPDATE_PENDING, CONNECTED_UPDATE_SUCCESSFUL, CONNECTED_UPDATE_FAILED] are equivalent to CONNECTED. """ APPROVED = "APPROVED" DISCONNECTED = "DISCONNECTED" CONNECTED_UPDATE_PENDING = "CONNECTED_UPDATE_PENDING" CONNECTED = "CONNECTED" CONNECTED_UPDATE_FAILED = "CONNECTED_UPDATE_FAILED" UNSUPPORTED = "UNSUPPORTED" ACTIVATED = "ACTIVATED" CONNECTED_UPDATE_SUCCESSFUL = "CONNECTED_UPDATE_SUCCESSFUL"
[docs]class AssetPresenceWithSystemConnection(JsonModel): """Model for the presence of an asset and the connection of the system in which it resides.""" asset_presence: AssetPresenceStatus """Gets or sets the status of an asset's presence in a system.""" system_connection: SystemConnection | None = None """Gets or sets whether or not the minion is connected to the server and has updated the server with its data."""
[docs]class AssetPresence(JsonModel): """Model for the presence of an asset.""" asset_presence: AssetPresenceStatus """Gets or sets the status of an asset's presence in a system."""
class _AssetLocation(JsonModel): """local model for information about the asset location, presence and the connection status of the system.""" minion_id: str | None = None """Gets or sets identifier of the minion where the asset is located.""" physical_location: str | None = None """Gets or sets the physical location of the asset.""" parent: str | None = None """Gets or sets the parent of the asset.""" resource_uri: str | None = None """Gets or sets identifier of a resource.""" slot_number: int | None = None """Gets or sets the number of the slot in which the asset is located."""
[docs]class AssetLocation(_AssetLocation): """Model for information about the asset location, presence and the connection status of the system.""" state: AssetPresenceWithSystemConnection """Presence of an asset and the connection of the system in which it resides."""
[docs]class AssetLocationForCreate(_AssetLocation): """Model for information about the asset presence status of the system, used while create""" state: AssetPresence """Model for the presence of an asset."""