Skip to content

UserPreferredAnswerEndpointModifyRequest

Bases: OCIRequest

Request to configure a user's Preferred Answer Endpoint for Auto-Answer and Forced Answer. Setting preferredAnswerEndpoint to nil will clear the user's configured Preferred Answer Endpoint. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

user_id (str):

preferred_answer_endpoint (Optional[Nillable[AccessDeviceEndpointKey]]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class UserPreferredAnswerEndpointModifyRequest(OCIRequest):
    """Request to configure a user's Preferred Answer Endpoint for Auto-Answer and Forced Answer.
        Setting preferredAnswerEndpoint to nil will clear the user's configured Preferred Answer Endpoint.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        user_id (str):

        preferred_answer_endpoint (Optional[Nillable[AccessDeviceEndpointKey]]):

    """

    user_id: str = field(metadata={"alias": "userId"})

    preferred_answer_endpoint: Optional[Nillable[AccessDeviceEndpointKey]] = field(
        default=None, metadata={"alias": "preferredAnswerEndpoint"}
    )

    def __post_init__(self):
        nillable_fields = ["preferred_answer_endpoint"]
        for field_name in nillable_fields:
            value = getattr(self, field_name)
            if value == "" or value == "None":
                object.__setattr__(self, field_name, OCINil)

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 UserPreferredAnswerEndpointModifyRequest

client = Client()

command = UserPreferredAnswerEndpointModifyRequest(
    user_id=...,
    preferred_answer_endpoint=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("UserPreferredAnswerEndpointModifyRequest",
    user_id=...,
    preferred_answer_endpoint=...,
)

print(response)