Skip to content

GroupHuntGroupConsolidatedModifyInstanceRequest

Bases: OCIRequest

Request to modify a Hunt Group instance.

When phone numbers are un-assigned from the user, the unused numbers may be un-assigned from the group and service provider. If UnassignPhoneNumbersLevel is set to 'Group', the user's primary phone number, fax number and any alternate numbers, will be un-assigned from the group if the command is executed by a service provider administrator or above.
When set to 'Service Provider', they will be un-assigned from the group and service provider if the command is executed by a provisioning administrator or above.
When omitted, the number(s) will be left assigned to the group.
An ErrorResponse will be returned if any number cannot be unassigned because of insufficient privilege.

If the phoneNumber has not been assigned to the group and addPhoneNumberToGroup is set to true, it will be added to group if needed if the command is executed by a service provider administrator and above. The command will fail otherwise.

The response is either SuccessResponse or ErrorResponse.
The following elements are only used in AS data mode:
   useSystemHuntGroupCLIDSetting
   includeHuntGroupNameInCLID

Attributes:

service_user_id (str):

unassign_phone_numbers (Optional[str]):

add_phone_number_to_group (Optional[bool]):

service_instance_profile (Optional[ServiceInstanceModifyProfile]):

policy (Optional[str]):

hunt_after_no_answer (Optional[bool]):

no_answer_number_of_rings (Optional[int]):

forward_after_timeout (Optional[bool]):

forward_timeout_seconds (Optional[int]):

forward_to_phone_number (Optional[Nillable[str]]):

agent_user_id_list (Optional[Nillable[ReplacementUserIdList]]):

agent_weight_list (Optional[Nillable[ReplacementAgentWeightList]]):

allow_call_waiting_for_agents (Optional[bool]):

use_system_hunt_group_clid_setting (Optional[bool]):

include_hunt_group_name_in_clid (Optional[bool]):

enable_not_reachable_forwarding (Optional[bool]):

not_reachable_forward_to_phone_number (Optional[Nillable[str]]):

make_busy_when_not_reachable (Optional[bool]):

allow_members_to_control_group_busy (Optional[bool]):

enable_group_busy (Optional[bool]):

apply_group_busy_when_terminating_to_agent (Optional[bool]):

network_class_of_service (Optional[str]):

service_list (Optional[Nillable[ReplacementConsolidatedUserServiceAssignmentList]]):

is_active (Optional[bool]):

directory_number_hunting_agent_user_id_list (Optional[Nillable[ReplacementUserIdList]]):

directory_number_hunting_use_terminate_call_to_agent_first (Optional[bool]):

directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls (Optional[bool]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class GroupHuntGroupConsolidatedModifyInstanceRequest(OCIRequest):
    """Request to modify a Hunt Group instance.

        When phone numbers are un-assigned from the user, the unused numbers may be un-assigned from the group and service provider. If UnassignPhoneNumbersLevel is set to 'Group', the user's primary phone number, fax number and any alternate numbers, will be un-assigned from the group if the command is executed by a service provider administrator or above.
        When set to 'Service Provider', they will be un-assigned from the group and service provider if the command is executed by a provisioning administrator or above.
        When omitted, the number(s) will be left assigned to the group.
        An ErrorResponse will be returned if any number cannot be unassigned because of insufficient privilege.

        If the phoneNumber has not been assigned to the group and addPhoneNumberToGroup is set to true, it will be added to group if needed if the command is executed by a service provider administrator and above. The command will fail otherwise.

        The response is either SuccessResponse or ErrorResponse.
        The following elements are only used in AS data mode:
           useSystemHuntGroupCLIDSetting
           includeHuntGroupNameInCLID

    Attributes:

        service_user_id (str):

        unassign_phone_numbers (Optional[str]):

        add_phone_number_to_group (Optional[bool]):

        service_instance_profile (Optional[ServiceInstanceModifyProfile]):

        policy (Optional[str]):

        hunt_after_no_answer (Optional[bool]):

        no_answer_number_of_rings (Optional[int]):

        forward_after_timeout (Optional[bool]):

        forward_timeout_seconds (Optional[int]):

        forward_to_phone_number (Optional[Nillable[str]]):

        agent_user_id_list (Optional[Nillable[ReplacementUserIdList]]):

        agent_weight_list (Optional[Nillable[ReplacementAgentWeightList]]):

        allow_call_waiting_for_agents (Optional[bool]):

        use_system_hunt_group_clid_setting (Optional[bool]):

        include_hunt_group_name_in_clid (Optional[bool]):

        enable_not_reachable_forwarding (Optional[bool]):

        not_reachable_forward_to_phone_number (Optional[Nillable[str]]):

        make_busy_when_not_reachable (Optional[bool]):

        allow_members_to_control_group_busy (Optional[bool]):

        enable_group_busy (Optional[bool]):

        apply_group_busy_when_terminating_to_agent (Optional[bool]):

        network_class_of_service (Optional[str]):

        service_list (Optional[Nillable[ReplacementConsolidatedUserServiceAssignmentList]]):

        is_active (Optional[bool]):

        directory_number_hunting_agent_user_id_list (Optional[Nillable[ReplacementUserIdList]]):

        directory_number_hunting_use_terminate_call_to_agent_first (Optional[bool]):

        directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls (Optional[bool]):

    """

    service_user_id: str = field(metadata={"alias": "serviceUserId"})

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

    add_phone_number_to_group: Optional[bool] = field(
        default=None, metadata={"alias": "addPhoneNumberToGroup"}
    )

    service_instance_profile: Optional[ServiceInstanceModifyProfile] = field(
        default=None, metadata={"alias": "serviceInstanceProfile"}
    )

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

    hunt_after_no_answer: Optional[bool] = field(
        default=None, metadata={"alias": "huntAfterNoAnswer"}
    )

    no_answer_number_of_rings: Optional[int] = field(
        default=None, metadata={"alias": "noAnswerNumberOfRings"}
    )

    forward_after_timeout: Optional[bool] = field(
        default=None, metadata={"alias": "forwardAfterTimeout"}
    )

    forward_timeout_seconds: Optional[int] = field(
        default=None, metadata={"alias": "forwardTimeoutSeconds"}
    )

    forward_to_phone_number: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "forwardToPhoneNumber"}
    )

    agent_user_id_list: Optional[Nillable[ReplacementUserIdList]] = field(
        default=None, metadata={"alias": "agentUserIdList"}
    )

    agent_weight_list: Optional[Nillable[ReplacementAgentWeightList]] = field(
        default=None, metadata={"alias": "agentWeightList"}
    )

    allow_call_waiting_for_agents: Optional[bool] = field(
        default=None, metadata={"alias": "allowCallWaitingForAgents"}
    )

    use_system_hunt_group_clid_setting: Optional[bool] = field(
        default=None, metadata={"alias": "useSystemHuntGroupCLIDSetting"}
    )

    include_hunt_group_name_in_clid: Optional[bool] = field(
        default=None, metadata={"alias": "includeHuntGroupNameInCLID"}
    )

    enable_not_reachable_forwarding: Optional[bool] = field(
        default=None, metadata={"alias": "enableNotReachableForwarding"}
    )

    not_reachable_forward_to_phone_number: Optional[Nillable[str]] = field(
        default=None, metadata={"alias": "notReachableForwardToPhoneNumber"}
    )

    make_busy_when_not_reachable: Optional[bool] = field(
        default=None, metadata={"alias": "makeBusyWhenNotReachable"}
    )

    allow_members_to_control_group_busy: Optional[bool] = field(
        default=None, metadata={"alias": "allowMembersToControlGroupBusy"}
    )

    enable_group_busy: Optional[bool] = field(
        default=None, metadata={"alias": "enableGroupBusy"}
    )

    apply_group_busy_when_terminating_to_agent: Optional[bool] = field(
        default=None, metadata={"alias": "applyGroupBusyWhenTerminatingToAgent"}
    )

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

    service_list: Optional[
        Nillable[ReplacementConsolidatedUserServiceAssignmentList]
    ] = field(default=None, metadata={"alias": "serviceList"})

    is_active: Optional[bool] = field(default=None, metadata={"alias": "isActive"})

    directory_number_hunting_agent_user_id_list: Optional[
        Nillable[ReplacementUserIdList]
    ] = field(default=None, metadata={"alias": "directoryNumberHuntingAgentUserIdList"})

    directory_number_hunting_use_terminate_call_to_agent_first: Optional[bool] = field(
        default=None,
        metadata={"alias": "directoryNumberHuntingUseTerminateCallToAgentFirst"},
    )

    directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls: Optional[
        bool
    ] = field(
        default=None,
        metadata={
            "alias": "directoryNumberHuntingUseOriginalAgentServicesForBusyAndNoAnswerCalls"
        },
    )

    def __post_init__(self):
        nillable_fields = [
            "forward_to_phone_number",
            "agent_user_id_list",
            "agent_weight_list",
            "not_reachable_forward_to_phone_number",
            "service_list",
            "directory_number_hunting_agent_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: OCIResponse

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

Bases: OCIResponse

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

Bases: OCIResponse

Source 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 GroupHuntGroupConsolidatedModifyInstanceRequest

client = Client()

command = GroupHuntGroupConsolidatedModifyInstanceRequest(
    service_user_id=...,
    unassign_phone_numbers=...,
    add_phone_number_to_group=...,
    service_instance_profile=...,
    policy=...,
    hunt_after_no_answer=...,
    no_answer_number_of_rings=...,
    forward_after_timeout=...,
    forward_timeout_seconds=...,
    forward_to_phone_number=...,
    agent_user_id_list=...,
    agent_weight_list=...,
    allow_call_waiting_for_agents=...,
    use_system_hunt_group_clid_setting=...,
    include_hunt_group_name_in_clid=...,
    enable_not_reachable_forwarding=...,
    not_reachable_forward_to_phone_number=...,
    make_busy_when_not_reachable=...,
    allow_members_to_control_group_busy=...,
    enable_group_busy=...,
    apply_group_busy_when_terminating_to_agent=...,
    network_class_of_service=...,
    service_list=...,
    is_active=...,
    directory_number_hunting_agent_user_id_list=...,
    directory_number_hunting_use_terminate_call_to_agent_first=...,
    directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("GroupHuntGroupConsolidatedModifyInstanceRequest",
    service_user_id=...,
    unassign_phone_numbers=...,
    add_phone_number_to_group=...,
    service_instance_profile=...,
    policy=...,
    hunt_after_no_answer=...,
    no_answer_number_of_rings=...,
    forward_after_timeout=...,
    forward_timeout_seconds=...,
    forward_to_phone_number=...,
    agent_user_id_list=...,
    agent_weight_list=...,
    allow_call_waiting_for_agents=...,
    use_system_hunt_group_clid_setting=...,
    include_hunt_group_name_in_clid=...,
    enable_not_reachable_forwarding=...,
    not_reachable_forward_to_phone_number=...,
    make_busy_when_not_reachable=...,
    allow_members_to_control_group_busy=...,
    enable_group_busy=...,
    apply_group_busy_when_terminating_to_agent=...,
    network_class_of_service=...,
    service_list=...,
    is_active=...,
    directory_number_hunting_agent_user_id_list=...,
    directory_number_hunting_use_terminate_call_to_agent_first=...,
    directory_number_hunting_use_original_agent_services_for_busy_and_no_answer_calls=...,
)

print(response)