spaceblocks-permissions-server 1.0.2__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.
Files changed (36) hide show
  1. spaceblocks_permissions_server/__init__.py +59 -0
  2. spaceblocks_permissions_server/api/__init__.py +9 -0
  3. spaceblocks_permissions_server/api/member_group_api.py +609 -0
  4. spaceblocks_permissions_server/api/permission_api.py +699 -0
  5. spaceblocks_permissions_server/api/resource_api.py +2539 -0
  6. spaceblocks_permissions_server/api/role_api.py +1465 -0
  7. spaceblocks_permissions_server/api/tenant_api.py +2873 -0
  8. spaceblocks_permissions_server/api_client.py +770 -0
  9. spaceblocks_permissions_server/api_response.py +21 -0
  10. spaceblocks_permissions_server/configuration.py +445 -0
  11. spaceblocks_permissions_server/exceptions.py +199 -0
  12. spaceblocks_permissions_server/models/__init__.py +33 -0
  13. spaceblocks_permissions_server/models/create_member_group_request.py +91 -0
  14. spaceblocks_permissions_server/models/create_resource_parent.py +94 -0
  15. spaceblocks_permissions_server/models/create_resource_request.py +101 -0
  16. spaceblocks_permissions_server/models/create_role_request.py +98 -0
  17. spaceblocks_permissions_server/models/create_tenant_request.py +95 -0
  18. spaceblocks_permissions_server/models/get_permissions_response.py +87 -0
  19. spaceblocks_permissions_server/models/member_group.py +93 -0
  20. spaceblocks_permissions_server/models/problem_details.py +133 -0
  21. spaceblocks_permissions_server/models/resource.py +105 -0
  22. spaceblocks_permissions_server/models/resource_members.py +99 -0
  23. spaceblocks_permissions_server/models/resource_parent.py +89 -0
  24. spaceblocks_permissions_server/models/role.py +102 -0
  25. spaceblocks_permissions_server/models/tenant.py +100 -0
  26. spaceblocks_permissions_server/models/update_resource_parent.py +94 -0
  27. spaceblocks_permissions_server/models/update_resource_request.py +93 -0
  28. spaceblocks_permissions_server/models/update_role_request.py +106 -0
  29. spaceblocks_permissions_server/models/update_tenant_request.py +87 -0
  30. spaceblocks_permissions_server/permissions_client.py +46 -0
  31. spaceblocks_permissions_server/py.typed +0 -0
  32. spaceblocks_permissions_server/rest.py +257 -0
  33. spaceblocks_permissions_server/space_blocks_client.py +84 -0
  34. spaceblocks_permissions_server-1.0.2.dist-info/METADATA +68 -0
  35. spaceblocks_permissions_server-1.0.2.dist-info/RECORD +36 -0
  36. spaceblocks_permissions_server-1.0.2.dist-info/WHEEL +4 -0
