regula-facesdk-webclient 7.2.388.dev0__py3-none-any.whl → 8.1.433.dev0__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 (227) hide show
  1. regula/facesdk/webclient/__init__.py +5 -5
  2. regula/facesdk/webclient/ext/api/group_api.py +2 -27
  3. regula/facesdk/webclient/ext/api/match_api.py +3 -29
  4. regula/facesdk/webclient/ext/api/person_api.py +8 -34
  5. regula/facesdk/webclient/ext/api/sdk.py +5 -3
  6. regula/facesdk/webclient/ext/api/search_api.py +2 -6
  7. regula/facesdk/webclient/ext/models/detect_request.py +6 -5
  8. regula/facesdk/webclient/ext/models/match_image.py +3 -3
  9. regula/facesdk/webclient/ext/models/match_request.py +7 -5
  10. regula/facesdk/webclient/gen/__init__.py +349 -18
  11. regula/facesdk/webclient/gen/api/__init__.py +30 -3
  12. regula/facesdk/webclient/gen/api/group_api.py +1854 -799
  13. regula/facesdk/webclient/gen/api/healthcheck_api.py +475 -215
  14. regula/facesdk/webclient/gen/api/liveness20_api.py +565 -0
  15. regula/facesdk/webclient/gen/api/match_api.py +801 -355
  16. regula/facesdk/webclient/gen/api/person_api.py +2399 -1039
  17. regula/facesdk/webclient/gen/api/search_api.py +286 -130
  18. regula/facesdk/webclient/gen/api_client.py +577 -476
  19. regula/facesdk/webclient/gen/api_response.py +21 -0
  20. regula/facesdk/webclient/gen/configuration.py +231 -105
  21. regula/facesdk/webclient/gen/exceptions.py +82 -33
  22. regula/facesdk/webclient/gen/models/__init__.py +202 -95
  23. regula/facesdk/webclient/gen/models/add_image_to_person_request.py +96 -0
  24. regula/facesdk/webclient/gen/models/add_image_to_person_request_data.py +92 -0
  25. regula/facesdk/webclient/gen/models/add_image_to_person_request_image.py +92 -0
  26. regula/facesdk/webclient/gen/models/add_image_to_person_response.py +92 -0
  27. regula/facesdk/webclient/gen/models/attribute_config.py +83 -0
  28. regula/facesdk/webclient/gen/models/attributes_data.py +82 -0
  29. regula/facesdk/webclient/gen/models/crop.py +88 -0
  30. regula/facesdk/webclient/gen/models/detail_item.py +136 -0
  31. regula/facesdk/webclient/gen/models/detect_attributes_details.py +84 -0
  32. regula/facesdk/webclient/gen/models/detect_details_meta.py +86 -0
  33. regula/facesdk/webclient/gen/models/detect_meta_data.py +84 -0
  34. regula/facesdk/webclient/gen/models/detect_request.py +94 -0
  35. regula/facesdk/webclient/gen/models/detect_request_data.py +90 -0
  36. regula/facesdk/webclient/gen/models/detect_response.py +89 -0
  37. regula/facesdk/webclient/gen/models/detect_response_results.py +86 -0
  38. regula/facesdk/webclient/gen/models/detect_result.py +98 -0
  39. regula/facesdk/webclient/gen/models/detection.py +98 -0
  40. regula/facesdk/webclient/gen/models/detection_attributes.py +92 -0
  41. regula/facesdk/webclient/gen/models/detection_attributes_details_inner.py +132 -0
  42. regula/facesdk/webclient/gen/models/detection_face.py +90 -0
  43. regula/facesdk/webclient/gen/models/detection_quality.py +107 -0
  44. regula/facesdk/webclient/gen/models/device_info.py +111 -0
  45. regula/facesdk/webclient/gen/models/face_attribute.py +40 -0
  46. regula/facesdk/webclient/gen/models/face_image_quality_align_type.py +32 -0
  47. regula/facesdk/webclient/gen/models/face_image_quality_groups.py +35 -0
  48. regula/facesdk/webclient/gen/models/face_image_quality_groups_strings.py +35 -0
  49. regula/facesdk/webclient/gen/models/face_image_quality_status.py +30 -0
  50. regula/facesdk/webclient/gen/models/face_quality_config_name.py +75 -0
  51. regula/facesdk/webclient/gen/models/face_quality_scenarios.py +37 -0
  52. regula/facesdk/webclient/gen/models/face_sdk_result.py +83 -0
  53. regula/facesdk/webclient/gen/models/face_sdk_result_code.py +68 -0
  54. regula/facesdk/webclient/gen/models/faces_response.py +100 -0
  55. regula/facesdk/webclient/gen/models/faces_response_data.py +90 -0
  56. regula/facesdk/webclient/gen/models/filter_op.py +29 -0
  57. regula/facesdk/webclient/gen/models/filter_search_request.py +87 -0
  58. regula/facesdk/webclient/gen/models/group.py +89 -0
  59. regula/facesdk/webclient/gen/models/group_data.py +85 -0
  60. regula/facesdk/webclient/gen/models/group_page.py +94 -0
  61. regula/facesdk/webclient/gen/models/group_page_items.py +90 -0
  62. regula/facesdk/webclient/gen/models/group_response.py +84 -0
  63. regula/facesdk/webclient/gen/models/group_to_create.py +86 -0
  64. regula/facesdk/webclient/gen/models/image.py +96 -0
  65. regula/facesdk/webclient/gen/models/image_fields.py +100 -0
  66. regula/facesdk/webclient/gen/models/image_fields_image.py +92 -0
  67. regula/facesdk/webclient/gen/models/image_page.py +94 -0
  68. regula/facesdk/webclient/gen/models/image_page_items.py +90 -0
  69. regula/facesdk/webclient/gen/models/image_source.py +34 -0
  70. regula/facesdk/webclient/gen/models/liveness_type.py +29 -0
  71. regula/facesdk/webclient/gen/models/match_and_search_request.py +103 -0
  72. regula/facesdk/webclient/gen/models/match_and_search_request_images_item.py +87 -0
  73. regula/facesdk/webclient/gen/models/match_and_search_response.py +107 -0
  74. regula/facesdk/webclient/gen/models/match_and_search_response_data.py +104 -0
  75. regula/facesdk/webclient/gen/models/match_and_search_response_data_detections_item.py +95 -0
  76. regula/facesdk/webclient/gen/models/match_image.py +89 -0
  77. regula/facesdk/webclient/gen/models/match_image_detection.py +95 -0
  78. regula/facesdk/webclient/gen/models/match_image_result.py +97 -0
  79. regula/facesdk/webclient/gen/models/match_request.py +102 -0
  80. regula/facesdk/webclient/gen/models/match_request_data.py +98 -0
  81. regula/facesdk/webclient/gen/models/match_response.py +105 -0
  82. regula/facesdk/webclient/gen/models/match_response_data.py +102 -0
  83. regula/facesdk/webclient/gen/models/operation_log.py +88 -0
  84. regula/facesdk/webclient/gen/models/output_image_params.py +89 -0
  85. regula/facesdk/webclient/gen/models/page.py +84 -0
  86. regula/facesdk/webclient/gen/models/person.py +97 -0
  87. regula/facesdk/webclient/gen/models/person_data.py +87 -0
  88. regula/facesdk/webclient/gen/models/person_fields.py +91 -0
  89. regula/facesdk/webclient/gen/models/person_items.py +90 -0
  90. regula/facesdk/webclient/gen/models/person_to_update_fields.py +89 -0
  91. regula/facesdk/webclient/gen/models/person_with_images.py +107 -0
  92. regula/facesdk/webclient/gen/models/person_with_images_data.py +90 -0
  93. regula/facesdk/webclient/gen/models/persons_page.py +94 -0
  94. regula/facesdk/webclient/gen/models/process_param.py +103 -0
  95. regula/facesdk/webclient/gen/models/process_param_attributes.py +90 -0
  96. regula/facesdk/webclient/gen/models/quality_config.py +86 -0
  97. regula/facesdk/webclient/gen/models/quality_detail.py +94 -0
  98. regula/facesdk/webclient/gen/models/quality_details_groups.py +90 -0
  99. regula/facesdk/webclient/gen/models/quality_request.py +93 -0
  100. regula/facesdk/webclient/gen/models/recognize_image.py +100 -0
  101. regula/facesdk/webclient/gen/models/recognize_image_data.py +84 -0
  102. regula/facesdk/webclient/gen/models/resize_options.py +86 -0
  103. regula/facesdk/webclient/gen/models/search_bad_params.py +86 -0
  104. regula/facesdk/webclient/gen/models/search_detection.py +102 -0
  105. regula/facesdk/webclient/gen/models/search_parameters.py +95 -0
  106. regula/facesdk/webclient/gen/models/search_parameters_create_person.py +86 -0
  107. regula/facesdk/webclient/gen/models/search_person.py +113 -0
  108. regula/facesdk/webclient/gen/models/search_person_data.py +96 -0
  109. regula/facesdk/webclient/gen/models/search_request.py +119 -0
  110. regula/facesdk/webclient/gen/models/search_result.py +92 -0
  111. regula/facesdk/webclient/gen/models/transaction_info.py +99 -0
  112. regula/facesdk/webclient/gen/models/transaction_labels.py +84 -0
  113. regula/facesdk/webclient/gen/models/update_group.py +85 -0
  114. regula/facesdk/webclient/gen/py.typed +0 -0
  115. regula/facesdk/webclient/gen/rest.py +136 -232
  116. {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/METADATA +7 -4
  117. regula_facesdk_webclient-8.1.433.dev0.dist-info/RECORD +125 -0
  118. {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/WHEEL +1 -1
  119. regula/facesdk/webclient/gen/api/diagnostics_api.py +0 -162
  120. regula/facesdk/webclient/gen/api/liveness_2_0_api.py +0 -306
  121. regula/facesdk/webclient/gen/api/liveness_api.py +0 -424
  122. regula/facesdk/webclient/gen/apis/__init__.py +0 -22
  123. regula/facesdk/webclient/gen/model/__init__.py +0 -5
  124. regula/facesdk/webclient/gen/model/add_image_to_person_request.py +0 -261
  125. regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +0 -204
  126. regula/facesdk/webclient/gen/model/add_image_to_person_response.py +0 -262
  127. regula/facesdk/webclient/gen/model/attribute_config.py +0 -120
  128. regula/facesdk/webclient/gen/model/attribute_config_list.py +0 -92
  129. regula/facesdk/webclient/gen/model/crop.py +0 -180
  130. regula/facesdk/webclient/gen/model/detect_attributes_details.py +0 -150
  131. regula/facesdk/webclient/gen/model/detect_details_meta.py +0 -178
  132. regula/facesdk/webclient/gen/model/detect_request.py +0 -232
  133. regula/facesdk/webclient/gen/model/detect_request_attributes.py +0 -120
  134. regula/facesdk/webclient/gen/model/detect_response.py +0 -147
  135. regula/facesdk/webclient/gen/model/detect_response_all_of.py +0 -120
  136. regula/facesdk/webclient/gen/model/detect_result.py +0 -235
  137. regula/facesdk/webclient/gen/model/detection.py +0 -230
  138. regula/facesdk/webclient/gen/model/detection_attributes.py +0 -150
  139. regula/facesdk/webclient/gen/model/detection_face.py +0 -232
  140. regula/facesdk/webclient/gen/model/detection_quality.py +0 -234
  141. regula/facesdk/webclient/gen/model/device_info.py +0 -231
  142. regula/facesdk/webclient/gen/model/face_align_type_quality.py +0 -109
  143. regula/facesdk/webclient/gen/model/face_attribute.py +0 -133
  144. regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +0 -109
  145. regula/facesdk/webclient/gen/model/face_image_quality_groups.py +0 -118
  146. regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +0 -118
  147. regula/facesdk/webclient/gen/model/face_image_quality_status.py +0 -103
  148. regula/facesdk/webclient/gen/model/face_quality_config_name.py +0 -238
  149. regula/facesdk/webclient/gen/model/face_quality_scenarios.py +0 -124
  150. regula/facesdk/webclient/gen/model/face_quality_status.py +0 -103
  151. regula/facesdk/webclient/gen/model/face_rectangular.py +0 -92
  152. regula/facesdk/webclient/gen/model/face_sdk_result.py +0 -121
  153. regula/facesdk/webclient/gen/model/face_sdk_result_code.py +0 -217
  154. regula/facesdk/webclient/gen/model/faces_response.py +0 -258
  155. regula/facesdk/webclient/gen/model/faces_response_all_of.py +0 -148
  156. regula/facesdk/webclient/gen/model/filter_op.py +0 -100
  157. regula/facesdk/webclient/gen/model/filter_search_request.py +0 -176
  158. regula/facesdk/webclient/gen/model/group.py +0 -206
  159. regula/facesdk/webclient/gen/model/group_all_of.py +0 -150
  160. regula/facesdk/webclient/gen/model/group_page.py +0 -178
  161. regula/facesdk/webclient/gen/model/group_page_all_of.py +0 -122
  162. regula/facesdk/webclient/gen/model/group_response.py +0 -150
  163. regula/facesdk/webclient/gen/model/group_to_create.py +0 -180
  164. regula/facesdk/webclient/gen/model/image.py +0 -318
  165. regula/facesdk/webclient/gen/model/image_fields.py +0 -258
  166. regula/facesdk/webclient/gen/model/image_fields_image.py +0 -204
  167. regula/facesdk/webclient/gen/model/image_page.py +0 -176
  168. regula/facesdk/webclient/gen/model/image_page_all_of.py +0 -120
  169. regula/facesdk/webclient/gen/model/image_source.py +0 -115
  170. regula/facesdk/webclient/gen/model/liveness_transaction.py +0 -334
  171. regula/facesdk/webclient/gen/model/liveness_type.py +0 -100
  172. regula/facesdk/webclient/gen/model/match_and_search_request.py +0 -290
  173. regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +0 -234
  174. regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +0 -148
  175. regula/facesdk/webclient/gen/model/match_and_search_request_images.py +0 -176
  176. regula/facesdk/webclient/gen/model/match_and_search_response.py +0 -233
  177. regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +0 -206
  178. regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +0 -176
  179. regula/facesdk/webclient/gen/model/match_image.py +0 -205
  180. regula/facesdk/webclient/gen/model/match_image_detection.py +0 -178
  181. regula/facesdk/webclient/gen/model/match_image_result.py +0 -316
  182. regula/facesdk/webclient/gen/model/match_request.py +0 -233
  183. regula/facesdk/webclient/gen/model/match_request_output_image_params.py +0 -148
  184. regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +0 -212
  185. regula/facesdk/webclient/gen/model/match_response.py +0 -205
  186. regula/facesdk/webclient/gen/model/match_response_all_of.py +0 -178
  187. regula/facesdk/webclient/gen/model/operation_log.py +0 -206
  188. regula/facesdk/webclient/gen/model/output_image_params.py +0 -146
  189. regula/facesdk/webclient/gen/model/page.py +0 -150
  190. regula/facesdk/webclient/gen/model/person.py +0 -319
  191. regula/facesdk/webclient/gen/model/person_all_of.py +0 -206
  192. regula/facesdk/webclient/gen/model/person_created_response.py +0 -178
  193. regula/facesdk/webclient/gen/model/person_fields.py +0 -235
  194. regula/facesdk/webclient/gen/model/person_to_update_fields.py +0 -206
  195. regula/facesdk/webclient/gen/model/person_with_images.py +0 -347
  196. regula/facesdk/webclient/gen/model/person_with_images_all_of.py +0 -122
  197. regula/facesdk/webclient/gen/model/persons_page.py +0 -176
  198. regula/facesdk/webclient/gen/model/persons_page_all_of.py +0 -120
  199. regula/facesdk/webclient/gen/model/persons_request.py +0 -291
  200. regula/facesdk/webclient/gen/model/persons_request_all_of.py +0 -150
  201. regula/facesdk/webclient/gen/model/process_param.py +0 -226
  202. regula/facesdk/webclient/gen/model/process_param_attributes.py +0 -120
  203. regula/facesdk/webclient/gen/model/quality_config.py +0 -154
  204. regula/facesdk/webclient/gen/model/quality_config_list.py +0 -92
  205. regula/facesdk/webclient/gen/model/quality_detail.py +0 -234
  206. regula/facesdk/webclient/gen/model/quality_details_groups.py +0 -202
  207. regula/facesdk/webclient/gen/model/quality_request.py +0 -146
  208. regula/facesdk/webclient/gen/model/recognize_image.py +0 -374
  209. regula/facesdk/webclient/gen/model/recognize_image_all_of.py +0 -150
  210. regula/facesdk/webclient/gen/model/resize_options.py +0 -178
  211. regula/facesdk/webclient/gen/model/rgb.py +0 -92
  212. regula/facesdk/webclient/gen/model/search_bad_params.py +0 -172
  213. regula/facesdk/webclient/gen/model/search_detection.py +0 -398
  214. regula/facesdk/webclient/gen/model/search_parameters.py +0 -174
  215. regula/facesdk/webclient/gen/model/search_parameters_create_person.py +0 -177
  216. regula/facesdk/webclient/gen/model/search_person.py +0 -373
  217. regula/facesdk/webclient/gen/model/search_person_all_of.py +0 -148
  218. regula/facesdk/webclient/gen/model/search_request.py +0 -394
  219. regula/facesdk/webclient/gen/model/search_request_all_of.py +0 -150
  220. regula/facesdk/webclient/gen/model/search_result.py +0 -150
  221. regula/facesdk/webclient/gen/model/search_result_all_of.py +0 -122
  222. regula/facesdk/webclient/gen/model/transaction_config.py +0 -92
  223. regula/facesdk/webclient/gen/model/transaction_info.py +0 -344
  224. regula/facesdk/webclient/gen/model/update_group.py +0 -150
  225. regula/facesdk/webclient/gen/model_utils.py +0 -2037
  226. regula_facesdk_webclient-7.2.388.dev0.dist-info/RECORD +0 -138
  227. {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/top_level.txt +0 -0
@@ -1,750 +1,1585 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- Regula Face SDK Web API
5
-
6
- <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
7
-
8
- The version of the OpenAPI document: 7.2.0
9
4
  Generated by: https://openapi-generator.tech
10
5
  """
11
-
12
-
13
- from __future__ import absolute_import
14
-
15
- import re # noqa: F401
16
-
17
- # python 2 and python 3 compatibility library
18
- import six
19
-
20
- from regula.facesdk.webclient.gen.api_client import ApiClient
21
- from regula.facesdk.webclient.gen.exceptions import ( # noqa: F401
22
- ApiTypeError,
23
- ApiValueError
24
- )
25
-
26
-
27
- class GroupApi(object):
6
+ import warnings
7
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
8
+ from typing import Any, Dict, List, Optional, Tuple, Union
9
+ from typing_extensions import Annotated
10
+
11
+ from pydantic import Field, StrictInt, StrictStr
12
+ from typing import Optional
13
+ from typing_extensions import Annotated
14
+ from uuid import UUID
15
+ from regula.facesdk.webclient.gen.models.group import Group
16
+ from regula.facesdk.webclient.gen.models.group_page import GroupPage
17
+ from regula.facesdk.webclient.gen.models.group_to_create import GroupToCreate
18
+ from regula.facesdk.webclient.gen.models.persons_page import PersonsPage
19
+ from regula.facesdk.webclient.gen.models.update_group import UpdateGroup
20
+
21
+ from regula.facesdk.webclient.gen.api_client import ApiClient, RequestSerialized
22
+ from regula.facesdk.webclient.gen.api_response import ApiResponse
23
+ from regula.facesdk.webclient.gen.rest import RESTResponseType
24
+
25
+
26
+ class GroupApi:
28
27
  """NOTE: This class is auto generated by OpenAPI Generator
29
28
  Ref: https://openapi-generator.tech
30
29
 
31
30
  Do not edit the class manually.
32
31
  """
33
32
 
34
- def __init__(self, api_client=None):
33
+ def __init__(self, api_client=None) -> None:
35
34
  if api_client is None:
36
- api_client = ApiClient()
35
+ api_client = ApiClient.get_default()
37
36
  self.api_client = api_client
38
37
 
39
- def create_group(self, group_to_create, **kwargs): # noqa: E501
40
- """Create group # noqa: E501
41
38
 
42
- This method makes a synchronous HTTP request by default. To make an
43
- asynchronous HTTP request, please pass async_req=True
39
+ @validate_call
40
+ def create_group(
41
+ self,
42
+ group_to_create: Annotated[GroupToCreate, Field(description="Request body for the group to create.")],
43
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Annotated[StrictFloat, Field(gt=0)]
50
+ ]
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> Group:
57
+ """Create group
44
58
 
45
- >>> thread = api.create_group(group_to_create, async_req=True)
46
- >>> result = thread.get()
47
59
 
48
60
  :param group_to_create: Request body for the group to create. (required)
49
61
  :type group_to_create: GroupToCreate
50
62
  :param x_request_id: Request header label.
51
63
  :type x_request_id: str
52
- :param async_req: Whether to execute the request asynchronously.
53
- :type async_req: bool, optional
54
- :param _preload_content: if False, the urllib3.HTTPResponse object will
55
- be returned without reading/decoding response
56
- data. Default is True.
57
- :type _preload_content: bool, optional
58
64
  :param _request_timeout: timeout setting for this request. If one
59
65
  number provided, it will be total request
60
66
  timeout. It can also be a pair (tuple) of
61
67
  (connection, read) timeouts.
68
+ :type _request_timeout: int, tuple(int, int), optional
69
+ :param _request_auth: set to override the auth_settings for an a single
70
+ request; this effectively ignores the
71
+ authentication in the spec for a single request.
72
+ :type _request_auth: dict, optional
73
+ :param _content_type: force content-type for the request.
74
+ :type _content_type: str, Optional
75
+ :param _headers: set to override the headers for a single
76
+ request; this effectively ignores the headers
77
+ in the spec for a single request.
78
+ :type _headers: dict, optional
79
+ :param _host_index: set to override the host_index for a single
80
+ request; this effectively ignores the host_index
81
+ in the spec for a single request.
82
+ :type _host_index: int, optional
62
83
  :return: Returns the result object.
63
- If the method is called asynchronously,
64
- returns the request thread.
65
- :rtype: Group
66
- """
67
- kwargs['_return_http_data_only'] = True
68
- return self.create_group_with_http_info(group_to_create, **kwargs) # noqa: E501
84
+ """ # noqa: E501
85
+
86
+ _param = self._create_group_serialize(
87
+ group_to_create=group_to_create,
88
+ x_request_id=x_request_id,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ '201': "Group",
97
+ '400': "OperationLog",
98
+ }
99
+ response_data = self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ def create_group_with_http_info(
112
+ self,
113
+ group_to_create: Annotated[GroupToCreate, Field(description="Request body for the group to create.")],
114
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[Group]:
128
+ """Create group
129
+
130
+
131
+ :param group_to_create: Request body for the group to create. (required)
132
+ :type group_to_create: GroupToCreate
133
+ :param x_request_id: Request header label.
134
+ :type x_request_id: str
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._create_group_serialize(
158
+ group_to_create=group_to_create,
159
+ x_request_id=x_request_id,
160
+ _request_auth=_request_auth,
161
+ _content_type=_content_type,
162
+ _headers=_headers,
163
+ _host_index=_host_index
164
+ )
165
+
166
+ _response_types_map: Dict[str, Optional[str]] = {
167
+ '201': "Group",
168
+ '400': "OperationLog",
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
69
179
 
70
- def create_group_with_http_info(self, group_to_create, **kwargs): # noqa: E501
71
- """Create group # noqa: E501
72
180
 
73
- This method makes a synchronous HTTP request by default. To make an
74
- asynchronous HTTP request, please pass async_req=True
181
+ @validate_call
182
+ def create_group_without_preload_content(
183
+ self,
184
+ group_to_create: Annotated[GroupToCreate, Field(description="Request body for the group to create.")],
185
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Annotated[StrictFloat, Field(gt=0)]
192
+ ]
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Create group
75
200
 
76
- >>> thread = api.create_group_with_http_info(group_to_create, async_req=True)
77
- >>> result = thread.get()
78
201
 
79
202
  :param group_to_create: Request body for the group to create. (required)
80
203
  :type group_to_create: GroupToCreate
81
204
  :param x_request_id: Request header label.
82
205
  :type x_request_id: str
83
- :param async_req: Whether to execute the request asynchronously.
84
- :type async_req: bool, optional
85
- :param _return_http_data_only: response data without head status code
86
- and headers
87
- :type _return_http_data_only: bool, optional
88
- :param _preload_content: if False, the urllib3.HTTPResponse object will
89
- be returned without reading/decoding response
90
- data. Default is True.
91
- :type _preload_content: bool, optional
92
206
  :param _request_timeout: timeout setting for this request. If one
93
207
  number provided, it will be total request
94
208
  timeout. It can also be a pair (tuple) of
95
209
  (connection, read) timeouts.
210
+ :type _request_timeout: int, tuple(int, int), optional
96
211
  :param _request_auth: set to override the auth_settings for an a single
97
- request; this effectively ignores the authentication
98
- in the spec for a single request.
212
+ request; this effectively ignores the
213
+ authentication in the spec for a single request.
99
214
  :type _request_auth: dict, optional
215
+ :param _content_type: force content-type for the request.
216
+ :type _content_type: str, Optional
217
+ :param _headers: set to override the headers for a single
218
+ request; this effectively ignores the headers
219
+ in the spec for a single request.
220
+ :type _headers: dict, optional
221
+ :param _host_index: set to override the host_index for a single
222
+ request; this effectively ignores the host_index
223
+ in the spec for a single request.
224
+ :type _host_index: int, optional
100
225
  :return: Returns the result object.
101
- If the method is called asynchronously,
102
- returns the request thread.
103
- :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict))
104
- """
226
+ """ # noqa: E501
227
+
228
+ _param = self._create_group_serialize(
229
+ group_to_create=group_to_create,
230
+ x_request_id=x_request_id,
231
+ _request_auth=_request_auth,
232
+ _content_type=_content_type,
233
+ _headers=_headers,
234
+ _host_index=_host_index
235
+ )
105
236
 
106
- local_var_params = locals()
237
+ _response_types_map: Dict[str, Optional[str]] = {
238
+ '201': "Group",
239
+ '400': "OperationLog",
240
+ }
241
+ response_data = self.api_client.call_api(
242
+ *_param,
243
+ _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+
248
+ def _create_group_serialize(
249
+ self,
250
+ group_to_create,
251
+ x_request_id,
252
+ _request_auth,
253
+ _content_type,
254
+ _headers,
255
+ _host_index,
256
+ ) -> RequestSerialized:
257
+
258
+ _host = None
259
+
260
+ _collection_formats: Dict[str, str] = {
261
+ }
262
+
263
+ _path_params: Dict[str, str] = {}
264
+ _query_params: List[Tuple[str, str]] = []
265
+ _header_params: Dict[str, Optional[str]] = _headers or {}
266
+ _form_params: List[Tuple[str, str]] = []
267
+ _files: Dict[
268
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
269
+ ] = {}
270
+ _body_params: Optional[bytes] = None
271
+
272
+ # process the path parameters
273
+ # process the query parameters
274
+ # process the header parameters
275
+ if x_request_id is not None:
276
+ _header_params['X-RequestID'] = x_request_id
277
+ # process the form parameters
278
+ # process the body parameter
279
+ if group_to_create is not None:
280
+ _body_params = group_to_create
281
+
282
+
283
+ # set the HTTP header `Accept`
284
+ if 'Accept' not in _header_params:
285
+ _header_params['Accept'] = self.api_client.select_header_accept(
286
+ [
287
+ 'application/json'
288
+ ]
289
+ )
290
+
291
+ # set the HTTP header `Content-Type`
292
+ if _content_type:
293
+ _header_params['Content-Type'] = _content_type
294
+ else:
295
+ _default_content_type = (
296
+ self.api_client.select_header_content_type(
297
+ [
298
+ 'application/json'
299
+ ]
300
+ )
301
+ )
302
+ if _default_content_type is not None:
303
+ _header_params['Content-Type'] = _default_content_type
107
304
 
108
- all_params = [
109
- 'group_to_create',
110
- 'x_request_id',
305
+ # authentication setting
306
+ _auth_settings: List[str] = [
111
307
  ]
112
- all_params.extend(
113
- [
114
- 'async_req',
115
- '_return_http_data_only',
116
- '_preload_content',
117
- '_request_timeout',
118
- '_request_auth'
308
+
309
+ return self.api_client.param_serialize(
310
+ method='POST',
311
+ resource_path='/api/groups',
312
+ path_params=_path_params,
313
+ query_params=_query_params,
314
+ header_params=_header_params,
315
+ body=_body_params,
316
+ post_params=_form_params,
317
+ files=_files,
318
+ auth_settings=_auth_settings,
319
+ collection_formats=_collection_formats,
320
+ _host=_host,
321
+ _request_auth=_request_auth
322
+ )
323
+
324
+
325
+
326
+
327
+ @validate_call
328
+ def delete_group(
329
+ self,
330
+ group_id: Annotated[UUID, Field(description="Group ID.")],
331
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
332
+ _request_timeout: Union[
333
+ None,
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Tuple[
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Annotated[StrictFloat, Field(gt=0)]
119
338
  ]
339
+ ] = None,
340
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
341
+ _content_type: Optional[StrictStr] = None,
342
+ _headers: Optional[Dict[StrictStr, Any]] = None,
343
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
344
+ ) -> None:
345
+ """Delete group
346
+
347
+
348
+ :param group_id: Group ID. (required)
349
+ :type group_id: str
350
+ :param x_request_id: Request header label.
351
+ :type x_request_id: str
352
+ :param _request_timeout: timeout setting for this request. If one
353
+ number provided, it will be total request
354
+ timeout. It can also be a pair (tuple) of
355
+ (connection, read) timeouts.
356
+ :type _request_timeout: int, tuple(int, int), optional
357
+ :param _request_auth: set to override the auth_settings for an a single
358
+ request; this effectively ignores the
359
+ authentication in the spec for a single request.
360
+ :type _request_auth: dict, optional
361
+ :param _content_type: force content-type for the request.
362
+ :type _content_type: str, Optional
363
+ :param _headers: set to override the headers for a single
364
+ request; this effectively ignores the headers
365
+ in the spec for a single request.
366
+ :type _headers: dict, optional
367
+ :param _host_index: set to override the host_index for a single
368
+ request; this effectively ignores the host_index
369
+ in the spec for a single request.
370
+ :type _host_index: int, optional
371
+ :return: Returns the result object.
372
+ """ # noqa: E501
373
+
374
+ _param = self._delete_group_serialize(
375
+ group_id=group_id,
376
+ x_request_id=x_request_id,
377
+ _request_auth=_request_auth,
378
+ _content_type=_content_type,
379
+ _headers=_headers,
380
+ _host_index=_host_index
120
381
  )
121
382
 
122
- for key, val in six.iteritems(local_var_params['kwargs']):
123
- if key not in all_params:
124
- raise ApiTypeError(
125
- "Got an unexpected keyword argument '%s'"
126
- " to method create_group" % key
127
- )
128
- local_var_params[key] = val
129
- del local_var_params['kwargs']
130
- # verify the required parameter 'group_to_create' is set
131
- if self.api_client.client_side_validation and ('group_to_create' not in local_var_params or # noqa: E501
132
- local_var_params['group_to_create'] is None): # noqa: E501
133
- raise ApiValueError("Missing the required parameter `group_to_create` when calling `create_group`") # noqa: E501
134
-
135
- collection_formats = {}
136
-
137
- path_params = {}
138
-
139
- query_params = []
140
-
141
- header_params = {}
142
- if 'x_request_id' in local_var_params:
143
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
144
-
145
- form_params = []
146
- local_var_files = {}
147
-
148
- body_params = None
149
- if 'group_to_create' in local_var_params:
150
- body_params = local_var_params['group_to_create']
151
- # HTTP header `Accept`
152
- header_params['Accept'] = self.api_client.select_header_accept(
153
- ['application/json']) # noqa: E501
154
-
155
- # HTTP header `Content-Type`
156
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
157
- ['application/json']) # noqa: E501
158
-
159
- # Authentication setting
160
- auth_settings = [] # noqa: E501
161
-
162
- return self.api_client.call_api(
163
- '/api/groups', 'POST',
164
- path_params,
165
- query_params,
166
- header_params,
167
- body=body_params,
168
- post_params=form_params,
169
- files=local_var_files,
170
- response_type='Group', # noqa: E501
171
- auth_settings=auth_settings,
172
- async_req=local_var_params.get('async_req'),
173
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
174
- _preload_content=local_var_params.get('_preload_content', True),
175
- _request_timeout=local_var_params.get('_request_timeout'),
176
- collection_formats=collection_formats,
177
- _request_auth=local_var_params.get('_request_auth'))
178
-
179
- def delete_group(self, group_id, **kwargs): # noqa: E501
180
- """Delete group # noqa: E501
181
-
182
- This method makes a synchronous HTTP request by default. To make an
183
- asynchronous HTTP request, please pass async_req=True
184
-
185
- >>> thread = api.delete_group(group_id, async_req=True)
186
- >>> result = thread.get()
383
+ _response_types_map: Dict[str, Optional[str]] = {
384
+ '204': None,
385
+ '404': "OperationLog",
386
+ }
387
+ response_data = self.api_client.call_api(
388
+ *_param,
389
+ _request_timeout=_request_timeout
390
+ )
391
+ response_data.read()
392
+ return self.api_client.response_deserialize(
393
+ response_data=response_data,
394
+ response_types_map=_response_types_map,
395
+ ).data
396
+
397
+
398
+ @validate_call
399
+ def delete_group_with_http_info(
400
+ self,
401
+ group_id: Annotated[UUID, Field(description="Group ID.")],
402
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
403
+ _request_timeout: Union[
404
+ None,
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Tuple[
407
+ Annotated[StrictFloat, Field(gt=0)],
408
+ Annotated[StrictFloat, Field(gt=0)]
409
+ ]
410
+ ] = None,
411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
412
+ _content_type: Optional[StrictStr] = None,
413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
415
+ ) -> ApiResponse[None]:
416
+ """Delete group
417
+
187
418
 
188
419
  :param group_id: Group ID. (required)
189
420
  :type group_id: str
190
421
  :param x_request_id: Request header label.
191
422
  :type x_request_id: str
192
- :param async_req: Whether to execute the request asynchronously.
193
- :type async_req: bool, optional
194
- :param _preload_content: if False, the urllib3.HTTPResponse object will
195
- be returned without reading/decoding response
196
- data. Default is True.
197
- :type _preload_content: bool, optional
198
423
  :param _request_timeout: timeout setting for this request. If one
199
424
  number provided, it will be total request
200
425
  timeout. It can also be a pair (tuple) of
201
426
  (connection, read) timeouts.
427
+ :type _request_timeout: int, tuple(int, int), optional
428
+ :param _request_auth: set to override the auth_settings for an a single
429
+ request; this effectively ignores the
430
+ authentication in the spec for a single request.
431
+ :type _request_auth: dict, optional
432
+ :param _content_type: force content-type for the request.
433
+ :type _content_type: str, Optional
434
+ :param _headers: set to override the headers for a single
435
+ request; this effectively ignores the headers
436
+ in the spec for a single request.
437
+ :type _headers: dict, optional
438
+ :param _host_index: set to override the host_index for a single
439
+ request; this effectively ignores the host_index
440
+ in the spec for a single request.
441
+ :type _host_index: int, optional
202
442
  :return: Returns the result object.
203
- If the method is called asynchronously,
204
- returns the request thread.
205
- :rtype: None
206
- """
207
- kwargs['_return_http_data_only'] = True
208
- return self.delete_group_with_http_info(group_id, **kwargs) # noqa: E501
443
+ """ # noqa: E501
444
+
445
+ _param = self._delete_group_serialize(
446
+ group_id=group_id,
447
+ x_request_id=x_request_id,
448
+ _request_auth=_request_auth,
449
+ _content_type=_content_type,
450
+ _headers=_headers,
451
+ _host_index=_host_index
452
+ )
209
453
 
210
- def delete_group_with_http_info(self, group_id, **kwargs): # noqa: E501
211
- """Delete group # noqa: E501
454
+ _response_types_map: Dict[str, Optional[str]] = {
455
+ '204': None,
456
+ '404': "OperationLog",
457
+ }
458
+ response_data = self.api_client.call_api(
459
+ *_param,
460
+ _request_timeout=_request_timeout
461
+ )
462
+ response_data.read()
463
+ return self.api_client.response_deserialize(
464
+ response_data=response_data,
465
+ response_types_map=_response_types_map,
466
+ )
212
467
 
213
- This method makes a synchronous HTTP request by default. To make an
214
- asynchronous HTTP request, please pass async_req=True
215
468
 
216
- >>> thread = api.delete_group_with_http_info(group_id, async_req=True)
217
- >>> result = thread.get()
469
+ @validate_call
470
+ def delete_group_without_preload_content(
471
+ self,
472
+ group_id: Annotated[UUID, Field(description="Group ID.")],
473
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
474
+ _request_timeout: Union[
475
+ None,
476
+ Annotated[StrictFloat, Field(gt=0)],
477
+ Tuple[
478
+ Annotated[StrictFloat, Field(gt=0)],
479
+ Annotated[StrictFloat, Field(gt=0)]
480
+ ]
481
+ ] = None,
482
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
483
+ _content_type: Optional[StrictStr] = None,
484
+ _headers: Optional[Dict[StrictStr, Any]] = None,
485
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
486
+ ) -> RESTResponseType:
487
+ """Delete group
488
+
218
489
 
219
490
  :param group_id: Group ID. (required)
220
491
  :type group_id: str
221
492
  :param x_request_id: Request header label.
222
493
  :type x_request_id: str
223
- :param async_req: Whether to execute the request asynchronously.
224
- :type async_req: bool, optional
225
- :param _return_http_data_only: response data without head status code
226
- and headers
227
- :type _return_http_data_only: bool, optional
228
- :param _preload_content: if False, the urllib3.HTTPResponse object will
229
- be returned without reading/decoding response
230
- data. Default is True.
231
- :type _preload_content: bool, optional
232
494
  :param _request_timeout: timeout setting for this request. If one
233
495
  number provided, it will be total request
234
496
  timeout. It can also be a pair (tuple) of
235
497
  (connection, read) timeouts.
498
+ :type _request_timeout: int, tuple(int, int), optional
236
499
  :param _request_auth: set to override the auth_settings for an a single
237
- request; this effectively ignores the authentication
238
- in the spec for a single request.
500
+ request; this effectively ignores the
501
+ authentication in the spec for a single request.
239
502
  :type _request_auth: dict, optional
503
+ :param _content_type: force content-type for the request.
504
+ :type _content_type: str, Optional
505
+ :param _headers: set to override the headers for a single
506
+ request; this effectively ignores the headers
507
+ in the spec for a single request.
508
+ :type _headers: dict, optional
509
+ :param _host_index: set to override the host_index for a single
510
+ request; this effectively ignores the host_index
511
+ in the spec for a single request.
512
+ :type _host_index: int, optional
240
513
  :return: Returns the result object.
241
- If the method is called asynchronously,
242
- returns the request thread.
243
- :rtype: None
244
- """
245
-
246
- local_var_params = locals()
514
+ """ # noqa: E501
515
+
516
+ _param = self._delete_group_serialize(
517
+ group_id=group_id,
518
+ x_request_id=x_request_id,
519
+ _request_auth=_request_auth,
520
+ _content_type=_content_type,
521
+ _headers=_headers,
522
+ _host_index=_host_index
523
+ )
247
524
 
248
- all_params = [
249
- 'group_id',
250
- 'x_request_id',
525
+ _response_types_map: Dict[str, Optional[str]] = {
526
+ '204': None,
527
+ '404': "OperationLog",
528
+ }
529
+ response_data = self.api_client.call_api(
530
+ *_param,
531
+ _request_timeout=_request_timeout
532
+ )
533
+ return response_data.response
534
+
535
+
536
+ def _delete_group_serialize(
537
+ self,
538
+ group_id,
539
+ x_request_id,
540
+ _request_auth,
541
+ _content_type,
542
+ _headers,
543
+ _host_index,
544
+ ) -> RequestSerialized:
545
+
546
+ _host = None
547
+
548
+ _collection_formats: Dict[str, str] = {
549
+ }
550
+
551
+ _path_params: Dict[str, str] = {}
552
+ _query_params: List[Tuple[str, str]] = []
553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
554
+ _form_params: List[Tuple[str, str]] = []
555
+ _files: Dict[
556
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
557
+ ] = {}
558
+ _body_params: Optional[bytes] = None
559
+
560
+ # process the path parameters
561
+ if group_id is not None:
562
+ _path_params['groupId'] = group_id
563
+ # process the query parameters
564
+ # process the header parameters
565
+ if x_request_id is not None:
566
+ _header_params['X-RequestID'] = x_request_id
567
+ # process the form parameters
568
+ # process the body parameter
569
+
570
+
571
+ # set the HTTP header `Accept`
572
+ if 'Accept' not in _header_params:
573
+ _header_params['Accept'] = self.api_client.select_header_accept(
574
+ [
575
+ 'application/json'
576
+ ]
577
+ )
578
+
579
+
580
+ # authentication setting
581
+ _auth_settings: List[str] = [
251
582
  ]
252
- all_params.extend(
253
- [
254
- 'async_req',
255
- '_return_http_data_only',
256
- '_preload_content',
257
- '_request_timeout',
258
- '_request_auth'
259
- ]
583
+
584
+ return self.api_client.param_serialize(
585
+ method='DELETE',
586
+ resource_path='/api/groups/{groupId}',
587
+ path_params=_path_params,
588
+ query_params=_query_params,
589
+ header_params=_header_params,
590
+ body=_body_params,
591
+ post_params=_form_params,
592
+ files=_files,
593
+ auth_settings=_auth_settings,
594
+ collection_formats=_collection_formats,
595
+ _host=_host,
596
+ _request_auth=_request_auth
260
597
  )
261
598
 
262
- for key, val in six.iteritems(local_var_params['kwargs']):
263
- if key not in all_params:
264
- raise ApiTypeError(
265
- "Got an unexpected keyword argument '%s'"
266
- " to method delete_group" % key
267
- )
268
- local_var_params[key] = val
269
- del local_var_params['kwargs']
270
- # verify the required parameter 'group_id' is set
271
- if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501
272
- local_var_params['group_id'] is None): # noqa: E501
273
- raise ApiValueError("Missing the required parameter `group_id` when calling `delete_group`") # noqa: E501
274
-
275
- collection_formats = {}
276
-
277
- path_params = {}
278
- if 'group_id' in local_var_params:
279
- path_params['groupId'] = local_var_params['group_id'] # noqa: E501
280
-
281
- query_params = []
282
-
283
- header_params = {}
284
- if 'x_request_id' in local_var_params:
285
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
286
-
287
- form_params = []
288
- local_var_files = {}
289
-
290
- body_params = None
291
- # HTTP header `Accept`
292
- header_params['Accept'] = self.api_client.select_header_accept(
293
- ['application/json']) # noqa: E501
294
-
295
- # Authentication setting
296
- auth_settings = [] # noqa: E501
297
-
298
- return self.api_client.call_api(
299
- '/api/groups/{groupId}', 'DELETE',
300
- path_params,
301
- query_params,
302
- header_params,
303
- body=body_params,
304
- post_params=form_params,
305
- files=local_var_files,
306
- response_type=None, # noqa: E501
307
- auth_settings=auth_settings,
308
- async_req=local_var_params.get('async_req'),
309
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
310
- _preload_content=local_var_params.get('_preload_content', True),
311
- _request_timeout=local_var_params.get('_request_timeout'),
312
- collection_formats=collection_formats,
313
- _request_auth=local_var_params.get('_request_auth'))
314
-
315
- def get_all_groups(self, **kwargs): # noqa: E501
316
- """Get groups # noqa: E501
317
-
318
- This method makes a synchronous HTTP request by default. To make an
319
- asynchronous HTTP request, please pass async_req=True
320
-
321
- >>> thread = api.get_all_groups(async_req=True)
322
- >>> result = thread.get()
323
599
 
600
+
601
+
602
+ @validate_call
603
+ def get_all_groups(
604
+ self,
605
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
606
+ page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
607
+ size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
608
+ _request_timeout: Union[
609
+ None,
610
+ Annotated[StrictFloat, Field(gt=0)],
611
+ Tuple[
612
+ Annotated[StrictFloat, Field(gt=0)],
613
+ Annotated[StrictFloat, Field(gt=0)]
614
+ ]
615
+ ] = None,
616
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
617
+ _content_type: Optional[StrictStr] = None,
618
+ _headers: Optional[Dict[StrictStr, Any]] = None,
619
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
620
+ ) -> GroupPage:
621
+ """Get groups
622
+
623
+
624
+ :param x_request_id: Request header label.
625
+ :type x_request_id: str
324
626
  :param page: The page number to get a list of persons or groups.
325
627
  :type page: int
326
628
  :param size: The page size with a list of persons or groups, items.
327
629
  :type size: int
630
+ :param _request_timeout: timeout setting for this request. If one
631
+ number provided, it will be total request
632
+ timeout. It can also be a pair (tuple) of
633
+ (connection, read) timeouts.
634
+ :type _request_timeout: int, tuple(int, int), optional
635
+ :param _request_auth: set to override the auth_settings for an a single
636
+ request; this effectively ignores the
637
+ authentication in the spec for a single request.
638
+ :type _request_auth: dict, optional
639
+ :param _content_type: force content-type for the request.
640
+ :type _content_type: str, Optional
641
+ :param _headers: set to override the headers for a single
642
+ request; this effectively ignores the headers
643
+ in the spec for a single request.
644
+ :type _headers: dict, optional
645
+ :param _host_index: set to override the host_index for a single
646
+ request; this effectively ignores the host_index
647
+ in the spec for a single request.
648
+ :type _host_index: int, optional
649
+ :return: Returns the result object.
650
+ """ # noqa: E501
651
+
652
+ _param = self._get_all_groups_serialize(
653
+ x_request_id=x_request_id,
654
+ page=page,
655
+ size=size,
656
+ _request_auth=_request_auth,
657
+ _content_type=_content_type,
658
+ _headers=_headers,
659
+ _host_index=_host_index
660
+ )
661
+
662
+ _response_types_map: Dict[str, Optional[str]] = {
663
+ '200': "GroupPage",
664
+ '400': "OperationLog",
665
+ }
666
+ response_data = self.api_client.call_api(
667
+ *_param,
668
+ _request_timeout=_request_timeout
669
+ )
670
+ response_data.read()
671
+ return self.api_client.response_deserialize(
672
+ response_data=response_data,
673
+ response_types_map=_response_types_map,
674
+ ).data
675
+
676
+
677
+ @validate_call
678
+ def get_all_groups_with_http_info(
679
+ self,
680
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
681
+ page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
682
+ size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
683
+ _request_timeout: Union[
684
+ None,
685
+ Annotated[StrictFloat, Field(gt=0)],
686
+ Tuple[
687
+ Annotated[StrictFloat, Field(gt=0)],
688
+ Annotated[StrictFloat, Field(gt=0)]
689
+ ]
690
+ ] = None,
691
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
692
+ _content_type: Optional[StrictStr] = None,
693
+ _headers: Optional[Dict[StrictStr, Any]] = None,
694
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
695
+ ) -> ApiResponse[GroupPage]:
696
+ """Get groups
697
+
698
+
328
699
  :param x_request_id: Request header label.
329
700
  :type x_request_id: str
330
- :param async_req: Whether to execute the request asynchronously.
331
- :type async_req: bool, optional
332
- :param _preload_content: if False, the urllib3.HTTPResponse object will
333
- be returned without reading/decoding response
334
- data. Default is True.
335
- :type _preload_content: bool, optional
701
+ :param page: The page number to get a list of persons or groups.
702
+ :type page: int
703
+ :param size: The page size with a list of persons or groups, items.
704
+ :type size: int
336
705
  :param _request_timeout: timeout setting for this request. If one
337
706
  number provided, it will be total request
338
707
  timeout. It can also be a pair (tuple) of
339
708
  (connection, read) timeouts.
709
+ :type _request_timeout: int, tuple(int, int), optional
710
+ :param _request_auth: set to override the auth_settings for an a single
711
+ request; this effectively ignores the
712
+ authentication in the spec for a single request.
713
+ :type _request_auth: dict, optional
714
+ :param _content_type: force content-type for the request.
715
+ :type _content_type: str, Optional
716
+ :param _headers: set to override the headers for a single
717
+ request; this effectively ignores the headers
718
+ in the spec for a single request.
719
+ :type _headers: dict, optional
720
+ :param _host_index: set to override the host_index for a single
721
+ request; this effectively ignores the host_index
722
+ in the spec for a single request.
723
+ :type _host_index: int, optional
340
724
  :return: Returns the result object.
341
- If the method is called asynchronously,
342
- returns the request thread.
343
- :rtype: GroupPage
344
- """
345
- kwargs['_return_http_data_only'] = True
346
- return self.get_all_groups_with_http_info(**kwargs) # noqa: E501
725
+ """ # noqa: E501
726
+
727
+ _param = self._get_all_groups_serialize(
728
+ x_request_id=x_request_id,
729
+ page=page,
730
+ size=size,
731
+ _request_auth=_request_auth,
732
+ _content_type=_content_type,
733
+ _headers=_headers,
734
+ _host_index=_host_index
735
+ )
736
+
737
+ _response_types_map: Dict[str, Optional[str]] = {
738
+ '200': "GroupPage",
739
+ '400': "OperationLog",
740
+ }
741
+ response_data = self.api_client.call_api(
742
+ *_param,
743
+ _request_timeout=_request_timeout
744
+ )
745
+ response_data.read()
746
+ return self.api_client.response_deserialize(
747
+ response_data=response_data,
748
+ response_types_map=_response_types_map,
749
+ )
347
750
 
348
- def get_all_groups_with_http_info(self, **kwargs): # noqa: E501
349
- """Get groups # noqa: E501
350
751
 
351
- This method makes a synchronous HTTP request by default. To make an
352
- asynchronous HTTP request, please pass async_req=True
752
+ @validate_call
753
+ def get_all_groups_without_preload_content(
754
+ self,
755
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
756
+ page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
757
+ size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
758
+ _request_timeout: Union[
759
+ None,
760
+ Annotated[StrictFloat, Field(gt=0)],
761
+ Tuple[
762
+ Annotated[StrictFloat, Field(gt=0)],
763
+ Annotated[StrictFloat, Field(gt=0)]
764
+ ]
765
+ ] = None,
766
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
767
+ _content_type: Optional[StrictStr] = None,
768
+ _headers: Optional[Dict[StrictStr, Any]] = None,
769
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
770
+ ) -> RESTResponseType:
771
+ """Get groups
353
772
 
354
- >>> thread = api.get_all_groups_with_http_info(async_req=True)
355
- >>> result = thread.get()
356
773
 
774
+ :param x_request_id: Request header label.
775
+ :type x_request_id: str
357
776
  :param page: The page number to get a list of persons or groups.
358
777
  :type page: int
359
778
  :param size: The page size with a list of persons or groups, items.
360
779
  :type size: int
361
- :param x_request_id: Request header label.
362
- :type x_request_id: str
363
- :param async_req: Whether to execute the request asynchronously.
364
- :type async_req: bool, optional
365
- :param _return_http_data_only: response data without head status code
366
- and headers
367
- :type _return_http_data_only: bool, optional
368
- :param _preload_content: if False, the urllib3.HTTPResponse object will
369
- be returned without reading/decoding response
370
- data. Default is True.
371
- :type _preload_content: bool, optional
372
780
  :param _request_timeout: timeout setting for this request. If one
373
781
  number provided, it will be total request
374
782
  timeout. It can also be a pair (tuple) of
375
783
  (connection, read) timeouts.
784
+ :type _request_timeout: int, tuple(int, int), optional
376
785
  :param _request_auth: set to override the auth_settings for an a single
377
- request; this effectively ignores the authentication
378
- in the spec for a single request.
786
+ request; this effectively ignores the
787
+ authentication in the spec for a single request.
379
788
  :type _request_auth: dict, optional
789
+ :param _content_type: force content-type for the request.
790
+ :type _content_type: str, Optional
791
+ :param _headers: set to override the headers for a single
792
+ request; this effectively ignores the headers
793
+ in the spec for a single request.
794
+ :type _headers: dict, optional
795
+ :param _host_index: set to override the host_index for a single
796
+ request; this effectively ignores the host_index
797
+ in the spec for a single request.
798
+ :type _host_index: int, optional
380
799
  :return: Returns the result object.
381
- If the method is called asynchronously,
382
- returns the request thread.
383
- :rtype: tuple(GroupPage, status_code(int), headers(HTTPHeaderDict))
384
- """
385
-
386
- local_var_params = locals()
800
+ """ # noqa: E501
801
+
802
+ _param = self._get_all_groups_serialize(
803
+ x_request_id=x_request_id,
804
+ page=page,
805
+ size=size,
806
+ _request_auth=_request_auth,
807
+ _content_type=_content_type,
808
+ _headers=_headers,
809
+ _host_index=_host_index
810
+ )
387
811
 
388
- all_params = [
389
- 'page',
390
- 'size',
391
- 'x_request_id',
812
+ _response_types_map: Dict[str, Optional[str]] = {
813
+ '200': "GroupPage",
814
+ '400': "OperationLog",
815
+ }
816
+ response_data = self.api_client.call_api(
817
+ *_param,
818
+ _request_timeout=_request_timeout
819
+ )
820
+ return response_data.response
821
+
822
+
823
+ def _get_all_groups_serialize(
824
+ self,
825
+ x_request_id,
826
+ page,
827
+ size,
828
+ _request_auth,
829
+ _content_type,
830
+ _headers,
831
+ _host_index,
832
+ ) -> RequestSerialized:
833
+
834
+ _host = None
835
+
836
+ _collection_formats: Dict[str, str] = {
837
+ }
838
+
839
+ _path_params: Dict[str, str] = {}
840
+ _query_params: List[Tuple[str, str]] = []
841
+ _header_params: Dict[str, Optional[str]] = _headers or {}
842
+ _form_params: List[Tuple[str, str]] = []
843
+ _files: Dict[
844
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
845
+ ] = {}
846
+ _body_params: Optional[bytes] = None
847
+
848
+ # process the path parameters
849
+ # process the query parameters
850
+ if page is not None:
851
+
852
+ _query_params.append(('page', page))
853
+
854
+ if size is not None:
855
+
856
+ _query_params.append(('size', size))
857
+
858
+ # process the header parameters
859
+ if x_request_id is not None:
860
+ _header_params['X-RequestID'] = x_request_id
861
+ # process the form parameters
862
+ # process the body parameter
863
+
864
+
865
+ # set the HTTP header `Accept`
866
+ if 'Accept' not in _header_params:
867
+ _header_params['Accept'] = self.api_client.select_header_accept(
868
+ [
869
+ 'application/json'
870
+ ]
871
+ )
872
+
873
+
874
+ # authentication setting
875
+ _auth_settings: List[str] = [
392
876
  ]
393
- all_params.extend(
394
- [
395
- 'async_req',
396
- '_return_http_data_only',
397
- '_preload_content',
398
- '_request_timeout',
399
- '_request_auth'
400
- ]
877
+
878
+ return self.api_client.param_serialize(
879
+ method='GET',
880
+ resource_path='/api/groups',
881
+ path_params=_path_params,
882
+ query_params=_query_params,
883
+ header_params=_header_params,
884
+ body=_body_params,
885
+ post_params=_form_params,
886
+ files=_files,
887
+ auth_settings=_auth_settings,
888
+ collection_formats=_collection_formats,
889
+ _host=_host,
890
+ _request_auth=_request_auth
401
891
  )
402
892
 
403
- for key, val in six.iteritems(local_var_params['kwargs']):
404
- if key not in all_params:
405
- raise ApiTypeError(
406
- "Got an unexpected keyword argument '%s'"
407
- " to method get_all_groups" % key
408
- )
409
- local_var_params[key] = val
410
- del local_var_params['kwargs']
411
-
412
- collection_formats = {}
413
-
414
- path_params = {}
415
-
416
- query_params = []
417
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
418
- query_params.append(('page', local_var_params['page'])) # noqa: E501
419
- if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501
420
- query_params.append(('size', local_var_params['size'])) # noqa: E501
421
-
422
- header_params = {}
423
- if 'x_request_id' in local_var_params:
424
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
425
-
426
- form_params = []
427
- local_var_files = {}
428
-
429
- body_params = None
430
- # HTTP header `Accept`
431
- header_params['Accept'] = self.api_client.select_header_accept(
432
- ['application/json']) # noqa: E501
433
-
434
- # Authentication setting
435
- auth_settings = [] # noqa: E501
436
-
437
- return self.api_client.call_api(
438
- '/api/groups', 'GET',
439
- path_params,
440
- query_params,
441
- header_params,
442
- body=body_params,
443
- post_params=form_params,
444
- files=local_var_files,
445
- response_type='GroupPage', # noqa: E501
446
- auth_settings=auth_settings,
447
- async_req=local_var_params.get('async_req'),
448
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
449
- _preload_content=local_var_params.get('_preload_content', True),
450
- _request_timeout=local_var_params.get('_request_timeout'),
451
- collection_formats=collection_formats,
452
- _request_auth=local_var_params.get('_request_auth'))
453
-
454
- def get_all_persons_by_group_id(self, group_id, **kwargs): # noqa: E501
455
- """Get group persons # noqa: E501
456
-
457
- This method makes a synchronous HTTP request by default. To make an
458
- asynchronous HTTP request, please pass async_req=True
459
-
460
- >>> thread = api.get_all_persons_by_group_id(group_id, async_req=True)
461
- >>> result = thread.get()
893
+
894
+
895
+
896
+ @validate_call
897
+ def get_all_persons_by_group_id(
898
+ self,
899
+ group_id: Annotated[UUID, Field(description="Group ID.")],
900
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
901
+ page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
902
+ size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
903
+ _request_timeout: Union[
904
+ None,
905
+ Annotated[StrictFloat, Field(gt=0)],
906
+ Tuple[
907
+ Annotated[StrictFloat, Field(gt=0)],
908
+ Annotated[StrictFloat, Field(gt=0)]
909
+ ]
910
+ ] = None,
911
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
912
+ _content_type: Optional[StrictStr] = None,
913
+ _headers: Optional[Dict[StrictStr, Any]] = None,
914
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
915
+ ) -> PersonsPage:
916
+ """Get group persons
917
+
462
918
 
463
919
  :param group_id: Group ID. (required)
464
920
  :type group_id: str
921
+ :param x_request_id: Request header label.
922
+ :type x_request_id: str
465
923
  :param page: The page number to get a list of persons or groups.
466
924
  :type page: int
467
925
  :param size: The page size with a list of persons or groups, items.
468
926
  :type size: int
927
+ :param _request_timeout: timeout setting for this request. If one
928
+ number provided, it will be total request
929
+ timeout. It can also be a pair (tuple) of
930
+ (connection, read) timeouts.
931
+ :type _request_timeout: int, tuple(int, int), optional
932
+ :param _request_auth: set to override the auth_settings for an a single
933
+ request; this effectively ignores the
934
+ authentication in the spec for a single request.
935
+ :type _request_auth: dict, optional
936
+ :param _content_type: force content-type for the request.
937
+ :type _content_type: str, Optional
938
+ :param _headers: set to override the headers for a single
939
+ request; this effectively ignores the headers
940
+ in the spec for a single request.
941
+ :type _headers: dict, optional
942
+ :param _host_index: set to override the host_index for a single
943
+ request; this effectively ignores the host_index
944
+ in the spec for a single request.
945
+ :type _host_index: int, optional
946
+ :return: Returns the result object.
947
+ """ # noqa: E501
948
+
949
+ _param = self._get_all_persons_by_group_id_serialize(
950
+ group_id=group_id,
951
+ x_request_id=x_request_id,
952
+ page=page,
953
+ size=size,
954
+ _request_auth=_request_auth,
955
+ _content_type=_content_type,
956
+ _headers=_headers,
957
+ _host_index=_host_index
958
+ )
959
+
960
+ _response_types_map: Dict[str, Optional[str]] = {
961
+ '200': "PersonsPage",
962
+ '400': "OperationLog",
963
+ '404': "OperationLog",
964
+ }
965
+ response_data = self.api_client.call_api(
966
+ *_param,
967
+ _request_timeout=_request_timeout
968
+ )
969
+ response_data.read()
970
+ return self.api_client.response_deserialize(
971
+ response_data=response_data,
972
+ response_types_map=_response_types_map,
973
+ ).data
974
+
975
+
976
+ @validate_call
977
+ def get_all_persons_by_group_id_with_http_info(
978
+ self,
979
+ group_id: Annotated[UUID, Field(description="Group ID.")],
980
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
981
+ page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
982
+ size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
983
+ _request_timeout: Union[
984
+ None,
985
+ Annotated[StrictFloat, Field(gt=0)],
986
+ Tuple[
987
+ Annotated[StrictFloat, Field(gt=0)],
988
+ Annotated[StrictFloat, Field(gt=0)]
989
+ ]
990
+ ] = None,
991
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
992
+ _content_type: Optional[StrictStr] = None,
993
+ _headers: Optional[Dict[StrictStr, Any]] = None,
994
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
995
+ ) -> ApiResponse[PersonsPage]:
996
+ """Get group persons
997
+
998
+
999
+ :param group_id: Group ID. (required)
1000
+ :type group_id: str
469
1001
  :param x_request_id: Request header label.
470
1002
  :type x_request_id: str
471
- :param async_req: Whether to execute the request asynchronously.
472
- :type async_req: bool, optional
473
- :param _preload_content: if False, the urllib3.HTTPResponse object will
474
- be returned without reading/decoding response
475
- data. Default is True.
476
- :type _preload_content: bool, optional
1003
+ :param page: The page number to get a list of persons or groups.
1004
+ :type page: int
1005
+ :param size: The page size with a list of persons or groups, items.
1006
+ :type size: int
477
1007
  :param _request_timeout: timeout setting for this request. If one
478
1008
  number provided, it will be total request
479
1009
  timeout. It can also be a pair (tuple) of
480
1010
  (connection, read) timeouts.
1011
+ :type _request_timeout: int, tuple(int, int), optional
1012
+ :param _request_auth: set to override the auth_settings for an a single
1013
+ request; this effectively ignores the
1014
+ authentication in the spec for a single request.
1015
+ :type _request_auth: dict, optional
1016
+ :param _content_type: force content-type for the request.
1017
+ :type _content_type: str, Optional
1018
+ :param _headers: set to override the headers for a single
1019
+ request; this effectively ignores the headers
1020
+ in the spec for a single request.
1021
+ :type _headers: dict, optional
1022
+ :param _host_index: set to override the host_index for a single
1023
+ request; this effectively ignores the host_index
1024
+ in the spec for a single request.
1025
+ :type _host_index: int, optional
481
1026
  :return: Returns the result object.
482
- If the method is called asynchronously,
483
- returns the request thread.
484
- :rtype: PersonsPage
485
- """
486
- kwargs['_return_http_data_only'] = True
487
- return self.get_all_persons_by_group_id_with_http_info(group_id, **kwargs) # noqa: E501
1027
+ """ # noqa: E501
1028
+
1029
+ _param = self._get_all_persons_by_group_id_serialize(
1030
+ group_id=group_id,
1031
+ x_request_id=x_request_id,
1032
+ page=page,
1033
+ size=size,
1034
+ _request_auth=_request_auth,
1035
+ _content_type=_content_type,
1036
+ _headers=_headers,
1037
+ _host_index=_host_index
1038
+ )
1039
+
1040
+ _response_types_map: Dict[str, Optional[str]] = {
1041
+ '200': "PersonsPage",
1042
+ '400': "OperationLog",
1043
+ '404': "OperationLog",
1044
+ }
1045
+ response_data = self.api_client.call_api(
1046
+ *_param,
1047
+ _request_timeout=_request_timeout
1048
+ )
1049
+ response_data.read()
1050
+ return self.api_client.response_deserialize(
1051
+ response_data=response_data,
1052
+ response_types_map=_response_types_map,
1053
+ )
488
1054
 
489
- def get_all_persons_by_group_id_with_http_info(self, group_id, **kwargs): # noqa: E501
490
- """Get group persons # noqa: E501
491
1055
 
492
- This method makes a synchronous HTTP request by default. To make an
493
- asynchronous HTTP request, please pass async_req=True
1056
+ @validate_call
1057
+ def get_all_persons_by_group_id_without_preload_content(
1058
+ self,
1059
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1060
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1061
+ page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
1062
+ size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
1063
+ _request_timeout: Union[
1064
+ None,
1065
+ Annotated[StrictFloat, Field(gt=0)],
1066
+ Tuple[
1067
+ Annotated[StrictFloat, Field(gt=0)],
1068
+ Annotated[StrictFloat, Field(gt=0)]
1069
+ ]
1070
+ ] = None,
1071
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1072
+ _content_type: Optional[StrictStr] = None,
1073
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1074
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1075
+ ) -> RESTResponseType:
1076
+ """Get group persons
494
1077
 
495
- >>> thread = api.get_all_persons_by_group_id_with_http_info(group_id, async_req=True)
496
- >>> result = thread.get()
497
1078
 
498
1079
  :param group_id: Group ID. (required)
499
1080
  :type group_id: str
1081
+ :param x_request_id: Request header label.
1082
+ :type x_request_id: str
500
1083
  :param page: The page number to get a list of persons or groups.
501
1084
  :type page: int
502
1085
  :param size: The page size with a list of persons or groups, items.
503
1086
  :type size: int
504
- :param x_request_id: Request header label.
505
- :type x_request_id: str
506
- :param async_req: Whether to execute the request asynchronously.
507
- :type async_req: bool, optional
508
- :param _return_http_data_only: response data without head status code
509
- and headers
510
- :type _return_http_data_only: bool, optional
511
- :param _preload_content: if False, the urllib3.HTTPResponse object will
512
- be returned without reading/decoding response
513
- data. Default is True.
514
- :type _preload_content: bool, optional
515
1087
  :param _request_timeout: timeout setting for this request. If one
516
1088
  number provided, it will be total request
517
1089
  timeout. It can also be a pair (tuple) of
518
1090
  (connection, read) timeouts.
1091
+ :type _request_timeout: int, tuple(int, int), optional
519
1092
  :param _request_auth: set to override the auth_settings for an a single
520
- request; this effectively ignores the authentication
521
- in the spec for a single request.
1093
+ request; this effectively ignores the
1094
+ authentication in the spec for a single request.
522
1095
  :type _request_auth: dict, optional
1096
+ :param _content_type: force content-type for the request.
1097
+ :type _content_type: str, Optional
1098
+ :param _headers: set to override the headers for a single
1099
+ request; this effectively ignores the headers
1100
+ in the spec for a single request.
1101
+ :type _headers: dict, optional
1102
+ :param _host_index: set to override the host_index for a single
1103
+ request; this effectively ignores the host_index
1104
+ in the spec for a single request.
1105
+ :type _host_index: int, optional
523
1106
  :return: Returns the result object.
524
- If the method is called asynchronously,
525
- returns the request thread.
526
- :rtype: tuple(PersonsPage, status_code(int), headers(HTTPHeaderDict))
527
- """
528
-
529
- local_var_params = locals()
530
-
531
- all_params = [
532
- 'group_id',
533
- 'page',
534
- 'size',
535
- 'x_request_id',
1107
+ """ # noqa: E501
1108
+
1109
+ _param = self._get_all_persons_by_group_id_serialize(
1110
+ group_id=group_id,
1111
+ x_request_id=x_request_id,
1112
+ page=page,
1113
+ size=size,
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': "PersonsPage",
1122
+ '400': "OperationLog",
1123
+ '404': "OperationLog",
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_all_persons_by_group_id_serialize(
1133
+ self,
1134
+ group_id,
1135
+ x_request_id,
1136
+ page,
1137
+ size,
1138
+ _request_auth,
1139
+ _content_type,
1140
+ _headers,
1141
+ _host_index,
1142
+ ) -> RequestSerialized:
1143
+
1144
+ _host = None
1145
+
1146
+ _collection_formats: Dict[str, str] = {
1147
+ }
1148
+
1149
+ _path_params: Dict[str, str] = {}
1150
+ _query_params: List[Tuple[str, str]] = []
1151
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1152
+ _form_params: List[Tuple[str, str]] = []
1153
+ _files: Dict[
1154
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1155
+ ] = {}
1156
+ _body_params: Optional[bytes] = None
1157
+
1158
+ # process the path parameters
1159
+ if group_id is not None:
1160
+ _path_params['groupId'] = group_id
1161
+ # process the query parameters
1162
+ if page is not None:
1163
+
1164
+ _query_params.append(('page', page))
1165
+
1166
+ if size is not None:
1167
+
1168
+ _query_params.append(('size', size))
1169
+
1170
+ # process the header parameters
1171
+ if x_request_id is not None:
1172
+ _header_params['X-RequestID'] = x_request_id
1173
+ # process the form parameters
1174
+ # process the body parameter
1175
+
1176
+
1177
+ # set the HTTP header `Accept`
1178
+ if 'Accept' not in _header_params:
1179
+ _header_params['Accept'] = self.api_client.select_header_accept(
1180
+ [
1181
+ 'application/json'
1182
+ ]
1183
+ )
1184
+
1185
+
1186
+ # authentication setting
1187
+ _auth_settings: List[str] = [
536
1188
  ]
537
- all_params.extend(
538
- [
539
- 'async_req',
540
- '_return_http_data_only',
541
- '_preload_content',
542
- '_request_timeout',
543
- '_request_auth'
1189
+
1190
+ return self.api_client.param_serialize(
1191
+ method='GET',
1192
+ resource_path='/api/groups/{groupId}/persons',
1193
+ path_params=_path_params,
1194
+ query_params=_query_params,
1195
+ header_params=_header_params,
1196
+ body=_body_params,
1197
+ post_params=_form_params,
1198
+ files=_files,
1199
+ auth_settings=_auth_settings,
1200
+ collection_formats=_collection_formats,
1201
+ _host=_host,
1202
+ _request_auth=_request_auth
1203
+ )
1204
+
1205
+
1206
+
1207
+
1208
+ @validate_call
1209
+ def get_group(
1210
+ self,
1211
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1212
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1213
+ _request_timeout: Union[
1214
+ None,
1215
+ Annotated[StrictFloat, Field(gt=0)],
1216
+ Tuple[
1217
+ Annotated[StrictFloat, Field(gt=0)],
1218
+ Annotated[StrictFloat, Field(gt=0)]
544
1219
  ]
1220
+ ] = None,
1221
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1222
+ _content_type: Optional[StrictStr] = None,
1223
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1224
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1225
+ ) -> Group:
1226
+ """Get group
1227
+
1228
+
1229
+ :param group_id: Group ID. (required)
1230
+ :type group_id: str
1231
+ :param x_request_id: Request header label.
1232
+ :type x_request_id: str
1233
+ :param _request_timeout: timeout setting for this request. If one
1234
+ number provided, it will be total request
1235
+ timeout. It can also be a pair (tuple) of
1236
+ (connection, read) timeouts.
1237
+ :type _request_timeout: int, tuple(int, int), optional
1238
+ :param _request_auth: set to override the auth_settings for an a single
1239
+ request; this effectively ignores the
1240
+ authentication in the spec for a single request.
1241
+ :type _request_auth: dict, optional
1242
+ :param _content_type: force content-type for the request.
1243
+ :type _content_type: str, Optional
1244
+ :param _headers: set to override the headers for a single
1245
+ request; this effectively ignores the headers
1246
+ in the spec for a single request.
1247
+ :type _headers: dict, optional
1248
+ :param _host_index: set to override the host_index for a single
1249
+ request; this effectively ignores the host_index
1250
+ in the spec for a single request.
1251
+ :type _host_index: int, optional
1252
+ :return: Returns the result object.
1253
+ """ # noqa: E501
1254
+
1255
+ _param = self._get_group_serialize(
1256
+ group_id=group_id,
1257
+ x_request_id=x_request_id,
1258
+ _request_auth=_request_auth,
1259
+ _content_type=_content_type,
1260
+ _headers=_headers,
1261
+ _host_index=_host_index
545
1262
  )
546
1263
 
547
- for key, val in six.iteritems(local_var_params['kwargs']):
548
- if key not in all_params:
549
- raise ApiTypeError(
550
- "Got an unexpected keyword argument '%s'"
551
- " to method get_all_persons_by_group_id" % key
552
- )
553
- local_var_params[key] = val
554
- del local_var_params['kwargs']
555
- # verify the required parameter 'group_id' is set
556
- if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501
557
- local_var_params['group_id'] is None): # noqa: E501
558
- raise ApiValueError("Missing the required parameter `group_id` when calling `get_all_persons_by_group_id`") # noqa: E501
559
-
560
- collection_formats = {}
561
-
562
- path_params = {}
563
- if 'group_id' in local_var_params:
564
- path_params['groupId'] = local_var_params['group_id'] # noqa: E501
565
-
566
- query_params = []
567
- if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
568
- query_params.append(('page', local_var_params['page'])) # noqa: E501
569
- if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501
570
- query_params.append(('size', local_var_params['size'])) # noqa: E501
571
-
572
- header_params = {}
573
- if 'x_request_id' in local_var_params:
574
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
575
-
576
- form_params = []
577
- local_var_files = {}
578
-
579
- body_params = None
580
- # HTTP header `Accept`
581
- header_params['Accept'] = self.api_client.select_header_accept(
582
- ['application/json']) # noqa: E501
583
-
584
- # Authentication setting
585
- auth_settings = [] # noqa: E501
586
-
587
- return self.api_client.call_api(
588
- '/api/groups/{groupId}/persons', 'GET',
589
- path_params,
590
- query_params,
591
- header_params,
592
- body=body_params,
593
- post_params=form_params,
594
- files=local_var_files,
595
- response_type='PersonsPage', # noqa: E501
596
- auth_settings=auth_settings,
597
- async_req=local_var_params.get('async_req'),
598
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
599
- _preload_content=local_var_params.get('_preload_content', True),
600
- _request_timeout=local_var_params.get('_request_timeout'),
601
- collection_formats=collection_formats,
602
- _request_auth=local_var_params.get('_request_auth'))
603
-
604
- def get_group(self, group_id, **kwargs): # noqa: E501
605
- """Get group # noqa: E501
606
-
607
- This method makes a synchronous HTTP request by default. To make an
608
- asynchronous HTTP request, please pass async_req=True
609
-
610
- >>> thread = api.get_group(group_id, async_req=True)
611
- >>> result = thread.get()
1264
+ _response_types_map: Dict[str, Optional[str]] = {
1265
+ '200': "Group",
1266
+ '400': "OperationLog",
1267
+ '404': "OperationLog",
1268
+ }
1269
+ response_data = self.api_client.call_api(
1270
+ *_param,
1271
+ _request_timeout=_request_timeout
1272
+ )
1273
+ response_data.read()
1274
+ return self.api_client.response_deserialize(
1275
+ response_data=response_data,
1276
+ response_types_map=_response_types_map,
1277
+ ).data
1278
+
1279
+
1280
+ @validate_call
1281
+ def get_group_with_http_info(
1282
+ self,
1283
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1284
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1285
+ _request_timeout: Union[
1286
+ None,
1287
+ Annotated[StrictFloat, Field(gt=0)],
1288
+ Tuple[
1289
+ Annotated[StrictFloat, Field(gt=0)],
1290
+ Annotated[StrictFloat, Field(gt=0)]
1291
+ ]
1292
+ ] = None,
1293
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1294
+ _content_type: Optional[StrictStr] = None,
1295
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1296
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1297
+ ) -> ApiResponse[Group]:
1298
+ """Get group
1299
+
612
1300
 
613
1301
  :param group_id: Group ID. (required)
614
1302
  :type group_id: str
615
1303
  :param x_request_id: Request header label.
616
1304
  :type x_request_id: str
617
- :param async_req: Whether to execute the request asynchronously.
618
- :type async_req: bool, optional
619
- :param _preload_content: if False, the urllib3.HTTPResponse object will
620
- be returned without reading/decoding response
621
- data. Default is True.
622
- :type _preload_content: bool, optional
623
1305
  :param _request_timeout: timeout setting for this request. If one
624
1306
  number provided, it will be total request
625
1307
  timeout. It can also be a pair (tuple) of
626
1308
  (connection, read) timeouts.
1309
+ :type _request_timeout: int, tuple(int, int), optional
1310
+ :param _request_auth: set to override the auth_settings for an a single
1311
+ request; this effectively ignores the
1312
+ authentication in the spec for a single request.
1313
+ :type _request_auth: dict, optional
1314
+ :param _content_type: force content-type for the request.
1315
+ :type _content_type: str, Optional
1316
+ :param _headers: set to override the headers for a single
1317
+ request; this effectively ignores the headers
1318
+ in the spec for a single request.
1319
+ :type _headers: dict, optional
1320
+ :param _host_index: set to override the host_index for a single
1321
+ request; this effectively ignores the host_index
1322
+ in the spec for a single request.
1323
+ :type _host_index: int, optional
627
1324
  :return: Returns the result object.
628
- If the method is called asynchronously,
629
- returns the request thread.
630
- :rtype: Group
631
- """
632
- kwargs['_return_http_data_only'] = True
633
- return self.get_group_with_http_info(group_id, **kwargs) # noqa: E501
1325
+ """ # noqa: E501
1326
+
1327
+ _param = self._get_group_serialize(
1328
+ group_id=group_id,
1329
+ x_request_id=x_request_id,
1330
+ _request_auth=_request_auth,
1331
+ _content_type=_content_type,
1332
+ _headers=_headers,
1333
+ _host_index=_host_index
1334
+ )
634
1335
 
635
- def get_group_with_http_info(self, group_id, **kwargs): # noqa: E501
636
- """Get group # noqa: E501
1336
+ _response_types_map: Dict[str, Optional[str]] = {
1337
+ '200': "Group",
1338
+ '400': "OperationLog",
1339
+ '404': "OperationLog",
1340
+ }
1341
+ response_data = self.api_client.call_api(
1342
+ *_param,
1343
+ _request_timeout=_request_timeout
1344
+ )
1345
+ response_data.read()
1346
+ return self.api_client.response_deserialize(
1347
+ response_data=response_data,
1348
+ response_types_map=_response_types_map,
1349
+ )
637
1350
 
638
- This method makes a synchronous HTTP request by default. To make an
639
- asynchronous HTTP request, please pass async_req=True
640
1351
 
641
- >>> thread = api.get_group_with_http_info(group_id, async_req=True)
642
- >>> result = thread.get()
1352
+ @validate_call
1353
+ def get_group_without_preload_content(
1354
+ self,
1355
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1356
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1357
+ _request_timeout: Union[
1358
+ None,
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Tuple[
1361
+ Annotated[StrictFloat, Field(gt=0)],
1362
+ Annotated[StrictFloat, Field(gt=0)]
1363
+ ]
1364
+ ] = None,
1365
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1366
+ _content_type: Optional[StrictStr] = None,
1367
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1368
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1369
+ ) -> RESTResponseType:
1370
+ """Get group
1371
+
643
1372
 
644
1373
  :param group_id: Group ID. (required)
645
1374
  :type group_id: str
646
1375
  :param x_request_id: Request header label.
647
1376
  :type x_request_id: str
648
- :param async_req: Whether to execute the request asynchronously.
649
- :type async_req: bool, optional
650
- :param _return_http_data_only: response data without head status code
651
- and headers
652
- :type _return_http_data_only: bool, optional
653
- :param _preload_content: if False, the urllib3.HTTPResponse object will
654
- be returned without reading/decoding response
655
- data. Default is True.
656
- :type _preload_content: bool, optional
657
1377
  :param _request_timeout: timeout setting for this request. If one
658
1378
  number provided, it will be total request
659
1379
  timeout. It can also be a pair (tuple) of
660
1380
  (connection, read) timeouts.
1381
+ :type _request_timeout: int, tuple(int, int), optional
661
1382
  :param _request_auth: set to override the auth_settings for an a single
662
- request; this effectively ignores the authentication
663
- in the spec for a single request.
1383
+ request; this effectively ignores the
1384
+ authentication in the spec for a single request.
664
1385
  :type _request_auth: dict, optional
1386
+ :param _content_type: force content-type for the request.
1387
+ :type _content_type: str, Optional
1388
+ :param _headers: set to override the headers for a single
1389
+ request; this effectively ignores the headers
1390
+ in the spec for a single request.
1391
+ :type _headers: dict, optional
1392
+ :param _host_index: set to override the host_index for a single
1393
+ request; this effectively ignores the host_index
1394
+ in the spec for a single request.
1395
+ :type _host_index: int, optional
665
1396
  :return: Returns the result object.
666
- If the method is called asynchronously,
667
- returns the request thread.
668
- :rtype: tuple(Group, status_code(int), headers(HTTPHeaderDict))
669
- """
670
-
671
- local_var_params = locals()
1397
+ """ # noqa: E501
1398
+
1399
+ _param = self._get_group_serialize(
1400
+ group_id=group_id,
1401
+ x_request_id=x_request_id,
1402
+ _request_auth=_request_auth,
1403
+ _content_type=_content_type,
1404
+ _headers=_headers,
1405
+ _host_index=_host_index
1406
+ )
672
1407
 
673
- all_params = [
674
- 'group_id',
675
- 'x_request_id',
1408
+ _response_types_map: Dict[str, Optional[str]] = {
1409
+ '200': "Group",
1410
+ '400': "OperationLog",
1411
+ '404': "OperationLog",
1412
+ }
1413
+ response_data = self.api_client.call_api(
1414
+ *_param,
1415
+ _request_timeout=_request_timeout
1416
+ )
1417
+ return response_data.response
1418
+
1419
+
1420
+ def _get_group_serialize(
1421
+ self,
1422
+ group_id,
1423
+ x_request_id,
1424
+ _request_auth,
1425
+ _content_type,
1426
+ _headers,
1427
+ _host_index,
1428
+ ) -> RequestSerialized:
1429
+
1430
+ _host = None
1431
+
1432
+ _collection_formats: Dict[str, str] = {
1433
+ }
1434
+
1435
+ _path_params: Dict[str, str] = {}
1436
+ _query_params: List[Tuple[str, str]] = []
1437
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1438
+ _form_params: List[Tuple[str, str]] = []
1439
+ _files: Dict[
1440
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1441
+ ] = {}
1442
+ _body_params: Optional[bytes] = None
1443
+
1444
+ # process the path parameters
1445
+ if group_id is not None:
1446
+ _path_params['groupId'] = group_id
1447
+ # process the query parameters
1448
+ # process the header parameters
1449
+ if x_request_id is not None:
1450
+ _header_params['X-RequestID'] = x_request_id
1451
+ # process the form parameters
1452
+ # process the body parameter
1453
+
1454
+
1455
+ # set the HTTP header `Accept`
1456
+ if 'Accept' not in _header_params:
1457
+ _header_params['Accept'] = self.api_client.select_header_accept(
1458
+ [
1459
+ 'application/json'
1460
+ ]
1461
+ )
1462
+
1463
+
1464
+ # authentication setting
1465
+ _auth_settings: List[str] = [
676
1466
  ]
677
- all_params.extend(
678
- [
679
- 'async_req',
680
- '_return_http_data_only',
681
- '_preload_content',
682
- '_request_timeout',
683
- '_request_auth'
1467
+
1468
+ return self.api_client.param_serialize(
1469
+ method='GET',
1470
+ resource_path='/api/groups/{groupId}',
1471
+ path_params=_path_params,
1472
+ query_params=_query_params,
1473
+ header_params=_header_params,
1474
+ body=_body_params,
1475
+ post_params=_form_params,
1476
+ files=_files,
1477
+ auth_settings=_auth_settings,
1478
+ collection_formats=_collection_formats,
1479
+ _host=_host,
1480
+ _request_auth=_request_auth
1481
+ )
1482
+
1483
+
1484
+
1485
+
1486
+ @validate_call
1487
+ def update_group(
1488
+ self,
1489
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1490
+ group_to_create: Annotated[GroupToCreate, Field(description="Request body for the group to update.")],
1491
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1492
+ _request_timeout: Union[
1493
+ None,
1494
+ Annotated[StrictFloat, Field(gt=0)],
1495
+ Tuple[
1496
+ Annotated[StrictFloat, Field(gt=0)],
1497
+ Annotated[StrictFloat, Field(gt=0)]
684
1498
  ]
1499
+ ] = None,
1500
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1501
+ _content_type: Optional[StrictStr] = None,
1502
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1503
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1504
+ ) -> None:
1505
+ """Update group
1506
+
1507
+
1508
+ :param group_id: Group ID. (required)
1509
+ :type group_id: str
1510
+ :param group_to_create: Request body for the group to update. (required)
1511
+ :type group_to_create: GroupToCreate
1512
+ :param x_request_id: Request header label.
1513
+ :type x_request_id: str
1514
+ :param _request_timeout: timeout setting for this request. If one
1515
+ number provided, it will be total request
1516
+ timeout. It can also be a pair (tuple) of
1517
+ (connection, read) timeouts.
1518
+ :type _request_timeout: int, tuple(int, int), optional
1519
+ :param _request_auth: set to override the auth_settings for an a single
1520
+ request; this effectively ignores the
1521
+ authentication in the spec for a single request.
1522
+ :type _request_auth: dict, optional
1523
+ :param _content_type: force content-type for the request.
1524
+ :type _content_type: str, Optional
1525
+ :param _headers: set to override the headers for a single
1526
+ request; this effectively ignores the headers
1527
+ in the spec for a single request.
1528
+ :type _headers: dict, optional
1529
+ :param _host_index: set to override the host_index for a single
1530
+ request; this effectively ignores the host_index
1531
+ in the spec for a single request.
1532
+ :type _host_index: int, optional
1533
+ :return: Returns the result object.
1534
+ """ # noqa: E501
1535
+
1536
+ _param = self._update_group_serialize(
1537
+ group_id=group_id,
1538
+ group_to_create=group_to_create,
1539
+ x_request_id=x_request_id,
1540
+ _request_auth=_request_auth,
1541
+ _content_type=_content_type,
1542
+ _headers=_headers,
1543
+ _host_index=_host_index
685
1544
  )
686
1545
 
687
- for key, val in six.iteritems(local_var_params['kwargs']):
688
- if key not in all_params:
689
- raise ApiTypeError(
690
- "Got an unexpected keyword argument '%s'"
691
- " to method get_group" % key
692
- )
693
- local_var_params[key] = val
694
- del local_var_params['kwargs']
695
- # verify the required parameter 'group_id' is set
696
- if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501
697
- local_var_params['group_id'] is None): # noqa: E501
698
- raise ApiValueError("Missing the required parameter `group_id` when calling `get_group`") # noqa: E501
699
-
700
- collection_formats = {}
701
-
702
- path_params = {}
703
- if 'group_id' in local_var_params:
704
- path_params['groupId'] = local_var_params['group_id'] # noqa: E501
705
-
706
- query_params = []
707
-
708
- header_params = {}
709
- if 'x_request_id' in local_var_params:
710
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
711
-
712
- form_params = []
713
- local_var_files = {}
714
-
715
- body_params = None
716
- # HTTP header `Accept`
717
- header_params['Accept'] = self.api_client.select_header_accept(
718
- ['application/json']) # noqa: E501
719
-
720
- # Authentication setting
721
- auth_settings = [] # noqa: E501
722
-
723
- return self.api_client.call_api(
724
- '/api/groups/{groupId}', 'GET',
725
- path_params,
726
- query_params,
727
- header_params,
728
- body=body_params,
729
- post_params=form_params,
730
- files=local_var_files,
731
- response_type='Group', # noqa: E501
732
- auth_settings=auth_settings,
733
- async_req=local_var_params.get('async_req'),
734
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
735
- _preload_content=local_var_params.get('_preload_content', True),
736
- _request_timeout=local_var_params.get('_request_timeout'),
737
- collection_formats=collection_formats,
738
- _request_auth=local_var_params.get('_request_auth'))
739
-
740
- def update_group(self, group_id, group_to_create, **kwargs): # noqa: E501
741
- """Update group # noqa: E501
742
-
743
- This method makes a synchronous HTTP request by default. To make an
744
- asynchronous HTTP request, please pass async_req=True
745
-
746
- >>> thread = api.update_group(group_id, group_to_create, async_req=True)
747
- >>> result = thread.get()
1546
+ _response_types_map: Dict[str, Optional[str]] = {
1547
+ '204': None,
1548
+ '400': "OperationLog",
1549
+ '404': "OperationLog",
1550
+ }
1551
+ response_data = self.api_client.call_api(
1552
+ *_param,
1553
+ _request_timeout=_request_timeout
1554
+ )
1555
+ response_data.read()
1556
+ return self.api_client.response_deserialize(
1557
+ response_data=response_data,
1558
+ response_types_map=_response_types_map,
1559
+ ).data
1560
+
1561
+
1562
+ @validate_call
1563
+ def update_group_with_http_info(
1564
+ self,
1565
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1566
+ group_to_create: Annotated[GroupToCreate, Field(description="Request body for the group to update.")],
1567
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1568
+ _request_timeout: Union[
1569
+ None,
1570
+ Annotated[StrictFloat, Field(gt=0)],
1571
+ Tuple[
1572
+ Annotated[StrictFloat, Field(gt=0)],
1573
+ Annotated[StrictFloat, Field(gt=0)]
1574
+ ]
1575
+ ] = None,
1576
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1577
+ _content_type: Optional[StrictStr] = None,
1578
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1579
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1580
+ ) -> ApiResponse[None]:
1581
+ """Update group
1582
+
748
1583
 
749
1584
  :param group_id: Group ID. (required)
750
1585
  :type group_id: str
@@ -752,32 +1587,75 @@ class GroupApi(object):
752
1587
  :type group_to_create: GroupToCreate
753
1588
  :param x_request_id: Request header label.
754
1589
  :type x_request_id: str
755
- :param async_req: Whether to execute the request asynchronously.
756
- :type async_req: bool, optional
757
- :param _preload_content: if False, the urllib3.HTTPResponse object will
758
- be returned without reading/decoding response
759
- data. Default is True.
760
- :type _preload_content: bool, optional
761
1590
  :param _request_timeout: timeout setting for this request. If one
762
1591
  number provided, it will be total request
763
1592
  timeout. It can also be a pair (tuple) of
764
1593
  (connection, read) timeouts.
1594
+ :type _request_timeout: int, tuple(int, int), optional
1595
+ :param _request_auth: set to override the auth_settings for an a single
1596
+ request; this effectively ignores the
1597
+ authentication in the spec for a single request.
1598
+ :type _request_auth: dict, optional
1599
+ :param _content_type: force content-type for the request.
1600
+ :type _content_type: str, Optional
1601
+ :param _headers: set to override the headers for a single
1602
+ request; this effectively ignores the headers
1603
+ in the spec for a single request.
1604
+ :type _headers: dict, optional
1605
+ :param _host_index: set to override the host_index for a single
1606
+ request; this effectively ignores the host_index
1607
+ in the spec for a single request.
1608
+ :type _host_index: int, optional
765
1609
  :return: Returns the result object.
766
- If the method is called asynchronously,
767
- returns the request thread.
768
- :rtype: None
769
- """
770
- kwargs['_return_http_data_only'] = True
771
- return self.update_group_with_http_info(group_id, group_to_create, **kwargs) # noqa: E501
1610
+ """ # noqa: E501
1611
+
1612
+ _param = self._update_group_serialize(
1613
+ group_id=group_id,
1614
+ group_to_create=group_to_create,
1615
+ x_request_id=x_request_id,
1616
+ _request_auth=_request_auth,
1617
+ _content_type=_content_type,
1618
+ _headers=_headers,
1619
+ _host_index=_host_index
1620
+ )
1621
+
1622
+ _response_types_map: Dict[str, Optional[str]] = {
1623
+ '204': None,
1624
+ '400': "OperationLog",
1625
+ '404': "OperationLog",
1626
+ }
1627
+ response_data = self.api_client.call_api(
1628
+ *_param,
1629
+ _request_timeout=_request_timeout
1630
+ )
1631
+ response_data.read()
1632
+ return self.api_client.response_deserialize(
1633
+ response_data=response_data,
1634
+ response_types_map=_response_types_map,
1635
+ )
772
1636
 
773
- def update_group_with_http_info(self, group_id, group_to_create, **kwargs): # noqa: E501
774
- """Update group # noqa: E501
775
1637
 
776
- This method makes a synchronous HTTP request by default. To make an
777
- asynchronous HTTP request, please pass async_req=True
1638
+ @validate_call
1639
+ def update_group_without_preload_content(
1640
+ self,
1641
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1642
+ group_to_create: Annotated[GroupToCreate, Field(description="Request body for the group to update.")],
1643
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1644
+ _request_timeout: Union[
1645
+ None,
1646
+ Annotated[StrictFloat, Field(gt=0)],
1647
+ Tuple[
1648
+ Annotated[StrictFloat, Field(gt=0)],
1649
+ Annotated[StrictFloat, Field(gt=0)]
1650
+ ]
1651
+ ] = None,
1652
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1653
+ _content_type: Optional[StrictStr] = None,
1654
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1655
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1656
+ ) -> RESTResponseType:
1657
+ """Update group
778
1658
 
779
- >>> thread = api.update_group_with_http_info(group_id, group_to_create, async_req=True)
780
- >>> result = thread.get()
781
1659
 
782
1660
  :param group_id: Group ID. (required)
783
1661
  :type group_id: str
@@ -785,117 +1663,229 @@ class GroupApi(object):
785
1663
  :type group_to_create: GroupToCreate
786
1664
  :param x_request_id: Request header label.
787
1665
  :type x_request_id: str
788
- :param async_req: Whether to execute the request asynchronously.
789
- :type async_req: bool, optional
790
- :param _return_http_data_only: response data without head status code
791
- and headers
792
- :type _return_http_data_only: bool, optional
793
- :param _preload_content: if False, the urllib3.HTTPResponse object will
794
- be returned without reading/decoding response
795
- data. Default is True.
796
- :type _preload_content: bool, optional
797
1666
  :param _request_timeout: timeout setting for this request. If one
798
1667
  number provided, it will be total request
799
1668
  timeout. It can also be a pair (tuple) of
800
1669
  (connection, read) timeouts.
1670
+ :type _request_timeout: int, tuple(int, int), optional
801
1671
  :param _request_auth: set to override the auth_settings for an a single
802
- request; this effectively ignores the authentication
803
- in the spec for a single request.
1672
+ request; this effectively ignores the
1673
+ authentication in the spec for a single request.
804
1674
  :type _request_auth: dict, optional
1675
+ :param _content_type: force content-type for the request.
1676
+ :type _content_type: str, Optional
1677
+ :param _headers: set to override the headers for a single
1678
+ request; this effectively ignores the headers
1679
+ in the spec for a single request.
1680
+ :type _headers: dict, optional
1681
+ :param _host_index: set to override the host_index for a single
1682
+ request; this effectively ignores the host_index
1683
+ in the spec for a single request.
1684
+ :type _host_index: int, optional
805
1685
  :return: Returns the result object.
806
- If the method is called asynchronously,
807
- returns the request thread.
808
- :rtype: None
809
- """
1686
+ """ # noqa: E501
1687
+
1688
+ _param = self._update_group_serialize(
1689
+ group_id=group_id,
1690
+ group_to_create=group_to_create,
1691
+ x_request_id=x_request_id,
1692
+ _request_auth=_request_auth,
1693
+ _content_type=_content_type,
1694
+ _headers=_headers,
1695
+ _host_index=_host_index
1696
+ )
810
1697
 
811
- local_var_params = locals()
1698
+ _response_types_map: Dict[str, Optional[str]] = {
1699
+ '204': None,
1700
+ '400': "OperationLog",
1701
+ '404': "OperationLog",
1702
+ }
1703
+ response_data = self.api_client.call_api(
1704
+ *_param,
1705
+ _request_timeout=_request_timeout
1706
+ )
1707
+ return response_data.response
1708
+
1709
+
1710
+ def _update_group_serialize(
1711
+ self,
1712
+ group_id,
1713
+ group_to_create,
1714
+ x_request_id,
1715
+ _request_auth,
1716
+ _content_type,
1717
+ _headers,
1718
+ _host_index,
1719
+ ) -> RequestSerialized:
1720
+
1721
+ _host = None
1722
+
1723
+ _collection_formats: Dict[str, str] = {
1724
+ }
1725
+
1726
+ _path_params: Dict[str, str] = {}
1727
+ _query_params: List[Tuple[str, str]] = []
1728
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1729
+ _form_params: List[Tuple[str, str]] = []
1730
+ _files: Dict[
1731
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1732
+ ] = {}
1733
+ _body_params: Optional[bytes] = None
1734
+
1735
+ # process the path parameters
1736
+ if group_id is not None:
1737
+ _path_params['groupId'] = group_id
1738
+ # process the query parameters
1739
+ # process the header parameters
1740
+ if x_request_id is not None:
1741
+ _header_params['X-RequestID'] = x_request_id
1742
+ # process the form parameters
1743
+ # process the body parameter
1744
+ if group_to_create is not None:
1745
+ _body_params = group_to_create
1746
+
1747
+
1748
+ # set the HTTP header `Accept`
1749
+ if 'Accept' not in _header_params:
1750
+ _header_params['Accept'] = self.api_client.select_header_accept(
1751
+ [
1752
+ 'application/json'
1753
+ ]
1754
+ )
1755
+
1756
+ # set the HTTP header `Content-Type`
1757
+ if _content_type:
1758
+ _header_params['Content-Type'] = _content_type
1759
+ else:
1760
+ _default_content_type = (
1761
+ self.api_client.select_header_content_type(
1762
+ [
1763
+ 'application/json'
1764
+ ]
1765
+ )
1766
+ )
1767
+ if _default_content_type is not None:
1768
+ _header_params['Content-Type'] = _default_content_type
812
1769
 
813
- all_params = [
814
- 'group_id',
815
- 'group_to_create',
816
- 'x_request_id',
1770
+ # authentication setting
1771
+ _auth_settings: List[str] = [
817
1772
  ]
818
- all_params.extend(
819
- [
820
- 'async_req',
821
- '_return_http_data_only',
822
- '_preload_content',
823
- '_request_timeout',
824
- '_request_auth'
1773
+
1774
+ return self.api_client.param_serialize(
1775
+ method='PUT',
1776
+ resource_path='/api/groups/{groupId}',
1777
+ path_params=_path_params,
1778
+ query_params=_query_params,
1779
+ header_params=_header_params,
1780
+ body=_body_params,
1781
+ post_params=_form_params,
1782
+ files=_files,
1783
+ auth_settings=_auth_settings,
1784
+ collection_formats=_collection_formats,
1785
+ _host=_host,
1786
+ _request_auth=_request_auth
1787
+ )
1788
+
1789
+
1790
+
1791
+
1792
+ @validate_call
1793
+ def update_persons_in_group(
1794
+ self,
1795
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1796
+ update_group: Annotated[UpdateGroup, Field(description="Request body for person IDs to add or remove.")],
1797
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1798
+ _request_timeout: Union[
1799
+ None,
1800
+ Annotated[StrictFloat, Field(gt=0)],
1801
+ Tuple[
1802
+ Annotated[StrictFloat, Field(gt=0)],
1803
+ Annotated[StrictFloat, Field(gt=0)]
825
1804
  ]
1805
+ ] = None,
1806
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1807
+ _content_type: Optional[StrictStr] = None,
1808
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1809
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1810
+ ) -> None:
1811
+ """Add/remove persons to group
1812
+
1813
+
1814
+ :param group_id: Group ID. (required)
1815
+ :type group_id: str
1816
+ :param update_group: Request body for person IDs to add or remove. (required)
1817
+ :type update_group: UpdateGroup
1818
+ :param x_request_id: Request header label.
1819
+ :type x_request_id: str
1820
+ :param _request_timeout: timeout setting for this request. If one
1821
+ number provided, it will be total request
1822
+ timeout. It can also be a pair (tuple) of
1823
+ (connection, read) timeouts.
1824
+ :type _request_timeout: int, tuple(int, int), optional
1825
+ :param _request_auth: set to override the auth_settings for an a single
1826
+ request; this effectively ignores the
1827
+ authentication in the spec for a single request.
1828
+ :type _request_auth: dict, optional
1829
+ :param _content_type: force content-type for the request.
1830
+ :type _content_type: str, Optional
1831
+ :param _headers: set to override the headers for a single
1832
+ request; this effectively ignores the headers
1833
+ in the spec for a single request.
1834
+ :type _headers: dict, optional
1835
+ :param _host_index: set to override the host_index for a single
1836
+ request; this effectively ignores the host_index
1837
+ in the spec for a single request.
1838
+ :type _host_index: int, optional
1839
+ :return: Returns the result object.
1840
+ """ # noqa: E501
1841
+
1842
+ _param = self._update_persons_in_group_serialize(
1843
+ group_id=group_id,
1844
+ update_group=update_group,
1845
+ x_request_id=x_request_id,
1846
+ _request_auth=_request_auth,
1847
+ _content_type=_content_type,
1848
+ _headers=_headers,
1849
+ _host_index=_host_index
826
1850
  )
827
1851
 
828
- for key, val in six.iteritems(local_var_params['kwargs']):
829
- if key not in all_params:
830
- raise ApiTypeError(
831
- "Got an unexpected keyword argument '%s'"
832
- " to method update_group" % key
833
- )
834
- local_var_params[key] = val
835
- del local_var_params['kwargs']
836
- # verify the required parameter 'group_id' is set
837
- if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501
838
- local_var_params['group_id'] is None): # noqa: E501
839
- raise ApiValueError("Missing the required parameter `group_id` when calling `update_group`") # noqa: E501
840
- # verify the required parameter 'group_to_create' is set
841
- if self.api_client.client_side_validation and ('group_to_create' not in local_var_params or # noqa: E501
842
- local_var_params['group_to_create'] is None): # noqa: E501
843
- raise ApiValueError("Missing the required parameter `group_to_create` when calling `update_group`") # noqa: E501
844
-
845
- collection_formats = {}
846
-
847
- path_params = {}
848
- if 'group_id' in local_var_params:
849
- path_params['groupId'] = local_var_params['group_id'] # noqa: E501
850
-
851
- query_params = []
852
-
853
- header_params = {}
854
- if 'x_request_id' in local_var_params:
855
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
856
-
857
- form_params = []
858
- local_var_files = {}
859
-
860
- body_params = None
861
- if 'group_to_create' in local_var_params:
862
- body_params = local_var_params['group_to_create']
863
- # HTTP header `Accept`
864
- header_params['Accept'] = self.api_client.select_header_accept(
865
- ['application/json']) # noqa: E501
866
-
867
- # HTTP header `Content-Type`
868
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
869
- ['application/json']) # noqa: E501
870
-
871
- # Authentication setting
872
- auth_settings = [] # noqa: E501
873
-
874
- return self.api_client.call_api(
875
- '/api/groups/{groupId}', 'PUT',
876
- path_params,
877
- query_params,
878
- header_params,
879
- body=body_params,
880
- post_params=form_params,
881
- files=local_var_files,
882
- response_type=None, # noqa: E501
883
- auth_settings=auth_settings,
884
- async_req=local_var_params.get('async_req'),
885
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
886
- _preload_content=local_var_params.get('_preload_content', True),
887
- _request_timeout=local_var_params.get('_request_timeout'),
888
- collection_formats=collection_formats,
889
- _request_auth=local_var_params.get('_request_auth'))
890
-
891
- def update_persons_in_group(self, group_id, update_group, **kwargs): # noqa: E501
892
- """Add/remove persons to group # noqa: E501
893
-
894
- This method makes a synchronous HTTP request by default. To make an
895
- asynchronous HTTP request, please pass async_req=True
896
-
897
- >>> thread = api.update_persons_in_group(group_id, update_group, async_req=True)
898
- >>> result = thread.get()
1852
+ _response_types_map: Dict[str, Optional[str]] = {
1853
+ '204': None,
1854
+ '400': "OperationLog",
1855
+ '404': "OperationLog",
1856
+ }
1857
+ response_data = self.api_client.call_api(
1858
+ *_param,
1859
+ _request_timeout=_request_timeout
1860
+ )
1861
+ response_data.read()
1862
+ return self.api_client.response_deserialize(
1863
+ response_data=response_data,
1864
+ response_types_map=_response_types_map,
1865
+ ).data
1866
+
1867
+
1868
+ @validate_call
1869
+ def update_persons_in_group_with_http_info(
1870
+ self,
1871
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1872
+ update_group: Annotated[UpdateGroup, Field(description="Request body for person IDs to add or remove.")],
1873
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1874
+ _request_timeout: Union[
1875
+ None,
1876
+ Annotated[StrictFloat, Field(gt=0)],
1877
+ Tuple[
1878
+ Annotated[StrictFloat, Field(gt=0)],
1879
+ Annotated[StrictFloat, Field(gt=0)]
1880
+ ]
1881
+ ] = None,
1882
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1883
+ _content_type: Optional[StrictStr] = None,
1884
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1885
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1886
+ ) -> ApiResponse[None]:
1887
+ """Add/remove persons to group
1888
+
899
1889
 
900
1890
  :param group_id: Group ID. (required)
901
1891
  :type group_id: str
@@ -903,32 +1893,75 @@ class GroupApi(object):
903
1893
  :type update_group: UpdateGroup
904
1894
  :param x_request_id: Request header label.
905
1895
  :type x_request_id: str
906
- :param async_req: Whether to execute the request asynchronously.
907
- :type async_req: bool, optional
908
- :param _preload_content: if False, the urllib3.HTTPResponse object will
909
- be returned without reading/decoding response
910
- data. Default is True.
911
- :type _preload_content: bool, optional
912
1896
  :param _request_timeout: timeout setting for this request. If one
913
1897
  number provided, it will be total request
914
1898
  timeout. It can also be a pair (tuple) of
915
1899
  (connection, read) timeouts.
1900
+ :type _request_timeout: int, tuple(int, int), optional
1901
+ :param _request_auth: set to override the auth_settings for an a single
1902
+ request; this effectively ignores the
1903
+ authentication in the spec for a single request.
1904
+ :type _request_auth: dict, optional
1905
+ :param _content_type: force content-type for the request.
1906
+ :type _content_type: str, Optional
1907
+ :param _headers: set to override the headers for a single
1908
+ request; this effectively ignores the headers
1909
+ in the spec for a single request.
1910
+ :type _headers: dict, optional
1911
+ :param _host_index: set to override the host_index for a single
1912
+ request; this effectively ignores the host_index
1913
+ in the spec for a single request.
1914
+ :type _host_index: int, optional
916
1915
  :return: Returns the result object.
917
- If the method is called asynchronously,
918
- returns the request thread.
919
- :rtype: None
920
- """
921
- kwargs['_return_http_data_only'] = True
922
- return self.update_persons_in_group_with_http_info(group_id, update_group, **kwargs) # noqa: E501
1916
+ """ # noqa: E501
1917
+
1918
+ _param = self._update_persons_in_group_serialize(
1919
+ group_id=group_id,
1920
+ update_group=update_group,
1921
+ x_request_id=x_request_id,
1922
+ _request_auth=_request_auth,
1923
+ _content_type=_content_type,
1924
+ _headers=_headers,
1925
+ _host_index=_host_index
1926
+ )
1927
+
1928
+ _response_types_map: Dict[str, Optional[str]] = {
1929
+ '204': None,
1930
+ '400': "OperationLog",
1931
+ '404': "OperationLog",
1932
+ }
1933
+ response_data = self.api_client.call_api(
1934
+ *_param,
1935
+ _request_timeout=_request_timeout
1936
+ )
1937
+ response_data.read()
1938
+ return self.api_client.response_deserialize(
1939
+ response_data=response_data,
1940
+ response_types_map=_response_types_map,
1941
+ )
923
1942
 
924
- def update_persons_in_group_with_http_info(self, group_id, update_group, **kwargs): # noqa: E501
925
- """Add/remove persons to group # noqa: E501
926
1943
 
927
- This method makes a synchronous HTTP request by default. To make an
928
- asynchronous HTTP request, please pass async_req=True
1944
+ @validate_call
1945
+ def update_persons_in_group_without_preload_content(
1946
+ self,
1947
+ group_id: Annotated[UUID, Field(description="Group ID.")],
1948
+ update_group: Annotated[UpdateGroup, Field(description="Request body for person IDs to add or remove.")],
1949
+ x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
1950
+ _request_timeout: Union[
1951
+ None,
1952
+ Annotated[StrictFloat, Field(gt=0)],
1953
+ Tuple[
1954
+ Annotated[StrictFloat, Field(gt=0)],
1955
+ Annotated[StrictFloat, Field(gt=0)]
1956
+ ]
1957
+ ] = None,
1958
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1959
+ _content_type: Optional[StrictStr] = None,
1960
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1961
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1962
+ ) -> RESTResponseType:
1963
+ """Add/remove persons to group
929
1964
 
930
- >>> thread = api.update_persons_in_group_with_http_info(group_id, update_group, async_req=True)
931
- >>> result = thread.get()
932
1965
 
933
1966
  :param group_id: Group ID. (required)
934
1967
  :type group_id: str
@@ -936,105 +1969,127 @@ class GroupApi(object):
936
1969
  :type update_group: UpdateGroup
937
1970
  :param x_request_id: Request header label.
938
1971
  :type x_request_id: str
939
- :param async_req: Whether to execute the request asynchronously.
940
- :type async_req: bool, optional
941
- :param _return_http_data_only: response data without head status code
942
- and headers
943
- :type _return_http_data_only: bool, optional
944
- :param _preload_content: if False, the urllib3.HTTPResponse object will
945
- be returned without reading/decoding response
946
- data. Default is True.
947
- :type _preload_content: bool, optional
948
1972
  :param _request_timeout: timeout setting for this request. If one
949
1973
  number provided, it will be total request
950
1974
  timeout. It can also be a pair (tuple) of
951
1975
  (connection, read) timeouts.
1976
+ :type _request_timeout: int, tuple(int, int), optional
952
1977
  :param _request_auth: set to override the auth_settings for an a single
953
- request; this effectively ignores the authentication
954
- in the spec for a single request.
1978
+ request; this effectively ignores the
1979
+ authentication in the spec for a single request.
955
1980
  :type _request_auth: dict, optional
1981
+ :param _content_type: force content-type for the request.
1982
+ :type _content_type: str, Optional
1983
+ :param _headers: set to override the headers for a single
1984
+ request; this effectively ignores the headers
1985
+ in the spec for a single request.
1986
+ :type _headers: dict, optional
1987
+ :param _host_index: set to override the host_index for a single
1988
+ request; this effectively ignores the host_index
1989
+ in the spec for a single request.
1990
+ :type _host_index: int, optional
956
1991
  :return: Returns the result object.
957
- If the method is called asynchronously,
958
- returns the request thread.
959
- :rtype: None
960
- """
1992
+ """ # noqa: E501
1993
+
1994
+ _param = self._update_persons_in_group_serialize(
1995
+ group_id=group_id,
1996
+ update_group=update_group,
1997
+ x_request_id=x_request_id,
1998
+ _request_auth=_request_auth,
1999
+ _content_type=_content_type,
2000
+ _headers=_headers,
2001
+ _host_index=_host_index
2002
+ )
961
2003
 
962
- local_var_params = locals()
2004
+ _response_types_map: Dict[str, Optional[str]] = {
2005
+ '204': None,
2006
+ '400': "OperationLog",
2007
+ '404': "OperationLog",
2008
+ }
2009
+ response_data = self.api_client.call_api(
2010
+ *_param,
2011
+ _request_timeout=_request_timeout
2012
+ )
2013
+ return response_data.response
2014
+
2015
+
2016
+ def _update_persons_in_group_serialize(
2017
+ self,
2018
+ group_id,
2019
+ update_group,
2020
+ x_request_id,
2021
+ _request_auth,
2022
+ _content_type,
2023
+ _headers,
2024
+ _host_index,
2025
+ ) -> RequestSerialized:
2026
+
2027
+ _host = None
2028
+
2029
+ _collection_formats: Dict[str, str] = {
2030
+ }
2031
+
2032
+ _path_params: Dict[str, str] = {}
2033
+ _query_params: List[Tuple[str, str]] = []
2034
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2035
+ _form_params: List[Tuple[str, str]] = []
2036
+ _files: Dict[
2037
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2038
+ ] = {}
2039
+ _body_params: Optional[bytes] = None
2040
+
2041
+ # process the path parameters
2042
+ if group_id is not None:
2043
+ _path_params['groupId'] = group_id
2044
+ # process the query parameters
2045
+ # process the header parameters
2046
+ if x_request_id is not None:
2047
+ _header_params['X-RequestID'] = x_request_id
2048
+ # process the form parameters
2049
+ # process the body parameter
2050
+ if update_group is not None:
2051
+ _body_params = update_group
2052
+
2053
+
2054
+ # set the HTTP header `Accept`
2055
+ if 'Accept' not in _header_params:
2056
+ _header_params['Accept'] = self.api_client.select_header_accept(
2057
+ [
2058
+ 'application/json'
2059
+ ]
2060
+ )
2061
+
2062
+ # set the HTTP header `Content-Type`
2063
+ if _content_type:
2064
+ _header_params['Content-Type'] = _content_type
2065
+ else:
2066
+ _default_content_type = (
2067
+ self.api_client.select_header_content_type(
2068
+ [
2069
+ 'application/json'
2070
+ ]
2071
+ )
2072
+ )
2073
+ if _default_content_type is not None:
2074
+ _header_params['Content-Type'] = _default_content_type
963
2075
 
964
- all_params = [
965
- 'group_id',
966
- 'update_group',
967
- 'x_request_id',
2076
+ # authentication setting
2077
+ _auth_settings: List[str] = [
968
2078
  ]
969
- all_params.extend(
970
- [
971
- 'async_req',
972
- '_return_http_data_only',
973
- '_preload_content',
974
- '_request_timeout',
975
- '_request_auth'
976
- ]
2079
+
2080
+ return self.api_client.param_serialize(
2081
+ method='PUT',
2082
+ resource_path='/api/groups/{groupId}/persons',
2083
+ path_params=_path_params,
2084
+ query_params=_query_params,
2085
+ header_params=_header_params,
2086
+ body=_body_params,
2087
+ post_params=_form_params,
2088
+ files=_files,
2089
+ auth_settings=_auth_settings,
2090
+ collection_formats=_collection_formats,
2091
+ _host=_host,
2092
+ _request_auth=_request_auth
977
2093
  )
978
2094
 
979
- for key, val in six.iteritems(local_var_params['kwargs']):
980
- if key not in all_params:
981
- raise ApiTypeError(
982
- "Got an unexpected keyword argument '%s'"
983
- " to method update_persons_in_group" % key
984
- )
985
- local_var_params[key] = val
986
- del local_var_params['kwargs']
987
- # verify the required parameter 'group_id' is set
988
- if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501
989
- local_var_params['group_id'] is None): # noqa: E501
990
- raise ApiValueError("Missing the required parameter `group_id` when calling `update_persons_in_group`") # noqa: E501
991
- # verify the required parameter 'update_group' is set
992
- if self.api_client.client_side_validation and ('update_group' not in local_var_params or # noqa: E501
993
- local_var_params['update_group'] is None): # noqa: E501
994
- raise ApiValueError("Missing the required parameter `update_group` when calling `update_persons_in_group`") # noqa: E501
995
-
996
- collection_formats = {}
997
-
998
- path_params = {}
999
- if 'group_id' in local_var_params:
1000
- path_params['groupId'] = local_var_params['group_id'] # noqa: E501
1001
-
1002
- query_params = []
1003
-
1004
- header_params = {}
1005
- if 'x_request_id' in local_var_params:
1006
- header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
1007
-
1008
- form_params = []
1009
- local_var_files = {}
1010
-
1011
- body_params = None
1012
- if 'update_group' in local_var_params:
1013
- body_params = local_var_params['update_group']
1014
- # HTTP header `Accept`
1015
- header_params['Accept'] = self.api_client.select_header_accept(
1016
- ['application/json']) # noqa: E501
1017
-
1018
- # HTTP header `Content-Type`
1019
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1020
- ['application/json']) # noqa: E501
1021
-
1022
- # Authentication setting
1023
- auth_settings = [] # noqa: E501
1024
-
1025
- return self.api_client.call_api(
1026
- '/api/groups/{groupId}/persons', 'PUT',
1027
- path_params,
1028
- query_params,
1029
- header_params,
1030
- body=body_params,
1031
- post_params=form_params,
1032
- files=local_var_files,
1033
- response_type=None, # noqa: E501
1034
- auth_settings=auth_settings,
1035
- async_req=local_var_params.get('async_req'),
1036
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1037
- _preload_content=local_var_params.get('_preload_content', True),
1038
- _request_timeout=local_var_params.get('_request_timeout'),
1039
- collection_formats=collection_formats,
1040
- _request_auth=local_var_params.get('_request_auth'))
2095
+