lightning-sdk 0.1.58__py3-none-any.whl → 0.2.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 (118) hide show
  1. lightning_sdk/__init__.py +5 -3
  2. lightning_sdk/api/deployment_api.py +23 -11
  3. lightning_sdk/api/job_api.py +42 -7
  4. lightning_sdk/api/lit_container_api.py +7 -3
  5. lightning_sdk/api/mmt_api.py +46 -8
  6. lightning_sdk/api/pipeline_api.py +50 -0
  7. lightning_sdk/api/teamspace_api.py +2 -2
  8. lightning_sdk/api/utils.py +15 -5
  9. lightning_sdk/cli/ai_hub.py +30 -65
  10. lightning_sdk/cli/coloring.py +60 -0
  11. lightning_sdk/cli/configure.py +25 -40
  12. lightning_sdk/cli/connect.py +7 -20
  13. lightning_sdk/cli/create.py +83 -0
  14. lightning_sdk/cli/delete.py +72 -75
  15. lightning_sdk/cli/docker.py +77 -0
  16. lightning_sdk/cli/download.py +71 -111
  17. lightning_sdk/cli/entrypoint.py +44 -65
  18. lightning_sdk/cli/generate.py +28 -43
  19. lightning_sdk/cli/inspect.py +22 -50
  20. lightning_sdk/cli/list.py +281 -222
  21. lightning_sdk/cli/mmts_menu.py +1 -1
  22. lightning_sdk/cli/open.py +62 -0
  23. lightning_sdk/cli/run.py +430 -263
  24. lightning_sdk/cli/serve.py +162 -189
  25. lightning_sdk/cli/start.py +55 -36
  26. lightning_sdk/cli/stop.py +97 -55
  27. lightning_sdk/cli/switch.py +53 -36
  28. lightning_sdk/cli/upload.py +318 -255
  29. lightning_sdk/deployment/__init__.py +2 -0
  30. lightning_sdk/deployment/deployment.py +33 -8
  31. lightning_sdk/lightning_cloud/openapi/__init__.py +21 -0
  32. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  33. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +10 -6
  34. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +355 -4
  35. lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +4 -4
  36. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +14 -2
  37. lightning_sdk/lightning_cloud/openapi/api/pipelines_service_api.py +670 -0
  38. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +303 -4
  39. lightning_sdk/lightning_cloud/openapi/models/__init__.py +20 -0
  40. lightning_sdk/lightning_cloud/openapi/models/agents_id_body.py +17 -69
  41. lightning_sdk/lightning_cloud/openapi/models/cluster_id_capacityreservations_body.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/create.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +53 -1
  44. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +105 -1
  45. lightning_sdk/lightning_cloud/openapi/models/id_visibility_body1.py +1 -27
  46. lightning_sdk/lightning_cloud/openapi/models/id_visibility_body2.py +149 -0
  47. lightning_sdk/lightning_cloud/openapi/models/org_id_memberships_body.py +27 -1
  48. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +157 -1
  49. lightning_sdk/lightning_cloud/openapi/models/pipelines_id_body.py +435 -0
  50. lightning_sdk/lightning_cloud/openapi/models/project_id_pipelines_body.py +201 -0
  51. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +157 -1
  52. lightning_sdk/lightning_cloud/openapi/models/slurm_jobs_body.py +79 -1
  53. lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body.py +1 -27
  54. lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body1.py +175 -0
  55. lightning_sdk/lightning_cloud/openapi/models/v1_agent_job.py +79 -1
  56. lightning_sdk/lightning_cloud/openapi/models/v1_assistant.py +17 -69
  57. lightning_sdk/lightning_cloud/openapi/models/v1_capacity_block_offering.py +27 -1
  58. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event_type.py +1 -1
  59. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +131 -1
  60. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +79 -1
  61. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  62. lightning_sdk/lightning_cloud/openapi/models/v1_complete_upload_temporary_artifact_request.py +175 -0
  63. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +461 -0
  64. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_template_request.py +27 -1
  65. lightning_sdk/lightning_cloud/openapi/models/v1_create_job_request.py +201 -0
  66. lightning_sdk/lightning_cloud/openapi/models/v1_create_managed_endpoint_response.py +149 -0
  67. lightning_sdk/lightning_cloud/openapi/models/v1_create_multi_machine_job_request.py +253 -0
  68. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  69. lightning_sdk/lightning_cloud/openapi/models/v1_delete_pipeline_response.py +149 -0
  70. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +105 -1
  71. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_details.py +175 -0
  72. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template.py +53 -1
  73. lightning_sdk/lightning_cloud/openapi/models/v1_filestore_data_connection.py +201 -0
  74. lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_job.py +27 -1
  75. lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_mmt.py +27 -1
  76. lightning_sdk/lightning_cloud/openapi/models/v1_find_capacity_block_offering_response.py +29 -3
  77. lightning_sdk/lightning_cloud/openapi/models/v1_job.py +133 -3
  78. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +53 -1
  79. lightning_sdk/lightning_cloud/openapi/models/v1_job_timing.py +27 -1
  80. lightning_sdk/lightning_cloud/openapi/models/v1_list_pipelines_response.py +123 -0
  81. lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_artifact.py +27 -1
  82. lightning_sdk/lightning_cloud/openapi/models/v1_lit_repository.py +29 -1
  83. lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +27 -1
  84. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
  85. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_state.py +2 -0
  86. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +157 -1
  87. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +487 -0
  88. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step.py +253 -0
  89. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step_status.py +331 -0
  90. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step_type.py +104 -0
  91. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +157 -1
  92. lightning_sdk/lightning_cloud/openapi/models/v1_restart_timing.py +27 -1
  93. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  94. lightning_sdk/lightning_cloud/openapi/models/v1_shared_filesystem.py +201 -0
  95. lightning_sdk/lightning_cloud/openapi/models/v1_slurm_job.py +27 -1
  96. lightning_sdk/lightning_cloud/openapi/models/v1_update_job_visibility_response.py +97 -0
  97. lightning_sdk/lightning_cloud/openapi/models/v1_upload_temporary_artifact_request.py +123 -0
  98. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +95 -355
  99. lightning_sdk/lightning_cloud/openapi/models/validate.py +27 -1
  100. lightning_sdk/lightning_cloud/rest_client.py +4 -2
  101. lightning_sdk/machine.py +25 -1
  102. lightning_sdk/models.py +18 -12
  103. lightning_sdk/pipeline/__init__.py +4 -0
  104. lightning_sdk/pipeline/pipeline.py +109 -0
  105. lightning_sdk/pipeline/types.py +268 -0
  106. lightning_sdk/pipeline/utils.py +69 -0
  107. lightning_sdk/plugin.py +9 -10
  108. lightning_sdk/services/utilities.py +2 -2
  109. lightning_sdk/studio.py +5 -1
  110. lightning_sdk/teamspace.py +1 -1
  111. lightning_sdk/utils/resolve.py +12 -1
  112. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.0.dist-info}/METADATA +6 -8
  113. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.0.dist-info}/RECORD +117 -88
  114. lightning_sdk/cli/legacy.py +0 -135
  115. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.0.dist-info}/LICENSE +0 -0
  116. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.0.dist-info}/WHEEL +0 -0
  117. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.0.dist-info}/entry_points.txt +0 -0
  118. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,670 @@
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 PipelinesServiceApi(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 pipelines_service_create_pipeline(self, body: 'ProjectIdPipelinesBody', project_id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
47
+ """pipelines_service_create_pipeline # 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.pipelines_service_create_pipeline(body, project_id, async_req=True)
52
+ >>> result = thread.get()
53
+
54
+ :param async_req bool
55
+ :param ProjectIdPipelinesBody body: (required)
56
+ :param str project_id: (required)
57
+ :return: V1Pipeline
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.pipelines_service_create_pipeline_with_http_info(body, project_id, **kwargs) # noqa: E501
64
+ else:
65
+ (data) = self.pipelines_service_create_pipeline_with_http_info(body, project_id, **kwargs) # noqa: E501
66
+ return data
67
+
68
+ def pipelines_service_create_pipeline_with_http_info(self, body: 'ProjectIdPipelinesBody', project_id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
69
+ """pipelines_service_create_pipeline # 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.pipelines_service_create_pipeline_with_http_info(body, project_id, async_req=True)
74
+ >>> result = thread.get()
75
+
76
+ :param async_req bool
77
+ :param ProjectIdPipelinesBody body: (required)
78
+ :param str project_id: (required)
79
+ :return: V1Pipeline
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 pipelines_service_create_pipeline" % 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 `pipelines_service_create_pipeline`") # 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 `pipelines_service_create_pipeline`") # 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}/pipelines', '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='V1Pipeline', # 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 pipelines_service_delete_pipeline(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeletePipelineResponse': # noqa: E501
152
+ """pipelines_service_delete_pipeline # 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.pipelines_service_delete_pipeline(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: V1DeletePipelineResponse
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.pipelines_service_delete_pipeline_with_http_info(project_id, id, **kwargs) # noqa: E501
169
+ else:
170
+ (data) = self.pipelines_service_delete_pipeline_with_http_info(project_id, id, **kwargs) # noqa: E501
171
+ return data
172
+
173
+ def pipelines_service_delete_pipeline_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeletePipelineResponse': # noqa: E501
174
+ """pipelines_service_delete_pipeline # 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.pipelines_service_delete_pipeline_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: V1DeletePipelineResponse
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 pipelines_service_delete_pipeline" % 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 `pipelines_service_delete_pipeline`") # 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 `pipelines_service_delete_pipeline`") # 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}/pipelines/{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='V1DeletePipelineResponse', # 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 pipelines_service_get_pipeline(self, project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
253
+ """pipelines_service_get_pipeline # 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.pipelines_service_get_pipeline(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: V1Pipeline
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.pipelines_service_get_pipeline_with_http_info(project_id, id, **kwargs) # noqa: E501
270
+ else:
271
+ (data) = self.pipelines_service_get_pipeline_with_http_info(project_id, id, **kwargs) # noqa: E501
272
+ return data
273
+
274
+ def pipelines_service_get_pipeline_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
275
+ """pipelines_service_get_pipeline # 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.pipelines_service_get_pipeline_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: V1Pipeline
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 pipelines_service_get_pipeline" % 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 `pipelines_service_get_pipeline`") # 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 `pipelines_service_get_pipeline`") # 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}/pipelines/{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='V1Pipeline', # 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 pipelines_service_get_pipeline_by_name(self, project_id: 'str', name: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
354
+ """pipelines_service_get_pipeline_by_name # 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.pipelines_service_get_pipeline_by_name(project_id, name, async_req=True)
359
+ >>> result = thread.get()
360
+
361
+ :param async_req bool
362
+ :param str project_id: (required)
363
+ :param str name: (required)
364
+ :return: V1Pipeline
365
+ If the method is called asynchronously,
366
+ returns the request thread.
367
+ """
368
+ kwargs['_return_http_data_only'] = True
369
+ if kwargs.get('async_req'):
370
+ return self.pipelines_service_get_pipeline_by_name_with_http_info(project_id, name, **kwargs) # noqa: E501
371
+ else:
372
+ (data) = self.pipelines_service_get_pipeline_by_name_with_http_info(project_id, name, **kwargs) # noqa: E501
373
+ return data
374
+
375
+ def pipelines_service_get_pipeline_by_name_with_http_info(self, project_id: 'str', name: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
376
+ """pipelines_service_get_pipeline_by_name # noqa: E501
377
+
378
+ This method makes a synchronous HTTP request by default. To make an
379
+ asynchronous HTTP request, please pass async_req=True
380
+ >>> thread = api.pipelines_service_get_pipeline_by_name_with_http_info(project_id, name, async_req=True)
381
+ >>> result = thread.get()
382
+
383
+ :param async_req bool
384
+ :param str project_id: (required)
385
+ :param str name: (required)
386
+ :return: V1Pipeline
387
+ If the method is called asynchronously,
388
+ returns the request thread.
389
+ """
390
+
391
+ all_params = ['project_id', 'name'] # noqa: E501
392
+ all_params.append('async_req')
393
+ all_params.append('_return_http_data_only')
394
+ all_params.append('_preload_content')
395
+ all_params.append('_request_timeout')
396
+
397
+ params = locals()
398
+ for key, val in six.iteritems(params['kwargs']):
399
+ if key not in all_params:
400
+ raise TypeError(
401
+ "Got an unexpected keyword argument '%s'"
402
+ " to method pipelines_service_get_pipeline_by_name" % key
403
+ )
404
+ params[key] = val
405
+ del params['kwargs']
406
+ # verify the required parameter 'project_id' is set
407
+ if ('project_id' not in params or
408
+ params['project_id'] is None):
409
+ raise ValueError("Missing the required parameter `project_id` when calling `pipelines_service_get_pipeline_by_name`") # noqa: E501
410
+ # verify the required parameter 'name' is set
411
+ if ('name' not in params or
412
+ params['name'] is None):
413
+ raise ValueError("Missing the required parameter `name` when calling `pipelines_service_get_pipeline_by_name`") # noqa: E501
414
+
415
+ collection_formats = {}
416
+
417
+ path_params = {}
418
+ if 'project_id' in params:
419
+ path_params['projectId'] = params['project_id'] # noqa: E501
420
+ if 'name' in params:
421
+ path_params['name'] = params['name'] # noqa: E501
422
+
423
+ query_params = []
424
+
425
+ header_params = {}
426
+
427
+ form_params = []
428
+ local_var_files = {}
429
+
430
+ body_params = None
431
+ # HTTP header `Accept`
432
+ header_params['Accept'] = self.api_client.select_header_accept(
433
+ ['application/json']) # noqa: E501
434
+
435
+ # Authentication setting
436
+ auth_settings = [] # noqa: E501
437
+
438
+ return self.api_client.call_api(
439
+ '/v1/projects/{projectId}/pipelines/{name}/getbyname', 'GET',
440
+ path_params,
441
+ query_params,
442
+ header_params,
443
+ body=body_params,
444
+ post_params=form_params,
445
+ files=local_var_files,
446
+ response_type='V1Pipeline', # noqa: E501
447
+ auth_settings=auth_settings,
448
+ async_req=params.get('async_req'),
449
+ _return_http_data_only=params.get('_return_http_data_only'),
450
+ _preload_content=params.get('_preload_content', True),
451
+ _request_timeout=params.get('_request_timeout'),
452
+ collection_formats=collection_formats)
453
+
454
+ def pipelines_service_list_pipelines(self, project_id: 'str', **kwargs) -> 'V1ListPipelinesResponse': # noqa: E501
455
+ """pipelines_service_list_pipelines # noqa: E501
456
+
457
+ This method makes a synchronous HTTP request by default. To make an
458
+ asynchronous HTTP request, please pass async_req=True
459
+ >>> thread = api.pipelines_service_list_pipelines(project_id, async_req=True)
460
+ >>> result = thread.get()
461
+
462
+ :param async_req bool
463
+ :param str project_id: (required)
464
+ :param str page_token:
465
+ :param int limit:
466
+ :param str state:
467
+ :return: V1ListPipelinesResponse
468
+ If the method is called asynchronously,
469
+ returns the request thread.
470
+ """
471
+ kwargs['_return_http_data_only'] = True
472
+ if kwargs.get('async_req'):
473
+ return self.pipelines_service_list_pipelines_with_http_info(project_id, **kwargs) # noqa: E501
474
+ else:
475
+ (data) = self.pipelines_service_list_pipelines_with_http_info(project_id, **kwargs) # noqa: E501
476
+ return data
477
+
478
+ def pipelines_service_list_pipelines_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListPipelinesResponse': # noqa: E501
479
+ """pipelines_service_list_pipelines # noqa: E501
480
+
481
+ This method makes a synchronous HTTP request by default. To make an
482
+ asynchronous HTTP request, please pass async_req=True
483
+ >>> thread = api.pipelines_service_list_pipelines_with_http_info(project_id, async_req=True)
484
+ >>> result = thread.get()
485
+
486
+ :param async_req bool
487
+ :param str project_id: (required)
488
+ :param str page_token:
489
+ :param int limit:
490
+ :param str state:
491
+ :return: V1ListPipelinesResponse
492
+ If the method is called asynchronously,
493
+ returns the request thread.
494
+ """
495
+
496
+ all_params = ['project_id', 'page_token', 'limit', 'state'] # noqa: E501
497
+ all_params.append('async_req')
498
+ all_params.append('_return_http_data_only')
499
+ all_params.append('_preload_content')
500
+ all_params.append('_request_timeout')
501
+
502
+ params = locals()
503
+ for key, val in six.iteritems(params['kwargs']):
504
+ if key not in all_params:
505
+ raise TypeError(
506
+ "Got an unexpected keyword argument '%s'"
507
+ " to method pipelines_service_list_pipelines" % key
508
+ )
509
+ params[key] = val
510
+ del params['kwargs']
511
+ # verify the required parameter 'project_id' is set
512
+ if ('project_id' not in params or
513
+ params['project_id'] is None):
514
+ raise ValueError("Missing the required parameter `project_id` when calling `pipelines_service_list_pipelines`") # noqa: E501
515
+
516
+ collection_formats = {}
517
+
518
+ path_params = {}
519
+ if 'project_id' in params:
520
+ path_params['projectId'] = params['project_id'] # noqa: E501
521
+
522
+ query_params = []
523
+ if 'page_token' in params:
524
+ query_params.append(('pageToken', params['page_token'])) # noqa: E501
525
+ if 'limit' in params:
526
+ query_params.append(('limit', params['limit'])) # noqa: E501
527
+ if 'state' in params:
528
+ query_params.append(('state', params['state'])) # noqa: E501
529
+
530
+ header_params = {}
531
+
532
+ form_params = []
533
+ local_var_files = {}
534
+
535
+ body_params = None
536
+ # HTTP header `Accept`
537
+ header_params['Accept'] = self.api_client.select_header_accept(
538
+ ['application/json']) # noqa: E501
539
+
540
+ # Authentication setting
541
+ auth_settings = [] # noqa: E501
542
+
543
+ return self.api_client.call_api(
544
+ '/v1/projects/{projectId}/pipelines', 'GET',
545
+ path_params,
546
+ query_params,
547
+ header_params,
548
+ body=body_params,
549
+ post_params=form_params,
550
+ files=local_var_files,
551
+ response_type='V1ListPipelinesResponse', # noqa: E501
552
+ auth_settings=auth_settings,
553
+ async_req=params.get('async_req'),
554
+ _return_http_data_only=params.get('_return_http_data_only'),
555
+ _preload_content=params.get('_preload_content', True),
556
+ _request_timeout=params.get('_request_timeout'),
557
+ collection_formats=collection_formats)
558
+
559
+ def pipelines_service_update_pipeline(self, body: 'PipelinesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
560
+ """pipelines_service_update_pipeline # noqa: E501
561
+
562
+ This method makes a synchronous HTTP request by default. To make an
563
+ asynchronous HTTP request, please pass async_req=True
564
+ >>> thread = api.pipelines_service_update_pipeline(body, project_id, id, async_req=True)
565
+ >>> result = thread.get()
566
+
567
+ :param async_req bool
568
+ :param PipelinesIdBody body: (required)
569
+ :param str project_id: (required)
570
+ :param str id: (required)
571
+ :return: V1Pipeline
572
+ If the method is called asynchronously,
573
+ returns the request thread.
574
+ """
575
+ kwargs['_return_http_data_only'] = True
576
+ if kwargs.get('async_req'):
577
+ return self.pipelines_service_update_pipeline_with_http_info(body, project_id, id, **kwargs) # noqa: E501
578
+ else:
579
+ (data) = self.pipelines_service_update_pipeline_with_http_info(body, project_id, id, **kwargs) # noqa: E501
580
+ return data
581
+
582
+ def pipelines_service_update_pipeline_with_http_info(self, body: 'PipelinesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
583
+ """pipelines_service_update_pipeline # noqa: E501
584
+
585
+ This method makes a synchronous HTTP request by default. To make an
586
+ asynchronous HTTP request, please pass async_req=True
587
+ >>> thread = api.pipelines_service_update_pipeline_with_http_info(body, project_id, id, async_req=True)
588
+ >>> result = thread.get()
589
+
590
+ :param async_req bool
591
+ :param PipelinesIdBody body: (required)
592
+ :param str project_id: (required)
593
+ :param str id: (required)
594
+ :return: V1Pipeline
595
+ If the method is called asynchronously,
596
+ returns the request thread.
597
+ """
598
+
599
+ all_params = ['body', 'project_id', 'id'] # noqa: E501
600
+ all_params.append('async_req')
601
+ all_params.append('_return_http_data_only')
602
+ all_params.append('_preload_content')
603
+ all_params.append('_request_timeout')
604
+
605
+ params = locals()
606
+ for key, val in six.iteritems(params['kwargs']):
607
+ if key not in all_params:
608
+ raise TypeError(
609
+ "Got an unexpected keyword argument '%s'"
610
+ " to method pipelines_service_update_pipeline" % key
611
+ )
612
+ params[key] = val
613
+ del params['kwargs']
614
+ # verify the required parameter 'body' is set
615
+ if ('body' not in params or
616
+ params['body'] is None):
617
+ raise ValueError("Missing the required parameter `body` when calling `pipelines_service_update_pipeline`") # noqa: E501
618
+ # verify the required parameter 'project_id' is set
619
+ if ('project_id' not in params or
620
+ params['project_id'] is None):
621
+ raise ValueError("Missing the required parameter `project_id` when calling `pipelines_service_update_pipeline`") # noqa: E501
622
+ # verify the required parameter 'id' is set
623
+ if ('id' not in params or
624
+ params['id'] is None):
625
+ raise ValueError("Missing the required parameter `id` when calling `pipelines_service_update_pipeline`") # noqa: E501
626
+
627
+ collection_formats = {}
628
+
629
+ path_params = {}
630
+ if 'project_id' in params:
631
+ path_params['projectId'] = params['project_id'] # noqa: E501
632
+ if 'id' in params:
633
+ path_params['id'] = params['id'] # noqa: E501
634
+
635
+ query_params = []
636
+
637
+ header_params = {}
638
+
639
+ form_params = []
640
+ local_var_files = {}
641
+
642
+ body_params = None
643
+ if 'body' in params:
644
+ body_params = params['body']
645
+ # HTTP header `Accept`
646
+ header_params['Accept'] = self.api_client.select_header_accept(
647
+ ['application/json']) # noqa: E501
648
+
649
+ # HTTP header `Content-Type`
650
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
651
+ ['application/json']) # noqa: E501
652
+
653
+ # Authentication setting
654
+ auth_settings = [] # noqa: E501
655
+
656
+ return self.api_client.call_api(
657
+ '/v1/projects/{projectId}/pipelines/{id}', 'PUT',
658
+ path_params,
659
+ query_params,
660
+ header_params,
661
+ body=body_params,
662
+ post_params=form_params,
663
+ files=local_var_files,
664
+ response_type='V1Pipeline', # noqa: E501
665
+ auth_settings=auth_settings,
666
+ async_req=params.get('async_req'),
667
+ _return_http_data_only=params.get('_return_http_data_only'),
668
+ _preload_content=params.get('_preload_content', True),
669
+ _request_timeout=params.get('_request_timeout'),
670
+ collection_formats=collection_formats)