Skip to content

ServiceProviderCommunicationBarringProfileModifyDefaultRequest

Bases: OCIRequest

Modifies the default Communication Barring Profile of a Service Provider. If a default has been previously selected, this command will swap the default profile with the profile provided. Selecting a nil profile will cause the service provider to not have a default Communicaton Barring Profile. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

service_provider_id (str):

name (Nillable[str]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class ServiceProviderCommunicationBarringProfileModifyDefaultRequest(OCIRequest):
    """Modifies the default Communication Barring Profile of a Service Provider.  If a default has been previously selected, this command will swap the default profile with the profile provided.  Selecting a nil profile will cause the service provider to not have a default Communicaton Barring Profile.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        service_provider_id (str):

        name (Nillable[str]):

    """

    service_provider_id: str = field(metadata={"alias": "serviceProviderId"})

    name: Nillable[str] = field(metadata={"alias": "name"})

    def __post_init__(self):
        nillable_fields = ["name"]
        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 ServiceProviderCommunicationBarringProfileModifyDefaultRequest

client = Client()

command = ServiceProviderCommunicationBarringProfileModifyDefaultRequest(
    service_provider_id=...,
    name=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("ServiceProviderCommunicationBarringProfileModifyDefaultRequest",
    service_provider_id=...,
    name=...,
)

print(response)