|
24 | 24 | from stackit.authorization.models.add_role_payload import AddRolePayload |
25 | 25 | from stackit.authorization.models.delete_role_response import DeleteRoleResponse |
26 | 26 | from stackit.authorization.models.get_role_response import GetRoleResponse |
27 | | -from stackit.authorization.models.list_assignable_subjects_response import ( |
28 | | - ListAssignableSubjectsResponse, |
29 | | -) |
30 | 27 | from stackit.authorization.models.list_members_response import ListMembersResponse |
31 | 28 | from stackit.authorization.models.list_permissions_response import ( |
32 | 29 | ListPermissionsResponse, |
@@ -871,273 +868,6 @@ def _delete_role_serialize( |
871 | 868 | _request_auth=_request_auth, |
872 | 869 | ) |
873 | 870 |
|
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 | | - |
1141 | 871 | @validate_call |
1142 | 872 | def get_role( |
1143 | 873 | self, |
|
0 commit comments