lightning-sdk 0.1.58__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) 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 +23 -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 +22 -0
  16. lightning_sdk/cli/download.py +78 -113
  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 +128 -191
  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 +23 -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 +674 -0
  38. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +303 -4
  39. lightning_sdk/lightning_cloud/openapi/models/__init__.py +22 -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 +461 -0
  50. lightning_sdk/lightning_cloud/openapi/models/project_id_pipelines_body.py +227 -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 +53 -1
  75. lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_mmt.py +53 -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_artifacts_type.py +103 -0
  79. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +53 -1
  80. lightning_sdk/lightning_cloud/openapi/models/v1_job_timing.py +27 -1
  81. lightning_sdk/lightning_cloud/openapi/models/v1_list_pipelines_response.py +123 -0
  82. lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_artifact.py +27 -1
  83. lightning_sdk/lightning_cloud/openapi/models/v1_lit_repository.py +29 -1
  84. lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +27 -1
  85. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
  86. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_state.py +2 -0
  87. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +209 -1
  88. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +513 -0
  89. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_schedule.py +149 -0
  90. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step.py +253 -0
  91. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step_status.py +331 -0
  92. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step_type.py +104 -0
  93. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +157 -1
  94. lightning_sdk/lightning_cloud/openapi/models/v1_restart_timing.py +27 -1
  95. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  96. lightning_sdk/lightning_cloud/openapi/models/v1_shared_filesystem.py +201 -0
  97. lightning_sdk/lightning_cloud/openapi/models/v1_slurm_job.py +27 -1
  98. lightning_sdk/lightning_cloud/openapi/models/v1_update_job_visibility_response.py +97 -0
  99. lightning_sdk/lightning_cloud/openapi/models/v1_upload_temporary_artifact_request.py +123 -0
  100. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +95 -355
  101. lightning_sdk/lightning_cloud/openapi/models/validate.py +27 -1
  102. lightning_sdk/lightning_cloud/rest_client.py +4 -2
  103. lightning_sdk/machine.py +25 -1
  104. lightning_sdk/models.py +18 -12
  105. lightning_sdk/pipeline/__init__.py +4 -0
  106. lightning_sdk/pipeline/pipeline.py +109 -0
  107. lightning_sdk/pipeline/types.py +268 -0
  108. lightning_sdk/pipeline/utils.py +69 -0
  109. lightning_sdk/plugin.py +9 -10
  110. lightning_sdk/serve.py +134 -0
  111. lightning_sdk/services/utilities.py +2 -2
  112. lightning_sdk/studio.py +5 -1
  113. lightning_sdk/teamspace.py +1 -1
  114. lightning_sdk/utils/resolve.py +12 -1
  115. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/METADATA +6 -8
  116. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/RECORD +120 -88
  117. lightning_sdk/cli/legacy.py +0 -135
  118. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/LICENSE +0 -0
  119. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/WHEEL +0 -0
  120. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/entry_points.txt +0 -0
  121. {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,674 @@
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 parent_pipeline_id:
465
+ :param str page_token:
466
+ :param int limit:
467
+ :param str state:
468
+ :return: V1ListPipelinesResponse
469
+ If the method is called asynchronously,
470
+ returns the request thread.
471
+ """
472
+ kwargs['_return_http_data_only'] = True
473
+ if kwargs.get('async_req'):
474
+ return self.pipelines_service_list_pipelines_with_http_info(project_id, **kwargs) # noqa: E501
475
+ else:
476
+ (data) = self.pipelines_service_list_pipelines_with_http_info(project_id, **kwargs) # noqa: E501
477
+ return data
478
+
479
+ def pipelines_service_list_pipelines_with_http_info(self, project_id: 'str', **kwargs) -> 'V1ListPipelinesResponse': # noqa: E501
480
+ """pipelines_service_list_pipelines # noqa: E501
481
+
482
+ This method makes a synchronous HTTP request by default. To make an
483
+ asynchronous HTTP request, please pass async_req=True
484
+ >>> thread = api.pipelines_service_list_pipelines_with_http_info(project_id, async_req=True)
485
+ >>> result = thread.get()
486
+
487
+ :param async_req bool
488
+ :param str project_id: (required)
489
+ :param str parent_pipeline_id:
490
+ :param str page_token:
491
+ :param int limit:
492
+ :param str state:
493
+ :return: V1ListPipelinesResponse
494
+ If the method is called asynchronously,
495
+ returns the request thread.
496
+ """
497
+
498
+ all_params = ['project_id', 'parent_pipeline_id', 'page_token', 'limit', 'state'] # noqa: E501
499
+ all_params.append('async_req')
500
+ all_params.append('_return_http_data_only')
501
+ all_params.append('_preload_content')
502
+ all_params.append('_request_timeout')
503
+
504
+ params = locals()
505
+ for key, val in six.iteritems(params['kwargs']):
506
+ if key not in all_params:
507
+ raise TypeError(
508
+ "Got an unexpected keyword argument '%s'"
509
+ " to method pipelines_service_list_pipelines" % key
510
+ )
511
+ params[key] = val
512
+ del params['kwargs']
513
+ # verify the required parameter 'project_id' is set
514
+ if ('project_id' not in params or
515
+ params['project_id'] is None):
516
+ raise ValueError("Missing the required parameter `project_id` when calling `pipelines_service_list_pipelines`") # noqa: E501
517
+
518
+ collection_formats = {}
519
+
520
+ path_params = {}
521
+ if 'project_id' in params:
522
+ path_params['projectId'] = params['project_id'] # noqa: E501
523
+
524
+ query_params = []
525
+ if 'parent_pipeline_id' in params:
526
+ query_params.append(('parentPipelineId', params['parent_pipeline_id'])) # noqa: E501
527
+ if 'page_token' in params:
528
+ query_params.append(('pageToken', params['page_token'])) # noqa: E501
529
+ if 'limit' in params:
530
+ query_params.append(('limit', params['limit'])) # noqa: E501
531
+ if 'state' in params:
532
+ query_params.append(('state', params['state'])) # noqa: E501
533
+
534
+ header_params = {}
535
+
536
+ form_params = []
537
+ local_var_files = {}
538
+
539
+ body_params = None
540
+ # HTTP header `Accept`
541
+ header_params['Accept'] = self.api_client.select_header_accept(
542
+ ['application/json']) # noqa: E501
543
+
544
+ # Authentication setting
545
+ auth_settings = [] # noqa: E501
546
+
547
+ return self.api_client.call_api(
548
+ '/v1/projects/{projectId}/pipelines', 'GET',
549
+ path_params,
550
+ query_params,
551
+ header_params,
552
+ body=body_params,
553
+ post_params=form_params,
554
+ files=local_var_files,
555
+ response_type='V1ListPipelinesResponse', # noqa: E501
556
+ auth_settings=auth_settings,
557
+ async_req=params.get('async_req'),
558
+ _return_http_data_only=params.get('_return_http_data_only'),
559
+ _preload_content=params.get('_preload_content', True),
560
+ _request_timeout=params.get('_request_timeout'),
561
+ collection_formats=collection_formats)
562
+
563
+ def pipelines_service_update_pipeline(self, body: 'PipelinesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
564
+ """pipelines_service_update_pipeline # noqa: E501
565
+
566
+ This method makes a synchronous HTTP request by default. To make an
567
+ asynchronous HTTP request, please pass async_req=True
568
+ >>> thread = api.pipelines_service_update_pipeline(body, project_id, id, async_req=True)
569
+ >>> result = thread.get()
570
+
571
+ :param async_req bool
572
+ :param PipelinesIdBody body: (required)
573
+ :param str project_id: (required)
574
+ :param str id: (required)
575
+ :return: V1Pipeline
576
+ If the method is called asynchronously,
577
+ returns the request thread.
578
+ """
579
+ kwargs['_return_http_data_only'] = True
580
+ if kwargs.get('async_req'):
581
+ return self.pipelines_service_update_pipeline_with_http_info(body, project_id, id, **kwargs) # noqa: E501
582
+ else:
583
+ (data) = self.pipelines_service_update_pipeline_with_http_info(body, project_id, id, **kwargs) # noqa: E501
584
+ return data
585
+
586
+ def pipelines_service_update_pipeline_with_http_info(self, body: 'PipelinesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
587
+ """pipelines_service_update_pipeline # noqa: E501
588
+
589
+ This method makes a synchronous HTTP request by default. To make an
590
+ asynchronous HTTP request, please pass async_req=True
591
+ >>> thread = api.pipelines_service_update_pipeline_with_http_info(body, project_id, id, async_req=True)
592
+ >>> result = thread.get()
593
+
594
+ :param async_req bool
595
+ :param PipelinesIdBody body: (required)
596
+ :param str project_id: (required)
597
+ :param str id: (required)
598
+ :return: V1Pipeline
599
+ If the method is called asynchronously,
600
+ returns the request thread.
601
+ """
602
+
603
+ all_params = ['body', 'project_id', 'id'] # noqa: E501
604
+ all_params.append('async_req')
605
+ all_params.append('_return_http_data_only')
606
+ all_params.append('_preload_content')
607
+ all_params.append('_request_timeout')
608
+
609
+ params = locals()
610
+ for key, val in six.iteritems(params['kwargs']):
611
+ if key not in all_params:
612
+ raise TypeError(
613
+ "Got an unexpected keyword argument '%s'"
614
+ " to method pipelines_service_update_pipeline" % key
615
+ )
616
+ params[key] = val
617
+ del params['kwargs']
618
+ # verify the required parameter 'body' is set
619
+ if ('body' not in params or
620
+ params['body'] is None):
621
+ raise ValueError("Missing the required parameter `body` when calling `pipelines_service_update_pipeline`") # noqa: E501
622
+ # verify the required parameter 'project_id' is set
623
+ if ('project_id' not in params or
624
+ params['project_id'] is None):
625
+ raise ValueError("Missing the required parameter `project_id` when calling `pipelines_service_update_pipeline`") # noqa: E501
626
+ # verify the required parameter 'id' is set
627
+ if ('id' not in params or
628
+ params['id'] is None):
629
+ raise ValueError("Missing the required parameter `id` when calling `pipelines_service_update_pipeline`") # noqa: E501
630
+
631
+ collection_formats = {}
632
+
633
+ path_params = {}
634
+ if 'project_id' in params:
635
+ path_params['projectId'] = params['project_id'] # noqa: E501
636
+ if 'id' in params:
637
+ path_params['id'] = params['id'] # noqa: E501
638
+
639
+ query_params = []
640
+
641
+ header_params = {}
642
+
643
+ form_params = []
644
+ local_var_files = {}
645
+
646
+ body_params = None
647
+ if 'body' in params:
648
+ body_params = params['body']
649
+ # HTTP header `Accept`
650
+ header_params['Accept'] = self.api_client.select_header_accept(
651
+ ['application/json']) # noqa: E501
652
+
653
+ # HTTP header `Content-Type`
654
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
655
+ ['application/json']) # noqa: E501
656
+
657
+ # Authentication setting
658
+ auth_settings = [] # noqa: E501
659
+
660
+ return self.api_client.call_api(
661
+ '/v1/projects/{projectId}/pipelines/{id}', 'PUT',
662
+ path_params,
663
+ query_params,
664
+ header_params,
665
+ body=body_params,
666
+ post_params=form_params,
667
+ files=local_var_files,
668
+ response_type='V1Pipeline', # noqa: E501
669
+ auth_settings=auth_settings,
670
+ async_req=params.get('async_req'),
671
+ _return_http_data_only=params.get('_return_http_data_only'),
672
+ _preload_content=params.get('_preload_content', True),
673
+ _request_timeout=params.get('_request_timeout'),
674
+ collection_formats=collection_formats)