terra-scientific-pipelines-service-api-client 0.1.4__py3-none-any.whl → 0.1.6__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 +3 -1
- teaspoons_client/api/__init__.py +1 -0
- teaspoons_client/api/quotas_api.py +303 -0
- teaspoons_client/api_client.py +1 -1
- teaspoons_client/configuration.py +1 -1
- teaspoons_client/models/__init__.py +1 -0
- teaspoons_client/models/quota_with_details.py +91 -0
- {terra_scientific_pipelines_service_api_client-0.1.4.dist-info → terra_scientific_pipelines_service_api_client-0.1.6.dist-info}/METADATA +1 -1
- {terra_scientific_pipelines_service_api_client-0.1.4.dist-info → terra_scientific_pipelines_service_api_client-0.1.6.dist-info}/RECORD +11 -9
- {terra_scientific_pipelines_service_api_client-0.1.4.dist-info → terra_scientific_pipelines_service_api_client-0.1.6.dist-info}/WHEEL +0 -0
- {terra_scientific_pipelines_service_api_client-0.1.4.dist-info → terra_scientific_pipelines_service_api_client-0.1.6.dist-info}/top_level.txt +0 -0
teaspoons_client/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "0.1.
|
|
17
|
+
__version__ = "0.1.6"
|
|
18
18
|
|
|
19
19
|
# import apis into sdk package
|
|
20
20
|
from teaspoons_client.api.admin_api import AdminApi
|
|
@@ -22,6 +22,7 @@ from teaspoons_client.api.jobs_api import JobsApi
|
|
|
22
22
|
from teaspoons_client.api.pipeline_runs_api import PipelineRunsApi
|
|
23
23
|
from teaspoons_client.api.pipelines_api import PipelinesApi
|
|
24
24
|
from teaspoons_client.api.public_api import PublicApi
|
|
25
|
+
from teaspoons_client.api.quotas_api import QuotasApi
|
|
25
26
|
|
|
26
27
|
# import ApiClient
|
|
27
28
|
from teaspoons_client.api_response import ApiResponse
|
|
@@ -51,6 +52,7 @@ from teaspoons_client.models.pipeline_user_provided_input_definition import Pipe
|
|
|
51
52
|
from teaspoons_client.models.pipeline_with_details import PipelineWithDetails
|
|
52
53
|
from teaspoons_client.models.prepare_pipeline_run_request_body import PreparePipelineRunRequestBody
|
|
53
54
|
from teaspoons_client.models.prepare_pipeline_run_response import PreparePipelineRunResponse
|
|
55
|
+
from teaspoons_client.models.quota_with_details import QuotaWithDetails
|
|
54
56
|
from teaspoons_client.models.start_pipeline_run_request_body import StartPipelineRunRequestBody
|
|
55
57
|
from teaspoons_client.models.system_status import SystemStatus
|
|
56
58
|
from teaspoons_client.models.system_status_systems_value import SystemStatusSystemsValue
|
teaspoons_client/api/__init__.py
CHANGED
|
@@ -6,4 +6,5 @@ from teaspoons_client.api.jobs_api import JobsApi
|
|
|
6
6
|
from teaspoons_client.api.pipeline_runs_api import PipelineRunsApi
|
|
7
7
|
from teaspoons_client.api.pipelines_api import PipelinesApi
|
|
8
8
|
from teaspoons_client.api.public_api import PublicApi
|
|
9
|
+
from teaspoons_client.api.quotas_api import QuotasApi
|
|
9
10
|
|
|
@@ -0,0 +1,303 @@
|
|
|
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, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from teaspoons_client.models.quota_with_details import QuotaWithDetails
|
|
22
|
+
|
|
23
|
+
from teaspoons_client.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from teaspoons_client.api_response import ApiResponse
|
|
25
|
+
from teaspoons_client.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class QuotasApi:
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
def get_quota_for_pipeline(
|
|
43
|
+
self,
|
|
44
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
45
|
+
_request_timeout: Union[
|
|
46
|
+
None,
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
48
|
+
Tuple[
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
51
|
+
]
|
|
52
|
+
] = None,
|
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
57
|
+
) -> QuotaWithDetails:
|
|
58
|
+
"""Return info about the user's quota usage for the specified pipeline
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
62
|
+
:type pipeline_name: str
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._get_quota_for_pipeline_serialize(
|
|
86
|
+
pipeline_name=pipeline_name,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
'200': "QuotaWithDetails",
|
|
95
|
+
'400': "ErrorReport",
|
|
96
|
+
'500': "ErrorReport",
|
|
97
|
+
}
|
|
98
|
+
response_data = self.api_client.call_api(
|
|
99
|
+
*_param,
|
|
100
|
+
_request_timeout=_request_timeout
|
|
101
|
+
)
|
|
102
|
+
response_data.read()
|
|
103
|
+
return self.api_client.response_deserialize(
|
|
104
|
+
response_data=response_data,
|
|
105
|
+
response_types_map=_response_types_map,
|
|
106
|
+
).data
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
def get_quota_for_pipeline_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
125
|
+
) -> ApiResponse[QuotaWithDetails]:
|
|
126
|
+
"""Return info about the user's quota usage for the specified pipeline
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
130
|
+
:type pipeline_name: str
|
|
131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
132
|
+
number provided, it will be total request
|
|
133
|
+
timeout. It can also be a pair (tuple) of
|
|
134
|
+
(connection, read) timeouts.
|
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
137
|
+
request; this effectively ignores the
|
|
138
|
+
authentication in the spec for a single request.
|
|
139
|
+
:type _request_auth: dict, optional
|
|
140
|
+
:param _content_type: force content-type for the request.
|
|
141
|
+
:type _content_type: str, Optional
|
|
142
|
+
:param _headers: set to override the headers for a single
|
|
143
|
+
request; this effectively ignores the headers
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _headers: dict, optional
|
|
146
|
+
:param _host_index: set to override the host_index for a single
|
|
147
|
+
request; this effectively ignores the host_index
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _host_index: int, optional
|
|
150
|
+
:return: Returns the result object.
|
|
151
|
+
""" # noqa: E501
|
|
152
|
+
|
|
153
|
+
_param = self._get_quota_for_pipeline_serialize(
|
|
154
|
+
pipeline_name=pipeline_name,
|
|
155
|
+
_request_auth=_request_auth,
|
|
156
|
+
_content_type=_content_type,
|
|
157
|
+
_headers=_headers,
|
|
158
|
+
_host_index=_host_index
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
162
|
+
'200': "QuotaWithDetails",
|
|
163
|
+
'400': "ErrorReport",
|
|
164
|
+
'500': "ErrorReport",
|
|
165
|
+
}
|
|
166
|
+
response_data = self.api_client.call_api(
|
|
167
|
+
*_param,
|
|
168
|
+
_request_timeout=_request_timeout
|
|
169
|
+
)
|
|
170
|
+
response_data.read()
|
|
171
|
+
return self.api_client.response_deserialize(
|
|
172
|
+
response_data=response_data,
|
|
173
|
+
response_types_map=_response_types_map,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@validate_call
|
|
178
|
+
def get_quota_for_pipeline_without_preload_content(
|
|
179
|
+
self,
|
|
180
|
+
pipeline_name: Annotated[StrictStr, Field(description="A string identifier to used to identify a pipeline in the service.")],
|
|
181
|
+
_request_timeout: Union[
|
|
182
|
+
None,
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Tuple[
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
187
|
+
]
|
|
188
|
+
] = None,
|
|
189
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
190
|
+
_content_type: Optional[StrictStr] = None,
|
|
191
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
192
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
193
|
+
) -> RESTResponseType:
|
|
194
|
+
"""Return info about the user's quota usage for the specified pipeline
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
:param pipeline_name: A string identifier to used to identify a pipeline in the service. (required)
|
|
198
|
+
:type pipeline_name: str
|
|
199
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
200
|
+
number provided, it will be total request
|
|
201
|
+
timeout. It can also be a pair (tuple) of
|
|
202
|
+
(connection, read) timeouts.
|
|
203
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
204
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
205
|
+
request; this effectively ignores the
|
|
206
|
+
authentication in the spec for a single request.
|
|
207
|
+
:type _request_auth: dict, optional
|
|
208
|
+
:param _content_type: force content-type for the request.
|
|
209
|
+
:type _content_type: str, Optional
|
|
210
|
+
:param _headers: set to override the headers for a single
|
|
211
|
+
request; this effectively ignores the headers
|
|
212
|
+
in the spec for a single request.
|
|
213
|
+
:type _headers: dict, optional
|
|
214
|
+
:param _host_index: set to override the host_index for a single
|
|
215
|
+
request; this effectively ignores the host_index
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _host_index: int, optional
|
|
218
|
+
:return: Returns the result object.
|
|
219
|
+
""" # noqa: E501
|
|
220
|
+
|
|
221
|
+
_param = self._get_quota_for_pipeline_serialize(
|
|
222
|
+
pipeline_name=pipeline_name,
|
|
223
|
+
_request_auth=_request_auth,
|
|
224
|
+
_content_type=_content_type,
|
|
225
|
+
_headers=_headers,
|
|
226
|
+
_host_index=_host_index
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
230
|
+
'200': "QuotaWithDetails",
|
|
231
|
+
'400': "ErrorReport",
|
|
232
|
+
'500': "ErrorReport",
|
|
233
|
+
}
|
|
234
|
+
response_data = self.api_client.call_api(
|
|
235
|
+
*_param,
|
|
236
|
+
_request_timeout=_request_timeout
|
|
237
|
+
)
|
|
238
|
+
return response_data.response
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _get_quota_for_pipeline_serialize(
|
|
242
|
+
self,
|
|
243
|
+
pipeline_name,
|
|
244
|
+
_request_auth,
|
|
245
|
+
_content_type,
|
|
246
|
+
_headers,
|
|
247
|
+
_host_index,
|
|
248
|
+
) -> RequestSerialized:
|
|
249
|
+
|
|
250
|
+
_host = None
|
|
251
|
+
|
|
252
|
+
_collection_formats: Dict[str, str] = {
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
_path_params: Dict[str, str] = {}
|
|
256
|
+
_query_params: List[Tuple[str, str]] = []
|
|
257
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
258
|
+
_form_params: List[Tuple[str, str]] = []
|
|
259
|
+
_files: Dict[
|
|
260
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
261
|
+
] = {}
|
|
262
|
+
_body_params: Optional[bytes] = None
|
|
263
|
+
|
|
264
|
+
# process the path parameters
|
|
265
|
+
if pipeline_name is not None:
|
|
266
|
+
_path_params['pipelineName'] = pipeline_name
|
|
267
|
+
# process the query parameters
|
|
268
|
+
# process the header parameters
|
|
269
|
+
# process the form parameters
|
|
270
|
+
# process the body parameter
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# set the HTTP header `Accept`
|
|
274
|
+
if 'Accept' not in _header_params:
|
|
275
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
276
|
+
[
|
|
277
|
+
'application/json'
|
|
278
|
+
]
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# authentication setting
|
|
283
|
+
_auth_settings: List[str] = [
|
|
284
|
+
'oidc',
|
|
285
|
+
'bearerAuth'
|
|
286
|
+
]
|
|
287
|
+
|
|
288
|
+
return self.api_client.param_serialize(
|
|
289
|
+
method='GET',
|
|
290
|
+
resource_path='/api/quotas/v1/{pipelineName}',
|
|
291
|
+
path_params=_path_params,
|
|
292
|
+
query_params=_query_params,
|
|
293
|
+
header_params=_header_params,
|
|
294
|
+
body=_body_params,
|
|
295
|
+
post_params=_form_params,
|
|
296
|
+
files=_files,
|
|
297
|
+
auth_settings=_auth_settings,
|
|
298
|
+
collection_formats=_collection_formats,
|
|
299
|
+
_host=_host,
|
|
300
|
+
_request_auth=_request_auth
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
|
teaspoons_client/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'terra-scientific-pipelines-service-api-client/0.1.
|
|
93
|
+
self.user_agent = 'terra-scientific-pipelines-service-api-client/0.1.6/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
|
@@ -399,7 +399,7 @@ class Configuration:
|
|
|
399
399
|
"OS: {env}\n"\
|
|
400
400
|
"Python Version: {pyversion}\n"\
|
|
401
401
|
"Version of the API: 1.0.0\n"\
|
|
402
|
-
"SDK Package Version: 0.1.
|
|
402
|
+
"SDK Package Version: 0.1.6".\
|
|
403
403
|
format(env=sys.platform, pyversion=sys.version)
|
|
404
404
|
|
|
405
405
|
def get_host_settings(self):
|
|
@@ -30,6 +30,7 @@ from teaspoons_client.models.pipeline_user_provided_input_definition import Pipe
|
|
|
30
30
|
from teaspoons_client.models.pipeline_with_details import PipelineWithDetails
|
|
31
31
|
from teaspoons_client.models.prepare_pipeline_run_request_body import PreparePipelineRunRequestBody
|
|
32
32
|
from teaspoons_client.models.prepare_pipeline_run_response import PreparePipelineRunResponse
|
|
33
|
+
from teaspoons_client.models.quota_with_details import QuotaWithDetails
|
|
33
34
|
from teaspoons_client.models.start_pipeline_run_request_body import StartPipelineRunRequestBody
|
|
34
35
|
from teaspoons_client.models.system_status import SystemStatus
|
|
35
36
|
from teaspoons_client.models.system_status_systems_value import SystemStatusSystemsValue
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class QuotaWithDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Object containing the pipeline identifier, quota limit, and quota usage of a Pipeline.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
pipeline_name: StrictStr = Field(description="The identifier string for the Pipeline. ", alias="pipelineName")
|
|
30
|
+
quota_limit: StrictInt = Field(description="Maximum allowable quota for the pipeline ", alias="quotaLimit")
|
|
31
|
+
quota_consumed: StrictInt = Field(description="Quota consumed by the user ", alias="quotaConsumed")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["pipelineName", "quotaLimit", "quotaConsumed"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of QuotaWithDetails from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of QuotaWithDetails from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"pipelineName": obj.get("pipelineName"),
|
|
86
|
+
"quotaLimit": obj.get("quotaLimit"),
|
|
87
|
+
"quotaConsumed": obj.get("quotaConsumed")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
teaspoons_client/__init__.py,sha256=
|
|
2
|
-
teaspoons_client/api_client.py,sha256
|
|
1
|
+
teaspoons_client/__init__.py,sha256=c1h1gJ-0-FgrEot63HGBJn9aOeZpxx7LEHZCVd8cA4o,2971
|
|
2
|
+
teaspoons_client/api_client.py,sha256=xK4-TTO3mFZxxFWLb5u8IkMC-RRkZzCGnAlcmUWqATM,27534
|
|
3
3
|
teaspoons_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
teaspoons_client/configuration.py,sha256=
|
|
4
|
+
teaspoons_client/configuration.py,sha256=fI6NqRZrT1r-8CMZpNUmHSwJw30HmShPp7igFnfSo7M,15584
|
|
5
5
|
teaspoons_client/exceptions.py,sha256=54himL4zduna12UfdUqGb8LEVunPChzEvjvPw0DjWjk,5999
|
|
6
6
|
teaspoons_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
teaspoons_client/rest.py,sha256=wRFTSvE7v-UjFP1_9oozGWnt8ERYW-PReLkFJZHiWYI,9441
|
|
8
|
-
teaspoons_client/api/__init__.py,sha256=
|
|
8
|
+
teaspoons_client/api/__init__.py,sha256=j4nfxEv5WV8rGkUs8vl0-ZGilqzKUPZfFV_FGq0cg_c,385
|
|
9
9
|
teaspoons_client/api/admin_api.py,sha256=ZQY_kbDZolLp34J0j1JJ1cy2yC5PPYML6y3vhGW6ka8,23925
|
|
10
10
|
teaspoons_client/api/jobs_api.py,sha256=erVrdxvQubuUpvqIyAqAlD0nYc-TQlxH5ZhE9_lH6iE,22994
|
|
11
11
|
teaspoons_client/api/pipeline_runs_api.py,sha256=pkYlLSCfma6TQsLGPOFBUJj65UbS3YZIEfim5Z8Kgdk,49631
|
|
12
12
|
teaspoons_client/api/pipelines_api.py,sha256=kTqVQ9kf816Qyns4ocquXIH-b0C_MK-6dx0HOMsXHpk,21192
|
|
13
13
|
teaspoons_client/api/public_api.py,sha256=cYrfhy7epadJPWvXO7xvjhyNRH72bKVXtUmjefezbl0,19743
|
|
14
|
-
teaspoons_client/
|
|
14
|
+
teaspoons_client/api/quotas_api.py,sha256=fU2ZE0B-5ELvkNdXHTWCw0asfLDNK4WetlKVvpWETmI,11862
|
|
15
|
+
teaspoons_client/models/__init__.py,sha256=kUQAgMQB8FtJvjlKUZo_kDWk6xo83hXj32N2jPhW9O0,2072
|
|
15
16
|
teaspoons_client/models/admin_pipeline.py,sha256=3Ci4-PVXjqO3bgRLrTdRsfEVEsXSS5XDtARQdMOGJnI,4349
|
|
16
17
|
teaspoons_client/models/async_pipeline_run_response.py,sha256=c_Nj3tC41y2G0pqvVwzKn_bVE6mgA2h_Aisp6315zSE,3899
|
|
17
18
|
teaspoons_client/models/error_report.py,sha256=3IsEF07EPxdcMSPCMW4yE1pXydE8EHmlIBYVScvXyXs,2714
|
|
@@ -28,12 +29,13 @@ teaspoons_client/models/pipeline_user_provided_input_definition.py,sha256=jEC7yU
|
|
|
28
29
|
teaspoons_client/models/pipeline_with_details.py,sha256=c489n3m6bswOGKGnVLupcB-KCAVgQdihUnNKov9LSmA,3929
|
|
29
30
|
teaspoons_client/models/prepare_pipeline_run_request_body.py,sha256=UhsnYEuFFX8dQ2BryxH-A0zgchwBCz69JDJPvaxQOig,3147
|
|
30
31
|
teaspoons_client/models/prepare_pipeline_run_response.py,sha256=5Y-NTPjxR13brTHbCWU-1YBXERUWRsg7ShNRK1bcyJM,2948
|
|
32
|
+
teaspoons_client/models/quota_with_details.py,sha256=9f7y_SL5NQ17Jbi9PFAAMphXEc718AjQE1O3P8dRsq0,3066
|
|
31
33
|
teaspoons_client/models/start_pipeline_run_request_body.py,sha256=Et4zcC9UVnINscI4OVtmHlhe1MvPgMq0819sNqyLLOw,3167
|
|
32
34
|
teaspoons_client/models/system_status.py,sha256=615Ol6vBFowfewWesLeQe6aljaKMXIZb1rgWxt5FNsg,3305
|
|
33
35
|
teaspoons_client/models/system_status_systems_value.py,sha256=lKuq0aDpRne858ta4gvSZL7JMqc7V3TJcVUmj9-OgOo,2675
|
|
34
36
|
teaspoons_client/models/update_pipeline_request_body.py,sha256=OYjf_6SVBg00GjGzq9aftbeLJkUHikm80sqFQQSWvUQ,3257
|
|
35
37
|
teaspoons_client/models/version_properties.py,sha256=pnx1pduz4vnw-wx_sdASU_-zRqE1wf3JdNm4OLDJ2i8,2888
|
|
36
|
-
terra_scientific_pipelines_service_api_client-0.1.
|
|
37
|
-
terra_scientific_pipelines_service_api_client-0.1.
|
|
38
|
-
terra_scientific_pipelines_service_api_client-0.1.
|
|
39
|
-
terra_scientific_pipelines_service_api_client-0.1.
|
|
38
|
+
terra_scientific_pipelines_service_api_client-0.1.6.dist-info/METADATA,sha256=ekC01HE2DCvo4ovmYNnbtdyTI8Ma2O6YR_smvkigDpw,592
|
|
39
|
+
terra_scientific_pipelines_service_api_client-0.1.6.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
40
|
+
terra_scientific_pipelines_service_api_client-0.1.6.dist-info/top_level.txt,sha256=DZYs7jBZ-_bWvnXrtK1TbtfhltgkuPWTRo1Ei7Uv9Jc,17
|
|
41
|
+
terra_scientific_pipelines_service_api_client-0.1.6.dist-info/RECORD,,
|
|
File without changes
|