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