Skip to content

GroupDepartmentAdminAddRequest

Bases: OCIRequest

Add a department administrator to a group department. The response is either a SuccessResponse or an ErrorResponse.

Attributes:

department_key (GroupDepartmentKey):

user_id (str):

first_name (Optional[str]):

last_name (Optional[str]):

password (Optional[str]):

language (Optional[str]):
Source code in src/mercury_ocip_fast/commands/commands.py
@dataclass(kw_only=True)
class GroupDepartmentAdminAddRequest(OCIRequest):
    """Add a department administrator to a group department.
        The response is either a SuccessResponse or an ErrorResponse.

    Attributes:

        department_key (GroupDepartmentKey):

        user_id (str):

        first_name (Optional[str]):

        last_name (Optional[str]):

        password (Optional[str]):

        language (Optional[str]):

    """

    department_key: GroupDepartmentKey = field(metadata={"alias": "departmentKey"})

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

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

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

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

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

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 GroupDepartmentAdminAddRequest

client = Client()

command = GroupDepartmentAdminAddRequest(
    department_key=...,
    user_id=...,
    first_name=...,
    last_name=...,
    password=...,
    language=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip_fast.client import Client

client = Client()

response = client.raw_command("GroupDepartmentAdminAddRequest",
    department_key=...,
    user_id=...,
    first_name=...,
    last_name=...,
    password=...,
    language=...,
)

print(response)