wds-client 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. wds_client/__init__.py +8 -10
  2. wds_client/api/__init__.py +1 -2
  3. wds_client/api/capabilities_api.py +237 -102
  4. wds_client/api/cloning_api.py +782 -329
  5. wds_client/api/general_wds_information_api.py +463 -191
  6. wds_client/api/import_api.py +288 -127
  7. wds_client/api/instances_api.py +783 -333
  8. wds_client/api/job_api.py +518 -215
  9. wds_client/api/records_api.py +2512 -1089
  10. wds_client/api/schema_api.py +1450 -626
  11. wds_client/api_client.py +414 -310
  12. wds_client/api_response.py +21 -0
  13. wds_client/configuration.py +110 -53
  14. wds_client/exceptions.py +99 -20
  15. wds_client/models/__init__.py +4 -8
  16. wds_client/models/app.py +68 -125
  17. wds_client/models/attribute_data_type.py +31 -94
  18. wds_client/models/attribute_schema.py +71 -157
  19. wds_client/models/attribute_schema_update.py +69 -127
  20. wds_client/models/backup_job.py +96 -298
  21. wds_client/models/backup_response.py +70 -157
  22. wds_client/models/backup_restore_request.py +68 -129
  23. wds_client/models/batch_operation.py +83 -137
  24. wds_client/models/batch_record_request.py +70 -160
  25. wds_client/models/batch_response.py +68 -127
  26. wds_client/models/build.py +79 -207
  27. wds_client/models/capabilities.py +83 -103
  28. wds_client/models/clone_job.py +96 -298
  29. wds_client/models/clone_response.py +68 -129
  30. wds_client/models/commit.py +69 -125
  31. wds_client/models/error_response.py +78 -222
  32. wds_client/models/generic_job.py +102 -334
  33. wds_client/models/git.py +76 -129
  34. wds_client/models/import_request.py +77 -165
  35. wds_client/models/job.py +87 -243
  36. wds_client/models/job_v1.py +97 -277
  37. wds_client/models/record_query_response.py +86 -162
  38. wds_client/models/record_request.py +60 -96
  39. wds_client/models/record_response.py +70 -160
  40. wds_client/models/record_type_schema.py +84 -191
  41. wds_client/models/search_filter.py +60 -95
  42. wds_client/models/search_request.py +84 -220
  43. wds_client/models/search_sort_direction.py +17 -80
  44. wds_client/models/status_response.py +68 -125
  45. wds_client/models/tsv_upload_response.py +68 -127
  46. wds_client/models/version_response.py +86 -155
  47. wds_client/py.typed +0 -0
  48. wds_client/rest.py +136 -170
  49. wds_client-0.8.0.dist-info/METADATA +17 -0
  50. wds_client-0.8.0.dist-info/RECORD +52 -0
  51. wds_client/models/backup_job_all_of.py +0 -148
  52. wds_client/models/clone_job_all_of.py +0 -148
  53. wds_client/models/generic_job_all_of.py +0 -150
  54. wds_client/models/inline_object.py +0 -123
  55. wds_client-0.7.0.dist-info/METADATA +0 -16
  56. wds_client-0.7.0.dist-info/RECORD +0 -54
  57. {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/WHEEL +0 -0
  58. {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
@@ -3,713 +3,1537 @@
3
3
  """
4
4
  Workspace Data Service
5
5
 
6
- This page lists current APIs. As of v0.2, all APIs are subject to change without notice. # noqa: E501
6
+ This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
7
7
 
8
8
  The version of the OpenAPI document: v0.2
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
10
 
13
- from __future__ import absolute_import
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
14
13
 
15
- import re # noqa: F401
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
16
18
 
17
- # python 2 and python 3 compatibility library
18
- import six
19
+ from pydantic import Field, StrictStr
20
+ from typing import List
21
+ from typing_extensions import Annotated
22
+ from wds_client.models.attribute_schema_update import AttributeSchemaUpdate
23
+ from wds_client.models.record_type_schema import RecordTypeSchema
19
24
 
20
- from wds_client.api_client import ApiClient
21
- from wds_client.exceptions import ( # noqa: F401
22
- ApiTypeError,
23
- ApiValueError
24
- )
25
+ from wds_client.api_client import ApiClient, RequestSerialized
26
+ from wds_client.api_response import ApiResponse
27
+ from wds_client.rest import RESTResponseType
25
28
 
26
29
 
27
- class SchemaApi(object):
30
+ class SchemaApi:
28
31
  """NOTE: This class is auto generated by OpenAPI Generator
29
32
  Ref: https://openapi-generator.tech
30
33
 
31
34
  Do not edit the class manually.
32
35
  """
33
36
 
34
- def __init__(self, api_client=None):
37
+ def __init__(self, api_client=None) -> None:
35
38
  if api_client is None:
36
- api_client = ApiClient()
39
+ api_client = ApiClient.get_default()
37
40
  self.api_client = api_client
38
41
 
39
- def delete_attribute(self, instanceid, v, type, attribute, **kwargs): # noqa: E501
40
- """Delete attribute from record type # noqa: E501
41
-
42
- Delete attribute from record type. This attribute will be removed from all records of this type. # noqa: E501
43
- This method makes a synchronous HTTP request by default. To make an
44
- asynchronous HTTP request, please pass async_req=True
45
- >>> thread = api.delete_attribute(instanceid, v, type, attribute, async_req=True)
46
- >>> result = thread.get()
47
-
48
- :param async_req bool: execute request asynchronously
49
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
50
- :param str v: API version (required)
51
- :param str type: Record type (required)
52
- :param str attribute: Attribute name (required)
53
- :param _preload_content: if False, the urllib3.HTTPResponse object will
54
- be returned without reading/decoding response
55
- data. Default is True.
42
+
43
+ @validate_call
44
+ def delete_attribute(
45
+ self,
46
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
47
+ v: Annotated[StrictStr, Field(description="API version")],
48
+ type: Annotated[StrictStr, Field(description="Record type")],
49
+ attribute: Annotated[StrictStr, Field(description="Attribute name")],
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> None:
63
+ """Delete attribute from record type
64
+
65
+ Delete attribute from record type. This attribute will be removed from all records of this type.
66
+
67
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
68
+ :type instanceid: str
69
+ :param v: API version (required)
70
+ :type v: str
71
+ :param type: Record type (required)
72
+ :type type: str
73
+ :param attribute: Attribute name (required)
74
+ :type attribute: str
56
75
  :param _request_timeout: timeout setting for this request. If one
57
76
  number provided, it will be total request
58
77
  timeout. It can also be a pair (tuple) of
59
78
  (connection, read) timeouts.
60
- :return: None
61
- If the method is called asynchronously,
62
- returns the request thread.
63
- """
64
- kwargs['_return_http_data_only'] = True
65
- return self.delete_attribute_with_http_info(instanceid, v, type, attribute, **kwargs) # noqa: E501
66
-
67
- def delete_attribute_with_http_info(self, instanceid, v, type, attribute, **kwargs): # noqa: E501
68
- """Delete attribute from record type # noqa: E501
69
-
70
- Delete attribute from record type. This attribute will be removed from all records of this type. # noqa: E501
71
- This method makes a synchronous HTTP request by default. To make an
72
- asynchronous HTTP request, please pass async_req=True
73
- >>> thread = api.delete_attribute_with_http_info(instanceid, v, type, attribute, async_req=True)
74
- >>> result = thread.get()
75
-
76
- :param async_req bool: execute request asynchronously
77
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
78
- :param str v: API version (required)
79
- :param str type: Record type (required)
80
- :param str attribute: Attribute name (required)
81
- :param _return_http_data_only: response data without head status code
82
- and headers
83
- :param _preload_content: if False, the urllib3.HTTPResponse object will
84
- be returned without reading/decoding response
85
- data. Default is True.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._delete_attribute_serialize(
98
+ instanceid=instanceid,
99
+ v=v,
100
+ type=type,
101
+ attribute=attribute,
102
+ _request_auth=_request_auth,
103
+ _content_type=_content_type,
104
+ _headers=_headers,
105
+ _host_index=_host_index
106
+ )
107
+
108
+ _response_types_map: Dict[str, Optional[str]] = {
109
+ '204': None,
110
+ '400': "ErrorResponse",
111
+ '404': "ErrorResponse",
112
+ }
113
+ response_data = self.api_client.call_api(
114
+ *_param,
115
+ _request_timeout=_request_timeout
116
+ )
117
+ response_data.read()
118
+ return self.api_client.response_deserialize(
119
+ response_data=response_data,
120
+ response_types_map=_response_types_map,
121
+ ).data
122
+
123
+
124
+ @validate_call
125
+ def delete_attribute_with_http_info(
126
+ self,
127
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
128
+ v: Annotated[StrictStr, Field(description="API version")],
129
+ type: Annotated[StrictStr, Field(description="Record type")],
130
+ attribute: Annotated[StrictStr, Field(description="Attribute name")],
131
+ _request_timeout: Union[
132
+ None,
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Tuple[
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Annotated[StrictFloat, Field(gt=0)]
137
+ ]
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[None]:
144
+ """Delete attribute from record type
145
+
146
+ Delete attribute from record type. This attribute will be removed from all records of this type.
147
+
148
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
149
+ :type instanceid: str
150
+ :param v: API version (required)
151
+ :type v: str
152
+ :param type: Record type (required)
153
+ :type type: str
154
+ :param attribute: Attribute name (required)
155
+ :type attribute: str
86
156
  :param _request_timeout: timeout setting for this request. If one
87
157
  number provided, it will be total request
88
158
  timeout. It can also be a pair (tuple) of
89
159
  (connection, read) timeouts.
90
- :return: None
91
- If the method is called asynchronously,
92
- returns the request thread.
93
- """
94
-
95
- local_var_params = locals()
96
-
97
- all_params = [
98
- 'instanceid',
99
- 'v',
100
- 'type',
101
- 'attribute'
102
- ]
103
- all_params.extend(
160
+ :type _request_timeout: int, tuple(int, int), optional
161
+ :param _request_auth: set to override the auth_settings for an a single
162
+ request; this effectively ignores the
163
+ authentication in the spec for a single request.
164
+ :type _request_auth: dict, optional
165
+ :param _content_type: force content-type for the request.
166
+ :type _content_type: str, Optional
167
+ :param _headers: set to override the headers for a single
168
+ request; this effectively ignores the headers
169
+ in the spec for a single request.
170
+ :type _headers: dict, optional
171
+ :param _host_index: set to override the host_index for a single
172
+ request; this effectively ignores the host_index
173
+ in the spec for a single request.
174
+ :type _host_index: int, optional
175
+ :return: Returns the result object.
176
+ """ # noqa: E501
177
+
178
+ _param = self._delete_attribute_serialize(
179
+ instanceid=instanceid,
180
+ v=v,
181
+ type=type,
182
+ attribute=attribute,
183
+ _request_auth=_request_auth,
184
+ _content_type=_content_type,
185
+ _headers=_headers,
186
+ _host_index=_host_index
187
+ )
188
+
189
+ _response_types_map: Dict[str, Optional[str]] = {
190
+ '204': None,
191
+ '400': "ErrorResponse",
192
+ '404': "ErrorResponse",
193
+ }
194
+ response_data = self.api_client.call_api(
195
+ *_param,
196
+ _request_timeout=_request_timeout
197
+ )
198
+ response_data.read()
199
+ return self.api_client.response_deserialize(
200
+ response_data=response_data,
201
+ response_types_map=_response_types_map,
202
+ )
203
+
204
+
205
+ @validate_call
206
+ def delete_attribute_without_preload_content(
207
+ self,
208
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
209
+ v: Annotated[StrictStr, Field(description="API version")],
210
+ type: Annotated[StrictStr, Field(description="Record type")],
211
+ attribute: Annotated[StrictStr, Field(description="Attribute name")],
212
+ _request_timeout: Union[
213
+ None,
214
+ Annotated[StrictFloat, Field(gt=0)],
215
+ Tuple[
216
+ Annotated[StrictFloat, Field(gt=0)],
217
+ Annotated[StrictFloat, Field(gt=0)]
218
+ ]
219
+ ] = None,
220
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
221
+ _content_type: Optional[StrictStr] = None,
222
+ _headers: Optional[Dict[StrictStr, Any]] = None,
223
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
224
+ ) -> RESTResponseType:
225
+ """Delete attribute from record type
226
+
227
+ Delete attribute from record type. This attribute will be removed from all records of this type.
228
+
229
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
230
+ :type instanceid: str
231
+ :param v: API version (required)
232
+ :type v: str
233
+ :param type: Record type (required)
234
+ :type type: str
235
+ :param attribute: Attribute name (required)
236
+ :type attribute: str
237
+ :param _request_timeout: timeout setting for this request. If one
238
+ number provided, it will be total request
239
+ timeout. It can also be a pair (tuple) of
240
+ (connection, read) timeouts.
241
+ :type _request_timeout: int, tuple(int, int), optional
242
+ :param _request_auth: set to override the auth_settings for an a single
243
+ request; this effectively ignores the
244
+ authentication in the spec for a single request.
245
+ :type _request_auth: dict, optional
246
+ :param _content_type: force content-type for the request.
247
+ :type _content_type: str, Optional
248
+ :param _headers: set to override the headers for a single
249
+ request; this effectively ignores the headers
250
+ in the spec for a single request.
251
+ :type _headers: dict, optional
252
+ :param _host_index: set to override the host_index for a single
253
+ request; this effectively ignores the host_index
254
+ in the spec for a single request.
255
+ :type _host_index: int, optional
256
+ :return: Returns the result object.
257
+ """ # noqa: E501
258
+
259
+ _param = self._delete_attribute_serialize(
260
+ instanceid=instanceid,
261
+ v=v,
262
+ type=type,
263
+ attribute=attribute,
264
+ _request_auth=_request_auth,
265
+ _content_type=_content_type,
266
+ _headers=_headers,
267
+ _host_index=_host_index
268
+ )
269
+
270
+ _response_types_map: Dict[str, Optional[str]] = {
271
+ '204': None,
272
+ '400': "ErrorResponse",
273
+ '404': "ErrorResponse",
274
+ }
275
+ response_data = self.api_client.call_api(
276
+ *_param,
277
+ _request_timeout=_request_timeout
278
+ )
279
+ return response_data.response
280
+
281
+
282
+ def _delete_attribute_serialize(
283
+ self,
284
+ instanceid,
285
+ v,
286
+ type,
287
+ attribute,
288
+ _request_auth,
289
+ _content_type,
290
+ _headers,
291
+ _host_index,
292
+ ) -> RequestSerialized:
293
+
294
+ _host = None
295
+
296
+ _collection_formats: Dict[str, str] = {
297
+ }
298
+
299
+ _path_params: Dict[str, str] = {}
300
+ _query_params: List[Tuple[str, str]] = []
301
+ _header_params: Dict[str, Optional[str]] = _headers or {}
302
+ _form_params: List[Tuple[str, str]] = []
303
+ _files: Dict[str, Union[str, bytes]] = {}
304
+ _body_params: Optional[bytes] = None
305
+
306
+ # process the path parameters
307
+ if instanceid is not None:
308
+ _path_params['instanceid'] = instanceid
309
+ if v is not None:
310
+ _path_params['v'] = v
311
+ if type is not None:
312
+ _path_params['type'] = type
313
+ if attribute is not None:
314
+ _path_params['attribute'] = attribute
315
+ # process the query parameters
316
+ # process the header parameters
317
+ # process the form parameters
318
+ # process the body parameter
319
+
320
+
321
+ # set the HTTP header `Accept`
322
+ _header_params['Accept'] = self.api_client.select_header_accept(
104
323
  [
105
- 'async_req',
106
- '_return_http_data_only',
107
- '_preload_content',
108
- '_request_timeout'
324
+ 'application/json'
109
325
  ]
110
326
  )
111
327
 
112
- for key, val in six.iteritems(local_var_params['kwargs']):
113
- if key not in all_params:
114
- raise ApiTypeError(
115
- "Got an unexpected keyword argument '%s'"
116
- " to method delete_attribute" % key
117
- )
118
- local_var_params[key] = val
119
- del local_var_params['kwargs']
120
- # verify the required parameter 'instanceid' is set
121
- if self.api_client.client_side_validation and ('instanceid' not in local_var_params or # noqa: E501
122
- local_var_params['instanceid'] is None): # noqa: E501
123
- raise ApiValueError("Missing the required parameter `instanceid` when calling `delete_attribute`") # noqa: E501
124
- # verify the required parameter 'v' is set
125
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
126
- local_var_params['v'] is None): # noqa: E501
127
- raise ApiValueError("Missing the required parameter `v` when calling `delete_attribute`") # noqa: E501
128
- # verify the required parameter 'type' is set
129
- if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501
130
- local_var_params['type'] is None): # noqa: E501
131
- raise ApiValueError("Missing the required parameter `type` when calling `delete_attribute`") # noqa: E501
132
- # verify the required parameter 'attribute' is set
133
- if self.api_client.client_side_validation and ('attribute' not in local_var_params or # noqa: E501
134
- local_var_params['attribute'] is None): # noqa: E501
135
- raise ApiValueError("Missing the required parameter `attribute` when calling `delete_attribute`") # noqa: E501
136
-
137
- collection_formats = {}
138
-
139
- path_params = {}
140
- if 'instanceid' in local_var_params:
141
- path_params['instanceid'] = local_var_params['instanceid'] # noqa: E501
142
- if 'v' in local_var_params:
143
- path_params['v'] = local_var_params['v'] # noqa: E501
144
- if 'type' in local_var_params:
145
- path_params['type'] = local_var_params['type'] # noqa: E501
146
- if 'attribute' in local_var_params:
147
- path_params['attribute'] = local_var_params['attribute'] # noqa: E501
148
-
149
- query_params = []
150
-
151
- header_params = {}
152
-
153
- form_params = []
154
- local_var_files = {}
155
-
156
- body_params = None
157
- # HTTP header `Accept`
158
- header_params['Accept'] = self.api_client.select_header_accept(
159
- ['application/json']) # noqa: E501
160
-
161
- # Authentication setting
162
- auth_settings = ['bearerAuth'] # noqa: E501
163
-
164
- return self.api_client.call_api(
165
- '/{instanceid}/types/{v}/{type}/{attribute}', 'DELETE',
166
- path_params,
167
- query_params,
168
- header_params,
169
- body=body_params,
170
- post_params=form_params,
171
- files=local_var_files,
172
- response_type=None, # noqa: E501
173
- auth_settings=auth_settings,
174
- async_req=local_var_params.get('async_req'),
175
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
176
- _preload_content=local_var_params.get('_preload_content', True),
177
- _request_timeout=local_var_params.get('_request_timeout'),
178
- collection_formats=collection_formats)
179
-
180
- def delete_record_type(self, instanceid, v, type, **kwargs): # noqa: E501
181
- """Delete record type # noqa: E501
182
-
183
- Delete record type. All records of this type will be deleted. # noqa: E501
184
- This method makes a synchronous HTTP request by default. To make an
185
- asynchronous HTTP request, please pass async_req=True
186
- >>> thread = api.delete_record_type(instanceid, v, type, async_req=True)
187
- >>> result = thread.get()
188
-
189
- :param async_req bool: execute request asynchronously
190
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
191
- :param str v: API version (required)
192
- :param str type: Record type (required)
193
- :param _preload_content: if False, the urllib3.HTTPResponse object will
194
- be returned without reading/decoding response
195
- data. Default is True.
328
+
329
+ # authentication setting
330
+ _auth_settings: List[str] = [
331
+ 'bearerAuth'
332
+ ]
333
+
334
+ return self.api_client.param_serialize(
335
+ method='DELETE',
336
+ resource_path='/{instanceid}/types/{v}/{type}/{attribute}',
337
+ path_params=_path_params,
338
+ query_params=_query_params,
339
+ header_params=_header_params,
340
+ body=_body_params,
341
+ post_params=_form_params,
342
+ files=_files,
343
+ auth_settings=_auth_settings,
344
+ collection_formats=_collection_formats,
345
+ _host=_host,
346
+ _request_auth=_request_auth
347
+ )
348
+
349
+
350
+
351
+
352
+ @validate_call
353
+ def delete_record_type(
354
+ self,
355
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
356
+ v: Annotated[StrictStr, Field(description="API version")],
357
+ type: Annotated[StrictStr, Field(description="Record type")],
358
+ _request_timeout: Union[
359
+ None,
360
+ Annotated[StrictFloat, Field(gt=0)],
361
+ Tuple[
362
+ Annotated[StrictFloat, Field(gt=0)],
363
+ Annotated[StrictFloat, Field(gt=0)]
364
+ ]
365
+ ] = None,
366
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
367
+ _content_type: Optional[StrictStr] = None,
368
+ _headers: Optional[Dict[StrictStr, Any]] = None,
369
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
370
+ ) -> None:
371
+ """Delete record type
372
+
373
+ Delete record type. All records of this type will be deleted.
374
+
375
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
376
+ :type instanceid: str
377
+ :param v: API version (required)
378
+ :type v: str
379
+ :param type: Record type (required)
380
+ :type type: str
196
381
  :param _request_timeout: timeout setting for this request. If one
197
382
  number provided, it will be total request
198
383
  timeout. It can also be a pair (tuple) of
199
384
  (connection, read) timeouts.
200
- :return: None
201
- If the method is called asynchronously,
202
- returns the request thread.
203
- """
204
- kwargs['_return_http_data_only'] = True
205
- return self.delete_record_type_with_http_info(instanceid, v, type, **kwargs) # noqa: E501
206
-
207
- def delete_record_type_with_http_info(self, instanceid, v, type, **kwargs): # noqa: E501
208
- """Delete record type # noqa: E501
209
-
210
- Delete record type. All records of this type will be deleted. # noqa: E501
211
- This method makes a synchronous HTTP request by default. To make an
212
- asynchronous HTTP request, please pass async_req=True
213
- >>> thread = api.delete_record_type_with_http_info(instanceid, v, type, async_req=True)
214
- >>> result = thread.get()
215
-
216
- :param async_req bool: execute request asynchronously
217
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
218
- :param str v: API version (required)
219
- :param str type: Record type (required)
220
- :param _return_http_data_only: response data without head status code
221
- and headers
222
- :param _preload_content: if False, the urllib3.HTTPResponse object will
223
- be returned without reading/decoding response
224
- data. Default is True.
385
+ :type _request_timeout: int, tuple(int, int), optional
386
+ :param _request_auth: set to override the auth_settings for an a single
387
+ request; this effectively ignores the
388
+ authentication in the spec for a single request.
389
+ :type _request_auth: dict, optional
390
+ :param _content_type: force content-type for the request.
391
+ :type _content_type: str, Optional
392
+ :param _headers: set to override the headers for a single
393
+ request; this effectively ignores the headers
394
+ in the spec for a single request.
395
+ :type _headers: dict, optional
396
+ :param _host_index: set to override the host_index for a single
397
+ request; this effectively ignores the host_index
398
+ in the spec for a single request.
399
+ :type _host_index: int, optional
400
+ :return: Returns the result object.
401
+ """ # noqa: E501
402
+
403
+ _param = self._delete_record_type_serialize(
404
+ instanceid=instanceid,
405
+ v=v,
406
+ type=type,
407
+ _request_auth=_request_auth,
408
+ _content_type=_content_type,
409
+ _headers=_headers,
410
+ _host_index=_host_index
411
+ )
412
+
413
+ _response_types_map: Dict[str, Optional[str]] = {
414
+ '204': None,
415
+ '409': None,
416
+ }
417
+ response_data = self.api_client.call_api(
418
+ *_param,
419
+ _request_timeout=_request_timeout
420
+ )
421
+ response_data.read()
422
+ return self.api_client.response_deserialize(
423
+ response_data=response_data,
424
+ response_types_map=_response_types_map,
425
+ ).data
426
+
427
+
428
+ @validate_call
429
+ def delete_record_type_with_http_info(
430
+ self,
431
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
432
+ v: Annotated[StrictStr, Field(description="API version")],
433
+ type: Annotated[StrictStr, Field(description="Record type")],
434
+ _request_timeout: Union[
435
+ None,
436
+ Annotated[StrictFloat, Field(gt=0)],
437
+ Tuple[
438
+ Annotated[StrictFloat, Field(gt=0)],
439
+ Annotated[StrictFloat, Field(gt=0)]
440
+ ]
441
+ ] = None,
442
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
443
+ _content_type: Optional[StrictStr] = None,
444
+ _headers: Optional[Dict[StrictStr, Any]] = None,
445
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
446
+ ) -> ApiResponse[None]:
447
+ """Delete record type
448
+
449
+ Delete record type. All records of this type will be deleted.
450
+
451
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
452
+ :type instanceid: str
453
+ :param v: API version (required)
454
+ :type v: str
455
+ :param type: Record type (required)
456
+ :type type: str
225
457
  :param _request_timeout: timeout setting for this request. If one
226
458
  number provided, it will be total request
227
459
  timeout. It can also be a pair (tuple) of
228
460
  (connection, read) timeouts.
229
- :return: None
230
- If the method is called asynchronously,
231
- returns the request thread.
232
- """
461
+ :type _request_timeout: int, tuple(int, int), optional
462
+ :param _request_auth: set to override the auth_settings for an a single
463
+ request; this effectively ignores the
464
+ authentication in the spec for a single request.
465
+ :type _request_auth: dict, optional
466
+ :param _content_type: force content-type for the request.
467
+ :type _content_type: str, Optional
468
+ :param _headers: set to override the headers for a single
469
+ request; this effectively ignores the headers
470
+ in the spec for a single request.
471
+ :type _headers: dict, optional
472
+ :param _host_index: set to override the host_index for a single
473
+ request; this effectively ignores the host_index
474
+ in the spec for a single request.
475
+ :type _host_index: int, optional
476
+ :return: Returns the result object.
477
+ """ # noqa: E501
478
+
479
+ _param = self._delete_record_type_serialize(
480
+ instanceid=instanceid,
481
+ v=v,
482
+ type=type,
483
+ _request_auth=_request_auth,
484
+ _content_type=_content_type,
485
+ _headers=_headers,
486
+ _host_index=_host_index
487
+ )
233
488
 
234
- local_var_params = locals()
489
+ _response_types_map: Dict[str, Optional[str]] = {
490
+ '204': None,
491
+ '409': None,
492
+ }
493
+ response_data = self.api_client.call_api(
494
+ *_param,
495
+ _request_timeout=_request_timeout
496
+ )
497
+ response_data.read()
498
+ return self.api_client.response_deserialize(
499
+ response_data=response_data,
500
+ response_types_map=_response_types_map,
501
+ )
235
502
 
236
- all_params = [
237
- 'instanceid',
238
- 'v',
239
- 'type'
503
+
504
+ @validate_call
505
+ def delete_record_type_without_preload_content(
506
+ self,
507
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
508
+ v: Annotated[StrictStr, Field(description="API version")],
509
+ type: Annotated[StrictStr, Field(description="Record type")],
510
+ _request_timeout: Union[
511
+ None,
512
+ Annotated[StrictFloat, Field(gt=0)],
513
+ Tuple[
514
+ Annotated[StrictFloat, Field(gt=0)],
515
+ Annotated[StrictFloat, Field(gt=0)]
516
+ ]
517
+ ] = None,
518
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
519
+ _content_type: Optional[StrictStr] = None,
520
+ _headers: Optional[Dict[StrictStr, Any]] = None,
521
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
522
+ ) -> RESTResponseType:
523
+ """Delete record type
524
+
525
+ Delete record type. All records of this type will be deleted.
526
+
527
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
528
+ :type instanceid: str
529
+ :param v: API version (required)
530
+ :type v: str
531
+ :param type: Record type (required)
532
+ :type type: str
533
+ :param _request_timeout: timeout setting for this request. If one
534
+ number provided, it will be total request
535
+ timeout. It can also be a pair (tuple) of
536
+ (connection, read) timeouts.
537
+ :type _request_timeout: int, tuple(int, int), optional
538
+ :param _request_auth: set to override the auth_settings for an a single
539
+ request; this effectively ignores the
540
+ authentication in the spec for a single request.
541
+ :type _request_auth: dict, optional
542
+ :param _content_type: force content-type for the request.
543
+ :type _content_type: str, Optional
544
+ :param _headers: set to override the headers for a single
545
+ request; this effectively ignores the headers
546
+ in the spec for a single request.
547
+ :type _headers: dict, optional
548
+ :param _host_index: set to override the host_index for a single
549
+ request; this effectively ignores the host_index
550
+ in the spec for a single request.
551
+ :type _host_index: int, optional
552
+ :return: Returns the result object.
553
+ """ # noqa: E501
554
+
555
+ _param = self._delete_record_type_serialize(
556
+ instanceid=instanceid,
557
+ v=v,
558
+ type=type,
559
+ _request_auth=_request_auth,
560
+ _content_type=_content_type,
561
+ _headers=_headers,
562
+ _host_index=_host_index
563
+ )
564
+
565
+ _response_types_map: Dict[str, Optional[str]] = {
566
+ '204': None,
567
+ '409': None,
568
+ }
569
+ response_data = self.api_client.call_api(
570
+ *_param,
571
+ _request_timeout=_request_timeout
572
+ )
573
+ return response_data.response
574
+
575
+
576
+ def _delete_record_type_serialize(
577
+ self,
578
+ instanceid,
579
+ v,
580
+ type,
581
+ _request_auth,
582
+ _content_type,
583
+ _headers,
584
+ _host_index,
585
+ ) -> RequestSerialized:
586
+
587
+ _host = None
588
+
589
+ _collection_formats: Dict[str, str] = {
590
+ }
591
+
592
+ _path_params: Dict[str, str] = {}
593
+ _query_params: List[Tuple[str, str]] = []
594
+ _header_params: Dict[str, Optional[str]] = _headers or {}
595
+ _form_params: List[Tuple[str, str]] = []
596
+ _files: Dict[str, Union[str, bytes]] = {}
597
+ _body_params: Optional[bytes] = None
598
+
599
+ # process the path parameters
600
+ if instanceid is not None:
601
+ _path_params['instanceid'] = instanceid
602
+ if v is not None:
603
+ _path_params['v'] = v
604
+ if type is not None:
605
+ _path_params['type'] = type
606
+ # process the query parameters
607
+ # process the header parameters
608
+ # process the form parameters
609
+ # process the body parameter
610
+
611
+
612
+
613
+
614
+ # authentication setting
615
+ _auth_settings: List[str] = [
616
+ 'bearerAuth'
240
617
  ]
241
- all_params.extend(
242
- [
243
- 'async_req',
244
- '_return_http_data_only',
245
- '_preload_content',
246
- '_request_timeout'
618
+
619
+ return self.api_client.param_serialize(
620
+ method='DELETE',
621
+ resource_path='/{instanceid}/types/{v}/{type}',
622
+ path_params=_path_params,
623
+ query_params=_query_params,
624
+ header_params=_header_params,
625
+ body=_body_params,
626
+ post_params=_form_params,
627
+ files=_files,
628
+ auth_settings=_auth_settings,
629
+ collection_formats=_collection_formats,
630
+ _host=_host,
631
+ _request_auth=_request_auth
632
+ )
633
+
634
+
635
+
636
+
637
+ @validate_call
638
+ def describe_all_record_types(
639
+ self,
640
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
641
+ v: Annotated[StrictStr, Field(description="API version")],
642
+ _request_timeout: Union[
643
+ None,
644
+ Annotated[StrictFloat, Field(gt=0)],
645
+ Tuple[
646
+ Annotated[StrictFloat, Field(gt=0)],
647
+ Annotated[StrictFloat, Field(gt=0)]
247
648
  ]
649
+ ] = None,
650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
651
+ _content_type: Optional[StrictStr] = None,
652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
654
+ ) -> List[RecordTypeSchema]:
655
+ """Describe all record types
656
+
657
+ Returns the schema definition for all types in this instance.
658
+
659
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
660
+ :type instanceid: str
661
+ :param v: API version (required)
662
+ :type v: 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._describe_all_record_types_serialize(
686
+ instanceid=instanceid,
687
+ v=v,
688
+ _request_auth=_request_auth,
689
+ _content_type=_content_type,
690
+ _headers=_headers,
691
+ _host_index=_host_index
248
692
  )
249
693
 
250
- for key, val in six.iteritems(local_var_params['kwargs']):
251
- if key not in all_params:
252
- raise ApiTypeError(
253
- "Got an unexpected keyword argument '%s'"
254
- " to method delete_record_type" % key
255
- )
256
- local_var_params[key] = val
257
- del local_var_params['kwargs']
258
- # verify the required parameter 'instanceid' is set
259
- if self.api_client.client_side_validation and ('instanceid' not in local_var_params or # noqa: E501
260
- local_var_params['instanceid'] is None): # noqa: E501
261
- raise ApiValueError("Missing the required parameter `instanceid` when calling `delete_record_type`") # noqa: E501
262
- # verify the required parameter 'v' is set
263
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
264
- local_var_params['v'] is None): # noqa: E501
265
- raise ApiValueError("Missing the required parameter `v` when calling `delete_record_type`") # noqa: E501
266
- # verify the required parameter 'type' is set
267
- if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501
268
- local_var_params['type'] is None): # noqa: E501
269
- raise ApiValueError("Missing the required parameter `type` when calling `delete_record_type`") # noqa: E501
270
-
271
- collection_formats = {}
272
-
273
- path_params = {}
274
- if 'instanceid' in local_var_params:
275
- path_params['instanceid'] = local_var_params['instanceid'] # noqa: E501
276
- if 'v' in local_var_params:
277
- path_params['v'] = local_var_params['v'] # noqa: E501
278
- if 'type' in local_var_params:
279
- path_params['type'] = local_var_params['type'] # noqa: E501
280
-
281
- query_params = []
282
-
283
- header_params = {}
284
-
285
- form_params = []
286
- local_var_files = {}
287
-
288
- body_params = None
289
- # Authentication setting
290
- auth_settings = ['bearerAuth'] # noqa: E501
291
-
292
- return self.api_client.call_api(
293
- '/{instanceid}/types/{v}/{type}', 'DELETE',
294
- path_params,
295
- query_params,
296
- header_params,
297
- body=body_params,
298
- post_params=form_params,
299
- files=local_var_files,
300
- response_type=None, # noqa: E501
301
- auth_settings=auth_settings,
302
- async_req=local_var_params.get('async_req'),
303
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
304
- _preload_content=local_var_params.get('_preload_content', True),
305
- _request_timeout=local_var_params.get('_request_timeout'),
306
- collection_formats=collection_formats)
307
-
308
- def describe_all_record_types(self, instanceid, v, **kwargs): # noqa: E501
309
- """Describe all record types # noqa: E501
310
-
311
- Returns the schema definition for all types in this instance. # noqa: E501
312
- This method makes a synchronous HTTP request by default. To make an
313
- asynchronous HTTP request, please pass async_req=True
314
- >>> thread = api.describe_all_record_types(instanceid, v, async_req=True)
315
- >>> result = thread.get()
316
-
317
- :param async_req bool: execute request asynchronously
318
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
319
- :param str v: API version (required)
320
- :param _preload_content: if False, the urllib3.HTTPResponse object will
321
- be returned without reading/decoding response
322
- data. Default is True.
694
+ _response_types_map: Dict[str, Optional[str]] = {
695
+ '200': "List[RecordTypeSchema]",
696
+ '404': "ErrorResponse",
697
+ }
698
+ response_data = self.api_client.call_api(
699
+ *_param,
700
+ _request_timeout=_request_timeout
701
+ )
702
+ response_data.read()
703
+ return self.api_client.response_deserialize(
704
+ response_data=response_data,
705
+ response_types_map=_response_types_map,
706
+ ).data
707
+
708
+
709
+ @validate_call
710
+ def describe_all_record_types_with_http_info(
711
+ self,
712
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
713
+ v: Annotated[StrictStr, Field(description="API version")],
714
+ _request_timeout: Union[
715
+ None,
716
+ Annotated[StrictFloat, Field(gt=0)],
717
+ Tuple[
718
+ Annotated[StrictFloat, Field(gt=0)],
719
+ Annotated[StrictFloat, Field(gt=0)]
720
+ ]
721
+ ] = None,
722
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
723
+ _content_type: Optional[StrictStr] = None,
724
+ _headers: Optional[Dict[StrictStr, Any]] = None,
725
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
726
+ ) -> ApiResponse[List[RecordTypeSchema]]:
727
+ """Describe all record types
728
+
729
+ Returns the schema definition for all types in this instance.
730
+
731
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
732
+ :type instanceid: str
733
+ :param v: API version (required)
734
+ :type v: str
323
735
  :param _request_timeout: timeout setting for this request. If one
324
736
  number provided, it will be total request
325
737
  timeout. It can also be a pair (tuple) of
326
738
  (connection, read) timeouts.
327
- :return: list[RecordTypeSchema]
328
- If the method is called asynchronously,
329
- returns the request thread.
330
- """
331
- kwargs['_return_http_data_only'] = True
332
- return self.describe_all_record_types_with_http_info(instanceid, v, **kwargs) # noqa: E501
333
-
334
- def describe_all_record_types_with_http_info(self, instanceid, v, **kwargs): # noqa: E501
335
- """Describe all record types # noqa: E501
336
-
337
- Returns the schema definition for all types in this instance. # noqa: E501
338
- This method makes a synchronous HTTP request by default. To make an
339
- asynchronous HTTP request, please pass async_req=True
340
- >>> thread = api.describe_all_record_types_with_http_info(instanceid, v, async_req=True)
341
- >>> result = thread.get()
342
-
343
- :param async_req bool: execute request asynchronously
344
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
345
- :param str v: API version (required)
346
- :param _return_http_data_only: response data without head status code
347
- and headers
348
- :param _preload_content: if False, the urllib3.HTTPResponse object will
349
- be returned without reading/decoding response
350
- data. Default is True.
739
+ :type _request_timeout: int, tuple(int, int), optional
740
+ :param _request_auth: set to override the auth_settings for an a single
741
+ request; this effectively ignores the
742
+ authentication in the spec for a single request.
743
+ :type _request_auth: dict, optional
744
+ :param _content_type: force content-type for the request.
745
+ :type _content_type: str, Optional
746
+ :param _headers: set to override the headers for a single
747
+ request; this effectively ignores the headers
748
+ in the spec for a single request.
749
+ :type _headers: dict, optional
750
+ :param _host_index: set to override the host_index for a single
751
+ request; this effectively ignores the host_index
752
+ in the spec for a single request.
753
+ :type _host_index: int, optional
754
+ :return: Returns the result object.
755
+ """ # noqa: E501
756
+
757
+ _param = self._describe_all_record_types_serialize(
758
+ instanceid=instanceid,
759
+ v=v,
760
+ _request_auth=_request_auth,
761
+ _content_type=_content_type,
762
+ _headers=_headers,
763
+ _host_index=_host_index
764
+ )
765
+
766
+ _response_types_map: Dict[str, Optional[str]] = {
767
+ '200': "List[RecordTypeSchema]",
768
+ '404': "ErrorResponse",
769
+ }
770
+ response_data = self.api_client.call_api(
771
+ *_param,
772
+ _request_timeout=_request_timeout
773
+ )
774
+ response_data.read()
775
+ return self.api_client.response_deserialize(
776
+ response_data=response_data,
777
+ response_types_map=_response_types_map,
778
+ )
779
+
780
+
781
+ @validate_call
782
+ def describe_all_record_types_without_preload_content(
783
+ self,
784
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
785
+ v: Annotated[StrictStr, Field(description="API version")],
786
+ _request_timeout: Union[
787
+ None,
788
+ Annotated[StrictFloat, Field(gt=0)],
789
+ Tuple[
790
+ Annotated[StrictFloat, Field(gt=0)],
791
+ Annotated[StrictFloat, Field(gt=0)]
792
+ ]
793
+ ] = None,
794
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
795
+ _content_type: Optional[StrictStr] = None,
796
+ _headers: Optional[Dict[StrictStr, Any]] = None,
797
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
798
+ ) -> RESTResponseType:
799
+ """Describe all record types
800
+
801
+ Returns the schema definition for all types in this instance.
802
+
803
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
804
+ :type instanceid: str
805
+ :param v: API version (required)
806
+ :type v: str
351
807
  :param _request_timeout: timeout setting for this request. If one
352
808
  number provided, it will be total request
353
809
  timeout. It can also be a pair (tuple) of
354
810
  (connection, read) timeouts.
355
- :return: tuple(list[RecordTypeSchema], status_code(int), headers(HTTPHeaderDict))
356
- If the method is called asynchronously,
357
- returns the request thread.
358
- """
811
+ :type _request_timeout: int, tuple(int, int), optional
812
+ :param _request_auth: set to override the auth_settings for an a single
813
+ request; this effectively ignores the
814
+ authentication in the spec for a single request.
815
+ :type _request_auth: dict, optional
816
+ :param _content_type: force content-type for the request.
817
+ :type _content_type: str, Optional
818
+ :param _headers: set to override the headers for a single
819
+ request; this effectively ignores the headers
820
+ in the spec for a single request.
821
+ :type _headers: dict, optional
822
+ :param _host_index: set to override the host_index for a single
823
+ request; this effectively ignores the host_index
824
+ in the spec for a single request.
825
+ :type _host_index: int, optional
826
+ :return: Returns the result object.
827
+ """ # noqa: E501
828
+
829
+ _param = self._describe_all_record_types_serialize(
830
+ instanceid=instanceid,
831
+ v=v,
832
+ _request_auth=_request_auth,
833
+ _content_type=_content_type,
834
+ _headers=_headers,
835
+ _host_index=_host_index
836
+ )
837
+
838
+ _response_types_map: Dict[str, Optional[str]] = {
839
+ '200': "List[RecordTypeSchema]",
840
+ '404': "ErrorResponse",
841
+ }
842
+ response_data = self.api_client.call_api(
843
+ *_param,
844
+ _request_timeout=_request_timeout
845
+ )
846
+ return response_data.response
847
+
848
+
849
+ def _describe_all_record_types_serialize(
850
+ self,
851
+ instanceid,
852
+ v,
853
+ _request_auth,
854
+ _content_type,
855
+ _headers,
856
+ _host_index,
857
+ ) -> RequestSerialized:
858
+
859
+ _host = None
860
+
861
+ _collection_formats: Dict[str, str] = {
862
+ }
863
+
864
+ _path_params: Dict[str, str] = {}
865
+ _query_params: List[Tuple[str, str]] = []
866
+ _header_params: Dict[str, Optional[str]] = _headers or {}
867
+ _form_params: List[Tuple[str, str]] = []
868
+ _files: Dict[str, Union[str, bytes]] = {}
869
+ _body_params: Optional[bytes] = None
870
+
871
+ # process the path parameters
872
+ if instanceid is not None:
873
+ _path_params['instanceid'] = instanceid
874
+ if v is not None:
875
+ _path_params['v'] = v
876
+ # process the query parameters
877
+ # process the header parameters
878
+ # process the form parameters
879
+ # process the body parameter
880
+
881
+
882
+ # set the HTTP header `Accept`
883
+ _header_params['Accept'] = self.api_client.select_header_accept(
884
+ [
885
+ 'application/json'
886
+ ]
887
+ )
359
888
 
360
- local_var_params = locals()
361
889
 
362
- all_params = [
363
- 'instanceid',
364
- 'v'
890
+ # authentication setting
891
+ _auth_settings: List[str] = [
365
892
  ]
366
- all_params.extend(
367
- [
368
- 'async_req',
369
- '_return_http_data_only',
370
- '_preload_content',
371
- '_request_timeout'
893
+
894
+ return self.api_client.param_serialize(
895
+ method='GET',
896
+ resource_path='/{instanceid}/types/{v}',
897
+ path_params=_path_params,
898
+ query_params=_query_params,
899
+ header_params=_header_params,
900
+ body=_body_params,
901
+ post_params=_form_params,
902
+ files=_files,
903
+ auth_settings=_auth_settings,
904
+ collection_formats=_collection_formats,
905
+ _host=_host,
906
+ _request_auth=_request_auth
907
+ )
908
+
909
+
910
+
911
+
912
+ @validate_call
913
+ def describe_record_type(
914
+ self,
915
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
916
+ v: Annotated[StrictStr, Field(description="API version")],
917
+ type: Annotated[StrictStr, Field(description="Record type")],
918
+ _request_timeout: Union[
919
+ None,
920
+ Annotated[StrictFloat, Field(gt=0)],
921
+ Tuple[
922
+ Annotated[StrictFloat, Field(gt=0)],
923
+ Annotated[StrictFloat, Field(gt=0)]
372
924
  ]
925
+ ] = None,
926
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
927
+ _content_type: Optional[StrictStr] = None,
928
+ _headers: Optional[Dict[StrictStr, Any]] = None,
929
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
930
+ ) -> RecordTypeSchema:
931
+ """Describe record type
932
+
933
+ Returns the schema definition for this type.
934
+
935
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
936
+ :type instanceid: str
937
+ :param v: API version (required)
938
+ :type v: str
939
+ :param type: Record type (required)
940
+ :type type: str
941
+ :param _request_timeout: timeout setting for this request. If one
942
+ number provided, it will be total request
943
+ timeout. It can also be a pair (tuple) of
944
+ (connection, read) timeouts.
945
+ :type _request_timeout: int, tuple(int, int), optional
946
+ :param _request_auth: set to override the auth_settings for an a single
947
+ request; this effectively ignores the
948
+ authentication in the spec for a single request.
949
+ :type _request_auth: dict, optional
950
+ :param _content_type: force content-type for the request.
951
+ :type _content_type: str, Optional
952
+ :param _headers: set to override the headers for a single
953
+ request; this effectively ignores the headers
954
+ in the spec for a single request.
955
+ :type _headers: dict, optional
956
+ :param _host_index: set to override the host_index for a single
957
+ request; this effectively ignores the host_index
958
+ in the spec for a single request.
959
+ :type _host_index: int, optional
960
+ :return: Returns the result object.
961
+ """ # noqa: E501
962
+
963
+ _param = self._describe_record_type_serialize(
964
+ instanceid=instanceid,
965
+ v=v,
966
+ type=type,
967
+ _request_auth=_request_auth,
968
+ _content_type=_content_type,
969
+ _headers=_headers,
970
+ _host_index=_host_index
373
971
  )
374
972
 
375
- for key, val in six.iteritems(local_var_params['kwargs']):
376
- if key not in all_params:
377
- raise ApiTypeError(
378
- "Got an unexpected keyword argument '%s'"
379
- " to method describe_all_record_types" % key
380
- )
381
- local_var_params[key] = val
382
- del local_var_params['kwargs']
383
- # verify the required parameter 'instanceid' is set
384
- if self.api_client.client_side_validation and ('instanceid' not in local_var_params or # noqa: E501
385
- local_var_params['instanceid'] is None): # noqa: E501
386
- raise ApiValueError("Missing the required parameter `instanceid` when calling `describe_all_record_types`") # noqa: E501
387
- # verify the required parameter 'v' is set
388
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
389
- local_var_params['v'] is None): # noqa: E501
390
- raise ApiValueError("Missing the required parameter `v` when calling `describe_all_record_types`") # noqa: E501
391
-
392
- collection_formats = {}
393
-
394
- path_params = {}
395
- if 'instanceid' in local_var_params:
396
- path_params['instanceid'] = local_var_params['instanceid'] # noqa: E501
397
- if 'v' in local_var_params:
398
- path_params['v'] = local_var_params['v'] # noqa: E501
399
-
400
- query_params = []
401
-
402
- header_params = {}
403
-
404
- form_params = []
405
- local_var_files = {}
406
-
407
- body_params = None
408
- # HTTP header `Accept`
409
- header_params['Accept'] = self.api_client.select_header_accept(
410
- ['application/json']) # noqa: E501
411
-
412
- # Authentication setting
413
- auth_settings = [] # noqa: E501
414
-
415
- return self.api_client.call_api(
416
- '/{instanceid}/types/{v}', 'GET',
417
- path_params,
418
- query_params,
419
- header_params,
420
- body=body_params,
421
- post_params=form_params,
422
- files=local_var_files,
423
- response_type='list[RecordTypeSchema]', # noqa: E501
424
- auth_settings=auth_settings,
425
- async_req=local_var_params.get('async_req'),
426
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
427
- _preload_content=local_var_params.get('_preload_content', True),
428
- _request_timeout=local_var_params.get('_request_timeout'),
429
- collection_formats=collection_formats)
430
-
431
- def describe_record_type(self, instanceid, v, type, **kwargs): # noqa: E501
432
- """Describe record type # noqa: E501
433
-
434
- Returns the schema definition for this type. # noqa: E501
435
- This method makes a synchronous HTTP request by default. To make an
436
- asynchronous HTTP request, please pass async_req=True
437
- >>> thread = api.describe_record_type(instanceid, v, type, async_req=True)
438
- >>> result = thread.get()
439
-
440
- :param async_req bool: execute request asynchronously
441
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
442
- :param str v: API version (required)
443
- :param str type: Record type (required)
444
- :param _preload_content: if False, the urllib3.HTTPResponse object will
445
- be returned without reading/decoding response
446
- data. Default is True.
973
+ _response_types_map: Dict[str, Optional[str]] = {
974
+ '200': "RecordTypeSchema",
975
+ '404': "ErrorResponse",
976
+ }
977
+ response_data = self.api_client.call_api(
978
+ *_param,
979
+ _request_timeout=_request_timeout
980
+ )
981
+ response_data.read()
982
+ return self.api_client.response_deserialize(
983
+ response_data=response_data,
984
+ response_types_map=_response_types_map,
985
+ ).data
986
+
987
+
988
+ @validate_call
989
+ def describe_record_type_with_http_info(
990
+ self,
991
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
992
+ v: Annotated[StrictStr, Field(description="API version")],
993
+ type: Annotated[StrictStr, Field(description="Record type")],
994
+ _request_timeout: Union[
995
+ None,
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Tuple[
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Annotated[StrictFloat, Field(gt=0)]
1000
+ ]
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> ApiResponse[RecordTypeSchema]:
1007
+ """Describe record type
1008
+
1009
+ Returns the schema definition for this type.
1010
+
1011
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
1012
+ :type instanceid: str
1013
+ :param v: API version (required)
1014
+ :type v: str
1015
+ :param type: Record type (required)
1016
+ :type type: str
447
1017
  :param _request_timeout: timeout setting for this request. If one
448
1018
  number provided, it will be total request
449
1019
  timeout. It can also be a pair (tuple) of
450
1020
  (connection, read) timeouts.
451
- :return: RecordTypeSchema
452
- If the method is called asynchronously,
453
- returns the request thread.
454
- """
455
- kwargs['_return_http_data_only'] = True
456
- return self.describe_record_type_with_http_info(instanceid, v, type, **kwargs) # noqa: E501
457
-
458
- def describe_record_type_with_http_info(self, instanceid, v, type, **kwargs): # noqa: E501
459
- """Describe record type # noqa: E501
460
-
461
- Returns the schema definition for this type. # noqa: E501
462
- This method makes a synchronous HTTP request by default. To make an
463
- asynchronous HTTP request, please pass async_req=True
464
- >>> thread = api.describe_record_type_with_http_info(instanceid, v, type, async_req=True)
465
- >>> result = thread.get()
466
-
467
- :param async_req bool: execute request asynchronously
468
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
469
- :param str v: API version (required)
470
- :param str type: Record type (required)
471
- :param _return_http_data_only: response data without head status code
472
- and headers
473
- :param _preload_content: if False, the urllib3.HTTPResponse object will
474
- be returned without reading/decoding response
475
- data. Default is True.
1021
+ :type _request_timeout: int, tuple(int, int), optional
1022
+ :param _request_auth: set to override the auth_settings for an a single
1023
+ request; this effectively ignores the
1024
+ authentication in the spec for a single request.
1025
+ :type _request_auth: dict, optional
1026
+ :param _content_type: force content-type for the request.
1027
+ :type _content_type: str, Optional
1028
+ :param _headers: set to override the headers for a single
1029
+ request; this effectively ignores the headers
1030
+ in the spec for a single request.
1031
+ :type _headers: dict, optional
1032
+ :param _host_index: set to override the host_index for a single
1033
+ request; this effectively ignores the host_index
1034
+ in the spec for a single request.
1035
+ :type _host_index: int, optional
1036
+ :return: Returns the result object.
1037
+ """ # noqa: E501
1038
+
1039
+ _param = self._describe_record_type_serialize(
1040
+ instanceid=instanceid,
1041
+ v=v,
1042
+ type=type,
1043
+ _request_auth=_request_auth,
1044
+ _content_type=_content_type,
1045
+ _headers=_headers,
1046
+ _host_index=_host_index
1047
+ )
1048
+
1049
+ _response_types_map: Dict[str, Optional[str]] = {
1050
+ '200': "RecordTypeSchema",
1051
+ '404': "ErrorResponse",
1052
+ }
1053
+ response_data = self.api_client.call_api(
1054
+ *_param,
1055
+ _request_timeout=_request_timeout
1056
+ )
1057
+ response_data.read()
1058
+ return self.api_client.response_deserialize(
1059
+ response_data=response_data,
1060
+ response_types_map=_response_types_map,
1061
+ )
1062
+
1063
+
1064
+ @validate_call
1065
+ def describe_record_type_without_preload_content(
1066
+ self,
1067
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
1068
+ v: Annotated[StrictStr, Field(description="API version")],
1069
+ type: Annotated[StrictStr, Field(description="Record type")],
1070
+ _request_timeout: Union[
1071
+ None,
1072
+ Annotated[StrictFloat, Field(gt=0)],
1073
+ Tuple[
1074
+ Annotated[StrictFloat, Field(gt=0)],
1075
+ Annotated[StrictFloat, Field(gt=0)]
1076
+ ]
1077
+ ] = None,
1078
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1079
+ _content_type: Optional[StrictStr] = None,
1080
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1081
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1082
+ ) -> RESTResponseType:
1083
+ """Describe record type
1084
+
1085
+ Returns the schema definition for this type.
1086
+
1087
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
1088
+ :type instanceid: str
1089
+ :param v: API version (required)
1090
+ :type v: str
1091
+ :param type: Record type (required)
1092
+ :type type: str
476
1093
  :param _request_timeout: timeout setting for this request. If one
477
1094
  number provided, it will be total request
478
1095
  timeout. It can also be a pair (tuple) of
479
1096
  (connection, read) timeouts.
480
- :return: tuple(RecordTypeSchema, status_code(int), headers(HTTPHeaderDict))
481
- If the method is called asynchronously,
482
- returns the request thread.
483
- """
1097
+ :type _request_timeout: int, tuple(int, int), optional
1098
+ :param _request_auth: set to override the auth_settings for an a single
1099
+ request; this effectively ignores the
1100
+ authentication in the spec for a single request.
1101
+ :type _request_auth: dict, optional
1102
+ :param _content_type: force content-type for the request.
1103
+ :type _content_type: str, Optional
1104
+ :param _headers: set to override the headers for a single
1105
+ request; this effectively ignores the headers
1106
+ in the spec for a single request.
1107
+ :type _headers: dict, optional
1108
+ :param _host_index: set to override the host_index for a single
1109
+ request; this effectively ignores the host_index
1110
+ in the spec for a single request.
1111
+ :type _host_index: int, optional
1112
+ :return: Returns the result object.
1113
+ """ # noqa: E501
1114
+
1115
+ _param = self._describe_record_type_serialize(
1116
+ instanceid=instanceid,
1117
+ v=v,
1118
+ type=type,
1119
+ _request_auth=_request_auth,
1120
+ _content_type=_content_type,
1121
+ _headers=_headers,
1122
+ _host_index=_host_index
1123
+ )
1124
+
1125
+ _response_types_map: Dict[str, Optional[str]] = {
1126
+ '200': "RecordTypeSchema",
1127
+ '404': "ErrorResponse",
1128
+ }
1129
+ response_data = self.api_client.call_api(
1130
+ *_param,
1131
+ _request_timeout=_request_timeout
1132
+ )
1133
+ return response_data.response
1134
+
1135
+
1136
+ def _describe_record_type_serialize(
1137
+ self,
1138
+ instanceid,
1139
+ v,
1140
+ type,
1141
+ _request_auth,
1142
+ _content_type,
1143
+ _headers,
1144
+ _host_index,
1145
+ ) -> RequestSerialized:
1146
+
1147
+ _host = None
1148
+
1149
+ _collection_formats: Dict[str, str] = {
1150
+ }
1151
+
1152
+ _path_params: Dict[str, str] = {}
1153
+ _query_params: List[Tuple[str, str]] = []
1154
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1155
+ _form_params: List[Tuple[str, str]] = []
1156
+ _files: Dict[str, Union[str, bytes]] = {}
1157
+ _body_params: Optional[bytes] = None
1158
+
1159
+ # process the path parameters
1160
+ if instanceid is not None:
1161
+ _path_params['instanceid'] = instanceid
1162
+ if v is not None:
1163
+ _path_params['v'] = v
1164
+ if type is not None:
1165
+ _path_params['type'] = type
1166
+ # process the query parameters
1167
+ # process the header parameters
1168
+ # process the form parameters
1169
+ # process the body parameter
1170
+
1171
+
1172
+ # set the HTTP header `Accept`
1173
+ _header_params['Accept'] = self.api_client.select_header_accept(
1174
+ [
1175
+ 'application/json'
1176
+ ]
1177
+ )
484
1178
 
485
- local_var_params = locals()
486
1179
 
487
- all_params = [
488
- 'instanceid',
489
- 'v',
490
- 'type'
1180
+ # authentication setting
1181
+ _auth_settings: List[str] = [
491
1182
  ]
492
- all_params.extend(
493
- [
494
- 'async_req',
495
- '_return_http_data_only',
496
- '_preload_content',
497
- '_request_timeout'
1183
+
1184
+ return self.api_client.param_serialize(
1185
+ method='GET',
1186
+ resource_path='/{instanceid}/types/{v}/{type}',
1187
+ path_params=_path_params,
1188
+ query_params=_query_params,
1189
+ header_params=_header_params,
1190
+ body=_body_params,
1191
+ post_params=_form_params,
1192
+ files=_files,
1193
+ auth_settings=_auth_settings,
1194
+ collection_formats=_collection_formats,
1195
+ _host=_host,
1196
+ _request_auth=_request_auth
1197
+ )
1198
+
1199
+
1200
+
1201
+
1202
+ @validate_call
1203
+ def update_attribute(
1204
+ self,
1205
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
1206
+ v: Annotated[StrictStr, Field(description="API version")],
1207
+ type: Annotated[StrictStr, Field(description="Record type")],
1208
+ attribute: Annotated[StrictStr, Field(description="Attribute name")],
1209
+ attribute_schema_update: Annotated[AttributeSchemaUpdate, Field(description="A request to update an attribute")],
1210
+ _request_timeout: Union[
1211
+ None,
1212
+ Annotated[StrictFloat, Field(gt=0)],
1213
+ Tuple[
1214
+ Annotated[StrictFloat, Field(gt=0)],
1215
+ Annotated[StrictFloat, Field(gt=0)]
498
1216
  ]
1217
+ ] = None,
1218
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1219
+ _content_type: Optional[StrictStr] = None,
1220
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1221
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1222
+ ) -> None:
1223
+ """Update an attribute
1224
+
1225
+ Update an attribute. All records of this type will be updated.
1226
+
1227
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
1228
+ :type instanceid: str
1229
+ :param v: API version (required)
1230
+ :type v: str
1231
+ :param type: Record type (required)
1232
+ :type type: str
1233
+ :param attribute: Attribute name (required)
1234
+ :type attribute: str
1235
+ :param attribute_schema_update: A request to update an attribute (required)
1236
+ :type attribute_schema_update: AttributeSchemaUpdate
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._update_attribute_serialize(
1260
+ instanceid=instanceid,
1261
+ v=v,
1262
+ type=type,
1263
+ attribute=attribute,
1264
+ attribute_schema_update=attribute_schema_update,
1265
+ _request_auth=_request_auth,
1266
+ _content_type=_content_type,
1267
+ _headers=_headers,
1268
+ _host_index=_host_index
499
1269
  )
500
1270
 
501
- for key, val in six.iteritems(local_var_params['kwargs']):
502
- if key not in all_params:
503
- raise ApiTypeError(
504
- "Got an unexpected keyword argument '%s'"
505
- " to method describe_record_type" % key
506
- )
507
- local_var_params[key] = val
508
- del local_var_params['kwargs']
509
- # verify the required parameter 'instanceid' is set
510
- if self.api_client.client_side_validation and ('instanceid' not in local_var_params or # noqa: E501
511
- local_var_params['instanceid'] is None): # noqa: E501
512
- raise ApiValueError("Missing the required parameter `instanceid` when calling `describe_record_type`") # noqa: E501
513
- # verify the required parameter 'v' is set
514
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
515
- local_var_params['v'] is None): # noqa: E501
516
- raise ApiValueError("Missing the required parameter `v` when calling `describe_record_type`") # noqa: E501
517
- # verify the required parameter 'type' is set
518
- if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501
519
- local_var_params['type'] is None): # noqa: E501
520
- raise ApiValueError("Missing the required parameter `type` when calling `describe_record_type`") # noqa: E501
521
-
522
- collection_formats = {}
523
-
524
- path_params = {}
525
- if 'instanceid' in local_var_params:
526
- path_params['instanceid'] = local_var_params['instanceid'] # noqa: E501
527
- if 'v' in local_var_params:
528
- path_params['v'] = local_var_params['v'] # noqa: E501
529
- if 'type' in local_var_params:
530
- path_params['type'] = local_var_params['type'] # noqa: E501
531
-
532
- query_params = []
533
-
534
- header_params = {}
535
-
536
- form_params = []
537
- local_var_files = {}
538
-
539
- body_params = None
540
- # HTTP header `Accept`
541
- header_params['Accept'] = self.api_client.select_header_accept(
542
- ['application/json']) # noqa: E501
543
-
544
- # Authentication setting
545
- auth_settings = [] # noqa: E501
546
-
547
- return self.api_client.call_api(
548
- '/{instanceid}/types/{v}/{type}', 'GET',
549
- path_params,
550
- query_params,
551
- header_params,
552
- body=body_params,
553
- post_params=form_params,
554
- files=local_var_files,
555
- response_type='RecordTypeSchema', # noqa: E501
556
- auth_settings=auth_settings,
557
- async_req=local_var_params.get('async_req'),
558
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
559
- _preload_content=local_var_params.get('_preload_content', True),
560
- _request_timeout=local_var_params.get('_request_timeout'),
561
- collection_formats=collection_formats)
562
-
563
- def update_attribute(self, instanceid, v, type, attribute, attribute_schema_update, **kwargs): # noqa: E501
564
- """Update an attribute # noqa: E501
565
-
566
- Update an attribute. All records of this type will be updated. # noqa: E501
567
- This method makes a synchronous HTTP request by default. To make an
568
- asynchronous HTTP request, please pass async_req=True
569
- >>> thread = api.update_attribute(instanceid, v, type, attribute, attribute_schema_update, async_req=True)
570
- >>> result = thread.get()
571
-
572
- :param async_req bool: execute request asynchronously
573
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
574
- :param str v: API version (required)
575
- :param str type: Record type (required)
576
- :param str attribute: Attribute name (required)
577
- :param AttributeSchemaUpdate attribute_schema_update: A request to update an attribute (required)
578
- :param _preload_content: if False, the urllib3.HTTPResponse object will
579
- be returned without reading/decoding response
580
- data. Default is True.
1271
+ _response_types_map: Dict[str, Optional[str]] = {
1272
+ '204': None,
1273
+ '400': "ErrorResponse",
1274
+ '404': "ErrorResponse",
1275
+ '409': "ErrorResponse",
1276
+ }
1277
+ response_data = self.api_client.call_api(
1278
+ *_param,
1279
+ _request_timeout=_request_timeout
1280
+ )
1281
+ response_data.read()
1282
+ return self.api_client.response_deserialize(
1283
+ response_data=response_data,
1284
+ response_types_map=_response_types_map,
1285
+ ).data
1286
+
1287
+
1288
+ @validate_call
1289
+ def update_attribute_with_http_info(
1290
+ self,
1291
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
1292
+ v: Annotated[StrictStr, Field(description="API version")],
1293
+ type: Annotated[StrictStr, Field(description="Record type")],
1294
+ attribute: Annotated[StrictStr, Field(description="Attribute name")],
1295
+ attribute_schema_update: Annotated[AttributeSchemaUpdate, Field(description="A request to update an attribute")],
1296
+ _request_timeout: Union[
1297
+ None,
1298
+ Annotated[StrictFloat, Field(gt=0)],
1299
+ Tuple[
1300
+ Annotated[StrictFloat, Field(gt=0)],
1301
+ Annotated[StrictFloat, Field(gt=0)]
1302
+ ]
1303
+ ] = None,
1304
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1305
+ _content_type: Optional[StrictStr] = None,
1306
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1307
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1308
+ ) -> ApiResponse[None]:
1309
+ """Update an attribute
1310
+
1311
+ Update an attribute. All records of this type will be updated.
1312
+
1313
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
1314
+ :type instanceid: str
1315
+ :param v: API version (required)
1316
+ :type v: str
1317
+ :param type: Record type (required)
1318
+ :type type: str
1319
+ :param attribute: Attribute name (required)
1320
+ :type attribute: str
1321
+ :param attribute_schema_update: A request to update an attribute (required)
1322
+ :type attribute_schema_update: AttributeSchemaUpdate
581
1323
  :param _request_timeout: timeout setting for this request. If one
582
1324
  number provided, it will be total request
583
1325
  timeout. It can also be a pair (tuple) of
584
1326
  (connection, read) timeouts.
585
- :return: None
586
- If the method is called asynchronously,
587
- returns the request thread.
588
- """
589
- kwargs['_return_http_data_only'] = True
590
- return self.update_attribute_with_http_info(instanceid, v, type, attribute, attribute_schema_update, **kwargs) # noqa: E501
591
-
592
- def update_attribute_with_http_info(self, instanceid, v, type, attribute, attribute_schema_update, **kwargs): # noqa: E501
593
- """Update an attribute # noqa: E501
594
-
595
- Update an attribute. All records of this type will be updated. # noqa: E501
596
- This method makes a synchronous HTTP request by default. To make an
597
- asynchronous HTTP request, please pass async_req=True
598
- >>> thread = api.update_attribute_with_http_info(instanceid, v, type, attribute, attribute_schema_update, async_req=True)
599
- >>> result = thread.get()
600
-
601
- :param async_req bool: execute request asynchronously
602
- :param str instanceid: WDS instance id; by convention equal to workspace id (required)
603
- :param str v: API version (required)
604
- :param str type: Record type (required)
605
- :param str attribute: Attribute name (required)
606
- :param AttributeSchemaUpdate attribute_schema_update: A request to update an attribute (required)
607
- :param _return_http_data_only: response data without head status code
608
- and headers
609
- :param _preload_content: if False, the urllib3.HTTPResponse object will
610
- be returned without reading/decoding response
611
- data. Default is True.
1327
+ :type _request_timeout: int, tuple(int, int), optional
1328
+ :param _request_auth: set to override the auth_settings for an a single
1329
+ request; this effectively ignores the
1330
+ authentication in the spec for a single request.
1331
+ :type _request_auth: dict, optional
1332
+ :param _content_type: force content-type for the request.
1333
+ :type _content_type: str, Optional
1334
+ :param _headers: set to override the headers for a single
1335
+ request; this effectively ignores the headers
1336
+ in the spec for a single request.
1337
+ :type _headers: dict, optional
1338
+ :param _host_index: set to override the host_index for a single
1339
+ request; this effectively ignores the host_index
1340
+ in the spec for a single request.
1341
+ :type _host_index: int, optional
1342
+ :return: Returns the result object.
1343
+ """ # noqa: E501
1344
+
1345
+ _param = self._update_attribute_serialize(
1346
+ instanceid=instanceid,
1347
+ v=v,
1348
+ type=type,
1349
+ attribute=attribute,
1350
+ attribute_schema_update=attribute_schema_update,
1351
+ _request_auth=_request_auth,
1352
+ _content_type=_content_type,
1353
+ _headers=_headers,
1354
+ _host_index=_host_index
1355
+ )
1356
+
1357
+ _response_types_map: Dict[str, Optional[str]] = {
1358
+ '204': None,
1359
+ '400': "ErrorResponse",
1360
+ '404': "ErrorResponse",
1361
+ '409': "ErrorResponse",
1362
+ }
1363
+ response_data = self.api_client.call_api(
1364
+ *_param,
1365
+ _request_timeout=_request_timeout
1366
+ )
1367
+ response_data.read()
1368
+ return self.api_client.response_deserialize(
1369
+ response_data=response_data,
1370
+ response_types_map=_response_types_map,
1371
+ )
1372
+
1373
+
1374
+ @validate_call
1375
+ def update_attribute_without_preload_content(
1376
+ self,
1377
+ instanceid: Annotated[StrictStr, Field(description="WDS instance id; by convention equal to workspace id")],
1378
+ v: Annotated[StrictStr, Field(description="API version")],
1379
+ type: Annotated[StrictStr, Field(description="Record type")],
1380
+ attribute: Annotated[StrictStr, Field(description="Attribute name")],
1381
+ attribute_schema_update: Annotated[AttributeSchemaUpdate, Field(description="A request to update an attribute")],
1382
+ _request_timeout: Union[
1383
+ None,
1384
+ Annotated[StrictFloat, Field(gt=0)],
1385
+ Tuple[
1386
+ Annotated[StrictFloat, Field(gt=0)],
1387
+ Annotated[StrictFloat, Field(gt=0)]
1388
+ ]
1389
+ ] = None,
1390
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1391
+ _content_type: Optional[StrictStr] = None,
1392
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1393
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1394
+ ) -> RESTResponseType:
1395
+ """Update an attribute
1396
+
1397
+ Update an attribute. All records of this type will be updated.
1398
+
1399
+ :param instanceid: WDS instance id; by convention equal to workspace id (required)
1400
+ :type instanceid: str
1401
+ :param v: API version (required)
1402
+ :type v: str
1403
+ :param type: Record type (required)
1404
+ :type type: str
1405
+ :param attribute: Attribute name (required)
1406
+ :type attribute: str
1407
+ :param attribute_schema_update: A request to update an attribute (required)
1408
+ :type attribute_schema_update: AttributeSchemaUpdate
612
1409
  :param _request_timeout: timeout setting for this request. If one
613
1410
  number provided, it will be total request
614
1411
  timeout. It can also be a pair (tuple) of
615
1412
  (connection, read) timeouts.
616
- :return: None
617
- If the method is called asynchronously,
618
- returns the request thread.
619
- """
620
-
621
- local_var_params = locals()
622
-
623
- all_params = [
624
- 'instanceid',
625
- 'v',
626
- 'type',
627
- 'attribute',
628
- 'attribute_schema_update'
629
- ]
630
- all_params.extend(
1413
+ :type _request_timeout: int, tuple(int, int), optional
1414
+ :param _request_auth: set to override the auth_settings for an a single
1415
+ request; this effectively ignores the
1416
+ authentication in the spec for a single request.
1417
+ :type _request_auth: dict, optional
1418
+ :param _content_type: force content-type for the request.
1419
+ :type _content_type: str, Optional
1420
+ :param _headers: set to override the headers for a single
1421
+ request; this effectively ignores the headers
1422
+ in the spec for a single request.
1423
+ :type _headers: dict, optional
1424
+ :param _host_index: set to override the host_index for a single
1425
+ request; this effectively ignores the host_index
1426
+ in the spec for a single request.
1427
+ :type _host_index: int, optional
1428
+ :return: Returns the result object.
1429
+ """ # noqa: E501
1430
+
1431
+ _param = self._update_attribute_serialize(
1432
+ instanceid=instanceid,
1433
+ v=v,
1434
+ type=type,
1435
+ attribute=attribute,
1436
+ attribute_schema_update=attribute_schema_update,
1437
+ _request_auth=_request_auth,
1438
+ _content_type=_content_type,
1439
+ _headers=_headers,
1440
+ _host_index=_host_index
1441
+ )
1442
+
1443
+ _response_types_map: Dict[str, Optional[str]] = {
1444
+ '204': None,
1445
+ '400': "ErrorResponse",
1446
+ '404': "ErrorResponse",
1447
+ '409': "ErrorResponse",
1448
+ }
1449
+ response_data = self.api_client.call_api(
1450
+ *_param,
1451
+ _request_timeout=_request_timeout
1452
+ )
1453
+ return response_data.response
1454
+
1455
+
1456
+ def _update_attribute_serialize(
1457
+ self,
1458
+ instanceid,
1459
+ v,
1460
+ type,
1461
+ attribute,
1462
+ attribute_schema_update,
1463
+ _request_auth,
1464
+ _content_type,
1465
+ _headers,
1466
+ _host_index,
1467
+ ) -> RequestSerialized:
1468
+
1469
+ _host = None
1470
+
1471
+ _collection_formats: Dict[str, str] = {
1472
+ }
1473
+
1474
+ _path_params: Dict[str, str] = {}
1475
+ _query_params: List[Tuple[str, str]] = []
1476
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1477
+ _form_params: List[Tuple[str, str]] = []
1478
+ _files: Dict[str, Union[str, bytes]] = {}
1479
+ _body_params: Optional[bytes] = None
1480
+
1481
+ # process the path parameters
1482
+ if instanceid is not None:
1483
+ _path_params['instanceid'] = instanceid
1484
+ if v is not None:
1485
+ _path_params['v'] = v
1486
+ if type is not None:
1487
+ _path_params['type'] = type
1488
+ if attribute is not None:
1489
+ _path_params['attribute'] = attribute
1490
+ # process the query parameters
1491
+ # process the header parameters
1492
+ # process the form parameters
1493
+ # process the body parameter
1494
+ if attribute_schema_update is not None:
1495
+ _body_params = attribute_schema_update
1496
+
1497
+
1498
+ # set the HTTP header `Accept`
1499
+ _header_params['Accept'] = self.api_client.select_header_accept(
631
1500
  [
632
- 'async_req',
633
- '_return_http_data_only',
634
- '_preload_content',
635
- '_request_timeout'
1501
+ 'application/json'
636
1502
  ]
637
1503
  )
638
1504
 
639
- for key, val in six.iteritems(local_var_params['kwargs']):
640
- if key not in all_params:
641
- raise ApiTypeError(
642
- "Got an unexpected keyword argument '%s'"
643
- " to method update_attribute" % key
1505
+ # set the HTTP header `Content-Type`
1506
+ if _content_type:
1507
+ _header_params['Content-Type'] = _content_type
1508
+ else:
1509
+ _default_content_type = (
1510
+ self.api_client.select_header_content_type(
1511
+ [
1512
+ 'application/json'
1513
+ ]
644
1514
  )
645
- local_var_params[key] = val
646
- del local_var_params['kwargs']
647
- # verify the required parameter 'instanceid' is set
648
- if self.api_client.client_side_validation and ('instanceid' not in local_var_params or # noqa: E501
649
- local_var_params['instanceid'] is None): # noqa: E501
650
- raise ApiValueError("Missing the required parameter `instanceid` when calling `update_attribute`") # noqa: E501
651
- # verify the required parameter 'v' is set
652
- if self.api_client.client_side_validation and ('v' not in local_var_params or # noqa: E501
653
- local_var_params['v'] is None): # noqa: E501
654
- raise ApiValueError("Missing the required parameter `v` when calling `update_attribute`") # noqa: E501
655
- # verify the required parameter 'type' is set
656
- if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501
657
- local_var_params['type'] is None): # noqa: E501
658
- raise ApiValueError("Missing the required parameter `type` when calling `update_attribute`") # noqa: E501
659
- # verify the required parameter 'attribute' is set
660
- if self.api_client.client_side_validation and ('attribute' not in local_var_params or # noqa: E501
661
- local_var_params['attribute'] is None): # noqa: E501
662
- raise ApiValueError("Missing the required parameter `attribute` when calling `update_attribute`") # noqa: E501
663
- # verify the required parameter 'attribute_schema_update' is set
664
- if self.api_client.client_side_validation and ('attribute_schema_update' not in local_var_params or # noqa: E501
665
- local_var_params['attribute_schema_update'] is None): # noqa: E501
666
- raise ApiValueError("Missing the required parameter `attribute_schema_update` when calling `update_attribute`") # noqa: E501
667
-
668
- collection_formats = {}
669
-
670
- path_params = {}
671
- if 'instanceid' in local_var_params:
672
- path_params['instanceid'] = local_var_params['instanceid'] # noqa: E501
673
- if 'v' in local_var_params:
674
- path_params['v'] = local_var_params['v'] # noqa: E501
675
- if 'type' in local_var_params:
676
- path_params['type'] = local_var_params['type'] # noqa: E501
677
- if 'attribute' in local_var_params:
678
- path_params['attribute'] = local_var_params['attribute'] # noqa: E501
679
-
680
- query_params = []
681
-
682
- header_params = {}
683
-
684
- form_params = []
685
- local_var_files = {}
686
-
687
- body_params = None
688
- if 'attribute_schema_update' in local_var_params:
689
- body_params = local_var_params['attribute_schema_update']
690
- # HTTP header `Accept`
691
- header_params['Accept'] = self.api_client.select_header_accept(
692
- ['application/json']) # noqa: E501
693
-
694
- # HTTP header `Content-Type`
695
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
696
- ['application/json']) # noqa: E501
697
-
698
- # Authentication setting
699
- auth_settings = ['bearerAuth'] # noqa: E501
700
-
701
- return self.api_client.call_api(
702
- '/{instanceid}/types/{v}/{type}/{attribute}', 'PATCH',
703
- path_params,
704
- query_params,
705
- header_params,
706
- body=body_params,
707
- post_params=form_params,
708
- files=local_var_files,
709
- response_type=None, # noqa: E501
710
- auth_settings=auth_settings,
711
- async_req=local_var_params.get('async_req'),
712
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
713
- _preload_content=local_var_params.get('_preload_content', True),
714
- _request_timeout=local_var_params.get('_request_timeout'),
715
- collection_formats=collection_formats)
1515
+ )
1516
+ if _default_content_type is not None:
1517
+ _header_params['Content-Type'] = _default_content_type
1518
+
1519
+ # authentication setting
1520
+ _auth_settings: List[str] = [
1521
+ 'bearerAuth'
1522
+ ]
1523
+
1524
+ return self.api_client.param_serialize(
1525
+ method='PATCH',
1526
+ resource_path='/{instanceid}/types/{v}/{type}/{attribute}',
1527
+ path_params=_path_params,
1528
+ query_params=_query_params,
1529
+ header_params=_header_params,
1530
+ body=_body_params,
1531
+ post_params=_form_params,
1532
+ files=_files,
1533
+ auth_settings=_auth_settings,
1534
+ collection_formats=_collection_formats,
1535
+ _host=_host,
1536
+ _request_auth=_request_auth
1537
+ )
1538
+
1539
+