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.
- wds_client/__init__.py +8 -10
- wds_client/api/__init__.py +1 -2
- wds_client/api/capabilities_api.py +237 -102
- wds_client/api/cloning_api.py +782 -329
- wds_client/api/general_wds_information_api.py +463 -191
- wds_client/api/import_api.py +288 -127
- wds_client/api/instances_api.py +783 -333
- wds_client/api/job_api.py +518 -215
- wds_client/api/records_api.py +2512 -1089
- wds_client/api/schema_api.py +1450 -626
- wds_client/api_client.py +414 -310
- wds_client/api_response.py +21 -0
- wds_client/configuration.py +110 -53
- wds_client/exceptions.py +99 -20
- wds_client/models/__init__.py +4 -8
- wds_client/models/app.py +68 -125
- wds_client/models/attribute_data_type.py +31 -94
- wds_client/models/attribute_schema.py +71 -157
- wds_client/models/attribute_schema_update.py +69 -127
- wds_client/models/backup_job.py +96 -298
- wds_client/models/backup_response.py +70 -157
- wds_client/models/backup_restore_request.py +68 -129
- wds_client/models/batch_operation.py +83 -137
- wds_client/models/batch_record_request.py +70 -160
- wds_client/models/batch_response.py +68 -127
- wds_client/models/build.py +79 -207
- wds_client/models/capabilities.py +83 -103
- wds_client/models/clone_job.py +96 -298
- wds_client/models/clone_response.py +68 -129
- wds_client/models/commit.py +69 -125
- wds_client/models/error_response.py +78 -222
- wds_client/models/generic_job.py +102 -334
- wds_client/models/git.py +76 -129
- wds_client/models/import_request.py +77 -165
- wds_client/models/job.py +87 -243
- wds_client/models/job_v1.py +97 -277
- wds_client/models/record_query_response.py +86 -162
- wds_client/models/record_request.py +60 -96
- wds_client/models/record_response.py +70 -160
- wds_client/models/record_type_schema.py +84 -191
- wds_client/models/search_filter.py +60 -95
- wds_client/models/search_request.py +84 -220
- wds_client/models/search_sort_direction.py +17 -80
- wds_client/models/status_response.py +68 -125
- wds_client/models/tsv_upload_response.py +68 -127
- wds_client/models/version_response.py +86 -155
- wds_client/py.typed +0 -0
- wds_client/rest.py +136 -170
- wds_client-0.8.0.dist-info/METADATA +17 -0
- wds_client-0.8.0.dist-info/RECORD +52 -0
- wds_client/models/backup_job_all_of.py +0 -148
- wds_client/models/clone_job_all_of.py +0 -148
- wds_client/models/generic_job_all_of.py +0 -150
- wds_client/models/inline_object.py +0 -123
- wds_client-0.7.0.dist-info/METADATA +0 -16
- wds_client-0.7.0.dist-info/RECORD +0 -54
- {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/WHEEL +0 -0
- {wds_client-0.7.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
wds_client/api/schema_api.py
CHANGED
@@ -3,713 +3,1537 @@
|
|
3
3
|
"""
|
4
4
|
Workspace Data Service
|
5
5
|
|
6
|
-
This page lists current APIs.
|
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
|
10
|
-
"""
|
11
|
-
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
12
10
|
|
13
|
-
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
14
13
|
|
15
|
-
import
|
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
|
-
|
18
|
-
import
|
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.
|
22
|
-
|
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
|
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
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
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
|
-
:
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
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
|
-
:
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
-
'
|
106
|
-
'_return_http_data_only',
|
107
|
-
'_preload_content',
|
108
|
-
'_request_timeout'
|
324
|
+
'application/json'
|
109
325
|
]
|
110
326
|
)
|
111
327
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
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
|
-
:
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
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
|
-
:
|
230
|
-
|
231
|
-
|
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
|
-
|
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
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
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
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
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
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
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
|
-
:
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
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
|
-
:
|
356
|
-
|
357
|
-
|
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
|
-
|
363
|
-
|
364
|
-
'v'
|
890
|
+
# authentication setting
|
891
|
+
_auth_settings: List[str] = [
|
365
892
|
]
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
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
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
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
|
-
:
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
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
|
-
:
|
481
|
-
|
482
|
-
|
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
|
-
|
488
|
-
|
489
|
-
'v',
|
490
|
-
'type'
|
1180
|
+
# authentication setting
|
1181
|
+
_auth_settings: List[str] = [
|
491
1182
|
]
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
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
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
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
|
-
:
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
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
|
-
:
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
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
|
-
'
|
633
|
-
'_return_http_data_only',
|
634
|
-
'_preload_content',
|
635
|
-
'_request_timeout'
|
1501
|
+
'application/json'
|
636
1502
|
]
|
637
1503
|
)
|
638
1504
|
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
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
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
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
|
+
|