stackit-automation 0.1.0__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.
Files changed (52) hide show
  1. stackit/automation/__init__.py +187 -0
  2. stackit/automation/api/__init__.py +4 -0
  3. stackit/automation/api/default_api.py +2971 -0
  4. stackit/automation/api_client.py +650 -0
  5. stackit/automation/api_response.py +22 -0
  6. stackit/automation/configuration.py +163 -0
  7. stackit/automation/exceptions.py +218 -0
  8. stackit/automation/models/__init__.py +73 -0
  9. stackit/automation/models/automation_schedule_trigger.py +85 -0
  10. stackit/automation/models/automation_triggers.py +101 -0
  11. stackit/automation/models/create_snapshots_result.py +85 -0
  12. stackit/automation/models/create_volume_automation_payload.py +125 -0
  13. stackit/automation/models/error_info_detail.py +93 -0
  14. stackit/automation/models/error_response.py +90 -0
  15. stackit/automation/models/error_response_content.py +108 -0
  16. stackit/automation/models/error_response_content_details.py +99 -0
  17. stackit/automation/models/event_create_response.py +83 -0
  18. stackit/automation/models/get_volume_ids_result.py +85 -0
  19. stackit/automation/models/get_volume_template_response.py +125 -0
  20. stackit/automation/models/help_error_detail.py +87 -0
  21. stackit/automation/models/list_automations_item.py +146 -0
  22. stackit/automation/models/list_automations_response.py +106 -0
  23. stackit/automation/models/list_executions_item.py +129 -0
  24. stackit/automation/models/list_executions_response.py +106 -0
  25. stackit/automation/models/list_templates_response.py +104 -0
  26. stackit/automation/models/localized_message_error_detail.py +87 -0
  27. stackit/automation/models/partial_update_volume_automation_payload.py +122 -0
  28. stackit/automation/models/schedule.py +84 -0
  29. stackit/automation/models/schedule_details.py +87 -0
  30. stackit/automation/models/schedule_patch_request.py +87 -0
  31. stackit/automation/models/schedule_request.py +87 -0
  32. stackit/automation/models/snapshot_retention_policy.py +99 -0
  33. stackit/automation/models/template.py +108 -0
  34. stackit/automation/models/volume_automation.py +165 -0
  35. stackit/automation/models/volume_automation_input.py +99 -0
  36. stackit/automation/models/volume_execution_automation.py +162 -0
  37. stackit/automation/models/volume_execution_details.py +100 -0
  38. stackit/automation/models/volume_execution_output.py +102 -0
  39. stackit/automation/models/volume_execution_output_step.py +105 -0
  40. stackit/automation/models/volume_execution_response.py +138 -0
  41. stackit/automation/models/volume_output.py +100 -0
  42. stackit/automation/models/volume_output_step.py +94 -0
  43. stackit/automation/models/volume_output_step_result.py +99 -0
  44. stackit/automation/models/volume_recovery_point_management_input.py +118 -0
  45. stackit/automation/models/volume_template_automation_input.py +90 -0
  46. stackit/automation/py.typed +0 -0
  47. stackit/automation/rest.py +164 -0
  48. stackit_automation-0.1.0.dist-info/METADATA +46 -0
  49. stackit_automation-0.1.0.dist-info/RECORD +52 -0
  50. stackit_automation-0.1.0.dist-info/WHEEL +4 -0
  51. stackit_automation-0.1.0.dist-info/licenses/LICENSE.md +201 -0
  52. stackit_automation-0.1.0.dist-info/licenses/NOTICE.txt +2 -0
