cirro-api-client 0.0.1__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.
- cirro_api_client/__init__.py +119 -0
- cirro_api_client/api/__init__.py +17 -0
- cirro_api_client/api/billing_api.py +716 -0
- cirro_api_client/api/dashboards_api.py +772 -0
- cirro_api_client/api/datasets_api.py +1503 -0
- cirro_api_client/api/execution_api.py +956 -0
- cirro_api_client/api/file_api.py +345 -0
- cirro_api_client/api/metadata_api.py +638 -0
- cirro_api_client/api/metrics_api.py +294 -0
- cirro_api_client/api/notebooks_api.py +886 -0
- cirro_api_client/api/processes_api.py +1148 -0
- cirro_api_client/api/projects_api.py +1148 -0
- cirro_api_client/api/references_api.py +826 -0
- cirro_api_client/api/system_api.py +281 -0
- cirro_api_client/api/users_api.py +605 -0
- cirro_api_client/api_client.py +738 -0
- cirro_api_client/api_response.py +21 -0
- cirro_api_client/cirro_api_client.py +39 -0
- cirro_api_client/configuration.py +322 -0
- cirro_api_client/exceptions.py +201 -0
- cirro_api_client/models/__init__.py +90 -0
- cirro_api_client/models/access_type.py +48 -0
- cirro_api_client/models/allowed_data_type.py +102 -0
- cirro_api_client/models/aws_credentials.py +98 -0
- cirro_api_client/models/billing_account.py +118 -0
- cirro_api_client/models/billing_account_request.py +113 -0
- cirro_api_client/models/billing_method.py +47 -0
- cirro_api_client/models/budget_period.py +47 -0
- cirro_api_client/models/cloud_account.py +115 -0
- cirro_api_client/models/contact.py +95 -0
- cirro_api_client/models/create_notebook_instance_request.py +104 -0
- cirro_api_client/models/create_reference_request.py +97 -0
- cirro_api_client/models/create_response.py +91 -0
- cirro_api_client/models/custom_pipeline_settings.py +124 -0
- cirro_api_client/models/customer_type.py +47 -0
- cirro_api_client/models/dashboard.py +106 -0
- cirro_api_client/models/dashboard_request.py +99 -0
- cirro_api_client/models/dataset.py +120 -0
- cirro_api_client/models/dataset_assets_manifest.py +110 -0
- cirro_api_client/models/dataset_detail.py +127 -0
- cirro_api_client/models/dataset_viz.py +96 -0
- cirro_api_client/models/error_message.py +89 -0
- cirro_api_client/models/executor.py +47 -0
- cirro_api_client/models/file_access_request.py +105 -0
- cirro_api_client/models/file_entry.py +94 -0
- cirro_api_client/models/file_name_pattern.py +92 -0
- cirro_api_client/models/file_requirements.py +102 -0
- cirro_api_client/models/form_schema.py +92 -0
- cirro_api_client/models/generate_sftp_credentials_request.py +91 -0
- cirro_api_client/models/get_execution_logs_response.py +97 -0
- cirro_api_client/models/import_data_request.py +95 -0
- cirro_api_client/models/invite_user_request.py +95 -0
- cirro_api_client/models/invite_user_response.py +89 -0
- cirro_api_client/models/log_entry.py +92 -0
- cirro_api_client/models/metric_record.py +94 -0
- cirro_api_client/models/notebook_instance.py +107 -0
- cirro_api_client/models/notebook_instance_status_response.py +92 -0
- cirro_api_client/models/open_notebook_instance_response.py +91 -0
- cirro_api_client/models/paginated_response_dataset_list_dto.py +100 -0
- cirro_api_client/models/paginated_response_sample_dto.py +100 -0
- cirro_api_client/models/pipeline_code.py +105 -0
- cirro_api_client/models/portal_error_response.py +104 -0
- cirro_api_client/models/process.py +109 -0
- cirro_api_client/models/process_detail.py +146 -0
- cirro_api_client/models/process_detail_all_of_pipeline_code.py +105 -0
- cirro_api_client/models/project.py +109 -0
- cirro_api_client/models/project_detail.py +133 -0
- cirro_api_client/models/project_metrics.py +109 -0
- cirro_api_client/models/project_request.py +137 -0
- cirro_api_client/models/project_role.py +48 -0
- cirro_api_client/models/project_settings.py +170 -0
- cirro_api_client/models/project_user.py +100 -0
- cirro_api_client/models/reference.py +110 -0
- cirro_api_client/models/reference_type.py +95 -0
- cirro_api_client/models/repository_type.py +48 -0
- cirro_api_client/models/resources_info.py +96 -0
- cirro_api_client/models/run_analysis_request.py +103 -0
- cirro_api_client/models/sample.py +100 -0
- cirro_api_client/models/sample_request.py +93 -0
- cirro_api_client/models/service_connection.py +91 -0
- cirro_api_client/models/set_user_project_role_request.py +95 -0
- cirro_api_client/models/sftp_credentials.py +96 -0
- cirro_api_client/models/status.py +53 -0
- cirro_api_client/models/stop_execution_response.py +92 -0
- cirro_api_client/models/sync_status.py +46 -0
- cirro_api_client/models/system_info_response.py +108 -0
- cirro_api_client/models/tag.py +93 -0
- cirro_api_client/models/task.py +104 -0
- cirro_api_client/models/update_dataset_request.py +105 -0
- cirro_api_client/models/update_user_request.py +99 -0
- cirro_api_client/models/upload_dataset_create_response.py +94 -0
- cirro_api_client/models/upload_dataset_request.py +97 -0
- cirro_api_client/models/user.py +95 -0
- cirro_api_client/models/validate_file_requirements_request.py +92 -0
- cirro_api_client/py.typed +0 -0
- cirro_api_client/rest.py +268 -0
- cirro_api_client-0.0.1.dist-info/METADATA +264 -0
- cirro_api_client-0.0.1.dist-info/RECORD +99 -0
- cirro_api_client-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,716 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cirro Data
|
|
5
|
+
|
|
6
|
+
Cirro Data Platform service API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: latest
|
|
9
|
+
Contact: support@cirro.bio
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from pydantic import StrictBool, StrictStr
|
|
23
|
+
|
|
24
|
+
from typing import List, Optional
|
|
25
|
+
|
|
26
|
+
from cirro_api_client.models.billing_account import BillingAccount
|
|
27
|
+
from cirro_api_client.models.billing_account_request import BillingAccountRequest
|
|
28
|
+
from cirro_api_client.models.create_response import CreateResponse
|
|
29
|
+
|
|
30
|
+
from cirro_api_client.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from cirro_api_client.api_response import ApiResponse
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class BillingApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self._api_client = api_client
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
def create_billing_account(
|
|
48
|
+
self,
|
|
49
|
+
billing_account_request: BillingAccountRequest,
|
|
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
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
) -> CreateResponse:
|
|
60
|
+
"""Create billing account
|
|
61
|
+
|
|
62
|
+
Creates a billing account
|
|
63
|
+
|
|
64
|
+
:param billing_account_request: (required)
|
|
65
|
+
:type billing_account_request: BillingAccountRequest
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _headers: set to override the headers for a single
|
|
72
|
+
request; this effectively ignores the headers
|
|
73
|
+
in the spec for a single request.
|
|
74
|
+
:type _headers: dict, optional
|
|
75
|
+
:return: Returns the result object.
|
|
76
|
+
""" # noqa: E501
|
|
77
|
+
|
|
78
|
+
return self.create_billing_account_raw(**locals()).data
|
|
79
|
+
|
|
80
|
+
@validate_call
|
|
81
|
+
def create_billing_account_raw(
|
|
82
|
+
self,
|
|
83
|
+
billing_account_request: BillingAccountRequest,
|
|
84
|
+
_request_timeout: Union[
|
|
85
|
+
None,
|
|
86
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
87
|
+
Tuple[
|
|
88
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
89
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
90
|
+
]
|
|
91
|
+
] = None,
|
|
92
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
93
|
+
) -> ApiResponse[CreateResponse]:
|
|
94
|
+
"""Create billing account
|
|
95
|
+
|
|
96
|
+
Creates a billing account
|
|
97
|
+
|
|
98
|
+
:param billing_account_request: (required)
|
|
99
|
+
:type billing_account_request: BillingAccountRequest
|
|
100
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
101
|
+
number provided, it will be total request
|
|
102
|
+
timeout. It can also be a pair (tuple) of
|
|
103
|
+
(connection, read) timeouts.
|
|
104
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
105
|
+
:param _headers: set to override the headers for a single
|
|
106
|
+
request; this effectively ignores the headers
|
|
107
|
+
in the spec for a single request.
|
|
108
|
+
:type _headers: dict, optional
|
|
109
|
+
:return: Returns the result object.
|
|
110
|
+
""" # noqa: E501
|
|
111
|
+
|
|
112
|
+
_param = self._create_billing_account_serialize(
|
|
113
|
+
billing_account_request=billing_account_request,
|
|
114
|
+
_headers=_headers,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
118
|
+
'200': "CreateResponse",
|
|
119
|
+
}
|
|
120
|
+
response_data = self._api_client.call_api(
|
|
121
|
+
*_param,
|
|
122
|
+
_request_timeout=_request_timeout
|
|
123
|
+
)
|
|
124
|
+
response_data.read()
|
|
125
|
+
return self._api_client.response_deserialize(
|
|
126
|
+
response_data=response_data,
|
|
127
|
+
response_types_map=_response_types_map,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def _create_billing_account_serialize(
|
|
131
|
+
self,
|
|
132
|
+
billing_account_request,
|
|
133
|
+
_headers,
|
|
134
|
+
) -> RequestSerialized:
|
|
135
|
+
_collection_formats: Dict[str, str] = {
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
_path_params: Dict[str, str] = {}
|
|
139
|
+
_query_params: List[Tuple[str, str]] = []
|
|
140
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
141
|
+
_form_params: List[Tuple[str, str]] = []
|
|
142
|
+
_files: Dict[str, str] = {}
|
|
143
|
+
_body_params: Optional[bytes] = None
|
|
144
|
+
|
|
145
|
+
# process the path parameters
|
|
146
|
+
# process the query parameters
|
|
147
|
+
# process the header parameters
|
|
148
|
+
# process the form parameters
|
|
149
|
+
# process the body parameter
|
|
150
|
+
if billing_account_request is not None:
|
|
151
|
+
_body_params = billing_account_request
|
|
152
|
+
|
|
153
|
+
# set the HTTP header `Accept`
|
|
154
|
+
_header_params['Accept'] = self._api_client.select_header_accept(
|
|
155
|
+
[
|
|
156
|
+
'application/json'
|
|
157
|
+
]
|
|
158
|
+
)
|
|
159
|
+
# set the HTTP header `Content-Type`
|
|
160
|
+
_default_content_type = (
|
|
161
|
+
self.api_client.select_header_content_type(
|
|
162
|
+
[
|
|
163
|
+
'application/json'
|
|
164
|
+
]
|
|
165
|
+
)
|
|
166
|
+
)
|
|
167
|
+
if _default_content_type is not None:
|
|
168
|
+
_header_params['Content-Type'] = _default_content_type
|
|
169
|
+
|
|
170
|
+
# authentication setting
|
|
171
|
+
_auth_settings: List[str] = [
|
|
172
|
+
'accessToken'
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
return self.api_client.param_serialize(
|
|
176
|
+
method='POST',
|
|
177
|
+
resource_path='/billing',
|
|
178
|
+
path_params=_path_params,
|
|
179
|
+
query_params=_query_params,
|
|
180
|
+
header_params=_header_params,
|
|
181
|
+
body=_body_params,
|
|
182
|
+
post_params=_form_params,
|
|
183
|
+
files=_files,
|
|
184
|
+
auth_settings=_auth_settings,
|
|
185
|
+
collection_formats=_collection_formats
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
@validate_call
|
|
189
|
+
def delete_billing_account(
|
|
190
|
+
self,
|
|
191
|
+
billing_account_id: StrictStr,
|
|
192
|
+
_request_timeout: Union[
|
|
193
|
+
None,
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Tuple[
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
198
|
+
]
|
|
199
|
+
] = None,
|
|
200
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
) -> None:
|
|
202
|
+
"""Delete billing account
|
|
203
|
+
|
|
204
|
+
Deletes a billing account
|
|
205
|
+
|
|
206
|
+
:param billing_account_id: (required)
|
|
207
|
+
:type billing_account_id: str
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _headers: set to override the headers for a single
|
|
214
|
+
request; this effectively ignores the headers
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _headers: dict, optional
|
|
217
|
+
:return: Returns the result object.
|
|
218
|
+
""" # noqa: E501
|
|
219
|
+
|
|
220
|
+
return self.delete_billing_account_raw(**locals()).data
|
|
221
|
+
|
|
222
|
+
@validate_call
|
|
223
|
+
def delete_billing_account_raw(
|
|
224
|
+
self,
|
|
225
|
+
billing_account_id: StrictStr,
|
|
226
|
+
_request_timeout: Union[
|
|
227
|
+
None,
|
|
228
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
229
|
+
Tuple[
|
|
230
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
231
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
232
|
+
]
|
|
233
|
+
] = None,
|
|
234
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
235
|
+
) -> ApiResponse[None]:
|
|
236
|
+
"""Delete billing account
|
|
237
|
+
|
|
238
|
+
Deletes a billing account
|
|
239
|
+
|
|
240
|
+
:param billing_account_id: (required)
|
|
241
|
+
:type billing_account_id: str
|
|
242
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
243
|
+
number provided, it will be total request
|
|
244
|
+
timeout. It can also be a pair (tuple) of
|
|
245
|
+
(connection, read) timeouts.
|
|
246
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
247
|
+
:param _headers: set to override the headers for a single
|
|
248
|
+
request; this effectively ignores the headers
|
|
249
|
+
in the spec for a single request.
|
|
250
|
+
:type _headers: dict, optional
|
|
251
|
+
:return: Returns the result object.
|
|
252
|
+
""" # noqa: E501
|
|
253
|
+
|
|
254
|
+
_param = self._delete_billing_account_serialize(
|
|
255
|
+
billing_account_id=billing_account_id,
|
|
256
|
+
_headers=_headers,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
260
|
+
'200': None,
|
|
261
|
+
}
|
|
262
|
+
response_data = self._api_client.call_api(
|
|
263
|
+
*_param,
|
|
264
|
+
_request_timeout=_request_timeout
|
|
265
|
+
)
|
|
266
|
+
response_data.read()
|
|
267
|
+
return self._api_client.response_deserialize(
|
|
268
|
+
response_data=response_data,
|
|
269
|
+
response_types_map=_response_types_map,
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
def _delete_billing_account_serialize(
|
|
273
|
+
self,
|
|
274
|
+
billing_account_id,
|
|
275
|
+
_headers,
|
|
276
|
+
) -> RequestSerialized:
|
|
277
|
+
_collection_formats: Dict[str, str] = {
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
_path_params: Dict[str, str] = {}
|
|
281
|
+
_query_params: List[Tuple[str, str]] = []
|
|
282
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
283
|
+
_form_params: List[Tuple[str, str]] = []
|
|
284
|
+
_files: Dict[str, str] = {}
|
|
285
|
+
_body_params: Optional[bytes] = None
|
|
286
|
+
|
|
287
|
+
# process the path parameters
|
|
288
|
+
if billing_account_id is not None:
|
|
289
|
+
_path_params['billingAccountId'] = billing_account_id
|
|
290
|
+
# process the query parameters
|
|
291
|
+
# process the header parameters
|
|
292
|
+
# process the form parameters
|
|
293
|
+
# process the body parameter
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
# authentication setting
|
|
298
|
+
_auth_settings: List[str] = [
|
|
299
|
+
'accessToken'
|
|
300
|
+
]
|
|
301
|
+
|
|
302
|
+
return self.api_client.param_serialize(
|
|
303
|
+
method='DELETE',
|
|
304
|
+
resource_path='/billing/{billingAccountId}',
|
|
305
|
+
path_params=_path_params,
|
|
306
|
+
query_params=_query_params,
|
|
307
|
+
header_params=_header_params,
|
|
308
|
+
body=_body_params,
|
|
309
|
+
post_params=_form_params,
|
|
310
|
+
files=_files,
|
|
311
|
+
auth_settings=_auth_settings,
|
|
312
|
+
collection_formats=_collection_formats
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
@validate_call
|
|
316
|
+
def generate_billing_report(
|
|
317
|
+
self,
|
|
318
|
+
_request_timeout: Union[
|
|
319
|
+
None,
|
|
320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
321
|
+
Tuple[
|
|
322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
323
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
324
|
+
]
|
|
325
|
+
] = None,
|
|
326
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
327
|
+
) -> None:
|
|
328
|
+
"""Generate billing report
|
|
329
|
+
|
|
330
|
+
Generates a billing report xlsx with cost information
|
|
331
|
+
|
|
332
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
333
|
+
number provided, it will be total request
|
|
334
|
+
timeout. It can also be a pair (tuple) of
|
|
335
|
+
(connection, read) timeouts.
|
|
336
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
337
|
+
:param _headers: set to override the headers for a single
|
|
338
|
+
request; this effectively ignores the headers
|
|
339
|
+
in the spec for a single request.
|
|
340
|
+
:type _headers: dict, optional
|
|
341
|
+
:return: Returns the result object.
|
|
342
|
+
""" # noqa: E501
|
|
343
|
+
|
|
344
|
+
return self.generate_billing_report_raw(**locals()).data
|
|
345
|
+
|
|
346
|
+
@validate_call
|
|
347
|
+
def generate_billing_report_raw(
|
|
348
|
+
self,
|
|
349
|
+
_request_timeout: Union[
|
|
350
|
+
None,
|
|
351
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
352
|
+
Tuple[
|
|
353
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
354
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
355
|
+
]
|
|
356
|
+
] = None,
|
|
357
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
358
|
+
) -> ApiResponse[None]:
|
|
359
|
+
"""Generate billing report
|
|
360
|
+
|
|
361
|
+
Generates a billing report xlsx with cost information
|
|
362
|
+
|
|
363
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
364
|
+
number provided, it will be total request
|
|
365
|
+
timeout. It can also be a pair (tuple) of
|
|
366
|
+
(connection, read) timeouts.
|
|
367
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
368
|
+
:param _headers: set to override the headers for a single
|
|
369
|
+
request; this effectively ignores the headers
|
|
370
|
+
in the spec for a single request.
|
|
371
|
+
:type _headers: dict, optional
|
|
372
|
+
:return: Returns the result object.
|
|
373
|
+
""" # noqa: E501
|
|
374
|
+
|
|
375
|
+
_param = self._generate_billing_report_serialize(
|
|
376
|
+
_headers=_headers,
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
380
|
+
'200': None,
|
|
381
|
+
}
|
|
382
|
+
response_data = self._api_client.call_api(
|
|
383
|
+
*_param,
|
|
384
|
+
_request_timeout=_request_timeout
|
|
385
|
+
)
|
|
386
|
+
response_data.read()
|
|
387
|
+
return self._api_client.response_deserialize(
|
|
388
|
+
response_data=response_data,
|
|
389
|
+
response_types_map=_response_types_map,
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
def _generate_billing_report_serialize(
|
|
393
|
+
self,
|
|
394
|
+
_headers,
|
|
395
|
+
) -> RequestSerialized:
|
|
396
|
+
_collection_formats: Dict[str, str] = {
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
_path_params: Dict[str, str] = {}
|
|
400
|
+
_query_params: List[Tuple[str, str]] = []
|
|
401
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
402
|
+
_form_params: List[Tuple[str, str]] = []
|
|
403
|
+
_files: Dict[str, str] = {}
|
|
404
|
+
_body_params: Optional[bytes] = None
|
|
405
|
+
|
|
406
|
+
# process the path parameters
|
|
407
|
+
# process the query parameters
|
|
408
|
+
# process the header parameters
|
|
409
|
+
# process the form parameters
|
|
410
|
+
# process the body parameter
|
|
411
|
+
|
|
412
|
+
# set the HTTP header `Accept`
|
|
413
|
+
_header_params['Accept'] = self._api_client.select_header_accept(
|
|
414
|
+
[
|
|
415
|
+
'application/vnd.ms-excel'
|
|
416
|
+
]
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
# authentication setting
|
|
420
|
+
_auth_settings: List[str] = [
|
|
421
|
+
'accessToken'
|
|
422
|
+
]
|
|
423
|
+
|
|
424
|
+
return self.api_client.param_serialize(
|
|
425
|
+
method='GET',
|
|
426
|
+
resource_path='/billing-report',
|
|
427
|
+
path_params=_path_params,
|
|
428
|
+
query_params=_query_params,
|
|
429
|
+
header_params=_header_params,
|
|
430
|
+
body=_body_params,
|
|
431
|
+
post_params=_form_params,
|
|
432
|
+
files=_files,
|
|
433
|
+
auth_settings=_auth_settings,
|
|
434
|
+
collection_formats=_collection_formats
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
@validate_call
|
|
438
|
+
def get_billing_accounts(
|
|
439
|
+
self,
|
|
440
|
+
include_archived: Annotated[Optional[StrictBool], Field(description="Include billing accounts that are no longer in use")] = None,
|
|
441
|
+
_request_timeout: Union[
|
|
442
|
+
None,
|
|
443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
444
|
+
Tuple[
|
|
445
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
446
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
447
|
+
]
|
|
448
|
+
] = None,
|
|
449
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
450
|
+
) -> List[BillingAccount]:
|
|
451
|
+
"""List billing accounts
|
|
452
|
+
|
|
453
|
+
Gets a list of billing accounts the current user has access to
|
|
454
|
+
|
|
455
|
+
:param include_archived: Include billing accounts that are no longer in use
|
|
456
|
+
:type include_archived: bool
|
|
457
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
458
|
+
number provided, it will be total request
|
|
459
|
+
timeout. It can also be a pair (tuple) of
|
|
460
|
+
(connection, read) timeouts.
|
|
461
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
462
|
+
:param _headers: set to override the headers for a single
|
|
463
|
+
request; this effectively ignores the headers
|
|
464
|
+
in the spec for a single request.
|
|
465
|
+
:type _headers: dict, optional
|
|
466
|
+
:return: Returns the result object.
|
|
467
|
+
""" # noqa: E501
|
|
468
|
+
|
|
469
|
+
return self.get_billing_accounts_raw(**locals()).data
|
|
470
|
+
|
|
471
|
+
@validate_call
|
|
472
|
+
def get_billing_accounts_raw(
|
|
473
|
+
self,
|
|
474
|
+
include_archived: Annotated[Optional[StrictBool], Field(description="Include billing accounts that are no longer in use")] = None,
|
|
475
|
+
_request_timeout: Union[
|
|
476
|
+
None,
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Tuple[
|
|
479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
481
|
+
]
|
|
482
|
+
] = None,
|
|
483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
) -> ApiResponse[List[BillingAccount]]:
|
|
485
|
+
"""List billing accounts
|
|
486
|
+
|
|
487
|
+
Gets a list of billing accounts the current user has access to
|
|
488
|
+
|
|
489
|
+
:param include_archived: Include billing accounts that are no longer in use
|
|
490
|
+
:type include_archived: bool
|
|
491
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
492
|
+
number provided, it will be total request
|
|
493
|
+
timeout. It can also be a pair (tuple) of
|
|
494
|
+
(connection, read) timeouts.
|
|
495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
496
|
+
:param _headers: set to override the headers for a single
|
|
497
|
+
request; this effectively ignores the headers
|
|
498
|
+
in the spec for a single request.
|
|
499
|
+
:type _headers: dict, optional
|
|
500
|
+
:return: Returns the result object.
|
|
501
|
+
""" # noqa: E501
|
|
502
|
+
|
|
503
|
+
_param = self._get_billing_accounts_serialize(
|
|
504
|
+
include_archived=include_archived,
|
|
505
|
+
_headers=_headers,
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
509
|
+
'200': "List[BillingAccount]",
|
|
510
|
+
}
|
|
511
|
+
response_data = self._api_client.call_api(
|
|
512
|
+
*_param,
|
|
513
|
+
_request_timeout=_request_timeout
|
|
514
|
+
)
|
|
515
|
+
response_data.read()
|
|
516
|
+
return self._api_client.response_deserialize(
|
|
517
|
+
response_data=response_data,
|
|
518
|
+
response_types_map=_response_types_map,
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
def _get_billing_accounts_serialize(
|
|
522
|
+
self,
|
|
523
|
+
include_archived,
|
|
524
|
+
_headers,
|
|
525
|
+
) -> RequestSerialized:
|
|
526
|
+
_collection_formats: Dict[str, str] = {
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
_path_params: Dict[str, str] = {}
|
|
530
|
+
_query_params: List[Tuple[str, str]] = []
|
|
531
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
532
|
+
_form_params: List[Tuple[str, str]] = []
|
|
533
|
+
_files: Dict[str, str] = {}
|
|
534
|
+
_body_params: Optional[bytes] = None
|
|
535
|
+
|
|
536
|
+
# process the path parameters
|
|
537
|
+
# process the query parameters
|
|
538
|
+
if include_archived is not None:
|
|
539
|
+
|
|
540
|
+
_query_params.append(('includeArchived', include_archived))
|
|
541
|
+
|
|
542
|
+
# process the header parameters
|
|
543
|
+
# process the form parameters
|
|
544
|
+
# process the body parameter
|
|
545
|
+
|
|
546
|
+
# set the HTTP header `Accept`
|
|
547
|
+
_header_params['Accept'] = self._api_client.select_header_accept(
|
|
548
|
+
[
|
|
549
|
+
'application/json'
|
|
550
|
+
]
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
# authentication setting
|
|
554
|
+
_auth_settings: List[str] = [
|
|
555
|
+
'accessToken'
|
|
556
|
+
]
|
|
557
|
+
|
|
558
|
+
return self.api_client.param_serialize(
|
|
559
|
+
method='GET',
|
|
560
|
+
resource_path='/billing',
|
|
561
|
+
path_params=_path_params,
|
|
562
|
+
query_params=_query_params,
|
|
563
|
+
header_params=_header_params,
|
|
564
|
+
body=_body_params,
|
|
565
|
+
post_params=_form_params,
|
|
566
|
+
files=_files,
|
|
567
|
+
auth_settings=_auth_settings,
|
|
568
|
+
collection_formats=_collection_formats
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
@validate_call
|
|
572
|
+
def update_billing_account(
|
|
573
|
+
self,
|
|
574
|
+
billing_account_id: StrictStr,
|
|
575
|
+
billing_account_request: BillingAccountRequest,
|
|
576
|
+
_request_timeout: Union[
|
|
577
|
+
None,
|
|
578
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
579
|
+
Tuple[
|
|
580
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
581
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
582
|
+
]
|
|
583
|
+
] = None,
|
|
584
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
585
|
+
) -> None:
|
|
586
|
+
"""Update billing account
|
|
587
|
+
|
|
588
|
+
Updates a billing account
|
|
589
|
+
|
|
590
|
+
:param billing_account_id: (required)
|
|
591
|
+
:type billing_account_id: str
|
|
592
|
+
:param billing_account_request: (required)
|
|
593
|
+
:type billing_account_request: BillingAccountRequest
|
|
594
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
595
|
+
number provided, it will be total request
|
|
596
|
+
timeout. It can also be a pair (tuple) of
|
|
597
|
+
(connection, read) timeouts.
|
|
598
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
599
|
+
:param _headers: set to override the headers for a single
|
|
600
|
+
request; this effectively ignores the headers
|
|
601
|
+
in the spec for a single request.
|
|
602
|
+
:type _headers: dict, optional
|
|
603
|
+
:return: Returns the result object.
|
|
604
|
+
""" # noqa: E501
|
|
605
|
+
|
|
606
|
+
return self.update_billing_account_raw(**locals()).data
|
|
607
|
+
|
|
608
|
+
@validate_call
|
|
609
|
+
def update_billing_account_raw(
|
|
610
|
+
self,
|
|
611
|
+
billing_account_id: StrictStr,
|
|
612
|
+
billing_account_request: BillingAccountRequest,
|
|
613
|
+
_request_timeout: Union[
|
|
614
|
+
None,
|
|
615
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
616
|
+
Tuple[
|
|
617
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
618
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
619
|
+
]
|
|
620
|
+
] = None,
|
|
621
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
622
|
+
) -> ApiResponse[None]:
|
|
623
|
+
"""Update billing account
|
|
624
|
+
|
|
625
|
+
Updates a billing account
|
|
626
|
+
|
|
627
|
+
:param billing_account_id: (required)
|
|
628
|
+
:type billing_account_id: str
|
|
629
|
+
:param billing_account_request: (required)
|
|
630
|
+
:type billing_account_request: BillingAccountRequest
|
|
631
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
632
|
+
number provided, it will be total request
|
|
633
|
+
timeout. It can also be a pair (tuple) of
|
|
634
|
+
(connection, read) timeouts.
|
|
635
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
636
|
+
:param _headers: set to override the headers for a single
|
|
637
|
+
request; this effectively ignores the headers
|
|
638
|
+
in the spec for a single request.
|
|
639
|
+
:type _headers: dict, optional
|
|
640
|
+
:return: Returns the result object.
|
|
641
|
+
""" # noqa: E501
|
|
642
|
+
|
|
643
|
+
_param = self._update_billing_account_serialize(
|
|
644
|
+
billing_account_id=billing_account_id,
|
|
645
|
+
billing_account_request=billing_account_request,
|
|
646
|
+
_headers=_headers,
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
650
|
+
'200': None,
|
|
651
|
+
}
|
|
652
|
+
response_data = self._api_client.call_api(
|
|
653
|
+
*_param,
|
|
654
|
+
_request_timeout=_request_timeout
|
|
655
|
+
)
|
|
656
|
+
response_data.read()
|
|
657
|
+
return self._api_client.response_deserialize(
|
|
658
|
+
response_data=response_data,
|
|
659
|
+
response_types_map=_response_types_map,
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
def _update_billing_account_serialize(
|
|
663
|
+
self,
|
|
664
|
+
billing_account_id,
|
|
665
|
+
billing_account_request,
|
|
666
|
+
_headers,
|
|
667
|
+
) -> RequestSerialized:
|
|
668
|
+
_collection_formats: Dict[str, str] = {
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
_path_params: Dict[str, str] = {}
|
|
672
|
+
_query_params: List[Tuple[str, str]] = []
|
|
673
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
674
|
+
_form_params: List[Tuple[str, str]] = []
|
|
675
|
+
_files: Dict[str, str] = {}
|
|
676
|
+
_body_params: Optional[bytes] = None
|
|
677
|
+
|
|
678
|
+
# process the path parameters
|
|
679
|
+
if billing_account_id is not None:
|
|
680
|
+
_path_params['billingAccountId'] = billing_account_id
|
|
681
|
+
# process the query parameters
|
|
682
|
+
# process the header parameters
|
|
683
|
+
# process the form parameters
|
|
684
|
+
# process the body parameter
|
|
685
|
+
if billing_account_request is not None:
|
|
686
|
+
_body_params = billing_account_request
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
# set the HTTP header `Content-Type`
|
|
690
|
+
_default_content_type = (
|
|
691
|
+
self.api_client.select_header_content_type(
|
|
692
|
+
[
|
|
693
|
+
'application/json'
|
|
694
|
+
]
|
|
695
|
+
)
|
|
696
|
+
)
|
|
697
|
+
if _default_content_type is not None:
|
|
698
|
+
_header_params['Content-Type'] = _default_content_type
|
|
699
|
+
|
|
700
|
+
# authentication setting
|
|
701
|
+
_auth_settings: List[str] = [
|
|
702
|
+
'accessToken'
|
|
703
|
+
]
|
|
704
|
+
|
|
705
|
+
return self.api_client.param_serialize(
|
|
706
|
+
method='PUT',
|
|
707
|
+
resource_path='/billing/{billingAccountId}',
|
|
708
|
+
path_params=_path_params,
|
|
709
|
+
query_params=_query_params,
|
|
710
|
+
header_params=_header_params,
|
|
711
|
+
body=_body_params,
|
|
712
|
+
post_params=_form_params,
|
|
713
|
+
files=_files,
|
|
714
|
+
auth_settings=_auth_settings,
|
|
715
|
+
collection_formats=_collection_formats
|
|
716
|
+
)
|