regula-facesdk-webclient 6.4.198.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.
Potentially problematic release.
This version of regula-facesdk-webclient might be problematic. Click here for more details.
- regula/__init__.py +0 -0
- regula/facesdk/__init__.py +0 -0
- regula/facesdk/webclient/__init__.py +15 -0
- regula/facesdk/webclient/ext/__init__.py +5 -0
- regula/facesdk/webclient/ext/api/__init__.py +3 -0
- regula/facesdk/webclient/ext/api/group_api.py +36 -0
- regula/facesdk/webclient/ext/api/match_api.py +46 -0
- regula/facesdk/webclient/ext/api/person_api.py +46 -0
- regula/facesdk/webclient/ext/api/sdk.py +28 -0
- regula/facesdk/webclient/ext/api/search_api.py +17 -0
- regula/facesdk/webclient/ext/common.py +7 -0
- regula/facesdk/webclient/ext/models/__init__.py +6 -0
- regula/facesdk/webclient/ext/models/detect_request.py +32 -0
- regula/facesdk/webclient/ext/models/match_image.py +19 -0
- regula/facesdk/webclient/ext/models/match_request.py +34 -0
- regula/facesdk/webclient/gen/__init__.py +27 -0
- regula/facesdk/webclient/gen/api/__init__.py +3 -0
- regula/facesdk/webclient/gen/api/diagnostics_api.py +162 -0
- regula/facesdk/webclient/gen/api/group_api.py +1040 -0
- regula/facesdk/webclient/gen/api/healthcheck_api.py +283 -0
- regula/facesdk/webclient/gen/api/liveness_2_0_api.py +168 -0
- regula/facesdk/webclient/gen/api/liveness_api.py +424 -0
- regula/facesdk/webclient/gen/api/match_api.py +463 -0
- regula/facesdk/webclient/gen/api/person_api.py +1345 -0
- regula/facesdk/webclient/gen/api/search_api.py +177 -0
- regula/facesdk/webclient/gen/api_client.py +695 -0
- regula/facesdk/webclient/gen/apis/__init__.py +22 -0
- regula/facesdk/webclient/gen/configuration.py +446 -0
- regula/facesdk/webclient/gen/exceptions.py +159 -0
- regula/facesdk/webclient/gen/model/__init__.py +5 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_request.py +205 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +204 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_response.py +262 -0
- regula/facesdk/webclient/gen/model/attribute_config.py +120 -0
- regula/facesdk/webclient/gen/model/attribute_config_list.py +92 -0
- regula/facesdk/webclient/gen/model/crop.py +208 -0
- regula/facesdk/webclient/gen/model/detect_request.py +204 -0
- regula/facesdk/webclient/gen/model/detect_request_attributes.py +120 -0
- regula/facesdk/webclient/gen/model/detect_response.py +147 -0
- regula/facesdk/webclient/gen/model/detect_response_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/detect_result.py +231 -0
- regula/facesdk/webclient/gen/model/detection.py +258 -0
- regula/facesdk/webclient/gen/model/detection_attributes.py +148 -0
- regula/facesdk/webclient/gen/model/detection_face.py +260 -0
- regula/facesdk/webclient/gen/model/detection_quality.py +234 -0
- regula/facesdk/webclient/gen/model/device_info.py +231 -0
- regula/facesdk/webclient/gen/model/face_align_type_quality.py +109 -0
- regula/facesdk/webclient/gen/model/face_attribute.py +133 -0
- regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +109 -0
- regula/facesdk/webclient/gen/model/face_image_quality_groups.py +118 -0
- regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +118 -0
- regula/facesdk/webclient/gen/model/face_image_quality_status.py +103 -0
- regula/facesdk/webclient/gen/model/face_quality_config_name.py +238 -0
- regula/facesdk/webclient/gen/model/face_quality_scenarios.py +121 -0
- regula/facesdk/webclient/gen/model/face_quality_status.py +103 -0
- regula/facesdk/webclient/gen/model/face_rectangular.py +92 -0
- regula/facesdk/webclient/gen/model/face_sdk_result.py +121 -0
- regula/facesdk/webclient/gen/model/face_sdk_result_code.py +217 -0
- regula/facesdk/webclient/gen/model/faces_response.py +286 -0
- regula/facesdk/webclient/gen/model/faces_response_all_of.py +148 -0
- regula/facesdk/webclient/gen/model/filter_op.py +100 -0
- regula/facesdk/webclient/gen/model/filter_search_request.py +176 -0
- regula/facesdk/webclient/gen/model/group.py +206 -0
- regula/facesdk/webclient/gen/model/group_all_of.py +150 -0
- regula/facesdk/webclient/gen/model/group_page.py +178 -0
- regula/facesdk/webclient/gen/model/group_page_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/group_response.py +150 -0
- regula/facesdk/webclient/gen/model/group_to_create.py +180 -0
- regula/facesdk/webclient/gen/model/image.py +290 -0
- regula/facesdk/webclient/gen/model/image_fields.py +258 -0
- regula/facesdk/webclient/gen/model/image_fields_image.py +204 -0
- regula/facesdk/webclient/gen/model/image_page.py +176 -0
- regula/facesdk/webclient/gen/model/image_page_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/image_source.py +115 -0
- regula/facesdk/webclient/gen/model/liveness_transaction.py +334 -0
- regula/facesdk/webclient/gen/model/liveness_type.py +100 -0
- regula/facesdk/webclient/gen/model/match_and_search_request.py +178 -0
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +148 -0
- regula/facesdk/webclient/gen/model/match_and_search_response.py +233 -0
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +206 -0
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +176 -0
- regula/facesdk/webclient/gen/model/match_image.py +205 -0
- regula/facesdk/webclient/gen/model/match_image_detection.py +178 -0
- regula/facesdk/webclient/gen/model/match_image_result.py +316 -0
- regula/facesdk/webclient/gen/model/match_request.py +204 -0
- regula/facesdk/webclient/gen/model/match_request_output_image_params.py +148 -0
- regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +212 -0
- regula/facesdk/webclient/gen/model/match_response.py +205 -0
- regula/facesdk/webclient/gen/model/match_response_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/operation_log.py +206 -0
- regula/facesdk/webclient/gen/model/output_image_params.py +146 -0
- regula/facesdk/webclient/gen/model/page.py +150 -0
- regula/facesdk/webclient/gen/model/person.py +318 -0
- regula/facesdk/webclient/gen/model/person_all_of.py +206 -0
- regula/facesdk/webclient/gen/model/person_created_response.py +178 -0
- regula/facesdk/webclient/gen/model/person_fields.py +234 -0
- regula/facesdk/webclient/gen/model/person_to_update_fields.py +206 -0
- regula/facesdk/webclient/gen/model/person_with_images.py +346 -0
- regula/facesdk/webclient/gen/model/person_with_images_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/persons_page.py +176 -0
- regula/facesdk/webclient/gen/model/persons_page_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/process_param.py +226 -0
- regula/facesdk/webclient/gen/model/process_param_attributes.py +120 -0
- regula/facesdk/webclient/gen/model/quality_config.py +154 -0
- regula/facesdk/webclient/gen/model/quality_config_list.py +92 -0
- regula/facesdk/webclient/gen/model/quality_detail.py +234 -0
- regula/facesdk/webclient/gen/model/quality_details_groups.py +202 -0
- regula/facesdk/webclient/gen/model/quality_request.py +146 -0
- regula/facesdk/webclient/gen/model/recognize_image.py +346 -0
- regula/facesdk/webclient/gen/model/recognize_image_all_of.py +150 -0
- regula/facesdk/webclient/gen/model/resize_options.py +178 -0
- regula/facesdk/webclient/gen/model/rgb.py +92 -0
- regula/facesdk/webclient/gen/model/search_bad_params.py +172 -0
- regula/facesdk/webclient/gen/model/search_detection.py +398 -0
- regula/facesdk/webclient/gen/model/search_parameters.py +174 -0
- regula/facesdk/webclient/gen/model/search_parameters_create_person.py +177 -0
- regula/facesdk/webclient/gen/model/search_person.py +372 -0
- regula/facesdk/webclient/gen/model/search_person_all_of.py +148 -0
- regula/facesdk/webclient/gen/model/search_request.py +338 -0
- regula/facesdk/webclient/gen/model/search_request_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/search_result.py +313 -0
- regula/facesdk/webclient/gen/model/search_result_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/transaction_config.py +92 -0
- regula/facesdk/webclient/gen/model/transaction_info.py +344 -0
- regula/facesdk/webclient/gen/model/update_group.py +150 -0
- regula/facesdk/webclient/gen/model_utils.py +2037 -0
- regula/facesdk/webclient/gen/models/__init__.py +96 -0
- regula/facesdk/webclient/gen/rest.py +346 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/METADATA +73 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/RECORD +133 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/WHEEL +5 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1040 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
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: 6.2.0
|
|
9
|
+
Generated by: https://openapi-generator.tech
|
|
10
|
+
"""
|
|
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):
|
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
|
+
Ref: https://openapi-generator.tech
|
|
30
|
+
|
|
31
|
+
Do not edit the class manually.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, api_client=None):
|
|
35
|
+
if api_client is None:
|
|
36
|
+
api_client = ApiClient()
|
|
37
|
+
self.api_client = api_client
|
|
38
|
+
|
|
39
|
+
def create_group(self, group_to_create, **kwargs): # noqa: E501
|
|
40
|
+
"""Create group # noqa: E501
|
|
41
|
+
|
|
42
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
43
|
+
asynchronous HTTP request, please pass async_req=True
|
|
44
|
+
|
|
45
|
+
>>> thread = api.create_group(group_to_create, async_req=True)
|
|
46
|
+
>>> result = thread.get()
|
|
47
|
+
|
|
48
|
+
:param group_to_create: Request body for the group to create. (required)
|
|
49
|
+
:type group_to_create: GroupToCreate
|
|
50
|
+
:param x_request_id: Request header label.
|
|
51
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
59
|
+
number provided, it will be total request
|
|
60
|
+
timeout. It can also be a pair (tuple) of
|
|
61
|
+
(connection, read) timeouts.
|
|
62
|
+
: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
|
|
69
|
+
|
|
70
|
+
def create_group_with_http_info(self, group_to_create, **kwargs): # noqa: E501
|
|
71
|
+
"""Create group # noqa: E501
|
|
72
|
+
|
|
73
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
74
|
+
asynchronous HTTP request, please pass async_req=True
|
|
75
|
+
|
|
76
|
+
>>> thread = api.create_group_with_http_info(group_to_create, async_req=True)
|
|
77
|
+
>>> result = thread.get()
|
|
78
|
+
|
|
79
|
+
:param group_to_create: Request body for the group to create. (required)
|
|
80
|
+
:type group_to_create: GroupToCreate
|
|
81
|
+
:param x_request_id: Request header label.
|
|
82
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
93
|
+
number provided, it will be total request
|
|
94
|
+
timeout. It can also be a pair (tuple) of
|
|
95
|
+
(connection, read) timeouts.
|
|
96
|
+
: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.
|
|
99
|
+
:type _request_auth: dict, optional
|
|
100
|
+
: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
|
+
"""
|
|
105
|
+
|
|
106
|
+
local_var_params = locals()
|
|
107
|
+
|
|
108
|
+
all_params = [
|
|
109
|
+
'group_to_create',
|
|
110
|
+
'x_request_id',
|
|
111
|
+
]
|
|
112
|
+
all_params.extend(
|
|
113
|
+
[
|
|
114
|
+
'async_req',
|
|
115
|
+
'_return_http_data_only',
|
|
116
|
+
'_preload_content',
|
|
117
|
+
'_request_timeout',
|
|
118
|
+
'_request_auth'
|
|
119
|
+
]
|
|
120
|
+
)
|
|
121
|
+
|
|
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()
|
|
187
|
+
|
|
188
|
+
:param group_id: Group ID. (required)
|
|
189
|
+
:type group_id: str
|
|
190
|
+
:param x_request_id: Request header label.
|
|
191
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
199
|
+
number provided, it will be total request
|
|
200
|
+
timeout. It can also be a pair (tuple) of
|
|
201
|
+
(connection, read) timeouts.
|
|
202
|
+
: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
|
|
209
|
+
|
|
210
|
+
def delete_group_with_http_info(self, group_id, **kwargs): # noqa: E501
|
|
211
|
+
"""Delete group # noqa: E501
|
|
212
|
+
|
|
213
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
214
|
+
asynchronous HTTP request, please pass async_req=True
|
|
215
|
+
|
|
216
|
+
>>> thread = api.delete_group_with_http_info(group_id, async_req=True)
|
|
217
|
+
>>> result = thread.get()
|
|
218
|
+
|
|
219
|
+
:param group_id: Group ID. (required)
|
|
220
|
+
:type group_id: str
|
|
221
|
+
:param x_request_id: Request header label.
|
|
222
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
233
|
+
number provided, it will be total request
|
|
234
|
+
timeout. It can also be a pair (tuple) of
|
|
235
|
+
(connection, read) timeouts.
|
|
236
|
+
: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.
|
|
239
|
+
:type _request_auth: dict, optional
|
|
240
|
+
: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()
|
|
247
|
+
|
|
248
|
+
all_params = [
|
|
249
|
+
'group_id',
|
|
250
|
+
'x_request_id',
|
|
251
|
+
]
|
|
252
|
+
all_params.extend(
|
|
253
|
+
[
|
|
254
|
+
'async_req',
|
|
255
|
+
'_return_http_data_only',
|
|
256
|
+
'_preload_content',
|
|
257
|
+
'_request_timeout',
|
|
258
|
+
'_request_auth'
|
|
259
|
+
]
|
|
260
|
+
)
|
|
261
|
+
|
|
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
|
+
|
|
324
|
+
:param page: The page number to get a list of persons or groups.
|
|
325
|
+
:type page: int
|
|
326
|
+
:param size: The page size with a list of persons or groups, items.
|
|
327
|
+
:type size: int
|
|
328
|
+
:param x_request_id: Request header label.
|
|
329
|
+
: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
|
|
336
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
337
|
+
number provided, it will be total request
|
|
338
|
+
timeout. It can also be a pair (tuple) of
|
|
339
|
+
(connection, read) timeouts.
|
|
340
|
+
: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
|
|
347
|
+
|
|
348
|
+
def get_all_groups_with_http_info(self, **kwargs): # noqa: E501
|
|
349
|
+
"""Get groups # noqa: E501
|
|
350
|
+
|
|
351
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
352
|
+
asynchronous HTTP request, please pass async_req=True
|
|
353
|
+
|
|
354
|
+
>>> thread = api.get_all_groups_with_http_info(async_req=True)
|
|
355
|
+
>>> result = thread.get()
|
|
356
|
+
|
|
357
|
+
:param page: The page number to get a list of persons or groups.
|
|
358
|
+
:type page: int
|
|
359
|
+
:param size: The page size with a list of persons or groups, items.
|
|
360
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
373
|
+
number provided, it will be total request
|
|
374
|
+
timeout. It can also be a pair (tuple) of
|
|
375
|
+
(connection, read) timeouts.
|
|
376
|
+
: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.
|
|
379
|
+
:type _request_auth: dict, optional
|
|
380
|
+
: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()
|
|
387
|
+
|
|
388
|
+
all_params = [
|
|
389
|
+
'page',
|
|
390
|
+
'size',
|
|
391
|
+
'x_request_id',
|
|
392
|
+
]
|
|
393
|
+
all_params.extend(
|
|
394
|
+
[
|
|
395
|
+
'async_req',
|
|
396
|
+
'_return_http_data_only',
|
|
397
|
+
'_preload_content',
|
|
398
|
+
'_request_timeout',
|
|
399
|
+
'_request_auth'
|
|
400
|
+
]
|
|
401
|
+
)
|
|
402
|
+
|
|
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()
|
|
462
|
+
|
|
463
|
+
:param group_id: Group ID. (required)
|
|
464
|
+
:type group_id: str
|
|
465
|
+
:param page: The page number to get a list of persons or groups.
|
|
466
|
+
:type page: int
|
|
467
|
+
:param size: The page size with a list of persons or groups, items.
|
|
468
|
+
:type size: int
|
|
469
|
+
:param x_request_id: Request header label.
|
|
470
|
+
: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
|
|
477
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
478
|
+
number provided, it will be total request
|
|
479
|
+
timeout. It can also be a pair (tuple) of
|
|
480
|
+
(connection, read) timeouts.
|
|
481
|
+
: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
|
|
488
|
+
|
|
489
|
+
def get_all_persons_by_group_id_with_http_info(self, group_id, **kwargs): # noqa: E501
|
|
490
|
+
"""Get group persons # noqa: E501
|
|
491
|
+
|
|
492
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
493
|
+
asynchronous HTTP request, please pass async_req=True
|
|
494
|
+
|
|
495
|
+
>>> thread = api.get_all_persons_by_group_id_with_http_info(group_id, async_req=True)
|
|
496
|
+
>>> result = thread.get()
|
|
497
|
+
|
|
498
|
+
:param group_id: Group ID. (required)
|
|
499
|
+
:type group_id: str
|
|
500
|
+
:param page: The page number to get a list of persons or groups.
|
|
501
|
+
:type page: int
|
|
502
|
+
:param size: The page size with a list of persons or groups, items.
|
|
503
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
516
|
+
number provided, it will be total request
|
|
517
|
+
timeout. It can also be a pair (tuple) of
|
|
518
|
+
(connection, read) timeouts.
|
|
519
|
+
: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.
|
|
522
|
+
:type _request_auth: dict, optional
|
|
523
|
+
: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',
|
|
536
|
+
]
|
|
537
|
+
all_params.extend(
|
|
538
|
+
[
|
|
539
|
+
'async_req',
|
|
540
|
+
'_return_http_data_only',
|
|
541
|
+
'_preload_content',
|
|
542
|
+
'_request_timeout',
|
|
543
|
+
'_request_auth'
|
|
544
|
+
]
|
|
545
|
+
)
|
|
546
|
+
|
|
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()
|
|
612
|
+
|
|
613
|
+
:param group_id: Group ID. (required)
|
|
614
|
+
:type group_id: str
|
|
615
|
+
:param x_request_id: Request header label.
|
|
616
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
624
|
+
number provided, it will be total request
|
|
625
|
+
timeout. It can also be a pair (tuple) of
|
|
626
|
+
(connection, read) timeouts.
|
|
627
|
+
: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
|
|
634
|
+
|
|
635
|
+
def get_group_with_http_info(self, group_id, **kwargs): # noqa: E501
|
|
636
|
+
"""Get group # noqa: E501
|
|
637
|
+
|
|
638
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
639
|
+
asynchronous HTTP request, please pass async_req=True
|
|
640
|
+
|
|
641
|
+
>>> thread = api.get_group_with_http_info(group_id, async_req=True)
|
|
642
|
+
>>> result = thread.get()
|
|
643
|
+
|
|
644
|
+
:param group_id: Group ID. (required)
|
|
645
|
+
:type group_id: str
|
|
646
|
+
:param x_request_id: Request header label.
|
|
647
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
658
|
+
number provided, it will be total request
|
|
659
|
+
timeout. It can also be a pair (tuple) of
|
|
660
|
+
(connection, read) timeouts.
|
|
661
|
+
: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.
|
|
664
|
+
:type _request_auth: dict, optional
|
|
665
|
+
: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()
|
|
672
|
+
|
|
673
|
+
all_params = [
|
|
674
|
+
'group_id',
|
|
675
|
+
'x_request_id',
|
|
676
|
+
]
|
|
677
|
+
all_params.extend(
|
|
678
|
+
[
|
|
679
|
+
'async_req',
|
|
680
|
+
'_return_http_data_only',
|
|
681
|
+
'_preload_content',
|
|
682
|
+
'_request_timeout',
|
|
683
|
+
'_request_auth'
|
|
684
|
+
]
|
|
685
|
+
)
|
|
686
|
+
|
|
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()
|
|
748
|
+
|
|
749
|
+
:param group_id: Group ID. (required)
|
|
750
|
+
:type group_id: str
|
|
751
|
+
:param group_to_create: Request body for the group to update. (required)
|
|
752
|
+
:type group_to_create: GroupToCreate
|
|
753
|
+
:param x_request_id: Request header label.
|
|
754
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
762
|
+
number provided, it will be total request
|
|
763
|
+
timeout. It can also be a pair (tuple) of
|
|
764
|
+
(connection, read) timeouts.
|
|
765
|
+
: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
|
|
772
|
+
|
|
773
|
+
def update_group_with_http_info(self, group_id, group_to_create, **kwargs): # noqa: E501
|
|
774
|
+
"""Update group # noqa: E501
|
|
775
|
+
|
|
776
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
777
|
+
asynchronous HTTP request, please pass async_req=True
|
|
778
|
+
|
|
779
|
+
>>> thread = api.update_group_with_http_info(group_id, group_to_create, async_req=True)
|
|
780
|
+
>>> result = thread.get()
|
|
781
|
+
|
|
782
|
+
:param group_id: Group ID. (required)
|
|
783
|
+
:type group_id: str
|
|
784
|
+
:param group_to_create: Request body for the group to update. (required)
|
|
785
|
+
:type group_to_create: GroupToCreate
|
|
786
|
+
:param x_request_id: Request header label.
|
|
787
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
798
|
+
number provided, it will be total request
|
|
799
|
+
timeout. It can also be a pair (tuple) of
|
|
800
|
+
(connection, read) timeouts.
|
|
801
|
+
: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.
|
|
804
|
+
:type _request_auth: dict, optional
|
|
805
|
+
:return: Returns the result object.
|
|
806
|
+
If the method is called asynchronously,
|
|
807
|
+
returns the request thread.
|
|
808
|
+
:rtype: None
|
|
809
|
+
"""
|
|
810
|
+
|
|
811
|
+
local_var_params = locals()
|
|
812
|
+
|
|
813
|
+
all_params = [
|
|
814
|
+
'group_id',
|
|
815
|
+
'group_to_create',
|
|
816
|
+
'x_request_id',
|
|
817
|
+
]
|
|
818
|
+
all_params.extend(
|
|
819
|
+
[
|
|
820
|
+
'async_req',
|
|
821
|
+
'_return_http_data_only',
|
|
822
|
+
'_preload_content',
|
|
823
|
+
'_request_timeout',
|
|
824
|
+
'_request_auth'
|
|
825
|
+
]
|
|
826
|
+
)
|
|
827
|
+
|
|
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()
|
|
899
|
+
|
|
900
|
+
:param group_id: Group ID. (required)
|
|
901
|
+
:type group_id: str
|
|
902
|
+
:param update_group: Request body for person IDs to add or remove. (required)
|
|
903
|
+
:type update_group: UpdateGroup
|
|
904
|
+
:param x_request_id: Request header label.
|
|
905
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
913
|
+
number provided, it will be total request
|
|
914
|
+
timeout. It can also be a pair (tuple) of
|
|
915
|
+
(connection, read) timeouts.
|
|
916
|
+
: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
|
|
923
|
+
|
|
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
|
+
|
|
927
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
928
|
+
asynchronous HTTP request, please pass async_req=True
|
|
929
|
+
|
|
930
|
+
>>> thread = api.update_persons_in_group_with_http_info(group_id, update_group, async_req=True)
|
|
931
|
+
>>> result = thread.get()
|
|
932
|
+
|
|
933
|
+
:param group_id: Group ID. (required)
|
|
934
|
+
:type group_id: str
|
|
935
|
+
:param update_group: Request body for person IDs to add or remove. (required)
|
|
936
|
+
:type update_group: UpdateGroup
|
|
937
|
+
:param x_request_id: Request header label.
|
|
938
|
+
: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
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
949
|
+
number provided, it will be total request
|
|
950
|
+
timeout. It can also be a pair (tuple) of
|
|
951
|
+
(connection, read) timeouts.
|
|
952
|
+
: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.
|
|
955
|
+
:type _request_auth: dict, optional
|
|
956
|
+
:return: Returns the result object.
|
|
957
|
+
If the method is called asynchronously,
|
|
958
|
+
returns the request thread.
|
|
959
|
+
:rtype: None
|
|
960
|
+
"""
|
|
961
|
+
|
|
962
|
+
local_var_params = locals()
|
|
963
|
+
|
|
964
|
+
all_params = [
|
|
965
|
+
'group_id',
|
|
966
|
+
'update_group',
|
|
967
|
+
'x_request_id',
|
|
968
|
+
]
|
|
969
|
+
all_params.extend(
|
|
970
|
+
[
|
|
971
|
+
'async_req',
|
|
972
|
+
'_return_http_data_only',
|
|
973
|
+
'_preload_content',
|
|
974
|
+
'_request_timeout',
|
|
975
|
+
'_request_auth'
|
|
976
|
+
]
|
|
977
|
+
)
|
|
978
|
+
|
|
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'))
|