lightning-sdk 0.2.4__py3-none-any.whl → 0.2.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +3 -1
  3. lightning_sdk/api/ai_hub_api.py +15 -0
  4. lightning_sdk/api/studio_api.py +0 -8
  5. lightning_sdk/cli/serve.py +29 -9
  6. lightning_sdk/deployment/deployment.py +32 -4
  7. lightning_sdk/lightning_cloud/openapi/__init__.py +57 -1
  8. lightning_sdk/lightning_cloud/openapi/api/__init__.py +4 -0
  9. lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +537 -0
  10. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +115 -6
  11. lightning_sdk/lightning_cloud/openapi/api/lit_dataset_service_api.py +1973 -0
  12. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +20 -4
  13. lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +20 -20
  14. lightning_sdk/lightning_cloud/openapi/api/pipeline_templates_service_api.py +339 -0
  15. lightning_sdk/lightning_cloud/openapi/api/pipelines_service_api.py +5 -1
  16. lightning_sdk/lightning_cloud/openapi/api/schedules_service_api.py +573 -0
  17. lightning_sdk/lightning_cloud/openapi/api/slurm_jobs_user_service_api.py +202 -0
  18. lightning_sdk/lightning_cloud/openapi/models/__init__.py +53 -1
  19. lightning_sdk/lightning_cloud/openapi/models/cluster_id_capacityblock_body.py +15 -15
  20. lightning_sdk/lightning_cloud/openapi/models/cluster_id_slurmusers_body.py +201 -0
  21. lightning_sdk/lightning_cloud/openapi/models/dataset_id_versions_body.py +149 -0
  22. lightning_sdk/lightning_cloud/openapi/models/dataset_id_visibility_body.py +149 -0
  23. lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +253 -0
  24. lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +95 -69
  25. lightning_sdk/lightning_cloud/openapi/models/externalv1_cluster.py +27 -1
  26. lightning_sdk/lightning_cloud/openapi/models/litdatasets_dataset_id_body.py +149 -0
  27. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/pipelines_id_body.py +69 -17
  29. lightning_sdk/lightning_cloud/openapi/models/pipelinetemplates_id_body.py +331 -0
  30. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
  31. lightning_sdk/lightning_cloud/openapi/models/project_id_litdatasets_body.py +227 -0
  32. lightning_sdk/lightning_cloud/openapi/models/project_id_pipelines_body.py +17 -17
  33. lightning_sdk/lightning_cloud/openapi/models/project_id_schedules_body.py +201 -0
  34. lightning_sdk/lightning_cloud/openapi/models/schedules_id_body.py +383 -0
  35. lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +175 -0
  36. lightning_sdk/lightning_cloud/openapi/models/slurm_jobs_body.py +15 -15
  37. lightning_sdk/lightning_cloud/openapi/models/upload_id_complete_body1.py +149 -0
  38. lightning_sdk/lightning_cloud/openapi/models/upload_id_parts_body1.py +149 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_agent_job.py +124 -20
  40. lightning_sdk/lightning_cloud/openapi/models/v1_assistant_model_status.py +2 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
  42. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +279 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +123 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  46. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +157 -1
  47. lightning_sdk/lightning_cloud/openapi/models/v1_complete_lit_dataset_multi_part_upload_response.py +97 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_complete_lit_dataset_upload_response.py +97 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +175 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_create_lit_dataset_multi_part_upload_response.py +123 -0
  51. lightning_sdk/lightning_cloud/openapi/models/v1_create_organization_request.py +27 -1
  52. lightning_sdk/lightning_cloud/openapi/models/v1_create_pipeline_template_request.py +383 -0
  53. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
  54. lightning_sdk/lightning_cloud/openapi/models/v1_create_server_alert_response.py +97 -0
  55. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  56. lightning_sdk/lightning_cloud/openapi/models/{v1_pipeline_schedule.py → v1_delete_cloud_space_environment_template_response.py} +32 -32
  57. lightning_sdk/lightning_cloud/openapi/models/v1_delete_lit_dataset_response.py +97 -0
  58. lightning_sdk/lightning_cloud/openapi/models/v1_delete_lit_dataset_version_response.py +97 -0
  59. lightning_sdk/lightning_cloud/openapi/models/v1_delete_schedule_response.py +175 -0
  60. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_size_response.py +79 -1
  61. lightning_sdk/lightning_cloud/openapi/models/v1_get_lit_dataset_file_upload_urls_response.py +123 -0
  62. lightning_sdk/lightning_cloud/openapi/models/v1_get_lit_dataset_files_url_response.py +149 -0
  63. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
  64. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +55 -3
  65. lightning_sdk/lightning_cloud/openapi/models/v1_instance_overprovisioning_spec.py +79 -27
  66. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
  67. lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +1 -29
  68. lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_environment_templates_response.py +123 -0
  69. lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_dataset_versions_response.py +123 -0
  70. lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_datasets_response.py +123 -0
  71. lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +27 -1
  72. lightning_sdk/lightning_cloud/openapi/models/v1_list_schedules_response.py +123 -0
  73. lightning_sdk/lightning_cloud/openapi/models/v1_list_slurm_cluster_users_response.py +123 -0
  74. lightning_sdk/lightning_cloud/openapi/models/v1_lit_dataset.py +539 -0
  75. lightning_sdk/lightning_cloud/openapi/models/v1_lit_dataset_file.py +175 -0
  76. lightning_sdk/lightning_cloud/openapi/models/v1_lit_dataset_version_archive.py +435 -0
  77. lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_project.py +27 -1
  78. lightning_sdk/lightning_cloud/openapi/models/v1_lit_repository.py +27 -1
  79. lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_request.py +27 -1
  80. lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +107 -3
  81. lightning_sdk/lightning_cloud/openapi/models/v1_metadata.py +27 -1
  82. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +53 -1
  83. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +69 -17
  84. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter.py +435 -0
  85. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter_placement.py +149 -0
  86. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter_placement_type.py +106 -0
  87. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter_type.py +106 -0
  88. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_template.py +513 -0
  89. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_template_visibility_type.py +105 -0
  90. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
  91. lightning_sdk/lightning_cloud/openapi/models/v1_reservation_details.py +201 -0
  92. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  93. lightning_sdk/lightning_cloud/openapi/models/v1_schedule.py +435 -0
  94. lightning_sdk/lightning_cloud/openapi/models/v1_schedule_resource_type.py +103 -0
  95. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +175 -0
  96. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_severity.py +103 -0
  97. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +105 -0
  98. lightning_sdk/lightning_cloud/openapi/models/v1_slurm_cluster_user.py +227 -0
  99. lightning_sdk/lightning_cloud/openapi/models/v1_slurm_job.py +58 -6
  100. lightning_sdk/lightning_cloud/openapi/models/v1_slurm_node.py +31 -291
  101. lightning_sdk/lightning_cloud/openapi/models/v1_subnet_spec.py +149 -0
  102. lightning_sdk/lightning_cloud/openapi/models/v1_update_lit_dataset_visibility_response.py +123 -0
  103. lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +27 -1
  104. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +223 -171
  105. lightning_sdk/lightning_cloud/openapi/models/v1_validate_managed_endpoint_response.py +27 -1
  106. lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +203 -0
  107. lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +1 -27
  108. lightning_sdk/lightning_cloud/openapi/models/version_default_body.py +29 -29
  109. lightning_sdk/lightning_cloud/openapi/models/version_default_body1.py +149 -0
  110. lightning_sdk/lightning_cloud/openapi/models/version_uploads_body1.py +123 -0
  111. lightning_sdk/lightning_cloud/openapi/models/versions_version_body1.py +123 -0
  112. lightning_sdk/lightning_cloud/rest_client.py +44 -40
  113. lightning_sdk/pipeline/types.py +28 -2
  114. lightning_sdk/pipeline/utils.py +1 -1
  115. lightning_sdk/plugin.py +0 -6
  116. lightning_sdk/serve.py +5 -3
  117. lightning_sdk/utils/resolve.py +1 -0
  118. {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/METADATA +1 -1
  119. {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/RECORD +123 -67
  120. {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/WHEEL +1 -1
  121. {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/LICENSE +0 -0
  122. {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/entry_points.txt +0 -0
  123. {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,573 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ external/v1/auth_service.proto
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: version not set
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+
12
+ NOTE
13
+ ----
14
+ standard swagger-codegen-cli for this python client has been modified
15
+ by custom templates. The purpose of these templates is to include
16
+ typing information in the API and Model code. Please refer to the
17
+ main grid repository for more info
18
+ """
19
+
20
+ from __future__ import absolute_import
21
+
22
+ import re # noqa: F401
23
+ from typing import TYPE_CHECKING, Any
24
+
25
+ # python 2 and python 3 compatibility library
26
+ import six
27
+
28
+ from lightning_sdk.lightning_cloud.openapi.api_client import ApiClient
29
+
30
+ if TYPE_CHECKING:
31
+ from datetime import datetime
32
+ from lightning_sdk.lightning_cloud.openapi.models import *
33
+
34
+ class SchedulesServiceApi(object):
35
+ """NOTE: This class is auto generated by the swagger code generator program.
36
+
37
+ Do not edit the class manually.
38
+ Ref: https://github.com/swagger-api/swagger-codegen
39
+ """
40
+
41
+ def __init__(self, api_client=None):
42
+ if api_client is None:
43
+ api_client = ApiClient()
44
+ self.api_client = api_client
45
+
46
+ def schedules_service_create_schedule(self, body: 'ProjectIdSchedulesBody', project_id: 'str', **kwargs) -> 'V1Schedule': # noqa: E501
47
+ """schedules_service_create_schedule # noqa: E501
48
+
49
+ This method makes a synchronous HTTP request by default. To make an
50
+ asynchronous HTTP request, please pass async_req=True
51
+ >>> thread = api.schedules_service_create_schedule(body, project_id, async_req=True)
52
+ >>> result = thread.get()
53
+
54
+ :param async_req bool
55
+ :param ProjectIdSchedulesBody body: (required)
56
+ :param str project_id: (required)
57
+ :return: V1Schedule
58
+ If the method is called asynchronously,
59
+ returns the request thread.
60
+ """
61
+ kwargs['_return_http_data_only'] = True
62
+ if kwargs.get('async_req'):
63
+ return self.schedules_service_create_schedule_with_http_info(body, project_id, **kwargs) # noqa: E501
64
+ else:
65
+ (data) = self.schedules_service_create_schedule_with_http_info(body, project_id, **kwargs) # noqa: E501
66
+ return data
67
+
68
+ def schedules_service_create_schedule_with_http_info(self, body: 'ProjectIdSchedulesBody', project_id: 'str', **kwargs) -> 'V1Schedule': # noqa: E501
69
+ """schedules_service_create_schedule # noqa: E501
70
+
71
+ This method makes a synchronous HTTP request by default. To make an
72
+ asynchronous HTTP request, please pass async_req=True
73
+ >>> thread = api.schedules_service_create_schedule_with_http_info(body, project_id, async_req=True)
74
+ >>> result = thread.get()
75
+
76
+ :param async_req bool
77
+ :param ProjectIdSchedulesBody body: (required)
78
+ :param str project_id: (required)
79
+ :return: V1Schedule
80
+ If the method is called asynchronously,
81
+ returns the request thread.
82
+ """
83
+
84
+ all_params = ['body', 'project_id'] # noqa: E501
85
+ all_params.append('async_req')
86
+ all_params.append('_return_http_data_only')
87
+ all_params.append('_preload_content')
88
+ all_params.append('_request_timeout')
89
+
90
+ params = locals()
91
+ for key, val in six.iteritems(params['kwargs']):
92
+ if key not in all_params:
93
+ raise TypeError(
94
+ "Got an unexpected keyword argument '%s'"
95
+ " to method schedules_service_create_schedule" % key
96
+ )
97
+ params[key] = val
98
+ del params['kwargs']
99
+ # verify the required parameter 'body' is set
100
+ if ('body' not in params or
101
+ params['body'] is None):
102
+ raise ValueError("Missing the required parameter `body` when calling `schedules_service_create_schedule`") # noqa: E501
103
+ # verify the required parameter 'project_id' is set
104
+ if ('project_id' not in params or
105
+ params['project_id'] is None):
106
+ raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_create_schedule`") # noqa: E501
107
+
108
+ collection_formats = {}
109
+
110
+ path_params = {}
111
+ if 'project_id' in params:
112
+ path_params['projectId'] = params['project_id'] # noqa: E501
113
+
114
+ query_params = []
115
+
116
+ header_params = {}
117
+
118
+ form_params = []
119
+ local_var_files = {}
120
+
121
+ body_params = None
122
+ if 'body' in params:
123
+ body_params = params['body']
124
+ # HTTP header `Accept`
125
+ header_params['Accept'] = self.api_client.select_header_accept(
126
+ ['application/json']) # noqa: E501
127
+
128
+ # HTTP header `Content-Type`
129
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
130
+ ['application/json']) # noqa: E501
131
+
132
+ # Authentication setting
133
+ auth_settings = [] # noqa: E501
134
+
135
+ return self.api_client.call_api(
136
+ '/v1/projects/{projectId}/schedules', 'POST',
137
+ path_params,
138
+ query_params,
139
+ header_params,
140
+ body=body_params,
141
+ post_params=form_params,
142
+ files=local_var_files,
143
+ response_type='V1Schedule', # noqa: E501
144
+ auth_settings=auth_settings,
145
+ async_req=params.get('async_req'),
146
+ _return_http_data_only=params.get('_return_http_data_only'),
147
+ _preload_content=params.get('_preload_content', True),
148
+ _request_timeout=params.get('_request_timeout'),
149
+ collection_formats=collection_formats)
150
+
151
+ def schedules_service_delete_schedule(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteScheduleResponse': # noqa: E501
152
+ """schedules_service_delete_schedule # noqa: E501
153
+
154
+ This method makes a synchronous HTTP request by default. To make an
155
+ asynchronous HTTP request, please pass async_req=True
156
+ >>> thread = api.schedules_service_delete_schedule(project_id, id, async_req=True)
157
+ >>> result = thread.get()
158
+
159
+ :param async_req bool
160
+ :param str project_id: (required)
161
+ :param str id: (required)
162
+ :return: V1DeleteScheduleResponse
163
+ If the method is called asynchronously,
164
+ returns the request thread.
165
+ """
166
+ kwargs['_return_http_data_only'] = True
167
+ if kwargs.get('async_req'):
168
+ return self.schedules_service_delete_schedule_with_http_info(project_id, id, **kwargs) # noqa: E501
169
+ else:
170
+ (data) = self.schedules_service_delete_schedule_with_http_info(project_id, id, **kwargs) # noqa: E501
171
+ return data
172
+
173
+ def schedules_service_delete_schedule_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteScheduleResponse': # noqa: E501
174
+ """schedules_service_delete_schedule # noqa: E501
175
+
176
+ This method makes a synchronous HTTP request by default. To make an
177
+ asynchronous HTTP request, please pass async_req=True
178
+ >>> thread = api.schedules_service_delete_schedule_with_http_info(project_id, id, async_req=True)
179
+ >>> result = thread.get()
180
+
181
+ :param async_req bool
182
+ :param str project_id: (required)
183
+ :param str id: (required)
184
+ :return: V1DeleteScheduleResponse
185
+ If the method is called asynchronously,
186
+ returns the request thread.
187
+ """
188
+
189
+ all_params = ['project_id', 'id'] # noqa: E501
190
+ all_params.append('async_req')
191
+ all_params.append('_return_http_data_only')
192
+ all_params.append('_preload_content')
193
+ all_params.append('_request_timeout')
194
+
195
+ params = locals()
196
+ for key, val in six.iteritems(params['kwargs']):
197
+ if key not in all_params:
198
+ raise TypeError(
199
+ "Got an unexpected keyword argument '%s'"
200
+ " to method schedules_service_delete_schedule" % key
201
+ )
202
+ params[key] = val
203
+ del params['kwargs']
204
+ # verify the required parameter 'project_id' is set
205
+ if ('project_id' not in params or
206
+ params['project_id'] is None):
207
+ raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_delete_schedule`") # noqa: E501
208
+ # verify the required parameter 'id' is set
209
+ if ('id' not in params or
210
+ params['id'] is None):
211
+ raise ValueError("Missing the required parameter `id` when calling `schedules_service_delete_schedule`") # noqa: E501
212
+
213
+ collection_formats = {}
214
+
215
+ path_params = {}
216
+ if 'project_id' in params:
217
+ path_params['projectId'] = params['project_id'] # noqa: E501
218
+ if 'id' in params:
219
+ path_params['id'] = params['id'] # noqa: E501
220
+
221
+ query_params = []
222
+
223
+ header_params = {}
224
+
225
+ form_params = []
226
+ local_var_files = {}
227
+
228
+ body_params = None
229
+ # HTTP header `Accept`
230
+ header_params['Accept'] = self.api_client.select_header_accept(
231
+ ['application/json']) # noqa: E501
232
+
233
+ # Authentication setting
234
+ auth_settings = [] # noqa: E501
235
+
236
+ return self.api_client.call_api(
237
+ '/v1/projects/{projectId}/schedules/{id}', 'DELETE',
238
+ path_params,
239
+ query_params,
240
+ header_params,
241
+ body=body_params,
242
+ post_params=form_params,
243
+ files=local_var_files,
244
+ response_type='V1DeleteScheduleResponse', # noqa: E501
245
+ auth_settings=auth_settings,
246
+ async_req=params.get('async_req'),
247
+ _return_http_data_only=params.get('_return_http_data_only'),
248
+ _preload_content=params.get('_preload_content', True),
249
+ _request_timeout=params.get('_request_timeout'),
250
+ collection_formats=collection_formats)
251
+
252
+ def schedules_service_get_schedule(self, project_id: 'str', id: 'str', **kwargs) -> 'V1Schedule': # noqa: E501
253
+ """schedules_service_get_schedule # noqa: E501
254
+
255
+ This method makes a synchronous HTTP request by default. To make an
256
+ asynchronous HTTP request, please pass async_req=True
257
+ >>> thread = api.schedules_service_get_schedule(project_id, id, async_req=True)
258
+ >>> result = thread.get()
259
+
260
+ :param async_req bool
261
+ :param str project_id: (required)
262
+ :param str id: (required)
263
+ :return: V1Schedule
264
+ If the method is called asynchronously,
265
+ returns the request thread.
266
+ """
267
+ kwargs['_return_http_data_only'] = True
268
+ if kwargs.get('async_req'):
269
+ return self.schedules_service_get_schedule_with_http_info(project_id, id, **kwargs) # noqa: E501
270
+ else:
271
+ (data) = self.schedules_service_get_schedule_with_http_info(project_id, id, **kwargs) # noqa: E501
272
+ return data
273
+
274
+ def schedules_service_get_schedule_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1Schedule': # noqa: E501
275
+ """schedules_service_get_schedule # noqa: E501
276
+
277
+ This method makes a synchronous HTTP request by default. To make an
278
+ asynchronous HTTP request, please pass async_req=True
279
+ >>> thread = api.schedules_service_get_schedule_with_http_info(project_id, id, async_req=True)
280
+ >>> result = thread.get()
281
+
282
+ :param async_req bool
283
+ :param str project_id: (required)
284
+ :param str id: (required)
285
+ :return: V1Schedule
286
+ If the method is called asynchronously,
287
+ returns the request thread.
288
+ """
289
+
290
+ all_params = ['project_id', 'id'] # noqa: E501
291
+ all_params.append('async_req')
292
+ all_params.append('_return_http_data_only')
293
+ all_params.append('_preload_content')
294
+ all_params.append('_request_timeout')
295
+
296
+ params = locals()
297
+ for key, val in six.iteritems(params['kwargs']):
298
+ if key not in all_params:
299
+ raise TypeError(
300
+ "Got an unexpected keyword argument '%s'"
301
+ " to method schedules_service_get_schedule" % key
302
+ )
303
+ params[key] = val
304
+ del params['kwargs']
305
+ # verify the required parameter 'project_id' is set
306
+ if ('project_id' not in params or
307
+ params['project_id'] is None):
308
+ raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_get_schedule`") # noqa: E501
309
+ # verify the required parameter 'id' is set
310
+ if ('id' not in params or
311
+ params['id'] is None):
312
+ raise ValueError("Missing the required parameter `id` when calling `schedules_service_get_schedule`") # noqa: E501
313
+
314
+ collection_formats = {}
315
+
316
+ path_params = {}
317
+ if 'project_id' in params:
318
+ path_params['projectId'] = params['project_id'] # noqa: E501
319
+ if 'id' in params:
320
+ path_params['id'] = params['id'] # noqa: E501
321
+
322
+ query_params = []
323
+
324
+ header_params = {}
325
+
326
+ form_params = []
327
+ local_var_files = {}
328
+
329
+ body_params = None
330
+ # HTTP header `Accept`
331
+ header_params['Accept'] = self.api_client.select_header_accept(
332
+ ['application/json']) # noqa: E501
333
+
334
+ # Authentication setting
335
+ auth_settings = [] # noqa: E501
336
+
337
+ return self.api_client.call_api(
338
+ '/v1/projects/{projectId}/schedules/{id}', 'GET',
339
+ path_params,
340
+ query_params,
341
+ header_params,
342
+ body=body_params,
343
+ post_params=form_params,
344
+ files=local_var_files,
345
+ response_type='V1Schedule', # noqa: E501
346
+ auth_settings=auth_settings,
347
+ async_req=params.get('async_req'),
348
+ _return_http_data_only=params.get('_return_http_data_only'),
349
+ _preload_content=params.get('_preload_content', True),
350
+ _request_timeout=params.get('_request_timeout'),
351
+ collection_formats=collection_formats)
352
+
353
+ def schedules_service_list_schedules(self, project_id: 'str', **kwargs) -> 'V1ListSchedulesResponse': # noqa: E501
354
+ """schedules_service_list_schedules # noqa: E501
355
+
356
+ This method makes a synchronous HTTP request by default. To make an
357
+ asynchronous HTTP request, please pass async_req=True
358
+ >>> thread = api.schedules_service_list_schedules(project_id, async_req=True)
359
+ >>> result = thread.get()
360
+
361
+ :param async_req bool
362
+ :param str project_id: (required)
363
+ :param str resource_id:
364
+ :param str page_token:
365
+ :param int limit:
366
+ :param str state:
367
+ :return: V1ListSchedulesResponse
368
+ If the method is called asynchronously,
369
+ returns the request thread.
370
+ """
371
+ kwargs['_return_http_data_only'] = True
372
+ if kwargs.get('async_req'):
373
+ return self.schedules_service_list_schedules_with_http_info(project_id, **kwargs) # noqa: E501
374
+ else:
375
+ (data) = self.schedules_service_list_schedules_with_http_info(project_id, **kwargs) # noqa: E501
376
+ return data
377
+
378
+ def schedules_service_list_schedules_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListSchedulesResponse': # noqa: E501
379
+ """schedules_service_list_schedules # noqa: E501
380
+
381
+ This method makes a synchronous HTTP request by default. To make an
382
+ asynchronous HTTP request, please pass async_req=True
383
+ >>> thread = api.schedules_service_list_schedules_with_http_info(project_id, async_req=True)
384
+ >>> result = thread.get()
385
+
386
+ :param async_req bool
387
+ :param str project_id: (required)
388
+ :param str resource_id:
389
+ :param str page_token:
390
+ :param int limit:
391
+ :param str state:
392
+ :return: V1ListSchedulesResponse
393
+ If the method is called asynchronously,
394
+ returns the request thread.
395
+ """
396
+
397
+ all_params = ['project_id', 'resource_id', 'page_token', 'limit', 'state'] # noqa: E501
398
+ all_params.append('async_req')
399
+ all_params.append('_return_http_data_only')
400
+ all_params.append('_preload_content')
401
+ all_params.append('_request_timeout')
402
+
403
+ params = locals()
404
+ for key, val in six.iteritems(params['kwargs']):
405
+ if key not in all_params:
406
+ raise TypeError(
407
+ "Got an unexpected keyword argument '%s'"
408
+ " to method schedules_service_list_schedules" % key
409
+ )
410
+ params[key] = val
411
+ del params['kwargs']
412
+ # verify the required parameter 'project_id' is set
413
+ if ('project_id' not in params or
414
+ params['project_id'] is None):
415
+ raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_list_schedules`") # noqa: E501
416
+
417
+ collection_formats = {}
418
+
419
+ path_params = {}
420
+ if 'project_id' in params:
421
+ path_params['projectId'] = params['project_id'] # noqa: E501
422
+
423
+ query_params = []
424
+ if 'resource_id' in params:
425
+ query_params.append(('resourceId', params['resource_id'])) # noqa: E501
426
+ if 'page_token' in params:
427
+ query_params.append(('pageToken', params['page_token'])) # noqa: E501
428
+ if 'limit' in params:
429
+ query_params.append(('limit', params['limit'])) # noqa: E501
430
+ if 'state' in params:
431
+ query_params.append(('state', params['state'])) # noqa: E501
432
+
433
+ header_params = {}
434
+
435
+ form_params = []
436
+ local_var_files = {}
437
+
438
+ body_params = None
439
+ # HTTP header `Accept`
440
+ header_params['Accept'] = self.api_client.select_header_accept(
441
+ ['application/json']) # noqa: E501
442
+
443
+ # Authentication setting
444
+ auth_settings = [] # noqa: E501
445
+
446
+ return self.api_client.call_api(
447
+ '/v1/projects/{projectId}/schedules', 'GET',
448
+ path_params,
449
+ query_params,
450
+ header_params,
451
+ body=body_params,
452
+ post_params=form_params,
453
+ files=local_var_files,
454
+ response_type='V1ListSchedulesResponse', # noqa: E501
455
+ auth_settings=auth_settings,
456
+ async_req=params.get('async_req'),
457
+ _return_http_data_only=params.get('_return_http_data_only'),
458
+ _preload_content=params.get('_preload_content', True),
459
+ _request_timeout=params.get('_request_timeout'),
460
+ collection_formats=collection_formats)
461
+
462
+ def schedules_service_update_schedule(self, body: 'SchedulesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Schedule': # noqa: E501
463
+ """schedules_service_update_schedule # noqa: E501
464
+
465
+ This method makes a synchronous HTTP request by default. To make an
466
+ asynchronous HTTP request, please pass async_req=True
467
+ >>> thread = api.schedules_service_update_schedule(body, project_id, id, async_req=True)
468
+ >>> result = thread.get()
469
+
470
+ :param async_req bool
471
+ :param SchedulesIdBody body: (required)
472
+ :param str project_id: (required)
473
+ :param str id: (required)
474
+ :return: V1Schedule
475
+ If the method is called asynchronously,
476
+ returns the request thread.
477
+ """
478
+ kwargs['_return_http_data_only'] = True
479
+ if kwargs.get('async_req'):
480
+ return self.schedules_service_update_schedule_with_http_info(body, project_id, id, **kwargs) # noqa: E501
481
+ else:
482
+ (data) = self.schedules_service_update_schedule_with_http_info(body, project_id, id, **kwargs) # noqa: E501
483
+ return data
484
+
485
+ def schedules_service_update_schedule_with_http_info(self, body: 'SchedulesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Schedule': # noqa: E501
486
+ """schedules_service_update_schedule # noqa: E501
487
+
488
+ This method makes a synchronous HTTP request by default. To make an
489
+ asynchronous HTTP request, please pass async_req=True
490
+ >>> thread = api.schedules_service_update_schedule_with_http_info(body, project_id, id, async_req=True)
491
+ >>> result = thread.get()
492
+
493
+ :param async_req bool
494
+ :param SchedulesIdBody body: (required)
495
+ :param str project_id: (required)
496
+ :param str id: (required)
497
+ :return: V1Schedule
498
+ If the method is called asynchronously,
499
+ returns the request thread.
500
+ """
501
+
502
+ all_params = ['body', 'project_id', 'id'] # noqa: E501
503
+ all_params.append('async_req')
504
+ all_params.append('_return_http_data_only')
505
+ all_params.append('_preload_content')
506
+ all_params.append('_request_timeout')
507
+
508
+ params = locals()
509
+ for key, val in six.iteritems(params['kwargs']):
510
+ if key not in all_params:
511
+ raise TypeError(
512
+ "Got an unexpected keyword argument '%s'"
513
+ " to method schedules_service_update_schedule" % key
514
+ )
515
+ params[key] = val
516
+ del params['kwargs']
517
+ # verify the required parameter 'body' is set
518
+ if ('body' not in params or
519
+ params['body'] is None):
520
+ raise ValueError("Missing the required parameter `body` when calling `schedules_service_update_schedule`") # noqa: E501
521
+ # verify the required parameter 'project_id' is set
522
+ if ('project_id' not in params or
523
+ params['project_id'] is None):
524
+ raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_update_schedule`") # noqa: E501
525
+ # verify the required parameter 'id' is set
526
+ if ('id' not in params or
527
+ params['id'] is None):
528
+ raise ValueError("Missing the required parameter `id` when calling `schedules_service_update_schedule`") # noqa: E501
529
+
530
+ collection_formats = {}
531
+
532
+ path_params = {}
533
+ if 'project_id' in params:
534
+ path_params['projectId'] = params['project_id'] # noqa: E501
535
+ if 'id' in params:
536
+ path_params['id'] = params['id'] # noqa: E501
537
+
538
+ query_params = []
539
+
540
+ header_params = {}
541
+
542
+ form_params = []
543
+ local_var_files = {}
544
+
545
+ body_params = None
546
+ if 'body' in params:
547
+ body_params = params['body']
548
+ # HTTP header `Accept`
549
+ header_params['Accept'] = self.api_client.select_header_accept(
550
+ ['application/json']) # noqa: E501
551
+
552
+ # HTTP header `Content-Type`
553
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
554
+ ['application/json']) # noqa: E501
555
+
556
+ # Authentication setting
557
+ auth_settings = [] # noqa: E501
558
+
559
+ return self.api_client.call_api(
560
+ '/v1/projects/{projectId}/schedules/{id}', 'PUT',
561
+ path_params,
562
+ query_params,
563
+ header_params,
564
+ body=body_params,
565
+ post_params=form_params,
566
+ files=local_var_files,
567
+ response_type='V1Schedule', # noqa: E501
568
+ auth_settings=auth_settings,
569
+ async_req=params.get('async_req'),
570
+ _return_http_data_only=params.get('_return_http_data_only'),
571
+ _preload_content=params.get('_preload_content', True),
572
+ _request_timeout=params.get('_request_timeout'),
573
+ collection_formats=collection_formats)