Skip to content

Commit 58e10dd

Browse files
Generate authorization
1 parent fe1b6ed commit 58e10dd

File tree

6 files changed

+1
-481
lines changed

6 files changed

+1
-481
lines changed

services/authorization/oas_commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cfcfc32bc1ae335acecd7bf7ffb60354fdc565ab

services/authorization/src/stackit/authorization/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@
3131
"AddCustomRoleResponse",
3232
"AddMembersPayload",
3333
"AddRolePayload",
34-
"AssignableSubject",
3534
"DeleteRoleResponse",
3635
"ErrorResponse",
3736
"ExistingPermission",
3837
"GetRoleResponse",
39-
"ListAssignableSubjectsResponse",
4038
"ListMembersResponse",
4139
"ListPermissionsResponse",
4240
"ListUserMembershipsResponse",
@@ -79,9 +77,6 @@
7977
from stackit.authorization.models.add_role_payload import (
8078
AddRolePayload as AddRolePayload,
8179
)
82-
from stackit.authorization.models.assignable_subject import (
83-
AssignableSubject as AssignableSubject,
84-
)
8580
from stackit.authorization.models.delete_role_response import (
8681
DeleteRoleResponse as DeleteRoleResponse,
8782
)
@@ -92,9 +87,6 @@
9287
from stackit.authorization.models.get_role_response import (
9388
GetRoleResponse as GetRoleResponse,
9489
)
95-
from stackit.authorization.models.list_assignable_subjects_response import (
96-
ListAssignableSubjectsResponse as ListAssignableSubjectsResponse,
97-
)
9890
from stackit.authorization.models.list_members_response import (
9991
ListMembersResponse as ListMembersResponse,
10092
)

services/authorization/src/stackit/authorization/api/default_api.py

