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,537 @@
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 CloudSpaceEnvironmentTemplateServiceApi(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 cloud_space_environment_template_service_create_cloud_space_environment_template(self, body: 'V1CreateCloudSpaceEnvironmentTemplateRequest', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
47
+ """cloud_space_environment_template_service_create_cloud_space_environment_template # 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.cloud_space_environment_template_service_create_cloud_space_environment_template(body, async_req=True)
52
+ >>> result = thread.get()
53
+
54
+ :param async_req bool
55
+ :param V1CreateCloudSpaceEnvironmentTemplateRequest body: (required)
56
+ :return: V1CloudSpaceEnvironmentTemplate
57
+ If the method is called asynchronously,
58
+ returns the request thread.
59
+ """
60
+ kwargs['_return_http_data_only'] = True
61
+ if kwargs.get('async_req'):
62
+ return self.cloud_space_environment_template_service_create_cloud_space_environment_template_with_http_info(body, **kwargs) # noqa: E501
63
+ else:
64
+ (data) = self.cloud_space_environment_template_service_create_cloud_space_environment_template_with_http_info(body, **kwargs) # noqa: E501
65
+ return data
66
+
67
+ def cloud_space_environment_template_service_create_cloud_space_environment_template_with_http_info(self, body: 'V1CreateCloudSpaceEnvironmentTemplateRequest', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
68
+ """cloud_space_environment_template_service_create_cloud_space_environment_template # noqa: E501
69
+
70
+ This method makes a synchronous HTTP request by default. To make an
71
+ asynchronous HTTP request, please pass async_req=True
72
+ >>> thread = api.cloud_space_environment_template_service_create_cloud_space_environment_template_with_http_info(body, async_req=True)
73
+ >>> result = thread.get()
74
+
75
+ :param async_req bool
76
+ :param V1CreateCloudSpaceEnvironmentTemplateRequest body: (required)
77
+ :return: V1CloudSpaceEnvironmentTemplate
78
+ If the method is called asynchronously,
79
+ returns the request thread.
80
+ """
81
+
82
+ all_params = ['body'] # noqa: E501
83
+ all_params.append('async_req')
84
+ all_params.append('_return_http_data_only')
85
+ all_params.append('_preload_content')
86
+ all_params.append('_request_timeout')
87
+
88
+ params = locals()
89
+ for key, val in six.iteritems(params['kwargs']):
90
+ if key not in all_params:
91
+ raise TypeError(
92
+ "Got an unexpected keyword argument '%s'"
93
+ " to method cloud_space_environment_template_service_create_cloud_space_environment_template" % key
94
+ )
95
+ params[key] = val
96
+ del params['kwargs']
97
+ # verify the required parameter 'body' is set
98
+ if ('body' not in params or
99
+ params['body'] is None):
100
+ raise ValueError("Missing the required parameter `body` when calling `cloud_space_environment_template_service_create_cloud_space_environment_template`") # noqa: E501
101
+
102
+ collection_formats = {}
103
+
104
+ path_params = {}
105
+
106
+ query_params = []
107
+
108
+ header_params = {}
109
+
110
+ form_params = []
111
+ local_var_files = {}
112
+
113
+ body_params = None
114
+ if 'body' in params:
115
+ body_params = params['body']
116
+ # HTTP header `Accept`
117
+ header_params['Accept'] = self.api_client.select_header_accept(
118
+ ['application/json']) # noqa: E501
119
+
120
+ # HTTP header `Content-Type`
121
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
122
+ ['application/json']) # noqa: E501
123
+
124
+ # Authentication setting
125
+ auth_settings = [] # noqa: E501
126
+
127
+ return self.api_client.call_api(
128
+ '/v1/cloudspaces/environment-templates', 'POST',
129
+ path_params,
130
+ query_params,
131
+ header_params,
132
+ body=body_params,
133
+ post_params=form_params,
134
+ files=local_var_files,
135
+ response_type='V1CloudSpaceEnvironmentTemplate', # noqa: E501
136
+ auth_settings=auth_settings,
137
+ async_req=params.get('async_req'),
138
+ _return_http_data_only=params.get('_return_http_data_only'),
139
+ _preload_content=params.get('_preload_content', True),
140
+ _request_timeout=params.get('_request_timeout'),
141
+ collection_formats=collection_formats)
142
+
143
+ def cloud_space_environment_template_service_delete_cloud_space_environment_template(self, id: 'str', **kwargs) -> 'V1DeleteCloudSpaceEnvironmentTemplateResponse': # noqa: E501
144
+ """cloud_space_environment_template_service_delete_cloud_space_environment_template # noqa: E501
145
+
146
+ This method makes a synchronous HTTP request by default. To make an
147
+ asynchronous HTTP request, please pass async_req=True
148
+ >>> thread = api.cloud_space_environment_template_service_delete_cloud_space_environment_template(id, async_req=True)
149
+ >>> result = thread.get()
150
+
151
+ :param async_req bool
152
+ :param str id: (required)
153
+ :param str org_id:
154
+ :return: V1DeleteCloudSpaceEnvironmentTemplateResponse
155
+ If the method is called asynchronously,
156
+ returns the request thread.
157
+ """
158
+ kwargs['_return_http_data_only'] = True
159
+ if kwargs.get('async_req'):
160
+ return self.cloud_space_environment_template_service_delete_cloud_space_environment_template_with_http_info(id, **kwargs) # noqa: E501
161
+ else:
162
+ (data) = self.cloud_space_environment_template_service_delete_cloud_space_environment_template_with_http_info(id, **kwargs) # noqa: E501
163
+ return data
164
+
165
+ def cloud_space_environment_template_service_delete_cloud_space_environment_template_with_http_info(self, id: 'str', **kwargs) -> 'V1DeleteCloudSpaceEnvironmentTemplateResponse': # noqa: E501
166
+ """cloud_space_environment_template_service_delete_cloud_space_environment_template # noqa: E501
167
+
168
+ This method makes a synchronous HTTP request by default. To make an
169
+ asynchronous HTTP request, please pass async_req=True
170
+ >>> thread = api.cloud_space_environment_template_service_delete_cloud_space_environment_template_with_http_info(id, async_req=True)
171
+ >>> result = thread.get()
172
+
173
+ :param async_req bool
174
+ :param str id: (required)
175
+ :param str org_id:
176
+ :return: V1DeleteCloudSpaceEnvironmentTemplateResponse
177
+ If the method is called asynchronously,
178
+ returns the request thread.
179
+ """
180
+
181
+ all_params = ['id', 'org_id'] # noqa: E501
182
+ all_params.append('async_req')
183
+ all_params.append('_return_http_data_only')
184
+ all_params.append('_preload_content')
185
+ all_params.append('_request_timeout')
186
+
187
+ params = locals()
188
+ for key, val in six.iteritems(params['kwargs']):
189
+ if key not in all_params:
190
+ raise TypeError(
191
+ "Got an unexpected keyword argument '%s'"
192
+ " to method cloud_space_environment_template_service_delete_cloud_space_environment_template" % key
193
+ )
194
+ params[key] = val
195
+ del params['kwargs']
196
+ # verify the required parameter 'id' is set
197
+ if ('id' not in params or
198
+ params['id'] is None):
199
+ raise ValueError("Missing the required parameter `id` when calling `cloud_space_environment_template_service_delete_cloud_space_environment_template`") # noqa: E501
200
+
201
+ collection_formats = {}
202
+
203
+ path_params = {}
204
+ if 'id' in params:
205
+ path_params['id'] = params['id'] # noqa: E501
206
+
207
+ query_params = []
208
+ if 'org_id' in params:
209
+ query_params.append(('orgId', params['org_id'])) # noqa: E501
210
+
211
+ header_params = {}
212
+
213
+ form_params = []
214
+ local_var_files = {}
215
+
216
+ body_params = None
217
+ # HTTP header `Accept`
218
+ header_params['Accept'] = self.api_client.select_header_accept(
219
+ ['application/json']) # noqa: E501
220
+
221
+ # Authentication setting
222
+ auth_settings = [] # noqa: E501
223
+
224
+ return self.api_client.call_api(
225
+ '/v1/cloudspaces/environment-templates/{id}', 'DELETE',
226
+ path_params,
227
+ query_params,
228
+ header_params,
229
+ body=body_params,
230
+ post_params=form_params,
231
+ files=local_var_files,
232
+ response_type='V1DeleteCloudSpaceEnvironmentTemplateResponse', # noqa: E501
233
+ auth_settings=auth_settings,
234
+ async_req=params.get('async_req'),
235
+ _return_http_data_only=params.get('_return_http_data_only'),
236
+ _preload_content=params.get('_preload_content', True),
237
+ _request_timeout=params.get('_request_timeout'),
238
+ collection_formats=collection_formats)
239
+
240
+ def cloud_space_environment_template_service_get_cloud_space_environment_template(self, id: 'str', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
241
+ """cloud_space_environment_template_service_get_cloud_space_environment_template # noqa: E501
242
+
243
+ This method makes a synchronous HTTP request by default. To make an
244
+ asynchronous HTTP request, please pass async_req=True
245
+ >>> thread = api.cloud_space_environment_template_service_get_cloud_space_environment_template(id, async_req=True)
246
+ >>> result = thread.get()
247
+
248
+ :param async_req bool
249
+ :param str id: (required)
250
+ :param str org_id:
251
+ :return: V1CloudSpaceEnvironmentTemplate
252
+ If the method is called asynchronously,
253
+ returns the request thread.
254
+ """
255
+ kwargs['_return_http_data_only'] = True
256
+ if kwargs.get('async_req'):
257
+ return self.cloud_space_environment_template_service_get_cloud_space_environment_template_with_http_info(id, **kwargs) # noqa: E501
258
+ else:
259
+ (data) = self.cloud_space_environment_template_service_get_cloud_space_environment_template_with_http_info(id, **kwargs) # noqa: E501
260
+ return data
261
+
262
+ def cloud_space_environment_template_service_get_cloud_space_environment_template_with_http_info(self, id: 'str', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
263
+ """cloud_space_environment_template_service_get_cloud_space_environment_template # noqa: E501
264
+
265
+ This method makes a synchronous HTTP request by default. To make an
266
+ asynchronous HTTP request, please pass async_req=True
267
+ >>> thread = api.cloud_space_environment_template_service_get_cloud_space_environment_template_with_http_info(id, async_req=True)
268
+ >>> result = thread.get()
269
+
270
+ :param async_req bool
271
+ :param str id: (required)
272
+ :param str org_id:
273
+ :return: V1CloudSpaceEnvironmentTemplate
274
+ If the method is called asynchronously,
275
+ returns the request thread.
276
+ """
277
+
278
+ all_params = ['id', 'org_id'] # noqa: E501
279
+ all_params.append('async_req')
280
+ all_params.append('_return_http_data_only')
281
+ all_params.append('_preload_content')
282
+ all_params.append('_request_timeout')
283
+
284
+ params = locals()
285
+ for key, val in six.iteritems(params['kwargs']):
286
+ if key not in all_params:
287
+ raise TypeError(
288
+ "Got an unexpected keyword argument '%s'"
289
+ " to method cloud_space_environment_template_service_get_cloud_space_environment_template" % key
290
+ )
291
+ params[key] = val
292
+ del params['kwargs']
293
+ # verify the required parameter 'id' is set
294
+ if ('id' not in params or
295
+ params['id'] is None):
296
+ raise ValueError("Missing the required parameter `id` when calling `cloud_space_environment_template_service_get_cloud_space_environment_template`") # noqa: E501
297
+
298
+ collection_formats = {}
299
+
300
+ path_params = {}
301
+ if 'id' in params:
302
+ path_params['id'] = params['id'] # noqa: E501
303
+
304
+ query_params = []
305
+ if 'org_id' in params:
306
+ query_params.append(('orgId', params['org_id'])) # noqa: E501
307
+
308
+ header_params = {}
309
+
310
+ form_params = []
311
+ local_var_files = {}
312
+
313
+ body_params = None
314
+ # HTTP header `Accept`
315
+ header_params['Accept'] = self.api_client.select_header_accept(
316
+ ['application/json']) # noqa: E501
317
+
318
+ # Authentication setting
319
+ auth_settings = [] # noqa: E501
320
+
321
+ return self.api_client.call_api(
322
+ '/v1/cloudspaces/environment-templates/{id}', 'GET',
323
+ path_params,
324
+ query_params,
325
+ header_params,
326
+ body=body_params,
327
+ post_params=form_params,
328
+ files=local_var_files,
329
+ response_type='V1CloudSpaceEnvironmentTemplate', # noqa: E501
330
+ auth_settings=auth_settings,
331
+ async_req=params.get('async_req'),
332
+ _return_http_data_only=params.get('_return_http_data_only'),
333
+ _preload_content=params.get('_preload_content', True),
334
+ _request_timeout=params.get('_request_timeout'),
335
+ collection_formats=collection_formats)
336
+
337
+ def cloud_space_environment_template_service_list_cloud_space_environment_templates(self, **kwargs) -> 'V1ListCloudSpaceEnvironmentTemplatesResponse': # noqa: E501
338
+ """cloud_space_environment_template_service_list_cloud_space_environment_templates # noqa: E501
339
+
340
+ This method makes a synchronous HTTP request by default. To make an
341
+ asynchronous HTTP request, please pass async_req=True
342
+ >>> thread = api.cloud_space_environment_template_service_list_cloud_space_environment_templates(async_req=True)
343
+ >>> result = thread.get()
344
+
345
+ :param async_req bool
346
+ :param str org_id:
347
+ :param str page_token:
348
+ :param int limit:
349
+ :return: V1ListCloudSpaceEnvironmentTemplatesResponse
350
+ If the method is called asynchronously,
351
+ returns the request thread.
352
+ """
353
+ kwargs['_return_http_data_only'] = True
354
+ if kwargs.get('async_req'):
355
+ return self.cloud_space_environment_template_service_list_cloud_space_environment_templates_with_http_info(**kwargs) # noqa: E501
356
+ else:
357
+ (data) = self.cloud_space_environment_template_service_list_cloud_space_environment_templates_with_http_info(**kwargs) # noqa: E501
358
+ return data
359
+
360
+ def cloud_space_environment_template_service_list_cloud_space_environment_templates_with_http_info(self, **kwargs) -> 'V1ListCloudSpaceEnvironmentTemplatesResponse': # noqa: E501
361
+ """cloud_space_environment_template_service_list_cloud_space_environment_templates # noqa: E501
362
+
363
+ This method makes a synchronous HTTP request by default. To make an
364
+ asynchronous HTTP request, please pass async_req=True
365
+ >>> thread = api.cloud_space_environment_template_service_list_cloud_space_environment_templates_with_http_info(async_req=True)
366
+ >>> result = thread.get()
367
+
368
+ :param async_req bool
369
+ :param str org_id:
370
+ :param str page_token:
371
+ :param int limit:
372
+ :return: V1ListCloudSpaceEnvironmentTemplatesResponse
373
+ If the method is called asynchronously,
374
+ returns the request thread.
375
+ """
376
+
377
+ all_params = ['org_id', 'page_token', 'limit'] # noqa: E501
378
+ all_params.append('async_req')
379
+ all_params.append('_return_http_data_only')
380
+ all_params.append('_preload_content')
381
+ all_params.append('_request_timeout')
382
+
383
+ params = locals()
384
+ for key, val in six.iteritems(params['kwargs']):
385
+ if key not in all_params:
386
+ raise TypeError(
387
+ "Got an unexpected keyword argument '%s'"
388
+ " to method cloud_space_environment_template_service_list_cloud_space_environment_templates" % key
389
+ )
390
+ params[key] = val
391
+ del params['kwargs']
392
+
393
+ collection_formats = {}
394
+
395
+ path_params = {}
396
+
397
+ query_params = []
398
+ if 'org_id' in params:
399
+ query_params.append(('orgId', params['org_id'])) # noqa: E501
400
+ if 'page_token' in params:
401
+ query_params.append(('pageToken', params['page_token'])) # noqa: E501
402
+ if 'limit' in params:
403
+ query_params.append(('limit', params['limit'])) # noqa: E501
404
+
405
+ header_params = {}
406
+
407
+ form_params = []
408
+ local_var_files = {}
409
+
410
+ body_params = None
411
+ # HTTP header `Accept`
412
+ header_params['Accept'] = self.api_client.select_header_accept(
413
+ ['application/json']) # noqa: E501
414
+
415
+ # Authentication setting
416
+ auth_settings = [] # noqa: E501
417
+
418
+ return self.api_client.call_api(
419
+ '/v1/cloudspaces/environment-templates', 'GET',
420
+ path_params,
421
+ query_params,
422
+ header_params,
423
+ body=body_params,
424
+ post_params=form_params,
425
+ files=local_var_files,
426
+ response_type='V1ListCloudSpaceEnvironmentTemplatesResponse', # noqa: E501
427
+ auth_settings=auth_settings,
428
+ async_req=params.get('async_req'),
429
+ _return_http_data_only=params.get('_return_http_data_only'),
430
+ _preload_content=params.get('_preload_content', True),
431
+ _request_timeout=params.get('_request_timeout'),
432
+ collection_formats=collection_formats)
433
+
434
+ def cloud_space_environment_template_service_update_cloud_space_environment_template(self, body: 'EnvironmenttemplatesIdBody', id: 'str', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
435
+ """cloud_space_environment_template_service_update_cloud_space_environment_template # noqa: E501
436
+
437
+ This method makes a synchronous HTTP request by default. To make an
438
+ asynchronous HTTP request, please pass async_req=True
439
+ >>> thread = api.cloud_space_environment_template_service_update_cloud_space_environment_template(body, id, async_req=True)
440
+ >>> result = thread.get()
441
+
442
+ :param async_req bool
443
+ :param EnvironmenttemplatesIdBody body: (required)
444
+ :param str id: (required)
445
+ :return: V1CloudSpaceEnvironmentTemplate
446
+ If the method is called asynchronously,
447
+ returns the request thread.
448
+ """
449
+ kwargs['_return_http_data_only'] = True
450
+ if kwargs.get('async_req'):
451
+ return self.cloud_space_environment_template_service_update_cloud_space_environment_template_with_http_info(body, id, **kwargs) # noqa: E501
452
+ else:
453
+ (data) = self.cloud_space_environment_template_service_update_cloud_space_environment_template_with_http_info(body, id, **kwargs) # noqa: E501
454
+ return data
455
+
456
+ def cloud_space_environment_template_service_update_cloud_space_environment_template_with_http_info(self, body: 'EnvironmenttemplatesIdBody', id: 'str', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
457
+ """cloud_space_environment_template_service_update_cloud_space_environment_template # noqa: E501
458
+
459
+ This method makes a synchronous HTTP request by default. To make an
460
+ asynchronous HTTP request, please pass async_req=True
461
+ >>> thread = api.cloud_space_environment_template_service_update_cloud_space_environment_template_with_http_info(body, id, async_req=True)
462
+ >>> result = thread.get()
463
+
464
+ :param async_req bool
465
+ :param EnvironmenttemplatesIdBody body: (required)
466
+ :param str id: (required)
467
+ :return: V1CloudSpaceEnvironmentTemplate
468
+ If the method is called asynchronously,
469
+ returns the request thread.
470
+ """
471
+
472
+ all_params = ['body', 'id'] # noqa: E501
473
+ all_params.append('async_req')
474
+ all_params.append('_return_http_data_only')
475
+ all_params.append('_preload_content')
476
+ all_params.append('_request_timeout')
477
+
478
+ params = locals()
479
+ for key, val in six.iteritems(params['kwargs']):
480
+ if key not in all_params:
481
+ raise TypeError(
482
+ "Got an unexpected keyword argument '%s'"
483
+ " to method cloud_space_environment_template_service_update_cloud_space_environment_template" % key
484
+ )
485
+ params[key] = val
486
+ del params['kwargs']
487
+ # verify the required parameter 'body' is set
488
+ if ('body' not in params or
489
+ params['body'] is None):
490
+ raise ValueError("Missing the required parameter `body` when calling `cloud_space_environment_template_service_update_cloud_space_environment_template`") # noqa: E501
491
+ # verify the required parameter 'id' is set
492
+ if ('id' not in params or
493
+ params['id'] is None):
494
+ raise ValueError("Missing the required parameter `id` when calling `cloud_space_environment_template_service_update_cloud_space_environment_template`") # noqa: E501
495
+
496
+ collection_formats = {}
497
+
498
+ path_params = {}
499
+ if 'id' in params:
500
+ path_params['id'] = params['id'] # noqa: E501
501
+
502
+ query_params = []
503
+
504
+ header_params = {}
505
+
506
+ form_params = []
507
+ local_var_files = {}
508
+
509
+ body_params = None
510
+ if 'body' in params:
511
+ body_params = params['body']
512
+ # HTTP header `Accept`
513
+ header_params['Accept'] = self.api_client.select_header_accept(
514
+ ['application/json']) # noqa: E501
515
+
516
+ # HTTP header `Content-Type`
517
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
518
+ ['application/json']) # noqa: E501
519
+
520
+ # Authentication setting
521
+ auth_settings = [] # noqa: E501
522
+
523
+ return self.api_client.call_api(
524
+ '/v1/cloudspaces/environment-templates/{id}', 'PUT',
525
+ path_params,
526
+ query_params,
527
+ header_params,
528
+ body=body_params,
529
+ post_params=form_params,
530
+ files=local_var_files,
531
+ response_type='V1CloudSpaceEnvironmentTemplate', # noqa: E501
532
+ auth_settings=auth_settings,
533
+ async_req=params.get('async_req'),
534
+ _return_http_data_only=params.get('_return_http_data_only'),
535
+ _preload_content=params.get('_preload_content', True),
536
+ _request_timeout=params.get('_request_timeout'),
537
+ collection_formats=collection_formats)