@@ -0,0 +1,2971 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Automation Service API
5
+
6
+ API endpoints for automation management .
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@stackit.de
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+
17
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18
+ from stackit.core.configuration import Configuration
19
+ from typing_extensions import Annotated
20
+
21
+ from stackit.automation.api_client import ApiClient, RequestSerialized
22
+ from stackit.automation.api_response import ApiResponse
23
+ from stackit.automation.models.create_volume_automation_payload import (
24
+ CreateVolumeAutomationPayload,
25
+ )
26
+ from stackit.automation.models.get_volume_template_response import (
27
+ GetVolumeTemplateResponse,
28
+ )
29
+ from stackit.automation.models.list_automations_response import ListAutomationsResponse
30
+ from stackit.automation.models.list_executions_response import ListExecutionsResponse
31
+ from stackit.automation.models.list_templates_response import ListTemplatesResponse
32
+ from stackit.automation.models.partial_update_volume_automation_payload import (
33
+ PartialUpdateVolumeAutomationPayload,
34
+ )
35
+ from stackit.automation.models.volume_automation import VolumeAutomation
36
+ from stackit.automation.models.volume_execution_response import VolumeExecutionResponse
37
+ from stackit.automation.rest import RESTResponseType
38
+
39
+
40
+ class DefaultApi:
41
+ """NOTE: This class is auto generated by OpenAPI Generator
42
+ Ref: https://openapi-generator.tech
43
+
44
+ Do not edit the class manually.
45
+ """
46
+
47
+ def __init__(self, configuration: Configuration = None) -> None:
48
+ if configuration is None:
49
+ configuration = Configuration()
50
+ self.configuration = configuration
51
+ self.api_client = ApiClient(self.configuration)
52
+
53
+ @validate_call
54
+ def create_volume_automation(
55
+ self,
56
+ project_id: Annotated[StrictStr, Field(description="project Id")],
57
+ region: Annotated[StrictStr, Field(description="region")],
58
+ create_volume_automation_payload: Optional[CreateVolumeAutomationPayload] = None,
59
+ _request_timeout: Union[
60
+ None,
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> VolumeAutomation:
69
+ """Create volume automation
70
+
71
+ Creates a new volume automation
72
+
73
+ :param project_id: project Id (required)
74
+ :type project_id: str
75
+ :param region: region (required)
76
+ :type region: str
77
+ :param create_volume_automation_payload:
78
+ :type create_volume_automation_payload: CreateVolumeAutomationPayload
79
+ :param _request_timeout: timeout setting for this request. If one
80
+ number provided, it will be total request
81
+ timeout. It can also be a pair (tuple) of
82
+ (connection, read) timeouts.
83
+ :type _request_timeout: int, tuple(int, int), optional
84
+ :param _request_auth: set to override the auth_settings for an a single
85
+ request; this effectively ignores the
86
+ authentication in the spec for a single request.
87
+ :type _request_auth: dict, optional
88
+ :param _content_type: force content-type for the request.
89
+ :type _content_type: str, Optional
90
+ :param _headers: set to override the headers for a single
91
+ request; this effectively ignores the headers
92
+ in the spec for a single request.
93
+ :type _headers: dict, optional
94
+ :param _host_index: set to override the host_index for a single
95
+ request; this effectively ignores the host_index
96
+ in the spec for a single request.
97
+ :type _host_index: int, optional
98
+ :return: Returns the result object.
99
+ """ # noqa: E501
100
+
101
+ _param = self._create_volume_automation_serialize(
102
+ project_id=project_id,
103
+ region=region,
104
+ create_volume_automation_payload=create_volume_automation_payload,
105
+ _request_auth=_request_auth,
106
+ _content_type=_content_type,
107
+ _headers=_headers,
108
+ _host_index=_host_index,
109
+ )
110
+
111
+ _response_types_map: Dict[str, Optional[str]] = {
112
+ "201": "VolumeAutomation",
113
+ "400": "ErrorResponse",
114
+ "401": "ErrorResponse",
115
+ "403": "ErrorResponse",
116
+ "404": "ErrorResponse",
117
+ }
118
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
119
+ response_data.read()
120
+ return self.api_client.response_deserialize(
121
+ response_data=response_data,
122
+ response_types_map=_response_types_map,
123
+ ).data
124
+
125
+ @validate_call
126
+ def create_volume_automation_with_http_info(
127
+ self,
128
+ project_id: Annotated[StrictStr, Field(description="project Id")],
129
+ region: Annotated[StrictStr, Field(description="region")],
130
+ create_volume_automation_payload: Optional[CreateVolumeAutomationPayload] = None,
131
+ _request_timeout: Union[
132
+ None,
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
135
+ ] = None,
136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
137
+ _content_type: Optional[StrictStr] = None,
138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
140
+ ) -> ApiResponse[VolumeAutomation]:
141
+ """Create volume automation
142
+
143
+ Creates a new volume automation
144
+
145
+ :param project_id: project Id (required)
146
+ :type project_id: str
147
+ :param region: region (required)
148
+ :type region: str
149
+ :param create_volume_automation_payload:
150
+ :type create_volume_automation_payload: CreateVolumeAutomationPayload
151
+ :param _request_timeout: timeout setting for this request. If one
152
+ number provided, it will be total request
153
+ timeout. It can also be a pair (tuple) of
154
+ (connection, read) timeouts.
155
+ :type _request_timeout: int, tuple(int, int), optional
156
+ :param _request_auth: set to override the auth_settings for an a single
157
+ request; this effectively ignores the
158
+ authentication in the spec for a single request.
159
+ :type _request_auth: dict, optional
160
+ :param _content_type: force content-type for the request.
161
+ :type _content_type: str, Optional
162
+ :param _headers: set to override the headers for a single
163
+ request; this effectively ignores the headers
164
+ in the spec for a single request.
165
+ :type _headers: dict, optional
166
+ :param _host_index: set to override the host_index for a single
167
+ request; this effectively ignores the host_index
168
+ in the spec for a single request.
169
+ :type _host_index: int, optional
170
+ :return: Returns the result object.
171
+ """ # noqa: E501
172
+
173
+ _param = self._create_volume_automation_serialize(
174
+ project_id=project_id,
175
+ region=region,
176
+ create_volume_automation_payload=create_volume_automation_payload,
177
+ _request_auth=_request_auth,
178
+ _content_type=_content_type,
179
+ _headers=_headers,
180
+ _host_index=_host_index,
181
+ )
182
+
183
+ _response_types_map: Dict[str, Optional[str]] = {
184
+ "201": "VolumeAutomation",
185
+ "400": "ErrorResponse",
186
+ "401": "ErrorResponse",
187
+ "403": "ErrorResponse",
188
+ "404": "ErrorResponse",
189
+ }
190
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
191
+ response_data.read()
192
+ return self.api_client.response_deserialize(
193
+ response_data=response_data,
194
+ response_types_map=_response_types_map,
195
+ )
196
+
197
+ @validate_call
198
+ def create_volume_automation_without_preload_content(
199
+ self,
200
+ project_id: Annotated[StrictStr, Field(description="project Id")],
201
+ region: Annotated[StrictStr, Field(description="region")],
202
+ create_volume_automation_payload: Optional[CreateVolumeAutomationPayload] = None,
203
+ _request_timeout: Union[
204
+ None,
205
+ Annotated[StrictFloat, Field(gt=0)],
206
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
207
+ ] = None,
208
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
209
+ _content_type: Optional[StrictStr] = None,
210
+ _headers: Optional[Dict[StrictStr, Any]] = None,
211
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
212
+ ) -> RESTResponseType:
213
+ """Create volume automation
214
+
215
+ Creates a new volume automation
216
+
217
+ :param project_id: project Id (required)
218
+ :type project_id: str
219
+ :param region: region (required)
220
+ :type region: str
221
+ :param create_volume_automation_payload:
222
+ :type create_volume_automation_payload: CreateVolumeAutomationPayload
223
+ :param _request_timeout: timeout setting for this request. If one
224
+ number provided, it will be total request
225
+ timeout. It can also be a pair (tuple) of
226
+ (connection, read) timeouts.
227
+ :type _request_timeout: int, tuple(int, int), optional
228
+ :param _request_auth: set to override the auth_settings for an a single
229
+ request; this effectively ignores the
230
+ authentication in the spec for a single request.
231
+ :type _request_auth: dict, optional
232
+ :param _content_type: force content-type for the request.
233
+ :type _content_type: str, Optional
234
+ :param _headers: set to override the headers for a single
235
+ request; this effectively ignores the headers
236
+ in the spec for a single request.
237
+ :type _headers: dict, optional
238
+ :param _host_index: set to override the host_index for a single
239
+ request; this effectively ignores the host_index
240
+ in the spec for a single request.
241
+ :type _host_index: int, optional
242
+ :return: Returns the result object.
243
+ """ # noqa: E501
244
+
245
+ _param = self._create_volume_automation_serialize(
246
+ project_id=project_id,
247
+ region=region,
248
+ create_volume_automation_payload=create_volume_automation_payload,
249
+ _request_auth=_request_auth,
250
+ _content_type=_content_type,
251
+ _headers=_headers,
252
+ _host_index=_host_index,
253
+ )
254
+
255
+ _response_types_map: Dict[str, Optional[str]] = {
256
+ "201": "VolumeAutomation",
257
+ "400": "ErrorResponse",
258
+ "401": "ErrorResponse",
259
+ "403": "ErrorResponse",
260
+ "404": "ErrorResponse",
261
+ }
262
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
263
+ return response_data.response
264
+
265
+ def _create_volume_automation_serialize(
266
+ self,
267
+ project_id,
268
+ region,
269
+ create_volume_automation_payload,
270
+ _request_auth,
271
+ _content_type,
272
+ _headers,
273
+ _host_index,
274
+ ) -> RequestSerialized:
275
+
276
+ _host = None
277
+
278
+ _collection_formats: Dict[str, str] = {}
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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
285
+ _body_params: Optional[bytes] = None
286
+
287
+ # process the path parameters
288
+ if project_id is not None:
289
+ _path_params["projectId"] = project_id
290
+ if region is not None:
291
+ _path_params["region"] = region
292
+ # process the query parameters
293
+ # process the header parameters
294
+ # process the form parameters
295
+ # process the body parameter
296
+ if create_volume_automation_payload is not None:
297
+ _body_params = create_volume_automation_payload
298
+
299
+ # set the HTTP header `Accept`
300
+ if "Accept" not in _header_params:
301
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
302
+
303
+ # set the HTTP header `Content-Type`
304
+ if _content_type:
305
+ _header_params["Content-Type"] = _content_type
306
+ else:
307
+ _default_content_type = self.api_client.select_header_content_type(["application/json"])
308
+ if _default_content_type is not None:
309
+ _header_params["Content-Type"] = _default_content_type
310
+
311
+ # authentication setting
312
+ _auth_settings: List[str] = []
313
+
314
+ return self.api_client.param_serialize(
315
+ method="POST",
316
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations",
317
+ path_params=_path_params,
318
+ query_params=_query_params,
319
+ header_params=_header_params,
320
+ body=_body_params,
321
+ post_params=_form_params,
322
+ files=_files,
323
+ auth_settings=_auth_settings,
324
+ collection_formats=_collection_formats,
325
+ _host=_host,
326
+ _request_auth=_request_auth,
327
+ )
328
+
329
+ @validate_call
330
+ def create_volume_execution(
331
+ self,
332
+ project_id: Annotated[StrictStr, Field(description="project Id")],
333
+ region: Annotated[StrictStr, Field(description="region")],
334
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
335
+ _request_timeout: Union[
336
+ None,
337
+ Annotated[StrictFloat, Field(gt=0)],
338
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
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
+ ) -> VolumeExecutionResponse:
345
+ """Create volume automation executions
346
+
347
+ Creates a new execution for a specific volume automation
348
+
349
+ :param project_id: project Id (required)
350
+ :type project_id: str
351
+ :param region: region (required)
352
+ :type region: str
353
+ :param automation_id: automation Id (required)
354
+ :type automation_id: str
355
+ :param _request_timeout: timeout setting for this request. If one
356
+ number provided, it will be total request
357
+ timeout. It can also be a pair (tuple) of
358
+ (connection, read) timeouts.
359
+ :type _request_timeout: int, tuple(int, int), optional
360
+ :param _request_auth: set to override the auth_settings for an a single
361
+ request; this effectively ignores the
362
+ authentication in the spec for a single request.
363
+ :type _request_auth: dict, optional
364
+ :param _content_type: force content-type for the request.
365
+ :type _content_type: str, Optional
366
+ :param _headers: set to override the headers for a single
367
+ request; this effectively ignores the headers
368
+ in the spec for a single request.
369
+ :type _headers: dict, optional
370
+ :param _host_index: set to override the host_index for a single
371
+ request; this effectively ignores the host_index
372
+ in the spec for a single request.
373
+ :type _host_index: int, optional
374
+ :return: Returns the result object.
375
+ """ # noqa: E501
376
+
377
+ _param = self._create_volume_execution_serialize(
378
+ project_id=project_id,
379
+ region=region,
380
+ automation_id=automation_id,
381
+ _request_auth=_request_auth,
382
+ _content_type=_content_type,
383
+ _headers=_headers,
384
+ _host_index=_host_index,
385
+ )
386
+
387
+ _response_types_map: Dict[str, Optional[str]] = {
388
+ "201": "VolumeExecutionResponse",
389
+ "400": "ErrorResponse",
390
+ "401": "ErrorResponse",
391
+ "403": "ErrorResponse",
392
+ "404": "ErrorResponse",
393
+ }
394
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
395
+ response_data.read()
396
+ return self.api_client.response_deserialize(
397
+ response_data=response_data,
398
+ response_types_map=_response_types_map,
399
+ ).data
400
+
401
+ @validate_call
402
+ def create_volume_execution_with_http_info(
403
+ self,
404
+ project_id: Annotated[StrictStr, Field(description="project Id")],
405
+ region: Annotated[StrictStr, Field(description="region")],
406
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
407
+ _request_timeout: Union[
408
+ None,
409
+ Annotated[StrictFloat, Field(gt=0)],
410
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
411
+ ] = None,
412
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
413
+ _content_type: Optional[StrictStr] = None,
414
+ _headers: Optional[Dict[StrictStr, Any]] = None,
415
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
416
+ ) -> ApiResponse[VolumeExecutionResponse]:
417
+ """Create volume automation executions
418
+
419
+ Creates a new execution for a specific volume automation
420
+
421
+ :param project_id: project Id (required)
422
+ :type project_id: str
423
+ :param region: region (required)
424
+ :type region: str
425
+ :param automation_id: automation Id (required)
426
+ :type automation_id: str
427
+ :param _request_timeout: timeout setting for this request. If one
428
+ number provided, it will be total request
429
+ timeout. It can also be a pair (tuple) of
430
+ (connection, read) timeouts.
431
+ :type _request_timeout: int, tuple(int, int), optional
432
+ :param _request_auth: set to override the auth_settings for an a single
433
+ request; this effectively ignores the
434
+ authentication in the spec for a single request.
435
+ :type _request_auth: dict, optional
436
+ :param _content_type: force content-type for the request.
437
+ :type _content_type: str, Optional
438
+ :param _headers: set to override the headers for a single
439
+ request; this effectively ignores the headers
440
+ in the spec for a single request.
441
+ :type _headers: dict, optional
442
+ :param _host_index: set to override the host_index for a single
443
+ request; this effectively ignores the host_index
444
+ in the spec for a single request.
445
+ :type _host_index: int, optional
446
+ :return: Returns the result object.
447
+ """ # noqa: E501
448
+
449
+ _param = self._create_volume_execution_serialize(
450
+ project_id=project_id,
451
+ region=region,
452
+ automation_id=automation_id,
453
+ _request_auth=_request_auth,
454
+ _content_type=_content_type,
455
+ _headers=_headers,
456
+ _host_index=_host_index,
457
+ )
458
+
459
+ _response_types_map: Dict[str, Optional[str]] = {
460
+ "201": "VolumeExecutionResponse",
461
+ "400": "ErrorResponse",
462
+ "401": "ErrorResponse",
463
+ "403": "ErrorResponse",
464
+ "404": "ErrorResponse",
465
+ }
466
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
467
+ response_data.read()
468
+ return self.api_client.response_deserialize(
469
+ response_data=response_data,
470
+ response_types_map=_response_types_map,
471
+ )
472
+
473
+ @validate_call
474
+ def create_volume_execution_without_preload_content(
475
+ self,
476
+ project_id: Annotated[StrictStr, Field(description="project Id")],
477
+ region: Annotated[StrictStr, Field(description="region")],
478
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
479
+ _request_timeout: Union[
480
+ None,
481
+ Annotated[StrictFloat, Field(gt=0)],
482
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
483
+ ] = None,
484
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
485
+ _content_type: Optional[StrictStr] = None,
486
+ _headers: Optional[Dict[StrictStr, Any]] = None,
487
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
488
+ ) -> RESTResponseType:
489
+ """Create volume automation executions
490
+
491
+ Creates a new execution for a specific volume automation
492
+
493
+ :param project_id: project Id (required)
494
+ :type project_id: str
495
+ :param region: region (required)
496
+ :type region: str
497
+ :param automation_id: automation Id (required)
498
+ :type automation_id: str
499
+ :param _request_timeout: timeout setting for this request. If one
500
+ number provided, it will be total request
501
+ timeout. It can also be a pair (tuple) of
502
+ (connection, read) timeouts.
503
+ :type _request_timeout: int, tuple(int, int), optional
504
+ :param _request_auth: set to override the auth_settings for an a single
505
+ request; this effectively ignores the
506
+ authentication in the spec for a single request.
507
+ :type _request_auth: dict, optional
508
+ :param _content_type: force content-type for the request.
509
+ :type _content_type: str, Optional
510
+ :param _headers: set to override the headers for a single
511
+ request; this effectively ignores the headers
512
+ in the spec for a single request.
513
+ :type _headers: dict, optional
514
+ :param _host_index: set to override the host_index for a single
515
+ request; this effectively ignores the host_index
516
+ in the spec for a single request.
517
+ :type _host_index: int, optional
518
+ :return: Returns the result object.
519
+ """ # noqa: E501
520
+
521
+ _param = self._create_volume_execution_serialize(
522
+ project_id=project_id,
523
+ region=region,
524
+ automation_id=automation_id,
525
+ _request_auth=_request_auth,
526
+ _content_type=_content_type,
527
+ _headers=_headers,
528
+ _host_index=_host_index,
529
+ )
530
+
531
+ _response_types_map: Dict[str, Optional[str]] = {
532
+ "201": "VolumeExecutionResponse",
533
+ "400": "ErrorResponse",
534
+ "401": "ErrorResponse",
535
+ "403": "ErrorResponse",
536
+ "404": "ErrorResponse",
537
+ }
538
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
539
+ return response_data.response
540
+
541
+ def _create_volume_execution_serialize(
542
+ self,
543
+ project_id,
544
+ region,
545
+ automation_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
+ _path_params: Dict[str, str] = {}
557
+ _query_params: List[Tuple[str, str]] = []
558
+ _header_params: Dict[str, Optional[str]] = _headers or {}
559
+ _form_params: List[Tuple[str, str]] = []
560
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
561
+ _body_params: Optional[bytes] = None
562
+
563
+ # process the path parameters
564
+ if project_id is not None:
565
+ _path_params["projectId"] = project_id
566
+ if region is not None:
567
+ _path_params["region"] = region
568
+ if automation_id is not None:
569
+ _path_params["automationId"] = automation_id
570
+ # process the query parameters
571
+ # process the header parameters
572
+ # process the form parameters
573
+ # process the body parameter
574
+
575
+ # set the HTTP header `Accept`
576
+ if "Accept" not in _header_params:
577
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
578
+
579
+ # authentication setting
580
+ _auth_settings: List[str] = []
581
+
582
+ return self.api_client.param_serialize(
583
+ method="POST",
584
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/{automationId}/executions",
585
+ path_params=_path_params,
586
+ query_params=_query_params,
587
+ header_params=_header_params,
588
+ body=_body_params,
589
+ post_params=_form_params,
590
+ files=_files,
591
+ auth_settings=_auth_settings,
592
+ collection_formats=_collection_formats,
593
+ _host=_host,
594
+ _request_auth=_request_auth,
595
+ )
596
+
597
+ @validate_call
598
+ def delete_volume_automation(
599
+ self,
600
+ project_id: Annotated[StrictStr, Field(description="project Id")],
601
+ region: Annotated[StrictStr, Field(description="region")],
602
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
603
+ _request_timeout: Union[
604
+ None,
605
+ Annotated[StrictFloat, Field(gt=0)],
606
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
607
+ ] = None,
608
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
609
+ _content_type: Optional[StrictStr] = None,
610
+ _headers: Optional[Dict[StrictStr, Any]] = None,
611
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
612
+ ) -> None:
613
+ """Delete volume automation
614
+
615
+ Deletes a specific volume automation.
616
+
617
+ :param project_id: project Id (required)
618
+ :type project_id: str
619
+ :param region: region (required)
620
+ :type region: str
621
+ :param automation_id: automation Id (required)
622
+ :type automation_id: str
623
+ :param _request_timeout: timeout setting for this request. If one
624
+ number provided, it will be total request
625
+ timeout. It can also be a pair (tuple) of
626
+ (connection, read) timeouts.
627
+ :type _request_timeout: int, tuple(int, int), optional
628
+ :param _request_auth: set to override the auth_settings for an a single
629
+ request; this effectively ignores the
630
+ authentication in the spec for a single request.
631
+ :type _request_auth: dict, optional
632
+ :param _content_type: force content-type for the request.
633
+ :type _content_type: str, Optional
634
+ :param _headers: set to override the headers for a single
635
+ request; this effectively ignores the headers
636
+ in the spec for a single request.
637
+ :type _headers: dict, optional
638
+ :param _host_index: set to override the host_index for a single
639
+ request; this effectively ignores the host_index
640
+ in the spec for a single request.
641
+ :type _host_index: int, optional
642
+ :return: Returns the result object.
643
+ """ # noqa: E501
644
+
645
+ _param = self._delete_volume_automation_serialize(
646
+ project_id=project_id,
647
+ region=region,
648
+ automation_id=automation_id,
649
+ _request_auth=_request_auth,
650
+ _content_type=_content_type,
651
+ _headers=_headers,
652
+ _host_index=_host_index,
653
+ )
654
+
655
+ _response_types_map: Dict[str, Optional[str]] = {
656
+ "204": None,
657
+ "400": "ErrorResponse",
658
+ "401": "ErrorResponse",
659
+ "403": "ErrorResponse",
660
+ "404": "ErrorResponse",
661
+ }
662
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
663
+ response_data.read()
664
+ return self.api_client.response_deserialize(
665
+ response_data=response_data,
666
+ response_types_map=_response_types_map,
667
+ ).data
668
+
669
+ @validate_call
670
+ def delete_volume_automation_with_http_info(
671
+ self,
672
+ project_id: Annotated[StrictStr, Field(description="project Id")],
673
+ region: Annotated[StrictStr, Field(description="region")],
674
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
675
+ _request_timeout: Union[
676
+ None,
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
679
+ ] = None,
680
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
681
+ _content_type: Optional[StrictStr] = None,
682
+ _headers: Optional[Dict[StrictStr, Any]] = None,
683
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
684
+ ) -> ApiResponse[None]:
685
+ """Delete volume automation
686
+
687
+ Deletes a specific volume automation.
688
+
689
+ :param project_id: project Id (required)
690
+ :type project_id: str
691
+ :param region: region (required)
692
+ :type region: str
693
+ :param automation_id: automation Id (required)
694
+ :type automation_id: str
695
+ :param _request_timeout: timeout setting for this request. If one
696
+ number provided, it will be total request
697
+ timeout. It can also be a pair (tuple) of
698
+ (connection, read) timeouts.
699
+ :type _request_timeout: int, tuple(int, int), optional
700
+ :param _request_auth: set to override the auth_settings for an a single
701
+ request; this effectively ignores the
702
+ authentication in the spec for a single request.
703
+ :type _request_auth: dict, optional
704
+ :param _content_type: force content-type for the request.
705
+ :type _content_type: str, Optional
706
+ :param _headers: set to override the headers for a single
707
+ request; this effectively ignores the headers
708
+ in the spec for a single request.
709
+ :type _headers: dict, optional
710
+ :param _host_index: set to override the host_index for a single
711
+ request; this effectively ignores the host_index
712
+ in the spec for a single request.
713
+ :type _host_index: int, optional
714
+ :return: Returns the result object.
715
+ """ # noqa: E501
716
+
717
+ _param = self._delete_volume_automation_serialize(
718
+ project_id=project_id,
719
+ region=region,
720
+ automation_id=automation_id,
721
+ _request_auth=_request_auth,
722
+ _content_type=_content_type,
723
+ _headers=_headers,
724
+ _host_index=_host_index,
725
+ )
726
+
727
+ _response_types_map: Dict[str, Optional[str]] = {
728
+ "204": None,
729
+ "400": "ErrorResponse",
730
+ "401": "ErrorResponse",
731
+ "403": "ErrorResponse",
732
+ "404": "ErrorResponse",
733
+ }
734
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
735
+ response_data.read()
736
+ return self.api_client.response_deserialize(
737
+ response_data=response_data,
738
+ response_types_map=_response_types_map,
739
+ )
740
+
741
+ @validate_call
742
+ def delete_volume_automation_without_preload_content(
743
+ self,
744
+ project_id: Annotated[StrictStr, Field(description="project Id")],
745
+ region: Annotated[StrictStr, Field(description="region")],
746
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
747
+ _request_timeout: Union[
748
+ None,
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
751
+ ] = None,
752
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
753
+ _content_type: Optional[StrictStr] = None,
754
+ _headers: Optional[Dict[StrictStr, Any]] = None,
755
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
756
+ ) -> RESTResponseType:
757
+ """Delete volume automation
758
+
759
+ Deletes a specific volume automation.
760
+
761
+ :param project_id: project Id (required)
762
+ :type project_id: str
763
+ :param region: region (required)
764
+ :type region: str
765
+ :param automation_id: automation Id (required)
766
+ :type automation_id: str
767
+ :param _request_timeout: timeout setting for this request. If one
768
+ number provided, it will be total request
769
+ timeout. It can also be a pair (tuple) of
770
+ (connection, read) timeouts.
771
+ :type _request_timeout: int, tuple(int, int), optional
772
+ :param _request_auth: set to override the auth_settings for an a single
773
+ request; this effectively ignores the
774
+ authentication in the spec for a single request.
775
+ :type _request_auth: dict, optional
776
+ :param _content_type: force content-type for the request.
777
+ :type _content_type: str, Optional
778
+ :param _headers: set to override the headers for a single
779
+ request; this effectively ignores the headers
780
+ in the spec for a single request.
781
+ :type _headers: dict, optional
782
+ :param _host_index: set to override the host_index for a single
783
+ request; this effectively ignores the host_index
784
+ in the spec for a single request.
785
+ :type _host_index: int, optional
786
+ :return: Returns the result object.
787
+ """ # noqa: E501
788
+
789
+ _param = self._delete_volume_automation_serialize(
790
+ project_id=project_id,
791
+ region=region,
792
+ automation_id=automation_id,
793
+ _request_auth=_request_auth,
794
+ _content_type=_content_type,
795
+ _headers=_headers,
796
+ _host_index=_host_index,
797
+ )
798
+
799
+ _response_types_map: Dict[str, Optional[str]] = {
800
+ "204": None,
801
+ "400": "ErrorResponse",
802
+ "401": "ErrorResponse",
803
+ "403": "ErrorResponse",
804
+ "404": "ErrorResponse",
805
+ }
806
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
807
+ return response_data.response
808
+
809
+ def _delete_volume_automation_serialize(
810
+ self,
811
+ project_id,
812
+ region,
813
+ automation_id,
814
+ _request_auth,
815
+ _content_type,
816
+ _headers,
817
+ _host_index,
818
+ ) -> RequestSerialized:
819
+
820
+ _host = None
821
+
822
+ _collection_formats: Dict[str, str] = {}
823
+
824
+ _path_params: Dict[str, str] = {}
825
+ _query_params: List[Tuple[str, str]] = []
826
+ _header_params: Dict[str, Optional[str]] = _headers or {}
827
+ _form_params: List[Tuple[str, str]] = []
828
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
829
+ _body_params: Optional[bytes] = None
830
+
831
+ # process the path parameters
832
+ if project_id is not None:
833
+ _path_params["projectId"] = project_id
834
+ if region is not None:
835
+ _path_params["region"] = region
836
+ if automation_id is not None:
837
+ _path_params["automationId"] = automation_id
838
+ # process the query parameters
839
+ # process the header parameters
840
+ # process the form parameters
841
+ # process the body parameter
842
+
843
+ # set the HTTP header `Accept`
844
+ if "Accept" not in _header_params:
845
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
846
+
847
+ # authentication setting
848
+ _auth_settings: List[str] = []
849
+
850
+ return self.api_client.param_serialize(
851
+ method="DELETE",
852
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/{automationId}",
853
+ path_params=_path_params,
854
+ query_params=_query_params,
855
+ header_params=_header_params,
856
+ body=_body_params,
857
+ post_params=_form_params,
858
+ files=_files,
859
+ auth_settings=_auth_settings,
860
+ collection_formats=_collection_formats,
861
+ _host=_host,
862
+ _request_auth=_request_auth,
863
+ )
864
+
865
+ @validate_call
866
+ def get_volume_automation(
867
+ self,
868
+ project_id: Annotated[StrictStr, Field(description="project Id")],
869
+ region: Annotated[StrictStr, Field(description="region")],
870
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
871
+ _request_timeout: Union[
872
+ None,
873
+ Annotated[StrictFloat, Field(gt=0)],
874
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
875
+ ] = None,
876
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
877
+ _content_type: Optional[StrictStr] = None,
878
+ _headers: Optional[Dict[StrictStr, Any]] = None,
879
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
880
+ ) -> VolumeAutomation:
881
+ """Get volume automation
882
+
883
+ Retrieves a specific volume automation.
884
+
885
+ :param project_id: project Id (required)
886
+ :type project_id: str
887
+ :param region: region (required)
888
+ :type region: str
889
+ :param automation_id: automation Id (required)
890
+ :type automation_id: str
891
+ :param _request_timeout: timeout setting for this request. If one
892
+ number provided, it will be total request
893
+ timeout. It can also be a pair (tuple) of
894
+ (connection, read) timeouts.
895
+ :type _request_timeout: int, tuple(int, int), optional
896
+ :param _request_auth: set to override the auth_settings for an a single
897
+ request; this effectively ignores the
898
+ authentication in the spec for a single request.
899
+ :type _request_auth: dict, optional
900
+ :param _content_type: force content-type for the request.
901
+ :type _content_type: str, Optional
902
+ :param _headers: set to override the headers for a single
903
+ request; this effectively ignores the headers
904
+ in the spec for a single request.
905
+ :type _headers: dict, optional
906
+ :param _host_index: set to override the host_index for a single
907
+ request; this effectively ignores the host_index
908
+ in the spec for a single request.
909
+ :type _host_index: int, optional
910
+ :return: Returns the result object.
911
+ """ # noqa: E501
912
+
913
+ _param = self._get_volume_automation_serialize(
914
+ project_id=project_id,
915
+ region=region,
916
+ automation_id=automation_id,
917
+ _request_auth=_request_auth,
918
+ _content_type=_content_type,
919
+ _headers=_headers,
920
+ _host_index=_host_index,
921
+ )
922
+
923
+ _response_types_map: Dict[str, Optional[str]] = {
924
+ "200": "VolumeAutomation",
925
+ "400": "ErrorResponse",
926
+ "401": "ErrorResponse",
927
+ "403": "ErrorResponse",
928
+ "404": "ErrorResponse",
929
+ }
930
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
931
+ response_data.read()
932
+ return self.api_client.response_deserialize(
933
+ response_data=response_data,
934
+ response_types_map=_response_types_map,
935
+ ).data
936
+
937
+ @validate_call
938
+ def get_volume_automation_with_http_info(
939
+ self,
940
+ project_id: Annotated[StrictStr, Field(description="project Id")],
941
+ region: Annotated[StrictStr, Field(description="region")],
942
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
943
+ _request_timeout: Union[
944
+ None,
945
+ Annotated[StrictFloat, Field(gt=0)],
946
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
947
+ ] = None,
948
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
949
+ _content_type: Optional[StrictStr] = None,
950
+ _headers: Optional[Dict[StrictStr, Any]] = None,
951
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
952
+ ) -> ApiResponse[VolumeAutomation]:
953
+ """Get volume automation
954
+
955
+ Retrieves a specific volume automation.
956
+
957
+ :param project_id: project Id (required)
958
+ :type project_id: str
959
+ :param region: region (required)
960
+ :type region: str
961
+ :param automation_id: automation Id (required)
962
+ :type automation_id: str
963
+ :param _request_timeout: timeout setting for this request. If one
964
+ number provided, it will be total request
965
+ timeout. It can also be a pair (tuple) of
966
+ (connection, read) timeouts.
967
+ :type _request_timeout: int, tuple(int, int), optional
968
+ :param _request_auth: set to override the auth_settings for an a single
969
+ request; this effectively ignores the
970
+ authentication in the spec for a single request.
971
+ :type _request_auth: dict, optional
972
+ :param _content_type: force content-type for the request.
973
+ :type _content_type: str, Optional
974
+ :param _headers: set to override the headers for a single
975
+ request; this effectively ignores the headers
976
+ in the spec for a single request.
977
+ :type _headers: dict, optional
978
+ :param _host_index: set to override the host_index for a single
979
+ request; this effectively ignores the host_index
980
+ in the spec for a single request.
981
+ :type _host_index: int, optional
982
+ :return: Returns the result object.
983
+ """ # noqa: E501
984
+
985
+ _param = self._get_volume_automation_serialize(
986
+ project_id=project_id,
987
+ region=region,
988
+ automation_id=automation_id,
989
+ _request_auth=_request_auth,
990
+ _content_type=_content_type,
991
+ _headers=_headers,
992
+ _host_index=_host_index,
993
+ )
994
+
995
+ _response_types_map: Dict[str, Optional[str]] = {
996
+ "200": "VolumeAutomation",
997
+ "400": "ErrorResponse",
998
+ "401": "ErrorResponse",
999
+ "403": "ErrorResponse",
1000
+ "404": "ErrorResponse",
1001
+ }
1002
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1003
+ response_data.read()
1004
+ return self.api_client.response_deserialize(
1005
+ response_data=response_data,
1006
+ response_types_map=_response_types_map,
1007
+ )
1008
+
1009
+ @validate_call
1010
+ def get_volume_automation_without_preload_content(
1011
+ self,
1012
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1013
+ region: Annotated[StrictStr, Field(description="region")],
1014
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
1015
+ _request_timeout: Union[
1016
+ None,
1017
+ Annotated[StrictFloat, Field(gt=0)],
1018
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1019
+ ] = None,
1020
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1021
+ _content_type: Optional[StrictStr] = None,
1022
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1023
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1024
+ ) -> RESTResponseType:
1025
+ """Get volume automation
1026
+
1027
+ Retrieves a specific volume automation.
1028
+
1029
+ :param project_id: project Id (required)
1030
+ :type project_id: str
1031
+ :param region: region (required)
1032
+ :type region: str
1033
+ :param automation_id: automation Id (required)
1034
+ :type automation_id: str
1035
+ :param _request_timeout: timeout setting for this request. If one
1036
+ number provided, it will be total request
1037
+ timeout. It can also be a pair (tuple) of
1038
+ (connection, read) timeouts.
1039
+ :type _request_timeout: int, tuple(int, int), optional
1040
+ :param _request_auth: set to override the auth_settings for an a single
1041
+ request; this effectively ignores the
1042
+ authentication in the spec for a single request.
1043
+ :type _request_auth: dict, optional
1044
+ :param _content_type: force content-type for the request.
1045
+ :type _content_type: str, Optional
1046
+ :param _headers: set to override the headers for a single
1047
+ request; this effectively ignores the headers
1048
+ in the spec for a single request.
1049
+ :type _headers: dict, optional
1050
+ :param _host_index: set to override the host_index for a single
1051
+ request; this effectively ignores the host_index
1052
+ in the spec for a single request.
1053
+ :type _host_index: int, optional
1054
+ :return: Returns the result object.
1055
+ """ # noqa: E501
1056
+
1057
+ _param = self._get_volume_automation_serialize(
1058
+ project_id=project_id,
1059
+ region=region,
1060
+ automation_id=automation_id,
1061
+ _request_auth=_request_auth,
1062
+ _content_type=_content_type,
1063
+ _headers=_headers,
1064
+ _host_index=_host_index,
1065
+ )
1066
+
1067
+ _response_types_map: Dict[str, Optional[str]] = {
1068
+ "200": "VolumeAutomation",
1069
+ "400": "ErrorResponse",
1070
+ "401": "ErrorResponse",
1071
+ "403": "ErrorResponse",
1072
+ "404": "ErrorResponse",
1073
+ }
1074
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1075
+ return response_data.response
1076
+
1077
+ def _get_volume_automation_serialize(
1078
+ self,
1079
+ project_id,
1080
+ region,
1081
+ automation_id,
1082
+ _request_auth,
1083
+ _content_type,
1084
+ _headers,
1085
+ _host_index,
1086
+ ) -> RequestSerialized:
1087
+
1088
+ _host = None
1089
+
1090
+ _collection_formats: Dict[str, str] = {}
1091
+
1092
+ _path_params: Dict[str, str] = {}
1093
+ _query_params: List[Tuple[str, str]] = []
1094
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1095
+ _form_params: List[Tuple[str, str]] = []
1096
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1097
+ _body_params: Optional[bytes] = None
1098
+
1099
+ # process the path parameters
1100
+ if project_id is not None:
1101
+ _path_params["projectId"] = project_id
1102
+ if region is not None:
1103
+ _path_params["region"] = region
1104
+ if automation_id is not None:
1105
+ _path_params["automationId"] = automation_id
1106
+ # process the query parameters
1107
+ # process the header parameters
1108
+ # process the form parameters
1109
+ # process the body parameter
1110
+
1111
+ # set the HTTP header `Accept`
1112
+ if "Accept" not in _header_params:
1113
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1114
+
1115
+ # authentication setting
1116
+ _auth_settings: List[str] = []
1117
+
1118
+ return self.api_client.param_serialize(
1119
+ method="GET",
1120
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/{automationId}",
1121
+ path_params=_path_params,
1122
+ query_params=_query_params,
1123
+ header_params=_header_params,
1124
+ body=_body_params,
1125
+ post_params=_form_params,
1126
+ files=_files,
1127
+ auth_settings=_auth_settings,
1128
+ collection_formats=_collection_formats,
1129
+ _host=_host,
1130
+ _request_auth=_request_auth,
1131
+ )
1132
+
1133
+ @validate_call
1134
+ def get_volume_execution(
1135
+ self,
1136
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1137
+ region: Annotated[StrictStr, Field(description="region")],
1138
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
1139
+ execution_id: Annotated[StrictStr, Field(description="execution Id")],
1140
+ _request_timeout: Union[
1141
+ None,
1142
+ Annotated[StrictFloat, Field(gt=0)],
1143
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1144
+ ] = None,
1145
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1146
+ _content_type: Optional[StrictStr] = None,
1147
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1148
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1149
+ ) -> VolumeExecutionResponse:
1150
+ """Get volume automation execution details
1151
+
1152
+ Get details for a specific volume automation execution
1153
+
1154
+ :param project_id: project Id (required)
1155
+ :type project_id: str
1156
+ :param region: region (required)
1157
+ :type region: str
1158
+ :param automation_id: automation Id (required)
1159
+ :type automation_id: str
1160
+ :param execution_id: execution Id (required)
1161
+ :type execution_id: str
1162
+ :param _request_timeout: timeout setting for this request. If one
1163
+ number provided, it will be total request
1164
+ timeout. It can also be a pair (tuple) of
1165
+ (connection, read) timeouts.
1166
+ :type _request_timeout: int, tuple(int, int), optional
1167
+ :param _request_auth: set to override the auth_settings for an a single
1168
+ request; this effectively ignores the
1169
+ authentication in the spec for a single request.
1170
+ :type _request_auth: dict, optional
1171
+ :param _content_type: force content-type for the request.
1172
+ :type _content_type: str, Optional
1173
+ :param _headers: set to override the headers for a single
1174
+ request; this effectively ignores the headers
1175
+ in the spec for a single request.
1176
+ :type _headers: dict, optional
1177
+ :param _host_index: set to override the host_index for a single
1178
+ request; this effectively ignores the host_index
1179
+ in the spec for a single request.
1180
+ :type _host_index: int, optional
1181
+ :return: Returns the result object.
1182
+ """ # noqa: E501
1183
+
1184
+ _param = self._get_volume_execution_serialize(
1185
+ project_id=project_id,
1186
+ region=region,
1187
+ automation_id=automation_id,
1188
+ execution_id=execution_id,
1189
+ _request_auth=_request_auth,
1190
+ _content_type=_content_type,
1191
+ _headers=_headers,
1192
+ _host_index=_host_index,
1193
+ )
1194
+
1195
+ _response_types_map: Dict[str, Optional[str]] = {
1196
+ "200": "VolumeExecutionResponse",
1197
+ "400": "ErrorResponse",
1198
+ "401": "ErrorResponse",
1199
+ "403": "ErrorResponse",
1200
+ "404": "ErrorResponse",
1201
+ }
1202
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1203
+ response_data.read()
1204
+ return self.api_client.response_deserialize(
1205
+ response_data=response_data,
1206
+ response_types_map=_response_types_map,
1207
+ ).data
1208
+
1209
+ @validate_call
1210
+ def get_volume_execution_with_http_info(
1211
+ self,
1212
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1213
+ region: Annotated[StrictStr, Field(description="region")],
1214
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
1215
+ execution_id: Annotated[StrictStr, Field(description="execution Id")],
1216
+ _request_timeout: Union[
1217
+ None,
1218
+ Annotated[StrictFloat, Field(gt=0)],
1219
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1220
+ ] = None,
1221
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1222
+ _content_type: Optional[StrictStr] = None,
1223
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1224
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1225
+ ) -> ApiResponse[VolumeExecutionResponse]:
1226
+ """Get volume automation execution details
1227
+
1228
+ Get details for a specific volume automation execution
1229
+
1230
+ :param project_id: project Id (required)
1231
+ :type project_id: str
1232
+ :param region: region (required)
1233
+ :type region: str
1234
+ :param automation_id: automation Id (required)
1235
+ :type automation_id: str
1236
+ :param execution_id: execution Id (required)
1237
+ :type execution_id: str
1238
+ :param _request_timeout: timeout setting for this request. If one
1239
+ number provided, it will be total request
1240
+ timeout. It can also be a pair (tuple) of
1241
+ (connection, read) timeouts.
1242
+ :type _request_timeout: int, tuple(int, int), optional
1243
+ :param _request_auth: set to override the auth_settings for an a single
1244
+ request; this effectively ignores the
1245
+ authentication in the spec for a single request.
1246
+ :type _request_auth: dict, optional
1247
+ :param _content_type: force content-type for the request.
1248
+ :type _content_type: str, Optional
1249
+ :param _headers: set to override the headers for a single
1250
+ request; this effectively ignores the headers
1251
+ in the spec for a single request.
1252
+ :type _headers: dict, optional
1253
+ :param _host_index: set to override the host_index for a single
1254
+ request; this effectively ignores the host_index
1255
+ in the spec for a single request.
1256
+ :type _host_index: int, optional
1257
+ :return: Returns the result object.
1258
+ """ # noqa: E501
1259
+
1260
+ _param = self._get_volume_execution_serialize(
1261
+ project_id=project_id,
1262
+ region=region,
1263
+ automation_id=automation_id,
1264
+ execution_id=execution_id,
1265
+ _request_auth=_request_auth,
1266
+ _content_type=_content_type,
1267
+ _headers=_headers,
1268
+ _host_index=_host_index,
1269
+ )
1270
+
1271
+ _response_types_map: Dict[str, Optional[str]] = {
1272
+ "200": "VolumeExecutionResponse",
1273
+ "400": "ErrorResponse",
1274
+ "401": "ErrorResponse",
1275
+ "403": "ErrorResponse",
1276
+ "404": "ErrorResponse",
1277
+ }
1278
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1279
+ response_data.read()
1280
+ return self.api_client.response_deserialize(
1281
+ response_data=response_data,
1282
+ response_types_map=_response_types_map,
1283
+ )
1284
+
1285
+ @validate_call
1286
+ def get_volume_execution_without_preload_content(
1287
+ self,
1288
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1289
+ region: Annotated[StrictStr, Field(description="region")],
1290
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
1291
+ execution_id: Annotated[StrictStr, Field(description="execution Id")],
1292
+ _request_timeout: Union[
1293
+ None,
1294
+ Annotated[StrictFloat, Field(gt=0)],
1295
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1296
+ ] = None,
1297
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1298
+ _content_type: Optional[StrictStr] = None,
1299
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1300
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1301
+ ) -> RESTResponseType:
1302
+ """Get volume automation execution details
1303
+
1304
+ Get details for a specific volume automation execution
1305
+
1306
+ :param project_id: project Id (required)
1307
+ :type project_id: str
1308
+ :param region: region (required)
1309
+ :type region: str
1310
+ :param automation_id: automation Id (required)
1311
+ :type automation_id: str
1312
+ :param execution_id: execution Id (required)
1313
+ :type execution_id: str
1314
+ :param _request_timeout: timeout setting for this request. If one
1315
+ number provided, it will be total request
1316
+ timeout. It can also be a pair (tuple) of
1317
+ (connection, read) timeouts.
1318
+ :type _request_timeout: int, tuple(int, int), optional
1319
+ :param _request_auth: set to override the auth_settings for an a single
1320
+ request; this effectively ignores the
1321
+ authentication in the spec for a single request.
1322
+ :type _request_auth: dict, optional
1323
+ :param _content_type: force content-type for the request.
1324
+ :type _content_type: str, Optional
1325
+ :param _headers: set to override the headers for a single
1326
+ request; this effectively ignores the headers
1327
+ in the spec for a single request.
1328
+ :type _headers: dict, optional
1329
+ :param _host_index: set to override the host_index for a single
1330
+ request; this effectively ignores the host_index
1331
+ in the spec for a single request.
1332
+ :type _host_index: int, optional
1333
+ :return: Returns the result object.
1334
+ """ # noqa: E501
1335
+
1336
+ _param = self._get_volume_execution_serialize(
1337
+ project_id=project_id,
1338
+ region=region,
1339
+ automation_id=automation_id,
1340
+ execution_id=execution_id,
1341
+ _request_auth=_request_auth,
1342
+ _content_type=_content_type,
1343
+ _headers=_headers,
1344
+ _host_index=_host_index,
1345
+ )
1346
+
1347
+ _response_types_map: Dict[str, Optional[str]] = {
1348
+ "200": "VolumeExecutionResponse",
1349
+ "400": "ErrorResponse",
1350
+ "401": "ErrorResponse",
1351
+ "403": "ErrorResponse",
1352
+ "404": "ErrorResponse",
1353
+ }
1354
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1355
+ return response_data.response
1356
+
1357
+ def _get_volume_execution_serialize(
1358
+ self,
1359
+ project_id,
1360
+ region,
1361
+ automation_id,
1362
+ execution_id,
1363
+ _request_auth,
1364
+ _content_type,
1365
+ _headers,
1366
+ _host_index,
1367
+ ) -> RequestSerialized:
1368
+
1369
+ _host = None
1370
+
1371
+ _collection_formats: Dict[str, str] = {}
1372
+
1373
+ _path_params: Dict[str, str] = {}
1374
+ _query_params: List[Tuple[str, str]] = []
1375
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1376
+ _form_params: List[Tuple[str, str]] = []
1377
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1378
+ _body_params: Optional[bytes] = None
1379
+
1380
+ # process the path parameters
1381
+ if project_id is not None:
1382
+ _path_params["projectId"] = project_id
1383
+ if region is not None:
1384
+ _path_params["region"] = region
1385
+ if automation_id is not None:
1386
+ _path_params["automationId"] = automation_id
1387
+ if execution_id is not None:
1388
+ _path_params["executionId"] = execution_id
1389
+ # process the query parameters
1390
+ # process the header parameters
1391
+ # process the form parameters
1392
+ # process the body parameter
1393
+
1394
+ # set the HTTP header `Accept`
1395
+ if "Accept" not in _header_params:
1396
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1397
+
1398
+ # authentication setting
1399
+ _auth_settings: List[str] = []
1400
+
1401
+ return self.api_client.param_serialize(
1402
+ method="GET",
1403
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/{automationId}/executions/{executionId}",
1404
+ path_params=_path_params,
1405
+ query_params=_query_params,
1406
+ header_params=_header_params,
1407
+ body=_body_params,
1408
+ post_params=_form_params,
1409
+ files=_files,
1410
+ auth_settings=_auth_settings,
1411
+ collection_formats=_collection_formats,
1412
+ _host=_host,
1413
+ _request_auth=_request_auth,
1414
+ )
1415
+
1416
+ @validate_call
1417
+ def get_volume_template(
1418
+ self,
1419
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1420
+ region: Annotated[StrictStr, Field(description="region")],
1421
+ template_id: Annotated[StrictStr, Field(description="templateId Id")],
1422
+ _request_timeout: Union[
1423
+ None,
1424
+ Annotated[StrictFloat, Field(gt=0)],
1425
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1426
+ ] = None,
1427
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1428
+ _content_type: Optional[StrictStr] = None,
1429
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1430
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1431
+ ) -> GetVolumeTemplateResponse:
1432
+ """Get volume template
1433
+
1434
+ Retrieve detailed information about a volume template
1435
+
1436
+ :param project_id: project Id (required)
1437
+ :type project_id: str
1438
+ :param region: region (required)
1439
+ :type region: str
1440
+ :param template_id: templateId Id (required)
1441
+ :type template_id: str
1442
+ :param _request_timeout: timeout setting for this request. If one
1443
+ number provided, it will be total request
1444
+ timeout. It can also be a pair (tuple) of
1445
+ (connection, read) timeouts.
1446
+ :type _request_timeout: int, tuple(int, int), optional
1447
+ :param _request_auth: set to override the auth_settings for an a single
1448
+ request; this effectively ignores the
1449
+ authentication in the spec for a single request.
1450
+ :type _request_auth: dict, optional
1451
+ :param _content_type: force content-type for the request.
1452
+ :type _content_type: str, Optional
1453
+ :param _headers: set to override the headers for a single
1454
+ request; this effectively ignores the headers
1455
+ in the spec for a single request.
1456
+ :type _headers: dict, optional
1457
+ :param _host_index: set to override the host_index for a single
1458
+ request; this effectively ignores the host_index
1459
+ in the spec for a single request.
1460
+ :type _host_index: int, optional
1461
+ :return: Returns the result object.
1462
+ """ # noqa: E501
1463
+
1464
+ _param = self._get_volume_template_serialize(
1465
+ project_id=project_id,
1466
+ region=region,
1467
+ template_id=template_id,
1468
+ _request_auth=_request_auth,
1469
+ _content_type=_content_type,
1470
+ _headers=_headers,
1471
+ _host_index=_host_index,
1472
+ )
1473
+
1474
+ _response_types_map: Dict[str, Optional[str]] = {
1475
+ "200": "GetVolumeTemplateResponse",
1476
+ "400": "ErrorResponse",
1477
+ "401": "ErrorResponse",
1478
+ "403": "ErrorResponse",
1479
+ "404": "ErrorResponse",
1480
+ }
1481
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1482
+ response_data.read()
1483
+ return self.api_client.response_deserialize(
1484
+ response_data=response_data,
1485
+ response_types_map=_response_types_map,
1486
+ ).data
1487
+
1488
+ @validate_call
1489
+ def get_volume_template_with_http_info(
1490
+ self,
1491
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1492
+ region: Annotated[StrictStr, Field(description="region")],
1493
+ template_id: Annotated[StrictStr, Field(description="templateId Id")],
1494
+ _request_timeout: Union[
1495
+ None,
1496
+ Annotated[StrictFloat, Field(gt=0)],
1497
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1498
+ ] = None,
1499
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1500
+ _content_type: Optional[StrictStr] = None,
1501
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1502
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1503
+ ) -> ApiResponse[GetVolumeTemplateResponse]:
1504
+ """Get volume template
1505
+
1506
+ Retrieve detailed information about a volume template
1507
+
1508
+ :param project_id: project Id (required)
1509
+ :type project_id: str
1510
+ :param region: region (required)
1511
+ :type region: str
1512
+ :param template_id: templateId Id (required)
1513
+ :type template_id: str
1514
+ :param _request_timeout: timeout setting for this request. If one
1515
+ number provided, it will be total request
1516
+ timeout. It can also be a pair (tuple) of
1517
+ (connection, read) timeouts.
1518
+ :type _request_timeout: int, tuple(int, int), optional
1519
+ :param _request_auth: set to override the auth_settings for an a single
1520
+ request; this effectively ignores the
1521
+ authentication in the spec for a single request.
1522
+ :type _request_auth: dict, optional
1523
+ :param _content_type: force content-type for the request.
1524
+ :type _content_type: str, Optional
1525
+ :param _headers: set to override the headers for a single
1526
+ request; this effectively ignores the headers
1527
+ in the spec for a single request.
1528
+ :type _headers: dict, optional
1529
+ :param _host_index: set to override the host_index for a single
1530
+ request; this effectively ignores the host_index
1531
+ in the spec for a single request.
1532
+ :type _host_index: int, optional
1533
+ :return: Returns the result object.
1534
+ """ # noqa: E501
1535
+
1536
+ _param = self._get_volume_template_serialize(
1537
+ project_id=project_id,
1538
+ region=region,
1539
+ template_id=template_id,
1540
+ _request_auth=_request_auth,
1541
+ _content_type=_content_type,
1542
+ _headers=_headers,
1543
+ _host_index=_host_index,
1544
+ )
1545
+
1546
+ _response_types_map: Dict[str, Optional[str]] = {
1547
+ "200": "GetVolumeTemplateResponse",
1548
+ "400": "ErrorResponse",
1549
+ "401": "ErrorResponse",
1550
+ "403": "ErrorResponse",
1551
+ "404": "ErrorResponse",
1552
+ }
1553
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1554
+ response_data.read()
1555
+ return self.api_client.response_deserialize(
1556
+ response_data=response_data,
1557
+ response_types_map=_response_types_map,
1558
+ )
1559
+
1560
+ @validate_call
1561
+ def get_volume_template_without_preload_content(
1562
+ self,
1563
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1564
+ region: Annotated[StrictStr, Field(description="region")],
1565
+ template_id: Annotated[StrictStr, Field(description="templateId Id")],
1566
+ _request_timeout: Union[
1567
+ None,
1568
+ Annotated[StrictFloat, Field(gt=0)],
1569
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1570
+ ] = None,
1571
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1572
+ _content_type: Optional[StrictStr] = None,
1573
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1574
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1575
+ ) -> RESTResponseType:
1576
+ """Get volume template
1577
+
1578
+ Retrieve detailed information about a volume template
1579
+
1580
+ :param project_id: project Id (required)
1581
+ :type project_id: str
1582
+ :param region: region (required)
1583
+ :type region: str
1584
+ :param template_id: templateId Id (required)
1585
+ :type template_id: str
1586
+ :param _request_timeout: timeout setting for this request. If one
1587
+ number provided, it will be total request
1588
+ timeout. It can also be a pair (tuple) of
1589
+ (connection, read) timeouts.
1590
+ :type _request_timeout: int, tuple(int, int), optional
1591
+ :param _request_auth: set to override the auth_settings for an a single
1592
+ request; this effectively ignores the
1593
+ authentication in the spec for a single request.
1594
+ :type _request_auth: dict, optional
1595
+ :param _content_type: force content-type for the request.
1596
+ :type _content_type: str, Optional
1597
+ :param _headers: set to override the headers for a single
1598
+ request; this effectively ignores the headers
1599
+ in the spec for a single request.
1600
+ :type _headers: dict, optional
1601
+ :param _host_index: set to override the host_index for a single
1602
+ request; this effectively ignores the host_index
1603
+ in the spec for a single request.
1604
+ :type _host_index: int, optional
1605
+ :return: Returns the result object.
1606
+ """ # noqa: E501
1607
+
1608
+ _param = self._get_volume_template_serialize(
1609
+ project_id=project_id,
1610
+ region=region,
1611
+ template_id=template_id,
1612
+ _request_auth=_request_auth,
1613
+ _content_type=_content_type,
1614
+ _headers=_headers,
1615
+ _host_index=_host_index,
1616
+ )
1617
+
1618
+ _response_types_map: Dict[str, Optional[str]] = {
1619
+ "200": "GetVolumeTemplateResponse",
1620
+ "400": "ErrorResponse",
1621
+ "401": "ErrorResponse",
1622
+ "403": "ErrorResponse",
1623
+ "404": "ErrorResponse",
1624
+ }
1625
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1626
+ return response_data.response
1627
+
1628
+ def _get_volume_template_serialize(
1629
+ self,
1630
+ project_id,
1631
+ region,
1632
+ template_id,
1633
+ _request_auth,
1634
+ _content_type,
1635
+ _headers,
1636
+ _host_index,
1637
+ ) -> RequestSerialized:
1638
+
1639
+ _host = None
1640
+
1641
+ _collection_formats: Dict[str, str] = {}
1642
+
1643
+ _path_params: Dict[str, str] = {}
1644
+ _query_params: List[Tuple[str, str]] = []
1645
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1646
+ _form_params: List[Tuple[str, str]] = []
1647
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1648
+ _body_params: Optional[bytes] = None
1649
+
1650
+ # process the path parameters
1651
+ if project_id is not None:
1652
+ _path_params["projectId"] = project_id
1653
+ if region is not None:
1654
+ _path_params["region"] = region
1655
+ if template_id is not None:
1656
+ _path_params["templateId"] = template_id
1657
+ # process the query parameters
1658
+ # process the header parameters
1659
+ # process the form parameters
1660
+ # process the body parameter
1661
+
1662
+ # set the HTTP header `Accept`
1663
+ if "Accept" not in _header_params:
1664
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1665
+
1666
+ # authentication setting
1667
+ _auth_settings: List[str] = []
1668
+
1669
+ return self.api_client.param_serialize(
1670
+ method="GET",
1671
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/templates/{templateId}",
1672
+ path_params=_path_params,
1673
+ query_params=_query_params,
1674
+ header_params=_header_params,
1675
+ body=_body_params,
1676
+ post_params=_form_params,
1677
+ files=_files,
1678
+ auth_settings=_auth_settings,
1679
+ collection_formats=_collection_formats,
1680
+ _host=_host,
1681
+ _request_auth=_request_auth,
1682
+ )
1683
+
1684
+ @validate_call
1685
+ def list_volume_automations(
1686
+ self,
1687
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1688
+ region: Annotated[StrictStr, Field(description="region")],
1689
+ page_size: Annotated[
1690
+ Optional[StrictInt],
1691
+ Field(
1692
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
1693
+ ),
1694
+ ] = None,
1695
+ page_token: Annotated[
1696
+ Optional[StrictStr],
1697
+ Field(
1698
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
1699
+ ),
1700
+ ] = None,
1701
+ _request_timeout: Union[
1702
+ None,
1703
+ Annotated[StrictFloat, Field(gt=0)],
1704
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1705
+ ] = None,
1706
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1707
+ _content_type: Optional[StrictStr] = None,
1708
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1709
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1710
+ ) -> ListAutomationsResponse:
1711
+ """List volume automations
1712
+
1713
+ Retrieves a list of volume automations.
1714
+
1715
+ :param project_id: project Id (required)
1716
+ :type project_id: str
1717
+ :param region: region (required)
1718
+ :type region: str
1719
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
1720
+ :type page_size: int
1721
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1722
+ :type page_token: str
1723
+ :param _request_timeout: timeout setting for this request. If one
1724
+ number provided, it will be total request
1725
+ timeout. It can also be a pair (tuple) of
1726
+ (connection, read) timeouts.
1727
+ :type _request_timeout: int, tuple(int, int), optional
1728
+ :param _request_auth: set to override the auth_settings for an a single
1729
+ request; this effectively ignores the
1730
+ authentication in the spec for a single request.
1731
+ :type _request_auth: dict, optional
1732
+ :param _content_type: force content-type for the request.
1733
+ :type _content_type: str, Optional
1734
+ :param _headers: set to override the headers for a single
1735
+ request; this effectively ignores the headers
1736
+ in the spec for a single request.
1737
+ :type _headers: dict, optional
1738
+ :param _host_index: set to override the host_index for a single
1739
+ request; this effectively ignores the host_index
1740
+ in the spec for a single request.
1741
+ :type _host_index: int, optional
1742
+ :return: Returns the result object.
1743
+ """ # noqa: E501
1744
+
1745
+ _param = self._list_volume_automations_serialize(
1746
+ project_id=project_id,
1747
+ region=region,
1748
+ page_size=page_size,
1749
+ page_token=page_token,
1750
+ _request_auth=_request_auth,
1751
+ _content_type=_content_type,
1752
+ _headers=_headers,
1753
+ _host_index=_host_index,
1754
+ )
1755
+
1756
+ _response_types_map: Dict[str, Optional[str]] = {
1757
+ "200": "ListAutomationsResponse",
1758
+ "400": "ErrorResponse",
1759
+ "401": "ErrorResponse",
1760
+ "403": "ErrorResponse",
1761
+ "404": "ErrorResponse",
1762
+ }
1763
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1764
+ response_data.read()
1765
+ return self.api_client.response_deserialize(
1766
+ response_data=response_data,
1767
+ response_types_map=_response_types_map,
1768
+ ).data
1769
+
1770
+ @validate_call
1771
+ def list_volume_automations_with_http_info(
1772
+ self,
1773
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1774
+ region: Annotated[StrictStr, Field(description="region")],
1775
+ page_size: Annotated[
1776
+ Optional[StrictInt],
1777
+ Field(
1778
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
1779
+ ),
1780
+ ] = None,
1781
+ page_token: Annotated[
1782
+ Optional[StrictStr],
1783
+ Field(
1784
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
1785
+ ),
1786
+ ] = None,
1787
+ _request_timeout: Union[
1788
+ None,
1789
+ Annotated[StrictFloat, Field(gt=0)],
1790
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1791
+ ] = None,
1792
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1793
+ _content_type: Optional[StrictStr] = None,
1794
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1795
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1796
+ ) -> ApiResponse[ListAutomationsResponse]:
1797
+ """List volume automations
1798
+
1799
+ Retrieves a list of volume automations.
1800
+
1801
+ :param project_id: project Id (required)
1802
+ :type project_id: str
1803
+ :param region: region (required)
1804
+ :type region: str
1805
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
1806
+ :type page_size: int
1807
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1808
+ :type page_token: str
1809
+ :param _request_timeout: timeout setting for this request. If one
1810
+ number provided, it will be total request
1811
+ timeout. It can also be a pair (tuple) of
1812
+ (connection, read) timeouts.
1813
+ :type _request_timeout: int, tuple(int, int), optional
1814
+ :param _request_auth: set to override the auth_settings for an a single
1815
+ request; this effectively ignores the
1816
+ authentication in the spec for a single request.
1817
+ :type _request_auth: dict, optional
1818
+ :param _content_type: force content-type for the request.
1819
+ :type _content_type: str, Optional
1820
+ :param _headers: set to override the headers for a single
1821
+ request; this effectively ignores the headers
1822
+ in the spec for a single request.
1823
+ :type _headers: dict, optional
1824
+ :param _host_index: set to override the host_index for a single
1825
+ request; this effectively ignores the host_index
1826
+ in the spec for a single request.
1827
+ :type _host_index: int, optional
1828
+ :return: Returns the result object.
1829
+ """ # noqa: E501
1830
+
1831
+ _param = self._list_volume_automations_serialize(
1832
+ project_id=project_id,
1833
+ region=region,
1834
+ page_size=page_size,
1835
+ page_token=page_token,
1836
+ _request_auth=_request_auth,
1837
+ _content_type=_content_type,
1838
+ _headers=_headers,
1839
+ _host_index=_host_index,
1840
+ )
1841
+
1842
+ _response_types_map: Dict[str, Optional[str]] = {
1843
+ "200": "ListAutomationsResponse",
1844
+ "400": "ErrorResponse",
1845
+ "401": "ErrorResponse",
1846
+ "403": "ErrorResponse",
1847
+ "404": "ErrorResponse",
1848
+ }
1849
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1850
+ response_data.read()
1851
+ return self.api_client.response_deserialize(
1852
+ response_data=response_data,
1853
+ response_types_map=_response_types_map,
1854
+ )
1855
+
1856
+ @validate_call
1857
+ def list_volume_automations_without_preload_content(
1858
+ self,
1859
+ project_id: Annotated[StrictStr, Field(description="project Id")],
1860
+ region: Annotated[StrictStr, Field(description="region")],
1861
+ page_size: Annotated[
1862
+ Optional[StrictInt],
1863
+ Field(
1864
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
1865
+ ),
1866
+ ] = None,
1867
+ page_token: Annotated[
1868
+ Optional[StrictStr],
1869
+ Field(
1870
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
1871
+ ),
1872
+ ] = None,
1873
+ _request_timeout: Union[
1874
+ None,
1875
+ Annotated[StrictFloat, Field(gt=0)],
1876
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1877
+ ] = None,
1878
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1879
+ _content_type: Optional[StrictStr] = None,
1880
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1881
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1882
+ ) -> RESTResponseType:
1883
+ """List volume automations
1884
+
1885
+ Retrieves a list of volume automations.
1886
+
1887
+ :param project_id: project Id (required)
1888
+ :type project_id: str
1889
+ :param region: region (required)
1890
+ :type region: str
1891
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
1892
+ :type page_size: int
1893
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1894
+ :type page_token: str
1895
+ :param _request_timeout: timeout setting for this request. If one
1896
+ number provided, it will be total request
1897
+ timeout. It can also be a pair (tuple) of
1898
+ (connection, read) timeouts.
1899
+ :type _request_timeout: int, tuple(int, int), optional
1900
+ :param _request_auth: set to override the auth_settings for an a single
1901
+ request; this effectively ignores the
1902
+ authentication in the spec for a single request.
1903
+ :type _request_auth: dict, optional
1904
+ :param _content_type: force content-type for the request.
1905
+ :type _content_type: str, Optional
1906
+ :param _headers: set to override the headers for a single
1907
+ request; this effectively ignores the headers
1908
+ in the spec for a single request.
1909
+ :type _headers: dict, optional
1910
+ :param _host_index: set to override the host_index for a single
1911
+ request; this effectively ignores the host_index
1912
+ in the spec for a single request.
1913
+ :type _host_index: int, optional
1914
+ :return: Returns the result object.
1915
+ """ # noqa: E501
1916
+
1917
+ _param = self._list_volume_automations_serialize(
1918
+ project_id=project_id,
1919
+ region=region,
1920
+ page_size=page_size,
1921
+ page_token=page_token,
1922
+ _request_auth=_request_auth,
1923
+ _content_type=_content_type,
1924
+ _headers=_headers,
1925
+ _host_index=_host_index,
1926
+ )
1927
+
1928
+ _response_types_map: Dict[str, Optional[str]] = {
1929
+ "200": "ListAutomationsResponse",
1930
+ "400": "ErrorResponse",
1931
+ "401": "ErrorResponse",
1932
+ "403": "ErrorResponse",
1933
+ "404": "ErrorResponse",
1934
+ }
1935
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1936
+ return response_data.response
1937
+
1938
+ def _list_volume_automations_serialize(
1939
+ self,
1940
+ project_id,
1941
+ region,
1942
+ page_size,
1943
+ page_token,
1944
+ _request_auth,
1945
+ _content_type,
1946
+ _headers,
1947
+ _host_index,
1948
+ ) -> RequestSerialized:
1949
+
1950
+ _host = None
1951
+
1952
+ _collection_formats: Dict[str, str] = {}
1953
+
1954
+ _path_params: Dict[str, str] = {}
1955
+ _query_params: List[Tuple[str, str]] = []
1956
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1957
+ _form_params: List[Tuple[str, str]] = []
1958
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1959
+ _body_params: Optional[bytes] = None
1960
+
1961
+ # process the path parameters
1962
+ if project_id is not None:
1963
+ _path_params["projectId"] = project_id
1964
+ if region is not None:
1965
+ _path_params["region"] = region
1966
+ # process the query parameters
1967
+ if page_size is not None:
1968
+
1969
+ _query_params.append(("pageSize", page_size))
1970
+
1971
+ if page_token is not None:
1972
+
1973
+ _query_params.append(("pageToken", page_token))
1974
+
1975
+ # process the header parameters
1976
+ # process the form parameters
1977
+ # process the body parameter
1978
+
1979
+ # set the HTTP header `Accept`
1980
+ if "Accept" not in _header_params:
1981
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1982
+
1983
+ # authentication setting
1984
+ _auth_settings: List[str] = []
1985
+
1986
+ return self.api_client.param_serialize(
1987
+ method="GET",
1988
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations",
1989
+ path_params=_path_params,
1990
+ query_params=_query_params,
1991
+ header_params=_header_params,
1992
+ body=_body_params,
1993
+ post_params=_form_params,
1994
+ files=_files,
1995
+ auth_settings=_auth_settings,
1996
+ collection_formats=_collection_formats,
1997
+ _host=_host,
1998
+ _request_auth=_request_auth,
1999
+ )
2000
+
2001
+ @validate_call
2002
+ def list_volume_executions(
2003
+ self,
2004
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2005
+ region: Annotated[StrictStr, Field(description="region")],
2006
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
2007
+ page_size: Annotated[
2008
+ Optional[StrictInt],
2009
+ Field(
2010
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
2011
+ ),
2012
+ ] = None,
2013
+ page_token: Annotated[
2014
+ Optional[StrictStr],
2015
+ Field(
2016
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
2017
+ ),
2018
+ ] = None,
2019
+ _request_timeout: Union[
2020
+ None,
2021
+ Annotated[StrictFloat, Field(gt=0)],
2022
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2023
+ ] = None,
2024
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2025
+ _content_type: Optional[StrictStr] = None,
2026
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2027
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2028
+ ) -> ListExecutionsResponse:
2029
+ """List volume automation executions
2030
+
2031
+ Get a list of all executions for a specific volume automation.
2032
+
2033
+ :param project_id: project Id (required)
2034
+ :type project_id: str
2035
+ :param region: region (required)
2036
+ :type region: str
2037
+ :param automation_id: automation Id (required)
2038
+ :type automation_id: str
2039
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
2040
+ :type page_size: int
2041
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2042
+ :type page_token: str
2043
+ :param _request_timeout: timeout setting for this request. If one
2044
+ number provided, it will be total request
2045
+ timeout. It can also be a pair (tuple) of
2046
+ (connection, read) timeouts.
2047
+ :type _request_timeout: int, tuple(int, int), optional
2048
+ :param _request_auth: set to override the auth_settings for an a single
2049
+ request; this effectively ignores the
2050
+ authentication in the spec for a single request.
2051
+ :type _request_auth: dict, optional
2052
+ :param _content_type: force content-type for the request.
2053
+ :type _content_type: str, Optional
2054
+ :param _headers: set to override the headers for a single
2055
+ request; this effectively ignores the headers
2056
+ in the spec for a single request.
2057
+ :type _headers: dict, optional
2058
+ :param _host_index: set to override the host_index for a single
2059
+ request; this effectively ignores the host_index
2060
+ in the spec for a single request.
2061
+ :type _host_index: int, optional
2062
+ :return: Returns the result object.
2063
+ """ # noqa: E501
2064
+
2065
+ _param = self._list_volume_executions_serialize(
2066
+ project_id=project_id,
2067
+ region=region,
2068
+ automation_id=automation_id,
2069
+ page_size=page_size,
2070
+ page_token=page_token,
2071
+ _request_auth=_request_auth,
2072
+ _content_type=_content_type,
2073
+ _headers=_headers,
2074
+ _host_index=_host_index,
2075
+ )
2076
+
2077
+ _response_types_map: Dict[str, Optional[str]] = {
2078
+ "200": "ListExecutionsResponse",
2079
+ "400": "ErrorResponse",
2080
+ "401": "ErrorResponse",
2081
+ "403": "ErrorResponse",
2082
+ "404": "ErrorResponse",
2083
+ }
2084
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2085
+ response_data.read()
2086
+ return self.api_client.response_deserialize(
2087
+ response_data=response_data,
2088
+ response_types_map=_response_types_map,
2089
+ ).data
2090
+
2091
+ @validate_call
2092
+ def list_volume_executions_with_http_info(
2093
+ self,
2094
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2095
+ region: Annotated[StrictStr, Field(description="region")],
2096
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
2097
+ page_size: Annotated[
2098
+ Optional[StrictInt],
2099
+ Field(
2100
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
2101
+ ),
2102
+ ] = None,
2103
+ page_token: Annotated[
2104
+ Optional[StrictStr],
2105
+ Field(
2106
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
2107
+ ),
2108
+ ] = None,
2109
+ _request_timeout: Union[
2110
+ None,
2111
+ Annotated[StrictFloat, Field(gt=0)],
2112
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2113
+ ] = None,
2114
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2115
+ _content_type: Optional[StrictStr] = None,
2116
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2117
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2118
+ ) -> ApiResponse[ListExecutionsResponse]:
2119
+ """List volume automation executions
2120
+
2121
+ Get a list of all executions for a specific volume automation.
2122
+
2123
+ :param project_id: project Id (required)
2124
+ :type project_id: str
2125
+ :param region: region (required)
2126
+ :type region: str
2127
+ :param automation_id: automation Id (required)
2128
+ :type automation_id: str
2129
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
2130
+ :type page_size: int
2131
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2132
+ :type page_token: str
2133
+ :param _request_timeout: timeout setting for this request. If one
2134
+ number provided, it will be total request
2135
+ timeout. It can also be a pair (tuple) of
2136
+ (connection, read) timeouts.
2137
+ :type _request_timeout: int, tuple(int, int), optional
2138
+ :param _request_auth: set to override the auth_settings for an a single
2139
+ request; this effectively ignores the
2140
+ authentication in the spec for a single request.
2141
+ :type _request_auth: dict, optional
2142
+ :param _content_type: force content-type for the request.
2143
+ :type _content_type: str, Optional
2144
+ :param _headers: set to override the headers for a single
2145
+ request; this effectively ignores the headers
2146
+ in the spec for a single request.
2147
+ :type _headers: dict, optional
2148
+ :param _host_index: set to override the host_index for a single
2149
+ request; this effectively ignores the host_index
2150
+ in the spec for a single request.
2151
+ :type _host_index: int, optional
2152
+ :return: Returns the result object.
2153
+ """ # noqa: E501
2154
+
2155
+ _param = self._list_volume_executions_serialize(
2156
+ project_id=project_id,
2157
+ region=region,
2158
+ automation_id=automation_id,
2159
+ page_size=page_size,
2160
+ page_token=page_token,
2161
+ _request_auth=_request_auth,
2162
+ _content_type=_content_type,
2163
+ _headers=_headers,
2164
+ _host_index=_host_index,
2165
+ )
2166
+
2167
+ _response_types_map: Dict[str, Optional[str]] = {
2168
+ "200": "ListExecutionsResponse",
2169
+ "400": "ErrorResponse",
2170
+ "401": "ErrorResponse",
2171
+ "403": "ErrorResponse",
2172
+ "404": "ErrorResponse",
2173
+ }
2174
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2175
+ response_data.read()
2176
+ return self.api_client.response_deserialize(
2177
+ response_data=response_data,
2178
+ response_types_map=_response_types_map,
2179
+ )
2180
+
2181
+ @validate_call
2182
+ def list_volume_executions_without_preload_content(
2183
+ self,
2184
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2185
+ region: Annotated[StrictStr, Field(description="region")],
2186
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
2187
+ page_size: Annotated[
2188
+ Optional[StrictInt],
2189
+ Field(
2190
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
2191
+ ),
2192
+ ] = None,
2193
+ page_token: Annotated[
2194
+ Optional[StrictStr],
2195
+ Field(
2196
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
2197
+ ),
2198
+ ] = None,
2199
+ _request_timeout: Union[
2200
+ None,
2201
+ Annotated[StrictFloat, Field(gt=0)],
2202
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2203
+ ] = None,
2204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2205
+ _content_type: Optional[StrictStr] = None,
2206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2208
+ ) -> RESTResponseType:
2209
+ """List volume automation executions
2210
+
2211
+ Get a list of all executions for a specific volume automation.
2212
+
2213
+ :param project_id: project Id (required)
2214
+ :type project_id: str
2215
+ :param region: region (required)
2216
+ :type region: str
2217
+ :param automation_id: automation Id (required)
2218
+ :type automation_id: str
2219
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
2220
+ :type page_size: int
2221
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2222
+ :type page_token: str
2223
+ :param _request_timeout: timeout setting for this request. If one
2224
+ number provided, it will be total request
2225
+ timeout. It can also be a pair (tuple) of
2226
+ (connection, read) timeouts.
2227
+ :type _request_timeout: int, tuple(int, int), optional
2228
+ :param _request_auth: set to override the auth_settings for an a single
2229
+ request; this effectively ignores the
2230
+ authentication in the spec for a single request.
2231
+ :type _request_auth: dict, optional
2232
+ :param _content_type: force content-type for the request.
2233
+ :type _content_type: str, Optional
2234
+ :param _headers: set to override the headers for a single
2235
+ request; this effectively ignores the headers
2236
+ in the spec for a single request.
2237
+ :type _headers: dict, optional
2238
+ :param _host_index: set to override the host_index for a single
2239
+ request; this effectively ignores the host_index
2240
+ in the spec for a single request.
2241
+ :type _host_index: int, optional
2242
+ :return: Returns the result object.
2243
+ """ # noqa: E501
2244
+
2245
+ _param = self._list_volume_executions_serialize(
2246
+ project_id=project_id,
2247
+ region=region,
2248
+ automation_id=automation_id,
2249
+ page_size=page_size,
2250
+ page_token=page_token,
2251
+ _request_auth=_request_auth,
2252
+ _content_type=_content_type,
2253
+ _headers=_headers,
2254
+ _host_index=_host_index,
2255
+ )
2256
+
2257
+ _response_types_map: Dict[str, Optional[str]] = {
2258
+ "200": "ListExecutionsResponse",
2259
+ "400": "ErrorResponse",
2260
+ "401": "ErrorResponse",
2261
+ "403": "ErrorResponse",
2262
+ "404": "ErrorResponse",
2263
+ }
2264
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2265
+ return response_data.response
2266
+
2267
+ def _list_volume_executions_serialize(
2268
+ self,
2269
+ project_id,
2270
+ region,
2271
+ automation_id,
2272
+ page_size,
2273
+ page_token,
2274
+ _request_auth,
2275
+ _content_type,
2276
+ _headers,
2277
+ _host_index,
2278
+ ) -> RequestSerialized:
2279
+
2280
+ _host = None
2281
+
2282
+ _collection_formats: Dict[str, str] = {}
2283
+
2284
+ _path_params: Dict[str, str] = {}
2285
+ _query_params: List[Tuple[str, str]] = []
2286
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2287
+ _form_params: List[Tuple[str, str]] = []
2288
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
2289
+ _body_params: Optional[bytes] = None
2290
+
2291
+ # process the path parameters
2292
+ if project_id is not None:
2293
+ _path_params["projectId"] = project_id
2294
+ if region is not None:
2295
+ _path_params["region"] = region
2296
+ if automation_id is not None:
2297
+ _path_params["automationId"] = automation_id
2298
+ # process the query parameters
2299
+ if page_size is not None:
2300
+
2301
+ _query_params.append(("pageSize", page_size))
2302
+
2303
+ if page_token is not None:
2304
+
2305
+ _query_params.append(("pageToken", page_token))
2306
+
2307
+ # process the header parameters
2308
+ # process the form parameters
2309
+ # process the body parameter
2310
+
2311
+ # set the HTTP header `Accept`
2312
+ if "Accept" not in _header_params:
2313
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2314
+
2315
+ # authentication setting
2316
+ _auth_settings: List[str] = []
2317
+
2318
+ return self.api_client.param_serialize(
2319
+ method="GET",
2320
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/{automationId}/executions",
2321
+ path_params=_path_params,
2322
+ query_params=_query_params,
2323
+ header_params=_header_params,
2324
+ body=_body_params,
2325
+ post_params=_form_params,
2326
+ files=_files,
2327
+ auth_settings=_auth_settings,
2328
+ collection_formats=_collection_formats,
2329
+ _host=_host,
2330
+ _request_auth=_request_auth,
2331
+ )
2332
+
2333
+ @validate_call
2334
+ def list_volume_templates(
2335
+ self,
2336
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2337
+ region: Annotated[StrictStr, Field(description="region")],
2338
+ page_size: Annotated[
2339
+ Optional[StrictInt],
2340
+ Field(
2341
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
2342
+ ),
2343
+ ] = None,
2344
+ page_token: Annotated[
2345
+ Optional[StrictStr],
2346
+ Field(
2347
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
2348
+ ),
2349
+ ] = None,
2350
+ _request_timeout: Union[
2351
+ None,
2352
+ Annotated[StrictFloat, Field(gt=0)],
2353
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2354
+ ] = None,
2355
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2356
+ _content_type: Optional[StrictStr] = None,
2357
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2358
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2359
+ ) -> ListTemplatesResponse:
2360
+ """List volume templates
2361
+
2362
+ Lists all volume templates for the specified service
2363
+
2364
+ :param project_id: project Id (required)
2365
+ :type project_id: str
2366
+ :param region: region (required)
2367
+ :type region: str
2368
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
2369
+ :type page_size: int
2370
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2371
+ :type page_token: str
2372
+ :param _request_timeout: timeout setting for this request. If one
2373
+ number provided, it will be total request
2374
+ timeout. It can also be a pair (tuple) of
2375
+ (connection, read) timeouts.
2376
+ :type _request_timeout: int, tuple(int, int), optional
2377
+ :param _request_auth: set to override the auth_settings for an a single
2378
+ request; this effectively ignores the
2379
+ authentication in the spec for a single request.
2380
+ :type _request_auth: dict, optional
2381
+ :param _content_type: force content-type for the request.
2382
+ :type _content_type: str, Optional
2383
+ :param _headers: set to override the headers for a single
2384
+ request; this effectively ignores the headers
2385
+ in the spec for a single request.
2386
+ :type _headers: dict, optional
2387
+ :param _host_index: set to override the host_index for a single
2388
+ request; this effectively ignores the host_index
2389
+ in the spec for a single request.
2390
+ :type _host_index: int, optional
2391
+ :return: Returns the result object.
2392
+ """ # noqa: E501
2393
+
2394
+ _param = self._list_volume_templates_serialize(
2395
+ project_id=project_id,
2396
+ region=region,
2397
+ page_size=page_size,
2398
+ page_token=page_token,
2399
+ _request_auth=_request_auth,
2400
+ _content_type=_content_type,
2401
+ _headers=_headers,
2402
+ _host_index=_host_index,
2403
+ )
2404
+
2405
+ _response_types_map: Dict[str, Optional[str]] = {
2406
+ "200": "ListTemplatesResponse",
2407
+ "400": "ErrorResponse",
2408
+ "401": "ErrorResponse",
2409
+ "403": "ErrorResponse",
2410
+ "404": "ErrorResponse",
2411
+ }
2412
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2413
+ response_data.read()
2414
+ return self.api_client.response_deserialize(
2415
+ response_data=response_data,
2416
+ response_types_map=_response_types_map,
2417
+ ).data
2418
+
2419
+ @validate_call
2420
+ def list_volume_templates_with_http_info(
2421
+ self,
2422
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2423
+ region: Annotated[StrictStr, Field(description="region")],
2424
+ page_size: Annotated[
2425
+ Optional[StrictInt],
2426
+ Field(
2427
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
2428
+ ),
2429
+ ] = None,
2430
+ page_token: Annotated[
2431
+ Optional[StrictStr],
2432
+ Field(
2433
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
2434
+ ),
2435
+ ] = None,
2436
+ _request_timeout: Union[
2437
+ None,
2438
+ Annotated[StrictFloat, Field(gt=0)],
2439
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2440
+ ] = None,
2441
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2442
+ _content_type: Optional[StrictStr] = None,
2443
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2444
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2445
+ ) -> ApiResponse[ListTemplatesResponse]:
2446
+ """List volume templates
2447
+
2448
+ Lists all volume templates for the specified service
2449
+
2450
+ :param project_id: project Id (required)
2451
+ :type project_id: str
2452
+ :param region: region (required)
2453
+ :type region: str
2454
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
2455
+ :type page_size: int
2456
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2457
+ :type page_token: str
2458
+ :param _request_timeout: timeout setting for this request. If one
2459
+ number provided, it will be total request
2460
+ timeout. It can also be a pair (tuple) of
2461
+ (connection, read) timeouts.
2462
+ :type _request_timeout: int, tuple(int, int), optional
2463
+ :param _request_auth: set to override the auth_settings for an a single
2464
+ request; this effectively ignores the
2465
+ authentication in the spec for a single request.
2466
+ :type _request_auth: dict, optional
2467
+ :param _content_type: force content-type for the request.
2468
+ :type _content_type: str, Optional
2469
+ :param _headers: set to override the headers for a single
2470
+ request; this effectively ignores the headers
2471
+ in the spec for a single request.
2472
+ :type _headers: dict, optional
2473
+ :param _host_index: set to override the host_index for a single
2474
+ request; this effectively ignores the host_index
2475
+ in the spec for a single request.
2476
+ :type _host_index: int, optional
2477
+ :return: Returns the result object.
2478
+ """ # noqa: E501
2479
+
2480
+ _param = self._list_volume_templates_serialize(
2481
+ project_id=project_id,
2482
+ region=region,
2483
+ page_size=page_size,
2484
+ page_token=page_token,
2485
+ _request_auth=_request_auth,
2486
+ _content_type=_content_type,
2487
+ _headers=_headers,
2488
+ _host_index=_host_index,
2489
+ )
2490
+
2491
+ _response_types_map: Dict[str, Optional[str]] = {
2492
+ "200": "ListTemplatesResponse",
2493
+ "400": "ErrorResponse",
2494
+ "401": "ErrorResponse",
2495
+ "403": "ErrorResponse",
2496
+ "404": "ErrorResponse",
2497
+ }
2498
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2499
+ response_data.read()
2500
+ return self.api_client.response_deserialize(
2501
+ response_data=response_data,
2502
+ response_types_map=_response_types_map,
2503
+ )
2504
+
2505
+ @validate_call
2506
+ def list_volume_templates_without_preload_content(
2507
+ self,
2508
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2509
+ region: Annotated[StrictStr, Field(description="region")],
2510
+ page_size: Annotated[
2511
+ Optional[StrictInt],
2512
+ Field(
2513
+ description="The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100."
2514
+ ),
2515
+ ] = None,
2516
+ page_token: Annotated[
2517
+ Optional[StrictStr],
2518
+ Field(
2519
+ description="A page token, received from a previous list call. Provide this to retrieve the subsequent page."
2520
+ ),
2521
+ ] = None,
2522
+ _request_timeout: Union[
2523
+ None,
2524
+ Annotated[StrictFloat, Field(gt=0)],
2525
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2526
+ ] = None,
2527
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2528
+ _content_type: Optional[StrictStr] = None,
2529
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2530
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2531
+ ) -> RESTResponseType:
2532
+ """List volume templates
2533
+
2534
+ Lists all volume templates for the specified service
2535
+
2536
+ :param project_id: project Id (required)
2537
+ :type project_id: str
2538
+ :param region: region (required)
2539
+ :type region: str
2540
+ :param page_size: The maximum number of items to return. If unspecified or set to 0, at most 100 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
2541
+ :type page_size: int
2542
+ :param page_token: A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2543
+ :type page_token: str
2544
+ :param _request_timeout: timeout setting for this request. If one
2545
+ number provided, it will be total request
2546
+ timeout. It can also be a pair (tuple) of
2547
+ (connection, read) timeouts.
2548
+ :type _request_timeout: int, tuple(int, int), optional
2549
+ :param _request_auth: set to override the auth_settings for an a single
2550
+ request; this effectively ignores the
2551
+ authentication in the spec for a single request.
2552
+ :type _request_auth: dict, optional
2553
+ :param _content_type: force content-type for the request.
2554
+ :type _content_type: str, Optional
2555
+ :param _headers: set to override the headers for a single
2556
+ request; this effectively ignores the headers
2557
+ in the spec for a single request.
2558
+ :type _headers: dict, optional
2559
+ :param _host_index: set to override the host_index for a single
2560
+ request; this effectively ignores the host_index
2561
+ in the spec for a single request.
2562
+ :type _host_index: int, optional
2563
+ :return: Returns the result object.
2564
+ """ # noqa: E501
2565
+
2566
+ _param = self._list_volume_templates_serialize(
2567
+ project_id=project_id,
2568
+ region=region,
2569
+ page_size=page_size,
2570
+ page_token=page_token,
2571
+ _request_auth=_request_auth,
2572
+ _content_type=_content_type,
2573
+ _headers=_headers,
2574
+ _host_index=_host_index,
2575
+ )
2576
+
2577
+ _response_types_map: Dict[str, Optional[str]] = {
2578
+ "200": "ListTemplatesResponse",
2579
+ "400": "ErrorResponse",
2580
+ "401": "ErrorResponse",
2581
+ "403": "ErrorResponse",
2582
+ "404": "ErrorResponse",
2583
+ }
2584
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2585
+ return response_data.response
2586
+
2587
+ def _list_volume_templates_serialize(
2588
+ self,
2589
+ project_id,
2590
+ region,
2591
+ page_size,
2592
+ page_token,
2593
+ _request_auth,
2594
+ _content_type,
2595
+ _headers,
2596
+ _host_index,
2597
+ ) -> RequestSerialized:
2598
+
2599
+ _host = None
2600
+
2601
+ _collection_formats: Dict[str, str] = {}
2602
+
2603
+ _path_params: Dict[str, str] = {}
2604
+ _query_params: List[Tuple[str, str]] = []
2605
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2606
+ _form_params: List[Tuple[str, str]] = []
2607
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
2608
+ _body_params: Optional[bytes] = None
2609
+
2610
+ # process the path parameters
2611
+ if project_id is not None:
2612
+ _path_params["projectId"] = project_id
2613
+ if region is not None:
2614
+ _path_params["region"] = region
2615
+ # process the query parameters
2616
+ if page_size is not None:
2617
+
2618
+ _query_params.append(("pageSize", page_size))
2619
+
2620
+ if page_token is not None:
2621
+
2622
+ _query_params.append(("pageToken", page_token))
2623
+
2624
+ # process the header parameters
2625
+ # process the form parameters
2626
+ # process the body parameter
2627
+
2628
+ # set the HTTP header `Accept`
2629
+ if "Accept" not in _header_params:
2630
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2631
+
2632
+ # authentication setting
2633
+ _auth_settings: List[str] = []
2634
+
2635
+ return self.api_client.param_serialize(
2636
+ method="GET",
2637
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/templates",
2638
+ path_params=_path_params,
2639
+ query_params=_query_params,
2640
+ header_params=_header_params,
2641
+ body=_body_params,
2642
+ post_params=_form_params,
2643
+ files=_files,
2644
+ auth_settings=_auth_settings,
2645
+ collection_formats=_collection_formats,
2646
+ _host=_host,
2647
+ _request_auth=_request_auth,
2648
+ )
2649
+
2650
+ @validate_call
2651
+ def partial_update_volume_automation(
2652
+ self,
2653
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2654
+ region: Annotated[StrictStr, Field(description="region")],
2655
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
2656
+ update_mask: Annotated[
2657
+ Optional[StrictStr],
2658
+ Field(
2659
+ description='A comma-separated list of fully qualified names of fields to be updated. Example: "name,triggers.schedule.rrule"'
2660
+ ),
2661
+ ] = None,
2662
+ partial_update_volume_automation_payload: Optional[PartialUpdateVolumeAutomationPayload] = None,
2663
+ _request_timeout: Union[
2664
+ None,
2665
+ Annotated[StrictFloat, Field(gt=0)],
2666
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2667
+ ] = None,
2668
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2669
+ _content_type: Optional[StrictStr] = None,
2670
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2671
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2672
+ ) -> VolumeAutomation:
2673
+ """Patch volume automation
2674
+
2675
+ Partially updates a specific volume automation. Specify the fields to update in the `updateMask` query parameter.
2676
+
2677
+ :param project_id: project Id (required)
2678
+ :type project_id: str
2679
+ :param region: region (required)
2680
+ :type region: str
2681
+ :param automation_id: automation Id (required)
2682
+ :type automation_id: str
2683
+ :param update_mask: A comma-separated list of fully qualified names of fields to be updated. Example: \"name,triggers.schedule.rrule\"
2684
+ :type update_mask: str
2685
+ :param partial_update_volume_automation_payload:
2686
+ :type partial_update_volume_automation_payload: PartialUpdateVolumeAutomationPayload
2687
+ :param _request_timeout: timeout setting for this request. If one
2688
+ number provided, it will be total request
2689
+ timeout. It can also be a pair (tuple) of
2690
+ (connection, read) timeouts.
2691
+ :type _request_timeout: int, tuple(int, int), optional
2692
+ :param _request_auth: set to override the auth_settings for an a single
2693
+ request; this effectively ignores the
2694
+ authentication in the spec for a single request.
2695
+ :type _request_auth: dict, optional
2696
+ :param _content_type: force content-type for the request.
2697
+ :type _content_type: str, Optional
2698
+ :param _headers: set to override the headers for a single
2699
+ request; this effectively ignores the headers
2700
+ in the spec for a single request.
2701
+ :type _headers: dict, optional
2702
+ :param _host_index: set to override the host_index for a single
2703
+ request; this effectively ignores the host_index
2704
+ in the spec for a single request.
2705
+ :type _host_index: int, optional
2706
+ :return: Returns the result object.
2707
+ """ # noqa: E501
2708
+
2709
+ _param = self._partial_update_volume_automation_serialize(
2710
+ project_id=project_id,
2711
+ region=region,
2712
+ automation_id=automation_id,
2713
+ update_mask=update_mask,
2714
+ partial_update_volume_automation_payload=partial_update_volume_automation_payload,
2715
+ _request_auth=_request_auth,
2716
+ _content_type=_content_type,
2717
+ _headers=_headers,
2718
+ _host_index=_host_index,
2719
+ )
2720
+
2721
+ _response_types_map: Dict[str, Optional[str]] = {
2722
+ "200": "VolumeAutomation",
2723
+ "400": "ErrorResponse",
2724
+ "401": "ErrorResponse",
2725
+ "403": "ErrorResponse",
2726
+ "404": "ErrorResponse",
2727
+ }
2728
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2729
+ response_data.read()
2730
+ return self.api_client.response_deserialize(
2731
+ response_data=response_data,
2732
+ response_types_map=_response_types_map,
2733
+ ).data
2734
+
2735
+ @validate_call
2736
+ def partial_update_volume_automation_with_http_info(
2737
+ self,
2738
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2739
+ region: Annotated[StrictStr, Field(description="region")],
2740
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
2741
+ update_mask: Annotated[
2742
+ Optional[StrictStr],
2743
+ Field(
2744
+ description='A comma-separated list of fully qualified names of fields to be updated. Example: "name,triggers.schedule.rrule"'
2745
+ ),
2746
+ ] = None,
2747
+ partial_update_volume_automation_payload: Optional[PartialUpdateVolumeAutomationPayload] = None,
2748
+ _request_timeout: Union[
2749
+ None,
2750
+ Annotated[StrictFloat, Field(gt=0)],
2751
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2752
+ ] = None,
2753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2754
+ _content_type: Optional[StrictStr] = None,
2755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2757
+ ) -> ApiResponse[VolumeAutomation]:
2758
+ """Patch volume automation
2759
+
2760
+ Partially updates a specific volume automation. Specify the fields to update in the `updateMask` query parameter.
2761
+
2762
+ :param project_id: project Id (required)
2763
+ :type project_id: str
2764
+ :param region: region (required)
2765
+ :type region: str
2766
+ :param automation_id: automation Id (required)
2767
+ :type automation_id: str
2768
+ :param update_mask: A comma-separated list of fully qualified names of fields to be updated. Example: \"name,triggers.schedule.rrule\"
2769
+ :type update_mask: str
2770
+ :param partial_update_volume_automation_payload:
2771
+ :type partial_update_volume_automation_payload: PartialUpdateVolumeAutomationPayload
2772
+ :param _request_timeout: timeout setting for this request. If one
2773
+ number provided, it will be total request
2774
+ timeout. It can also be a pair (tuple) of
2775
+ (connection, read) timeouts.
2776
+ :type _request_timeout: int, tuple(int, int), optional
2777
+ :param _request_auth: set to override the auth_settings for an a single
2778
+ request; this effectively ignores the
2779
+ authentication in the spec for a single request.
2780
+ :type _request_auth: dict, optional
2781
+ :param _content_type: force content-type for the request.
2782
+ :type _content_type: str, Optional
2783
+ :param _headers: set to override the headers for a single
2784
+ request; this effectively ignores the headers
2785
+ in the spec for a single request.
2786
+ :type _headers: dict, optional
2787
+ :param _host_index: set to override the host_index for a single
2788
+ request; this effectively ignores the host_index
2789
+ in the spec for a single request.
2790
+ :type _host_index: int, optional
2791
+ :return: Returns the result object.
2792
+ """ # noqa: E501
2793
+
2794
+ _param = self._partial_update_volume_automation_serialize(
2795
+ project_id=project_id,
2796
+ region=region,
2797
+ automation_id=automation_id,
2798
+ update_mask=update_mask,
2799
+ partial_update_volume_automation_payload=partial_update_volume_automation_payload,
2800
+ _request_auth=_request_auth,
2801
+ _content_type=_content_type,
2802
+ _headers=_headers,
2803
+ _host_index=_host_index,
2804
+ )
2805
+
2806
+ _response_types_map: Dict[str, Optional[str]] = {
2807
+ "200": "VolumeAutomation",
2808
+ "400": "ErrorResponse",
2809
+ "401": "ErrorResponse",
2810
+ "403": "ErrorResponse",
2811
+ "404": "ErrorResponse",
2812
+ }
2813
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2814
+ response_data.read()
2815
+ return self.api_client.response_deserialize(
2816
+ response_data=response_data,
2817
+ response_types_map=_response_types_map,
2818
+ )
2819
+
2820
+ @validate_call
2821
+ def partial_update_volume_automation_without_preload_content(
2822
+ self,
2823
+ project_id: Annotated[StrictStr, Field(description="project Id")],
2824
+ region: Annotated[StrictStr, Field(description="region")],
2825
+ automation_id: Annotated[StrictStr, Field(description="automation Id")],
2826
+ update_mask: Annotated[
2827
+ Optional[StrictStr],
2828
+ Field(
2829
+ description='A comma-separated list of fully qualified names of fields to be updated. Example: "name,triggers.schedule.rrule"'
2830
+ ),
2831
+ ] = None,
2832
+ partial_update_volume_automation_payload: Optional[PartialUpdateVolumeAutomationPayload] = None,
2833
+ _request_timeout: Union[
2834
+ None,
2835
+ Annotated[StrictFloat, Field(gt=0)],
2836
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2837
+ ] = None,
2838
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2839
+ _content_type: Optional[StrictStr] = None,
2840
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2841
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2842
+ ) -> RESTResponseType:
2843
+ """Patch volume automation
2844
+
2845
+ Partially updates a specific volume automation. Specify the fields to update in the `updateMask` query parameter.
2846
+
2847
+ :param project_id: project Id (required)
2848
+ :type project_id: str
2849
+ :param region: region (required)
2850
+ :type region: str
2851
+ :param automation_id: automation Id (required)
2852
+ :type automation_id: str
2853
+ :param update_mask: A comma-separated list of fully qualified names of fields to be updated. Example: \"name,triggers.schedule.rrule\"
2854
+ :type update_mask: str
2855
+ :param partial_update_volume_automation_payload:
2856
+ :type partial_update_volume_automation_payload: PartialUpdateVolumeAutomationPayload
2857
+ :param _request_timeout: timeout setting for this request. If one
2858
+ number provided, it will be total request
2859
+ timeout. It can also be a pair (tuple) of
2860
+ (connection, read) timeouts.
2861
+ :type _request_timeout: int, tuple(int, int), optional
2862
+ :param _request_auth: set to override the auth_settings for an a single
2863
+ request; this effectively ignores the
2864
+ authentication in the spec for a single request.
2865
+ :type _request_auth: dict, optional
2866
+ :param _content_type: force content-type for the request.
2867
+ :type _content_type: str, Optional
2868
+ :param _headers: set to override the headers for a single
2869
+ request; this effectively ignores the headers
2870
+ in the spec for a single request.
2871
+ :type _headers: dict, optional
2872
+ :param _host_index: set to override the host_index for a single
2873
+ request; this effectively ignores the host_index
2874
+ in the spec for a single request.
2875
+ :type _host_index: int, optional
2876
+ :return: Returns the result object.
2877
+ """ # noqa: E501
2878
+
2879
+ _param = self._partial_update_volume_automation_serialize(
2880
+ project_id=project_id,
2881
+ region=region,
2882
+ automation_id=automation_id,
2883
+ update_mask=update_mask,
2884
+ partial_update_volume_automation_payload=partial_update_volume_automation_payload,
2885
+ _request_auth=_request_auth,
2886
+ _content_type=_content_type,
2887
+ _headers=_headers,
2888
+ _host_index=_host_index,
2889
+ )
2890
+
2891
+ _response_types_map: Dict[str, Optional[str]] = {
2892
+ "200": "VolumeAutomation",
2893
+ "400": "ErrorResponse",
2894
+ "401": "ErrorResponse",
2895
+ "403": "ErrorResponse",
2896
+ "404": "ErrorResponse",
2897
+ }
2898
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2899
+ return response_data.response
2900
+
2901
+ def _partial_update_volume_automation_serialize(
2902
+ self,
2903
+ project_id,
2904
+ region,
2905
+ automation_id,
2906
+ update_mask,
2907
+ partial_update_volume_automation_payload,
2908
+ _request_auth,
2909
+ _content_type,
2910
+ _headers,
2911
+ _host_index,
2912
+ ) -> RequestSerialized:
2913
+
2914
+ _host = None
2915
+
2916
+ _collection_formats: Dict[str, str] = {}
2917
+
2918
+ _path_params: Dict[str, str] = {}
2919
+ _query_params: List[Tuple[str, str]] = []
2920
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2921
+ _form_params: List[Tuple[str, str]] = []
2922
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
2923
+ _body_params: Optional[bytes] = None
2924
+
2925
+ # process the path parameters
2926
+ if project_id is not None:
2927
+ _path_params["projectId"] = project_id
2928
+ if region is not None:
2929
+ _path_params["region"] = region
2930
+ if automation_id is not None:
2931
+ _path_params["automationId"] = automation_id
2932
+ # process the query parameters
2933
+ if update_mask is not None:
2934
+
2935
+ _query_params.append(("updateMask", update_mask))
2936
+
2937
+ # process the header parameters
2938
+ # process the form parameters
2939
+ # process the body parameter
2940
+ if partial_update_volume_automation_payload is not None:
2941
+ _body_params = partial_update_volume_automation_payload
2942
+
2943
+ # set the HTTP header `Accept`
2944
+ if "Accept" not in _header_params:
2945
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2946
+
2947
+ # set the HTTP header `Content-Type`
2948
+ if _content_type:
2949
+ _header_params["Content-Type"] = _content_type
2950
+ else:
2951
+ _default_content_type = self.api_client.select_header_content_type(["application/json"])
2952
+ if _default_content_type is not None:
2953
+ _header_params["Content-Type"] = _default_content_type
2954
+
2955
+ # authentication setting
2956
+ _auth_settings: List[str] = []
2957
+
2958
+ return self.api_client.param_serialize(
2959
+ method="PATCH",
2960
+ resource_path="/v1/projects/{projectId}/regions/{region}/services/volumes/automations/{automationId}",
2961
+ path_params=_path_params,
2962
+ query_params=_query_params,
2963
+ header_params=_header_params,
2964
+ body=_body_params,
2965
+ post_params=_form_params,
2966
+ files=_files,
2967
+ auth_settings=_auth_settings,
2968
+ collection_formats=_collection_formats,
2969
+ _host=_host,
2970
+ _request_auth=_request_auth,
2971
+ )