terra-scientific-pipelines-service-api-client 0.1.28__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of terra-scientific-pipelines-service-api-client might be problematic. Click here for more details.
- teaspoons_client/__init__.py +63 -0
- teaspoons_client/api/__init__.py +10 -0
- teaspoons_client/api/admin_api.py +1229 -0
- teaspoons_client/api/jobs_api.py +592 -0
- teaspoons_client/api/pipeline_runs_api.py +1166 -0
- teaspoons_client/api/pipelines_api.py +581 -0
- teaspoons_client/api/public_api.py +532 -0
- teaspoons_client/api/quotas_api.py +303 -0
- teaspoons_client/api_client.py +797 -0
- teaspoons_client/api_response.py +21 -0
- teaspoons_client/configuration.py +465 -0
- teaspoons_client/exceptions.py +199 -0
- teaspoons_client/models/__init__.py +41 -0
- teaspoons_client/models/admin_pipeline.py +103 -0
- teaspoons_client/models/admin_quota.py +93 -0
- teaspoons_client/models/async_pipeline_run_response.py +103 -0
- teaspoons_client/models/error_report.py +91 -0
- teaspoons_client/models/get_jobs_response.py +99 -0
- teaspoons_client/models/get_pipeline_details_request_body.py +87 -0
- teaspoons_client/models/get_pipeline_runs_response.py +97 -0
- teaspoons_client/models/get_pipelines_result.py +95 -0
- teaspoons_client/models/job_control.py +87 -0
- teaspoons_client/models/job_report.py +106 -0
- teaspoons_client/models/job_result.py +97 -0
- teaspoons_client/models/pipeline.py +93 -0
- teaspoons_client/models/pipeline_run.py +97 -0
- teaspoons_client/models/pipeline_run_report.py +93 -0
- teaspoons_client/models/pipeline_user_provided_input_definition.py +91 -0
- teaspoons_client/models/pipeline_with_details.py +105 -0
- teaspoons_client/models/prepare_pipeline_run_request_body.py +95 -0
- teaspoons_client/models/prepare_pipeline_run_response.py +89 -0
- teaspoons_client/models/quota_with_details.py +91 -0
- teaspoons_client/models/start_pipeline_run_request_body.py +91 -0
- teaspoons_client/models/system_status.py +102 -0
- teaspoons_client/models/system_status_systems_value.py +89 -0
- teaspoons_client/models/update_pipeline_request_body.py +91 -0
- teaspoons_client/models/update_quota_limit_request_body.py +87 -0
- teaspoons_client/models/version_properties.py +93 -0
- teaspoons_client/py.typed +0 -0
- teaspoons_client/rest.py +257 -0
- terra_scientific_pipelines_service_api_client-0.1.28.dist-info/METADATA +23 -0
- terra_scientific_pipelines_service_api_client-0.1.28.dist-info/RECORD +44 -0
- terra_scientific_pipelines_service_api_client-0.1.28.dist-info/WHEEL +5 -0
- terra_scientific_pipelines_service_api_client-0.1.28.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1229 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Terra Scientific Pipelines Service
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictInt, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from teaspoons_client.models.admin_pipeline import AdminPipeline
|
|
22
|
+
from teaspoons_client.models.admin_quota import AdminQuota
|
|
23
|
+
from teaspoons_client.models.update_pipeline_request_body import UpdatePipelineRequestBody
|
|
24
|
+
from teaspoons_client.models.update_quota_limit_request_body import UpdateQuotaLimitRequestBody
|
|
25
|
+
|
|
26
|
+
from teaspoons_client.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from teaspoons_client.api_response import ApiResponse
|
|
28
|
+
from teaspoons_client.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class AdminApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def get_pipeline(
|
|
46
|
+
self,
|
|
47
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
48
|
+
pipeline_version: Annotated[StrictInt, Field(description="The integer version of the pipeline.")],
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> AdminPipeline:
|
|
62
|
+
"""Get description for a given pipeline.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
66
|
+
:type pipeline_name: str
|
|
67
|
+
:param pipeline_version: The integer version of the pipeline. (required)
|
|
68
|
+
:type pipeline_version: int
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._get_pipeline_serialize(
|
|
92
|
+
pipeline_name=pipeline_name,
|
|
93
|
+
pipeline_version=pipeline_version,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "AdminPipeline",
|
|
102
|
+
'400': "ErrorReport",
|
|
103
|
+
'403': "ErrorReport",
|
|
104
|
+
'500': "ErrorReport",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def get_pipeline_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
121
|
+
pipeline_version: Annotated[StrictInt, Field(description="The integer version of the pipeline.")],
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[AdminPipeline]:
|
|
135
|
+
"""Get description for a given pipeline.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
139
|
+
:type pipeline_name: str
|
|
140
|
+
:param pipeline_version: The integer version of the pipeline. (required)
|
|
141
|
+
:type pipeline_version: int
|
|
142
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
143
|
+
number provided, it will be total request
|
|
144
|
+
timeout. It can also be a pair (tuple) of
|
|
145
|
+
(connection, read) timeouts.
|
|
146
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
147
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
148
|
+
request; this effectively ignores the
|
|
149
|
+
authentication in the spec for a single request.
|
|
150
|
+
:type _request_auth: dict, optional
|
|
151
|
+
:param _content_type: force content-type for the request.
|
|
152
|
+
:type _content_type: str, Optional
|
|
153
|
+
:param _headers: set to override the headers for a single
|
|
154
|
+
request; this effectively ignores the headers
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _headers: dict, optional
|
|
157
|
+
:param _host_index: set to override the host_index for a single
|
|
158
|
+
request; this effectively ignores the host_index
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _host_index: int, optional
|
|
161
|
+
:return: Returns the result object.
|
|
162
|
+
""" # noqa: E501
|
|
163
|
+
|
|
164
|
+
_param = self._get_pipeline_serialize(
|
|
165
|
+
pipeline_name=pipeline_name,
|
|
166
|
+
pipeline_version=pipeline_version,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'200': "AdminPipeline",
|
|
175
|
+
'400': "ErrorReport",
|
|
176
|
+
'403': "ErrorReport",
|
|
177
|
+
'500': "ErrorReport",
|
|
178
|
+
}
|
|
179
|
+
response_data = self.api_client.call_api(
|
|
180
|
+
*_param,
|
|
181
|
+
_request_timeout=_request_timeout
|
|
182
|
+
)
|
|
183
|
+
response_data.read()
|
|
184
|
+
return self.api_client.response_deserialize(
|
|
185
|
+
response_data=response_data,
|
|
186
|
+
response_types_map=_response_types_map,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@validate_call
|
|
191
|
+
def get_pipeline_without_preload_content(
|
|
192
|
+
self,
|
|
193
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
194
|
+
pipeline_version: Annotated[StrictInt, Field(description="The integer version of the pipeline.")],
|
|
195
|
+
_request_timeout: Union[
|
|
196
|
+
None,
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Tuple[
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
) -> RESTResponseType:
|
|
208
|
+
"""Get description for a given pipeline.
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
212
|
+
:type pipeline_name: str
|
|
213
|
+
:param pipeline_version: The integer version of the pipeline. (required)
|
|
214
|
+
:type pipeline_version: int
|
|
215
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
216
|
+
number provided, it will be total request
|
|
217
|
+
timeout. It can also be a pair (tuple) of
|
|
218
|
+
(connection, read) timeouts.
|
|
219
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
220
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
221
|
+
request; this effectively ignores the
|
|
222
|
+
authentication in the spec for a single request.
|
|
223
|
+
:type _request_auth: dict, optional
|
|
224
|
+
:param _content_type: force content-type for the request.
|
|
225
|
+
:type _content_type: str, Optional
|
|
226
|
+
:param _headers: set to override the headers for a single
|
|
227
|
+
request; this effectively ignores the headers
|
|
228
|
+
in the spec for a single request.
|
|
229
|
+
:type _headers: dict, optional
|
|
230
|
+
:param _host_index: set to override the host_index for a single
|
|
231
|
+
request; this effectively ignores the host_index
|
|
232
|
+
in the spec for a single request.
|
|
233
|
+
:type _host_index: int, optional
|
|
234
|
+
:return: Returns the result object.
|
|
235
|
+
""" # noqa: E501
|
|
236
|
+
|
|
237
|
+
_param = self._get_pipeline_serialize(
|
|
238
|
+
pipeline_name=pipeline_name,
|
|
239
|
+
pipeline_version=pipeline_version,
|
|
240
|
+
_request_auth=_request_auth,
|
|
241
|
+
_content_type=_content_type,
|
|
242
|
+
_headers=_headers,
|
|
243
|
+
_host_index=_host_index
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
247
|
+
'200': "AdminPipeline",
|
|
248
|
+
'400': "ErrorReport",
|
|
249
|
+
'403': "ErrorReport",
|
|
250
|
+
'500': "ErrorReport",
|
|
251
|
+
}
|
|
252
|
+
response_data = self.api_client.call_api(
|
|
253
|
+
*_param,
|
|
254
|
+
_request_timeout=_request_timeout
|
|
255
|
+
)
|
|
256
|
+
return response_data.response
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def _get_pipeline_serialize(
|
|
260
|
+
self,
|
|
261
|
+
pipeline_name,
|
|
262
|
+
pipeline_version,
|
|
263
|
+
_request_auth,
|
|
264
|
+
_content_type,
|
|
265
|
+
_headers,
|
|
266
|
+
_host_index,
|
|
267
|
+
) -> RequestSerialized:
|
|
268
|
+
|
|
269
|
+
_host = None
|
|
270
|
+
|
|
271
|
+
_collection_formats: Dict[str, str] = {
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
_path_params: Dict[str, str] = {}
|
|
275
|
+
_query_params: List[Tuple[str, str]] = []
|
|
276
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
277
|
+
_form_params: List[Tuple[str, str]] = []
|
|
278
|
+
_files: Dict[
|
|
279
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
280
|
+
] = {}
|
|
281
|
+
_body_params: Optional[bytes] = None
|
|
282
|
+
|
|
283
|
+
# process the path parameters
|
|
284
|
+
if pipeline_name is not None:
|
|
285
|
+
_path_params['pipelineName'] = pipeline_name
|
|
286
|
+
if pipeline_version is not None:
|
|
287
|
+
_path_params['pipelineVersion'] = pipeline_version
|
|
288
|
+
# process the query parameters
|
|
289
|
+
# process the header parameters
|
|
290
|
+
# process the form parameters
|
|
291
|
+
# process the body parameter
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
# set the HTTP header `Accept`
|
|
295
|
+
if 'Accept' not in _header_params:
|
|
296
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
297
|
+
[
|
|
298
|
+
'application/json'
|
|
299
|
+
]
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
# authentication setting
|
|
304
|
+
_auth_settings: List[str] = [
|
|
305
|
+
'oidc',
|
|
306
|
+
'bearerAuth'
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
return self.api_client.param_serialize(
|
|
310
|
+
method='GET',
|
|
311
|
+
resource_path='/api/admin/v1/pipelines/{pipelineName}/{pipelineVersion}',
|
|
312
|
+
path_params=_path_params,
|
|
313
|
+
query_params=_query_params,
|
|
314
|
+
header_params=_header_params,
|
|
315
|
+
body=_body_params,
|
|
316
|
+
post_params=_form_params,
|
|
317
|
+
files=_files,
|
|
318
|
+
auth_settings=_auth_settings,
|
|
319
|
+
collection_formats=_collection_formats,
|
|
320
|
+
_host=_host,
|
|
321
|
+
_request_auth=_request_auth
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
@validate_call
|
|
328
|
+
def get_quota_for_pipeline_and_user(
|
|
329
|
+
self,
|
|
330
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
331
|
+
user_id: Annotated[StrictStr, Field(description="A string identifier to used to identify a Terra user")],
|
|
332
|
+
_request_timeout: Union[
|
|
333
|
+
None,
|
|
334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
335
|
+
Tuple[
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
338
|
+
]
|
|
339
|
+
] = None,
|
|
340
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
341
|
+
_content_type: Optional[StrictStr] = None,
|
|
342
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
343
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
344
|
+
) -> AdminQuota:
|
|
345
|
+
"""Get quota for a given pipeline and user.
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
349
|
+
:type pipeline_name: str
|
|
350
|
+
:param user_id: A string identifier to used to identify a Terra user (required)
|
|
351
|
+
:type user_id: str
|
|
352
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
353
|
+
number provided, it will be total request
|
|
354
|
+
timeout. It can also be a pair (tuple) of
|
|
355
|
+
(connection, read) timeouts.
|
|
356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
358
|
+
request; this effectively ignores the
|
|
359
|
+
authentication in the spec for a single request.
|
|
360
|
+
:type _request_auth: dict, optional
|
|
361
|
+
:param _content_type: force content-type for the request.
|
|
362
|
+
:type _content_type: str, Optional
|
|
363
|
+
:param _headers: set to override the headers for a single
|
|
364
|
+
request; this effectively ignores the headers
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _headers: dict, optional
|
|
367
|
+
:param _host_index: set to override the host_index for a single
|
|
368
|
+
request; this effectively ignores the host_index
|
|
369
|
+
in the spec for a single request.
|
|
370
|
+
:type _host_index: int, optional
|
|
371
|
+
:return: Returns the result object.
|
|
372
|
+
""" # noqa: E501
|
|
373
|
+
|
|
374
|
+
_param = self._get_quota_for_pipeline_and_user_serialize(
|
|
375
|
+
pipeline_name=pipeline_name,
|
|
376
|
+
user_id=user_id,
|
|
377
|
+
_request_auth=_request_auth,
|
|
378
|
+
_content_type=_content_type,
|
|
379
|
+
_headers=_headers,
|
|
380
|
+
_host_index=_host_index
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
384
|
+
'200': "AdminQuota",
|
|
385
|
+
'400': "ErrorReport",
|
|
386
|
+
'403': "ErrorReport",
|
|
387
|
+
'500': "ErrorReport",
|
|
388
|
+
}
|
|
389
|
+
response_data = self.api_client.call_api(
|
|
390
|
+
*_param,
|
|
391
|
+
_request_timeout=_request_timeout
|
|
392
|
+
)
|
|
393
|
+
response_data.read()
|
|
394
|
+
return self.api_client.response_deserialize(
|
|
395
|
+
response_data=response_data,
|
|
396
|
+
response_types_map=_response_types_map,
|
|
397
|
+
).data
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
@validate_call
|
|
401
|
+
def get_quota_for_pipeline_and_user_with_http_info(
|
|
402
|
+
self,
|
|
403
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
404
|
+
user_id: Annotated[StrictStr, Field(description="A string identifier to used to identify a Terra user")],
|
|
405
|
+
_request_timeout: Union[
|
|
406
|
+
None,
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Tuple[
|
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
411
|
+
]
|
|
412
|
+
] = None,
|
|
413
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_content_type: Optional[StrictStr] = None,
|
|
415
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
416
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
417
|
+
) -> ApiResponse[AdminQuota]:
|
|
418
|
+
"""Get quota for a given pipeline and user.
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
422
|
+
:type pipeline_name: str
|
|
423
|
+
:param user_id: A string identifier to used to identify a Terra user (required)
|
|
424
|
+
:type user_id: str
|
|
425
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
426
|
+
number provided, it will be total request
|
|
427
|
+
timeout. It can also be a pair (tuple) of
|
|
428
|
+
(connection, read) timeouts.
|
|
429
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
430
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
431
|
+
request; this effectively ignores the
|
|
432
|
+
authentication in the spec for a single request.
|
|
433
|
+
:type _request_auth: dict, optional
|
|
434
|
+
:param _content_type: force content-type for the request.
|
|
435
|
+
:type _content_type: str, Optional
|
|
436
|
+
:param _headers: set to override the headers for a single
|
|
437
|
+
request; this effectively ignores the headers
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _headers: dict, optional
|
|
440
|
+
:param _host_index: set to override the host_index for a single
|
|
441
|
+
request; this effectively ignores the host_index
|
|
442
|
+
in the spec for a single request.
|
|
443
|
+
:type _host_index: int, optional
|
|
444
|
+
:return: Returns the result object.
|
|
445
|
+
""" # noqa: E501
|
|
446
|
+
|
|
447
|
+
_param = self._get_quota_for_pipeline_and_user_serialize(
|
|
448
|
+
pipeline_name=pipeline_name,
|
|
449
|
+
user_id=user_id,
|
|
450
|
+
_request_auth=_request_auth,
|
|
451
|
+
_content_type=_content_type,
|
|
452
|
+
_headers=_headers,
|
|
453
|
+
_host_index=_host_index
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
457
|
+
'200': "AdminQuota",
|
|
458
|
+
'400': "ErrorReport",
|
|
459
|
+
'403': "ErrorReport",
|
|
460
|
+
'500': "ErrorReport",
|
|
461
|
+
}
|
|
462
|
+
response_data = self.api_client.call_api(
|
|
463
|
+
*_param,
|
|
464
|
+
_request_timeout=_request_timeout
|
|
465
|
+
)
|
|
466
|
+
response_data.read()
|
|
467
|
+
return self.api_client.response_deserialize(
|
|
468
|
+
response_data=response_data,
|
|
469
|
+
response_types_map=_response_types_map,
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
@validate_call
|
|
474
|
+
def get_quota_for_pipeline_and_user_without_preload_content(
|
|
475
|
+
self,
|
|
476
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
477
|
+
user_id: Annotated[StrictStr, Field(description="A string identifier to used to identify a Terra user")],
|
|
478
|
+
_request_timeout: Union[
|
|
479
|
+
None,
|
|
480
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
481
|
+
Tuple[
|
|
482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
483
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
484
|
+
]
|
|
485
|
+
] = None,
|
|
486
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
487
|
+
_content_type: Optional[StrictStr] = None,
|
|
488
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
489
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
490
|
+
) -> RESTResponseType:
|
|
491
|
+
"""Get quota for a given pipeline and user.
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
495
|
+
:type pipeline_name: str
|
|
496
|
+
:param user_id: A string identifier to used to identify a Terra user (required)
|
|
497
|
+
:type user_id: str
|
|
498
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
499
|
+
number provided, it will be total request
|
|
500
|
+
timeout. It can also be a pair (tuple) of
|
|
501
|
+
(connection, read) timeouts.
|
|
502
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
503
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
504
|
+
request; this effectively ignores the
|
|
505
|
+
authentication in the spec for a single request.
|
|
506
|
+
:type _request_auth: dict, optional
|
|
507
|
+
:param _content_type: force content-type for the request.
|
|
508
|
+
:type _content_type: str, Optional
|
|
509
|
+
:param _headers: set to override the headers for a single
|
|
510
|
+
request; this effectively ignores the headers
|
|
511
|
+
in the spec for a single request.
|
|
512
|
+
:type _headers: dict, optional
|
|
513
|
+
:param _host_index: set to override the host_index for a single
|
|
514
|
+
request; this effectively ignores the host_index
|
|
515
|
+
in the spec for a single request.
|
|
516
|
+
:type _host_index: int, optional
|
|
517
|
+
:return: Returns the result object.
|
|
518
|
+
""" # noqa: E501
|
|
519
|
+
|
|
520
|
+
_param = self._get_quota_for_pipeline_and_user_serialize(
|
|
521
|
+
pipeline_name=pipeline_name,
|
|
522
|
+
user_id=user_id,
|
|
523
|
+
_request_auth=_request_auth,
|
|
524
|
+
_content_type=_content_type,
|
|
525
|
+
_headers=_headers,
|
|
526
|
+
_host_index=_host_index
|
|
527
|
+
)
|
|
528
|
+
|
|
529
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
530
|
+
'200': "AdminQuota",
|
|
531
|
+
'400': "ErrorReport",
|
|
532
|
+
'403': "ErrorReport",
|
|
533
|
+
'500': "ErrorReport",
|
|
534
|
+
}
|
|
535
|
+
response_data = self.api_client.call_api(
|
|
536
|
+
*_param,
|
|
537
|
+
_request_timeout=_request_timeout
|
|
538
|
+
)
|
|
539
|
+
return response_data.response
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
def _get_quota_for_pipeline_and_user_serialize(
|
|
543
|
+
self,
|
|
544
|
+
pipeline_name,
|
|
545
|
+
user_id,
|
|
546
|
+
_request_auth,
|
|
547
|
+
_content_type,
|
|
548
|
+
_headers,
|
|
549
|
+
_host_index,
|
|
550
|
+
) -> RequestSerialized:
|
|
551
|
+
|
|
552
|
+
_host = None
|
|
553
|
+
|
|
554
|
+
_collection_formats: Dict[str, str] = {
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
_path_params: Dict[str, str] = {}
|
|
558
|
+
_query_params: List[Tuple[str, str]] = []
|
|
559
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
560
|
+
_form_params: List[Tuple[str, str]] = []
|
|
561
|
+
_files: Dict[
|
|
562
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
563
|
+
] = {}
|
|
564
|
+
_body_params: Optional[bytes] = None
|
|
565
|
+
|
|
566
|
+
# process the path parameters
|
|
567
|
+
if pipeline_name is not None:
|
|
568
|
+
_path_params['pipelineName'] = pipeline_name
|
|
569
|
+
if user_id is not None:
|
|
570
|
+
_path_params['userId'] = user_id
|
|
571
|
+
# process the query parameters
|
|
572
|
+
# process the header parameters
|
|
573
|
+
# process the form parameters
|
|
574
|
+
# process the body parameter
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
# set the HTTP header `Accept`
|
|
578
|
+
if 'Accept' not in _header_params:
|
|
579
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
580
|
+
[
|
|
581
|
+
'application/json'
|
|
582
|
+
]
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
# authentication setting
|
|
587
|
+
_auth_settings: List[str] = [
|
|
588
|
+
'oidc',
|
|
589
|
+
'bearerAuth'
|
|
590
|
+
]
|
|
591
|
+
|
|
592
|
+
return self.api_client.param_serialize(
|
|
593
|
+
method='GET',
|
|
594
|
+
resource_path='/api/admin/v1/quotas/{pipelineName}/{userId}',
|
|
595
|
+
path_params=_path_params,
|
|
596
|
+
query_params=_query_params,
|
|
597
|
+
header_params=_header_params,
|
|
598
|
+
body=_body_params,
|
|
599
|
+
post_params=_form_params,
|
|
600
|
+
files=_files,
|
|
601
|
+
auth_settings=_auth_settings,
|
|
602
|
+
collection_formats=_collection_formats,
|
|
603
|
+
_host=_host,
|
|
604
|
+
_request_auth=_request_auth
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
@validate_call
|
|
611
|
+
def update_pipeline(
|
|
612
|
+
self,
|
|
613
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
614
|
+
pipeline_version: Annotated[StrictInt, Field(description="The integer version of the pipeline.")],
|
|
615
|
+
update_pipeline_request_body: UpdatePipelineRequestBody,
|
|
616
|
+
_request_timeout: Union[
|
|
617
|
+
None,
|
|
618
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
619
|
+
Tuple[
|
|
620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
621
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
622
|
+
]
|
|
623
|
+
] = None,
|
|
624
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
625
|
+
_content_type: Optional[StrictStr] = None,
|
|
626
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
627
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
628
|
+
) -> AdminPipeline:
|
|
629
|
+
"""Update attributes for a given pipeline.
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
633
|
+
:type pipeline_name: str
|
|
634
|
+
:param pipeline_version: The integer version of the pipeline. (required)
|
|
635
|
+
:type pipeline_version: int
|
|
636
|
+
:param update_pipeline_request_body: (required)
|
|
637
|
+
:type update_pipeline_request_body: UpdatePipelineRequestBody
|
|
638
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
639
|
+
number provided, it will be total request
|
|
640
|
+
timeout. It can also be a pair (tuple) of
|
|
641
|
+
(connection, read) timeouts.
|
|
642
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
643
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
644
|
+
request; this effectively ignores the
|
|
645
|
+
authentication in the spec for a single request.
|
|
646
|
+
:type _request_auth: dict, optional
|
|
647
|
+
:param _content_type: force content-type for the request.
|
|
648
|
+
:type _content_type: str, Optional
|
|
649
|
+
:param _headers: set to override the headers for a single
|
|
650
|
+
request; this effectively ignores the headers
|
|
651
|
+
in the spec for a single request.
|
|
652
|
+
:type _headers: dict, optional
|
|
653
|
+
:param _host_index: set to override the host_index for a single
|
|
654
|
+
request; this effectively ignores the host_index
|
|
655
|
+
in the spec for a single request.
|
|
656
|
+
:type _host_index: int, optional
|
|
657
|
+
:return: Returns the result object.
|
|
658
|
+
""" # noqa: E501
|
|
659
|
+
|
|
660
|
+
_param = self._update_pipeline_serialize(
|
|
661
|
+
pipeline_name=pipeline_name,
|
|
662
|
+
pipeline_version=pipeline_version,
|
|
663
|
+
update_pipeline_request_body=update_pipeline_request_body,
|
|
664
|
+
_request_auth=_request_auth,
|
|
665
|
+
_content_type=_content_type,
|
|
666
|
+
_headers=_headers,
|
|
667
|
+
_host_index=_host_index
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
671
|
+
'200': "AdminPipeline",
|
|
672
|
+
'400': "ErrorReport",
|
|
673
|
+
'403': "ErrorReport",
|
|
674
|
+
'500': "ErrorReport",
|
|
675
|
+
}
|
|
676
|
+
response_data = self.api_client.call_api(
|
|
677
|
+
*_param,
|
|
678
|
+
_request_timeout=_request_timeout
|
|
679
|
+
)
|
|
680
|
+
response_data.read()
|
|
681
|
+
return self.api_client.response_deserialize(
|
|
682
|
+
response_data=response_data,
|
|
683
|
+
response_types_map=_response_types_map,
|
|
684
|
+
).data
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
@validate_call
|
|
688
|
+
def update_pipeline_with_http_info(
|
|
689
|
+
self,
|
|
690
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
691
|
+
pipeline_version: Annotated[StrictInt, Field(description="The integer version of the pipeline.")],
|
|
692
|
+
update_pipeline_request_body: UpdatePipelineRequestBody,
|
|
693
|
+
_request_timeout: Union[
|
|
694
|
+
None,
|
|
695
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
696
|
+
Tuple[
|
|
697
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
698
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
699
|
+
]
|
|
700
|
+
] = None,
|
|
701
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
702
|
+
_content_type: Optional[StrictStr] = None,
|
|
703
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
704
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
705
|
+
) -> ApiResponse[AdminPipeline]:
|
|
706
|
+
"""Update attributes for a given pipeline.
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
710
|
+
:type pipeline_name: str
|
|
711
|
+
:param pipeline_version: The integer version of the pipeline. (required)
|
|
712
|
+
:type pipeline_version: int
|
|
713
|
+
:param update_pipeline_request_body: (required)
|
|
714
|
+
:type update_pipeline_request_body: UpdatePipelineRequestBody
|
|
715
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
716
|
+
number provided, it will be total request
|
|
717
|
+
timeout. It can also be a pair (tuple) of
|
|
718
|
+
(connection, read) timeouts.
|
|
719
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
720
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
721
|
+
request; this effectively ignores the
|
|
722
|
+
authentication in the spec for a single request.
|
|
723
|
+
:type _request_auth: dict, optional
|
|
724
|
+
:param _content_type: force content-type for the request.
|
|
725
|
+
:type _content_type: str, Optional
|
|
726
|
+
:param _headers: set to override the headers for a single
|
|
727
|
+
request; this effectively ignores the headers
|
|
728
|
+
in the spec for a single request.
|
|
729
|
+
:type _headers: dict, optional
|
|
730
|
+
:param _host_index: set to override the host_index for a single
|
|
731
|
+
request; this effectively ignores the host_index
|
|
732
|
+
in the spec for a single request.
|
|
733
|
+
:type _host_index: int, optional
|
|
734
|
+
:return: Returns the result object.
|
|
735
|
+
""" # noqa: E501
|
|
736
|
+
|
|
737
|
+
_param = self._update_pipeline_serialize(
|
|
738
|
+
pipeline_name=pipeline_name,
|
|
739
|
+
pipeline_version=pipeline_version,
|
|
740
|
+
update_pipeline_request_body=update_pipeline_request_body,
|
|
741
|
+
_request_auth=_request_auth,
|
|
742
|
+
_content_type=_content_type,
|
|
743
|
+
_headers=_headers,
|
|
744
|
+
_host_index=_host_index
|
|
745
|
+
)
|
|
746
|
+
|
|
747
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
748
|
+
'200': "AdminPipeline",
|
|
749
|
+
'400': "ErrorReport",
|
|
750
|
+
'403': "ErrorReport",
|
|
751
|
+
'500': "ErrorReport",
|
|
752
|
+
}
|
|
753
|
+
response_data = self.api_client.call_api(
|
|
754
|
+
*_param,
|
|
755
|
+
_request_timeout=_request_timeout
|
|
756
|
+
)
|
|
757
|
+
response_data.read()
|
|
758
|
+
return self.api_client.response_deserialize(
|
|
759
|
+
response_data=response_data,
|
|
760
|
+
response_types_map=_response_types_map,
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
@validate_call
|
|
765
|
+
def update_pipeline_without_preload_content(
|
|
766
|
+
self,
|
|
767
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
768
|
+
pipeline_version: Annotated[StrictInt, Field(description="The integer version of the pipeline.")],
|
|
769
|
+
update_pipeline_request_body: UpdatePipelineRequestBody,
|
|
770
|
+
_request_timeout: Union[
|
|
771
|
+
None,
|
|
772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
773
|
+
Tuple[
|
|
774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
776
|
+
]
|
|
777
|
+
] = None,
|
|
778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
779
|
+
_content_type: Optional[StrictStr] = None,
|
|
780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
782
|
+
) -> RESTResponseType:
|
|
783
|
+
"""Update attributes for a given pipeline.
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
787
|
+
:type pipeline_name: str
|
|
788
|
+
:param pipeline_version: The integer version of the pipeline. (required)
|
|
789
|
+
:type pipeline_version: int
|
|
790
|
+
:param update_pipeline_request_body: (required)
|
|
791
|
+
:type update_pipeline_request_body: UpdatePipelineRequestBody
|
|
792
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
793
|
+
number provided, it will be total request
|
|
794
|
+
timeout. It can also be a pair (tuple) of
|
|
795
|
+
(connection, read) timeouts.
|
|
796
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
797
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
798
|
+
request; this effectively ignores the
|
|
799
|
+
authentication in the spec for a single request.
|
|
800
|
+
:type _request_auth: dict, optional
|
|
801
|
+
:param _content_type: force content-type for the request.
|
|
802
|
+
:type _content_type: str, Optional
|
|
803
|
+
:param _headers: set to override the headers for a single
|
|
804
|
+
request; this effectively ignores the headers
|
|
805
|
+
in the spec for a single request.
|
|
806
|
+
:type _headers: dict, optional
|
|
807
|
+
:param _host_index: set to override the host_index for a single
|
|
808
|
+
request; this effectively ignores the host_index
|
|
809
|
+
in the spec for a single request.
|
|
810
|
+
:type _host_index: int, optional
|
|
811
|
+
:return: Returns the result object.
|
|
812
|
+
""" # noqa: E501
|
|
813
|
+
|
|
814
|
+
_param = self._update_pipeline_serialize(
|
|
815
|
+
pipeline_name=pipeline_name,
|
|
816
|
+
pipeline_version=pipeline_version,
|
|
817
|
+
update_pipeline_request_body=update_pipeline_request_body,
|
|
818
|
+
_request_auth=_request_auth,
|
|
819
|
+
_content_type=_content_type,
|
|
820
|
+
_headers=_headers,
|
|
821
|
+
_host_index=_host_index
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
825
|
+
'200': "AdminPipeline",
|
|
826
|
+
'400': "ErrorReport",
|
|
827
|
+
'403': "ErrorReport",
|
|
828
|
+
'500': "ErrorReport",
|
|
829
|
+
}
|
|
830
|
+
response_data = self.api_client.call_api(
|
|
831
|
+
*_param,
|
|
832
|
+
_request_timeout=_request_timeout
|
|
833
|
+
)
|
|
834
|
+
return response_data.response
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
def _update_pipeline_serialize(
|
|
838
|
+
self,
|
|
839
|
+
pipeline_name,
|
|
840
|
+
pipeline_version,
|
|
841
|
+
update_pipeline_request_body,
|
|
842
|
+
_request_auth,
|
|
843
|
+
_content_type,
|
|
844
|
+
_headers,
|
|
845
|
+
_host_index,
|
|
846
|
+
) -> RequestSerialized:
|
|
847
|
+
|
|
848
|
+
_host = None
|
|
849
|
+
|
|
850
|
+
_collection_formats: Dict[str, str] = {
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
_path_params: Dict[str, str] = {}
|
|
854
|
+
_query_params: List[Tuple[str, str]] = []
|
|
855
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
856
|
+
_form_params: List[Tuple[str, str]] = []
|
|
857
|
+
_files: Dict[
|
|
858
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
859
|
+
] = {}
|
|
860
|
+
_body_params: Optional[bytes] = None
|
|
861
|
+
|
|
862
|
+
# process the path parameters
|
|
863
|
+
if pipeline_name is not None:
|
|
864
|
+
_path_params['pipelineName'] = pipeline_name
|
|
865
|
+
if pipeline_version is not None:
|
|
866
|
+
_path_params['pipelineVersion'] = pipeline_version
|
|
867
|
+
# process the query parameters
|
|
868
|
+
# process the header parameters
|
|
869
|
+
# process the form parameters
|
|
870
|
+
# process the body parameter
|
|
871
|
+
if update_pipeline_request_body is not None:
|
|
872
|
+
_body_params = update_pipeline_request_body
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
# set the HTTP header `Accept`
|
|
876
|
+
if 'Accept' not in _header_params:
|
|
877
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
878
|
+
[
|
|
879
|
+
'application/json'
|
|
880
|
+
]
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
# set the HTTP header `Content-Type`
|
|
884
|
+
if _content_type:
|
|
885
|
+
_header_params['Content-Type'] = _content_type
|
|
886
|
+
else:
|
|
887
|
+
_default_content_type = (
|
|
888
|
+
self.api_client.select_header_content_type(
|
|
889
|
+
[
|
|
890
|
+
'application/json'
|
|
891
|
+
]
|
|
892
|
+
)
|
|
893
|
+
)
|
|
894
|
+
if _default_content_type is not None:
|
|
895
|
+
_header_params['Content-Type'] = _default_content_type
|
|
896
|
+
|
|
897
|
+
# authentication setting
|
|
898
|
+
_auth_settings: List[str] = [
|
|
899
|
+
'oidc',
|
|
900
|
+
'bearerAuth'
|
|
901
|
+
]
|
|
902
|
+
|
|
903
|
+
return self.api_client.param_serialize(
|
|
904
|
+
method='PATCH',
|
|
905
|
+
resource_path='/api/admin/v1/pipelines/{pipelineName}/{pipelineVersion}',
|
|
906
|
+
path_params=_path_params,
|
|
907
|
+
query_params=_query_params,
|
|
908
|
+
header_params=_header_params,
|
|
909
|
+
body=_body_params,
|
|
910
|
+
post_params=_form_params,
|
|
911
|
+
files=_files,
|
|
912
|
+
auth_settings=_auth_settings,
|
|
913
|
+
collection_formats=_collection_formats,
|
|
914
|
+
_host=_host,
|
|
915
|
+
_request_auth=_request_auth
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
@validate_call
|
|
922
|
+
def update_quota_limit_for_pipeline_and_user(
|
|
923
|
+
self,
|
|
924
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
925
|
+
user_id: Annotated[StrictStr, Field(description="A string identifier to used to identify a Terra user")],
|
|
926
|
+
update_quota_limit_request_body: UpdateQuotaLimitRequestBody,
|
|
927
|
+
_request_timeout: Union[
|
|
928
|
+
None,
|
|
929
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
930
|
+
Tuple[
|
|
931
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
932
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
933
|
+
]
|
|
934
|
+
] = None,
|
|
935
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
936
|
+
_content_type: Optional[StrictStr] = None,
|
|
937
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
938
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
939
|
+
) -> AdminQuota:
|
|
940
|
+
"""Update quota limit for a given pipeline and user.
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
944
|
+
:type pipeline_name: str
|
|
945
|
+
:param user_id: A string identifier to used to identify a Terra user (required)
|
|
946
|
+
:type user_id: str
|
|
947
|
+
:param update_quota_limit_request_body: (required)
|
|
948
|
+
:type update_quota_limit_request_body: UpdateQuotaLimitRequestBody
|
|
949
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
950
|
+
number provided, it will be total request
|
|
951
|
+
timeout. It can also be a pair (tuple) of
|
|
952
|
+
(connection, read) timeouts.
|
|
953
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
954
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
955
|
+
request; this effectively ignores the
|
|
956
|
+
authentication in the spec for a single request.
|
|
957
|
+
:type _request_auth: dict, optional
|
|
958
|
+
:param _content_type: force content-type for the request.
|
|
959
|
+
:type _content_type: str, Optional
|
|
960
|
+
:param _headers: set to override the headers for a single
|
|
961
|
+
request; this effectively ignores the headers
|
|
962
|
+
in the spec for a single request.
|
|
963
|
+
:type _headers: dict, optional
|
|
964
|
+
:param _host_index: set to override the host_index for a single
|
|
965
|
+
request; this effectively ignores the host_index
|
|
966
|
+
in the spec for a single request.
|
|
967
|
+
:type _host_index: int, optional
|
|
968
|
+
:return: Returns the result object.
|
|
969
|
+
""" # noqa: E501
|
|
970
|
+
|
|
971
|
+
_param = self._update_quota_limit_for_pipeline_and_user_serialize(
|
|
972
|
+
pipeline_name=pipeline_name,
|
|
973
|
+
user_id=user_id,
|
|
974
|
+
update_quota_limit_request_body=update_quota_limit_request_body,
|
|
975
|
+
_request_auth=_request_auth,
|
|
976
|
+
_content_type=_content_type,
|
|
977
|
+
_headers=_headers,
|
|
978
|
+
_host_index=_host_index
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
982
|
+
'200': "AdminQuota",
|
|
983
|
+
'400': "ErrorReport",
|
|
984
|
+
'403': "ErrorReport",
|
|
985
|
+
'500': "ErrorReport",
|
|
986
|
+
}
|
|
987
|
+
response_data = self.api_client.call_api(
|
|
988
|
+
*_param,
|
|
989
|
+
_request_timeout=_request_timeout
|
|
990
|
+
)
|
|
991
|
+
response_data.read()
|
|
992
|
+
return self.api_client.response_deserialize(
|
|
993
|
+
response_data=response_data,
|
|
994
|
+
response_types_map=_response_types_map,
|
|
995
|
+
).data
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
@validate_call
|
|
999
|
+
def update_quota_limit_for_pipeline_and_user_with_http_info(
|
|
1000
|
+
self,
|
|
1001
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
1002
|
+
user_id: Annotated[StrictStr, Field(description="A string identifier to used to identify a Terra user")],
|
|
1003
|
+
update_quota_limit_request_body: UpdateQuotaLimitRequestBody,
|
|
1004
|
+
_request_timeout: Union[
|
|
1005
|
+
None,
|
|
1006
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1007
|
+
Tuple[
|
|
1008
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1009
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1010
|
+
]
|
|
1011
|
+
] = None,
|
|
1012
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1013
|
+
_content_type: Optional[StrictStr] = None,
|
|
1014
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1015
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1016
|
+
) -> ApiResponse[AdminQuota]:
|
|
1017
|
+
"""Update quota limit for a given pipeline and user.
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
1021
|
+
:type pipeline_name: str
|
|
1022
|
+
:param user_id: A string identifier to used to identify a Terra user (required)
|
|
1023
|
+
:type user_id: str
|
|
1024
|
+
:param update_quota_limit_request_body: (required)
|
|
1025
|
+
:type update_quota_limit_request_body: UpdateQuotaLimitRequestBody
|
|
1026
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1027
|
+
number provided, it will be total request
|
|
1028
|
+
timeout. It can also be a pair (tuple) of
|
|
1029
|
+
(connection, read) timeouts.
|
|
1030
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1031
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1032
|
+
request; this effectively ignores the
|
|
1033
|
+
authentication in the spec for a single request.
|
|
1034
|
+
:type _request_auth: dict, optional
|
|
1035
|
+
:param _content_type: force content-type for the request.
|
|
1036
|
+
:type _content_type: str, Optional
|
|
1037
|
+
:param _headers: set to override the headers for a single
|
|
1038
|
+
request; this effectively ignores the headers
|
|
1039
|
+
in the spec for a single request.
|
|
1040
|
+
:type _headers: dict, optional
|
|
1041
|
+
:param _host_index: set to override the host_index for a single
|
|
1042
|
+
request; this effectively ignores the host_index
|
|
1043
|
+
in the spec for a single request.
|
|
1044
|
+
:type _host_index: int, optional
|
|
1045
|
+
:return: Returns the result object.
|
|
1046
|
+
""" # noqa: E501
|
|
1047
|
+
|
|
1048
|
+
_param = self._update_quota_limit_for_pipeline_and_user_serialize(
|
|
1049
|
+
pipeline_name=pipeline_name,
|
|
1050
|
+
user_id=user_id,
|
|
1051
|
+
update_quota_limit_request_body=update_quota_limit_request_body,
|
|
1052
|
+
_request_auth=_request_auth,
|
|
1053
|
+
_content_type=_content_type,
|
|
1054
|
+
_headers=_headers,
|
|
1055
|
+
_host_index=_host_index
|
|
1056
|
+
)
|
|
1057
|
+
|
|
1058
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1059
|
+
'200': "AdminQuota",
|
|
1060
|
+
'400': "ErrorReport",
|
|
1061
|
+
'403': "ErrorReport",
|
|
1062
|
+
'500': "ErrorReport",
|
|
1063
|
+
}
|
|
1064
|
+
response_data = self.api_client.call_api(
|
|
1065
|
+
*_param,
|
|
1066
|
+
_request_timeout=_request_timeout
|
|
1067
|
+
)
|
|
1068
|
+
response_data.read()
|
|
1069
|
+
return self.api_client.response_deserialize(
|
|
1070
|
+
response_data=response_data,
|
|
1071
|
+
response_types_map=_response_types_map,
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
@validate_call
|
|
1076
|
+
def update_quota_limit_for_pipeline_and_user_without_preload_content(
|
|
1077
|
+
self,
|
|
1078
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
1079
|
+
user_id: Annotated[StrictStr, Field(description="A string identifier to used to identify a Terra user")],
|
|
1080
|
+
update_quota_limit_request_body: UpdateQuotaLimitRequestBody,
|
|
1081
|
+
_request_timeout: Union[
|
|
1082
|
+
None,
|
|
1083
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1084
|
+
Tuple[
|
|
1085
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1086
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1087
|
+
]
|
|
1088
|
+
] = None,
|
|
1089
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1090
|
+
_content_type: Optional[StrictStr] = None,
|
|
1091
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1092
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1093
|
+
) -> RESTResponseType:
|
|
1094
|
+
"""Update quota limit for a given pipeline and user.
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
1098
|
+
:type pipeline_name: str
|
|
1099
|
+
:param user_id: A string identifier to used to identify a Terra user (required)
|
|
1100
|
+
:type user_id: str
|
|
1101
|
+
:param update_quota_limit_request_body: (required)
|
|
1102
|
+
:type update_quota_limit_request_body: UpdateQuotaLimitRequestBody
|
|
1103
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1104
|
+
number provided, it will be total request
|
|
1105
|
+
timeout. It can also be a pair (tuple) of
|
|
1106
|
+
(connection, read) timeouts.
|
|
1107
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1108
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1109
|
+
request; this effectively ignores the
|
|
1110
|
+
authentication in the spec for a single request.
|
|
1111
|
+
:type _request_auth: dict, optional
|
|
1112
|
+
:param _content_type: force content-type for the request.
|
|
1113
|
+
:type _content_type: str, Optional
|
|
1114
|
+
:param _headers: set to override the headers for a single
|
|
1115
|
+
request; this effectively ignores the headers
|
|
1116
|
+
in the spec for a single request.
|
|
1117
|
+
:type _headers: dict, optional
|
|
1118
|
+
:param _host_index: set to override the host_index for a single
|
|
1119
|
+
request; this effectively ignores the host_index
|
|
1120
|
+
in the spec for a single request.
|
|
1121
|
+
:type _host_index: int, optional
|
|
1122
|
+
:return: Returns the result object.
|
|
1123
|
+
""" # noqa: E501
|
|
1124
|
+
|
|
1125
|
+
_param = self._update_quota_limit_for_pipeline_and_user_serialize(
|
|
1126
|
+
pipeline_name=pipeline_name,
|
|
1127
|
+
user_id=user_id,
|
|
1128
|
+
update_quota_limit_request_body=update_quota_limit_request_body,
|
|
1129
|
+
_request_auth=_request_auth,
|
|
1130
|
+
_content_type=_content_type,
|
|
1131
|
+
_headers=_headers,
|
|
1132
|
+
_host_index=_host_index
|
|
1133
|
+
)
|
|
1134
|
+
|
|
1135
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1136
|
+
'200': "AdminQuota",
|
|
1137
|
+
'400': "ErrorReport",
|
|
1138
|
+
'403': "ErrorReport",
|
|
1139
|
+
'500': "ErrorReport",
|
|
1140
|
+
}
|
|
1141
|
+
response_data = self.api_client.call_api(
|
|
1142
|
+
*_param,
|
|
1143
|
+
_request_timeout=_request_timeout
|
|
1144
|
+
)
|
|
1145
|
+
return response_data.response
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
def _update_quota_limit_for_pipeline_and_user_serialize(
|
|
1149
|
+
self,
|
|
1150
|
+
pipeline_name,
|
|
1151
|
+
user_id,
|
|
1152
|
+
update_quota_limit_request_body,
|
|
1153
|
+
_request_auth,
|
|
1154
|
+
_content_type,
|
|
1155
|
+
_headers,
|
|
1156
|
+
_host_index,
|
|
1157
|
+
) -> RequestSerialized:
|
|
1158
|
+
|
|
1159
|
+
_host = None
|
|
1160
|
+
|
|
1161
|
+
_collection_formats: Dict[str, str] = {
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
_path_params: Dict[str, str] = {}
|
|
1165
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1166
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1167
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1168
|
+
_files: Dict[
|
|
1169
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1170
|
+
] = {}
|
|
1171
|
+
_body_params: Optional[bytes] = None
|
|
1172
|
+
|
|
1173
|
+
# process the path parameters
|
|
1174
|
+
if pipeline_name is not None:
|
|
1175
|
+
_path_params['pipelineName'] = pipeline_name
|
|
1176
|
+
if user_id is not None:
|
|
1177
|
+
_path_params['userId'] = user_id
|
|
1178
|
+
# process the query parameters
|
|
1179
|
+
# process the header parameters
|
|
1180
|
+
# process the form parameters
|
|
1181
|
+
# process the body parameter
|
|
1182
|
+
if update_quota_limit_request_body is not None:
|
|
1183
|
+
_body_params = update_quota_limit_request_body
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
# set the HTTP header `Accept`
|
|
1187
|
+
if 'Accept' not in _header_params:
|
|
1188
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1189
|
+
[
|
|
1190
|
+
'application/json'
|
|
1191
|
+
]
|
|
1192
|
+
)
|
|
1193
|
+
|
|
1194
|
+
# set the HTTP header `Content-Type`
|
|
1195
|
+
if _content_type:
|
|
1196
|
+
_header_params['Content-Type'] = _content_type
|
|
1197
|
+
else:
|
|
1198
|
+
_default_content_type = (
|
|
1199
|
+
self.api_client.select_header_content_type(
|
|
1200
|
+
[
|
|
1201
|
+
'application/json'
|
|
1202
|
+
]
|
|
1203
|
+
)
|
|
1204
|
+
)
|
|
1205
|
+
if _default_content_type is not None:
|
|
1206
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1207
|
+
|
|
1208
|
+
# authentication setting
|
|
1209
|
+
_auth_settings: List[str] = [
|
|
1210
|
+
'oidc',
|
|
1211
|
+
'bearerAuth'
|
|
1212
|
+
]
|
|
1213
|
+
|
|
1214
|
+
return self.api_client.param_serialize(
|
|
1215
|
+
method='PATCH',
|
|
1216
|
+
resource_path='/api/admin/v1/quotas/{pipelineName}/{userId}',
|
|
1217
|
+
path_params=_path_params,
|
|
1218
|
+
query_params=_query_params,
|
|
1219
|
+
header_params=_header_params,
|
|
1220
|
+
body=_body_params,
|
|
1221
|
+
post_params=_form_params,
|
|
1222
|
+
files=_files,
|
|
1223
|
+
auth_settings=_auth_settings,
|
|
1224
|
+
collection_formats=_collection_formats,
|
|
1225
|
+
_host=_host,
|
|
1226
|
+
_request_auth=_request_auth
|
|
1227
|
+
)
|
|
1228
|
+
|
|
1229
|
+
|