across-server-openapi-python 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- across/__init__.py +0 -0
- across/sdk/__init__.py +0 -0
- across/sdk/v1/__init__.py +251 -0
- across/sdk/v1/abstract_credential_storage.py +16 -0
- across/sdk/v1/api/__init__.py +20 -0
- across/sdk/v1/api/auth_api.py +1097 -0
- across/sdk/v1/api/filter_api.py +623 -0
- across/sdk/v1/api/group_api.py +586 -0
- across/sdk/v1/api/group_invite_api.py +1165 -0
- across/sdk/v1/api/group_role_api.py +2070 -0
- across/sdk/v1/api/instrument_api.py +633 -0
- across/sdk/v1/api/internal_api.py +571 -0
- across/sdk/v1/api/observation_api.py +940 -0
- across/sdk/v1/api/observatory_api.py +670 -0
- across/sdk/v1/api/permission_api.py +285 -0
- across/sdk/v1/api/role_api.py +552 -0
- across/sdk/v1/api/schedule_api.py +1914 -0
- across/sdk/v1/api/service_account_api.py +2353 -0
- across/sdk/v1/api/telescope_api.py +667 -0
- across/sdk/v1/api/tle_api.py +317 -0
- across/sdk/v1/api/tools_api.py +812 -0
- across/sdk/v1/api/user_api.py +2263 -0
- across/sdk/v1/api_client.py +801 -0
- across/sdk/v1/api_client_wrapper.py +239 -0
- across/sdk/v1/api_response.py +21 -0
- across/sdk/v1/configuration.py +605 -0
- across/sdk/v1/exceptions.py +216 -0
- across/sdk/v1/models/__init__.py +103 -0
- across/sdk/v1/models/access_token_response.py +89 -0
- across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +104 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +124 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +106 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +95 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +105 -0
- across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +96 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account.py +90 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account_secret.py +92 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +101 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +135 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account_secret.py +118 -0
- across/sdk/v1/models/alt_az_constraint.py +130 -0
- across/sdk/v1/models/bandpass.py +149 -0
- across/sdk/v1/models/bandpass_type.py +155 -0
- across/sdk/v1/models/constrained_date.py +93 -0
- across/sdk/v1/models/constraint_reason.py +89 -0
- across/sdk/v1/models/constraint_type.py +43 -0
- across/sdk/v1/models/coordinate.py +100 -0
- across/sdk/v1/models/date_range.py +90 -0
- across/sdk/v1/models/depth_unit.py +39 -0
- across/sdk/v1/models/earth_limb_constraint.py +124 -0
- across/sdk/v1/models/energy_bandpass.py +121 -0
- across/sdk/v1/models/energy_unit.py +40 -0
- across/sdk/v1/models/ephemeris_type.py +39 -0
- across/sdk/v1/models/filter.py +135 -0
- across/sdk/v1/models/frequency_bandpass.py +121 -0
- across/sdk/v1/models/frequency_unit.py +40 -0
- across/sdk/v1/models/grant_type.py +37 -0
- across/sdk/v1/models/ground_parameters.py +91 -0
- across/sdk/v1/models/group_invite_create.py +87 -0
- across/sdk/v1/models/group_invite_group_details.py +94 -0
- across/sdk/v1/models/group_read.py +91 -0
- across/sdk/v1/models/group_role_create.py +89 -0
- across/sdk/v1/models/group_role_read.py +99 -0
- across/sdk/v1/models/http_validation_error.py +95 -0
- across/sdk/v1/models/id_name_schema.py +96 -0
- across/sdk/v1/models/instrument.py +163 -0
- across/sdk/v1/models/instrument_constraints_inner.py +237 -0
- across/sdk/v1/models/ivoa_obs_category.py +39 -0
- across/sdk/v1/models/ivoa_obs_tracking_type.py +38 -0
- across/sdk/v1/models/jpl_parameters.py +87 -0
- across/sdk/v1/models/moon_angle_constraint.py +124 -0
- across/sdk/v1/models/nullable_date_range.py +100 -0
- across/sdk/v1/models/observation.py +248 -0
- across/sdk/v1/models/observation_create.py +249 -0
- across/sdk/v1/models/observation_status.py +40 -0
- across/sdk/v1/models/observation_type.py +39 -0
- across/sdk/v1/models/observatory.py +145 -0
- across/sdk/v1/models/observatory_ephemeris_type.py +96 -0
- across/sdk/v1/models/observatory_type.py +37 -0
- across/sdk/v1/models/page_observation.py +116 -0
- across/sdk/v1/models/page_schedule.py +116 -0
- across/sdk/v1/models/parameters.py +164 -0
- across/sdk/v1/models/permission.py +89 -0
- across/sdk/v1/models/point.py +89 -0
- across/sdk/v1/models/role.py +100 -0
- across/sdk/v1/models/role_base.py +89 -0
- across/sdk/v1/models/saa_polygon_constraint.py +101 -0
- across/sdk/v1/models/schedule.py +144 -0
- across/sdk/v1/models/schedule_cadence.py +99 -0
- across/sdk/v1/models/schedule_create.py +123 -0
- across/sdk/v1/models/schedule_create_many.py +97 -0
- across/sdk/v1/models/schedule_fidelity.py +37 -0
- across/sdk/v1/models/schedule_status.py +38 -0
- across/sdk/v1/models/service_account_create.py +101 -0
- across/sdk/v1/models/service_account_secret.py +103 -0
- across/sdk/v1/models/service_account_update.py +106 -0
- across/sdk/v1/models/spice_parameters.py +89 -0
- across/sdk/v1/models/sun_angle_constraint.py +124 -0
- across/sdk/v1/models/system_service_account.py +121 -0
- across/sdk/v1/models/system_service_account_secret.py +123 -0
- across/sdk/v1/models/telescope.py +135 -0
- across/sdk/v1/models/telescope_instrument.py +163 -0
- across/sdk/v1/models/tle.py +99 -0
- across/sdk/v1/models/tle_create.py +94 -0
- across/sdk/v1/models/tle_parameters.py +89 -0
- across/sdk/v1/models/unit_value.py +94 -0
- across/sdk/v1/models/user_create.py +93 -0
- across/sdk/v1/models/user_info.py +95 -0
- across/sdk/v1/models/user_update.py +106 -0
- across/sdk/v1/models/validation_error.py +99 -0
- across/sdk/v1/models/validation_error_loc_inner.py +138 -0
- across/sdk/v1/models/visibility_result.py +97 -0
- across/sdk/v1/models/visibility_type.py +38 -0
- across/sdk/v1/models/visibility_window.py +99 -0
- across/sdk/v1/models/wavelength_bandpass.py +142 -0
- across/sdk/v1/models/wavelength_unit.py +39 -0
- across/sdk/v1/models/window.py +96 -0
- across/sdk/v1/py.typed +0 -0
- across/sdk/v1/rest.py +258 -0
- across_server_openapi_python-0.0.1.dist-info/METADATA +326 -0
- across_server_openapi_python-0.0.1.dist-info/RECORD +128 -0
- across_server_openapi_python-0.0.1.dist-info/WHEEL +5 -0
- across_server_openapi_python-0.0.1.dist-info/licenses/LICENSE +42 -0
- across_server_openapi_python-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2070 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ACROSS Server
|
|
5
|
+
|
|
6
|
+
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.3.2
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictStr
|
|
20
|
+
from typing import List
|
|
21
|
+
from across.sdk.v1.models.across_server_routes_v1_group_role_schemas_group_role import AcrossServerRoutesV1GroupRoleSchemasGroupRole
|
|
22
|
+
from across.sdk.v1.models.group_role_create import GroupRoleCreate
|
|
23
|
+
from across.sdk.v1.models.group_role_read import GroupRoleRead
|
|
24
|
+
|
|
25
|
+
from across.sdk.v1.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from across.sdk.v1.api_response import ApiResponse
|
|
27
|
+
from across.sdk.v1.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class GroupRoleApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def assign_to_user(
|
|
45
|
+
self,
|
|
46
|
+
group_role_id: StrictStr,
|
|
47
|
+
group_id: StrictStr,
|
|
48
|
+
user_id: StrictStr,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> None:
|
|
62
|
+
"""Assign a group role to a user
|
|
63
|
+
|
|
64
|
+
Assign a group role by id to a user id within that group.
|
|
65
|
+
|
|
66
|
+
:param group_role_id: (required)
|
|
67
|
+
:type group_role_id: str
|
|
68
|
+
:param group_id: (required)
|
|
69
|
+
:type group_id: str
|
|
70
|
+
:param user_id: (required)
|
|
71
|
+
:type user_id: str
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._assign_to_user_serialize(
|
|
95
|
+
group_role_id=group_role_id,
|
|
96
|
+
group_id=group_id,
|
|
97
|
+
user_id=user_id,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'204': None,
|
|
106
|
+
'404': None,
|
|
107
|
+
'422': "HTTPValidationError",
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def assign_to_user_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
group_role_id: StrictStr,
|
|
124
|
+
group_id: StrictStr,
|
|
125
|
+
user_id: StrictStr,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[None]:
|
|
139
|
+
"""Assign a group role to a user
|
|
140
|
+
|
|
141
|
+
Assign a group role by id to a user id within that group.
|
|
142
|
+
|
|
143
|
+
:param group_role_id: (required)
|
|
144
|
+
:type group_role_id: str
|
|
145
|
+
:param group_id: (required)
|
|
146
|
+
:type group_id: str
|
|
147
|
+
:param user_id: (required)
|
|
148
|
+
:type user_id: str
|
|
149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
+
number provided, it will be total request
|
|
151
|
+
timeout. It can also be a pair (tuple) of
|
|
152
|
+
(connection, read) timeouts.
|
|
153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the
|
|
156
|
+
authentication in the spec for a single request.
|
|
157
|
+
:type _request_auth: dict, optional
|
|
158
|
+
:param _content_type: force content-type for the request.
|
|
159
|
+
:type _content_type: str, Optional
|
|
160
|
+
:param _headers: set to override the headers for a single
|
|
161
|
+
request; this effectively ignores the headers
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _headers: dict, optional
|
|
164
|
+
:param _host_index: set to override the host_index for a single
|
|
165
|
+
request; this effectively ignores the host_index
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _host_index: int, optional
|
|
168
|
+
:return: Returns the result object.
|
|
169
|
+
""" # noqa: E501
|
|
170
|
+
|
|
171
|
+
_param = self._assign_to_user_serialize(
|
|
172
|
+
group_role_id=group_role_id,
|
|
173
|
+
group_id=group_id,
|
|
174
|
+
user_id=user_id,
|
|
175
|
+
_request_auth=_request_auth,
|
|
176
|
+
_content_type=_content_type,
|
|
177
|
+
_headers=_headers,
|
|
178
|
+
_host_index=_host_index
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
182
|
+
'204': None,
|
|
183
|
+
'404': None,
|
|
184
|
+
'422': "HTTPValidationError",
|
|
185
|
+
}
|
|
186
|
+
response_data = self.api_client.call_api(
|
|
187
|
+
*_param,
|
|
188
|
+
_request_timeout=_request_timeout
|
|
189
|
+
)
|
|
190
|
+
response_data.read()
|
|
191
|
+
return self.api_client.response_deserialize(
|
|
192
|
+
response_data=response_data,
|
|
193
|
+
response_types_map=_response_types_map,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
@validate_call
|
|
198
|
+
def assign_to_user_without_preload_content(
|
|
199
|
+
self,
|
|
200
|
+
group_role_id: StrictStr,
|
|
201
|
+
group_id: StrictStr,
|
|
202
|
+
user_id: StrictStr,
|
|
203
|
+
_request_timeout: Union[
|
|
204
|
+
None,
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
206
|
+
Tuple[
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
209
|
+
]
|
|
210
|
+
] = None,
|
|
211
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
212
|
+
_content_type: Optional[StrictStr] = None,
|
|
213
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
214
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
215
|
+
) -> RESTResponseType:
|
|
216
|
+
"""Assign a group role to a user
|
|
217
|
+
|
|
218
|
+
Assign a group role by id to a user id within that group.
|
|
219
|
+
|
|
220
|
+
:param group_role_id: (required)
|
|
221
|
+
:type group_role_id: str
|
|
222
|
+
:param group_id: (required)
|
|
223
|
+
:type group_id: str
|
|
224
|
+
:param user_id: (required)
|
|
225
|
+
:type user_id: str
|
|
226
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
227
|
+
number provided, it will be total request
|
|
228
|
+
timeout. It can also be a pair (tuple) of
|
|
229
|
+
(connection, read) timeouts.
|
|
230
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
231
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
232
|
+
request; this effectively ignores the
|
|
233
|
+
authentication in the spec for a single request.
|
|
234
|
+
:type _request_auth: dict, optional
|
|
235
|
+
:param _content_type: force content-type for the request.
|
|
236
|
+
:type _content_type: str, Optional
|
|
237
|
+
:param _headers: set to override the headers for a single
|
|
238
|
+
request; this effectively ignores the headers
|
|
239
|
+
in the spec for a single request.
|
|
240
|
+
:type _headers: dict, optional
|
|
241
|
+
:param _host_index: set to override the host_index for a single
|
|
242
|
+
request; this effectively ignores the host_index
|
|
243
|
+
in the spec for a single request.
|
|
244
|
+
:type _host_index: int, optional
|
|
245
|
+
:return: Returns the result object.
|
|
246
|
+
""" # noqa: E501
|
|
247
|
+
|
|
248
|
+
_param = self._assign_to_user_serialize(
|
|
249
|
+
group_role_id=group_role_id,
|
|
250
|
+
group_id=group_id,
|
|
251
|
+
user_id=user_id,
|
|
252
|
+
_request_auth=_request_auth,
|
|
253
|
+
_content_type=_content_type,
|
|
254
|
+
_headers=_headers,
|
|
255
|
+
_host_index=_host_index
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
259
|
+
'204': None,
|
|
260
|
+
'404': None,
|
|
261
|
+
'422': "HTTPValidationError",
|
|
262
|
+
}
|
|
263
|
+
response_data = self.api_client.call_api(
|
|
264
|
+
*_param,
|
|
265
|
+
_request_timeout=_request_timeout
|
|
266
|
+
)
|
|
267
|
+
return response_data.response
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _assign_to_user_serialize(
|
|
271
|
+
self,
|
|
272
|
+
group_role_id,
|
|
273
|
+
group_id,
|
|
274
|
+
user_id,
|
|
275
|
+
_request_auth,
|
|
276
|
+
_content_type,
|
|
277
|
+
_headers,
|
|
278
|
+
_host_index,
|
|
279
|
+
) -> RequestSerialized:
|
|
280
|
+
|
|
281
|
+
_host = None
|
|
282
|
+
|
|
283
|
+
_collection_formats: Dict[str, str] = {
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
_path_params: Dict[str, str] = {}
|
|
287
|
+
_query_params: List[Tuple[str, str]] = []
|
|
288
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
289
|
+
_form_params: List[Tuple[str, str]] = []
|
|
290
|
+
_files: Dict[
|
|
291
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
292
|
+
] = {}
|
|
293
|
+
_body_params: Optional[bytes] = None
|
|
294
|
+
|
|
295
|
+
# process the path parameters
|
|
296
|
+
if group_role_id is not None:
|
|
297
|
+
_path_params['group_role_id'] = group_role_id
|
|
298
|
+
if group_id is not None:
|
|
299
|
+
_path_params['group_id'] = group_id
|
|
300
|
+
if user_id is not None:
|
|
301
|
+
_path_params['user_id'] = user_id
|
|
302
|
+
# process the query parameters
|
|
303
|
+
# process the header parameters
|
|
304
|
+
# process the form parameters
|
|
305
|
+
# process the body parameter
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# set the HTTP header `Accept`
|
|
309
|
+
if 'Accept' not in _header_params:
|
|
310
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
311
|
+
[
|
|
312
|
+
'application/json'
|
|
313
|
+
]
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
# authentication setting
|
|
318
|
+
_auth_settings: List[str] = [
|
|
319
|
+
'Authorization'
|
|
320
|
+
]
|
|
321
|
+
|
|
322
|
+
return self.api_client.param_serialize(
|
|
323
|
+
method='PUT',
|
|
324
|
+
resource_path='/group/{group_id}/user/{user_id}/role/{group_role_id}',
|
|
325
|
+
path_params=_path_params,
|
|
326
|
+
query_params=_query_params,
|
|
327
|
+
header_params=_header_params,
|
|
328
|
+
body=_body_params,
|
|
329
|
+
post_params=_form_params,
|
|
330
|
+
files=_files,
|
|
331
|
+
auth_settings=_auth_settings,
|
|
332
|
+
collection_formats=_collection_formats,
|
|
333
|
+
_host=_host,
|
|
334
|
+
_request_auth=_request_auth
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
@validate_call
|
|
341
|
+
def create_group_role(
|
|
342
|
+
self,
|
|
343
|
+
group_id: StrictStr,
|
|
344
|
+
group_role_create: GroupRoleCreate,
|
|
345
|
+
_request_timeout: Union[
|
|
346
|
+
None,
|
|
347
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
348
|
+
Tuple[
|
|
349
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
350
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
351
|
+
]
|
|
352
|
+
] = None,
|
|
353
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
354
|
+
_content_type: Optional[StrictStr] = None,
|
|
355
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
356
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
357
|
+
) -> GroupRoleRead:
|
|
358
|
+
"""Create a group role
|
|
359
|
+
|
|
360
|
+
Create a group role with a set of permissions in a group that you control
|
|
361
|
+
|
|
362
|
+
:param group_id: (required)
|
|
363
|
+
:type group_id: str
|
|
364
|
+
:param group_role_create: (required)
|
|
365
|
+
:type group_role_create: GroupRoleCreate
|
|
366
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
367
|
+
number provided, it will be total request
|
|
368
|
+
timeout. It can also be a pair (tuple) of
|
|
369
|
+
(connection, read) timeouts.
|
|
370
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
371
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
372
|
+
request; this effectively ignores the
|
|
373
|
+
authentication in the spec for a single request.
|
|
374
|
+
:type _request_auth: dict, optional
|
|
375
|
+
:param _content_type: force content-type for the request.
|
|
376
|
+
:type _content_type: str, Optional
|
|
377
|
+
:param _headers: set to override the headers for a single
|
|
378
|
+
request; this effectively ignores the headers
|
|
379
|
+
in the spec for a single request.
|
|
380
|
+
:type _headers: dict, optional
|
|
381
|
+
:param _host_index: set to override the host_index for a single
|
|
382
|
+
request; this effectively ignores the host_index
|
|
383
|
+
in the spec for a single request.
|
|
384
|
+
:type _host_index: int, optional
|
|
385
|
+
:return: Returns the result object.
|
|
386
|
+
""" # noqa: E501
|
|
387
|
+
|
|
388
|
+
_param = self._create_group_role_serialize(
|
|
389
|
+
group_id=group_id,
|
|
390
|
+
group_role_create=group_role_create,
|
|
391
|
+
_request_auth=_request_auth,
|
|
392
|
+
_content_type=_content_type,
|
|
393
|
+
_headers=_headers,
|
|
394
|
+
_host_index=_host_index
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
398
|
+
'201': "GroupRoleRead",
|
|
399
|
+
'404': None,
|
|
400
|
+
'422': "HTTPValidationError",
|
|
401
|
+
}
|
|
402
|
+
response_data = self.api_client.call_api(
|
|
403
|
+
*_param,
|
|
404
|
+
_request_timeout=_request_timeout
|
|
405
|
+
)
|
|
406
|
+
response_data.read()
|
|
407
|
+
return self.api_client.response_deserialize(
|
|
408
|
+
response_data=response_data,
|
|
409
|
+
response_types_map=_response_types_map,
|
|
410
|
+
).data
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
@validate_call
|
|
414
|
+
def create_group_role_with_http_info(
|
|
415
|
+
self,
|
|
416
|
+
group_id: StrictStr,
|
|
417
|
+
group_role_create: GroupRoleCreate,
|
|
418
|
+
_request_timeout: Union[
|
|
419
|
+
None,
|
|
420
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
421
|
+
Tuple[
|
|
422
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
423
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
424
|
+
]
|
|
425
|
+
] = None,
|
|
426
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
427
|
+
_content_type: Optional[StrictStr] = None,
|
|
428
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
429
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
430
|
+
) -> ApiResponse[GroupRoleRead]:
|
|
431
|
+
"""Create a group role
|
|
432
|
+
|
|
433
|
+
Create a group role with a set of permissions in a group that you control
|
|
434
|
+
|
|
435
|
+
:param group_id: (required)
|
|
436
|
+
:type group_id: str
|
|
437
|
+
:param group_role_create: (required)
|
|
438
|
+
:type group_role_create: GroupRoleCreate
|
|
439
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
440
|
+
number provided, it will be total request
|
|
441
|
+
timeout. It can also be a pair (tuple) of
|
|
442
|
+
(connection, read) timeouts.
|
|
443
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
444
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
445
|
+
request; this effectively ignores the
|
|
446
|
+
authentication in the spec for a single request.
|
|
447
|
+
:type _request_auth: dict, optional
|
|
448
|
+
:param _content_type: force content-type for the request.
|
|
449
|
+
:type _content_type: str, Optional
|
|
450
|
+
:param _headers: set to override the headers for a single
|
|
451
|
+
request; this effectively ignores the headers
|
|
452
|
+
in the spec for a single request.
|
|
453
|
+
:type _headers: dict, optional
|
|
454
|
+
:param _host_index: set to override the host_index for a single
|
|
455
|
+
request; this effectively ignores the host_index
|
|
456
|
+
in the spec for a single request.
|
|
457
|
+
:type _host_index: int, optional
|
|
458
|
+
:return: Returns the result object.
|
|
459
|
+
""" # noqa: E501
|
|
460
|
+
|
|
461
|
+
_param = self._create_group_role_serialize(
|
|
462
|
+
group_id=group_id,
|
|
463
|
+
group_role_create=group_role_create,
|
|
464
|
+
_request_auth=_request_auth,
|
|
465
|
+
_content_type=_content_type,
|
|
466
|
+
_headers=_headers,
|
|
467
|
+
_host_index=_host_index
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
471
|
+
'201': "GroupRoleRead",
|
|
472
|
+
'404': None,
|
|
473
|
+
'422': "HTTPValidationError",
|
|
474
|
+
}
|
|
475
|
+
response_data = self.api_client.call_api(
|
|
476
|
+
*_param,
|
|
477
|
+
_request_timeout=_request_timeout
|
|
478
|
+
)
|
|
479
|
+
response_data.read()
|
|
480
|
+
return self.api_client.response_deserialize(
|
|
481
|
+
response_data=response_data,
|
|
482
|
+
response_types_map=_response_types_map,
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
@validate_call
|
|
487
|
+
def create_group_role_without_preload_content(
|
|
488
|
+
self,
|
|
489
|
+
group_id: StrictStr,
|
|
490
|
+
group_role_create: GroupRoleCreate,
|
|
491
|
+
_request_timeout: Union[
|
|
492
|
+
None,
|
|
493
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
494
|
+
Tuple[
|
|
495
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
496
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
497
|
+
]
|
|
498
|
+
] = None,
|
|
499
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
500
|
+
_content_type: Optional[StrictStr] = None,
|
|
501
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
502
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
503
|
+
) -> RESTResponseType:
|
|
504
|
+
"""Create a group role
|
|
505
|
+
|
|
506
|
+
Create a group role with a set of permissions in a group that you control
|
|
507
|
+
|
|
508
|
+
:param group_id: (required)
|
|
509
|
+
:type group_id: str
|
|
510
|
+
:param group_role_create: (required)
|
|
511
|
+
:type group_role_create: GroupRoleCreate
|
|
512
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
513
|
+
number provided, it will be total request
|
|
514
|
+
timeout. It can also be a pair (tuple) of
|
|
515
|
+
(connection, read) timeouts.
|
|
516
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
517
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
518
|
+
request; this effectively ignores the
|
|
519
|
+
authentication in the spec for a single request.
|
|
520
|
+
:type _request_auth: dict, optional
|
|
521
|
+
:param _content_type: force content-type for the request.
|
|
522
|
+
:type _content_type: str, Optional
|
|
523
|
+
:param _headers: set to override the headers for a single
|
|
524
|
+
request; this effectively ignores the headers
|
|
525
|
+
in the spec for a single request.
|
|
526
|
+
:type _headers: dict, optional
|
|
527
|
+
:param _host_index: set to override the host_index for a single
|
|
528
|
+
request; this effectively ignores the host_index
|
|
529
|
+
in the spec for a single request.
|
|
530
|
+
:type _host_index: int, optional
|
|
531
|
+
:return: Returns the result object.
|
|
532
|
+
""" # noqa: E501
|
|
533
|
+
|
|
534
|
+
_param = self._create_group_role_serialize(
|
|
535
|
+
group_id=group_id,
|
|
536
|
+
group_role_create=group_role_create,
|
|
537
|
+
_request_auth=_request_auth,
|
|
538
|
+
_content_type=_content_type,
|
|
539
|
+
_headers=_headers,
|
|
540
|
+
_host_index=_host_index
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
544
|
+
'201': "GroupRoleRead",
|
|
545
|
+
'404': None,
|
|
546
|
+
'422': "HTTPValidationError",
|
|
547
|
+
}
|
|
548
|
+
response_data = self.api_client.call_api(
|
|
549
|
+
*_param,
|
|
550
|
+
_request_timeout=_request_timeout
|
|
551
|
+
)
|
|
552
|
+
return response_data.response
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
def _create_group_role_serialize(
|
|
556
|
+
self,
|
|
557
|
+
group_id,
|
|
558
|
+
group_role_create,
|
|
559
|
+
_request_auth,
|
|
560
|
+
_content_type,
|
|
561
|
+
_headers,
|
|
562
|
+
_host_index,
|
|
563
|
+
) -> RequestSerialized:
|
|
564
|
+
|
|
565
|
+
_host = None
|
|
566
|
+
|
|
567
|
+
_collection_formats: Dict[str, str] = {
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
_path_params: Dict[str, str] = {}
|
|
571
|
+
_query_params: List[Tuple[str, str]] = []
|
|
572
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
573
|
+
_form_params: List[Tuple[str, str]] = []
|
|
574
|
+
_files: Dict[
|
|
575
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
576
|
+
] = {}
|
|
577
|
+
_body_params: Optional[bytes] = None
|
|
578
|
+
|
|
579
|
+
# process the path parameters
|
|
580
|
+
if group_id is not None:
|
|
581
|
+
_path_params['group_id'] = group_id
|
|
582
|
+
# process the query parameters
|
|
583
|
+
# process the header parameters
|
|
584
|
+
# process the form parameters
|
|
585
|
+
# process the body parameter
|
|
586
|
+
if group_role_create is not None:
|
|
587
|
+
_body_params = group_role_create
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
# set the HTTP header `Accept`
|
|
591
|
+
if 'Accept' not in _header_params:
|
|
592
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
593
|
+
[
|
|
594
|
+
'application/json'
|
|
595
|
+
]
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
# set the HTTP header `Content-Type`
|
|
599
|
+
if _content_type:
|
|
600
|
+
_header_params['Content-Type'] = _content_type
|
|
601
|
+
else:
|
|
602
|
+
_default_content_type = (
|
|
603
|
+
self.api_client.select_header_content_type(
|
|
604
|
+
[
|
|
605
|
+
'application/json'
|
|
606
|
+
]
|
|
607
|
+
)
|
|
608
|
+
)
|
|
609
|
+
if _default_content_type is not None:
|
|
610
|
+
_header_params['Content-Type'] = _default_content_type
|
|
611
|
+
|
|
612
|
+
# authentication setting
|
|
613
|
+
_auth_settings: List[str] = [
|
|
614
|
+
'Authorization'
|
|
615
|
+
]
|
|
616
|
+
|
|
617
|
+
return self.api_client.param_serialize(
|
|
618
|
+
method='POST',
|
|
619
|
+
resource_path='/group/{group_id}/role',
|
|
620
|
+
path_params=_path_params,
|
|
621
|
+
query_params=_query_params,
|
|
622
|
+
header_params=_header_params,
|
|
623
|
+
body=_body_params,
|
|
624
|
+
post_params=_form_params,
|
|
625
|
+
files=_files,
|
|
626
|
+
auth_settings=_auth_settings,
|
|
627
|
+
collection_formats=_collection_formats,
|
|
628
|
+
_host=_host,
|
|
629
|
+
_request_auth=_request_auth
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
@validate_call
|
|
636
|
+
def delete_group_role(
|
|
637
|
+
self,
|
|
638
|
+
group_id: StrictStr,
|
|
639
|
+
group_role_id: StrictStr,
|
|
640
|
+
_request_timeout: Union[
|
|
641
|
+
None,
|
|
642
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
643
|
+
Tuple[
|
|
644
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
646
|
+
]
|
|
647
|
+
] = None,
|
|
648
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
649
|
+
_content_type: Optional[StrictStr] = None,
|
|
650
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
651
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
652
|
+
) -> None:
|
|
653
|
+
"""Delete a group role
|
|
654
|
+
|
|
655
|
+
Delete a group role by role ID.
|
|
656
|
+
|
|
657
|
+
:param group_id: (required)
|
|
658
|
+
:type group_id: str
|
|
659
|
+
:param group_role_id: (required)
|
|
660
|
+
:type group_role_id: str
|
|
661
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
662
|
+
number provided, it will be total request
|
|
663
|
+
timeout. It can also be a pair (tuple) of
|
|
664
|
+
(connection, read) timeouts.
|
|
665
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
666
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
667
|
+
request; this effectively ignores the
|
|
668
|
+
authentication in the spec for a single request.
|
|
669
|
+
:type _request_auth: dict, optional
|
|
670
|
+
:param _content_type: force content-type for the request.
|
|
671
|
+
:type _content_type: str, Optional
|
|
672
|
+
:param _headers: set to override the headers for a single
|
|
673
|
+
request; this effectively ignores the headers
|
|
674
|
+
in the spec for a single request.
|
|
675
|
+
:type _headers: dict, optional
|
|
676
|
+
:param _host_index: set to override the host_index for a single
|
|
677
|
+
request; this effectively ignores the host_index
|
|
678
|
+
in the spec for a single request.
|
|
679
|
+
:type _host_index: int, optional
|
|
680
|
+
:return: Returns the result object.
|
|
681
|
+
""" # noqa: E501
|
|
682
|
+
|
|
683
|
+
_param = self._delete_group_role_serialize(
|
|
684
|
+
group_id=group_id,
|
|
685
|
+
group_role_id=group_role_id,
|
|
686
|
+
_request_auth=_request_auth,
|
|
687
|
+
_content_type=_content_type,
|
|
688
|
+
_headers=_headers,
|
|
689
|
+
_host_index=_host_index
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
693
|
+
'204': None,
|
|
694
|
+
'404': None,
|
|
695
|
+
'422': "HTTPValidationError",
|
|
696
|
+
}
|
|
697
|
+
response_data = self.api_client.call_api(
|
|
698
|
+
*_param,
|
|
699
|
+
_request_timeout=_request_timeout
|
|
700
|
+
)
|
|
701
|
+
response_data.read()
|
|
702
|
+
return self.api_client.response_deserialize(
|
|
703
|
+
response_data=response_data,
|
|
704
|
+
response_types_map=_response_types_map,
|
|
705
|
+
).data
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
@validate_call
|
|
709
|
+
def delete_group_role_with_http_info(
|
|
710
|
+
self,
|
|
711
|
+
group_id: StrictStr,
|
|
712
|
+
group_role_id: StrictStr,
|
|
713
|
+
_request_timeout: Union[
|
|
714
|
+
None,
|
|
715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
716
|
+
Tuple[
|
|
717
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
718
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
719
|
+
]
|
|
720
|
+
] = None,
|
|
721
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
722
|
+
_content_type: Optional[StrictStr] = None,
|
|
723
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
724
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
725
|
+
) -> ApiResponse[None]:
|
|
726
|
+
"""Delete a group role
|
|
727
|
+
|
|
728
|
+
Delete a group role by role ID.
|
|
729
|
+
|
|
730
|
+
:param group_id: (required)
|
|
731
|
+
:type group_id: str
|
|
732
|
+
:param group_role_id: (required)
|
|
733
|
+
:type group_role_id: str
|
|
734
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
735
|
+
number provided, it will be total request
|
|
736
|
+
timeout. It can also be a pair (tuple) of
|
|
737
|
+
(connection, read) timeouts.
|
|
738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
740
|
+
request; this effectively ignores the
|
|
741
|
+
authentication in the spec for a single request.
|
|
742
|
+
:type _request_auth: dict, optional
|
|
743
|
+
:param _content_type: force content-type for the request.
|
|
744
|
+
:type _content_type: str, Optional
|
|
745
|
+
:param _headers: set to override the headers for a single
|
|
746
|
+
request; this effectively ignores the headers
|
|
747
|
+
in the spec for a single request.
|
|
748
|
+
:type _headers: dict, optional
|
|
749
|
+
:param _host_index: set to override the host_index for a single
|
|
750
|
+
request; this effectively ignores the host_index
|
|
751
|
+
in the spec for a single request.
|
|
752
|
+
:type _host_index: int, optional
|
|
753
|
+
:return: Returns the result object.
|
|
754
|
+
""" # noqa: E501
|
|
755
|
+
|
|
756
|
+
_param = self._delete_group_role_serialize(
|
|
757
|
+
group_id=group_id,
|
|
758
|
+
group_role_id=group_role_id,
|
|
759
|
+
_request_auth=_request_auth,
|
|
760
|
+
_content_type=_content_type,
|
|
761
|
+
_headers=_headers,
|
|
762
|
+
_host_index=_host_index
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
766
|
+
'204': None,
|
|
767
|
+
'404': None,
|
|
768
|
+
'422': "HTTPValidationError",
|
|
769
|
+
}
|
|
770
|
+
response_data = self.api_client.call_api(
|
|
771
|
+
*_param,
|
|
772
|
+
_request_timeout=_request_timeout
|
|
773
|
+
)
|
|
774
|
+
response_data.read()
|
|
775
|
+
return self.api_client.response_deserialize(
|
|
776
|
+
response_data=response_data,
|
|
777
|
+
response_types_map=_response_types_map,
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
@validate_call
|
|
782
|
+
def delete_group_role_without_preload_content(
|
|
783
|
+
self,
|
|
784
|
+
group_id: StrictStr,
|
|
785
|
+
group_role_id: StrictStr,
|
|
786
|
+
_request_timeout: Union[
|
|
787
|
+
None,
|
|
788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
789
|
+
Tuple[
|
|
790
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
791
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
792
|
+
]
|
|
793
|
+
] = None,
|
|
794
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
795
|
+
_content_type: Optional[StrictStr] = None,
|
|
796
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
797
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
798
|
+
) -> RESTResponseType:
|
|
799
|
+
"""Delete a group role
|
|
800
|
+
|
|
801
|
+
Delete a group role by role ID.
|
|
802
|
+
|
|
803
|
+
:param group_id: (required)
|
|
804
|
+
:type group_id: str
|
|
805
|
+
:param group_role_id: (required)
|
|
806
|
+
:type group_role_id: str
|
|
807
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
808
|
+
number provided, it will be total request
|
|
809
|
+
timeout. It can also be a pair (tuple) of
|
|
810
|
+
(connection, read) timeouts.
|
|
811
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
812
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
813
|
+
request; this effectively ignores the
|
|
814
|
+
authentication in the spec for a single request.
|
|
815
|
+
:type _request_auth: dict, optional
|
|
816
|
+
:param _content_type: force content-type for the request.
|
|
817
|
+
:type _content_type: str, Optional
|
|
818
|
+
:param _headers: set to override the headers for a single
|
|
819
|
+
request; this effectively ignores the headers
|
|
820
|
+
in the spec for a single request.
|
|
821
|
+
:type _headers: dict, optional
|
|
822
|
+
:param _host_index: set to override the host_index for a single
|
|
823
|
+
request; this effectively ignores the host_index
|
|
824
|
+
in the spec for a single request.
|
|
825
|
+
:type _host_index: int, optional
|
|
826
|
+
:return: Returns the result object.
|
|
827
|
+
""" # noqa: E501
|
|
828
|
+
|
|
829
|
+
_param = self._delete_group_role_serialize(
|
|
830
|
+
group_id=group_id,
|
|
831
|
+
group_role_id=group_role_id,
|
|
832
|
+
_request_auth=_request_auth,
|
|
833
|
+
_content_type=_content_type,
|
|
834
|
+
_headers=_headers,
|
|
835
|
+
_host_index=_host_index
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
839
|
+
'204': None,
|
|
840
|
+
'404': None,
|
|
841
|
+
'422': "HTTPValidationError",
|
|
842
|
+
}
|
|
843
|
+
response_data = self.api_client.call_api(
|
|
844
|
+
*_param,
|
|
845
|
+
_request_timeout=_request_timeout
|
|
846
|
+
)
|
|
847
|
+
return response_data.response
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
def _delete_group_role_serialize(
|
|
851
|
+
self,
|
|
852
|
+
group_id,
|
|
853
|
+
group_role_id,
|
|
854
|
+
_request_auth,
|
|
855
|
+
_content_type,
|
|
856
|
+
_headers,
|
|
857
|
+
_host_index,
|
|
858
|
+
) -> RequestSerialized:
|
|
859
|
+
|
|
860
|
+
_host = None
|
|
861
|
+
|
|
862
|
+
_collection_formats: Dict[str, str] = {
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
_path_params: Dict[str, str] = {}
|
|
866
|
+
_query_params: List[Tuple[str, str]] = []
|
|
867
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
868
|
+
_form_params: List[Tuple[str, str]] = []
|
|
869
|
+
_files: Dict[
|
|
870
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
871
|
+
] = {}
|
|
872
|
+
_body_params: Optional[bytes] = None
|
|
873
|
+
|
|
874
|
+
# process the path parameters
|
|
875
|
+
if group_id is not None:
|
|
876
|
+
_path_params['group_id'] = group_id
|
|
877
|
+
if group_role_id is not None:
|
|
878
|
+
_path_params['group_role_id'] = group_role_id
|
|
879
|
+
# process the query parameters
|
|
880
|
+
# process the header parameters
|
|
881
|
+
# process the form parameters
|
|
882
|
+
# process the body parameter
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
# set the HTTP header `Accept`
|
|
886
|
+
if 'Accept' not in _header_params:
|
|
887
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
888
|
+
[
|
|
889
|
+
'application/json'
|
|
890
|
+
]
|
|
891
|
+
)
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
# authentication setting
|
|
895
|
+
_auth_settings: List[str] = [
|
|
896
|
+
'Authorization'
|
|
897
|
+
]
|
|
898
|
+
|
|
899
|
+
return self.api_client.param_serialize(
|
|
900
|
+
method='DELETE',
|
|
901
|
+
resource_path='/group/{group_id}/role/{group_role_id}',
|
|
902
|
+
path_params=_path_params,
|
|
903
|
+
query_params=_query_params,
|
|
904
|
+
header_params=_header_params,
|
|
905
|
+
body=_body_params,
|
|
906
|
+
post_params=_form_params,
|
|
907
|
+
files=_files,
|
|
908
|
+
auth_settings=_auth_settings,
|
|
909
|
+
collection_formats=_collection_formats,
|
|
910
|
+
_host=_host,
|
|
911
|
+
_request_auth=_request_auth
|
|
912
|
+
)
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
@validate_call
|
|
918
|
+
def get_group_role(
|
|
919
|
+
self,
|
|
920
|
+
group_id: StrictStr,
|
|
921
|
+
group_role_id: StrictStr,
|
|
922
|
+
_request_timeout: Union[
|
|
923
|
+
None,
|
|
924
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
925
|
+
Tuple[
|
|
926
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
927
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
928
|
+
]
|
|
929
|
+
] = None,
|
|
930
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
931
|
+
_content_type: Optional[StrictStr] = None,
|
|
932
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
933
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
934
|
+
) -> AcrossServerRoutesV1GroupRoleSchemasGroupRole:
|
|
935
|
+
"""Read a group role
|
|
936
|
+
|
|
937
|
+
Read a group role by role ID.
|
|
938
|
+
|
|
939
|
+
:param group_id: (required)
|
|
940
|
+
:type group_id: str
|
|
941
|
+
:param group_role_id: (required)
|
|
942
|
+
:type group_role_id: str
|
|
943
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
944
|
+
number provided, it will be total request
|
|
945
|
+
timeout. It can also be a pair (tuple) of
|
|
946
|
+
(connection, read) timeouts.
|
|
947
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
948
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
949
|
+
request; this effectively ignores the
|
|
950
|
+
authentication in the spec for a single request.
|
|
951
|
+
:type _request_auth: dict, optional
|
|
952
|
+
:param _content_type: force content-type for the request.
|
|
953
|
+
:type _content_type: str, Optional
|
|
954
|
+
:param _headers: set to override the headers for a single
|
|
955
|
+
request; this effectively ignores the headers
|
|
956
|
+
in the spec for a single request.
|
|
957
|
+
:type _headers: dict, optional
|
|
958
|
+
:param _host_index: set to override the host_index for a single
|
|
959
|
+
request; this effectively ignores the host_index
|
|
960
|
+
in the spec for a single request.
|
|
961
|
+
:type _host_index: int, optional
|
|
962
|
+
:return: Returns the result object.
|
|
963
|
+
""" # noqa: E501
|
|
964
|
+
|
|
965
|
+
_param = self._get_group_role_serialize(
|
|
966
|
+
group_id=group_id,
|
|
967
|
+
group_role_id=group_role_id,
|
|
968
|
+
_request_auth=_request_auth,
|
|
969
|
+
_content_type=_content_type,
|
|
970
|
+
_headers=_headers,
|
|
971
|
+
_host_index=_host_index
|
|
972
|
+
)
|
|
973
|
+
|
|
974
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
975
|
+
'200': "AcrossServerRoutesV1GroupRoleSchemasGroupRole",
|
|
976
|
+
'404': None,
|
|
977
|
+
'422': "HTTPValidationError",
|
|
978
|
+
}
|
|
979
|
+
response_data = self.api_client.call_api(
|
|
980
|
+
*_param,
|
|
981
|
+
_request_timeout=_request_timeout
|
|
982
|
+
)
|
|
983
|
+
response_data.read()
|
|
984
|
+
return self.api_client.response_deserialize(
|
|
985
|
+
response_data=response_data,
|
|
986
|
+
response_types_map=_response_types_map,
|
|
987
|
+
).data
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
@validate_call
|
|
991
|
+
def get_group_role_with_http_info(
|
|
992
|
+
self,
|
|
993
|
+
group_id: StrictStr,
|
|
994
|
+
group_role_id: StrictStr,
|
|
995
|
+
_request_timeout: Union[
|
|
996
|
+
None,
|
|
997
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
998
|
+
Tuple[
|
|
999
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1001
|
+
]
|
|
1002
|
+
] = None,
|
|
1003
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1004
|
+
_content_type: Optional[StrictStr] = None,
|
|
1005
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1006
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1007
|
+
) -> ApiResponse[AcrossServerRoutesV1GroupRoleSchemasGroupRole]:
|
|
1008
|
+
"""Read a group role
|
|
1009
|
+
|
|
1010
|
+
Read a group role by role ID.
|
|
1011
|
+
|
|
1012
|
+
:param group_id: (required)
|
|
1013
|
+
:type group_id: str
|
|
1014
|
+
:param group_role_id: (required)
|
|
1015
|
+
:type group_role_id: str
|
|
1016
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1017
|
+
number provided, it will be total request
|
|
1018
|
+
timeout. It can also be a pair (tuple) of
|
|
1019
|
+
(connection, read) timeouts.
|
|
1020
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1021
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1022
|
+
request; this effectively ignores the
|
|
1023
|
+
authentication in the spec for a single request.
|
|
1024
|
+
:type _request_auth: dict, optional
|
|
1025
|
+
:param _content_type: force content-type for the request.
|
|
1026
|
+
:type _content_type: str, Optional
|
|
1027
|
+
:param _headers: set to override the headers for a single
|
|
1028
|
+
request; this effectively ignores the headers
|
|
1029
|
+
in the spec for a single request.
|
|
1030
|
+
:type _headers: dict, optional
|
|
1031
|
+
:param _host_index: set to override the host_index for a single
|
|
1032
|
+
request; this effectively ignores the host_index
|
|
1033
|
+
in the spec for a single request.
|
|
1034
|
+
:type _host_index: int, optional
|
|
1035
|
+
:return: Returns the result object.
|
|
1036
|
+
""" # noqa: E501
|
|
1037
|
+
|
|
1038
|
+
_param = self._get_group_role_serialize(
|
|
1039
|
+
group_id=group_id,
|
|
1040
|
+
group_role_id=group_role_id,
|
|
1041
|
+
_request_auth=_request_auth,
|
|
1042
|
+
_content_type=_content_type,
|
|
1043
|
+
_headers=_headers,
|
|
1044
|
+
_host_index=_host_index
|
|
1045
|
+
)
|
|
1046
|
+
|
|
1047
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1048
|
+
'200': "AcrossServerRoutesV1GroupRoleSchemasGroupRole",
|
|
1049
|
+
'404': None,
|
|
1050
|
+
'422': "HTTPValidationError",
|
|
1051
|
+
}
|
|
1052
|
+
response_data = self.api_client.call_api(
|
|
1053
|
+
*_param,
|
|
1054
|
+
_request_timeout=_request_timeout
|
|
1055
|
+
)
|
|
1056
|
+
response_data.read()
|
|
1057
|
+
return self.api_client.response_deserialize(
|
|
1058
|
+
response_data=response_data,
|
|
1059
|
+
response_types_map=_response_types_map,
|
|
1060
|
+
)
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
@validate_call
|
|
1064
|
+
def get_group_role_without_preload_content(
|
|
1065
|
+
self,
|
|
1066
|
+
group_id: StrictStr,
|
|
1067
|
+
group_role_id: StrictStr,
|
|
1068
|
+
_request_timeout: Union[
|
|
1069
|
+
None,
|
|
1070
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1071
|
+
Tuple[
|
|
1072
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1073
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1074
|
+
]
|
|
1075
|
+
] = None,
|
|
1076
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1077
|
+
_content_type: Optional[StrictStr] = None,
|
|
1078
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1079
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1080
|
+
) -> RESTResponseType:
|
|
1081
|
+
"""Read a group role
|
|
1082
|
+
|
|
1083
|
+
Read a group role by role ID.
|
|
1084
|
+
|
|
1085
|
+
:param group_id: (required)
|
|
1086
|
+
:type group_id: str
|
|
1087
|
+
:param group_role_id: (required)
|
|
1088
|
+
:type group_role_id: str
|
|
1089
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1090
|
+
number provided, it will be total request
|
|
1091
|
+
timeout. It can also be a pair (tuple) of
|
|
1092
|
+
(connection, read) timeouts.
|
|
1093
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1094
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1095
|
+
request; this effectively ignores the
|
|
1096
|
+
authentication in the spec for a single request.
|
|
1097
|
+
:type _request_auth: dict, optional
|
|
1098
|
+
:param _content_type: force content-type for the request.
|
|
1099
|
+
:type _content_type: str, Optional
|
|
1100
|
+
:param _headers: set to override the headers for a single
|
|
1101
|
+
request; this effectively ignores the headers
|
|
1102
|
+
in the spec for a single request.
|
|
1103
|
+
:type _headers: dict, optional
|
|
1104
|
+
:param _host_index: set to override the host_index for a single
|
|
1105
|
+
request; this effectively ignores the host_index
|
|
1106
|
+
in the spec for a single request.
|
|
1107
|
+
:type _host_index: int, optional
|
|
1108
|
+
:return: Returns the result object.
|
|
1109
|
+
""" # noqa: E501
|
|
1110
|
+
|
|
1111
|
+
_param = self._get_group_role_serialize(
|
|
1112
|
+
group_id=group_id,
|
|
1113
|
+
group_role_id=group_role_id,
|
|
1114
|
+
_request_auth=_request_auth,
|
|
1115
|
+
_content_type=_content_type,
|
|
1116
|
+
_headers=_headers,
|
|
1117
|
+
_host_index=_host_index
|
|
1118
|
+
)
|
|
1119
|
+
|
|
1120
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1121
|
+
'200': "AcrossServerRoutesV1GroupRoleSchemasGroupRole",
|
|
1122
|
+
'404': None,
|
|
1123
|
+
'422': "HTTPValidationError",
|
|
1124
|
+
}
|
|
1125
|
+
response_data = self.api_client.call_api(
|
|
1126
|
+
*_param,
|
|
1127
|
+
_request_timeout=_request_timeout
|
|
1128
|
+
)
|
|
1129
|
+
return response_data.response
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
def _get_group_role_serialize(
|
|
1133
|
+
self,
|
|
1134
|
+
group_id,
|
|
1135
|
+
group_role_id,
|
|
1136
|
+
_request_auth,
|
|
1137
|
+
_content_type,
|
|
1138
|
+
_headers,
|
|
1139
|
+
_host_index,
|
|
1140
|
+
) -> RequestSerialized:
|
|
1141
|
+
|
|
1142
|
+
_host = None
|
|
1143
|
+
|
|
1144
|
+
_collection_formats: Dict[str, str] = {
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
_path_params: Dict[str, str] = {}
|
|
1148
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1149
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1150
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1151
|
+
_files: Dict[
|
|
1152
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1153
|
+
] = {}
|
|
1154
|
+
_body_params: Optional[bytes] = None
|
|
1155
|
+
|
|
1156
|
+
# process the path parameters
|
|
1157
|
+
if group_id is not None:
|
|
1158
|
+
_path_params['group_id'] = group_id
|
|
1159
|
+
if group_role_id is not None:
|
|
1160
|
+
_path_params['group_role_id'] = group_role_id
|
|
1161
|
+
# process the query parameters
|
|
1162
|
+
# process the header parameters
|
|
1163
|
+
# process the form parameters
|
|
1164
|
+
# process the body parameter
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
# set the HTTP header `Accept`
|
|
1168
|
+
if 'Accept' not in _header_params:
|
|
1169
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1170
|
+
[
|
|
1171
|
+
'application/json'
|
|
1172
|
+
]
|
|
1173
|
+
)
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
# authentication setting
|
|
1177
|
+
_auth_settings: List[str] = [
|
|
1178
|
+
'Authorization'
|
|
1179
|
+
]
|
|
1180
|
+
|
|
1181
|
+
return self.api_client.param_serialize(
|
|
1182
|
+
method='GET',
|
|
1183
|
+
resource_path='/group/{group_id}/role/{group_role_id}',
|
|
1184
|
+
path_params=_path_params,
|
|
1185
|
+
query_params=_query_params,
|
|
1186
|
+
header_params=_header_params,
|
|
1187
|
+
body=_body_params,
|
|
1188
|
+
post_params=_form_params,
|
|
1189
|
+
files=_files,
|
|
1190
|
+
auth_settings=_auth_settings,
|
|
1191
|
+
collection_formats=_collection_formats,
|
|
1192
|
+
_host=_host,
|
|
1193
|
+
_request_auth=_request_auth
|
|
1194
|
+
)
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
@validate_call
|
|
1200
|
+
def get_group_roles(
|
|
1201
|
+
self,
|
|
1202
|
+
group_id: StrictStr,
|
|
1203
|
+
_request_timeout: Union[
|
|
1204
|
+
None,
|
|
1205
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1206
|
+
Tuple[
|
|
1207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1208
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1209
|
+
]
|
|
1210
|
+
] = None,
|
|
1211
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1212
|
+
_content_type: Optional[StrictStr] = None,
|
|
1213
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1214
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1215
|
+
) -> List[GroupRoleRead]:
|
|
1216
|
+
"""Read group roles
|
|
1217
|
+
|
|
1218
|
+
Read many group roles.
|
|
1219
|
+
|
|
1220
|
+
:param group_id: (required)
|
|
1221
|
+
:type group_id: str
|
|
1222
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1223
|
+
number provided, it will be total request
|
|
1224
|
+
timeout. It can also be a pair (tuple) of
|
|
1225
|
+
(connection, read) timeouts.
|
|
1226
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1227
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1228
|
+
request; this effectively ignores the
|
|
1229
|
+
authentication in the spec for a single request.
|
|
1230
|
+
:type _request_auth: dict, optional
|
|
1231
|
+
:param _content_type: force content-type for the request.
|
|
1232
|
+
:type _content_type: str, Optional
|
|
1233
|
+
:param _headers: set to override the headers for a single
|
|
1234
|
+
request; this effectively ignores the headers
|
|
1235
|
+
in the spec for a single request.
|
|
1236
|
+
:type _headers: dict, optional
|
|
1237
|
+
:param _host_index: set to override the host_index for a single
|
|
1238
|
+
request; this effectively ignores the host_index
|
|
1239
|
+
in the spec for a single request.
|
|
1240
|
+
:type _host_index: int, optional
|
|
1241
|
+
:return: Returns the result object.
|
|
1242
|
+
""" # noqa: E501
|
|
1243
|
+
|
|
1244
|
+
_param = self._get_group_roles_serialize(
|
|
1245
|
+
group_id=group_id,
|
|
1246
|
+
_request_auth=_request_auth,
|
|
1247
|
+
_content_type=_content_type,
|
|
1248
|
+
_headers=_headers,
|
|
1249
|
+
_host_index=_host_index
|
|
1250
|
+
)
|
|
1251
|
+
|
|
1252
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1253
|
+
'200': "List[GroupRoleRead]",
|
|
1254
|
+
'404': None,
|
|
1255
|
+
'422': "HTTPValidationError",
|
|
1256
|
+
}
|
|
1257
|
+
response_data = self.api_client.call_api(
|
|
1258
|
+
*_param,
|
|
1259
|
+
_request_timeout=_request_timeout
|
|
1260
|
+
)
|
|
1261
|
+
response_data.read()
|
|
1262
|
+
return self.api_client.response_deserialize(
|
|
1263
|
+
response_data=response_data,
|
|
1264
|
+
response_types_map=_response_types_map,
|
|
1265
|
+
).data
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
@validate_call
|
|
1269
|
+
def get_group_roles_with_http_info(
|
|
1270
|
+
self,
|
|
1271
|
+
group_id: StrictStr,
|
|
1272
|
+
_request_timeout: Union[
|
|
1273
|
+
None,
|
|
1274
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1275
|
+
Tuple[
|
|
1276
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1277
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1278
|
+
]
|
|
1279
|
+
] = None,
|
|
1280
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1281
|
+
_content_type: Optional[StrictStr] = None,
|
|
1282
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1283
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1284
|
+
) -> ApiResponse[List[GroupRoleRead]]:
|
|
1285
|
+
"""Read group roles
|
|
1286
|
+
|
|
1287
|
+
Read many group roles.
|
|
1288
|
+
|
|
1289
|
+
:param group_id: (required)
|
|
1290
|
+
:type group_id: str
|
|
1291
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1292
|
+
number provided, it will be total request
|
|
1293
|
+
timeout. It can also be a pair (tuple) of
|
|
1294
|
+
(connection, read) timeouts.
|
|
1295
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1296
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1297
|
+
request; this effectively ignores the
|
|
1298
|
+
authentication in the spec for a single request.
|
|
1299
|
+
:type _request_auth: dict, optional
|
|
1300
|
+
:param _content_type: force content-type for the request.
|
|
1301
|
+
:type _content_type: str, Optional
|
|
1302
|
+
:param _headers: set to override the headers for a single
|
|
1303
|
+
request; this effectively ignores the headers
|
|
1304
|
+
in the spec for a single request.
|
|
1305
|
+
:type _headers: dict, optional
|
|
1306
|
+
:param _host_index: set to override the host_index for a single
|
|
1307
|
+
request; this effectively ignores the host_index
|
|
1308
|
+
in the spec for a single request.
|
|
1309
|
+
:type _host_index: int, optional
|
|
1310
|
+
:return: Returns the result object.
|
|
1311
|
+
""" # noqa: E501
|
|
1312
|
+
|
|
1313
|
+
_param = self._get_group_roles_serialize(
|
|
1314
|
+
group_id=group_id,
|
|
1315
|
+
_request_auth=_request_auth,
|
|
1316
|
+
_content_type=_content_type,
|
|
1317
|
+
_headers=_headers,
|
|
1318
|
+
_host_index=_host_index
|
|
1319
|
+
)
|
|
1320
|
+
|
|
1321
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1322
|
+
'200': "List[GroupRoleRead]",
|
|
1323
|
+
'404': None,
|
|
1324
|
+
'422': "HTTPValidationError",
|
|
1325
|
+
}
|
|
1326
|
+
response_data = self.api_client.call_api(
|
|
1327
|
+
*_param,
|
|
1328
|
+
_request_timeout=_request_timeout
|
|
1329
|
+
)
|
|
1330
|
+
response_data.read()
|
|
1331
|
+
return self.api_client.response_deserialize(
|
|
1332
|
+
response_data=response_data,
|
|
1333
|
+
response_types_map=_response_types_map,
|
|
1334
|
+
)
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
@validate_call
|
|
1338
|
+
def get_group_roles_without_preload_content(
|
|
1339
|
+
self,
|
|
1340
|
+
group_id: StrictStr,
|
|
1341
|
+
_request_timeout: Union[
|
|
1342
|
+
None,
|
|
1343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1344
|
+
Tuple[
|
|
1345
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1346
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1347
|
+
]
|
|
1348
|
+
] = None,
|
|
1349
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1350
|
+
_content_type: Optional[StrictStr] = None,
|
|
1351
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1352
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1353
|
+
) -> RESTResponseType:
|
|
1354
|
+
"""Read group roles
|
|
1355
|
+
|
|
1356
|
+
Read many group roles.
|
|
1357
|
+
|
|
1358
|
+
:param group_id: (required)
|
|
1359
|
+
:type group_id: str
|
|
1360
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1361
|
+
number provided, it will be total request
|
|
1362
|
+
timeout. It can also be a pair (tuple) of
|
|
1363
|
+
(connection, read) timeouts.
|
|
1364
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1365
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1366
|
+
request; this effectively ignores the
|
|
1367
|
+
authentication in the spec for a single request.
|
|
1368
|
+
:type _request_auth: dict, optional
|
|
1369
|
+
:param _content_type: force content-type for the request.
|
|
1370
|
+
:type _content_type: str, Optional
|
|
1371
|
+
:param _headers: set to override the headers for a single
|
|
1372
|
+
request; this effectively ignores the headers
|
|
1373
|
+
in the spec for a single request.
|
|
1374
|
+
:type _headers: dict, optional
|
|
1375
|
+
:param _host_index: set to override the host_index for a single
|
|
1376
|
+
request; this effectively ignores the host_index
|
|
1377
|
+
in the spec for a single request.
|
|
1378
|
+
:type _host_index: int, optional
|
|
1379
|
+
:return: Returns the result object.
|
|
1380
|
+
""" # noqa: E501
|
|
1381
|
+
|
|
1382
|
+
_param = self._get_group_roles_serialize(
|
|
1383
|
+
group_id=group_id,
|
|
1384
|
+
_request_auth=_request_auth,
|
|
1385
|
+
_content_type=_content_type,
|
|
1386
|
+
_headers=_headers,
|
|
1387
|
+
_host_index=_host_index
|
|
1388
|
+
)
|
|
1389
|
+
|
|
1390
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1391
|
+
'200': "List[GroupRoleRead]",
|
|
1392
|
+
'404': None,
|
|
1393
|
+
'422': "HTTPValidationError",
|
|
1394
|
+
}
|
|
1395
|
+
response_data = self.api_client.call_api(
|
|
1396
|
+
*_param,
|
|
1397
|
+
_request_timeout=_request_timeout
|
|
1398
|
+
)
|
|
1399
|
+
return response_data.response
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
def _get_group_roles_serialize(
|
|
1403
|
+
self,
|
|
1404
|
+
group_id,
|
|
1405
|
+
_request_auth,
|
|
1406
|
+
_content_type,
|
|
1407
|
+
_headers,
|
|
1408
|
+
_host_index,
|
|
1409
|
+
) -> RequestSerialized:
|
|
1410
|
+
|
|
1411
|
+
_host = None
|
|
1412
|
+
|
|
1413
|
+
_collection_formats: Dict[str, str] = {
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
_path_params: Dict[str, str] = {}
|
|
1417
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1418
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1419
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1420
|
+
_files: Dict[
|
|
1421
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1422
|
+
] = {}
|
|
1423
|
+
_body_params: Optional[bytes] = None
|
|
1424
|
+
|
|
1425
|
+
# process the path parameters
|
|
1426
|
+
if group_id is not None:
|
|
1427
|
+
_path_params['group_id'] = group_id
|
|
1428
|
+
# process the query parameters
|
|
1429
|
+
# process the header parameters
|
|
1430
|
+
# process the form parameters
|
|
1431
|
+
# process the body parameter
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
# set the HTTP header `Accept`
|
|
1435
|
+
if 'Accept' not in _header_params:
|
|
1436
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1437
|
+
[
|
|
1438
|
+
'application/json'
|
|
1439
|
+
]
|
|
1440
|
+
)
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
# authentication setting
|
|
1444
|
+
_auth_settings: List[str] = [
|
|
1445
|
+
'Authorization'
|
|
1446
|
+
]
|
|
1447
|
+
|
|
1448
|
+
return self.api_client.param_serialize(
|
|
1449
|
+
method='GET',
|
|
1450
|
+
resource_path='/group/{group_id}/role',
|
|
1451
|
+
path_params=_path_params,
|
|
1452
|
+
query_params=_query_params,
|
|
1453
|
+
header_params=_header_params,
|
|
1454
|
+
body=_body_params,
|
|
1455
|
+
post_params=_form_params,
|
|
1456
|
+
files=_files,
|
|
1457
|
+
auth_settings=_auth_settings,
|
|
1458
|
+
collection_formats=_collection_formats,
|
|
1459
|
+
_host=_host,
|
|
1460
|
+
_request_auth=_request_auth
|
|
1461
|
+
)
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
@validate_call
|
|
1467
|
+
def remove_from_user(
|
|
1468
|
+
self,
|
|
1469
|
+
group_role_id: StrictStr,
|
|
1470
|
+
group_id: StrictStr,
|
|
1471
|
+
user_id: StrictStr,
|
|
1472
|
+
_request_timeout: Union[
|
|
1473
|
+
None,
|
|
1474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1475
|
+
Tuple[
|
|
1476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1478
|
+
]
|
|
1479
|
+
] = None,
|
|
1480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1481
|
+
_content_type: Optional[StrictStr] = None,
|
|
1482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1484
|
+
) -> None:
|
|
1485
|
+
"""Remove a group role from a user
|
|
1486
|
+
|
|
1487
|
+
Remove a group role by id from a user id within that group.
|
|
1488
|
+
|
|
1489
|
+
:param group_role_id: (required)
|
|
1490
|
+
:type group_role_id: str
|
|
1491
|
+
:param group_id: (required)
|
|
1492
|
+
:type group_id: str
|
|
1493
|
+
:param user_id: (required)
|
|
1494
|
+
:type user_id: str
|
|
1495
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1496
|
+
number provided, it will be total request
|
|
1497
|
+
timeout. It can also be a pair (tuple) of
|
|
1498
|
+
(connection, read) timeouts.
|
|
1499
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1500
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1501
|
+
request; this effectively ignores the
|
|
1502
|
+
authentication in the spec for a single request.
|
|
1503
|
+
:type _request_auth: dict, optional
|
|
1504
|
+
:param _content_type: force content-type for the request.
|
|
1505
|
+
:type _content_type: str, Optional
|
|
1506
|
+
:param _headers: set to override the headers for a single
|
|
1507
|
+
request; this effectively ignores the headers
|
|
1508
|
+
in the spec for a single request.
|
|
1509
|
+
:type _headers: dict, optional
|
|
1510
|
+
:param _host_index: set to override the host_index for a single
|
|
1511
|
+
request; this effectively ignores the host_index
|
|
1512
|
+
in the spec for a single request.
|
|
1513
|
+
:type _host_index: int, optional
|
|
1514
|
+
:return: Returns the result object.
|
|
1515
|
+
""" # noqa: E501
|
|
1516
|
+
|
|
1517
|
+
_param = self._remove_from_user_serialize(
|
|
1518
|
+
group_role_id=group_role_id,
|
|
1519
|
+
group_id=group_id,
|
|
1520
|
+
user_id=user_id,
|
|
1521
|
+
_request_auth=_request_auth,
|
|
1522
|
+
_content_type=_content_type,
|
|
1523
|
+
_headers=_headers,
|
|
1524
|
+
_host_index=_host_index
|
|
1525
|
+
)
|
|
1526
|
+
|
|
1527
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1528
|
+
'204': None,
|
|
1529
|
+
'404': None,
|
|
1530
|
+
'422': "HTTPValidationError",
|
|
1531
|
+
}
|
|
1532
|
+
response_data = self.api_client.call_api(
|
|
1533
|
+
*_param,
|
|
1534
|
+
_request_timeout=_request_timeout
|
|
1535
|
+
)
|
|
1536
|
+
response_data.read()
|
|
1537
|
+
return self.api_client.response_deserialize(
|
|
1538
|
+
response_data=response_data,
|
|
1539
|
+
response_types_map=_response_types_map,
|
|
1540
|
+
).data
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
@validate_call
|
|
1544
|
+
def remove_from_user_with_http_info(
|
|
1545
|
+
self,
|
|
1546
|
+
group_role_id: StrictStr,
|
|
1547
|
+
group_id: StrictStr,
|
|
1548
|
+
user_id: StrictStr,
|
|
1549
|
+
_request_timeout: Union[
|
|
1550
|
+
None,
|
|
1551
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1552
|
+
Tuple[
|
|
1553
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1554
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1555
|
+
]
|
|
1556
|
+
] = None,
|
|
1557
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1558
|
+
_content_type: Optional[StrictStr] = None,
|
|
1559
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1560
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1561
|
+
) -> ApiResponse[None]:
|
|
1562
|
+
"""Remove a group role from a user
|
|
1563
|
+
|
|
1564
|
+
Remove a group role by id from a user id within that group.
|
|
1565
|
+
|
|
1566
|
+
:param group_role_id: (required)
|
|
1567
|
+
:type group_role_id: str
|
|
1568
|
+
:param group_id: (required)
|
|
1569
|
+
:type group_id: str
|
|
1570
|
+
:param user_id: (required)
|
|
1571
|
+
:type user_id: str
|
|
1572
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1573
|
+
number provided, it will be total request
|
|
1574
|
+
timeout. It can also be a pair (tuple) of
|
|
1575
|
+
(connection, read) timeouts.
|
|
1576
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1577
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1578
|
+
request; this effectively ignores the
|
|
1579
|
+
authentication in the spec for a single request.
|
|
1580
|
+
:type _request_auth: dict, optional
|
|
1581
|
+
:param _content_type: force content-type for the request.
|
|
1582
|
+
:type _content_type: str, Optional
|
|
1583
|
+
:param _headers: set to override the headers for a single
|
|
1584
|
+
request; this effectively ignores the headers
|
|
1585
|
+
in the spec for a single request.
|
|
1586
|
+
:type _headers: dict, optional
|
|
1587
|
+
:param _host_index: set to override the host_index for a single
|
|
1588
|
+
request; this effectively ignores the host_index
|
|
1589
|
+
in the spec for a single request.
|
|
1590
|
+
:type _host_index: int, optional
|
|
1591
|
+
:return: Returns the result object.
|
|
1592
|
+
""" # noqa: E501
|
|
1593
|
+
|
|
1594
|
+
_param = self._remove_from_user_serialize(
|
|
1595
|
+
group_role_id=group_role_id,
|
|
1596
|
+
group_id=group_id,
|
|
1597
|
+
user_id=user_id,
|
|
1598
|
+
_request_auth=_request_auth,
|
|
1599
|
+
_content_type=_content_type,
|
|
1600
|
+
_headers=_headers,
|
|
1601
|
+
_host_index=_host_index
|
|
1602
|
+
)
|
|
1603
|
+
|
|
1604
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1605
|
+
'204': None,
|
|
1606
|
+
'404': None,
|
|
1607
|
+
'422': "HTTPValidationError",
|
|
1608
|
+
}
|
|
1609
|
+
response_data = self.api_client.call_api(
|
|
1610
|
+
*_param,
|
|
1611
|
+
_request_timeout=_request_timeout
|
|
1612
|
+
)
|
|
1613
|
+
response_data.read()
|
|
1614
|
+
return self.api_client.response_deserialize(
|
|
1615
|
+
response_data=response_data,
|
|
1616
|
+
response_types_map=_response_types_map,
|
|
1617
|
+
)
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
@validate_call
|
|
1621
|
+
def remove_from_user_without_preload_content(
|
|
1622
|
+
self,
|
|
1623
|
+
group_role_id: StrictStr,
|
|
1624
|
+
group_id: StrictStr,
|
|
1625
|
+
user_id: StrictStr,
|
|
1626
|
+
_request_timeout: Union[
|
|
1627
|
+
None,
|
|
1628
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1629
|
+
Tuple[
|
|
1630
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1631
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1632
|
+
]
|
|
1633
|
+
] = None,
|
|
1634
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1635
|
+
_content_type: Optional[StrictStr] = None,
|
|
1636
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1637
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1638
|
+
) -> RESTResponseType:
|
|
1639
|
+
"""Remove a group role from a user
|
|
1640
|
+
|
|
1641
|
+
Remove a group role by id from a user id within that group.
|
|
1642
|
+
|
|
1643
|
+
:param group_role_id: (required)
|
|
1644
|
+
:type group_role_id: str
|
|
1645
|
+
:param group_id: (required)
|
|
1646
|
+
:type group_id: str
|
|
1647
|
+
:param user_id: (required)
|
|
1648
|
+
:type user_id: str
|
|
1649
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1650
|
+
number provided, it will be total request
|
|
1651
|
+
timeout. It can also be a pair (tuple) of
|
|
1652
|
+
(connection, read) timeouts.
|
|
1653
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1654
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1655
|
+
request; this effectively ignores the
|
|
1656
|
+
authentication in the spec for a single request.
|
|
1657
|
+
:type _request_auth: dict, optional
|
|
1658
|
+
:param _content_type: force content-type for the request.
|
|
1659
|
+
:type _content_type: str, Optional
|
|
1660
|
+
:param _headers: set to override the headers for a single
|
|
1661
|
+
request; this effectively ignores the headers
|
|
1662
|
+
in the spec for a single request.
|
|
1663
|
+
:type _headers: dict, optional
|
|
1664
|
+
:param _host_index: set to override the host_index for a single
|
|
1665
|
+
request; this effectively ignores the host_index
|
|
1666
|
+
in the spec for a single request.
|
|
1667
|
+
:type _host_index: int, optional
|
|
1668
|
+
:return: Returns the result object.
|
|
1669
|
+
""" # noqa: E501
|
|
1670
|
+
|
|
1671
|
+
_param = self._remove_from_user_serialize(
|
|
1672
|
+
group_role_id=group_role_id,
|
|
1673
|
+
group_id=group_id,
|
|
1674
|
+
user_id=user_id,
|
|
1675
|
+
_request_auth=_request_auth,
|
|
1676
|
+
_content_type=_content_type,
|
|
1677
|
+
_headers=_headers,
|
|
1678
|
+
_host_index=_host_index
|
|
1679
|
+
)
|
|
1680
|
+
|
|
1681
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1682
|
+
'204': None,
|
|
1683
|
+
'404': None,
|
|
1684
|
+
'422': "HTTPValidationError",
|
|
1685
|
+
}
|
|
1686
|
+
response_data = self.api_client.call_api(
|
|
1687
|
+
*_param,
|
|
1688
|
+
_request_timeout=_request_timeout
|
|
1689
|
+
)
|
|
1690
|
+
return response_data.response
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
def _remove_from_user_serialize(
|
|
1694
|
+
self,
|
|
1695
|
+
group_role_id,
|
|
1696
|
+
group_id,
|
|
1697
|
+
user_id,
|
|
1698
|
+
_request_auth,
|
|
1699
|
+
_content_type,
|
|
1700
|
+
_headers,
|
|
1701
|
+
_host_index,
|
|
1702
|
+
) -> RequestSerialized:
|
|
1703
|
+
|
|
1704
|
+
_host = None
|
|
1705
|
+
|
|
1706
|
+
_collection_formats: Dict[str, str] = {
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
_path_params: Dict[str, str] = {}
|
|
1710
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1711
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1712
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1713
|
+
_files: Dict[
|
|
1714
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1715
|
+
] = {}
|
|
1716
|
+
_body_params: Optional[bytes] = None
|
|
1717
|
+
|
|
1718
|
+
# process the path parameters
|
|
1719
|
+
if group_role_id is not None:
|
|
1720
|
+
_path_params['group_role_id'] = group_role_id
|
|
1721
|
+
if group_id is not None:
|
|
1722
|
+
_path_params['group_id'] = group_id
|
|
1723
|
+
if user_id is not None:
|
|
1724
|
+
_path_params['user_id'] = user_id
|
|
1725
|
+
# process the query parameters
|
|
1726
|
+
# process the header parameters
|
|
1727
|
+
# process the form parameters
|
|
1728
|
+
# process the body parameter
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
# set the HTTP header `Accept`
|
|
1732
|
+
if 'Accept' not in _header_params:
|
|
1733
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1734
|
+
[
|
|
1735
|
+
'application/json'
|
|
1736
|
+
]
|
|
1737
|
+
)
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
# authentication setting
|
|
1741
|
+
_auth_settings: List[str] = [
|
|
1742
|
+
'Authorization'
|
|
1743
|
+
]
|
|
1744
|
+
|
|
1745
|
+
return self.api_client.param_serialize(
|
|
1746
|
+
method='DELETE',
|
|
1747
|
+
resource_path='/group/{group_id}/user/{user_id}/role/{group_role_id}',
|
|
1748
|
+
path_params=_path_params,
|
|
1749
|
+
query_params=_query_params,
|
|
1750
|
+
header_params=_header_params,
|
|
1751
|
+
body=_body_params,
|
|
1752
|
+
post_params=_form_params,
|
|
1753
|
+
files=_files,
|
|
1754
|
+
auth_settings=_auth_settings,
|
|
1755
|
+
collection_formats=_collection_formats,
|
|
1756
|
+
_host=_host,
|
|
1757
|
+
_request_auth=_request_auth
|
|
1758
|
+
)
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
@validate_call
|
|
1764
|
+
def update_group_role(
|
|
1765
|
+
self,
|
|
1766
|
+
group_role_id: StrictStr,
|
|
1767
|
+
group_id: StrictStr,
|
|
1768
|
+
group_role_create: GroupRoleCreate,
|
|
1769
|
+
_request_timeout: Union[
|
|
1770
|
+
None,
|
|
1771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1772
|
+
Tuple[
|
|
1773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1774
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1775
|
+
]
|
|
1776
|
+
] = None,
|
|
1777
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1778
|
+
_content_type: Optional[StrictStr] = None,
|
|
1779
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1780
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1781
|
+
) -> GroupRoleCreate:
|
|
1782
|
+
"""Update a group role
|
|
1783
|
+
|
|
1784
|
+
Update a group role and its permissions in a group that you control
|
|
1785
|
+
|
|
1786
|
+
:param group_role_id: (required)
|
|
1787
|
+
:type group_role_id: str
|
|
1788
|
+
:param group_id: (required)
|
|
1789
|
+
:type group_id: str
|
|
1790
|
+
:param group_role_create: (required)
|
|
1791
|
+
:type group_role_create: GroupRoleCreate
|
|
1792
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1793
|
+
number provided, it will be total request
|
|
1794
|
+
timeout. It can also be a pair (tuple) of
|
|
1795
|
+
(connection, read) timeouts.
|
|
1796
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1797
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1798
|
+
request; this effectively ignores the
|
|
1799
|
+
authentication in the spec for a single request.
|
|
1800
|
+
:type _request_auth: dict, optional
|
|
1801
|
+
:param _content_type: force content-type for the request.
|
|
1802
|
+
:type _content_type: str, Optional
|
|
1803
|
+
:param _headers: set to override the headers for a single
|
|
1804
|
+
request; this effectively ignores the headers
|
|
1805
|
+
in the spec for a single request.
|
|
1806
|
+
:type _headers: dict, optional
|
|
1807
|
+
:param _host_index: set to override the host_index for a single
|
|
1808
|
+
request; this effectively ignores the host_index
|
|
1809
|
+
in the spec for a single request.
|
|
1810
|
+
:type _host_index: int, optional
|
|
1811
|
+
:return: Returns the result object.
|
|
1812
|
+
""" # noqa: E501
|
|
1813
|
+
|
|
1814
|
+
_param = self._update_group_role_serialize(
|
|
1815
|
+
group_role_id=group_role_id,
|
|
1816
|
+
group_id=group_id,
|
|
1817
|
+
group_role_create=group_role_create,
|
|
1818
|
+
_request_auth=_request_auth,
|
|
1819
|
+
_content_type=_content_type,
|
|
1820
|
+
_headers=_headers,
|
|
1821
|
+
_host_index=_host_index
|
|
1822
|
+
)
|
|
1823
|
+
|
|
1824
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1825
|
+
'200': "GroupRoleCreate",
|
|
1826
|
+
'404': None,
|
|
1827
|
+
'422': "HTTPValidationError",
|
|
1828
|
+
}
|
|
1829
|
+
response_data = self.api_client.call_api(
|
|
1830
|
+
*_param,
|
|
1831
|
+
_request_timeout=_request_timeout
|
|
1832
|
+
)
|
|
1833
|
+
response_data.read()
|
|
1834
|
+
return self.api_client.response_deserialize(
|
|
1835
|
+
response_data=response_data,
|
|
1836
|
+
response_types_map=_response_types_map,
|
|
1837
|
+
).data
|
|
1838
|
+
|
|
1839
|
+
|
|
1840
|
+
@validate_call
|
|
1841
|
+
def update_group_role_with_http_info(
|
|
1842
|
+
self,
|
|
1843
|
+
group_role_id: StrictStr,
|
|
1844
|
+
group_id: StrictStr,
|
|
1845
|
+
group_role_create: GroupRoleCreate,
|
|
1846
|
+
_request_timeout: Union[
|
|
1847
|
+
None,
|
|
1848
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1849
|
+
Tuple[
|
|
1850
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1851
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1852
|
+
]
|
|
1853
|
+
] = None,
|
|
1854
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1855
|
+
_content_type: Optional[StrictStr] = None,
|
|
1856
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1857
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1858
|
+
) -> ApiResponse[GroupRoleCreate]:
|
|
1859
|
+
"""Update a group role
|
|
1860
|
+
|
|
1861
|
+
Update a group role and its permissions in a group that you control
|
|
1862
|
+
|
|
1863
|
+
:param group_role_id: (required)
|
|
1864
|
+
:type group_role_id: str
|
|
1865
|
+
:param group_id: (required)
|
|
1866
|
+
:type group_id: str
|
|
1867
|
+
:param group_role_create: (required)
|
|
1868
|
+
:type group_role_create: GroupRoleCreate
|
|
1869
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1870
|
+
number provided, it will be total request
|
|
1871
|
+
timeout. It can also be a pair (tuple) of
|
|
1872
|
+
(connection, read) timeouts.
|
|
1873
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1874
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1875
|
+
request; this effectively ignores the
|
|
1876
|
+
authentication in the spec for a single request.
|
|
1877
|
+
:type _request_auth: dict, optional
|
|
1878
|
+
:param _content_type: force content-type for the request.
|
|
1879
|
+
:type _content_type: str, Optional
|
|
1880
|
+
:param _headers: set to override the headers for a single
|
|
1881
|
+
request; this effectively ignores the headers
|
|
1882
|
+
in the spec for a single request.
|
|
1883
|
+
:type _headers: dict, optional
|
|
1884
|
+
:param _host_index: set to override the host_index for a single
|
|
1885
|
+
request; this effectively ignores the host_index
|
|
1886
|
+
in the spec for a single request.
|
|
1887
|
+
:type _host_index: int, optional
|
|
1888
|
+
:return: Returns the result object.
|
|
1889
|
+
""" # noqa: E501
|
|
1890
|
+
|
|
1891
|
+
_param = self._update_group_role_serialize(
|
|
1892
|
+
group_role_id=group_role_id,
|
|
1893
|
+
group_id=group_id,
|
|
1894
|
+
group_role_create=group_role_create,
|
|
1895
|
+
_request_auth=_request_auth,
|
|
1896
|
+
_content_type=_content_type,
|
|
1897
|
+
_headers=_headers,
|
|
1898
|
+
_host_index=_host_index
|
|
1899
|
+
)
|
|
1900
|
+
|
|
1901
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1902
|
+
'200': "GroupRoleCreate",
|
|
1903
|
+
'404': None,
|
|
1904
|
+
'422': "HTTPValidationError",
|
|
1905
|
+
}
|
|
1906
|
+
response_data = self.api_client.call_api(
|
|
1907
|
+
*_param,
|
|
1908
|
+
_request_timeout=_request_timeout
|
|
1909
|
+
)
|
|
1910
|
+
response_data.read()
|
|
1911
|
+
return self.api_client.response_deserialize(
|
|
1912
|
+
response_data=response_data,
|
|
1913
|
+
response_types_map=_response_types_map,
|
|
1914
|
+
)
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
@validate_call
|
|
1918
|
+
def update_group_role_without_preload_content(
|
|
1919
|
+
self,
|
|
1920
|
+
group_role_id: StrictStr,
|
|
1921
|
+
group_id: StrictStr,
|
|
1922
|
+
group_role_create: GroupRoleCreate,
|
|
1923
|
+
_request_timeout: Union[
|
|
1924
|
+
None,
|
|
1925
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1926
|
+
Tuple[
|
|
1927
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1928
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1929
|
+
]
|
|
1930
|
+
] = None,
|
|
1931
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1932
|
+
_content_type: Optional[StrictStr] = None,
|
|
1933
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1934
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1935
|
+
) -> RESTResponseType:
|
|
1936
|
+
"""Update a group role
|
|
1937
|
+
|
|
1938
|
+
Update a group role and its permissions in a group that you control
|
|
1939
|
+
|
|
1940
|
+
:param group_role_id: (required)
|
|
1941
|
+
:type group_role_id: str
|
|
1942
|
+
:param group_id: (required)
|
|
1943
|
+
:type group_id: str
|
|
1944
|
+
:param group_role_create: (required)
|
|
1945
|
+
:type group_role_create: GroupRoleCreate
|
|
1946
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1947
|
+
number provided, it will be total request
|
|
1948
|
+
timeout. It can also be a pair (tuple) of
|
|
1949
|
+
(connection, read) timeouts.
|
|
1950
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1951
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1952
|
+
request; this effectively ignores the
|
|
1953
|
+
authentication in the spec for a single request.
|
|
1954
|
+
:type _request_auth: dict, optional
|
|
1955
|
+
:param _content_type: force content-type for the request.
|
|
1956
|
+
:type _content_type: str, Optional
|
|
1957
|
+
:param _headers: set to override the headers for a single
|
|
1958
|
+
request; this effectively ignores the headers
|
|
1959
|
+
in the spec for a single request.
|
|
1960
|
+
:type _headers: dict, optional
|
|
1961
|
+
:param _host_index: set to override the host_index for a single
|
|
1962
|
+
request; this effectively ignores the host_index
|
|
1963
|
+
in the spec for a single request.
|
|
1964
|
+
:type _host_index: int, optional
|
|
1965
|
+
:return: Returns the result object.
|
|
1966
|
+
""" # noqa: E501
|
|
1967
|
+
|
|
1968
|
+
_param = self._update_group_role_serialize(
|
|
1969
|
+
group_role_id=group_role_id,
|
|
1970
|
+
group_id=group_id,
|
|
1971
|
+
group_role_create=group_role_create,
|
|
1972
|
+
_request_auth=_request_auth,
|
|
1973
|
+
_content_type=_content_type,
|
|
1974
|
+
_headers=_headers,
|
|
1975
|
+
_host_index=_host_index
|
|
1976
|
+
)
|
|
1977
|
+
|
|
1978
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1979
|
+
'200': "GroupRoleCreate",
|
|
1980
|
+
'404': None,
|
|
1981
|
+
'422': "HTTPValidationError",
|
|
1982
|
+
}
|
|
1983
|
+
response_data = self.api_client.call_api(
|
|
1984
|
+
*_param,
|
|
1985
|
+
_request_timeout=_request_timeout
|
|
1986
|
+
)
|
|
1987
|
+
return response_data.response
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
def _update_group_role_serialize(
|
|
1991
|
+
self,
|
|
1992
|
+
group_role_id,
|
|
1993
|
+
group_id,
|
|
1994
|
+
group_role_create,
|
|
1995
|
+
_request_auth,
|
|
1996
|
+
_content_type,
|
|
1997
|
+
_headers,
|
|
1998
|
+
_host_index,
|
|
1999
|
+
) -> RequestSerialized:
|
|
2000
|
+
|
|
2001
|
+
_host = None
|
|
2002
|
+
|
|
2003
|
+
_collection_formats: Dict[str, str] = {
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
_path_params: Dict[str, str] = {}
|
|
2007
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2008
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2009
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2010
|
+
_files: Dict[
|
|
2011
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2012
|
+
] = {}
|
|
2013
|
+
_body_params: Optional[bytes] = None
|
|
2014
|
+
|
|
2015
|
+
# process the path parameters
|
|
2016
|
+
if group_role_id is not None:
|
|
2017
|
+
_path_params['group_role_id'] = group_role_id
|
|
2018
|
+
if group_id is not None:
|
|
2019
|
+
_path_params['group_id'] = group_id
|
|
2020
|
+
# process the query parameters
|
|
2021
|
+
# process the header parameters
|
|
2022
|
+
# process the form parameters
|
|
2023
|
+
# process the body parameter
|
|
2024
|
+
if group_role_create is not None:
|
|
2025
|
+
_body_params = group_role_create
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
# set the HTTP header `Accept`
|
|
2029
|
+
if 'Accept' not in _header_params:
|
|
2030
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2031
|
+
[
|
|
2032
|
+
'application/json'
|
|
2033
|
+
]
|
|
2034
|
+
)
|
|
2035
|
+
|
|
2036
|
+
# set the HTTP header `Content-Type`
|
|
2037
|
+
if _content_type:
|
|
2038
|
+
_header_params['Content-Type'] = _content_type
|
|
2039
|
+
else:
|
|
2040
|
+
_default_content_type = (
|
|
2041
|
+
self.api_client.select_header_content_type(
|
|
2042
|
+
[
|
|
2043
|
+
'application/json'
|
|
2044
|
+
]
|
|
2045
|
+
)
|
|
2046
|
+
)
|
|
2047
|
+
if _default_content_type is not None:
|
|
2048
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2049
|
+
|
|
2050
|
+
# authentication setting
|
|
2051
|
+
_auth_settings: List[str] = [
|
|
2052
|
+
'Authorization'
|
|
2053
|
+
]
|
|
2054
|
+
|
|
2055
|
+
return self.api_client.param_serialize(
|
|
2056
|
+
method='PUT',
|
|
2057
|
+
resource_path='/group/{group_id}/role/{group_role_id}',
|
|
2058
|
+
path_params=_path_params,
|
|
2059
|
+
query_params=_query_params,
|
|
2060
|
+
header_params=_header_params,
|
|
2061
|
+
body=_body_params,
|
|
2062
|
+
post_params=_form_params,
|
|
2063
|
+
files=_files,
|
|
2064
|
+
auth_settings=_auth_settings,
|
|
2065
|
+
collection_formats=_collection_formats,
|
|
2066
|
+
_host=_host,
|
|
2067
|
+
_request_auth=_request_auth
|
|
2068
|
+
)
|
|
2069
|
+
|
|
2070
|
+
|