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.

Files changed (133) hide show
  1. regula/__init__.py +0 -0
  2. regula/facesdk/__init__.py +0 -0
  3. regula/facesdk/webclient/__init__.py +15 -0
  4. regula/facesdk/webclient/ext/__init__.py +5 -0
  5. regula/facesdk/webclient/ext/api/__init__.py +3 -0
  6. regula/facesdk/webclient/ext/api/group_api.py +36 -0
  7. regula/facesdk/webclient/ext/api/match_api.py +46 -0
  8. regula/facesdk/webclient/ext/api/person_api.py +46 -0
  9. regula/facesdk/webclient/ext/api/sdk.py +28 -0
  10. regula/facesdk/webclient/ext/api/search_api.py +17 -0
  11. regula/facesdk/webclient/ext/common.py +7 -0
  12. regula/facesdk/webclient/ext/models/__init__.py +6 -0
  13. regula/facesdk/webclient/ext/models/detect_request.py +32 -0
  14. regula/facesdk/webclient/ext/models/match_image.py +19 -0
  15. regula/facesdk/webclient/ext/models/match_request.py +34 -0
  16. regula/facesdk/webclient/gen/__init__.py +27 -0
  17. regula/facesdk/webclient/gen/api/__init__.py +3 -0
  18. regula/facesdk/webclient/gen/api/diagnostics_api.py +162 -0
  19. regula/facesdk/webclient/gen/api/group_api.py +1040 -0
  20. regula/facesdk/webclient/gen/api/healthcheck_api.py +283 -0
  21. regula/facesdk/webclient/gen/api/liveness_2_0_api.py +168 -0
  22. regula/facesdk/webclient/gen/api/liveness_api.py +424 -0
  23. regula/facesdk/webclient/gen/api/match_api.py +463 -0
  24. regula/facesdk/webclient/gen/api/person_api.py +1345 -0
  25. regula/facesdk/webclient/gen/api/search_api.py +177 -0
  26. regula/facesdk/webclient/gen/api_client.py +695 -0
  27. regula/facesdk/webclient/gen/apis/__init__.py +22 -0
  28. regula/facesdk/webclient/gen/configuration.py +446 -0
  29. regula/facesdk/webclient/gen/exceptions.py +159 -0
  30. regula/facesdk/webclient/gen/model/__init__.py +5 -0
  31. regula/facesdk/webclient/gen/model/add_image_to_person_request.py +205 -0
  32. regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +204 -0
  33. regula/facesdk/webclient/gen/model/add_image_to_person_response.py +262 -0
  34. regula/facesdk/webclient/gen/model/attribute_config.py +120 -0
  35. regula/facesdk/webclient/gen/model/attribute_config_list.py +92 -0
  36. regula/facesdk/webclient/gen/model/crop.py +208 -0
  37. regula/facesdk/webclient/gen/model/detect_request.py +204 -0
  38. regula/facesdk/webclient/gen/model/detect_request_attributes.py +120 -0
  39. regula/facesdk/webclient/gen/model/detect_response.py +147 -0
  40. regula/facesdk/webclient/gen/model/detect_response_all_of.py +120 -0
  41. regula/facesdk/webclient/gen/model/detect_result.py +231 -0
  42. regula/facesdk/webclient/gen/model/detection.py +258 -0
  43. regula/facesdk/webclient/gen/model/detection_attributes.py +148 -0
  44. regula/facesdk/webclient/gen/model/detection_face.py +260 -0
  45. regula/facesdk/webclient/gen/model/detection_quality.py +234 -0
  46. regula/facesdk/webclient/gen/model/device_info.py +231 -0
  47. regula/facesdk/webclient/gen/model/face_align_type_quality.py +109 -0
  48. regula/facesdk/webclient/gen/model/face_attribute.py +133 -0
  49. regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +109 -0
  50. regula/facesdk/webclient/gen/model/face_image_quality_groups.py +118 -0
  51. regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +118 -0
  52. regula/facesdk/webclient/gen/model/face_image_quality_status.py +103 -0
  53. regula/facesdk/webclient/gen/model/face_quality_config_name.py +238 -0
  54. regula/facesdk/webclient/gen/model/face_quality_scenarios.py +121 -0
  55. regula/facesdk/webclient/gen/model/face_quality_status.py +103 -0
  56. regula/facesdk/webclient/gen/model/face_rectangular.py +92 -0
  57. regula/facesdk/webclient/gen/model/face_sdk_result.py +121 -0
  58. regula/facesdk/webclient/gen/model/face_sdk_result_code.py +217 -0
  59. regula/facesdk/webclient/gen/model/faces_response.py +286 -0
  60. regula/facesdk/webclient/gen/model/faces_response_all_of.py +148 -0
  61. regula/facesdk/webclient/gen/model/filter_op.py +100 -0
  62. regula/facesdk/webclient/gen/model/filter_search_request.py +176 -0
  63. regula/facesdk/webclient/gen/model/group.py +206 -0
  64. regula/facesdk/webclient/gen/model/group_all_of.py +150 -0
  65. regula/facesdk/webclient/gen/model/group_page.py +178 -0
  66. regula/facesdk/webclient/gen/model/group_page_all_of.py +122 -0
  67. regula/facesdk/webclient/gen/model/group_response.py +150 -0
  68. regula/facesdk/webclient/gen/model/group_to_create.py +180 -0
  69. regula/facesdk/webclient/gen/model/image.py +290 -0
  70. regula/facesdk/webclient/gen/model/image_fields.py +258 -0
  71. regula/facesdk/webclient/gen/model/image_fields_image.py +204 -0
  72. regula/facesdk/webclient/gen/model/image_page.py +176 -0
  73. regula/facesdk/webclient/gen/model/image_page_all_of.py +120 -0
  74. regula/facesdk/webclient/gen/model/image_source.py +115 -0
  75. regula/facesdk/webclient/gen/model/liveness_transaction.py +334 -0
  76. regula/facesdk/webclient/gen/model/liveness_type.py +100 -0
  77. regula/facesdk/webclient/gen/model/match_and_search_request.py +178 -0
  78. regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +178 -0
  79. regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +148 -0
  80. regula/facesdk/webclient/gen/model/match_and_search_response.py +233 -0
  81. regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +206 -0
  82. regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +176 -0
  83. regula/facesdk/webclient/gen/model/match_image.py +205 -0
  84. regula/facesdk/webclient/gen/model/match_image_detection.py +178 -0
  85. regula/facesdk/webclient/gen/model/match_image_result.py +316 -0
  86. regula/facesdk/webclient/gen/model/match_request.py +204 -0
  87. regula/facesdk/webclient/gen/model/match_request_output_image_params.py +148 -0
  88. regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +212 -0
  89. regula/facesdk/webclient/gen/model/match_response.py +205 -0
  90. regula/facesdk/webclient/gen/model/match_response_all_of.py +178 -0
  91. regula/facesdk/webclient/gen/model/operation_log.py +206 -0
  92. regula/facesdk/webclient/gen/model/output_image_params.py +146 -0
  93. regula/facesdk/webclient/gen/model/page.py +150 -0
  94. regula/facesdk/webclient/gen/model/person.py +318 -0
  95. regula/facesdk/webclient/gen/model/person_all_of.py +206 -0
  96. regula/facesdk/webclient/gen/model/person_created_response.py +178 -0
  97. regula/facesdk/webclient/gen/model/person_fields.py +234 -0
  98. regula/facesdk/webclient/gen/model/person_to_update_fields.py +206 -0
  99. regula/facesdk/webclient/gen/model/person_with_images.py +346 -0
  100. regula/facesdk/webclient/gen/model/person_with_images_all_of.py +122 -0
  101. regula/facesdk/webclient/gen/model/persons_page.py +176 -0
  102. regula/facesdk/webclient/gen/model/persons_page_all_of.py +120 -0
  103. regula/facesdk/webclient/gen/model/process_param.py +226 -0
  104. regula/facesdk/webclient/gen/model/process_param_attributes.py +120 -0
  105. regula/facesdk/webclient/gen/model/quality_config.py +154 -0
  106. regula/facesdk/webclient/gen/model/quality_config_list.py +92 -0
  107. regula/facesdk/webclient/gen/model/quality_detail.py +234 -0
  108. regula/facesdk/webclient/gen/model/quality_details_groups.py +202 -0
  109. regula/facesdk/webclient/gen/model/quality_request.py +146 -0
  110. regula/facesdk/webclient/gen/model/recognize_image.py +346 -0
  111. regula/facesdk/webclient/gen/model/recognize_image_all_of.py +150 -0
  112. regula/facesdk/webclient/gen/model/resize_options.py +178 -0
  113. regula/facesdk/webclient/gen/model/rgb.py +92 -0
  114. regula/facesdk/webclient/gen/model/search_bad_params.py +172 -0
  115. regula/facesdk/webclient/gen/model/search_detection.py +398 -0
  116. regula/facesdk/webclient/gen/model/search_parameters.py +174 -0
  117. regula/facesdk/webclient/gen/model/search_parameters_create_person.py +177 -0
  118. regula/facesdk/webclient/gen/model/search_person.py +372 -0
  119. regula/facesdk/webclient/gen/model/search_person_all_of.py +148 -0
  120. regula/facesdk/webclient/gen/model/search_request.py +338 -0
  121. regula/facesdk/webclient/gen/model/search_request_all_of.py +178 -0
  122. regula/facesdk/webclient/gen/model/search_result.py +313 -0
  123. regula/facesdk/webclient/gen/model/search_result_all_of.py +122 -0
  124. regula/facesdk/webclient/gen/model/transaction_config.py +92 -0
  125. regula/facesdk/webclient/gen/model/transaction_info.py +344 -0
  126. regula/facesdk/webclient/gen/model/update_group.py +150 -0
  127. regula/facesdk/webclient/gen/model_utils.py +2037 -0
  128. regula/facesdk/webclient/gen/models/__init__.py +96 -0
  129. regula/facesdk/webclient/gen/rest.py +346 -0
  130. regula_facesdk_webclient-6.4.198.dev0.dist-info/METADATA +73 -0
  131. regula_facesdk_webclient-6.4.198.dev0.dist-info/RECORD +133 -0
  132. regula_facesdk_webclient-6.4.198.dev0.dist-info/WHEEL +5 -0
  133. regula_facesdk_webclient-6.4.198.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1345 @@
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 PersonApi(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 add_image_to_person(self, person_id, add_image_to_person_request, **kwargs): # noqa: E501
40
+ """Add person image # 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.add_image_to_person(person_id, add_image_to_person_request, async_req=True)
46
+ >>> result = thread.get()
47
+
48
+ :param person_id: Person ID. (required)
49
+ :type person_id: str
50
+ :param add_image_to_person_request: Image to add. (required)
51
+ :type add_image_to_person_request: AddImageToPersonRequest
52
+ :param x_request_id: Request header label.
53
+ :type x_request_id: str
54
+ :param async_req: Whether to execute the request asynchronously.
55
+ :type async_req: bool, optional
56
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
57
+ be returned without reading/decoding response
58
+ data. Default is True.
59
+ :type _preload_content: bool, optional
60
+ :param _request_timeout: timeout setting for this request. If one
61
+ number provided, it will be total request
62
+ timeout. It can also be a pair (tuple) of
63
+ (connection, read) timeouts.
64
+ :return: Returns the result object.
65
+ If the method is called asynchronously,
66
+ returns the request thread.
67
+ :rtype: AddImageToPersonResponse
68
+ """
69
+ kwargs['_return_http_data_only'] = True
70
+ return self.add_image_to_person_with_http_info(person_id, add_image_to_person_request, **kwargs) # noqa: E501
71
+
72
+ def add_image_to_person_with_http_info(self, person_id, add_image_to_person_request, **kwargs): # noqa: E501
73
+ """Add person image # noqa: E501
74
+
75
+ This method makes a synchronous HTTP request by default. To make an
76
+ asynchronous HTTP request, please pass async_req=True
77
+
78
+ >>> thread = api.add_image_to_person_with_http_info(person_id, add_image_to_person_request, async_req=True)
79
+ >>> result = thread.get()
80
+
81
+ :param person_id: Person ID. (required)
82
+ :type person_id: str
83
+ :param add_image_to_person_request: Image to add. (required)
84
+ :type add_image_to_person_request: AddImageToPersonRequest
85
+ :param x_request_id: Request header label.
86
+ :type x_request_id: str
87
+ :param async_req: Whether to execute the request asynchronously.
88
+ :type async_req: bool, optional
89
+ :param _return_http_data_only: response data without head status code
90
+ and headers
91
+ :type _return_http_data_only: bool, optional
92
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
93
+ be returned without reading/decoding response
94
+ data. Default is True.
95
+ :type _preload_content: bool, optional
96
+ :param _request_timeout: timeout setting for this request. If one
97
+ number provided, it will be total request
98
+ timeout. It can also be a pair (tuple) of
99
+ (connection, read) timeouts.
100
+ :param _request_auth: set to override the auth_settings for an a single
101
+ request; this effectively ignores the authentication
102
+ in the spec for a single request.
103
+ :type _request_auth: dict, optional
104
+ :return: Returns the result object.
105
+ If the method is called asynchronously,
106
+ returns the request thread.
107
+ :rtype: tuple(AddImageToPersonResponse, status_code(int), headers(HTTPHeaderDict))
108
+ """
109
+
110
+ local_var_params = locals()
111
+
112
+ all_params = [
113
+ 'person_id',
114
+ 'add_image_to_person_request',
115
+ 'x_request_id',
116
+ ]
117
+ all_params.extend(
118
+ [
119
+ 'async_req',
120
+ '_return_http_data_only',
121
+ '_preload_content',
122
+ '_request_timeout',
123
+ '_request_auth'
124
+ ]
125
+ )
126
+
127
+ for key, val in six.iteritems(local_var_params['kwargs']):
128
+ if key not in all_params:
129
+ raise ApiTypeError(
130
+ "Got an unexpected keyword argument '%s'"
131
+ " to method add_image_to_person" % key
132
+ )
133
+ local_var_params[key] = val
134
+ del local_var_params['kwargs']
135
+ # verify the required parameter 'person_id' is set
136
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
137
+ local_var_params['person_id'] is None): # noqa: E501
138
+ raise ApiValueError("Missing the required parameter `person_id` when calling `add_image_to_person`") # noqa: E501
139
+ # verify the required parameter 'add_image_to_person_request' is set
140
+ if self.api_client.client_side_validation and ('add_image_to_person_request' not in local_var_params or # noqa: E501
141
+ local_var_params['add_image_to_person_request'] is None): # noqa: E501
142
+ raise ApiValueError("Missing the required parameter `add_image_to_person_request` when calling `add_image_to_person`") # noqa: E501
143
+
144
+ collection_formats = {}
145
+
146
+ path_params = {}
147
+ if 'person_id' in local_var_params:
148
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
149
+
150
+ query_params = []
151
+
152
+ header_params = {}
153
+ if 'x_request_id' in local_var_params:
154
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
155
+
156
+ form_params = []
157
+ local_var_files = {}
158
+
159
+ body_params = None
160
+ if 'add_image_to_person_request' in local_var_params:
161
+ body_params = local_var_params['add_image_to_person_request']
162
+ # HTTP header `Accept`
163
+ header_params['Accept'] = self.api_client.select_header_accept(
164
+ ['application/json']) # noqa: E501
165
+
166
+ # HTTP header `Content-Type`
167
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
168
+ ['application/json']) # noqa: E501
169
+
170
+ # Authentication setting
171
+ auth_settings = [] # noqa: E501
172
+
173
+ return self.api_client.call_api(
174
+ '/api/persons/{personId}/images', 'POST',
175
+ path_params,
176
+ query_params,
177
+ header_params,
178
+ body=body_params,
179
+ post_params=form_params,
180
+ files=local_var_files,
181
+ response_type='AddImageToPersonResponse', # noqa: E501
182
+ auth_settings=auth_settings,
183
+ async_req=local_var_params.get('async_req'),
184
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
185
+ _preload_content=local_var_params.get('_preload_content', True),
186
+ _request_timeout=local_var_params.get('_request_timeout'),
187
+ collection_formats=collection_formats,
188
+ _request_auth=local_var_params.get('_request_auth'))
189
+
190
+ def create_person(self, person_fields, **kwargs): # noqa: E501
191
+ """Create person # noqa: E501
192
+
193
+ This method makes a synchronous HTTP request by default. To make an
194
+ asynchronous HTTP request, please pass async_req=True
195
+
196
+ >>> thread = api.create_person(person_fields, async_req=True)
197
+ >>> result = thread.get()
198
+
199
+ :param person_fields: (required)
200
+ :type person_fields: PersonFields
201
+ :param x_request_id: Request header label.
202
+ :type x_request_id: str
203
+ :param async_req: Whether to execute the request asynchronously.
204
+ :type async_req: bool, optional
205
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
206
+ be returned without reading/decoding response
207
+ data. Default is True.
208
+ :type _preload_content: bool, optional
209
+ :param _request_timeout: timeout setting for this request. If one
210
+ number provided, it will be total request
211
+ timeout. It can also be a pair (tuple) of
212
+ (connection, read) timeouts.
213
+ :return: Returns the result object.
214
+ If the method is called asynchronously,
215
+ returns the request thread.
216
+ :rtype: Person
217
+ """
218
+ kwargs['_return_http_data_only'] = True
219
+ return self.create_person_with_http_info(person_fields, **kwargs) # noqa: E501
220
+
221
+ def create_person_with_http_info(self, person_fields, **kwargs): # noqa: E501
222
+ """Create person # noqa: E501
223
+
224
+ This method makes a synchronous HTTP request by default. To make an
225
+ asynchronous HTTP request, please pass async_req=True
226
+
227
+ >>> thread = api.create_person_with_http_info(person_fields, async_req=True)
228
+ >>> result = thread.get()
229
+
230
+ :param person_fields: (required)
231
+ :type person_fields: PersonFields
232
+ :param x_request_id: Request header label.
233
+ :type x_request_id: str
234
+ :param async_req: Whether to execute the request asynchronously.
235
+ :type async_req: bool, optional
236
+ :param _return_http_data_only: response data without head status code
237
+ and headers
238
+ :type _return_http_data_only: bool, optional
239
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
240
+ be returned without reading/decoding response
241
+ data. Default is True.
242
+ :type _preload_content: bool, optional
243
+ :param _request_timeout: timeout setting for this request. If one
244
+ number provided, it will be total request
245
+ timeout. It can also be a pair (tuple) of
246
+ (connection, read) timeouts.
247
+ :param _request_auth: set to override the auth_settings for an a single
248
+ request; this effectively ignores the authentication
249
+ in the spec for a single request.
250
+ :type _request_auth: dict, optional
251
+ :return: Returns the result object.
252
+ If the method is called asynchronously,
253
+ returns the request thread.
254
+ :rtype: tuple(Person, status_code(int), headers(HTTPHeaderDict))
255
+ """
256
+
257
+ local_var_params = locals()
258
+
259
+ all_params = [
260
+ 'person_fields',
261
+ 'x_request_id',
262
+ ]
263
+ all_params.extend(
264
+ [
265
+ 'async_req',
266
+ '_return_http_data_only',
267
+ '_preload_content',
268
+ '_request_timeout',
269
+ '_request_auth'
270
+ ]
271
+ )
272
+
273
+ for key, val in six.iteritems(local_var_params['kwargs']):
274
+ if key not in all_params:
275
+ raise ApiTypeError(
276
+ "Got an unexpected keyword argument '%s'"
277
+ " to method create_person" % key
278
+ )
279
+ local_var_params[key] = val
280
+ del local_var_params['kwargs']
281
+ # verify the required parameter 'person_fields' is set
282
+ if self.api_client.client_side_validation and ('person_fields' not in local_var_params or # noqa: E501
283
+ local_var_params['person_fields'] is None): # noqa: E501
284
+ raise ApiValueError("Missing the required parameter `person_fields` when calling `create_person`") # noqa: E501
285
+
286
+ collection_formats = {}
287
+
288
+ path_params = {}
289
+
290
+ query_params = []
291
+
292
+ header_params = {}
293
+ if 'x_request_id' in local_var_params:
294
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
295
+
296
+ form_params = []
297
+ local_var_files = {}
298
+
299
+ body_params = None
300
+ if 'person_fields' in local_var_params:
301
+ body_params = local_var_params['person_fields']
302
+ # HTTP header `Accept`
303
+ header_params['Accept'] = self.api_client.select_header_accept(
304
+ ['application/json']) # noqa: E501
305
+
306
+ # HTTP header `Content-Type`
307
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
308
+ ['application/json']) # noqa: E501
309
+
310
+ # Authentication setting
311
+ auth_settings = [] # noqa: E501
312
+
313
+ return self.api_client.call_api(
314
+ '/api/persons', 'POST',
315
+ path_params,
316
+ query_params,
317
+ header_params,
318
+ body=body_params,
319
+ post_params=form_params,
320
+ files=local_var_files,
321
+ response_type='Person', # noqa: E501
322
+ auth_settings=auth_settings,
323
+ async_req=local_var_params.get('async_req'),
324
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
325
+ _preload_content=local_var_params.get('_preload_content', True),
326
+ _request_timeout=local_var_params.get('_request_timeout'),
327
+ collection_formats=collection_formats,
328
+ _request_auth=local_var_params.get('_request_auth'))
329
+
330
+ def delete_image_of_person(self, image_id, person_id, **kwargs): # noqa: E501
331
+ """Delete image of person # noqa: E501
332
+
333
+ This method makes a synchronous HTTP request by default. To make an
334
+ asynchronous HTTP request, please pass async_req=True
335
+
336
+ >>> thread = api.delete_image_of_person(image_id, person_id, async_req=True)
337
+ >>> result = thread.get()
338
+
339
+ :param image_id: Image ID. (required)
340
+ :type image_id: str
341
+ :param person_id: Person ID. (required)
342
+ :type person_id: str
343
+ :param x_request_id: Request header label.
344
+ :type x_request_id: str
345
+ :param async_req: Whether to execute the request asynchronously.
346
+ :type async_req: bool, optional
347
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
348
+ be returned without reading/decoding response
349
+ data. Default is True.
350
+ :type _preload_content: bool, optional
351
+ :param _request_timeout: timeout setting for this request. If one
352
+ number provided, it will be total request
353
+ timeout. It can also be a pair (tuple) of
354
+ (connection, read) timeouts.
355
+ :return: Returns the result object.
356
+ If the method is called asynchronously,
357
+ returns the request thread.
358
+ :rtype: None
359
+ """
360
+ kwargs['_return_http_data_only'] = True
361
+ return self.delete_image_of_person_with_http_info(image_id, person_id, **kwargs) # noqa: E501
362
+
363
+ def delete_image_of_person_with_http_info(self, image_id, person_id, **kwargs): # noqa: E501
364
+ """Delete image of person # noqa: E501
365
+
366
+ This method makes a synchronous HTTP request by default. To make an
367
+ asynchronous HTTP request, please pass async_req=True
368
+
369
+ >>> thread = api.delete_image_of_person_with_http_info(image_id, person_id, async_req=True)
370
+ >>> result = thread.get()
371
+
372
+ :param image_id: Image ID. (required)
373
+ :type image_id: str
374
+ :param person_id: Person ID. (required)
375
+ :type person_id: str
376
+ :param x_request_id: Request header label.
377
+ :type x_request_id: str
378
+ :param async_req: Whether to execute the request asynchronously.
379
+ :type async_req: bool, optional
380
+ :param _return_http_data_only: response data without head status code
381
+ and headers
382
+ :type _return_http_data_only: bool, optional
383
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
384
+ be returned without reading/decoding response
385
+ data. Default is True.
386
+ :type _preload_content: bool, optional
387
+ :param _request_timeout: timeout setting for this request. If one
388
+ number provided, it will be total request
389
+ timeout. It can also be a pair (tuple) of
390
+ (connection, read) timeouts.
391
+ :param _request_auth: set to override the auth_settings for an a single
392
+ request; this effectively ignores the authentication
393
+ in the spec for a single request.
394
+ :type _request_auth: dict, optional
395
+ :return: Returns the result object.
396
+ If the method is called asynchronously,
397
+ returns the request thread.
398
+ :rtype: None
399
+ """
400
+
401
+ local_var_params = locals()
402
+
403
+ all_params = [
404
+ 'image_id',
405
+ 'person_id',
406
+ 'x_request_id',
407
+ ]
408
+ all_params.extend(
409
+ [
410
+ 'async_req',
411
+ '_return_http_data_only',
412
+ '_preload_content',
413
+ '_request_timeout',
414
+ '_request_auth'
415
+ ]
416
+ )
417
+
418
+ for key, val in six.iteritems(local_var_params['kwargs']):
419
+ if key not in all_params:
420
+ raise ApiTypeError(
421
+ "Got an unexpected keyword argument '%s'"
422
+ " to method delete_image_of_person" % key
423
+ )
424
+ local_var_params[key] = val
425
+ del local_var_params['kwargs']
426
+ # verify the required parameter 'image_id' is set
427
+ if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501
428
+ local_var_params['image_id'] is None): # noqa: E501
429
+ raise ApiValueError("Missing the required parameter `image_id` when calling `delete_image_of_person`") # noqa: E501
430
+ # verify the required parameter 'person_id' is set
431
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
432
+ local_var_params['person_id'] is None): # noqa: E501
433
+ raise ApiValueError("Missing the required parameter `person_id` when calling `delete_image_of_person`") # noqa: E501
434
+
435
+ collection_formats = {}
436
+
437
+ path_params = {}
438
+ if 'image_id' in local_var_params:
439
+ path_params['imageId'] = local_var_params['image_id'] # noqa: E501
440
+ if 'person_id' in local_var_params:
441
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
442
+
443
+ query_params = []
444
+
445
+ header_params = {}
446
+ if 'x_request_id' in local_var_params:
447
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
448
+
449
+ form_params = []
450
+ local_var_files = {}
451
+
452
+ body_params = None
453
+ # HTTP header `Accept`
454
+ header_params['Accept'] = self.api_client.select_header_accept(
455
+ ['application/json']) # noqa: E501
456
+
457
+ # Authentication setting
458
+ auth_settings = [] # noqa: E501
459
+
460
+ return self.api_client.call_api(
461
+ '/api/persons/{personId}/images/{imageId}', 'DELETE',
462
+ path_params,
463
+ query_params,
464
+ header_params,
465
+ body=body_params,
466
+ post_params=form_params,
467
+ files=local_var_files,
468
+ response_type=None, # noqa: E501
469
+ auth_settings=auth_settings,
470
+ async_req=local_var_params.get('async_req'),
471
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
472
+ _preload_content=local_var_params.get('_preload_content', True),
473
+ _request_timeout=local_var_params.get('_request_timeout'),
474
+ collection_formats=collection_formats,
475
+ _request_auth=local_var_params.get('_request_auth'))
476
+
477
+ def delete_person(self, person_id, **kwargs): # noqa: E501
478
+ """Delete person # noqa: E501
479
+
480
+ This method makes a synchronous HTTP request by default. To make an
481
+ asynchronous HTTP request, please pass async_req=True
482
+
483
+ >>> thread = api.delete_person(person_id, async_req=True)
484
+ >>> result = thread.get()
485
+
486
+ :param person_id: Person ID. (required)
487
+ :type person_id: str
488
+ :param x_request_id: Request header label.
489
+ :type x_request_id: str
490
+ :param async_req: Whether to execute the request asynchronously.
491
+ :type async_req: bool, optional
492
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
493
+ be returned without reading/decoding response
494
+ data. Default is True.
495
+ :type _preload_content: bool, optional
496
+ :param _request_timeout: timeout setting for this request. If one
497
+ number provided, it will be total request
498
+ timeout. It can also be a pair (tuple) of
499
+ (connection, read) timeouts.
500
+ :return: Returns the result object.
501
+ If the method is called asynchronously,
502
+ returns the request thread.
503
+ :rtype: None
504
+ """
505
+ kwargs['_return_http_data_only'] = True
506
+ return self.delete_person_with_http_info(person_id, **kwargs) # noqa: E501
507
+
508
+ def delete_person_with_http_info(self, person_id, **kwargs): # noqa: E501
509
+ """Delete person # noqa: E501
510
+
511
+ This method makes a synchronous HTTP request by default. To make an
512
+ asynchronous HTTP request, please pass async_req=True
513
+
514
+ >>> thread = api.delete_person_with_http_info(person_id, async_req=True)
515
+ >>> result = thread.get()
516
+
517
+ :param person_id: Person ID. (required)
518
+ :type person_id: str
519
+ :param x_request_id: Request header label.
520
+ :type x_request_id: str
521
+ :param async_req: Whether to execute the request asynchronously.
522
+ :type async_req: bool, optional
523
+ :param _return_http_data_only: response data without head status code
524
+ and headers
525
+ :type _return_http_data_only: bool, optional
526
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
527
+ be returned without reading/decoding response
528
+ data. Default is True.
529
+ :type _preload_content: bool, optional
530
+ :param _request_timeout: timeout setting for this request. If one
531
+ number provided, it will be total request
532
+ timeout. It can also be a pair (tuple) of
533
+ (connection, read) timeouts.
534
+ :param _request_auth: set to override the auth_settings for an a single
535
+ request; this effectively ignores the authentication
536
+ in the spec for a single request.
537
+ :type _request_auth: dict, optional
538
+ :return: Returns the result object.
539
+ If the method is called asynchronously,
540
+ returns the request thread.
541
+ :rtype: None
542
+ """
543
+
544
+ local_var_params = locals()
545
+
546
+ all_params = [
547
+ 'person_id',
548
+ 'x_request_id',
549
+ ]
550
+ all_params.extend(
551
+ [
552
+ 'async_req',
553
+ '_return_http_data_only',
554
+ '_preload_content',
555
+ '_request_timeout',
556
+ '_request_auth'
557
+ ]
558
+ )
559
+
560
+ for key, val in six.iteritems(local_var_params['kwargs']):
561
+ if key not in all_params:
562
+ raise ApiTypeError(
563
+ "Got an unexpected keyword argument '%s'"
564
+ " to method delete_person" % key
565
+ )
566
+ local_var_params[key] = val
567
+ del local_var_params['kwargs']
568
+ # verify the required parameter 'person_id' is set
569
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
570
+ local_var_params['person_id'] is None): # noqa: E501
571
+ raise ApiValueError("Missing the required parameter `person_id` when calling `delete_person`") # noqa: E501
572
+
573
+ collection_formats = {}
574
+
575
+ path_params = {}
576
+ if 'person_id' in local_var_params:
577
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
578
+
579
+ query_params = []
580
+
581
+ header_params = {}
582
+ if 'x_request_id' in local_var_params:
583
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
584
+
585
+ form_params = []
586
+ local_var_files = {}
587
+
588
+ body_params = None
589
+ # HTTP header `Accept`
590
+ header_params['Accept'] = self.api_client.select_header_accept(
591
+ ['application/json']) # noqa: E501
592
+
593
+ # Authentication setting
594
+ auth_settings = [] # noqa: E501
595
+
596
+ return self.api_client.call_api(
597
+ '/api/persons/{personId}', 'DELETE',
598
+ path_params,
599
+ query_params,
600
+ header_params,
601
+ body=body_params,
602
+ post_params=form_params,
603
+ files=local_var_files,
604
+ response_type=None, # noqa: E501
605
+ auth_settings=auth_settings,
606
+ async_req=local_var_params.get('async_req'),
607
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
608
+ _preload_content=local_var_params.get('_preload_content', True),
609
+ _request_timeout=local_var_params.get('_request_timeout'),
610
+ collection_formats=collection_formats,
611
+ _request_auth=local_var_params.get('_request_auth'))
612
+
613
+ def get_all_groups_by_person_id(self, person_id, **kwargs): # noqa: E501
614
+ """Get person groups # noqa: E501
615
+
616
+ This method makes a synchronous HTTP request by default. To make an
617
+ asynchronous HTTP request, please pass async_req=True
618
+
619
+ >>> thread = api.get_all_groups_by_person_id(person_id, async_req=True)
620
+ >>> result = thread.get()
621
+
622
+ :param person_id: Person ID. (required)
623
+ :type person_id: str
624
+ :param page: The page number to get a list of persons or groups.
625
+ :type page: int
626
+ :param size: The page size with a list of persons or groups, items.
627
+ :type size: int
628
+ :param x_request_id: Request header label.
629
+ :type x_request_id: str
630
+ :param async_req: Whether to execute the request asynchronously.
631
+ :type async_req: bool, optional
632
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
633
+ be returned without reading/decoding response
634
+ data. Default is True.
635
+ :type _preload_content: bool, optional
636
+ :param _request_timeout: timeout setting for this request. If one
637
+ number provided, it will be total request
638
+ timeout. It can also be a pair (tuple) of
639
+ (connection, read) timeouts.
640
+ :return: Returns the result object.
641
+ If the method is called asynchronously,
642
+ returns the request thread.
643
+ :rtype: GroupPage
644
+ """
645
+ kwargs['_return_http_data_only'] = True
646
+ return self.get_all_groups_by_person_id_with_http_info(person_id, **kwargs) # noqa: E501
647
+
648
+ def get_all_groups_by_person_id_with_http_info(self, person_id, **kwargs): # noqa: E501
649
+ """Get person groups # noqa: E501
650
+
651
+ This method makes a synchronous HTTP request by default. To make an
652
+ asynchronous HTTP request, please pass async_req=True
653
+
654
+ >>> thread = api.get_all_groups_by_person_id_with_http_info(person_id, async_req=True)
655
+ >>> result = thread.get()
656
+
657
+ :param person_id: Person ID. (required)
658
+ :type person_id: str
659
+ :param page: The page number to get a list of persons or groups.
660
+ :type page: int
661
+ :param size: The page size with a list of persons or groups, items.
662
+ :type size: int
663
+ :param x_request_id: Request header label.
664
+ :type x_request_id: str
665
+ :param async_req: Whether to execute the request asynchronously.
666
+ :type async_req: bool, optional
667
+ :param _return_http_data_only: response data without head status code
668
+ and headers
669
+ :type _return_http_data_only: bool, optional
670
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
671
+ be returned without reading/decoding response
672
+ data. Default is True.
673
+ :type _preload_content: bool, optional
674
+ :param _request_timeout: timeout setting for this request. If one
675
+ number provided, it will be total request
676
+ timeout. It can also be a pair (tuple) of
677
+ (connection, read) timeouts.
678
+ :param _request_auth: set to override the auth_settings for an a single
679
+ request; this effectively ignores the authentication
680
+ in the spec for a single request.
681
+ :type _request_auth: dict, optional
682
+ :return: Returns the result object.
683
+ If the method is called asynchronously,
684
+ returns the request thread.
685
+ :rtype: tuple(GroupPage, status_code(int), headers(HTTPHeaderDict))
686
+ """
687
+
688
+ local_var_params = locals()
689
+
690
+ all_params = [
691
+ 'person_id',
692
+ 'page',
693
+ 'size',
694
+ 'x_request_id',
695
+ ]
696
+ all_params.extend(
697
+ [
698
+ 'async_req',
699
+ '_return_http_data_only',
700
+ '_preload_content',
701
+ '_request_timeout',
702
+ '_request_auth'
703
+ ]
704
+ )
705
+
706
+ for key, val in six.iteritems(local_var_params['kwargs']):
707
+ if key not in all_params:
708
+ raise ApiTypeError(
709
+ "Got an unexpected keyword argument '%s'"
710
+ " to method get_all_groups_by_person_id" % key
711
+ )
712
+ local_var_params[key] = val
713
+ del local_var_params['kwargs']
714
+ # verify the required parameter 'person_id' is set
715
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
716
+ local_var_params['person_id'] is None): # noqa: E501
717
+ raise ApiValueError("Missing the required parameter `person_id` when calling `get_all_groups_by_person_id`") # noqa: E501
718
+
719
+ collection_formats = {}
720
+
721
+ path_params = {}
722
+ if 'person_id' in local_var_params:
723
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
724
+
725
+ query_params = []
726
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
727
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
728
+ if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501
729
+ query_params.append(('size', local_var_params['size'])) # noqa: E501
730
+
731
+ header_params = {}
732
+ if 'x_request_id' in local_var_params:
733
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
734
+
735
+ form_params = []
736
+ local_var_files = {}
737
+
738
+ body_params = None
739
+ # HTTP header `Accept`
740
+ header_params['Accept'] = self.api_client.select_header_accept(
741
+ ['application/json']) # noqa: E501
742
+
743
+ # Authentication setting
744
+ auth_settings = [] # noqa: E501
745
+
746
+ return self.api_client.call_api(
747
+ '/api/persons/{personId}/groups', 'GET',
748
+ path_params,
749
+ query_params,
750
+ header_params,
751
+ body=body_params,
752
+ post_params=form_params,
753
+ files=local_var_files,
754
+ response_type='GroupPage', # noqa: E501
755
+ auth_settings=auth_settings,
756
+ async_req=local_var_params.get('async_req'),
757
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
758
+ _preload_content=local_var_params.get('_preload_content', True),
759
+ _request_timeout=local_var_params.get('_request_timeout'),
760
+ collection_formats=collection_formats,
761
+ _request_auth=local_var_params.get('_request_auth'))
762
+
763
+ def get_all_images_by_person_id(self, person_id, **kwargs): # noqa: E501
764
+ """Get person images # noqa: E501
765
+
766
+ This method makes a synchronous HTTP request by default. To make an
767
+ asynchronous HTTP request, please pass async_req=True
768
+
769
+ >>> thread = api.get_all_images_by_person_id(person_id, async_req=True)
770
+ >>> result = thread.get()
771
+
772
+ :param person_id: Person ID. (required)
773
+ :type person_id: str
774
+ :param page: The page number to get a list of persons or groups.
775
+ :type page: int
776
+ :param size: The page size with a list of persons or groups, items.
777
+ :type size: int
778
+ :param x_request_id: Request header label.
779
+ :type x_request_id: str
780
+ :param async_req: Whether to execute the request asynchronously.
781
+ :type async_req: bool, optional
782
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
783
+ be returned without reading/decoding response
784
+ data. Default is True.
785
+ :type _preload_content: bool, optional
786
+ :param _request_timeout: timeout setting for this request. If one
787
+ number provided, it will be total request
788
+ timeout. It can also be a pair (tuple) of
789
+ (connection, read) timeouts.
790
+ :return: Returns the result object.
791
+ If the method is called asynchronously,
792
+ returns the request thread.
793
+ :rtype: ImagePage
794
+ """
795
+ kwargs['_return_http_data_only'] = True
796
+ return self.get_all_images_by_person_id_with_http_info(person_id, **kwargs) # noqa: E501
797
+
798
+ def get_all_images_by_person_id_with_http_info(self, person_id, **kwargs): # noqa: E501
799
+ """Get person images # noqa: E501
800
+
801
+ This method makes a synchronous HTTP request by default. To make an
802
+ asynchronous HTTP request, please pass async_req=True
803
+
804
+ >>> thread = api.get_all_images_by_person_id_with_http_info(person_id, async_req=True)
805
+ >>> result = thread.get()
806
+
807
+ :param person_id: Person ID. (required)
808
+ :type person_id: str
809
+ :param page: The page number to get a list of persons or groups.
810
+ :type page: int
811
+ :param size: The page size with a list of persons or groups, items.
812
+ :type size: int
813
+ :param x_request_id: Request header label.
814
+ :type x_request_id: str
815
+ :param async_req: Whether to execute the request asynchronously.
816
+ :type async_req: bool, optional
817
+ :param _return_http_data_only: response data without head status code
818
+ and headers
819
+ :type _return_http_data_only: bool, optional
820
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
821
+ be returned without reading/decoding response
822
+ data. Default is True.
823
+ :type _preload_content: bool, optional
824
+ :param _request_timeout: timeout setting for this request. If one
825
+ number provided, it will be total request
826
+ timeout. It can also be a pair (tuple) of
827
+ (connection, read) timeouts.
828
+ :param _request_auth: set to override the auth_settings for an a single
829
+ request; this effectively ignores the authentication
830
+ in the spec for a single request.
831
+ :type _request_auth: dict, optional
832
+ :return: Returns the result object.
833
+ If the method is called asynchronously,
834
+ returns the request thread.
835
+ :rtype: tuple(ImagePage, status_code(int), headers(HTTPHeaderDict))
836
+ """
837
+
838
+ local_var_params = locals()
839
+
840
+ all_params = [
841
+ 'person_id',
842
+ 'page',
843
+ 'size',
844
+ 'x_request_id',
845
+ ]
846
+ all_params.extend(
847
+ [
848
+ 'async_req',
849
+ '_return_http_data_only',
850
+ '_preload_content',
851
+ '_request_timeout',
852
+ '_request_auth'
853
+ ]
854
+ )
855
+
856
+ for key, val in six.iteritems(local_var_params['kwargs']):
857
+ if key not in all_params:
858
+ raise ApiTypeError(
859
+ "Got an unexpected keyword argument '%s'"
860
+ " to method get_all_images_by_person_id" % key
861
+ )
862
+ local_var_params[key] = val
863
+ del local_var_params['kwargs']
864
+ # verify the required parameter 'person_id' is set
865
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
866
+ local_var_params['person_id'] is None): # noqa: E501
867
+ raise ApiValueError("Missing the required parameter `person_id` when calling `get_all_images_by_person_id`") # noqa: E501
868
+
869
+ collection_formats = {}
870
+
871
+ path_params = {}
872
+ if 'person_id' in local_var_params:
873
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
874
+
875
+ query_params = []
876
+ if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
877
+ query_params.append(('page', local_var_params['page'])) # noqa: E501
878
+ if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501
879
+ query_params.append(('size', local_var_params['size'])) # noqa: E501
880
+
881
+ header_params = {}
882
+ if 'x_request_id' in local_var_params:
883
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
884
+
885
+ form_params = []
886
+ local_var_files = {}
887
+
888
+ body_params = None
889
+ # HTTP header `Accept`
890
+ header_params['Accept'] = self.api_client.select_header_accept(
891
+ ['application/json']) # noqa: E501
892
+
893
+ # Authentication setting
894
+ auth_settings = [] # noqa: E501
895
+
896
+ return self.api_client.call_api(
897
+ '/api/persons/{personId}/images', 'GET',
898
+ path_params,
899
+ query_params,
900
+ header_params,
901
+ body=body_params,
902
+ post_params=form_params,
903
+ files=local_var_files,
904
+ response_type='ImagePage', # noqa: E501
905
+ auth_settings=auth_settings,
906
+ async_req=local_var_params.get('async_req'),
907
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
908
+ _preload_content=local_var_params.get('_preload_content', True),
909
+ _request_timeout=local_var_params.get('_request_timeout'),
910
+ collection_formats=collection_formats,
911
+ _request_auth=local_var_params.get('_request_auth'))
912
+
913
+ def get_image_of_person(self, image_id, person_id, **kwargs): # noqa: E501
914
+ """Get person image by id # noqa: E501
915
+
916
+ This method makes a synchronous HTTP request by default. To make an
917
+ asynchronous HTTP request, please pass async_req=True
918
+
919
+ >>> thread = api.get_image_of_person(image_id, person_id, async_req=True)
920
+ >>> result = thread.get()
921
+
922
+ :param image_id: Image ID. (required)
923
+ :type image_id: str
924
+ :param person_id: Person ID. (required)
925
+ :type person_id: str
926
+ :param x_request_id: Request header label.
927
+ :type x_request_id: str
928
+ :param async_req: Whether to execute the request asynchronously.
929
+ :type async_req: bool, optional
930
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
931
+ be returned without reading/decoding response
932
+ data. Default is True.
933
+ :type _preload_content: bool, optional
934
+ :param _request_timeout: timeout setting for this request. If one
935
+ number provided, it will be total request
936
+ timeout. It can also be a pair (tuple) of
937
+ (connection, read) timeouts.
938
+ :return: Returns the result object.
939
+ If the method is called asynchronously,
940
+ returns the request thread.
941
+ :rtype: file_type
942
+ """
943
+ kwargs['_return_http_data_only'] = True
944
+ return self.get_image_of_person_with_http_info(image_id, person_id, **kwargs) # noqa: E501
945
+
946
+ def get_image_of_person_with_http_info(self, image_id, person_id, **kwargs): # noqa: E501
947
+ """Get person image by id # noqa: E501
948
+
949
+ This method makes a synchronous HTTP request by default. To make an
950
+ asynchronous HTTP request, please pass async_req=True
951
+
952
+ >>> thread = api.get_image_of_person_with_http_info(image_id, person_id, async_req=True)
953
+ >>> result = thread.get()
954
+
955
+ :param image_id: Image ID. (required)
956
+ :type image_id: str
957
+ :param person_id: Person ID. (required)
958
+ :type person_id: str
959
+ :param x_request_id: Request header label.
960
+ :type x_request_id: str
961
+ :param async_req: Whether to execute the request asynchronously.
962
+ :type async_req: bool, optional
963
+ :param _return_http_data_only: response data without head status code
964
+ and headers
965
+ :type _return_http_data_only: bool, optional
966
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
967
+ be returned without reading/decoding response
968
+ data. Default is True.
969
+ :type _preload_content: bool, optional
970
+ :param _request_timeout: timeout setting for this request. If one
971
+ number provided, it will be total request
972
+ timeout. It can also be a pair (tuple) of
973
+ (connection, read) timeouts.
974
+ :param _request_auth: set to override the auth_settings for an a single
975
+ request; this effectively ignores the authentication
976
+ in the spec for a single request.
977
+ :type _request_auth: dict, optional
978
+ :return: Returns the result object.
979
+ If the method is called asynchronously,
980
+ returns the request thread.
981
+ :rtype: tuple(file_type, status_code(int), headers(HTTPHeaderDict))
982
+ """
983
+
984
+ local_var_params = locals()
985
+
986
+ all_params = [
987
+ 'image_id',
988
+ 'person_id',
989
+ 'x_request_id',
990
+ ]
991
+ all_params.extend(
992
+ [
993
+ 'async_req',
994
+ '_return_http_data_only',
995
+ '_preload_content',
996
+ '_request_timeout',
997
+ '_request_auth'
998
+ ]
999
+ )
1000
+
1001
+ for key, val in six.iteritems(local_var_params['kwargs']):
1002
+ if key not in all_params:
1003
+ raise ApiTypeError(
1004
+ "Got an unexpected keyword argument '%s'"
1005
+ " to method get_image_of_person" % key
1006
+ )
1007
+ local_var_params[key] = val
1008
+ del local_var_params['kwargs']
1009
+ # verify the required parameter 'image_id' is set
1010
+ if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501
1011
+ local_var_params['image_id'] is None): # noqa: E501
1012
+ raise ApiValueError("Missing the required parameter `image_id` when calling `get_image_of_person`") # noqa: E501
1013
+ # verify the required parameter 'person_id' is set
1014
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
1015
+ local_var_params['person_id'] is None): # noqa: E501
1016
+ raise ApiValueError("Missing the required parameter `person_id` when calling `get_image_of_person`") # noqa: E501
1017
+
1018
+ collection_formats = {}
1019
+
1020
+ path_params = {}
1021
+ if 'image_id' in local_var_params:
1022
+ path_params['imageId'] = local_var_params['image_id'] # noqa: E501
1023
+ if 'person_id' in local_var_params:
1024
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
1025
+
1026
+ query_params = []
1027
+
1028
+ header_params = {}
1029
+ if 'x_request_id' in local_var_params:
1030
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
1031
+
1032
+ form_params = []
1033
+ local_var_files = {}
1034
+
1035
+ body_params = None
1036
+ # HTTP header `Accept`
1037
+ header_params['Accept'] = self.api_client.select_header_accept(
1038
+ ['application/json''image/*']) # noqa: E501
1039
+
1040
+ # Authentication setting
1041
+ auth_settings = [] # noqa: E501
1042
+
1043
+ return self.api_client.call_api(
1044
+ '/api/persons/{personId}/images/{imageId}', 'GET',
1045
+ path_params,
1046
+ query_params,
1047
+ header_params,
1048
+ body=body_params,
1049
+ post_params=form_params,
1050
+ files=local_var_files,
1051
+ response_type='file_type', # noqa: E501
1052
+ auth_settings=auth_settings,
1053
+ async_req=local_var_params.get('async_req'),
1054
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1055
+ _preload_content=local_var_params.get('_preload_content', True),
1056
+ _request_timeout=local_var_params.get('_request_timeout'),
1057
+ collection_formats=collection_formats,
1058
+ _request_auth=local_var_params.get('_request_auth'))
1059
+
1060
+ def get_person(self, person_id, **kwargs): # noqa: E501
1061
+ """Get person # noqa: E501
1062
+
1063
+ This method makes a synchronous HTTP request by default. To make an
1064
+ asynchronous HTTP request, please pass async_req=True
1065
+
1066
+ >>> thread = api.get_person(person_id, async_req=True)
1067
+ >>> result = thread.get()
1068
+
1069
+ :param person_id: Person ID. (required)
1070
+ :type person_id: str
1071
+ :param x_request_id: Request header label.
1072
+ :type x_request_id: str
1073
+ :param async_req: Whether to execute the request asynchronously.
1074
+ :type async_req: bool, optional
1075
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1076
+ be returned without reading/decoding response
1077
+ data. Default is True.
1078
+ :type _preload_content: bool, optional
1079
+ :param _request_timeout: timeout setting for this request. If one
1080
+ number provided, it will be total request
1081
+ timeout. It can also be a pair (tuple) of
1082
+ (connection, read) timeouts.
1083
+ :return: Returns the result object.
1084
+ If the method is called asynchronously,
1085
+ returns the request thread.
1086
+ :rtype: Person
1087
+ """
1088
+ kwargs['_return_http_data_only'] = True
1089
+ return self.get_person_with_http_info(person_id, **kwargs) # noqa: E501
1090
+
1091
+ def get_person_with_http_info(self, person_id, **kwargs): # noqa: E501
1092
+ """Get person # noqa: E501
1093
+
1094
+ This method makes a synchronous HTTP request by default. To make an
1095
+ asynchronous HTTP request, please pass async_req=True
1096
+
1097
+ >>> thread = api.get_person_with_http_info(person_id, async_req=True)
1098
+ >>> result = thread.get()
1099
+
1100
+ :param person_id: Person ID. (required)
1101
+ :type person_id: str
1102
+ :param x_request_id: Request header label.
1103
+ :type x_request_id: str
1104
+ :param async_req: Whether to execute the request asynchronously.
1105
+ :type async_req: bool, optional
1106
+ :param _return_http_data_only: response data without head status code
1107
+ and headers
1108
+ :type _return_http_data_only: bool, optional
1109
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1110
+ be returned without reading/decoding response
1111
+ data. Default is True.
1112
+ :type _preload_content: bool, optional
1113
+ :param _request_timeout: timeout setting for this request. If one
1114
+ number provided, it will be total request
1115
+ timeout. It can also be a pair (tuple) of
1116
+ (connection, read) timeouts.
1117
+ :param _request_auth: set to override the auth_settings for an a single
1118
+ request; this effectively ignores the authentication
1119
+ in the spec for a single request.
1120
+ :type _request_auth: dict, optional
1121
+ :return: Returns the result object.
1122
+ If the method is called asynchronously,
1123
+ returns the request thread.
1124
+ :rtype: tuple(Person, status_code(int), headers(HTTPHeaderDict))
1125
+ """
1126
+
1127
+ local_var_params = locals()
1128
+
1129
+ all_params = [
1130
+ 'person_id',
1131
+ 'x_request_id',
1132
+ ]
1133
+ all_params.extend(
1134
+ [
1135
+ 'async_req',
1136
+ '_return_http_data_only',
1137
+ '_preload_content',
1138
+ '_request_timeout',
1139
+ '_request_auth'
1140
+ ]
1141
+ )
1142
+
1143
+ for key, val in six.iteritems(local_var_params['kwargs']):
1144
+ if key not in all_params:
1145
+ raise ApiTypeError(
1146
+ "Got an unexpected keyword argument '%s'"
1147
+ " to method get_person" % key
1148
+ )
1149
+ local_var_params[key] = val
1150
+ del local_var_params['kwargs']
1151
+ # verify the required parameter 'person_id' is set
1152
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
1153
+ local_var_params['person_id'] is None): # noqa: E501
1154
+ raise ApiValueError("Missing the required parameter `person_id` when calling `get_person`") # noqa: E501
1155
+
1156
+ collection_formats = {}
1157
+
1158
+ path_params = {}
1159
+ if 'person_id' in local_var_params:
1160
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
1161
+
1162
+ query_params = []
1163
+
1164
+ header_params = {}
1165
+ if 'x_request_id' in local_var_params:
1166
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
1167
+
1168
+ form_params = []
1169
+ local_var_files = {}
1170
+
1171
+ body_params = None
1172
+ # HTTP header `Accept`
1173
+ header_params['Accept'] = self.api_client.select_header_accept(
1174
+ ['application/json']) # noqa: E501
1175
+
1176
+ # Authentication setting
1177
+ auth_settings = [] # noqa: E501
1178
+
1179
+ return self.api_client.call_api(
1180
+ '/api/persons/{personId}', 'GET',
1181
+ path_params,
1182
+ query_params,
1183
+ header_params,
1184
+ body=body_params,
1185
+ post_params=form_params,
1186
+ files=local_var_files,
1187
+ response_type='Person', # noqa: E501
1188
+ auth_settings=auth_settings,
1189
+ async_req=local_var_params.get('async_req'),
1190
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1191
+ _preload_content=local_var_params.get('_preload_content', True),
1192
+ _request_timeout=local_var_params.get('_request_timeout'),
1193
+ collection_formats=collection_formats,
1194
+ _request_auth=local_var_params.get('_request_auth'))
1195
+
1196
+ def update_person(self, person_id, person_to_update_fields, **kwargs): # noqa: E501
1197
+ """Update person # noqa: E501
1198
+
1199
+ This method makes a synchronous HTTP request by default. To make an
1200
+ asynchronous HTTP request, please pass async_req=True
1201
+
1202
+ >>> thread = api.update_person(person_id, person_to_update_fields, async_req=True)
1203
+ >>> result = thread.get()
1204
+
1205
+ :param person_id: Person ID. (required)
1206
+ :type person_id: str
1207
+ :param person_to_update_fields: Request body for the Person to update. (required)
1208
+ :type person_to_update_fields: PersonToUpdateFields
1209
+ :param x_request_id: Request header label.
1210
+ :type x_request_id: str
1211
+ :param async_req: Whether to execute the request asynchronously.
1212
+ :type async_req: bool, optional
1213
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1214
+ be returned without reading/decoding response
1215
+ data. Default is True.
1216
+ :type _preload_content: bool, optional
1217
+ :param _request_timeout: timeout setting for this request. If one
1218
+ number provided, it will be total request
1219
+ timeout. It can also be a pair (tuple) of
1220
+ (connection, read) timeouts.
1221
+ :return: Returns the result object.
1222
+ If the method is called asynchronously,
1223
+ returns the request thread.
1224
+ :rtype: None
1225
+ """
1226
+ kwargs['_return_http_data_only'] = True
1227
+ return self.update_person_with_http_info(person_id, person_to_update_fields, **kwargs) # noqa: E501
1228
+
1229
+ def update_person_with_http_info(self, person_id, person_to_update_fields, **kwargs): # noqa: E501
1230
+ """Update person # noqa: E501
1231
+
1232
+ This method makes a synchronous HTTP request by default. To make an
1233
+ asynchronous HTTP request, please pass async_req=True
1234
+
1235
+ >>> thread = api.update_person_with_http_info(person_id, person_to_update_fields, async_req=True)
1236
+ >>> result = thread.get()
1237
+
1238
+ :param person_id: Person ID. (required)
1239
+ :type person_id: str
1240
+ :param person_to_update_fields: Request body for the Person to update. (required)
1241
+ :type person_to_update_fields: PersonToUpdateFields
1242
+ :param x_request_id: Request header label.
1243
+ :type x_request_id: str
1244
+ :param async_req: Whether to execute the request asynchronously.
1245
+ :type async_req: bool, optional
1246
+ :param _return_http_data_only: response data without head status code
1247
+ and headers
1248
+ :type _return_http_data_only: bool, optional
1249
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1250
+ be returned without reading/decoding response
1251
+ data. Default is True.
1252
+ :type _preload_content: bool, optional
1253
+ :param _request_timeout: timeout setting for this request. If one
1254
+ number provided, it will be total request
1255
+ timeout. It can also be a pair (tuple) of
1256
+ (connection, read) timeouts.
1257
+ :param _request_auth: set to override the auth_settings for an a single
1258
+ request; this effectively ignores the authentication
1259
+ in the spec for a single request.
1260
+ :type _request_auth: dict, optional
1261
+ :return: Returns the result object.
1262
+ If the method is called asynchronously,
1263
+ returns the request thread.
1264
+ :rtype: None
1265
+ """
1266
+
1267
+ local_var_params = locals()
1268
+
1269
+ all_params = [
1270
+ 'person_id',
1271
+ 'person_to_update_fields',
1272
+ 'x_request_id',
1273
+ ]
1274
+ all_params.extend(
1275
+ [
1276
+ 'async_req',
1277
+ '_return_http_data_only',
1278
+ '_preload_content',
1279
+ '_request_timeout',
1280
+ '_request_auth'
1281
+ ]
1282
+ )
1283
+
1284
+ for key, val in six.iteritems(local_var_params['kwargs']):
1285
+ if key not in all_params:
1286
+ raise ApiTypeError(
1287
+ "Got an unexpected keyword argument '%s'"
1288
+ " to method update_person" % key
1289
+ )
1290
+ local_var_params[key] = val
1291
+ del local_var_params['kwargs']
1292
+ # verify the required parameter 'person_id' is set
1293
+ if self.api_client.client_side_validation and ('person_id' not in local_var_params or # noqa: E501
1294
+ local_var_params['person_id'] is None): # noqa: E501
1295
+ raise ApiValueError("Missing the required parameter `person_id` when calling `update_person`") # noqa: E501
1296
+ # verify the required parameter 'person_to_update_fields' is set
1297
+ if self.api_client.client_side_validation and ('person_to_update_fields' not in local_var_params or # noqa: E501
1298
+ local_var_params['person_to_update_fields'] is None): # noqa: E501
1299
+ raise ApiValueError("Missing the required parameter `person_to_update_fields` when calling `update_person`") # noqa: E501
1300
+
1301
+ collection_formats = {}
1302
+
1303
+ path_params = {}
1304
+ if 'person_id' in local_var_params:
1305
+ path_params['personId'] = local_var_params['person_id'] # noqa: E501
1306
+
1307
+ query_params = []
1308
+
1309
+ header_params = {}
1310
+ if 'x_request_id' in local_var_params:
1311
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
1312
+
1313
+ form_params = []
1314
+ local_var_files = {}
1315
+
1316
+ body_params = None
1317
+ if 'person_to_update_fields' in local_var_params:
1318
+ body_params = local_var_params['person_to_update_fields']
1319
+ # HTTP header `Accept`
1320
+ header_params['Accept'] = self.api_client.select_header_accept(
1321
+ ['application/json']) # noqa: E501
1322
+
1323
+ # HTTP header `Content-Type`
1324
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1325
+ ['application/json']) # noqa: E501
1326
+
1327
+ # Authentication setting
1328
+ auth_settings = [] # noqa: E501
1329
+
1330
+ return self.api_client.call_api(
1331
+ '/api/persons/{personId}', 'PUT',
1332
+ path_params,
1333
+ query_params,
1334
+ header_params,
1335
+ body=body_params,
1336
+ post_params=form_params,
1337
+ files=local_var_files,
1338
+ response_type=None, # noqa: E501
1339
+ auth_settings=auth_settings,
1340
+ async_req=local_var_params.get('async_req'),
1341
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1342
+ _preload_content=local_var_params.get('_preload_content', True),
1343
+ _request_timeout=local_var_params.get('_request_timeout'),
1344
+ collection_formats=collection_formats,
1345
+ _request_auth=local_var_params.get('_request_auth'))