Skip to content

SystemDeviceManagementSwitchDeviceTypeDeviceRequest

Bases: OCIRequest

Switch the device type for a specified device. To switch a system level device profile, serviceProviderId and groupId should not be present. To switch a service provider level device profile, only serviceProviderId should be specified. To switch a group level device profile, serviceProviderId and groupId should specified. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

service_provider_id (Optional[str]):

svc_provider_id (Optional[str]):

group_id (Optional[str]):

device_name (str):

to_device_type (str):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class SystemDeviceManagementSwitchDeviceTypeDeviceRequest(OCIRequest):
    """Switch the device type for a specified device.
        To switch a system level device profile, serviceProviderId and groupId should not be present.
        To switch a service provider level device profile, only serviceProviderId should be specified.
        To switch a group level device profile, serviceProviderId and groupId should specified.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        service_provider_id (Optional[str]):

        svc_provider_id (Optional[str]):

        group_id (Optional[str]):

        device_name (str):

        to_device_type (str):

    """

    service_provider_id: Optional[str] = field(
        default=None, metadata={"alias": "serviceProviderId"}
    )

    svc_provider_id: Optional[str] = field(
        default=None, metadata={"alias": "svcProviderId"}
    )

    group_id: Optional[str] = field(default=None, metadata={"alias": "groupId"})

    device_name: str = field(metadata={"alias": "deviceName"})

    to_device_type: str = field(metadata={"alias": "toDeviceType"})

Responses

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class SuccessResponse(OCIResponse):
    pass

Bases: OCIResponse

Source code in src/mercury_ocip_fast/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import SystemDeviceManagementSwitchDeviceTypeDeviceRequest

client = Client()

command = SystemDeviceManagementSwitchDeviceTypeDeviceRequest(
    service_provider_id=...,
    svc_provider_id=...,
    group_id=...,
    device_name=...,
    to_device_type=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("SystemDeviceManagementSwitchDeviceTypeDeviceRequest",
    service_provider_id=...,
    svc_provider_id=...,
    group_id=...,
    device_name=...,
    to_device_type=...,
)

print(response)