@@ -0,0 +1,59 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ SpaceBlocks.Permissions.WebServices.Main.Api Management
7
+
8
+ This is the management API.
9
+
10
+ The version of the OpenAPI document: v1
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "1.0.0"
18
+
19
+ # import apis into sdk package
20
+ from spaceblocks_permissions_server.api.member_group_api import MemberGroupApi
21
+ from spaceblocks_permissions_server.api.permission_api import PermissionApi
22
+ from spaceblocks_permissions_server.api.resource_api import ResourceApi
23
+ from spaceblocks_permissions_server.api.role_api import RoleApi
24
+ from spaceblocks_permissions_server.api.tenant_api import TenantApi
25
+
26
+ # import ApiClient
27
+ from spaceblocks_permissions_server.api_response import ApiResponse
28
+ from spaceblocks_permissions_server.api_client import ApiClient
29
+ from spaceblocks_permissions_server.configuration import Configuration
30
+ from spaceblocks_permissions_server.exceptions import OpenApiException
31
+ from spaceblocks_permissions_server.exceptions import ApiTypeError
32
+ from spaceblocks_permissions_server.exceptions import ApiValueError
33
+ from spaceblocks_permissions_server.exceptions import ApiKeyError
34
+ from spaceblocks_permissions_server.exceptions import ApiAttributeError
35
+ from spaceblocks_permissions_server.exceptions import ApiException
36
+
37
+ # import models into sdk package
38
+ from spaceblocks_permissions_server.models.create_member_group_request import CreateMemberGroupRequest
39
+ from spaceblocks_permissions_server.models.create_resource_parent import CreateResourceParent
40
+ from spaceblocks_permissions_server.models.create_resource_request import CreateResourceRequest
41
+ from spaceblocks_permissions_server.models.create_role_request import CreateRoleRequest
42
+ from spaceblocks_permissions_server.models.create_tenant_request import CreateTenantRequest
43
+ from spaceblocks_permissions_server.models.get_permissions_response import GetPermissionsResponse
44
+ from spaceblocks_permissions_server.models.member_group import MemberGroup
45
+ from spaceblocks_permissions_server.models.problem_details import ProblemDetails
46
+ from spaceblocks_permissions_server.models.resource import Resource
47
+ from spaceblocks_permissions_server.models.resource_members import ResourceMembers
48
+ from spaceblocks_permissions_server.models.resource_parent import ResourceParent
49
+ from spaceblocks_permissions_server.models.role import Role
50
+ from spaceblocks_permissions_server.models.tenant import Tenant
51
+ from spaceblocks_permissions_server.models.update_resource_parent import UpdateResourceParent
52
+ from spaceblocks_permissions_server.models.update_resource_request import UpdateResourceRequest
53
+ from spaceblocks_permissions_server.models.update_role_request import UpdateRoleRequest
54
+ from spaceblocks_permissions_server.models.update_tenant_request import UpdateTenantRequest
55
+
56
+ # Custom Client
57
+ from spaceblocks_permissions_server.permissions_client import PermissionsClient
58
+ from spaceblocks_permissions_server.space_blocks_client import (SpaceBlocksClient, SpaceBlocksClientOptions,
59
+ ClientAuthenticationOptions, TokenAuthenticationOptions)
@@ -0,0 +1,9 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from spaceblocks_permissions_server.api.member_group_api import MemberGroupApi
5
+ from spaceblocks_permissions_server.api.permission_api import PermissionApi
6
+ from spaceblocks_permissions_server.api.resource_api import ResourceApi
7
+ from spaceblocks_permissions_server.api.role_api import RoleApi
8
+ from spaceblocks_permissions_server.api.tenant_api import TenantApi
9
+
@@ -0,0 +1,609 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ SpaceBlocks.Permissions.WebServices.Main.Api Management
5
+
6
+ This is the management API.
7
+
8
+ The version of the OpenAPI document: v1
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 Field, StrictStr
20
+ from typing_extensions import Annotated
21
+ from spaceblocks_permissions_server.models.create_member_group_request import CreateMemberGroupRequest
22
+ from spaceblocks_permissions_server.models.member_group import MemberGroup
23
+
24
+ from spaceblocks_permissions_server.api_client import ApiClient, RequestSerialized
25
+ from spaceblocks_permissions_server.api_response import ApiResponse
26
+ from spaceblocks_permissions_server.rest import RESTResponseType
27
+
28
+
29
+ class MemberGroupApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def create(
44
+ self,
45
+ tenant_id: Annotated[StrictStr, Field(description="The ID of the tenant where the member group belongs to")],
46
+ create_member_group_request: Annotated[CreateMemberGroupRequest, Field(description="The create member-group request")],
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> MemberGroup:
60
+ """Create a new member-group
61
+
62
+
63
+ :param tenant_id: The ID of the tenant where the member group belongs to (required)
64
+ :type tenant_id: str
65
+ :param create_member_group_request: The create member-group request (required)
66
+ :type create_member_group_request: CreateMemberGroupRequest
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._create_serialize(
90
+ tenant_id=tenant_id,
91
+ create_member_group_request=create_member_group_request,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '401': "ProblemDetails",
100
+ '201': "MemberGroup",
101
+ }
102
+ response_data = self.api_client.call_api(
103
+ *_param,
104
+ _request_timeout=_request_timeout
105
+ )
106
+ response_data.read()
107
+ return self.api_client.response_deserialize(
108
+ response_data=response_data,
109
+ response_types_map=_response_types_map,
110
+ ).data
111
+
112
+
113
+ @validate_call
114
+ def create_with_http_info(
115
+ self,
116
+ tenant_id: Annotated[StrictStr, Field(description="The ID of the tenant where the member group belongs to")],
117
+ create_member_group_request: Annotated[CreateMemberGroupRequest, Field(description="The create member-group request")],
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[MemberGroup]:
131
+ """Create a new member-group
132
+
133
+
134
+ :param tenant_id: The ID of the tenant where the member group belongs to (required)
135
+ :type tenant_id: str
136
+ :param create_member_group_request: The create member-group request (required)
137
+ :type create_member_group_request: CreateMemberGroupRequest
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._create_serialize(
161
+ tenant_id=tenant_id,
162
+ create_member_group_request=create_member_group_request,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '401': "ProblemDetails",
171
+ '201': "MemberGroup",
172
+ }
173
+ response_data = self.api_client.call_api(
174
+ *_param,
175
+ _request_timeout=_request_timeout
176
+ )
177
+ response_data.read()
178
+ return self.api_client.response_deserialize(
179
+ response_data=response_data,
180
+ response_types_map=_response_types_map,
181
+ )
182
+
183
+
184
+ @validate_call
185
+ def create_without_preload_content(
186
+ self,
187
+ tenant_id: Annotated[StrictStr, Field(description="The ID of the tenant where the member group belongs to")],
188
+ create_member_group_request: Annotated[CreateMemberGroupRequest, Field(description="The create member-group request")],
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Create a new member-group
203
+
204
+
205
+ :param tenant_id: The ID of the tenant where the member group belongs to (required)
206
+ :type tenant_id: str
207
+ :param create_member_group_request: The create member-group request (required)
208
+ :type create_member_group_request: CreateMemberGroupRequest
209
+ :param _request_timeout: timeout setting for this request. If one
210
+ number provided, it will be total request
211
+ timeout. It can also be a pair (tuple) of
212
+ (connection, read) timeouts.
213
+ :type _request_timeout: int, tuple(int, int), optional
214
+ :param _request_auth: set to override the auth_settings for an a single
215
+ request; this effectively ignores the
216
+ authentication in the spec for a single request.
217
+ :type _request_auth: dict, optional
218
+ :param _content_type: force content-type for the request.
219
+ :type _content_type: str, Optional
220
+ :param _headers: set to override the headers for a single
221
+ request; this effectively ignores the headers
222
+ in the spec for a single request.
223
+ :type _headers: dict, optional
224
+ :param _host_index: set to override the host_index for a single
225
+ request; this effectively ignores the host_index
226
+ in the spec for a single request.
227
+ :type _host_index: int, optional
228
+ :return: Returns the result object.
229
+ """ # noqa: E501
230
+
231
+ _param = self._create_serialize(
232
+ tenant_id=tenant_id,
233
+ create_member_group_request=create_member_group_request,
234
+ _request_auth=_request_auth,
235
+ _content_type=_content_type,
236
+ _headers=_headers,
237
+ _host_index=_host_index
238
+ )
239
+
240
+ _response_types_map: Dict[str, Optional[str]] = {
241
+ '401': "ProblemDetails",
242
+ '201': "MemberGroup",
243
+ }
244
+ response_data = self.api_client.call_api(
245
+ *_param,
246
+ _request_timeout=_request_timeout
247
+ )
248
+ return response_data.response
249
+
250
+
251
+ def _create_serialize(
252
+ self,
253
+ tenant_id,
254
+ create_member_group_request,
255
+ _request_auth,
256
+ _content_type,
257
+ _headers,
258
+ _host_index,
259
+ ) -> RequestSerialized:
260
+
261
+ _host = None
262
+
263
+ _collection_formats: Dict[str, str] = {
264
+ }
265
+
266
+ _path_params: Dict[str, str] = {}
267
+ _query_params: List[Tuple[str, str]] = []
268
+ _header_params: Dict[str, Optional[str]] = _headers or {}
269
+ _form_params: List[Tuple[str, str]] = []
270
+ _files: Dict[str, Union[str, bytes]] = {}
271
+ _body_params: Optional[bytes] = None
272
+
273
+ # process the path parameters
274
+ if tenant_id is not None:
275
+ _path_params['tenantId'] = tenant_id
276
+ # process the query parameters
277
+ # process the header parameters
278
+ # process the form parameters
279
+ # process the body parameter
280
+ if create_member_group_request is not None:
281
+ _body_params = create_member_group_request
282
+
283
+
284
+ # set the HTTP header `Accept`
285
+ _header_params['Accept'] = self.api_client.select_header_accept(
286
+ [
287
+ 'text/plain',
288
+ 'application/json',
289
+ 'text/json'
290
+ ]
291
+ )
292
+
293
+ # set the HTTP header `Content-Type`
294
+ if _content_type:
295
+ _header_params['Content-Type'] = _content_type
296
+ else:
297
+ _default_content_type = (
298
+ self.api_client.select_header_content_type(
299
+ [
300
+ 'text/plain',
301
+ 'application/octet-stream',
302
+ 'application/json',
303
+ 'text/json',
304
+ 'application/*+json'
305
+ ]
306
+ )
307
+ )
308
+ if _default_content_type is not None:
309
+ _header_params['Content-Type'] = _default_content_type
310
+
311
+ # authentication setting
312
+ _auth_settings: List[str] = [
313
+ 'Bearer'
314
+ ]
315
+
316
+ return self.api_client.param_serialize(
317
+ method='POST',
318
+ resource_path='/management/tenants/{tenantId}/member-groups',
319
+ path_params=_path_params,
320
+ query_params=_query_params,
321
+ header_params=_header_params,
322
+ body=_body_params,
323
+ post_params=_form_params,
324
+ files=_files,
325
+ auth_settings=_auth_settings,
326
+ collection_formats=_collection_formats,
327
+ _host=_host,
328
+ _request_auth=_request_auth
329
+ )
330
+
331
+
332
+
333
+
334
+ @validate_call
335
+ def get_member_group(
336
+ self,
337
+ tenant_id: Annotated[StrictStr, Field(description="The ID of the tenant where the member-group belongs to")],
338
+ id: Annotated[StrictStr, Field(description="The ID of the member-group")],
339
+ _request_timeout: Union[
340
+ None,
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Tuple[
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Annotated[StrictFloat, Field(gt=0)]
345
+ ]
346
+ ] = None,
347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
348
+ _content_type: Optional[StrictStr] = None,
349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
351
+ ) -> MemberGroup:
352
+ """Get a member-group by id
353
+
354
+
355
+ :param tenant_id: The ID of the tenant where the member-group belongs to (required)
356
+ :type tenant_id: str
357
+ :param id: The ID of the member-group (required)
358
+ :type id: str
359
+ :param _request_timeout: timeout setting for this request. If one
360
+ number provided, it will be total request
361
+ timeout. It can also be a pair (tuple) of
362
+ (connection, read) timeouts.
363
+ :type _request_timeout: int, tuple(int, int), optional
364
+ :param _request_auth: set to override the auth_settings for an a single
365
+ request; this effectively ignores the
366
+ authentication in the spec for a single request.
367
+ :type _request_auth: dict, optional
368
+ :param _content_type: force content-type for the request.
369
+ :type _content_type: str, Optional
370
+ :param _headers: set to override the headers for a single
371
+ request; this effectively ignores the headers
372
+ in the spec for a single request.
373
+ :type _headers: dict, optional
374
+ :param _host_index: set to override the host_index for a single
375
+ request; this effectively ignores the host_index
376
+ in the spec for a single request.
377
+ :type _host_index: int, optional
378
+ :return: Returns the result object.
379
+ """ # noqa: E501
380
+
381
+ _param = self._get_member_group_serialize(
382
+ tenant_id=tenant_id,
383
+ id=id,
384
+ _request_auth=_request_auth,
385
+ _content_type=_content_type,
386
+ _headers=_headers,
387
+ _host_index=_host_index
388
+ )
389
+
390
+ _response_types_map: Dict[str, Optional[str]] = {
391
+ '401': "ProblemDetails",
392
+ '200': "MemberGroup",
393
+ '404': "ProblemDetails",
394
+ }
395
+ response_data = self.api_client.call_api(
396
+ *_param,
397
+ _request_timeout=_request_timeout
398
+ )
399
+ response_data.read()
400
+ return self.api_client.response_deserialize(
401
+ response_data=response_data,
402
+ response_types_map=_response_types_map,
403
+ ).data
404
+
405
+
406
+ @validate_call
407
+ def get_member_group_with_http_info(
408
+ self,
409
+ tenant_id: Annotated[StrictStr, Field(description="The ID of the tenant where the member-group belongs to")],
410
+ id: Annotated[StrictStr, Field(description="The ID of the member-group")],
411
+ _request_timeout: Union[
412
+ None,
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Tuple[
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Annotated[StrictFloat, Field(gt=0)]
417
+ ]
418
+ ] = None,
419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
420
+ _content_type: Optional[StrictStr] = None,
421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
423
+ ) -> ApiResponse[MemberGroup]:
424
+ """Get a member-group by id
425
+
426
+
427
+ :param tenant_id: The ID of the tenant where the member-group belongs to (required)
428
+ :type tenant_id: str
429
+ :param id: The ID of the member-group (required)
430
+ :type id: str
431
+ :param _request_timeout: timeout setting for this request. If one
432
+ number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :type _request_timeout: int, tuple(int, int), optional
436
+ :param _request_auth: set to override the auth_settings for an a single
437
+ request; this effectively ignores the
438
+ authentication in the spec for a single request.
439
+ :type _request_auth: dict, optional
440
+ :param _content_type: force content-type for the request.
441
+ :type _content_type: str, Optional
442
+ :param _headers: set to override the headers for a single
443
+ request; this effectively ignores the headers
444
+ in the spec for a single request.
445
+ :type _headers: dict, optional
446
+ :param _host_index: set to override the host_index for a single
447
+ request; this effectively ignores the host_index
448
+ in the spec for a single request.
449
+ :type _host_index: int, optional
450
+ :return: Returns the result object.
451
+ """ # noqa: E501
452
+
453
+ _param = self._get_member_group_serialize(
454
+ tenant_id=tenant_id,
455
+ id=id,
456
+ _request_auth=_request_auth,
457
+ _content_type=_content_type,
458
+ _headers=_headers,
459
+ _host_index=_host_index
460
+ )
461
+
462
+ _response_types_map: Dict[str, Optional[str]] = {
463
+ '401': "ProblemDetails",
464
+ '200': "MemberGroup",
465
+ '404': "ProblemDetails",
466
+ }
467
+ response_data = self.api_client.call_api(
468
+ *_param,
469
+ _request_timeout=_request_timeout
470
+ )
471
+ response_data.read()
472
+ return self.api_client.response_deserialize(
473
+ response_data=response_data,
474
+ response_types_map=_response_types_map,
475
+ )
476
+
477
+
478
+ @validate_call
479
+ def get_member_group_without_preload_content(
480
+ self,
481
+ tenant_id: Annotated[StrictStr, Field(description="The ID of the tenant where the member-group belongs to")],
482
+ id: Annotated[StrictStr, Field(description="The ID of the member-group")],
483
+ _request_timeout: Union[
484
+ None,
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Tuple[
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Annotated[StrictFloat, Field(gt=0)]
489
+ ]
490
+ ] = None,
491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
492
+ _content_type: Optional[StrictStr] = None,
493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
495
+ ) -> RESTResponseType:
496
+ """Get a member-group by id
497
+
498
+
499
+ :param tenant_id: The ID of the tenant where the member-group belongs to (required)
500
+ :type tenant_id: str
501
+ :param id: The ID of the member-group (required)
502
+ :type id: str
503
+ :param _request_timeout: timeout setting for this request. If one
504
+ number provided, it will be total request
505
+ timeout. It can also be a pair (tuple) of
506
+ (connection, read) timeouts.
507
+ :type _request_timeout: int, tuple(int, int), optional
508
+ :param _request_auth: set to override the auth_settings for an a single
509
+ request; this effectively ignores the
510
+ authentication in the spec for a single request.
511
+ :type _request_auth: dict, optional
512
+ :param _content_type: force content-type for the request.
513
+ :type _content_type: str, Optional
514
+ :param _headers: set to override the headers for a single
515
+ request; this effectively ignores the headers
516
+ in the spec for a single request.
517
+ :type _headers: dict, optional
518
+ :param _host_index: set to override the host_index for a single
519
+ request; this effectively ignores the host_index
520
+ in the spec for a single request.
521
+ :type _host_index: int, optional
522
+ :return: Returns the result object.
523
+ """ # noqa: E501
524
+
525
+ _param = self._get_member_group_serialize(
526
+ tenant_id=tenant_id,
527
+ id=id,
528
+ _request_auth=_request_auth,
529
+ _content_type=_content_type,
530
+ _headers=_headers,
531
+ _host_index=_host_index
532
+ )
533
+
534
+ _response_types_map: Dict[str, Optional[str]] = {
535
+ '401': "ProblemDetails",
536
+ '200': "MemberGroup",
537
+ '404': "ProblemDetails",
538
+ }
539
+ response_data = self.api_client.call_api(
540
+ *_param,
541
+ _request_timeout=_request_timeout
542
+ )
543
+ return response_data.response
544
+
545
+
546
+ def _get_member_group_serialize(
547
+ self,
548
+ tenant_id,
549
+ id,
550
+ _request_auth,
551
+ _content_type,
552
+ _headers,
553
+ _host_index,
554
+ ) -> RequestSerialized:
555
+
556
+ _host = None
557
+
558
+ _collection_formats: Dict[str, str] = {
559
+ }
560
+
561
+ _path_params: Dict[str, str] = {}
562
+ _query_params: List[Tuple[str, str]] = []
563
+ _header_params: Dict[str, Optional[str]] = _headers or {}
564
+ _form_params: List[Tuple[str, str]] = []
565
+ _files: Dict[str, Union[str, bytes]] = {}
566
+ _body_params: Optional[bytes] = None
567
+
568
+ # process the path parameters
569
+ if tenant_id is not None:
570
+ _path_params['tenantId'] = tenant_id
571
+ if id is not None:
572
+ _path_params['id'] = id
573
+ # process the query parameters
574
+ # process the header parameters
575
+ # process the form parameters
576
+ # process the body parameter
577
+
578
+
579
+ # set the HTTP header `Accept`
580
+ _header_params['Accept'] = self.api_client.select_header_accept(
581
+ [
582
+ 'text/plain',
583
+ 'application/json',
584
+ 'text/json'
585
+ ]
586
+ )
587
+
588
+
589
+ # authentication setting
590
+ _auth_settings: List[str] = [
591
+ 'Bearer'
592
+ ]
593
+
594
+ return self.api_client.param_serialize(
595
+ method='GET',
596
+ resource_path='/management/tenants/{tenantId}/member-groups/{id}',
597
+ path_params=_path_params,
598
+ query_params=_query_params,
599
+ header_params=_header_params,
600
+ body=_body_params,
601
+ post_params=_form_params,
602
+ files=_files,
603
+ auth_settings=_auth_settings,
604
+ collection_formats=_collection_formats,
605
+ _host=_host,
606
+ _request_auth=_request_auth
607
+ )
608
+
609
+