SystemDeviceManagementSwitchDeviceTypeRequest
Bases: OCIRequest
Switch the device type for all devices at the specified scope for a device type. To switch all the device type's device profiles for the system, neither the serviceProviderId and groupId should be present. To switch all the device type's device profiles for a service provider, only serviceProviderId should be specified. To switch all the device type's device profiles for a group, 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]):
from_device_type (str):
to_device_type (str):
Source code in src/mercury_ocip_fast/commands/commands.py
| @dataclass(kw_only=True)
class SystemDeviceManagementSwitchDeviceTypeRequest(OCIRequest):
"""Switch the device type for all devices at the specified scope for a device type.
To switch all the device type's device profiles for the system, neither the serviceProviderId and groupId should be present.
To switch all the device type's device profiles for a service provider, only serviceProviderId should be specified.
To switch all the device type's device profiles for a group, 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]):
from_device_type (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"})
from_device_type: str = field(metadata={"alias": "fromDeviceType"})
to_device_type: str = field(metadata={"alias": "toDeviceType"})
|
Responses
Bases: OCIResponseSource code in src/mercury_ocip_fast/commands/base_command.py
| class SuccessResponse(OCIResponse):
pass
|
Bases: OCIResponseSource 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 SystemDeviceManagementSwitchDeviceTypeRequest
client = Client()
command = SystemDeviceManagementSwitchDeviceTypeRequest(
service_provider_id=...,
svc_provider_id=...,
group_id=...,
from_device_type=...,
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("SystemDeviceManagementSwitchDeviceTypeRequest",
service_provider_id=...,
svc_provider_id=...,
group_id=...,
from_device_type=...,
to_device_type=...,
)
print(response)