regula-facesdk-webclient 7.2.388.dev0__py3-none-any.whl → 8.1.433.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- regula/facesdk/webclient/__init__.py +5 -5
- regula/facesdk/webclient/ext/api/group_api.py +2 -27
- regula/facesdk/webclient/ext/api/match_api.py +3 -29
- regula/facesdk/webclient/ext/api/person_api.py +8 -34
- regula/facesdk/webclient/ext/api/sdk.py +5 -3
- regula/facesdk/webclient/ext/api/search_api.py +2 -6
- regula/facesdk/webclient/ext/models/detect_request.py +6 -5
- regula/facesdk/webclient/ext/models/match_image.py +3 -3
- regula/facesdk/webclient/ext/models/match_request.py +7 -5
- regula/facesdk/webclient/gen/__init__.py +349 -18
- regula/facesdk/webclient/gen/api/__init__.py +30 -3
- regula/facesdk/webclient/gen/api/group_api.py +1854 -799
- regula/facesdk/webclient/gen/api/healthcheck_api.py +475 -215
- regula/facesdk/webclient/gen/api/liveness20_api.py +565 -0
- regula/facesdk/webclient/gen/api/match_api.py +801 -355
- regula/facesdk/webclient/gen/api/person_api.py +2399 -1039
- regula/facesdk/webclient/gen/api/search_api.py +286 -130
- regula/facesdk/webclient/gen/api_client.py +577 -476
- regula/facesdk/webclient/gen/api_response.py +21 -0
- regula/facesdk/webclient/gen/configuration.py +231 -105
- regula/facesdk/webclient/gen/exceptions.py +82 -33
- regula/facesdk/webclient/gen/models/__init__.py +202 -95
- regula/facesdk/webclient/gen/models/add_image_to_person_request.py +96 -0
- regula/facesdk/webclient/gen/models/add_image_to_person_request_data.py +92 -0
- regula/facesdk/webclient/gen/models/add_image_to_person_request_image.py +92 -0
- regula/facesdk/webclient/gen/models/add_image_to_person_response.py +92 -0
- regula/facesdk/webclient/gen/models/attribute_config.py +83 -0
- regula/facesdk/webclient/gen/models/attributes_data.py +82 -0
- regula/facesdk/webclient/gen/models/crop.py +88 -0
- regula/facesdk/webclient/gen/models/detail_item.py +136 -0
- regula/facesdk/webclient/gen/models/detect_attributes_details.py +84 -0
- regula/facesdk/webclient/gen/models/detect_details_meta.py +86 -0
- regula/facesdk/webclient/gen/models/detect_meta_data.py +84 -0
- regula/facesdk/webclient/gen/models/detect_request.py +94 -0
- regula/facesdk/webclient/gen/models/detect_request_data.py +90 -0
- regula/facesdk/webclient/gen/models/detect_response.py +89 -0
- regula/facesdk/webclient/gen/models/detect_response_results.py +86 -0
- regula/facesdk/webclient/gen/models/detect_result.py +98 -0
- regula/facesdk/webclient/gen/models/detection.py +98 -0
- regula/facesdk/webclient/gen/models/detection_attributes.py +92 -0
- regula/facesdk/webclient/gen/models/detection_attributes_details_inner.py +132 -0
- regula/facesdk/webclient/gen/models/detection_face.py +90 -0
- regula/facesdk/webclient/gen/models/detection_quality.py +107 -0
- regula/facesdk/webclient/gen/models/device_info.py +111 -0
- regula/facesdk/webclient/gen/models/face_attribute.py +40 -0
- regula/facesdk/webclient/gen/models/face_image_quality_align_type.py +32 -0
- regula/facesdk/webclient/gen/models/face_image_quality_groups.py +35 -0
- regula/facesdk/webclient/gen/models/face_image_quality_groups_strings.py +35 -0
- regula/facesdk/webclient/gen/models/face_image_quality_status.py +30 -0
- regula/facesdk/webclient/gen/models/face_quality_config_name.py +75 -0
- regula/facesdk/webclient/gen/models/face_quality_scenarios.py +37 -0
- regula/facesdk/webclient/gen/models/face_sdk_result.py +83 -0
- regula/facesdk/webclient/gen/models/face_sdk_result_code.py +68 -0
- regula/facesdk/webclient/gen/models/faces_response.py +100 -0
- regula/facesdk/webclient/gen/models/faces_response_data.py +90 -0
- regula/facesdk/webclient/gen/models/filter_op.py +29 -0
- regula/facesdk/webclient/gen/models/filter_search_request.py +87 -0
- regula/facesdk/webclient/gen/models/group.py +89 -0
- regula/facesdk/webclient/gen/models/group_data.py +85 -0
- regula/facesdk/webclient/gen/models/group_page.py +94 -0
- regula/facesdk/webclient/gen/models/group_page_items.py +90 -0
- regula/facesdk/webclient/gen/models/group_response.py +84 -0
- regula/facesdk/webclient/gen/models/group_to_create.py +86 -0
- regula/facesdk/webclient/gen/models/image.py +96 -0
- regula/facesdk/webclient/gen/models/image_fields.py +100 -0
- regula/facesdk/webclient/gen/models/image_fields_image.py +92 -0
- regula/facesdk/webclient/gen/models/image_page.py +94 -0
- regula/facesdk/webclient/gen/models/image_page_items.py +90 -0
- regula/facesdk/webclient/gen/models/image_source.py +34 -0
- regula/facesdk/webclient/gen/models/liveness_type.py +29 -0
- regula/facesdk/webclient/gen/models/match_and_search_request.py +103 -0
- regula/facesdk/webclient/gen/models/match_and_search_request_images_item.py +87 -0
- regula/facesdk/webclient/gen/models/match_and_search_response.py +107 -0
- regula/facesdk/webclient/gen/models/match_and_search_response_data.py +104 -0
- regula/facesdk/webclient/gen/models/match_and_search_response_data_detections_item.py +95 -0
- regula/facesdk/webclient/gen/models/match_image.py +89 -0
- regula/facesdk/webclient/gen/models/match_image_detection.py +95 -0
- regula/facesdk/webclient/gen/models/match_image_result.py +97 -0
- regula/facesdk/webclient/gen/models/match_request.py +102 -0
- regula/facesdk/webclient/gen/models/match_request_data.py +98 -0
- regula/facesdk/webclient/gen/models/match_response.py +105 -0
- regula/facesdk/webclient/gen/models/match_response_data.py +102 -0
- regula/facesdk/webclient/gen/models/operation_log.py +88 -0
- regula/facesdk/webclient/gen/models/output_image_params.py +89 -0
- regula/facesdk/webclient/gen/models/page.py +84 -0
- regula/facesdk/webclient/gen/models/person.py +97 -0
- regula/facesdk/webclient/gen/models/person_data.py +87 -0
- regula/facesdk/webclient/gen/models/person_fields.py +91 -0
- regula/facesdk/webclient/gen/models/person_items.py +90 -0
- regula/facesdk/webclient/gen/models/person_to_update_fields.py +89 -0
- regula/facesdk/webclient/gen/models/person_with_images.py +107 -0
- regula/facesdk/webclient/gen/models/person_with_images_data.py +90 -0
- regula/facesdk/webclient/gen/models/persons_page.py +94 -0
- regula/facesdk/webclient/gen/models/process_param.py +103 -0
- regula/facesdk/webclient/gen/models/process_param_attributes.py +90 -0
- regula/facesdk/webclient/gen/models/quality_config.py +86 -0
- regula/facesdk/webclient/gen/models/quality_detail.py +94 -0
- regula/facesdk/webclient/gen/models/quality_details_groups.py +90 -0
- regula/facesdk/webclient/gen/models/quality_request.py +93 -0
- regula/facesdk/webclient/gen/models/recognize_image.py +100 -0
- regula/facesdk/webclient/gen/models/recognize_image_data.py +84 -0
- regula/facesdk/webclient/gen/models/resize_options.py +86 -0
- regula/facesdk/webclient/gen/models/search_bad_params.py +86 -0
- regula/facesdk/webclient/gen/models/search_detection.py +102 -0
- regula/facesdk/webclient/gen/models/search_parameters.py +95 -0
- regula/facesdk/webclient/gen/models/search_parameters_create_person.py +86 -0
- regula/facesdk/webclient/gen/models/search_person.py +113 -0
- regula/facesdk/webclient/gen/models/search_person_data.py +96 -0
- regula/facesdk/webclient/gen/models/search_request.py +119 -0
- regula/facesdk/webclient/gen/models/search_result.py +92 -0
- regula/facesdk/webclient/gen/models/transaction_info.py +99 -0
- regula/facesdk/webclient/gen/models/transaction_labels.py +84 -0
- regula/facesdk/webclient/gen/models/update_group.py +85 -0
- regula/facesdk/webclient/gen/py.typed +0 -0
- regula/facesdk/webclient/gen/rest.py +136 -232
- {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/METADATA +7 -4
- regula_facesdk_webclient-8.1.433.dev0.dist-info/RECORD +125 -0
- {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/WHEEL +1 -1
- regula/facesdk/webclient/gen/api/diagnostics_api.py +0 -162
- regula/facesdk/webclient/gen/api/liveness_2_0_api.py +0 -306
- regula/facesdk/webclient/gen/api/liveness_api.py +0 -424
- regula/facesdk/webclient/gen/apis/__init__.py +0 -22
- regula/facesdk/webclient/gen/model/__init__.py +0 -5
- regula/facesdk/webclient/gen/model/add_image_to_person_request.py +0 -261
- regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +0 -204
- regula/facesdk/webclient/gen/model/add_image_to_person_response.py +0 -262
- regula/facesdk/webclient/gen/model/attribute_config.py +0 -120
- regula/facesdk/webclient/gen/model/attribute_config_list.py +0 -92
- regula/facesdk/webclient/gen/model/crop.py +0 -180
- regula/facesdk/webclient/gen/model/detect_attributes_details.py +0 -150
- regula/facesdk/webclient/gen/model/detect_details_meta.py +0 -178
- regula/facesdk/webclient/gen/model/detect_request.py +0 -232
- regula/facesdk/webclient/gen/model/detect_request_attributes.py +0 -120
- regula/facesdk/webclient/gen/model/detect_response.py +0 -147
- regula/facesdk/webclient/gen/model/detect_response_all_of.py +0 -120
- regula/facesdk/webclient/gen/model/detect_result.py +0 -235
- regula/facesdk/webclient/gen/model/detection.py +0 -230
- regula/facesdk/webclient/gen/model/detection_attributes.py +0 -150
- regula/facesdk/webclient/gen/model/detection_face.py +0 -232
- regula/facesdk/webclient/gen/model/detection_quality.py +0 -234
- regula/facesdk/webclient/gen/model/device_info.py +0 -231
- regula/facesdk/webclient/gen/model/face_align_type_quality.py +0 -109
- regula/facesdk/webclient/gen/model/face_attribute.py +0 -133
- regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +0 -109
- regula/facesdk/webclient/gen/model/face_image_quality_groups.py +0 -118
- regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +0 -118
- regula/facesdk/webclient/gen/model/face_image_quality_status.py +0 -103
- regula/facesdk/webclient/gen/model/face_quality_config_name.py +0 -238
- regula/facesdk/webclient/gen/model/face_quality_scenarios.py +0 -124
- regula/facesdk/webclient/gen/model/face_quality_status.py +0 -103
- regula/facesdk/webclient/gen/model/face_rectangular.py +0 -92
- regula/facesdk/webclient/gen/model/face_sdk_result.py +0 -121
- regula/facesdk/webclient/gen/model/face_sdk_result_code.py +0 -217
- regula/facesdk/webclient/gen/model/faces_response.py +0 -258
- regula/facesdk/webclient/gen/model/faces_response_all_of.py +0 -148
- regula/facesdk/webclient/gen/model/filter_op.py +0 -100
- regula/facesdk/webclient/gen/model/filter_search_request.py +0 -176
- regula/facesdk/webclient/gen/model/group.py +0 -206
- regula/facesdk/webclient/gen/model/group_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/group_page.py +0 -178
- regula/facesdk/webclient/gen/model/group_page_all_of.py +0 -122
- regula/facesdk/webclient/gen/model/group_response.py +0 -150
- regula/facesdk/webclient/gen/model/group_to_create.py +0 -180
- regula/facesdk/webclient/gen/model/image.py +0 -318
- regula/facesdk/webclient/gen/model/image_fields.py +0 -258
- regula/facesdk/webclient/gen/model/image_fields_image.py +0 -204
- regula/facesdk/webclient/gen/model/image_page.py +0 -176
- regula/facesdk/webclient/gen/model/image_page_all_of.py +0 -120
- regula/facesdk/webclient/gen/model/image_source.py +0 -115
- regula/facesdk/webclient/gen/model/liveness_transaction.py +0 -334
- regula/facesdk/webclient/gen/model/liveness_type.py +0 -100
- regula/facesdk/webclient/gen/model/match_and_search_request.py +0 -290
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +0 -234
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +0 -148
- regula/facesdk/webclient/gen/model/match_and_search_request_images.py +0 -176
- regula/facesdk/webclient/gen/model/match_and_search_response.py +0 -233
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +0 -206
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +0 -176
- regula/facesdk/webclient/gen/model/match_image.py +0 -205
- regula/facesdk/webclient/gen/model/match_image_detection.py +0 -178
- regula/facesdk/webclient/gen/model/match_image_result.py +0 -316
- regula/facesdk/webclient/gen/model/match_request.py +0 -233
- regula/facesdk/webclient/gen/model/match_request_output_image_params.py +0 -148
- regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +0 -212
- regula/facesdk/webclient/gen/model/match_response.py +0 -205
- regula/facesdk/webclient/gen/model/match_response_all_of.py +0 -178
- regula/facesdk/webclient/gen/model/operation_log.py +0 -206
- regula/facesdk/webclient/gen/model/output_image_params.py +0 -146
- regula/facesdk/webclient/gen/model/page.py +0 -150
- regula/facesdk/webclient/gen/model/person.py +0 -319
- regula/facesdk/webclient/gen/model/person_all_of.py +0 -206
- regula/facesdk/webclient/gen/model/person_created_response.py +0 -178
- regula/facesdk/webclient/gen/model/person_fields.py +0 -235
- regula/facesdk/webclient/gen/model/person_to_update_fields.py +0 -206
- regula/facesdk/webclient/gen/model/person_with_images.py +0 -347
- regula/facesdk/webclient/gen/model/person_with_images_all_of.py +0 -122
- regula/facesdk/webclient/gen/model/persons_page.py +0 -176
- regula/facesdk/webclient/gen/model/persons_page_all_of.py +0 -120
- regula/facesdk/webclient/gen/model/persons_request.py +0 -291
- regula/facesdk/webclient/gen/model/persons_request_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/process_param.py +0 -226
- regula/facesdk/webclient/gen/model/process_param_attributes.py +0 -120
- regula/facesdk/webclient/gen/model/quality_config.py +0 -154
- regula/facesdk/webclient/gen/model/quality_config_list.py +0 -92
- regula/facesdk/webclient/gen/model/quality_detail.py +0 -234
- regula/facesdk/webclient/gen/model/quality_details_groups.py +0 -202
- regula/facesdk/webclient/gen/model/quality_request.py +0 -146
- regula/facesdk/webclient/gen/model/recognize_image.py +0 -374
- regula/facesdk/webclient/gen/model/recognize_image_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/resize_options.py +0 -178
- regula/facesdk/webclient/gen/model/rgb.py +0 -92
- regula/facesdk/webclient/gen/model/search_bad_params.py +0 -172
- regula/facesdk/webclient/gen/model/search_detection.py +0 -398
- regula/facesdk/webclient/gen/model/search_parameters.py +0 -174
- regula/facesdk/webclient/gen/model/search_parameters_create_person.py +0 -177
- regula/facesdk/webclient/gen/model/search_person.py +0 -373
- regula/facesdk/webclient/gen/model/search_person_all_of.py +0 -148
- regula/facesdk/webclient/gen/model/search_request.py +0 -394
- regula/facesdk/webclient/gen/model/search_request_all_of.py +0 -150
- regula/facesdk/webclient/gen/model/search_result.py +0 -150
- regula/facesdk/webclient/gen/model/search_result_all_of.py +0 -122
- regula/facesdk/webclient/gen/model/transaction_config.py +0 -92
- regula/facesdk/webclient/gen/model/transaction_info.py +0 -344
- regula/facesdk/webclient/gen/model/update_group.py +0 -150
- regula/facesdk/webclient/gen/model_utils.py +0 -2037
- regula_facesdk_webclient-7.2.388.dev0.dist-info/RECORD +0 -138
- {regula_facesdk_webclient-7.2.388.dev0.dist-info → regula_facesdk_webclient-8.1.433.dev0.dist-info}/top_level.txt +0 -0
|
@@ -1,49 +1,140 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
Regula Face SDK Web API
|
|
5
|
-
|
|
6
|
-
<a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 7.2.0
|
|
9
4
|
Generated by: https://openapi-generator.tech
|
|
10
5
|
"""
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
from
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
from regula.facesdk.webclient.gen.
|
|
21
|
-
from regula.facesdk.webclient.gen.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
6
|
+
import warnings
|
|
7
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
8
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
9
|
+
from typing_extensions import Annotated
|
|
10
|
+
|
|
11
|
+
from pydantic import Field, StrictBytes, StrictInt, StrictStr
|
|
12
|
+
from typing import Optional, Tuple, Union
|
|
13
|
+
from typing_extensions import Annotated
|
|
14
|
+
from uuid import UUID
|
|
15
|
+
from regula.facesdk.webclient.gen.models.add_image_to_person_request import AddImageToPersonRequest
|
|
16
|
+
from regula.facesdk.webclient.gen.models.add_image_to_person_response import AddImageToPersonResponse
|
|
17
|
+
from regula.facesdk.webclient.gen.models.group_page import GroupPage
|
|
18
|
+
from regula.facesdk.webclient.gen.models.image_page import ImagePage
|
|
19
|
+
from regula.facesdk.webclient.gen.models.person import Person
|
|
20
|
+
from regula.facesdk.webclient.gen.models.person_fields import PersonFields
|
|
21
|
+
from regula.facesdk.webclient.gen.models.person_to_update_fields import PersonToUpdateFields
|
|
22
|
+
|
|
23
|
+
from regula.facesdk.webclient.gen.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from regula.facesdk.webclient.gen.api_response import ApiResponse
|
|
25
|
+
from regula.facesdk.webclient.gen.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class PersonApi:
|
|
28
29
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
30
|
Ref: https://openapi-generator.tech
|
|
30
31
|
|
|
31
32
|
Do not edit the class manually.
|
|
32
33
|
"""
|
|
33
34
|
|
|
34
|
-
def __init__(self, api_client=None):
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
35
36
|
if api_client is None:
|
|
36
|
-
api_client = ApiClient()
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
37
38
|
self.api_client = api_client
|
|
38
39
|
|
|
39
|
-
def add_image_to_person(self, person_id, add_image_to_person_request, **kwargs): # noqa: E501
|
|
40
|
-
"""Add person image # noqa: E501
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
@validate_call
|
|
42
|
+
def add_image_to_person(
|
|
43
|
+
self,
|
|
44
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
45
|
+
add_image_to_person_request: Annotated[AddImageToPersonRequest, Field(description="Image to add.")],
|
|
46
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> AddImageToPersonResponse:
|
|
60
|
+
"""Add person image
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:param person_id: Person ID. (required)
|
|
64
|
+
:type person_id: str
|
|
65
|
+
:param add_image_to_person_request: Image to add. (required)
|
|
66
|
+
:type add_image_to_person_request: AddImageToPersonRequest
|
|
67
|
+
:param x_request_id: Request header label.
|
|
68
|
+
:type x_request_id: str
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._add_image_to_person_serialize(
|
|
92
|
+
person_id=person_id,
|
|
93
|
+
add_image_to_person_request=add_image_to_person_request,
|
|
94
|
+
x_request_id=x_request_id,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
'200': "AddImageToPersonResponse",
|
|
103
|
+
'400': "OperationLog",
|
|
104
|
+
'404': "OperationLog",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def add_image_to_person_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
121
|
+
add_image_to_person_request: Annotated[AddImageToPersonRequest, Field(description="Image to add.")],
|
|
122
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
123
|
+
_request_timeout: Union[
|
|
124
|
+
None,
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Tuple[
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_content_type: Optional[StrictStr] = None,
|
|
133
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
135
|
+
) -> ApiResponse[AddImageToPersonResponse]:
|
|
136
|
+
"""Add person image
|
|
44
137
|
|
|
45
|
-
>>> thread = api.add_image_to_person(person_id, add_image_to_person_request, async_req=True)
|
|
46
|
-
>>> result = thread.get()
|
|
47
138
|
|
|
48
139
|
:param person_id: Person ID. (required)
|
|
49
140
|
:type person_id: str
|
|
@@ -51,32 +142,75 @@ class PersonApi(object):
|
|
|
51
142
|
:type add_image_to_person_request: AddImageToPersonRequest
|
|
52
143
|
:param x_request_id: Request header label.
|
|
53
144
|
: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
145
|
:param _request_timeout: timeout setting for this request. If one
|
|
61
146
|
number provided, it will be total request
|
|
62
147
|
timeout. It can also be a pair (tuple) of
|
|
63
148
|
(connection, read) timeouts.
|
|
149
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
150
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
151
|
+
request; this effectively ignores the
|
|
152
|
+
authentication in the spec for a single request.
|
|
153
|
+
:type _request_auth: dict, optional
|
|
154
|
+
:param _content_type: force content-type for the request.
|
|
155
|
+
:type _content_type: str, Optional
|
|
156
|
+
:param _headers: set to override the headers for a single
|
|
157
|
+
request; this effectively ignores the headers
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _headers: dict, optional
|
|
160
|
+
:param _host_index: set to override the host_index for a single
|
|
161
|
+
request; this effectively ignores the host_index
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _host_index: int, optional
|
|
64
164
|
:return: Returns the result object.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
165
|
+
""" # noqa: E501
|
|
166
|
+
|
|
167
|
+
_param = self._add_image_to_person_serialize(
|
|
168
|
+
person_id=person_id,
|
|
169
|
+
add_image_to_person_request=add_image_to_person_request,
|
|
170
|
+
x_request_id=x_request_id,
|
|
171
|
+
_request_auth=_request_auth,
|
|
172
|
+
_content_type=_content_type,
|
|
173
|
+
_headers=_headers,
|
|
174
|
+
_host_index=_host_index
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
178
|
+
'200': "AddImageToPersonResponse",
|
|
179
|
+
'400': "OperationLog",
|
|
180
|
+
'404': "OperationLog",
|
|
181
|
+
}
|
|
182
|
+
response_data = self.api_client.call_api(
|
|
183
|
+
*_param,
|
|
184
|
+
_request_timeout=_request_timeout
|
|
185
|
+
)
|
|
186
|
+
response_data.read()
|
|
187
|
+
return self.api_client.response_deserialize(
|
|
188
|
+
response_data=response_data,
|
|
189
|
+
response_types_map=_response_types_map,
|
|
190
|
+
)
|
|
71
191
|
|
|
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
192
|
|
|
75
|
-
|
|
76
|
-
|
|
193
|
+
@validate_call
|
|
194
|
+
def add_image_to_person_without_preload_content(
|
|
195
|
+
self,
|
|
196
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
197
|
+
add_image_to_person_request: Annotated[AddImageToPersonRequest, Field(description="Image to add.")],
|
|
198
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
199
|
+
_request_timeout: Union[
|
|
200
|
+
None,
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Tuple[
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
205
|
+
]
|
|
206
|
+
] = None,
|
|
207
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_content_type: Optional[StrictStr] = None,
|
|
209
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
211
|
+
) -> RESTResponseType:
|
|
212
|
+
"""Add person image
|
|
77
213
|
|
|
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
214
|
|
|
81
215
|
:param person_id: Person ID. (required)
|
|
82
216
|
:type person_id: str
|
|
@@ -84,1123 +218,2284 @@ class PersonApi(object):
|
|
|
84
218
|
:type add_image_to_person_request: AddImageToPersonRequest
|
|
85
219
|
:param x_request_id: Request header label.
|
|
86
220
|
: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
221
|
:param _request_timeout: timeout setting for this request. If one
|
|
97
222
|
number provided, it will be total request
|
|
98
223
|
timeout. It can also be a pair (tuple) of
|
|
99
224
|
(connection, read) timeouts.
|
|
225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
100
226
|
:param _request_auth: set to override the auth_settings for an a single
|
|
101
|
-
request; this effectively ignores the
|
|
102
|
-
in the spec for a single request.
|
|
227
|
+
request; this effectively ignores the
|
|
228
|
+
authentication in the spec for a single request.
|
|
103
229
|
:type _request_auth: dict, optional
|
|
230
|
+
:param _content_type: force content-type for the request.
|
|
231
|
+
:type _content_type: str, Optional
|
|
232
|
+
:param _headers: set to override the headers for a single
|
|
233
|
+
request; this effectively ignores the headers
|
|
234
|
+
in the spec for a single request.
|
|
235
|
+
:type _headers: dict, optional
|
|
236
|
+
:param _host_index: set to override the host_index for a single
|
|
237
|
+
request; this effectively ignores the host_index
|
|
238
|
+
in the spec for a single request.
|
|
239
|
+
:type _host_index: int, optional
|
|
104
240
|
:return: Returns the result object.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
241
|
+
""" # noqa: E501
|
|
242
|
+
|
|
243
|
+
_param = self._add_image_to_person_serialize(
|
|
244
|
+
person_id=person_id,
|
|
245
|
+
add_image_to_person_request=add_image_to_person_request,
|
|
246
|
+
x_request_id=x_request_id,
|
|
247
|
+
_request_auth=_request_auth,
|
|
248
|
+
_content_type=_content_type,
|
|
249
|
+
_headers=_headers,
|
|
250
|
+
_host_index=_host_index
|
|
251
|
+
)
|
|
109
252
|
|
|
110
|
-
|
|
253
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
254
|
+
'200': "AddImageToPersonResponse",
|
|
255
|
+
'400': "OperationLog",
|
|
256
|
+
'404': "OperationLog",
|
|
257
|
+
}
|
|
258
|
+
response_data = self.api_client.call_api(
|
|
259
|
+
*_param,
|
|
260
|
+
_request_timeout=_request_timeout
|
|
261
|
+
)
|
|
262
|
+
return response_data.response
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def _add_image_to_person_serialize(
|
|
266
|
+
self,
|
|
267
|
+
person_id,
|
|
268
|
+
add_image_to_person_request,
|
|
269
|
+
x_request_id,
|
|
270
|
+
_request_auth,
|
|
271
|
+
_content_type,
|
|
272
|
+
_headers,
|
|
273
|
+
_host_index,
|
|
274
|
+
) -> RequestSerialized:
|
|
275
|
+
|
|
276
|
+
_host = None
|
|
277
|
+
|
|
278
|
+
_collection_formats: Dict[str, str] = {
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
_path_params: Dict[str, str] = {}
|
|
282
|
+
_query_params: List[Tuple[str, str]] = []
|
|
283
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
284
|
+
_form_params: List[Tuple[str, str]] = []
|
|
285
|
+
_files: Dict[
|
|
286
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
287
|
+
] = {}
|
|
288
|
+
_body_params: Optional[bytes] = None
|
|
289
|
+
|
|
290
|
+
# process the path parameters
|
|
291
|
+
if person_id is not None:
|
|
292
|
+
_path_params['personId'] = person_id
|
|
293
|
+
# process the query parameters
|
|
294
|
+
# process the header parameters
|
|
295
|
+
if x_request_id is not None:
|
|
296
|
+
_header_params['X-RequestID'] = x_request_id
|
|
297
|
+
# process the form parameters
|
|
298
|
+
# process the body parameter
|
|
299
|
+
if add_image_to_person_request is not None:
|
|
300
|
+
_body_params = add_image_to_person_request
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
# set the HTTP header `Accept`
|
|
304
|
+
if 'Accept' not in _header_params:
|
|
305
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
306
|
+
[
|
|
307
|
+
'application/json'
|
|
308
|
+
]
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
# set the HTTP header `Content-Type`
|
|
312
|
+
if _content_type:
|
|
313
|
+
_header_params['Content-Type'] = _content_type
|
|
314
|
+
else:
|
|
315
|
+
_default_content_type = (
|
|
316
|
+
self.api_client.select_header_content_type(
|
|
317
|
+
[
|
|
318
|
+
'application/json'
|
|
319
|
+
]
|
|
320
|
+
)
|
|
321
|
+
)
|
|
322
|
+
if _default_content_type is not None:
|
|
323
|
+
_header_params['Content-Type'] = _default_content_type
|
|
111
324
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
'add_image_to_person_request',
|
|
115
|
-
'x_request_id',
|
|
325
|
+
# authentication setting
|
|
326
|
+
_auth_settings: List[str] = [
|
|
116
327
|
]
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
328
|
+
|
|
329
|
+
return self.api_client.param_serialize(
|
|
330
|
+
method='POST',
|
|
331
|
+
resource_path='/api/persons/{personId}/images',
|
|
332
|
+
path_params=_path_params,
|
|
333
|
+
query_params=_query_params,
|
|
334
|
+
header_params=_header_params,
|
|
335
|
+
body=_body_params,
|
|
336
|
+
post_params=_form_params,
|
|
337
|
+
files=_files,
|
|
338
|
+
auth_settings=_auth_settings,
|
|
339
|
+
collection_formats=_collection_formats,
|
|
340
|
+
_host=_host,
|
|
341
|
+
_request_auth=_request_auth
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
@validate_call
|
|
348
|
+
def create_person(
|
|
349
|
+
self,
|
|
350
|
+
person_fields: PersonFields,
|
|
351
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
352
|
+
_request_timeout: Union[
|
|
353
|
+
None,
|
|
354
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
355
|
+
Tuple[
|
|
356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
357
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
358
|
]
|
|
359
|
+
] = None,
|
|
360
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
361
|
+
_content_type: Optional[StrictStr] = None,
|
|
362
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
364
|
+
) -> Person:
|
|
365
|
+
"""Create person
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
:param person_fields: (required)
|
|
369
|
+
:type person_fields: PersonFields
|
|
370
|
+
:param x_request_id: Request header label.
|
|
371
|
+
:type x_request_id: str
|
|
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
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
377
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
378
|
+
request; this effectively ignores the
|
|
379
|
+
authentication in the spec for a single request.
|
|
380
|
+
:type _request_auth: dict, optional
|
|
381
|
+
:param _content_type: force content-type for the request.
|
|
382
|
+
:type _content_type: str, Optional
|
|
383
|
+
:param _headers: set to override the headers for a single
|
|
384
|
+
request; this effectively ignores the headers
|
|
385
|
+
in the spec for a single request.
|
|
386
|
+
:type _headers: dict, optional
|
|
387
|
+
:param _host_index: set to override the host_index for a single
|
|
388
|
+
request; this effectively ignores the host_index
|
|
389
|
+
in the spec for a single request.
|
|
390
|
+
:type _host_index: int, optional
|
|
391
|
+
:return: Returns the result object.
|
|
392
|
+
""" # noqa: E501
|
|
393
|
+
|
|
394
|
+
_param = self._create_person_serialize(
|
|
395
|
+
person_fields=person_fields,
|
|
396
|
+
x_request_id=x_request_id,
|
|
397
|
+
_request_auth=_request_auth,
|
|
398
|
+
_content_type=_content_type,
|
|
399
|
+
_headers=_headers,
|
|
400
|
+
_host_index=_host_index
|
|
125
401
|
)
|
|
126
402
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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()
|
|
403
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
404
|
+
'201': "Person",
|
|
405
|
+
'400': "OperationLog",
|
|
406
|
+
}
|
|
407
|
+
response_data = self.api_client.call_api(
|
|
408
|
+
*_param,
|
|
409
|
+
_request_timeout=_request_timeout
|
|
410
|
+
)
|
|
411
|
+
response_data.read()
|
|
412
|
+
return self.api_client.response_deserialize(
|
|
413
|
+
response_data=response_data,
|
|
414
|
+
response_types_map=_response_types_map,
|
|
415
|
+
).data
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
@validate_call
|
|
419
|
+
def create_person_with_http_info(
|
|
420
|
+
self,
|
|
421
|
+
person_fields: PersonFields,
|
|
422
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
423
|
+
_request_timeout: Union[
|
|
424
|
+
None,
|
|
425
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
426
|
+
Tuple[
|
|
427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
428
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
429
|
+
]
|
|
430
|
+
] = None,
|
|
431
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
432
|
+
_content_type: Optional[StrictStr] = None,
|
|
433
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
434
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
435
|
+
) -> ApiResponse[Person]:
|
|
436
|
+
"""Create person
|
|
437
|
+
|
|
198
438
|
|
|
199
439
|
:param person_fields: (required)
|
|
200
440
|
:type person_fields: PersonFields
|
|
201
441
|
:param x_request_id: Request header label.
|
|
202
442
|
: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
443
|
:param _request_timeout: timeout setting for this request. If one
|
|
210
444
|
number provided, it will be total request
|
|
211
445
|
timeout. It can also be a pair (tuple) of
|
|
212
446
|
(connection, read) timeouts.
|
|
447
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
448
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
449
|
+
request; this effectively ignores the
|
|
450
|
+
authentication in the spec for a single request.
|
|
451
|
+
:type _request_auth: dict, optional
|
|
452
|
+
:param _content_type: force content-type for the request.
|
|
453
|
+
:type _content_type: str, Optional
|
|
454
|
+
:param _headers: set to override the headers for a single
|
|
455
|
+
request; this effectively ignores the headers
|
|
456
|
+
in the spec for a single request.
|
|
457
|
+
:type _headers: dict, optional
|
|
458
|
+
:param _host_index: set to override the host_index for a single
|
|
459
|
+
request; this effectively ignores the host_index
|
|
460
|
+
in the spec for a single request.
|
|
461
|
+
:type _host_index: int, optional
|
|
213
462
|
:return: Returns the result object.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
463
|
+
""" # noqa: E501
|
|
464
|
+
|
|
465
|
+
_param = self._create_person_serialize(
|
|
466
|
+
person_fields=person_fields,
|
|
467
|
+
x_request_id=x_request_id,
|
|
468
|
+
_request_auth=_request_auth,
|
|
469
|
+
_content_type=_content_type,
|
|
470
|
+
_headers=_headers,
|
|
471
|
+
_host_index=_host_index
|
|
472
|
+
)
|
|
473
|
+
|
|
474
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
475
|
+
'201': "Person",
|
|
476
|
+
'400': "OperationLog",
|
|
477
|
+
}
|
|
478
|
+
response_data = self.api_client.call_api(
|
|
479
|
+
*_param,
|
|
480
|
+
_request_timeout=_request_timeout
|
|
481
|
+
)
|
|
482
|
+
response_data.read()
|
|
483
|
+
return self.api_client.response_deserialize(
|
|
484
|
+
response_data=response_data,
|
|
485
|
+
response_types_map=_response_types_map,
|
|
486
|
+
)
|
|
220
487
|
|
|
221
|
-
def create_person_with_http_info(self, person_fields, **kwargs): # noqa: E501
|
|
222
|
-
"""Create person # noqa: E501
|
|
223
488
|
|
|
224
|
-
|
|
225
|
-
|
|
489
|
+
@validate_call
|
|
490
|
+
def create_person_without_preload_content(
|
|
491
|
+
self,
|
|
492
|
+
person_fields: PersonFields,
|
|
493
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
494
|
+
_request_timeout: Union[
|
|
495
|
+
None,
|
|
496
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
497
|
+
Tuple[
|
|
498
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
499
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
500
|
+
]
|
|
501
|
+
] = None,
|
|
502
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
503
|
+
_content_type: Optional[StrictStr] = None,
|
|
504
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
505
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
506
|
+
) -> RESTResponseType:
|
|
507
|
+
"""Create person
|
|
226
508
|
|
|
227
|
-
>>> thread = api.create_person_with_http_info(person_fields, async_req=True)
|
|
228
|
-
>>> result = thread.get()
|
|
229
509
|
|
|
230
510
|
:param person_fields: (required)
|
|
231
511
|
:type person_fields: PersonFields
|
|
232
512
|
:param x_request_id: Request header label.
|
|
233
513
|
: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
514
|
:param _request_timeout: timeout setting for this request. If one
|
|
244
515
|
number provided, it will be total request
|
|
245
516
|
timeout. It can also be a pair (tuple) of
|
|
246
517
|
(connection, read) timeouts.
|
|
518
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
247
519
|
:param _request_auth: set to override the auth_settings for an a single
|
|
248
|
-
request; this effectively ignores the
|
|
249
|
-
in the spec for a single request.
|
|
520
|
+
request; this effectively ignores the
|
|
521
|
+
authentication in the spec for a single request.
|
|
250
522
|
:type _request_auth: dict, optional
|
|
523
|
+
:param _content_type: force content-type for the request.
|
|
524
|
+
:type _content_type: str, Optional
|
|
525
|
+
:param _headers: set to override the headers for a single
|
|
526
|
+
request; this effectively ignores the headers
|
|
527
|
+
in the spec for a single request.
|
|
528
|
+
:type _headers: dict, optional
|
|
529
|
+
:param _host_index: set to override the host_index for a single
|
|
530
|
+
request; this effectively ignores the host_index
|
|
531
|
+
in the spec for a single request.
|
|
532
|
+
:type _host_index: int, optional
|
|
251
533
|
:return: Returns the result object.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
534
|
+
""" # noqa: E501
|
|
535
|
+
|
|
536
|
+
_param = self._create_person_serialize(
|
|
537
|
+
person_fields=person_fields,
|
|
538
|
+
x_request_id=x_request_id,
|
|
539
|
+
_request_auth=_request_auth,
|
|
540
|
+
_content_type=_content_type,
|
|
541
|
+
_headers=_headers,
|
|
542
|
+
_host_index=_host_index
|
|
543
|
+
)
|
|
256
544
|
|
|
257
|
-
|
|
545
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
546
|
+
'201': "Person",
|
|
547
|
+
'400': "OperationLog",
|
|
548
|
+
}
|
|
549
|
+
response_data = self.api_client.call_api(
|
|
550
|
+
*_param,
|
|
551
|
+
_request_timeout=_request_timeout
|
|
552
|
+
)
|
|
553
|
+
return response_data.response
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
def _create_person_serialize(
|
|
557
|
+
self,
|
|
558
|
+
person_fields,
|
|
559
|
+
x_request_id,
|
|
560
|
+
_request_auth,
|
|
561
|
+
_content_type,
|
|
562
|
+
_headers,
|
|
563
|
+
_host_index,
|
|
564
|
+
) -> RequestSerialized:
|
|
565
|
+
|
|
566
|
+
_host = None
|
|
567
|
+
|
|
568
|
+
_collection_formats: Dict[str, str] = {
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
_path_params: Dict[str, str] = {}
|
|
572
|
+
_query_params: List[Tuple[str, str]] = []
|
|
573
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
574
|
+
_form_params: List[Tuple[str, str]] = []
|
|
575
|
+
_files: Dict[
|
|
576
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
577
|
+
] = {}
|
|
578
|
+
_body_params: Optional[bytes] = None
|
|
579
|
+
|
|
580
|
+
# process the path parameters
|
|
581
|
+
# process the query parameters
|
|
582
|
+
# process the header parameters
|
|
583
|
+
if x_request_id is not None:
|
|
584
|
+
_header_params['X-RequestID'] = x_request_id
|
|
585
|
+
# process the form parameters
|
|
586
|
+
# process the body parameter
|
|
587
|
+
if person_fields is not None:
|
|
588
|
+
_body_params = person_fields
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
# set the HTTP header `Accept`
|
|
592
|
+
if 'Accept' not in _header_params:
|
|
593
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
594
|
+
[
|
|
595
|
+
'application/json'
|
|
596
|
+
]
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
# set the HTTP header `Content-Type`
|
|
600
|
+
if _content_type:
|
|
601
|
+
_header_params['Content-Type'] = _content_type
|
|
602
|
+
else:
|
|
603
|
+
_default_content_type = (
|
|
604
|
+
self.api_client.select_header_content_type(
|
|
605
|
+
[
|
|
606
|
+
'application/json'
|
|
607
|
+
]
|
|
608
|
+
)
|
|
609
|
+
)
|
|
610
|
+
if _default_content_type is not None:
|
|
611
|
+
_header_params['Content-Type'] = _default_content_type
|
|
258
612
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
'x_request_id',
|
|
613
|
+
# authentication setting
|
|
614
|
+
_auth_settings: List[str] = [
|
|
262
615
|
]
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
616
|
+
|
|
617
|
+
return self.api_client.param_serialize(
|
|
618
|
+
method='POST',
|
|
619
|
+
resource_path='/api/persons',
|
|
620
|
+
path_params=_path_params,
|
|
621
|
+
query_params=_query_params,
|
|
622
|
+
header_params=_header_params,
|
|
623
|
+
body=_body_params,
|
|
624
|
+
post_params=_form_params,
|
|
625
|
+
files=_files,
|
|
626
|
+
auth_settings=_auth_settings,
|
|
627
|
+
collection_formats=_collection_formats,
|
|
628
|
+
_host=_host,
|
|
629
|
+
_request_auth=_request_auth
|
|
271
630
|
)
|
|
272
631
|
|
|
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
632
|
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
@validate_call
|
|
636
|
+
def delete_image_of_person(
|
|
637
|
+
self,
|
|
638
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
639
|
+
image_id: Annotated[StrictStr, Field(description="Image ID.")],
|
|
640
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
641
|
+
_request_timeout: Union[
|
|
642
|
+
None,
|
|
643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
644
|
+
Tuple[
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
646
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
647
|
+
]
|
|
648
|
+
] = None,
|
|
649
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
650
|
+
_content_type: Optional[StrictStr] = None,
|
|
651
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
652
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
653
|
+
) -> None:
|
|
654
|
+
"""Delete image of person
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
:param person_id: Person ID. (required)
|
|
658
|
+
:type person_id: str
|
|
339
659
|
:param image_id: Image ID. (required)
|
|
340
660
|
:type image_id: str
|
|
661
|
+
:param x_request_id: Request header label.
|
|
662
|
+
:type x_request_id: str
|
|
663
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
664
|
+
number provided, it will be total request
|
|
665
|
+
timeout. It can also be a pair (tuple) of
|
|
666
|
+
(connection, read) timeouts.
|
|
667
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
668
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
669
|
+
request; this effectively ignores the
|
|
670
|
+
authentication in the spec for a single request.
|
|
671
|
+
:type _request_auth: dict, optional
|
|
672
|
+
:param _content_type: force content-type for the request.
|
|
673
|
+
:type _content_type: str, Optional
|
|
674
|
+
:param _headers: set to override the headers for a single
|
|
675
|
+
request; this effectively ignores the headers
|
|
676
|
+
in the spec for a single request.
|
|
677
|
+
:type _headers: dict, optional
|
|
678
|
+
:param _host_index: set to override the host_index for a single
|
|
679
|
+
request; this effectively ignores the host_index
|
|
680
|
+
in the spec for a single request.
|
|
681
|
+
:type _host_index: int, optional
|
|
682
|
+
:return: Returns the result object.
|
|
683
|
+
""" # noqa: E501
|
|
684
|
+
|
|
685
|
+
_param = self._delete_image_of_person_serialize(
|
|
686
|
+
person_id=person_id,
|
|
687
|
+
image_id=image_id,
|
|
688
|
+
x_request_id=x_request_id,
|
|
689
|
+
_request_auth=_request_auth,
|
|
690
|
+
_content_type=_content_type,
|
|
691
|
+
_headers=_headers,
|
|
692
|
+
_host_index=_host_index
|
|
693
|
+
)
|
|
694
|
+
|
|
695
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
696
|
+
'204': None,
|
|
697
|
+
'400': "OperationLog",
|
|
698
|
+
'404': "OperationLog",
|
|
699
|
+
}
|
|
700
|
+
response_data = self.api_client.call_api(
|
|
701
|
+
*_param,
|
|
702
|
+
_request_timeout=_request_timeout
|
|
703
|
+
)
|
|
704
|
+
response_data.read()
|
|
705
|
+
return self.api_client.response_deserialize(
|
|
706
|
+
response_data=response_data,
|
|
707
|
+
response_types_map=_response_types_map,
|
|
708
|
+
).data
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
@validate_call
|
|
712
|
+
def delete_image_of_person_with_http_info(
|
|
713
|
+
self,
|
|
714
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
715
|
+
image_id: Annotated[StrictStr, Field(description="Image ID.")],
|
|
716
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
717
|
+
_request_timeout: Union[
|
|
718
|
+
None,
|
|
719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
720
|
+
Tuple[
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
722
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
723
|
+
]
|
|
724
|
+
] = None,
|
|
725
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
726
|
+
_content_type: Optional[StrictStr] = None,
|
|
727
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
728
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
729
|
+
) -> ApiResponse[None]:
|
|
730
|
+
"""Delete image of person
|
|
731
|
+
|
|
732
|
+
|
|
341
733
|
:param person_id: Person ID. (required)
|
|
342
734
|
:type person_id: str
|
|
735
|
+
:param image_id: Image ID. (required)
|
|
736
|
+
:type image_id: str
|
|
343
737
|
:param x_request_id: Request header label.
|
|
344
738
|
: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
739
|
:param _request_timeout: timeout setting for this request. If one
|
|
352
740
|
number provided, it will be total request
|
|
353
741
|
timeout. It can also be a pair (tuple) of
|
|
354
742
|
(connection, read) timeouts.
|
|
743
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
744
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
745
|
+
request; this effectively ignores the
|
|
746
|
+
authentication in the spec for a single request.
|
|
747
|
+
:type _request_auth: dict, optional
|
|
748
|
+
:param _content_type: force content-type for the request.
|
|
749
|
+
:type _content_type: str, Optional
|
|
750
|
+
:param _headers: set to override the headers for a single
|
|
751
|
+
request; this effectively ignores the headers
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _headers: dict, optional
|
|
754
|
+
:param _host_index: set to override the host_index for a single
|
|
755
|
+
request; this effectively ignores the host_index
|
|
756
|
+
in the spec for a single request.
|
|
757
|
+
:type _host_index: int, optional
|
|
355
758
|
:return: Returns the result object.
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
759
|
+
""" # noqa: E501
|
|
760
|
+
|
|
761
|
+
_param = self._delete_image_of_person_serialize(
|
|
762
|
+
person_id=person_id,
|
|
763
|
+
image_id=image_id,
|
|
764
|
+
x_request_id=x_request_id,
|
|
765
|
+
_request_auth=_request_auth,
|
|
766
|
+
_content_type=_content_type,
|
|
767
|
+
_headers=_headers,
|
|
768
|
+
_host_index=_host_index
|
|
769
|
+
)
|
|
362
770
|
|
|
363
|
-
|
|
364
|
-
|
|
771
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
772
|
+
'204': None,
|
|
773
|
+
'400': "OperationLog",
|
|
774
|
+
'404': "OperationLog",
|
|
775
|
+
}
|
|
776
|
+
response_data = self.api_client.call_api(
|
|
777
|
+
*_param,
|
|
778
|
+
_request_timeout=_request_timeout
|
|
779
|
+
)
|
|
780
|
+
response_data.read()
|
|
781
|
+
return self.api_client.response_deserialize(
|
|
782
|
+
response_data=response_data,
|
|
783
|
+
response_types_map=_response_types_map,
|
|
784
|
+
)
|
|
365
785
|
|
|
366
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
367
|
-
asynchronous HTTP request, please pass async_req=True
|
|
368
786
|
|
|
369
|
-
|
|
370
|
-
|
|
787
|
+
@validate_call
|
|
788
|
+
def delete_image_of_person_without_preload_content(
|
|
789
|
+
self,
|
|
790
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
791
|
+
image_id: Annotated[StrictStr, Field(description="Image ID.")],
|
|
792
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
793
|
+
_request_timeout: Union[
|
|
794
|
+
None,
|
|
795
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
796
|
+
Tuple[
|
|
797
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
798
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
799
|
+
]
|
|
800
|
+
] = None,
|
|
801
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
802
|
+
_content_type: Optional[StrictStr] = None,
|
|
803
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
804
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
805
|
+
) -> RESTResponseType:
|
|
806
|
+
"""Delete image of person
|
|
807
|
+
|
|
371
808
|
|
|
372
|
-
:param image_id: Image ID. (required)
|
|
373
|
-
:type image_id: str
|
|
374
809
|
:param person_id: Person ID. (required)
|
|
375
810
|
:type person_id: str
|
|
811
|
+
:param image_id: Image ID. (required)
|
|
812
|
+
:type image_id: str
|
|
376
813
|
:param x_request_id: Request header label.
|
|
377
814
|
: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
815
|
:param _request_timeout: timeout setting for this request. If one
|
|
388
816
|
number provided, it will be total request
|
|
389
817
|
timeout. It can also be a pair (tuple) of
|
|
390
818
|
(connection, read) timeouts.
|
|
819
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
391
820
|
:param _request_auth: set to override the auth_settings for an a single
|
|
392
|
-
request; this effectively ignores the
|
|
393
|
-
in the spec for a single request.
|
|
821
|
+
request; this effectively ignores the
|
|
822
|
+
authentication in the spec for a single request.
|
|
394
823
|
:type _request_auth: dict, optional
|
|
824
|
+
:param _content_type: force content-type for the request.
|
|
825
|
+
:type _content_type: str, Optional
|
|
826
|
+
:param _headers: set to override the headers for a single
|
|
827
|
+
request; this effectively ignores the headers
|
|
828
|
+
in the spec for a single request.
|
|
829
|
+
:type _headers: dict, optional
|
|
830
|
+
:param _host_index: set to override the host_index for a single
|
|
831
|
+
request; this effectively ignores the host_index
|
|
832
|
+
in the spec for a single request.
|
|
833
|
+
:type _host_index: int, optional
|
|
395
834
|
:return: Returns the result object.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
835
|
+
""" # noqa: E501
|
|
836
|
+
|
|
837
|
+
_param = self._delete_image_of_person_serialize(
|
|
838
|
+
person_id=person_id,
|
|
839
|
+
image_id=image_id,
|
|
840
|
+
x_request_id=x_request_id,
|
|
841
|
+
_request_auth=_request_auth,
|
|
842
|
+
_content_type=_content_type,
|
|
843
|
+
_headers=_headers,
|
|
844
|
+
_host_index=_host_index
|
|
845
|
+
)
|
|
402
846
|
|
|
403
|
-
|
|
404
|
-
'
|
|
405
|
-
'
|
|
406
|
-
'
|
|
847
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
848
|
+
'204': None,
|
|
849
|
+
'400': "OperationLog",
|
|
850
|
+
'404': "OperationLog",
|
|
851
|
+
}
|
|
852
|
+
response_data = self.api_client.call_api(
|
|
853
|
+
*_param,
|
|
854
|
+
_request_timeout=_request_timeout
|
|
855
|
+
)
|
|
856
|
+
return response_data.response
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
def _delete_image_of_person_serialize(
|
|
860
|
+
self,
|
|
861
|
+
person_id,
|
|
862
|
+
image_id,
|
|
863
|
+
x_request_id,
|
|
864
|
+
_request_auth,
|
|
865
|
+
_content_type,
|
|
866
|
+
_headers,
|
|
867
|
+
_host_index,
|
|
868
|
+
) -> RequestSerialized:
|
|
869
|
+
|
|
870
|
+
_host = None
|
|
871
|
+
|
|
872
|
+
_collection_formats: Dict[str, str] = {
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
_path_params: Dict[str, str] = {}
|
|
876
|
+
_query_params: List[Tuple[str, str]] = []
|
|
877
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
878
|
+
_form_params: List[Tuple[str, str]] = []
|
|
879
|
+
_files: Dict[
|
|
880
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
881
|
+
] = {}
|
|
882
|
+
_body_params: Optional[bytes] = None
|
|
883
|
+
|
|
884
|
+
# process the path parameters
|
|
885
|
+
if person_id is not None:
|
|
886
|
+
_path_params['personId'] = person_id
|
|
887
|
+
if image_id is not None:
|
|
888
|
+
_path_params['imageId'] = image_id
|
|
889
|
+
# process the query parameters
|
|
890
|
+
# process the header parameters
|
|
891
|
+
if x_request_id is not None:
|
|
892
|
+
_header_params['X-RequestID'] = x_request_id
|
|
893
|
+
# process the form parameters
|
|
894
|
+
# process the body parameter
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
# set the HTTP header `Accept`
|
|
898
|
+
if 'Accept' not in _header_params:
|
|
899
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
900
|
+
[
|
|
901
|
+
'application/json'
|
|
902
|
+
]
|
|
903
|
+
)
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
# authentication setting
|
|
907
|
+
_auth_settings: List[str] = [
|
|
407
908
|
]
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
909
|
+
|
|
910
|
+
return self.api_client.param_serialize(
|
|
911
|
+
method='DELETE',
|
|
912
|
+
resource_path='/api/persons/{personId}/images/{imageId}',
|
|
913
|
+
path_params=_path_params,
|
|
914
|
+
query_params=_query_params,
|
|
915
|
+
header_params=_header_params,
|
|
916
|
+
body=_body_params,
|
|
917
|
+
post_params=_form_params,
|
|
918
|
+
files=_files,
|
|
919
|
+
auth_settings=_auth_settings,
|
|
920
|
+
collection_formats=_collection_formats,
|
|
921
|
+
_host=_host,
|
|
922
|
+
_request_auth=_request_auth
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
@validate_call
|
|
929
|
+
def delete_person(
|
|
930
|
+
self,
|
|
931
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
932
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
933
|
+
_request_timeout: Union[
|
|
934
|
+
None,
|
|
935
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
936
|
+
Tuple[
|
|
937
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
938
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
415
939
|
]
|
|
940
|
+
] = None,
|
|
941
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
942
|
+
_content_type: Optional[StrictStr] = None,
|
|
943
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
944
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
945
|
+
) -> None:
|
|
946
|
+
"""Delete person
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
:param person_id: Person ID. (required)
|
|
950
|
+
:type person_id: str
|
|
951
|
+
:param x_request_id: Request header label.
|
|
952
|
+
:type x_request_id: str
|
|
953
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
954
|
+
number provided, it will be total request
|
|
955
|
+
timeout. It can also be a pair (tuple) of
|
|
956
|
+
(connection, read) timeouts.
|
|
957
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
958
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
959
|
+
request; this effectively ignores the
|
|
960
|
+
authentication in the spec for a single request.
|
|
961
|
+
:type _request_auth: dict, optional
|
|
962
|
+
:param _content_type: force content-type for the request.
|
|
963
|
+
:type _content_type: str, Optional
|
|
964
|
+
:param _headers: set to override the headers for a single
|
|
965
|
+
request; this effectively ignores the headers
|
|
966
|
+
in the spec for a single request.
|
|
967
|
+
:type _headers: dict, optional
|
|
968
|
+
:param _host_index: set to override the host_index for a single
|
|
969
|
+
request; this effectively ignores the host_index
|
|
970
|
+
in the spec for a single request.
|
|
971
|
+
:type _host_index: int, optional
|
|
972
|
+
:return: Returns the result object.
|
|
973
|
+
""" # noqa: E501
|
|
974
|
+
|
|
975
|
+
_param = self._delete_person_serialize(
|
|
976
|
+
person_id=person_id,
|
|
977
|
+
x_request_id=x_request_id,
|
|
978
|
+
_request_auth=_request_auth,
|
|
979
|
+
_content_type=_content_type,
|
|
980
|
+
_headers=_headers,
|
|
981
|
+
_host_index=_host_index
|
|
416
982
|
)
|
|
417
983
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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()
|
|
984
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
985
|
+
'204': None,
|
|
986
|
+
'400': "OperationLog",
|
|
987
|
+
'404': "OperationLog",
|
|
988
|
+
}
|
|
989
|
+
response_data = self.api_client.call_api(
|
|
990
|
+
*_param,
|
|
991
|
+
_request_timeout=_request_timeout
|
|
992
|
+
)
|
|
993
|
+
response_data.read()
|
|
994
|
+
return self.api_client.response_deserialize(
|
|
995
|
+
response_data=response_data,
|
|
996
|
+
response_types_map=_response_types_map,
|
|
997
|
+
).data
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
@validate_call
|
|
1001
|
+
def delete_person_with_http_info(
|
|
1002
|
+
self,
|
|
1003
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1004
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1005
|
+
_request_timeout: Union[
|
|
1006
|
+
None,
|
|
1007
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1008
|
+
Tuple[
|
|
1009
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1010
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1011
|
+
]
|
|
1012
|
+
] = None,
|
|
1013
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1014
|
+
_content_type: Optional[StrictStr] = None,
|
|
1015
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1016
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1017
|
+
) -> ApiResponse[None]:
|
|
1018
|
+
"""Delete person
|
|
1019
|
+
|
|
485
1020
|
|
|
486
1021
|
:param person_id: Person ID. (required)
|
|
487
1022
|
:type person_id: str
|
|
488
1023
|
:param x_request_id: Request header label.
|
|
489
1024
|
: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
1025
|
:param _request_timeout: timeout setting for this request. If one
|
|
497
1026
|
number provided, it will be total request
|
|
498
1027
|
timeout. It can also be a pair (tuple) of
|
|
499
1028
|
(connection, read) timeouts.
|
|
1029
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1030
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1031
|
+
request; this effectively ignores the
|
|
1032
|
+
authentication in the spec for a single request.
|
|
1033
|
+
:type _request_auth: dict, optional
|
|
1034
|
+
:param _content_type: force content-type for the request.
|
|
1035
|
+
:type _content_type: str, Optional
|
|
1036
|
+
:param _headers: set to override the headers for a single
|
|
1037
|
+
request; this effectively ignores the headers
|
|
1038
|
+
in the spec for a single request.
|
|
1039
|
+
:type _headers: dict, optional
|
|
1040
|
+
:param _host_index: set to override the host_index for a single
|
|
1041
|
+
request; this effectively ignores the host_index
|
|
1042
|
+
in the spec for a single request.
|
|
1043
|
+
:type _host_index: int, optional
|
|
500
1044
|
:return: Returns the result object.
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
1045
|
+
""" # noqa: E501
|
|
1046
|
+
|
|
1047
|
+
_param = self._delete_person_serialize(
|
|
1048
|
+
person_id=person_id,
|
|
1049
|
+
x_request_id=x_request_id,
|
|
1050
|
+
_request_auth=_request_auth,
|
|
1051
|
+
_content_type=_content_type,
|
|
1052
|
+
_headers=_headers,
|
|
1053
|
+
_host_index=_host_index
|
|
1054
|
+
)
|
|
1055
|
+
|
|
1056
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1057
|
+
'204': None,
|
|
1058
|
+
'400': "OperationLog",
|
|
1059
|
+
'404': "OperationLog",
|
|
1060
|
+
}
|
|
1061
|
+
response_data = self.api_client.call_api(
|
|
1062
|
+
*_param,
|
|
1063
|
+
_request_timeout=_request_timeout
|
|
1064
|
+
)
|
|
1065
|
+
response_data.read()
|
|
1066
|
+
return self.api_client.response_deserialize(
|
|
1067
|
+
response_data=response_data,
|
|
1068
|
+
response_types_map=_response_types_map,
|
|
1069
|
+
)
|
|
507
1070
|
|
|
508
|
-
def delete_person_with_http_info(self, person_id, **kwargs): # noqa: E501
|
|
509
|
-
"""Delete person # noqa: E501
|
|
510
1071
|
|
|
511
|
-
|
|
512
|
-
|
|
1072
|
+
@validate_call
|
|
1073
|
+
def delete_person_without_preload_content(
|
|
1074
|
+
self,
|
|
1075
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1076
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1077
|
+
_request_timeout: Union[
|
|
1078
|
+
None,
|
|
1079
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1080
|
+
Tuple[
|
|
1081
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1082
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1083
|
+
]
|
|
1084
|
+
] = None,
|
|
1085
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1086
|
+
_content_type: Optional[StrictStr] = None,
|
|
1087
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1088
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1089
|
+
) -> RESTResponseType:
|
|
1090
|
+
"""Delete person
|
|
513
1091
|
|
|
514
|
-
>>> thread = api.delete_person_with_http_info(person_id, async_req=True)
|
|
515
|
-
>>> result = thread.get()
|
|
516
1092
|
|
|
517
1093
|
:param person_id: Person ID. (required)
|
|
518
1094
|
:type person_id: str
|
|
519
1095
|
:param x_request_id: Request header label.
|
|
520
1096
|
: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
1097
|
:param _request_timeout: timeout setting for this request. If one
|
|
531
1098
|
number provided, it will be total request
|
|
532
1099
|
timeout. It can also be a pair (tuple) of
|
|
533
1100
|
(connection, read) timeouts.
|
|
1101
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
534
1102
|
:param _request_auth: set to override the auth_settings for an a single
|
|
535
|
-
request; this effectively ignores the
|
|
536
|
-
in the spec for a single request.
|
|
1103
|
+
request; this effectively ignores the
|
|
1104
|
+
authentication in the spec for a single request.
|
|
537
1105
|
:type _request_auth: dict, optional
|
|
1106
|
+
:param _content_type: force content-type for the request.
|
|
1107
|
+
:type _content_type: str, Optional
|
|
1108
|
+
:param _headers: set to override the headers for a single
|
|
1109
|
+
request; this effectively ignores the headers
|
|
1110
|
+
in the spec for a single request.
|
|
1111
|
+
:type _headers: dict, optional
|
|
1112
|
+
:param _host_index: set to override the host_index for a single
|
|
1113
|
+
request; this effectively ignores the host_index
|
|
1114
|
+
in the spec for a single request.
|
|
1115
|
+
:type _host_index: int, optional
|
|
538
1116
|
:return: Returns the result object.
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
1117
|
+
""" # noqa: E501
|
|
1118
|
+
|
|
1119
|
+
_param = self._delete_person_serialize(
|
|
1120
|
+
person_id=person_id,
|
|
1121
|
+
x_request_id=x_request_id,
|
|
1122
|
+
_request_auth=_request_auth,
|
|
1123
|
+
_content_type=_content_type,
|
|
1124
|
+
_headers=_headers,
|
|
1125
|
+
_host_index=_host_index
|
|
1126
|
+
)
|
|
545
1127
|
|
|
546
|
-
|
|
547
|
-
'
|
|
548
|
-
'
|
|
1128
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1129
|
+
'204': None,
|
|
1130
|
+
'400': "OperationLog",
|
|
1131
|
+
'404': "OperationLog",
|
|
1132
|
+
}
|
|
1133
|
+
response_data = self.api_client.call_api(
|
|
1134
|
+
*_param,
|
|
1135
|
+
_request_timeout=_request_timeout
|
|
1136
|
+
)
|
|
1137
|
+
return response_data.response
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
def _delete_person_serialize(
|
|
1141
|
+
self,
|
|
1142
|
+
person_id,
|
|
1143
|
+
x_request_id,
|
|
1144
|
+
_request_auth,
|
|
1145
|
+
_content_type,
|
|
1146
|
+
_headers,
|
|
1147
|
+
_host_index,
|
|
1148
|
+
) -> RequestSerialized:
|
|
1149
|
+
|
|
1150
|
+
_host = None
|
|
1151
|
+
|
|
1152
|
+
_collection_formats: Dict[str, str] = {
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
_path_params: Dict[str, str] = {}
|
|
1156
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1157
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1158
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1159
|
+
_files: Dict[
|
|
1160
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1161
|
+
] = {}
|
|
1162
|
+
_body_params: Optional[bytes] = None
|
|
1163
|
+
|
|
1164
|
+
# process the path parameters
|
|
1165
|
+
if person_id is not None:
|
|
1166
|
+
_path_params['personId'] = person_id
|
|
1167
|
+
# process the query parameters
|
|
1168
|
+
# process the header parameters
|
|
1169
|
+
if x_request_id is not None:
|
|
1170
|
+
_header_params['X-RequestID'] = x_request_id
|
|
1171
|
+
# process the form parameters
|
|
1172
|
+
# process the body parameter
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
# set the HTTP header `Accept`
|
|
1176
|
+
if 'Accept' not in _header_params:
|
|
1177
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1178
|
+
[
|
|
1179
|
+
'application/json'
|
|
1180
|
+
]
|
|
1181
|
+
)
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
# authentication setting
|
|
1185
|
+
_auth_settings: List[str] = [
|
|
549
1186
|
]
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
1187
|
+
|
|
1188
|
+
return self.api_client.param_serialize(
|
|
1189
|
+
method='DELETE',
|
|
1190
|
+
resource_path='/api/persons/{personId}',
|
|
1191
|
+
path_params=_path_params,
|
|
1192
|
+
query_params=_query_params,
|
|
1193
|
+
header_params=_header_params,
|
|
1194
|
+
body=_body_params,
|
|
1195
|
+
post_params=_form_params,
|
|
1196
|
+
files=_files,
|
|
1197
|
+
auth_settings=_auth_settings,
|
|
1198
|
+
collection_formats=_collection_formats,
|
|
1199
|
+
_host=_host,
|
|
1200
|
+
_request_auth=_request_auth
|
|
558
1201
|
)
|
|
559
1202
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
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()
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
@validate_call
|
|
1207
|
+
def get_all_groups_by_person_id(
|
|
1208
|
+
self,
|
|
1209
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1210
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1211
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
|
|
1212
|
+
size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
|
|
1213
|
+
_request_timeout: Union[
|
|
1214
|
+
None,
|
|
1215
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1216
|
+
Tuple[
|
|
1217
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1218
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1219
|
+
]
|
|
1220
|
+
] = None,
|
|
1221
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1222
|
+
_content_type: Optional[StrictStr] = None,
|
|
1223
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1224
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1225
|
+
) -> GroupPage:
|
|
1226
|
+
"""Get person groups
|
|
1227
|
+
|
|
621
1228
|
|
|
622
1229
|
:param person_id: Person ID. (required)
|
|
623
1230
|
:type person_id: str
|
|
1231
|
+
:param x_request_id: Request header label.
|
|
1232
|
+
:type x_request_id: str
|
|
624
1233
|
:param page: The page number to get a list of persons or groups.
|
|
625
1234
|
:type page: int
|
|
626
1235
|
:param size: The page size with a list of persons or groups, items.
|
|
627
1236
|
:type size: int
|
|
1237
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1238
|
+
number provided, it will be total request
|
|
1239
|
+
timeout. It can also be a pair (tuple) of
|
|
1240
|
+
(connection, read) timeouts.
|
|
1241
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1242
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1243
|
+
request; this effectively ignores the
|
|
1244
|
+
authentication in the spec for a single request.
|
|
1245
|
+
:type _request_auth: dict, optional
|
|
1246
|
+
:param _content_type: force content-type for the request.
|
|
1247
|
+
:type _content_type: str, Optional
|
|
1248
|
+
:param _headers: set to override the headers for a single
|
|
1249
|
+
request; this effectively ignores the headers
|
|
1250
|
+
in the spec for a single request.
|
|
1251
|
+
:type _headers: dict, optional
|
|
1252
|
+
:param _host_index: set to override the host_index for a single
|
|
1253
|
+
request; this effectively ignores the host_index
|
|
1254
|
+
in the spec for a single request.
|
|
1255
|
+
:type _host_index: int, optional
|
|
1256
|
+
:return: Returns the result object.
|
|
1257
|
+
""" # noqa: E501
|
|
1258
|
+
|
|
1259
|
+
_param = self._get_all_groups_by_person_id_serialize(
|
|
1260
|
+
person_id=person_id,
|
|
1261
|
+
x_request_id=x_request_id,
|
|
1262
|
+
page=page,
|
|
1263
|
+
size=size,
|
|
1264
|
+
_request_auth=_request_auth,
|
|
1265
|
+
_content_type=_content_type,
|
|
1266
|
+
_headers=_headers,
|
|
1267
|
+
_host_index=_host_index
|
|
1268
|
+
)
|
|
1269
|
+
|
|
1270
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1271
|
+
'200': "GroupPage",
|
|
1272
|
+
'400': "OperationLog",
|
|
1273
|
+
'404': "OperationLog",
|
|
1274
|
+
}
|
|
1275
|
+
response_data = self.api_client.call_api(
|
|
1276
|
+
*_param,
|
|
1277
|
+
_request_timeout=_request_timeout
|
|
1278
|
+
)
|
|
1279
|
+
response_data.read()
|
|
1280
|
+
return self.api_client.response_deserialize(
|
|
1281
|
+
response_data=response_data,
|
|
1282
|
+
response_types_map=_response_types_map,
|
|
1283
|
+
).data
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
@validate_call
|
|
1287
|
+
def get_all_groups_by_person_id_with_http_info(
|
|
1288
|
+
self,
|
|
1289
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1290
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1291
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
|
|
1292
|
+
size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
|
|
1293
|
+
_request_timeout: Union[
|
|
1294
|
+
None,
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1296
|
+
Tuple[
|
|
1297
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1298
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1299
|
+
]
|
|
1300
|
+
] = None,
|
|
1301
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1302
|
+
_content_type: Optional[StrictStr] = None,
|
|
1303
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1304
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1305
|
+
) -> ApiResponse[GroupPage]:
|
|
1306
|
+
"""Get person groups
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
:param person_id: Person ID. (required)
|
|
1310
|
+
:type person_id: str
|
|
628
1311
|
:param x_request_id: Request header label.
|
|
629
1312
|
:type x_request_id: str
|
|
630
|
-
:param
|
|
631
|
-
:type
|
|
632
|
-
:param
|
|
633
|
-
|
|
634
|
-
data. Default is True.
|
|
635
|
-
:type _preload_content: bool, optional
|
|
1313
|
+
:param page: The page number to get a list of persons or groups.
|
|
1314
|
+
:type page: int
|
|
1315
|
+
:param size: The page size with a list of persons or groups, items.
|
|
1316
|
+
:type size: int
|
|
636
1317
|
:param _request_timeout: timeout setting for this request. If one
|
|
637
1318
|
number provided, it will be total request
|
|
638
1319
|
timeout. It can also be a pair (tuple) of
|
|
639
1320
|
(connection, read) timeouts.
|
|
1321
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1322
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1323
|
+
request; this effectively ignores the
|
|
1324
|
+
authentication in the spec for a single request.
|
|
1325
|
+
:type _request_auth: dict, optional
|
|
1326
|
+
:param _content_type: force content-type for the request.
|
|
1327
|
+
:type _content_type: str, Optional
|
|
1328
|
+
:param _headers: set to override the headers for a single
|
|
1329
|
+
request; this effectively ignores the headers
|
|
1330
|
+
in the spec for a single request.
|
|
1331
|
+
:type _headers: dict, optional
|
|
1332
|
+
:param _host_index: set to override the host_index for a single
|
|
1333
|
+
request; this effectively ignores the host_index
|
|
1334
|
+
in the spec for a single request.
|
|
1335
|
+
:type _host_index: int, optional
|
|
640
1336
|
:return: Returns the result object.
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
1337
|
+
""" # noqa: E501
|
|
1338
|
+
|
|
1339
|
+
_param = self._get_all_groups_by_person_id_serialize(
|
|
1340
|
+
person_id=person_id,
|
|
1341
|
+
x_request_id=x_request_id,
|
|
1342
|
+
page=page,
|
|
1343
|
+
size=size,
|
|
1344
|
+
_request_auth=_request_auth,
|
|
1345
|
+
_content_type=_content_type,
|
|
1346
|
+
_headers=_headers,
|
|
1347
|
+
_host_index=_host_index
|
|
1348
|
+
)
|
|
1349
|
+
|
|
1350
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1351
|
+
'200': "GroupPage",
|
|
1352
|
+
'400': "OperationLog",
|
|
1353
|
+
'404': "OperationLog",
|
|
1354
|
+
}
|
|
1355
|
+
response_data = self.api_client.call_api(
|
|
1356
|
+
*_param,
|
|
1357
|
+
_request_timeout=_request_timeout
|
|
1358
|
+
)
|
|
1359
|
+
response_data.read()
|
|
1360
|
+
return self.api_client.response_deserialize(
|
|
1361
|
+
response_data=response_data,
|
|
1362
|
+
response_types_map=_response_types_map,
|
|
1363
|
+
)
|
|
647
1364
|
|
|
648
|
-
def get_all_groups_by_person_id_with_http_info(self, person_id, **kwargs): # noqa: E501
|
|
649
|
-
"""Get person groups # noqa: E501
|
|
650
1365
|
|
|
651
|
-
|
|
652
|
-
|
|
1366
|
+
@validate_call
|
|
1367
|
+
def get_all_groups_by_person_id_without_preload_content(
|
|
1368
|
+
self,
|
|
1369
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1370
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1371
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
|
|
1372
|
+
size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
|
|
1373
|
+
_request_timeout: Union[
|
|
1374
|
+
None,
|
|
1375
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1376
|
+
Tuple[
|
|
1377
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1378
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1379
|
+
]
|
|
1380
|
+
] = None,
|
|
1381
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1382
|
+
_content_type: Optional[StrictStr] = None,
|
|
1383
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1384
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1385
|
+
) -> RESTResponseType:
|
|
1386
|
+
"""Get person groups
|
|
653
1387
|
|
|
654
|
-
>>> thread = api.get_all_groups_by_person_id_with_http_info(person_id, async_req=True)
|
|
655
|
-
>>> result = thread.get()
|
|
656
1388
|
|
|
657
1389
|
:param person_id: Person ID. (required)
|
|
658
1390
|
:type person_id: str
|
|
1391
|
+
:param x_request_id: Request header label.
|
|
1392
|
+
:type x_request_id: str
|
|
659
1393
|
:param page: The page number to get a list of persons or groups.
|
|
660
1394
|
:type page: int
|
|
661
1395
|
:param size: The page size with a list of persons or groups, items.
|
|
662
1396
|
: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
1397
|
:param _request_timeout: timeout setting for this request. If one
|
|
675
1398
|
number provided, it will be total request
|
|
676
1399
|
timeout. It can also be a pair (tuple) of
|
|
677
1400
|
(connection, read) timeouts.
|
|
1401
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
678
1402
|
:param _request_auth: set to override the auth_settings for an a single
|
|
679
|
-
request; this effectively ignores the
|
|
680
|
-
in the spec for a single request.
|
|
1403
|
+
request; this effectively ignores the
|
|
1404
|
+
authentication in the spec for a single request.
|
|
681
1405
|
:type _request_auth: dict, optional
|
|
1406
|
+
:param _content_type: force content-type for the request.
|
|
1407
|
+
:type _content_type: str, Optional
|
|
1408
|
+
:param _headers: set to override the headers for a single
|
|
1409
|
+
request; this effectively ignores the headers
|
|
1410
|
+
in the spec for a single request.
|
|
1411
|
+
:type _headers: dict, optional
|
|
1412
|
+
:param _host_index: set to override the host_index for a single
|
|
1413
|
+
request; this effectively ignores the host_index
|
|
1414
|
+
in the spec for a single request.
|
|
1415
|
+
:type _host_index: int, optional
|
|
682
1416
|
:return: Returns the result object.
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
1417
|
+
""" # noqa: E501
|
|
1418
|
+
|
|
1419
|
+
_param = self._get_all_groups_by_person_id_serialize(
|
|
1420
|
+
person_id=person_id,
|
|
1421
|
+
x_request_id=x_request_id,
|
|
1422
|
+
page=page,
|
|
1423
|
+
size=size,
|
|
1424
|
+
_request_auth=_request_auth,
|
|
1425
|
+
_content_type=_content_type,
|
|
1426
|
+
_headers=_headers,
|
|
1427
|
+
_host_index=_host_index
|
|
1428
|
+
)
|
|
1429
|
+
|
|
1430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1431
|
+
'200': "GroupPage",
|
|
1432
|
+
'400': "OperationLog",
|
|
1433
|
+
'404': "OperationLog",
|
|
1434
|
+
}
|
|
1435
|
+
response_data = self.api_client.call_api(
|
|
1436
|
+
*_param,
|
|
1437
|
+
_request_timeout=_request_timeout
|
|
1438
|
+
)
|
|
1439
|
+
return response_data.response
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
def _get_all_groups_by_person_id_serialize(
|
|
1443
|
+
self,
|
|
1444
|
+
person_id,
|
|
1445
|
+
x_request_id,
|
|
1446
|
+
page,
|
|
1447
|
+
size,
|
|
1448
|
+
_request_auth,
|
|
1449
|
+
_content_type,
|
|
1450
|
+
_headers,
|
|
1451
|
+
_host_index,
|
|
1452
|
+
) -> RequestSerialized:
|
|
1453
|
+
|
|
1454
|
+
_host = None
|
|
1455
|
+
|
|
1456
|
+
_collection_formats: Dict[str, str] = {
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
_path_params: Dict[str, str] = {}
|
|
1460
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1461
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1462
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1463
|
+
_files: Dict[
|
|
1464
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1465
|
+
] = {}
|
|
1466
|
+
_body_params: Optional[bytes] = None
|
|
1467
|
+
|
|
1468
|
+
# process the path parameters
|
|
1469
|
+
if person_id is not None:
|
|
1470
|
+
_path_params['personId'] = person_id
|
|
1471
|
+
# process the query parameters
|
|
1472
|
+
if page is not None:
|
|
1473
|
+
|
|
1474
|
+
_query_params.append(('page', page))
|
|
1475
|
+
|
|
1476
|
+
if size is not None:
|
|
1477
|
+
|
|
1478
|
+
_query_params.append(('size', size))
|
|
1479
|
+
|
|
1480
|
+
# process the header parameters
|
|
1481
|
+
if x_request_id is not None:
|
|
1482
|
+
_header_params['X-RequestID'] = x_request_id
|
|
1483
|
+
# process the form parameters
|
|
1484
|
+
# process the body parameter
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
# set the HTTP header `Accept`
|
|
1488
|
+
if 'Accept' not in _header_params:
|
|
1489
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1490
|
+
[
|
|
1491
|
+
'application/json'
|
|
1492
|
+
]
|
|
1493
|
+
)
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
# authentication setting
|
|
1497
|
+
_auth_settings: List[str] = [
|
|
695
1498
|
]
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
1499
|
+
|
|
1500
|
+
return self.api_client.param_serialize(
|
|
1501
|
+
method='GET',
|
|
1502
|
+
resource_path='/api/persons/{personId}/groups',
|
|
1503
|
+
path_params=_path_params,
|
|
1504
|
+
query_params=_query_params,
|
|
1505
|
+
header_params=_header_params,
|
|
1506
|
+
body=_body_params,
|
|
1507
|
+
post_params=_form_params,
|
|
1508
|
+
files=_files,
|
|
1509
|
+
auth_settings=_auth_settings,
|
|
1510
|
+
collection_formats=_collection_formats,
|
|
1511
|
+
_host=_host,
|
|
1512
|
+
_request_auth=_request_auth
|
|
704
1513
|
)
|
|
705
1514
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
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()
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
@validate_call
|
|
1519
|
+
def get_all_images_by_person_id(
|
|
1520
|
+
self,
|
|
1521
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1522
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1523
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
|
|
1524
|
+
size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
|
|
1525
|
+
_request_timeout: Union[
|
|
1526
|
+
None,
|
|
1527
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1528
|
+
Tuple[
|
|
1529
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1530
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1531
|
+
]
|
|
1532
|
+
] = None,
|
|
1533
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1534
|
+
_content_type: Optional[StrictStr] = None,
|
|
1535
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1536
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1537
|
+
) -> ImagePage:
|
|
1538
|
+
"""Get person images
|
|
1539
|
+
|
|
771
1540
|
|
|
772
1541
|
:param person_id: Person ID. (required)
|
|
773
1542
|
:type person_id: str
|
|
1543
|
+
:param x_request_id: Request header label.
|
|
1544
|
+
:type x_request_id: str
|
|
774
1545
|
:param page: The page number to get a list of persons or groups.
|
|
775
1546
|
:type page: int
|
|
776
1547
|
:param size: The page size with a list of persons or groups, items.
|
|
777
1548
|
:type size: int
|
|
1549
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1550
|
+
number provided, it will be total request
|
|
1551
|
+
timeout. It can also be a pair (tuple) of
|
|
1552
|
+
(connection, read) timeouts.
|
|
1553
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1554
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1555
|
+
request; this effectively ignores the
|
|
1556
|
+
authentication in the spec for a single request.
|
|
1557
|
+
:type _request_auth: dict, optional
|
|
1558
|
+
:param _content_type: force content-type for the request.
|
|
1559
|
+
:type _content_type: str, Optional
|
|
1560
|
+
:param _headers: set to override the headers for a single
|
|
1561
|
+
request; this effectively ignores the headers
|
|
1562
|
+
in the spec for a single request.
|
|
1563
|
+
:type _headers: dict, optional
|
|
1564
|
+
:param _host_index: set to override the host_index for a single
|
|
1565
|
+
request; this effectively ignores the host_index
|
|
1566
|
+
in the spec for a single request.
|
|
1567
|
+
:type _host_index: int, optional
|
|
1568
|
+
:return: Returns the result object.
|
|
1569
|
+
""" # noqa: E501
|
|
1570
|
+
|
|
1571
|
+
_param = self._get_all_images_by_person_id_serialize(
|
|
1572
|
+
person_id=person_id,
|
|
1573
|
+
x_request_id=x_request_id,
|
|
1574
|
+
page=page,
|
|
1575
|
+
size=size,
|
|
1576
|
+
_request_auth=_request_auth,
|
|
1577
|
+
_content_type=_content_type,
|
|
1578
|
+
_headers=_headers,
|
|
1579
|
+
_host_index=_host_index
|
|
1580
|
+
)
|
|
1581
|
+
|
|
1582
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1583
|
+
'200': "ImagePage",
|
|
1584
|
+
'400': "OperationLog",
|
|
1585
|
+
'404': "OperationLog",
|
|
1586
|
+
}
|
|
1587
|
+
response_data = self.api_client.call_api(
|
|
1588
|
+
*_param,
|
|
1589
|
+
_request_timeout=_request_timeout
|
|
1590
|
+
)
|
|
1591
|
+
response_data.read()
|
|
1592
|
+
return self.api_client.response_deserialize(
|
|
1593
|
+
response_data=response_data,
|
|
1594
|
+
response_types_map=_response_types_map,
|
|
1595
|
+
).data
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
@validate_call
|
|
1599
|
+
def get_all_images_by_person_id_with_http_info(
|
|
1600
|
+
self,
|
|
1601
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1602
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1603
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
|
|
1604
|
+
size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
|
|
1605
|
+
_request_timeout: Union[
|
|
1606
|
+
None,
|
|
1607
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1608
|
+
Tuple[
|
|
1609
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1610
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1611
|
+
]
|
|
1612
|
+
] = None,
|
|
1613
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1614
|
+
_content_type: Optional[StrictStr] = None,
|
|
1615
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1616
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1617
|
+
) -> ApiResponse[ImagePage]:
|
|
1618
|
+
"""Get person images
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
:param person_id: Person ID. (required)
|
|
1622
|
+
:type person_id: str
|
|
778
1623
|
:param x_request_id: Request header label.
|
|
779
1624
|
:type x_request_id: str
|
|
780
|
-
:param
|
|
781
|
-
:type
|
|
782
|
-
:param
|
|
783
|
-
|
|
784
|
-
data. Default is True.
|
|
785
|
-
:type _preload_content: bool, optional
|
|
1625
|
+
:param page: The page number to get a list of persons or groups.
|
|
1626
|
+
:type page: int
|
|
1627
|
+
:param size: The page size with a list of persons or groups, items.
|
|
1628
|
+
:type size: int
|
|
786
1629
|
:param _request_timeout: timeout setting for this request. If one
|
|
787
1630
|
number provided, it will be total request
|
|
788
1631
|
timeout. It can also be a pair (tuple) of
|
|
789
1632
|
(connection, read) timeouts.
|
|
1633
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1634
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1635
|
+
request; this effectively ignores the
|
|
1636
|
+
authentication in the spec for a single request.
|
|
1637
|
+
:type _request_auth: dict, optional
|
|
1638
|
+
:param _content_type: force content-type for the request.
|
|
1639
|
+
:type _content_type: str, Optional
|
|
1640
|
+
:param _headers: set to override the headers for a single
|
|
1641
|
+
request; this effectively ignores the headers
|
|
1642
|
+
in the spec for a single request.
|
|
1643
|
+
:type _headers: dict, optional
|
|
1644
|
+
:param _host_index: set to override the host_index for a single
|
|
1645
|
+
request; this effectively ignores the host_index
|
|
1646
|
+
in the spec for a single request.
|
|
1647
|
+
:type _host_index: int, optional
|
|
790
1648
|
:return: Returns the result object.
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
1649
|
+
""" # noqa: E501
|
|
1650
|
+
|
|
1651
|
+
_param = self._get_all_images_by_person_id_serialize(
|
|
1652
|
+
person_id=person_id,
|
|
1653
|
+
x_request_id=x_request_id,
|
|
1654
|
+
page=page,
|
|
1655
|
+
size=size,
|
|
1656
|
+
_request_auth=_request_auth,
|
|
1657
|
+
_content_type=_content_type,
|
|
1658
|
+
_headers=_headers,
|
|
1659
|
+
_host_index=_host_index
|
|
1660
|
+
)
|
|
1661
|
+
|
|
1662
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1663
|
+
'200': "ImagePage",
|
|
1664
|
+
'400': "OperationLog",
|
|
1665
|
+
'404': "OperationLog",
|
|
1666
|
+
}
|
|
1667
|
+
response_data = self.api_client.call_api(
|
|
1668
|
+
*_param,
|
|
1669
|
+
_request_timeout=_request_timeout
|
|
1670
|
+
)
|
|
1671
|
+
response_data.read()
|
|
1672
|
+
return self.api_client.response_deserialize(
|
|
1673
|
+
response_data=response_data,
|
|
1674
|
+
response_types_map=_response_types_map,
|
|
1675
|
+
)
|
|
797
1676
|
|
|
798
|
-
def get_all_images_by_person_id_with_http_info(self, person_id, **kwargs): # noqa: E501
|
|
799
|
-
"""Get person images # noqa: E501
|
|
800
1677
|
|
|
801
|
-
|
|
802
|
-
|
|
1678
|
+
@validate_call
|
|
1679
|
+
def get_all_images_by_person_id_without_preload_content(
|
|
1680
|
+
self,
|
|
1681
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1682
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1683
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number to get a list of persons or groups.")] = None,
|
|
1684
|
+
size: Annotated[Optional[StrictInt], Field(description="The page size with a list of persons or groups, items.")] = None,
|
|
1685
|
+
_request_timeout: Union[
|
|
1686
|
+
None,
|
|
1687
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1688
|
+
Tuple[
|
|
1689
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1690
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1691
|
+
]
|
|
1692
|
+
] = None,
|
|
1693
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1694
|
+
_content_type: Optional[StrictStr] = None,
|
|
1695
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1696
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1697
|
+
) -> RESTResponseType:
|
|
1698
|
+
"""Get person images
|
|
803
1699
|
|
|
804
|
-
>>> thread = api.get_all_images_by_person_id_with_http_info(person_id, async_req=True)
|
|
805
|
-
>>> result = thread.get()
|
|
806
1700
|
|
|
807
1701
|
:param person_id: Person ID. (required)
|
|
808
1702
|
:type person_id: str
|
|
1703
|
+
:param x_request_id: Request header label.
|
|
1704
|
+
:type x_request_id: str
|
|
809
1705
|
:param page: The page number to get a list of persons or groups.
|
|
810
1706
|
:type page: int
|
|
811
1707
|
:param size: The page size with a list of persons or groups, items.
|
|
812
1708
|
: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
1709
|
:param _request_timeout: timeout setting for this request. If one
|
|
825
1710
|
number provided, it will be total request
|
|
826
1711
|
timeout. It can also be a pair (tuple) of
|
|
827
1712
|
(connection, read) timeouts.
|
|
1713
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
828
1714
|
:param _request_auth: set to override the auth_settings for an a single
|
|
829
|
-
request; this effectively ignores the
|
|
830
|
-
in the spec for a single request.
|
|
1715
|
+
request; this effectively ignores the
|
|
1716
|
+
authentication in the spec for a single request.
|
|
831
1717
|
:type _request_auth: dict, optional
|
|
1718
|
+
:param _content_type: force content-type for the request.
|
|
1719
|
+
:type _content_type: str, Optional
|
|
1720
|
+
:param _headers: set to override the headers for a single
|
|
1721
|
+
request; this effectively ignores the headers
|
|
1722
|
+
in the spec for a single request.
|
|
1723
|
+
:type _headers: dict, optional
|
|
1724
|
+
:param _host_index: set to override the host_index for a single
|
|
1725
|
+
request; this effectively ignores the host_index
|
|
1726
|
+
in the spec for a single request.
|
|
1727
|
+
:type _host_index: int, optional
|
|
832
1728
|
:return: Returns the result object.
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
1729
|
+
""" # noqa: E501
|
|
1730
|
+
|
|
1731
|
+
_param = self._get_all_images_by_person_id_serialize(
|
|
1732
|
+
person_id=person_id,
|
|
1733
|
+
x_request_id=x_request_id,
|
|
1734
|
+
page=page,
|
|
1735
|
+
size=size,
|
|
1736
|
+
_request_auth=_request_auth,
|
|
1737
|
+
_content_type=_content_type,
|
|
1738
|
+
_headers=_headers,
|
|
1739
|
+
_host_index=_host_index
|
|
1740
|
+
)
|
|
1741
|
+
|
|
1742
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1743
|
+
'200': "ImagePage",
|
|
1744
|
+
'400': "OperationLog",
|
|
1745
|
+
'404': "OperationLog",
|
|
1746
|
+
}
|
|
1747
|
+
response_data = self.api_client.call_api(
|
|
1748
|
+
*_param,
|
|
1749
|
+
_request_timeout=_request_timeout
|
|
1750
|
+
)
|
|
1751
|
+
return response_data.response
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
def _get_all_images_by_person_id_serialize(
|
|
1755
|
+
self,
|
|
1756
|
+
person_id,
|
|
1757
|
+
x_request_id,
|
|
1758
|
+
page,
|
|
1759
|
+
size,
|
|
1760
|
+
_request_auth,
|
|
1761
|
+
_content_type,
|
|
1762
|
+
_headers,
|
|
1763
|
+
_host_index,
|
|
1764
|
+
) -> RequestSerialized:
|
|
1765
|
+
|
|
1766
|
+
_host = None
|
|
1767
|
+
|
|
1768
|
+
_collection_formats: Dict[str, str] = {
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
_path_params: Dict[str, str] = {}
|
|
1772
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1773
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1774
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1775
|
+
_files: Dict[
|
|
1776
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1777
|
+
] = {}
|
|
1778
|
+
_body_params: Optional[bytes] = None
|
|
1779
|
+
|
|
1780
|
+
# process the path parameters
|
|
1781
|
+
if person_id is not None:
|
|
1782
|
+
_path_params['personId'] = person_id
|
|
1783
|
+
# process the query parameters
|
|
1784
|
+
if page is not None:
|
|
1785
|
+
|
|
1786
|
+
_query_params.append(('page', page))
|
|
1787
|
+
|
|
1788
|
+
if size is not None:
|
|
1789
|
+
|
|
1790
|
+
_query_params.append(('size', size))
|
|
1791
|
+
|
|
1792
|
+
# process the header parameters
|
|
1793
|
+
if x_request_id is not None:
|
|
1794
|
+
_header_params['X-RequestID'] = x_request_id
|
|
1795
|
+
# process the form parameters
|
|
1796
|
+
# process the body parameter
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
# set the HTTP header `Accept`
|
|
1800
|
+
if 'Accept' not in _header_params:
|
|
1801
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1802
|
+
[
|
|
1803
|
+
'application/json'
|
|
1804
|
+
]
|
|
1805
|
+
)
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
# authentication setting
|
|
1809
|
+
_auth_settings: List[str] = [
|
|
845
1810
|
]
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1811
|
+
|
|
1812
|
+
return self.api_client.param_serialize(
|
|
1813
|
+
method='GET',
|
|
1814
|
+
resource_path='/api/persons/{personId}/images',
|
|
1815
|
+
path_params=_path_params,
|
|
1816
|
+
query_params=_query_params,
|
|
1817
|
+
header_params=_header_params,
|
|
1818
|
+
body=_body_params,
|
|
1819
|
+
post_params=_form_params,
|
|
1820
|
+
files=_files,
|
|
1821
|
+
auth_settings=_auth_settings,
|
|
1822
|
+
collection_formats=_collection_formats,
|
|
1823
|
+
_host=_host,
|
|
1824
|
+
_request_auth=_request_auth
|
|
854
1825
|
)
|
|
855
1826
|
|
|
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
1827
|
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
@validate_call
|
|
1831
|
+
def get_image_of_person(
|
|
1832
|
+
self,
|
|
1833
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1834
|
+
image_id: Annotated[StrictStr, Field(description="Image ID.")],
|
|
1835
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1836
|
+
_request_timeout: Union[
|
|
1837
|
+
None,
|
|
1838
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1839
|
+
Tuple[
|
|
1840
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1841
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1842
|
+
]
|
|
1843
|
+
] = None,
|
|
1844
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1845
|
+
_content_type: Optional[StrictStr] = None,
|
|
1846
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1847
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1848
|
+
) -> bytearray:
|
|
1849
|
+
"""Get person image by id
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
:param person_id: Person ID. (required)
|
|
1853
|
+
:type person_id: str
|
|
922
1854
|
:param image_id: Image ID. (required)
|
|
923
1855
|
:type image_id: str
|
|
1856
|
+
:param x_request_id: Request header label.
|
|
1857
|
+
:type x_request_id: str
|
|
1858
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1859
|
+
number provided, it will be total request
|
|
1860
|
+
timeout. It can also be a pair (tuple) of
|
|
1861
|
+
(connection, read) timeouts.
|
|
1862
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1863
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1864
|
+
request; this effectively ignores the
|
|
1865
|
+
authentication in the spec for a single request.
|
|
1866
|
+
:type _request_auth: dict, optional
|
|
1867
|
+
:param _content_type: force content-type for the request.
|
|
1868
|
+
:type _content_type: str, Optional
|
|
1869
|
+
:param _headers: set to override the headers for a single
|
|
1870
|
+
request; this effectively ignores the headers
|
|
1871
|
+
in the spec for a single request.
|
|
1872
|
+
:type _headers: dict, optional
|
|
1873
|
+
:param _host_index: set to override the host_index for a single
|
|
1874
|
+
request; this effectively ignores the host_index
|
|
1875
|
+
in the spec for a single request.
|
|
1876
|
+
:type _host_index: int, optional
|
|
1877
|
+
:return: Returns the result object.
|
|
1878
|
+
""" # noqa: E501
|
|
1879
|
+
|
|
1880
|
+
_param = self._get_image_of_person_serialize(
|
|
1881
|
+
person_id=person_id,
|
|
1882
|
+
image_id=image_id,
|
|
1883
|
+
x_request_id=x_request_id,
|
|
1884
|
+
_request_auth=_request_auth,
|
|
1885
|
+
_content_type=_content_type,
|
|
1886
|
+
_headers=_headers,
|
|
1887
|
+
_host_index=_host_index
|
|
1888
|
+
)
|
|
1889
|
+
|
|
1890
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1891
|
+
'404': "OperationLog",
|
|
1892
|
+
'400': "OperationLog",
|
|
1893
|
+
'200': "bytearray",
|
|
1894
|
+
}
|
|
1895
|
+
response_data = self.api_client.call_api(
|
|
1896
|
+
*_param,
|
|
1897
|
+
_request_timeout=_request_timeout
|
|
1898
|
+
)
|
|
1899
|
+
response_data.read()
|
|
1900
|
+
return self.api_client.response_deserialize(
|
|
1901
|
+
response_data=response_data,
|
|
1902
|
+
response_types_map=_response_types_map,
|
|
1903
|
+
).data
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
@validate_call
|
|
1907
|
+
def get_image_of_person_with_http_info(
|
|
1908
|
+
self,
|
|
1909
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1910
|
+
image_id: Annotated[StrictStr, Field(description="Image ID.")],
|
|
1911
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1912
|
+
_request_timeout: Union[
|
|
1913
|
+
None,
|
|
1914
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1915
|
+
Tuple[
|
|
1916
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1917
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1918
|
+
]
|
|
1919
|
+
] = None,
|
|
1920
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1921
|
+
_content_type: Optional[StrictStr] = None,
|
|
1922
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1923
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1924
|
+
) -> ApiResponse[bytearray]:
|
|
1925
|
+
"""Get person image by id
|
|
1926
|
+
|
|
1927
|
+
|
|
924
1928
|
:param person_id: Person ID. (required)
|
|
925
1929
|
:type person_id: str
|
|
1930
|
+
:param image_id: Image ID. (required)
|
|
1931
|
+
:type image_id: str
|
|
926
1932
|
:param x_request_id: Request header label.
|
|
927
1933
|
: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
1934
|
:param _request_timeout: timeout setting for this request. If one
|
|
935
1935
|
number provided, it will be total request
|
|
936
1936
|
timeout. It can also be a pair (tuple) of
|
|
937
1937
|
(connection, read) timeouts.
|
|
1938
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1939
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1940
|
+
request; this effectively ignores the
|
|
1941
|
+
authentication in the spec for a single request.
|
|
1942
|
+
:type _request_auth: dict, optional
|
|
1943
|
+
:param _content_type: force content-type for the request.
|
|
1944
|
+
:type _content_type: str, Optional
|
|
1945
|
+
:param _headers: set to override the headers for a single
|
|
1946
|
+
request; this effectively ignores the headers
|
|
1947
|
+
in the spec for a single request.
|
|
1948
|
+
:type _headers: dict, optional
|
|
1949
|
+
:param _host_index: set to override the host_index for a single
|
|
1950
|
+
request; this effectively ignores the host_index
|
|
1951
|
+
in the spec for a single request.
|
|
1952
|
+
:type _host_index: int, optional
|
|
938
1953
|
:return: Returns the result object.
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
1954
|
+
""" # noqa: E501
|
|
1955
|
+
|
|
1956
|
+
_param = self._get_image_of_person_serialize(
|
|
1957
|
+
person_id=person_id,
|
|
1958
|
+
image_id=image_id,
|
|
1959
|
+
x_request_id=x_request_id,
|
|
1960
|
+
_request_auth=_request_auth,
|
|
1961
|
+
_content_type=_content_type,
|
|
1962
|
+
_headers=_headers,
|
|
1963
|
+
_host_index=_host_index
|
|
1964
|
+
)
|
|
945
1965
|
|
|
946
|
-
|
|
947
|
-
|
|
1966
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1967
|
+
'404': "OperationLog",
|
|
1968
|
+
'400': "OperationLog",
|
|
1969
|
+
'200': "bytearray",
|
|
1970
|
+
}
|
|
1971
|
+
response_data = self.api_client.call_api(
|
|
1972
|
+
*_param,
|
|
1973
|
+
_request_timeout=_request_timeout
|
|
1974
|
+
)
|
|
1975
|
+
response_data.read()
|
|
1976
|
+
return self.api_client.response_deserialize(
|
|
1977
|
+
response_data=response_data,
|
|
1978
|
+
response_types_map=_response_types_map,
|
|
1979
|
+
)
|
|
948
1980
|
|
|
949
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
950
|
-
asynchronous HTTP request, please pass async_req=True
|
|
951
1981
|
|
|
952
|
-
|
|
953
|
-
|
|
1982
|
+
@validate_call
|
|
1983
|
+
def get_image_of_person_without_preload_content(
|
|
1984
|
+
self,
|
|
1985
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
1986
|
+
image_id: Annotated[StrictStr, Field(description="Image ID.")],
|
|
1987
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
1988
|
+
_request_timeout: Union[
|
|
1989
|
+
None,
|
|
1990
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1991
|
+
Tuple[
|
|
1992
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1993
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1994
|
+
]
|
|
1995
|
+
] = None,
|
|
1996
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1997
|
+
_content_type: Optional[StrictStr] = None,
|
|
1998
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1999
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2000
|
+
) -> RESTResponseType:
|
|
2001
|
+
"""Get person image by id
|
|
2002
|
+
|
|
954
2003
|
|
|
955
|
-
:param image_id: Image ID. (required)
|
|
956
|
-
:type image_id: str
|
|
957
2004
|
:param person_id: Person ID. (required)
|
|
958
2005
|
:type person_id: str
|
|
2006
|
+
:param image_id: Image ID. (required)
|
|
2007
|
+
:type image_id: str
|
|
959
2008
|
:param x_request_id: Request header label.
|
|
960
2009
|
: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
2010
|
:param _request_timeout: timeout setting for this request. If one
|
|
971
2011
|
number provided, it will be total request
|
|
972
2012
|
timeout. It can also be a pair (tuple) of
|
|
973
2013
|
(connection, read) timeouts.
|
|
2014
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
974
2015
|
:param _request_auth: set to override the auth_settings for an a single
|
|
975
|
-
request; this effectively ignores the
|
|
976
|
-
in the spec for a single request.
|
|
2016
|
+
request; this effectively ignores the
|
|
2017
|
+
authentication in the spec for a single request.
|
|
977
2018
|
:type _request_auth: dict, optional
|
|
2019
|
+
:param _content_type: force content-type for the request.
|
|
2020
|
+
:type _content_type: str, Optional
|
|
2021
|
+
:param _headers: set to override the headers for a single
|
|
2022
|
+
request; this effectively ignores the headers
|
|
2023
|
+
in the spec for a single request.
|
|
2024
|
+
:type _headers: dict, optional
|
|
2025
|
+
:param _host_index: set to override the host_index for a single
|
|
2026
|
+
request; this effectively ignores the host_index
|
|
2027
|
+
in the spec for a single request.
|
|
2028
|
+
:type _host_index: int, optional
|
|
978
2029
|
:return: Returns the result object.
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
2030
|
+
""" # noqa: E501
|
|
2031
|
+
|
|
2032
|
+
_param = self._get_image_of_person_serialize(
|
|
2033
|
+
person_id=person_id,
|
|
2034
|
+
image_id=image_id,
|
|
2035
|
+
x_request_id=x_request_id,
|
|
2036
|
+
_request_auth=_request_auth,
|
|
2037
|
+
_content_type=_content_type,
|
|
2038
|
+
_headers=_headers,
|
|
2039
|
+
_host_index=_host_index
|
|
2040
|
+
)
|
|
985
2041
|
|
|
986
|
-
|
|
987
|
-
'
|
|
988
|
-
'
|
|
989
|
-
'
|
|
2042
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2043
|
+
'404': "OperationLog",
|
|
2044
|
+
'400': "OperationLog",
|
|
2045
|
+
'200': "bytearray",
|
|
2046
|
+
}
|
|
2047
|
+
response_data = self.api_client.call_api(
|
|
2048
|
+
*_param,
|
|
2049
|
+
_request_timeout=_request_timeout
|
|
2050
|
+
)
|
|
2051
|
+
return response_data.response
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
def _get_image_of_person_serialize(
|
|
2055
|
+
self,
|
|
2056
|
+
person_id,
|
|
2057
|
+
image_id,
|
|
2058
|
+
x_request_id,
|
|
2059
|
+
_request_auth,
|
|
2060
|
+
_content_type,
|
|
2061
|
+
_headers,
|
|
2062
|
+
_host_index,
|
|
2063
|
+
) -> RequestSerialized:
|
|
2064
|
+
|
|
2065
|
+
_host = None
|
|
2066
|
+
|
|
2067
|
+
_collection_formats: Dict[str, str] = {
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
_path_params: Dict[str, str] = {}
|
|
2071
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2072
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2073
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2074
|
+
_files: Dict[
|
|
2075
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2076
|
+
] = {}
|
|
2077
|
+
_body_params: Optional[bytes] = None
|
|
2078
|
+
|
|
2079
|
+
# process the path parameters
|
|
2080
|
+
if person_id is not None:
|
|
2081
|
+
_path_params['personId'] = person_id
|
|
2082
|
+
if image_id is not None:
|
|
2083
|
+
_path_params['imageId'] = image_id
|
|
2084
|
+
# process the query parameters
|
|
2085
|
+
# process the header parameters
|
|
2086
|
+
if x_request_id is not None:
|
|
2087
|
+
_header_params['X-RequestID'] = x_request_id
|
|
2088
|
+
# process the form parameters
|
|
2089
|
+
# process the body parameter
|
|
2090
|
+
|
|
2091
|
+
|
|
2092
|
+
# set the HTTP header `Accept`
|
|
2093
|
+
if 'Accept' not in _header_params:
|
|
2094
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2095
|
+
[
|
|
2096
|
+
'application/json',
|
|
2097
|
+
'image/*'
|
|
2098
|
+
]
|
|
2099
|
+
)
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
# authentication setting
|
|
2103
|
+
_auth_settings: List[str] = [
|
|
990
2104
|
]
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
2105
|
+
|
|
2106
|
+
return self.api_client.param_serialize(
|
|
2107
|
+
method='GET',
|
|
2108
|
+
resource_path='/api/persons/{personId}/images/{imageId}',
|
|
2109
|
+
path_params=_path_params,
|
|
2110
|
+
query_params=_query_params,
|
|
2111
|
+
header_params=_header_params,
|
|
2112
|
+
body=_body_params,
|
|
2113
|
+
post_params=_form_params,
|
|
2114
|
+
files=_files,
|
|
2115
|
+
auth_settings=_auth_settings,
|
|
2116
|
+
collection_formats=_collection_formats,
|
|
2117
|
+
_host=_host,
|
|
2118
|
+
_request_auth=_request_auth
|
|
2119
|
+
)
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
@validate_call
|
|
2125
|
+
def get_person(
|
|
2126
|
+
self,
|
|
2127
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
2128
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
2129
|
+
_request_timeout: Union[
|
|
2130
|
+
None,
|
|
2131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2132
|
+
Tuple[
|
|
2133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2134
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
998
2135
|
]
|
|
2136
|
+
] = None,
|
|
2137
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2138
|
+
_content_type: Optional[StrictStr] = None,
|
|
2139
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2140
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2141
|
+
) -> Person:
|
|
2142
|
+
"""Get person
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
:param person_id: Person ID. (required)
|
|
2146
|
+
:type person_id: str
|
|
2147
|
+
:param x_request_id: Request header label.
|
|
2148
|
+
:type x_request_id: str
|
|
2149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2150
|
+
number provided, it will be total request
|
|
2151
|
+
timeout. It can also be a pair (tuple) of
|
|
2152
|
+
(connection, read) timeouts.
|
|
2153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2155
|
+
request; this effectively ignores the
|
|
2156
|
+
authentication in the spec for a single request.
|
|
2157
|
+
:type _request_auth: dict, optional
|
|
2158
|
+
:param _content_type: force content-type for the request.
|
|
2159
|
+
:type _content_type: str, Optional
|
|
2160
|
+
:param _headers: set to override the headers for a single
|
|
2161
|
+
request; this effectively ignores the headers
|
|
2162
|
+
in the spec for a single request.
|
|
2163
|
+
:type _headers: dict, optional
|
|
2164
|
+
:param _host_index: set to override the host_index for a single
|
|
2165
|
+
request; this effectively ignores the host_index
|
|
2166
|
+
in the spec for a single request.
|
|
2167
|
+
:type _host_index: int, optional
|
|
2168
|
+
:return: Returns the result object.
|
|
2169
|
+
""" # noqa: E501
|
|
2170
|
+
|
|
2171
|
+
_param = self._get_person_serialize(
|
|
2172
|
+
person_id=person_id,
|
|
2173
|
+
x_request_id=x_request_id,
|
|
2174
|
+
_request_auth=_request_auth,
|
|
2175
|
+
_content_type=_content_type,
|
|
2176
|
+
_headers=_headers,
|
|
2177
|
+
_host_index=_host_index
|
|
999
2178
|
)
|
|
1000
2179
|
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
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()
|
|
2180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2181
|
+
'200': "Person",
|
|
2182
|
+
'400': "OperationLog",
|
|
2183
|
+
'404': "OperationLog",
|
|
2184
|
+
}
|
|
2185
|
+
response_data = self.api_client.call_api(
|
|
2186
|
+
*_param,
|
|
2187
|
+
_request_timeout=_request_timeout
|
|
2188
|
+
)
|
|
2189
|
+
response_data.read()
|
|
2190
|
+
return self.api_client.response_deserialize(
|
|
2191
|
+
response_data=response_data,
|
|
2192
|
+
response_types_map=_response_types_map,
|
|
2193
|
+
).data
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
@validate_call
|
|
2197
|
+
def get_person_with_http_info(
|
|
2198
|
+
self,
|
|
2199
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
2200
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
2201
|
+
_request_timeout: Union[
|
|
2202
|
+
None,
|
|
2203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2204
|
+
Tuple[
|
|
2205
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2206
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2207
|
+
]
|
|
2208
|
+
] = None,
|
|
2209
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2210
|
+
_content_type: Optional[StrictStr] = None,
|
|
2211
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2212
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2213
|
+
) -> ApiResponse[Person]:
|
|
2214
|
+
"""Get person
|
|
2215
|
+
|
|
1068
2216
|
|
|
1069
2217
|
:param person_id: Person ID. (required)
|
|
1070
2218
|
:type person_id: str
|
|
1071
2219
|
:param x_request_id: Request header label.
|
|
1072
2220
|
: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
2221
|
:param _request_timeout: timeout setting for this request. If one
|
|
1080
2222
|
number provided, it will be total request
|
|
1081
2223
|
timeout. It can also be a pair (tuple) of
|
|
1082
2224
|
(connection, read) timeouts.
|
|
2225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2226
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2227
|
+
request; this effectively ignores the
|
|
2228
|
+
authentication in the spec for a single request.
|
|
2229
|
+
:type _request_auth: dict, optional
|
|
2230
|
+
:param _content_type: force content-type for the request.
|
|
2231
|
+
:type _content_type: str, Optional
|
|
2232
|
+
:param _headers: set to override the headers for a single
|
|
2233
|
+
request; this effectively ignores the headers
|
|
2234
|
+
in the spec for a single request.
|
|
2235
|
+
:type _headers: dict, optional
|
|
2236
|
+
:param _host_index: set to override the host_index for a single
|
|
2237
|
+
request; this effectively ignores the host_index
|
|
2238
|
+
in the spec for a single request.
|
|
2239
|
+
:type _host_index: int, optional
|
|
1083
2240
|
:return: Returns the result object.
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
2241
|
+
""" # noqa: E501
|
|
2242
|
+
|
|
2243
|
+
_param = self._get_person_serialize(
|
|
2244
|
+
person_id=person_id,
|
|
2245
|
+
x_request_id=x_request_id,
|
|
2246
|
+
_request_auth=_request_auth,
|
|
2247
|
+
_content_type=_content_type,
|
|
2248
|
+
_headers=_headers,
|
|
2249
|
+
_host_index=_host_index
|
|
2250
|
+
)
|
|
2251
|
+
|
|
2252
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2253
|
+
'200': "Person",
|
|
2254
|
+
'400': "OperationLog",
|
|
2255
|
+
'404': "OperationLog",
|
|
2256
|
+
}
|
|
2257
|
+
response_data = self.api_client.call_api(
|
|
2258
|
+
*_param,
|
|
2259
|
+
_request_timeout=_request_timeout
|
|
2260
|
+
)
|
|
2261
|
+
response_data.read()
|
|
2262
|
+
return self.api_client.response_deserialize(
|
|
2263
|
+
response_data=response_data,
|
|
2264
|
+
response_types_map=_response_types_map,
|
|
2265
|
+
)
|
|
1090
2266
|
|
|
1091
|
-
def get_person_with_http_info(self, person_id, **kwargs): # noqa: E501
|
|
1092
|
-
"""Get person # noqa: E501
|
|
1093
2267
|
|
|
1094
|
-
|
|
1095
|
-
|
|
2268
|
+
@validate_call
|
|
2269
|
+
def get_person_without_preload_content(
|
|
2270
|
+
self,
|
|
2271
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
2272
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
2273
|
+
_request_timeout: Union[
|
|
2274
|
+
None,
|
|
2275
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2276
|
+
Tuple[
|
|
2277
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2278
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2279
|
+
]
|
|
2280
|
+
] = None,
|
|
2281
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2282
|
+
_content_type: Optional[StrictStr] = None,
|
|
2283
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2284
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2285
|
+
) -> RESTResponseType:
|
|
2286
|
+
"""Get person
|
|
1096
2287
|
|
|
1097
|
-
>>> thread = api.get_person_with_http_info(person_id, async_req=True)
|
|
1098
|
-
>>> result = thread.get()
|
|
1099
2288
|
|
|
1100
2289
|
:param person_id: Person ID. (required)
|
|
1101
2290
|
:type person_id: str
|
|
1102
2291
|
:param x_request_id: Request header label.
|
|
1103
2292
|
: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
2293
|
:param _request_timeout: timeout setting for this request. If one
|
|
1114
2294
|
number provided, it will be total request
|
|
1115
2295
|
timeout. It can also be a pair (tuple) of
|
|
1116
2296
|
(connection, read) timeouts.
|
|
2297
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1117
2298
|
:param _request_auth: set to override the auth_settings for an a single
|
|
1118
|
-
request; this effectively ignores the
|
|
1119
|
-
in the spec for a single request.
|
|
2299
|
+
request; this effectively ignores the
|
|
2300
|
+
authentication in the spec for a single request.
|
|
1120
2301
|
:type _request_auth: dict, optional
|
|
2302
|
+
:param _content_type: force content-type for the request.
|
|
2303
|
+
:type _content_type: str, Optional
|
|
2304
|
+
:param _headers: set to override the headers for a single
|
|
2305
|
+
request; this effectively ignores the headers
|
|
2306
|
+
in the spec for a single request.
|
|
2307
|
+
:type _headers: dict, optional
|
|
2308
|
+
:param _host_index: set to override the host_index for a single
|
|
2309
|
+
request; this effectively ignores the host_index
|
|
2310
|
+
in the spec for a single request.
|
|
2311
|
+
:type _host_index: int, optional
|
|
1121
2312
|
:return: Returns the result object.
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
2313
|
+
""" # noqa: E501
|
|
2314
|
+
|
|
2315
|
+
_param = self._get_person_serialize(
|
|
2316
|
+
person_id=person_id,
|
|
2317
|
+
x_request_id=x_request_id,
|
|
2318
|
+
_request_auth=_request_auth,
|
|
2319
|
+
_content_type=_content_type,
|
|
2320
|
+
_headers=_headers,
|
|
2321
|
+
_host_index=_host_index
|
|
2322
|
+
)
|
|
1128
2323
|
|
|
1129
|
-
|
|
1130
|
-
'
|
|
1131
|
-
'
|
|
2324
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2325
|
+
'200': "Person",
|
|
2326
|
+
'400': "OperationLog",
|
|
2327
|
+
'404': "OperationLog",
|
|
2328
|
+
}
|
|
2329
|
+
response_data = self.api_client.call_api(
|
|
2330
|
+
*_param,
|
|
2331
|
+
_request_timeout=_request_timeout
|
|
2332
|
+
)
|
|
2333
|
+
return response_data.response
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
def _get_person_serialize(
|
|
2337
|
+
self,
|
|
2338
|
+
person_id,
|
|
2339
|
+
x_request_id,
|
|
2340
|
+
_request_auth,
|
|
2341
|
+
_content_type,
|
|
2342
|
+
_headers,
|
|
2343
|
+
_host_index,
|
|
2344
|
+
) -> RequestSerialized:
|
|
2345
|
+
|
|
2346
|
+
_host = None
|
|
2347
|
+
|
|
2348
|
+
_collection_formats: Dict[str, str] = {
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
_path_params: Dict[str, str] = {}
|
|
2352
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2353
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2354
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2355
|
+
_files: Dict[
|
|
2356
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2357
|
+
] = {}
|
|
2358
|
+
_body_params: Optional[bytes] = None
|
|
2359
|
+
|
|
2360
|
+
# process the path parameters
|
|
2361
|
+
if person_id is not None:
|
|
2362
|
+
_path_params['personId'] = person_id
|
|
2363
|
+
# process the query parameters
|
|
2364
|
+
# process the header parameters
|
|
2365
|
+
if x_request_id is not None:
|
|
2366
|
+
_header_params['X-RequestID'] = x_request_id
|
|
2367
|
+
# process the form parameters
|
|
2368
|
+
# process the body parameter
|
|
2369
|
+
|
|
2370
|
+
|
|
2371
|
+
# set the HTTP header `Accept`
|
|
2372
|
+
if 'Accept' not in _header_params:
|
|
2373
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2374
|
+
[
|
|
2375
|
+
'application/json'
|
|
2376
|
+
]
|
|
2377
|
+
)
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
# authentication setting
|
|
2381
|
+
_auth_settings: List[str] = [
|
|
1132
2382
|
]
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
2383
|
+
|
|
2384
|
+
return self.api_client.param_serialize(
|
|
2385
|
+
method='GET',
|
|
2386
|
+
resource_path='/api/persons/{personId}',
|
|
2387
|
+
path_params=_path_params,
|
|
2388
|
+
query_params=_query_params,
|
|
2389
|
+
header_params=_header_params,
|
|
2390
|
+
body=_body_params,
|
|
2391
|
+
post_params=_form_params,
|
|
2392
|
+
files=_files,
|
|
2393
|
+
auth_settings=_auth_settings,
|
|
2394
|
+
collection_formats=_collection_formats,
|
|
2395
|
+
_host=_host,
|
|
2396
|
+
_request_auth=_request_auth
|
|
2397
|
+
)
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
|
|
2401
|
+
|
|
2402
|
+
@validate_call
|
|
2403
|
+
def update_person(
|
|
2404
|
+
self,
|
|
2405
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
2406
|
+
person_to_update_fields: Annotated[PersonToUpdateFields, Field(description="Request body for the Person to update.")],
|
|
2407
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
2408
|
+
_request_timeout: Union[
|
|
2409
|
+
None,
|
|
2410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2411
|
+
Tuple[
|
|
2412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2413
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1140
2414
|
]
|
|
2415
|
+
] = None,
|
|
2416
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2417
|
+
_content_type: Optional[StrictStr] = None,
|
|
2418
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2420
|
+
) -> None:
|
|
2421
|
+
"""Update person
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
:param person_id: Person ID. (required)
|
|
2425
|
+
:type person_id: str
|
|
2426
|
+
:param person_to_update_fields: Request body for the Person to update. (required)
|
|
2427
|
+
:type person_to_update_fields: PersonToUpdateFields
|
|
2428
|
+
:param x_request_id: Request header label.
|
|
2429
|
+
:type x_request_id: str
|
|
2430
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2431
|
+
number provided, it will be total request
|
|
2432
|
+
timeout. It can also be a pair (tuple) of
|
|
2433
|
+
(connection, read) timeouts.
|
|
2434
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2435
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2436
|
+
request; this effectively ignores the
|
|
2437
|
+
authentication in the spec for a single request.
|
|
2438
|
+
:type _request_auth: dict, optional
|
|
2439
|
+
:param _content_type: force content-type for the request.
|
|
2440
|
+
:type _content_type: str, Optional
|
|
2441
|
+
:param _headers: set to override the headers for a single
|
|
2442
|
+
request; this effectively ignores the headers
|
|
2443
|
+
in the spec for a single request.
|
|
2444
|
+
:type _headers: dict, optional
|
|
2445
|
+
:param _host_index: set to override the host_index for a single
|
|
2446
|
+
request; this effectively ignores the host_index
|
|
2447
|
+
in the spec for a single request.
|
|
2448
|
+
:type _host_index: int, optional
|
|
2449
|
+
:return: Returns the result object.
|
|
2450
|
+
""" # noqa: E501
|
|
2451
|
+
|
|
2452
|
+
_param = self._update_person_serialize(
|
|
2453
|
+
person_id=person_id,
|
|
2454
|
+
person_to_update_fields=person_to_update_fields,
|
|
2455
|
+
x_request_id=x_request_id,
|
|
2456
|
+
_request_auth=_request_auth,
|
|
2457
|
+
_content_type=_content_type,
|
|
2458
|
+
_headers=_headers,
|
|
2459
|
+
_host_index=_host_index
|
|
1141
2460
|
)
|
|
1142
2461
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
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()
|
|
2462
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2463
|
+
'204': None,
|
|
2464
|
+
'400': "OperationLog",
|
|
2465
|
+
'404': "OperationLog",
|
|
2466
|
+
}
|
|
2467
|
+
response_data = self.api_client.call_api(
|
|
2468
|
+
*_param,
|
|
2469
|
+
_request_timeout=_request_timeout
|
|
2470
|
+
)
|
|
2471
|
+
response_data.read()
|
|
2472
|
+
return self.api_client.response_deserialize(
|
|
2473
|
+
response_data=response_data,
|
|
2474
|
+
response_types_map=_response_types_map,
|
|
2475
|
+
).data
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
@validate_call
|
|
2479
|
+
def update_person_with_http_info(
|
|
2480
|
+
self,
|
|
2481
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
2482
|
+
person_to_update_fields: Annotated[PersonToUpdateFields, Field(description="Request body for the Person to update.")],
|
|
2483
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
2484
|
+
_request_timeout: Union[
|
|
2485
|
+
None,
|
|
2486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2487
|
+
Tuple[
|
|
2488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2489
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2490
|
+
]
|
|
2491
|
+
] = None,
|
|
2492
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2493
|
+
_content_type: Optional[StrictStr] = None,
|
|
2494
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2495
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2496
|
+
) -> ApiResponse[None]:
|
|
2497
|
+
"""Update person
|
|
2498
|
+
|
|
1204
2499
|
|
|
1205
2500
|
:param person_id: Person ID. (required)
|
|
1206
2501
|
:type person_id: str
|
|
@@ -1208,32 +2503,75 @@ class PersonApi(object):
|
|
|
1208
2503
|
:type person_to_update_fields: PersonToUpdateFields
|
|
1209
2504
|
:param x_request_id: Request header label.
|
|
1210
2505
|
: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
2506
|
:param _request_timeout: timeout setting for this request. If one
|
|
1218
2507
|
number provided, it will be total request
|
|
1219
2508
|
timeout. It can also be a pair (tuple) of
|
|
1220
2509
|
(connection, read) timeouts.
|
|
2510
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2511
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2512
|
+
request; this effectively ignores the
|
|
2513
|
+
authentication in the spec for a single request.
|
|
2514
|
+
:type _request_auth: dict, optional
|
|
2515
|
+
:param _content_type: force content-type for the request.
|
|
2516
|
+
:type _content_type: str, Optional
|
|
2517
|
+
:param _headers: set to override the headers for a single
|
|
2518
|
+
request; this effectively ignores the headers
|
|
2519
|
+
in the spec for a single request.
|
|
2520
|
+
:type _headers: dict, optional
|
|
2521
|
+
:param _host_index: set to override the host_index for a single
|
|
2522
|
+
request; this effectively ignores the host_index
|
|
2523
|
+
in the spec for a single request.
|
|
2524
|
+
:type _host_index: int, optional
|
|
1221
2525
|
:return: Returns the result object.
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
2526
|
+
""" # noqa: E501
|
|
2527
|
+
|
|
2528
|
+
_param = self._update_person_serialize(
|
|
2529
|
+
person_id=person_id,
|
|
2530
|
+
person_to_update_fields=person_to_update_fields,
|
|
2531
|
+
x_request_id=x_request_id,
|
|
2532
|
+
_request_auth=_request_auth,
|
|
2533
|
+
_content_type=_content_type,
|
|
2534
|
+
_headers=_headers,
|
|
2535
|
+
_host_index=_host_index
|
|
2536
|
+
)
|
|
2537
|
+
|
|
2538
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2539
|
+
'204': None,
|
|
2540
|
+
'400': "OperationLog",
|
|
2541
|
+
'404': "OperationLog",
|
|
2542
|
+
}
|
|
2543
|
+
response_data = self.api_client.call_api(
|
|
2544
|
+
*_param,
|
|
2545
|
+
_request_timeout=_request_timeout
|
|
2546
|
+
)
|
|
2547
|
+
response_data.read()
|
|
2548
|
+
return self.api_client.response_deserialize(
|
|
2549
|
+
response_data=response_data,
|
|
2550
|
+
response_types_map=_response_types_map,
|
|
2551
|
+
)
|
|
1228
2552
|
|
|
1229
|
-
def update_person_with_http_info(self, person_id, person_to_update_fields, **kwargs): # noqa: E501
|
|
1230
|
-
"""Update person # noqa: E501
|
|
1231
2553
|
|
|
1232
|
-
|
|
1233
|
-
|
|
2554
|
+
@validate_call
|
|
2555
|
+
def update_person_without_preload_content(
|
|
2556
|
+
self,
|
|
2557
|
+
person_id: Annotated[UUID, Field(description="Person ID.")],
|
|
2558
|
+
person_to_update_fields: Annotated[PersonToUpdateFields, Field(description="Request body for the Person to update.")],
|
|
2559
|
+
x_request_id: Annotated[Optional[StrictStr], Field(description="Request header label.")] = None,
|
|
2560
|
+
_request_timeout: Union[
|
|
2561
|
+
None,
|
|
2562
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2563
|
+
Tuple[
|
|
2564
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2565
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2566
|
+
]
|
|
2567
|
+
] = None,
|
|
2568
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2569
|
+
_content_type: Optional[StrictStr] = None,
|
|
2570
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2571
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2572
|
+
) -> RESTResponseType:
|
|
2573
|
+
"""Update person
|
|
1234
2574
|
|
|
1235
|
-
>>> thread = api.update_person_with_http_info(person_id, person_to_update_fields, async_req=True)
|
|
1236
|
-
>>> result = thread.get()
|
|
1237
2575
|
|
|
1238
2576
|
:param person_id: Person ID. (required)
|
|
1239
2577
|
:type person_id: str
|
|
@@ -1241,105 +2579,127 @@ class PersonApi(object):
|
|
|
1241
2579
|
:type person_to_update_fields: PersonToUpdateFields
|
|
1242
2580
|
:param x_request_id: Request header label.
|
|
1243
2581
|
: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
2582
|
:param _request_timeout: timeout setting for this request. If one
|
|
1254
2583
|
number provided, it will be total request
|
|
1255
2584
|
timeout. It can also be a pair (tuple) of
|
|
1256
2585
|
(connection, read) timeouts.
|
|
2586
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1257
2587
|
:param _request_auth: set to override the auth_settings for an a single
|
|
1258
|
-
request; this effectively ignores the
|
|
1259
|
-
in the spec for a single request.
|
|
2588
|
+
request; this effectively ignores the
|
|
2589
|
+
authentication in the spec for a single request.
|
|
1260
2590
|
:type _request_auth: dict, optional
|
|
2591
|
+
:param _content_type: force content-type for the request.
|
|
2592
|
+
:type _content_type: str, Optional
|
|
2593
|
+
:param _headers: set to override the headers for a single
|
|
2594
|
+
request; this effectively ignores the headers
|
|
2595
|
+
in the spec for a single request.
|
|
2596
|
+
:type _headers: dict, optional
|
|
2597
|
+
:param _host_index: set to override the host_index for a single
|
|
2598
|
+
request; this effectively ignores the host_index
|
|
2599
|
+
in the spec for a single request.
|
|
2600
|
+
:type _host_index: int, optional
|
|
1261
2601
|
:return: Returns the result object.
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
2602
|
+
""" # noqa: E501
|
|
2603
|
+
|
|
2604
|
+
_param = self._update_person_serialize(
|
|
2605
|
+
person_id=person_id,
|
|
2606
|
+
person_to_update_fields=person_to_update_fields,
|
|
2607
|
+
x_request_id=x_request_id,
|
|
2608
|
+
_request_auth=_request_auth,
|
|
2609
|
+
_content_type=_content_type,
|
|
2610
|
+
_headers=_headers,
|
|
2611
|
+
_host_index=_host_index
|
|
2612
|
+
)
|
|
1266
2613
|
|
|
1267
|
-
|
|
2614
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2615
|
+
'204': None,
|
|
2616
|
+
'400': "OperationLog",
|
|
2617
|
+
'404': "OperationLog",
|
|
2618
|
+
}
|
|
2619
|
+
response_data = self.api_client.call_api(
|
|
2620
|
+
*_param,
|
|
2621
|
+
_request_timeout=_request_timeout
|
|
2622
|
+
)
|
|
2623
|
+
return response_data.response
|
|
2624
|
+
|
|
2625
|
+
|
|
2626
|
+
def _update_person_serialize(
|
|
2627
|
+
self,
|
|
2628
|
+
person_id,
|
|
2629
|
+
person_to_update_fields,
|
|
2630
|
+
x_request_id,
|
|
2631
|
+
_request_auth,
|
|
2632
|
+
_content_type,
|
|
2633
|
+
_headers,
|
|
2634
|
+
_host_index,
|
|
2635
|
+
) -> RequestSerialized:
|
|
2636
|
+
|
|
2637
|
+
_host = None
|
|
2638
|
+
|
|
2639
|
+
_collection_formats: Dict[str, str] = {
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
_path_params: Dict[str, str] = {}
|
|
2643
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2644
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2645
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2646
|
+
_files: Dict[
|
|
2647
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2648
|
+
] = {}
|
|
2649
|
+
_body_params: Optional[bytes] = None
|
|
2650
|
+
|
|
2651
|
+
# process the path parameters
|
|
2652
|
+
if person_id is not None:
|
|
2653
|
+
_path_params['personId'] = person_id
|
|
2654
|
+
# process the query parameters
|
|
2655
|
+
# process the header parameters
|
|
2656
|
+
if x_request_id is not None:
|
|
2657
|
+
_header_params['X-RequestID'] = x_request_id
|
|
2658
|
+
# process the form parameters
|
|
2659
|
+
# process the body parameter
|
|
2660
|
+
if person_to_update_fields is not None:
|
|
2661
|
+
_body_params = person_to_update_fields
|
|
2662
|
+
|
|
2663
|
+
|
|
2664
|
+
# set the HTTP header `Accept`
|
|
2665
|
+
if 'Accept' not in _header_params:
|
|
2666
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2667
|
+
[
|
|
2668
|
+
'application/json'
|
|
2669
|
+
]
|
|
2670
|
+
)
|
|
2671
|
+
|
|
2672
|
+
# set the HTTP header `Content-Type`
|
|
2673
|
+
if _content_type:
|
|
2674
|
+
_header_params['Content-Type'] = _content_type
|
|
2675
|
+
else:
|
|
2676
|
+
_default_content_type = (
|
|
2677
|
+
self.api_client.select_header_content_type(
|
|
2678
|
+
[
|
|
2679
|
+
'application/json'
|
|
2680
|
+
]
|
|
2681
|
+
)
|
|
2682
|
+
)
|
|
2683
|
+
if _default_content_type is not None:
|
|
2684
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1268
2685
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
'person_to_update_fields',
|
|
1272
|
-
'x_request_id',
|
|
2686
|
+
# authentication setting
|
|
2687
|
+
_auth_settings: List[str] = [
|
|
1273
2688
|
]
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
2689
|
+
|
|
2690
|
+
return self.api_client.param_serialize(
|
|
2691
|
+
method='PUT',
|
|
2692
|
+
resource_path='/api/persons/{personId}',
|
|
2693
|
+
path_params=_path_params,
|
|
2694
|
+
query_params=_query_params,
|
|
2695
|
+
header_params=_header_params,
|
|
2696
|
+
body=_body_params,
|
|
2697
|
+
post_params=_form_params,
|
|
2698
|
+
files=_files,
|
|
2699
|
+
auth_settings=_auth_settings,
|
|
2700
|
+
collection_formats=_collection_formats,
|
|
2701
|
+
_host=_host,
|
|
2702
|
+
_request_auth=_request_auth
|
|
1282
2703
|
)
|
|
1283
2704
|
|
|
1284
|
-
|
|
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'))
|
|
2705
|
+
|