GroupDepartmentGetAvailableParentListRequest
Bases: OCIRequest
Get a list of departments that could be the parent department of the specified department. The department itself and all its descendents are not eligible to be the parent department. If the group belongs to an enterprise, it also returns the departments defined in the enterprise it belongs to. The response is either GroupDepartmentGetAvailableParentListResponse or ErrorResponse.
Attributes:
service_provider_id (str):
group_id (str):
department_name (str):
Source code in src/mercury_ocip/commands/commands.py
| @dataclass(kw_only=True)
class GroupDepartmentGetAvailableParentListRequest(OCIRequest):
"""Get a list of departments that could be the parent department of the specified
department. The department itself and all its descendents are not eligible to be
the parent department. If the group belongs to an enterprise, it also returns the
departments defined in the enterprise it belongs to.
The response is either GroupDepartmentGetAvailableParentListResponse or ErrorResponse.
Attributes:
service_provider_id (str):
group_id (str):
department_name (str):
"""
service_provider_id: str = field(metadata={"alias": "serviceProviderId"})
group_id: str = field(metadata={"alias": "groupId"})
department_name: str = field(metadata={"alias": "departmentName"})
|
Responses
Bases: OCIDataResponse
Response to GroupDepartmentGetAvailableParentListRequest. The response includes two parallel arrays of department keys and department display names.
Attributes:
department_key (Optional[List[DepartmentKey]]):
full_path_name (Optional[List[str]]):
Source code in src/mercury_ocip/commands/commands.py
| @dataclass(kw_only=True)
class GroupDepartmentGetAvailableParentListResponse(OCIDataResponse):
"""Response to GroupDepartmentGetAvailableParentListRequest.
The response includes two parallel arrays of department keys and department display names.
Attributes:
department_key (Optional[List[DepartmentKey]]):
full_path_name (Optional[List[str]]):
"""
department_key: Optional[List[DepartmentKey]] = field(
default=None, metadata={"alias": "departmentKey"}
)
full_path_name: Optional[List[str]] = field(
default=None, metadata={"alias": "fullPathName"}
)
|
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 GroupDepartmentGetAvailableParentListRequest
client = Client()
command = GroupDepartmentGetAvailableParentListRequest(
service_provider_id=...,
group_id=...,
department_name=...,
)
response = client.command(command)
print(response)
Example 2 with Raw Command
from mercury_ocip.client import Client
client = Client()
response = client.raw_command("GroupDepartmentGetAvailableParentListRequest",
service_provider_id=...,
group_id=...,
department_name=...,
)
print(response)