UserExecutiveModifyAssistantRequest
Bases: OCIRequest
Request to modify the assistant setting and the list of assistants assigned to an executive user. The response is either SuccessResponse or ErrorResponse.
Attributes:
user_id (str):
allow_opt_in_out (Optional[bool]):
assistant_user_id_list (Optional[Nillable[ReplacementUserIdList]]):
Source code in src/mercury_ocip/commands/commands.py
| @dataclass(kw_only=True)
class UserExecutiveModifyAssistantRequest(OCIRequest):
"""Request to modify the assistant setting and the list of assistants assigned to an executive user.
The response is either SuccessResponse or ErrorResponse.
Attributes:
user_id (str):
allow_opt_in_out (Optional[bool]):
assistant_user_id_list (Optional[Nillable[ReplacementUserIdList]]):
"""
user_id: str = field(metadata={"alias": "userId"})
allow_opt_in_out: Optional[bool] = field(
default=None, metadata={"alias": "allowOptInOut"}
)
assistant_user_id_list: Optional[Nillable[ReplacementUserIdList]] = field(
default=None, metadata={"alias": "assistantUserIdList"}
)
def __post_init__(self):
nillable_fields = ["assistant_user_id_list"]
for field_name in nillable_fields:
value = getattr(self, field_name)
if value == "" or value == "None":
object.__setattr__(self, field_name, OCINil)
|
Responses
Bases: OCIResponseSource code in src/mercury_ocip/commands/base_command.py
| class SuccessResponse(OCIResponse):
pass
|
Bases: OCIResponseSource code in src/mercury_ocip/commands/base_command.py
| class ErrorResponse(OCIResponse):
errorCode: Optional[int] = None
summary: str
summaryEnglish: str
detail: Optional[str] = None
|
Example Usage
from mercury_ocip.client import Client
from mercury_ocip.commands import UserExecutiveModifyAssistantRequest
client = Client()
command = UserExecutiveModifyAssistantRequest(
user_id=...,
allow_opt_in_out=...,
assistant_user_id_list=...,
)
response = client.command(command)
print(response)
Example 2 with Raw Command
from mercury_ocip.client import Client
client = Client()
response = client.raw_command("UserExecutiveModifyAssistantRequest",
user_id=...,
allow_opt_in_out=...,
assistant_user_id_list=...,
)
print(response)