Lines changed: 0 additions & 270 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
from stackit.authorization.models.add_role_payload import AddRolePayload
2525
from stackit.authorization.models.delete_role_response import DeleteRoleResponse
2626
from stackit.authorization.models.get_role_response import GetRoleResponse
27-
from stackit.authorization.models.list_assignable_subjects_response import (
28-
ListAssignableSubjectsResponse,
29-
)
3027
from stackit.authorization.models.list_members_response import ListMembersResponse
3128
from stackit.authorization.models.list_permissions_response import (
3229
ListPermissionsResponse,
@@ -871,273 +868,6 @@ def _delete_role_serialize(
871868
_request_auth=_request_auth,
872869
)
873870

874-
@validate_call
875-
def get_assignable_subjects(
876-
self,
877-
resource_type: StrictStr,
878-
resource_id: StrictStr,
879-
subject: Optional[StrictStr] = None,
880-
_request_timeout: Union[
881-
None,
882-
Annotated[StrictFloat, Field(gt=0)],
883-
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
884-
] = None,
885-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
886-
_content_type: Optional[StrictStr] = None,
887-
_headers: Optional[Dict[StrictStr, Any]] = None,
888-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
889-
) -> ListAssignableSubjectsResponse:
890-
"""Get subjects assignable to a resource
891-
892-
BFF endpoint for portal. List subjects assignable to a given resource.
893-
894-
:param resource_type: (required)
895-
:type resource_type: str
896-
:param resource_id: (required)
897-
:type resource_id: str
898-
:param subject:
899-
:type subject: str
900-
:param _request_timeout: timeout setting for this request. If one
901-
number provided, it will be total request
902-
timeout. It can also be a pair (tuple) of
903-
(connection, read) timeouts.
904-
:type _request_timeout: int, tuple(int, int), optional
905-
:param _request_auth: set to override the auth_settings for an a single
906-
request; this effectively ignores the
907-
authentication in the spec for a single request.
908-
:type _request_auth: dict, optional
909-
:param _content_type: force content-type for the request.
910-
:type _content_type: str, Optional
911-
:param _headers: set to override the headers for a single
912-
request; this effectively ignores the headers
913-
in the spec for a single request.
914-
:type _headers: dict, optional
915-
:param _host_index: set to override the host_index for a single
916-
request; this effectively ignores the host_index
917-
in the spec for a single request.
918-
:type _host_index: int, optional
919-
:return: Returns the result object.
920-
""" # noqa: E501
921-
922-
_param = self._get_assignable_subjects_serialize(
923-
resource_type=resource_type,
924-
resource_id=resource_id,
925-
subject=subject,
926-
_request_auth=_request_auth,
927-
_content_type=_content_type,
928-
_headers=_headers,
929-
_host_index=_host_index,
930-
)
931-
932-
_response_types_map: Dict[str, Optional[str]] = {
933-
"200": "ListAssignableSubjectsResponse",
934-
"400": "ErrorResponse",
935-
"401": "ErrorResponse",
936-
"403": "ErrorResponse",
937-
}
938-
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
939-
response_data.read()
940-
return self.api_client.response_deserialize(
941-
response_data=response_data,
942-
response_types_map=_response_types_map,
943-
).data
944-
945-
@validate_call
946-
def get_assignable_subjects_with_http_info(
947-
self,
948-
resource_type: StrictStr,
949-
resource_id: StrictStr,
950-
subject: Optional[StrictStr] = None,
951-
_request_timeout: Union[
952-
None,
953-
Annotated[StrictFloat, Field(gt=0)],
954-
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
955-
] = None,
956-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
957-
_content_type: Optional[StrictStr] = None,
958-
_headers: Optional[Dict[StrictStr, Any]] = None,
959-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
960-
) -> ApiResponse[ListAssignableSubjectsResponse]:
961-
"""Get subjects assignable to a resource
962-
963-
BFF endpoint for portal. List subjects assignable to a given resource.
964-
965-
:param resource_type: (required)
966-
:type resource_type: str
967-
:param resource_id: (required)
968-
:type resource_id: str
969-
:param subject:
970-
:type subject: str
971-
:param _request_timeout: timeout setting for this request. If one
972-
number provided, it will be total request
973-
timeout. It can also be a pair (tuple) of
974-
(connection, read) timeouts.
975-
:type _request_timeout: int, tuple(int, int), optional
976-
:param _request_auth: set to override the auth_settings for an a single
977-
request; this effectively ignores the
978-
authentication in the spec for a single request.
979-
:type _request_auth: dict, optional
980-
:param _content_type: force content-type for the request.
981-
:type _content_type: str, Optional
982-
:param _headers: set to override the headers for a single
983-
request; this effectively ignores the headers
984-
in the spec for a single request.
985-
:type _headers: dict, optional
986-
:param _host_index: set to override the host_index for a single
987-
request; this effectively ignores the host_index
988-
in the spec for a single request.
989-
:type _host_index: int, optional
990-
:return: Returns the result object.
991-
""" # noqa: E501
992-
993-
_param = self._get_assignable_subjects_serialize(
994-
resource_type=resource_type,
995-
resource_id=resource_id,
996-
subject=subject,
997-
_request_auth=_request_auth,
998-
_content_type=_content_type,
999-
_headers=_headers,
1000-
_host_index=_host_index,
1001-
)
1002-
1003-
_response_types_map: Dict[str, Optional[str]] = {
1004-
"200": "ListAssignableSubjectsResponse",
1005-
"400": "ErrorResponse",
1006-
"401": "ErrorResponse",
1007-
"403": "ErrorResponse",
1008-
}
1009-
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1010-
response_data.read()
1011-
return self.api_client.response_deserialize(
1012-
response_data=response_data,
1013-
response_types_map=_response_types_map,
1014-
)
1015-
1016-
@validate_call
1017-
def get_assignable_subjects_without_preload_content(
1018-
self,
1019-
resource_type: StrictStr,
1020-
resource_id: StrictStr,
1021-
subject: Optional[StrictStr] = None,
1022-
_request_timeout: Union[
1023-
None,
1024-
Annotated[StrictFloat, Field(gt=0)],
1025-
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1026-
] = None,
1027-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1028-
_content_type: Optional[StrictStr] = None,
1029-
_headers: Optional[Dict[StrictStr, Any]] = None,
1030-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1031-
) -> RESTResponseType:
1032-
"""Get subjects assignable to a resource
1033-
1034-
BFF endpoint for portal. List subjects assignable to a given resource.
1035-
1036-
:param resource_type: (required)
1037-
:type resource_type: str
1038-
:param resource_id: (required)
1039-
:type resource_id: str
1040-
:param subject:
1041-
:type subject: str
1042-
:param _request_timeout: timeout setting for this request. If one
1043-
number provided, it will be total request
1044-
timeout. It can also be a pair (tuple) of
1045-
(connection, read) timeouts.
1046-
:type _request_timeout: int, tuple(int, int), optional
1047-
:param _request_auth: set to override the auth_settings for an a single
1048-
request; this effectively ignores the
1049-
authentication in the spec for a single request.
1050-
:type _request_auth: dict, optional
1051-
:param _content_type: force content-type for the request.
1052-
:type _content_type: str, Optional
1053-
:param _headers: set to override the headers for a single
1054-
request; this effectively ignores the headers
1055-
in the spec for a single request.
1056-
:type _headers: dict, optional
1057-
:param _host_index: set to override the host_index for a single
1058-
request; this effectively ignores the host_index
1059-
in the spec for a single request.
1060-
:type _host_index: int, optional
1061-
:return: Returns the result object.
1062-
""" # noqa: E501
1063-
1064-
_param = self._get_assignable_subjects_serialize(
1065-
resource_type=resource_type,
1066-
resource_id=resource_id,
1067-
subject=subject,
1068-
_request_auth=_request_auth,
1069-
_content_type=_content_type,
1070-
_headers=_headers,
1071-
_host_index=_host_index,
1072-
)
1073-
1074-
_response_types_map: Dict[str, Optional[str]] = {
1075-
"200": "ListAssignableSubjectsResponse",
1076-
"400": "ErrorResponse",
1077-
"401": "ErrorResponse",
1078-
"403": "ErrorResponse",
1079-
}
1080-
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1081-
return response_data.response
1082-
1083-
def _get_assignable_subjects_serialize(
1084-
self,
1085-
resource_type,
1086-
resource_id,
1087-
subject,
1088-
_request_auth,
1089-
_content_type,
1090-
_headers,
1091-
_host_index,
1092-
) -> RequestSerialized:
1093-
1094-
_host = None
1095-
1096-
_collection_formats: Dict[str, str] = {}
1097-
1098-
_path_params: Dict[str, str] = {}
1099-
_query_params: List[Tuple[str, str]] = []
1100-
_header_params: Dict[str, Optional[str]] = _headers or {}
1101-
_form_params: List[Tuple[str, str]] = []
1102-
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1103-
_body_params: Optional[bytes] = None
1104-
1105-
# process the path parameters
1106-
if resource_type is not None:
1107-
_path_params["resourceType"] = resource_type
1108-
if resource_id is not None:
1109-
_path_params["resourceId"] = resource_id
1110-
# process the query parameters
1111-
if subject is not None:
1112-
1113-
_query_params.append(("subject", subject))
1114-
1115-
# process the header parameters
1116-
# process the form parameters
1117-
# process the body parameter
1118-
1119-
# set the HTTP header `Accept`
1120-
if "Accept" not in _header_params:
1121-
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1122-
1123-
# authentication setting
1124-
_auth_settings: List[str] = []
1125-
1126-
return self.api_client.param_serialize(
1127-
method="GET",
1128-
resource_path="/v2/bff/{resourceType}/{resourceId}/assignableSubjects",
1129-
path_params=_path_params,
1130-
query_params=_query_params,
1131-
header_params=_header_params,
1132-
body=_body_params,
1133-
post_params=_form_params,
1134-
files=_files,
1135-
auth_settings=_auth_settings,
1136-
collection_formats=_collection_formats,
1137-
_host=_host,
1138-
_request_auth=_request_auth,
1139-
)
1140-
1141871
@validate_call
1142872
def get_role(
1143873
self,

services/authorization/src/stackit/authorization/models/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
from stackit.authorization.models.add_custom_role_response import AddCustomRoleResponse
1818
from stackit.authorization.models.add_members_payload import AddMembersPayload
1919
from stackit.authorization.models.add_role_payload import AddRolePayload
20-
from stackit.authorization.models.assignable_subject import AssignableSubject
2120
from stackit.authorization.models.delete_role_response import DeleteRoleResponse
2221
from stackit.authorization.models.error_response import ErrorResponse
2322
from stackit.authorization.models.existing_permission import ExistingPermission
2423
from stackit.authorization.models.get_role_response import GetRoleResponse
25-
from stackit.authorization.models.list_assignable_subjects_response import (
26-
ListAssignableSubjectsResponse,
27-
)
2824
from stackit.authorization.models.list_members_response import ListMembersResponse
2925
from stackit.authorization.models.list_permissions_response import (
3026
ListPermissionsResponse,

0 commit comments

Comments
 (0)