lightning-sdk 2025.10.8__py3-none-any.whl → 2025.10.22__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 (96) hide show
  1. lightning_sdk/__init__.py +6 -3
  2. lightning_sdk/api/base_studio_api.py +13 -9
  3. lightning_sdk/api/cloud_account_api.py +0 -2
  4. lightning_sdk/api/license_api.py +26 -59
  5. lightning_sdk/api/studio_api.py +15 -2
  6. lightning_sdk/base_studio.py +30 -17
  7. lightning_sdk/cli/base_studio/list.py +1 -3
  8. lightning_sdk/cli/entrypoint.py +8 -34
  9. lightning_sdk/cli/studio/connect.py +42 -92
  10. lightning_sdk/cli/studio/create.py +23 -1
  11. lightning_sdk/cli/studio/start.py +12 -2
  12. lightning_sdk/cli/utils/get_base_studio.py +24 -0
  13. lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +71 -0
  14. lightning_sdk/cli/utils/logging.py +121 -0
  15. lightning_sdk/cli/utils/ssh_connection.py +1 -1
  16. lightning_sdk/constants.py +1 -0
  17. lightning_sdk/helpers.py +53 -34
  18. lightning_sdk/job/job.py +5 -0
  19. lightning_sdk/job/v1.py +8 -0
  20. lightning_sdk/job/v2.py +8 -0
  21. lightning_sdk/lightning_cloud/login.py +260 -10
  22. lightning_sdk/lightning_cloud/openapi/__init__.py +30 -3
  23. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  24. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +19 -19
  25. lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +97 -0
  26. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +105 -0
  27. lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +1463 -240
  28. lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
  29. lightning_sdk/lightning_cloud/openapi/api/sdk_command_history_service_api.py +141 -0
  30. lightning_sdk/lightning_cloud/openapi/models/__init__.py +29 -3
  31. lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_visibility_body.py +27 -1
  32. lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +53 -1
  33. lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +79 -1
  36. lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
  37. lightning_sdk/lightning_cloud/openapi/models/id_transfer_body.py +53 -1
  38. lightning_sdk/lightning_cloud/openapi/models/incident_id_messages_body.py +149 -0
  39. lightning_sdk/lightning_cloud/openapi/models/incidents_id_body.py +279 -0
  40. lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
  41. lightning_sdk/lightning_cloud/openapi/models/messages_message_id_body.py +149 -0
  42. lightning_sdk/lightning_cloud/openapi/models/project_id_incidents_body.py +279 -0
  43. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  44. lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +15 -15
  45. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_transfer_metadata.py +53 -1
  46. lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
  47. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
  48. lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +253 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_response.py +97 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_message_response.py +97 -0
  51. lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_response.py +97 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
  53. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  54. lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
  55. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +149 -0
  56. lightning_sdk/lightning_cloud/openapi/models/v1_group_pod_metrics.py +1241 -0
  57. lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +565 -0
  58. lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
  59. lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
  60. lightning_sdk/lightning_cloud/openapi/models/v1_incident_message.py +253 -0
  61. lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +1 -0
  62. lightning_sdk/lightning_cloud/openapi/models/v1_job.py +53 -1
  63. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
  64. lightning_sdk/lightning_cloud/openapi/models/v1_kai_scheduler_queue_metrics.py +627 -0
  65. lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
  66. lightning_sdk/lightning_cloud/openapi/models/v1_list_group_pod_metrics_response.py +123 -0
  67. lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_messages_response.py +149 -0
  68. lightning_sdk/lightning_cloud/openapi/models/v1_list_incidents_response.py +149 -0
  69. lightning_sdk/lightning_cloud/openapi/models/v1_list_kai_scheduler_queues_metrics_response.py +123 -0
  70. lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
  71. lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +79 -1
  72. lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
  73. lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
  74. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
  75. lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +1 -27
  76. lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_severity.py +104 -0
  77. lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_type.py +104 -0
  78. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
  79. lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +53 -1
  80. lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
  81. lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
  82. lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
  83. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +209 -131
  84. lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
  85. lightning_sdk/lightning_cloud/rest_client.py +48 -45
  86. lightning_sdk/machine.py +2 -1
  87. lightning_sdk/studio.py +22 -2
  88. lightning_sdk/utils/license.py +13 -0
  89. {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/METADATA +1 -1
  90. {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/RECORD +94 -64
  91. lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
  92. lightning_sdk/services/license.py +0 -363
  93. {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/LICENSE +0 -0
  94. {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/WHEEL +0 -0
  95. {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/entry_points.txt +0 -0
  96. {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/top_level.txt +0 -0
@@ -43,38 +43,38 @@ class ProductLicenseServiceApi(object):
43
43
  api_client = ApiClient()
44
44
  self.api_client = api_client
45
45
 
46
- def product_license_service_create_product_license(self, body: 'V1ProductLicense', **kwargs) -> 'V1ProductLicense': # noqa: E501
47
- """Create product license # noqa: E501
46
+ def product_license_service_create_license(self, body: 'V1CreateLicenseRequest', **kwargs) -> 'V1License': # noqa: E501
47
+ """product_license_service_create_license # noqa: E501
48
48
 
49
49
  This method makes a synchronous HTTP request by default. To make an
50
50
  asynchronous HTTP request, please pass async_req=True
51
- >>> thread = api.product_license_service_create_product_license(body, async_req=True)
51
+ >>> thread = api.product_license_service_create_license(body, async_req=True)
52
52
  >>> result = thread.get()
53
53
 
54
54
  :param async_req bool
55
- :param V1ProductLicense body: (required)
56
- :return: V1ProductLicense
55
+ :param V1CreateLicenseRequest body: (required)
56
+ :return: V1License
57
57
  If the method is called asynchronously,
58
58
  returns the request thread.
59
59
  """
60
60
  kwargs['_return_http_data_only'] = True
61
61
  if kwargs.get('async_req'):
62
- return self.product_license_service_create_product_license_with_http_info(body, **kwargs) # noqa: E501
62
+ return self.product_license_service_create_license_with_http_info(body, **kwargs) # noqa: E501
63
63
  else:
64
- (data) = self.product_license_service_create_product_license_with_http_info(body, **kwargs) # noqa: E501
64
+ (data) = self.product_license_service_create_license_with_http_info(body, **kwargs) # noqa: E501
65
65
  return data
66
66
 
67
- def product_license_service_create_product_license_with_http_info(self, body: 'V1ProductLicense', **kwargs) -> 'V1ProductLicense': # noqa: E501
68
- """Create product license # noqa: E501
67
+ def product_license_service_create_license_with_http_info(self, body: 'V1CreateLicenseRequest', **kwargs) -> 'V1License': # noqa: E501
68
+ """product_license_service_create_license # noqa: E501
69
69
 
70
70
  This method makes a synchronous HTTP request by default. To make an
71
71
  asynchronous HTTP request, please pass async_req=True
72
- >>> thread = api.product_license_service_create_product_license_with_http_info(body, async_req=True)
72
+ >>> thread = api.product_license_service_create_license_with_http_info(body, async_req=True)
73
73
  >>> result = thread.get()
74
74
 
75
75
  :param async_req bool
76
- :param V1ProductLicense body: (required)
77
- :return: V1ProductLicense
76
+ :param V1CreateLicenseRequest body: (required)
77
+ :return: V1License
78
78
  If the method is called asynchronously,
79
79
  returns the request thread.
80
80
  """
@@ -90,14 +90,14 @@ class ProductLicenseServiceApi(object):
90
90
  if key not in all_params:
91
91
  raise TypeError(
92
92
  "Got an unexpected keyword argument '%s'"
93
- " to method product_license_service_create_product_license" % key
93
+ " to method product_license_service_create_license" % key
94
94
  )
95
95
  params[key] = val
96
96
  del params['kwargs']
97
97
  # verify the required parameter 'body' is set
98
98
  if ('body' not in params or
99
99
  params['body'] is None):
100
- raise ValueError("Missing the required parameter `body` when calling `product_license_service_create_product_license`") # noqa: E501
100
+ raise ValueError("Missing the required parameter `body` when calling `product_license_service_create_license`") # noqa: E501
101
101
 
102
102
  collection_formats = {}
103
103
 
@@ -132,7 +132,7 @@ class ProductLicenseServiceApi(object):
132
132
  body=body_params,
133
133
  post_params=form_params,
134
134
  files=local_var_files,
135
- response_type='V1ProductLicense', # noqa: E501
135
+ response_type='V1License', # noqa: E501
136
136
  auth_settings=auth_settings,
137
137
  async_req=params.get('async_req'),
138
138
  _return_http_data_only=params.get('_return_http_data_only'),
@@ -140,43 +140,43 @@ class ProductLicenseServiceApi(object):
140
140
  _request_timeout=params.get('_request_timeout'),
141
141
  collection_formats=collection_formats)
142
142
 
143
- def product_license_service_get_product_license(self, license_id: 'str', **kwargs) -> 'V1ProductLicense': # noqa: E501
144
- """Get product license # noqa: E501
143
+ def product_license_service_delete_license(self, id: 'str', **kwargs) -> 'V1DeleteLicenseResponse': # noqa: E501
144
+ """product_license_service_delete_license # noqa: E501
145
145
 
146
146
  This method makes a synchronous HTTP request by default. To make an
147
147
  asynchronous HTTP request, please pass async_req=True
148
- >>> thread = api.product_license_service_get_product_license(license_id, async_req=True)
148
+ >>> thread = api.product_license_service_delete_license(id, async_req=True)
149
149
  >>> result = thread.get()
150
150
 
151
151
  :param async_req bool
152
- :param str license_id: (required)
153
- :return: V1ProductLicense
152
+ :param str id: (required)
153
+ :return: V1DeleteLicenseResponse
154
154
  If the method is called asynchronously,
155
155
  returns the request thread.
156
156
  """
157
157
  kwargs['_return_http_data_only'] = True
158
158
  if kwargs.get('async_req'):
159
- return self.product_license_service_get_product_license_with_http_info(license_id, **kwargs) # noqa: E501
159
+ return self.product_license_service_delete_license_with_http_info(id, **kwargs) # noqa: E501
160
160
  else:
161
- (data) = self.product_license_service_get_product_license_with_http_info(license_id, **kwargs) # noqa: E501
161
+ (data) = self.product_license_service_delete_license_with_http_info(id, **kwargs) # noqa: E501
162
162
  return data
163
163
 
164
- def product_license_service_get_product_license_with_http_info(self, license_id: 'str', **kwargs) -> 'V1ProductLicense': # noqa: E501
165
- """Get product license # noqa: E501
164
+ def product_license_service_delete_license_with_http_info(self, id: 'str', **kwargs) -> 'V1DeleteLicenseResponse': # noqa: E501
165
+ """product_license_service_delete_license # noqa: E501
166
166
 
167
167
  This method makes a synchronous HTTP request by default. To make an
168
168
  asynchronous HTTP request, please pass async_req=True
169
- >>> thread = api.product_license_service_get_product_license_with_http_info(license_id, async_req=True)
169
+ >>> thread = api.product_license_service_delete_license_with_http_info(id, async_req=True)
170
170
  >>> result = thread.get()
171
171
 
172
172
  :param async_req bool
173
- :param str license_id: (required)
174
- :return: V1ProductLicense
173
+ :param str id: (required)
174
+ :return: V1DeleteLicenseResponse
175
175
  If the method is called asynchronously,
176
176
  returns the request thread.
177
177
  """
178
178
 
179
- all_params = ['license_id'] # noqa: E501
179
+ all_params = ['id'] # noqa: E501
180
180
  all_params.append('async_req')
181
181
  all_params.append('_return_http_data_only')
182
182
  all_params.append('_preload_content')
@@ -187,20 +187,20 @@ class ProductLicenseServiceApi(object):
187
187
  if key not in all_params:
188
188
  raise TypeError(
189
189
  "Got an unexpected keyword argument '%s'"
190
- " to method product_license_service_get_product_license" % key
190
+ " to method product_license_service_delete_license" % key
191
191
  )
192
192
  params[key] = val
193
193
  del params['kwargs']
194
- # verify the required parameter 'license_id' is set
195
- if ('license_id' not in params or
196
- params['license_id'] is None):
197
- raise ValueError("Missing the required parameter `license_id` when calling `product_license_service_get_product_license`") # noqa: E501
194
+ # verify the required parameter 'id' is set
195
+ if ('id' not in params or
196
+ params['id'] is None):
197
+ raise ValueError("Missing the required parameter `id` when calling `product_license_service_delete_license`") # noqa: E501
198
198
 
199
199
  collection_formats = {}
200
200
 
201
201
  path_params = {}
202
- if 'license_id' in params:
203
- path_params['licenseId'] = params['license_id'] # noqa: E501
202
+ if 'id' in params:
203
+ path_params['id'] = params['id'] # noqa: E501
204
204
 
205
205
  query_params = []
206
206
 
@@ -218,14 +218,14 @@ class ProductLicenseServiceApi(object):
218
218
  auth_settings = [] # noqa: E501
219
219
 
220
220
  return self.api_client.call_api(
221
- '/v1/licenses/{licenseId}', 'GET',
221
+ '/v1/licenses/{id}', 'DELETE',
222
222
  path_params,
223
223
  query_params,
224
224
  header_params,
225
225
  body=body_params,
226
226
  post_params=form_params,
227
227
  files=local_var_files,
228
- response_type='V1ProductLicense', # noqa: E501
228
+ response_type='V1DeleteLicenseResponse', # noqa: E501
229
229
  auth_settings=auth_settings,
230
230
  async_req=params.get('async_req'),
231
231
  _return_http_data_only=params.get('_return_http_data_only'),
@@ -233,43 +233,43 @@ class ProductLicenseServiceApi(object):
233
233
  _request_timeout=params.get('_request_timeout'),
234
234
  collection_formats=collection_formats)
235
235
 
236
- def product_license_service_list_user_licenses(self, user_id: 'str', **kwargs) -> 'V1ListProductLicensesResponse': # noqa: E501
237
- """list product licenses assigned to a user # noqa: E501
236
+ def product_license_service_get_license(self, id: 'str', **kwargs) -> 'V1License': # noqa: E501
237
+ """product_license_service_get_license # noqa: E501
238
238
 
239
239
  This method makes a synchronous HTTP request by default. To make an
240
240
  asynchronous HTTP request, please pass async_req=True
241
- >>> thread = api.product_license_service_list_user_licenses(user_id, async_req=True)
241
+ >>> thread = api.product_license_service_get_license(id, async_req=True)
242
242
  >>> result = thread.get()
243
243
 
244
244
  :param async_req bool
245
- :param str user_id: (required)
246
- :return: V1ListProductLicensesResponse
245
+ :param str id: (required)
246
+ :return: V1License
247
247
  If the method is called asynchronously,
248
248
  returns the request thread.
249
249
  """
250
250
  kwargs['_return_http_data_only'] = True
251
251
  if kwargs.get('async_req'):
252
- return self.product_license_service_list_user_licenses_with_http_info(user_id, **kwargs) # noqa: E501
252
+ return self.product_license_service_get_license_with_http_info(id, **kwargs) # noqa: E501
253
253
  else:
254
- (data) = self.product_license_service_list_user_licenses_with_http_info(user_id, **kwargs) # noqa: E501
254
+ (data) = self.product_license_service_get_license_with_http_info(id, **kwargs) # noqa: E501
255
255
  return data
256
256
 
257
- def product_license_service_list_user_licenses_with_http_info(self, user_id: 'str', **kwargs) -> 'V1ListProductLicensesResponse': # noqa: E501
258
- """list product licenses assigned to a user # noqa: E501
257
+ def product_license_service_get_license_with_http_info(self, id: 'str', **kwargs) -> 'V1License': # noqa: E501
258
+ """product_license_service_get_license # noqa: E501
259
259
 
260
260
  This method makes a synchronous HTTP request by default. To make an
261
261
  asynchronous HTTP request, please pass async_req=True
262
- >>> thread = api.product_license_service_list_user_licenses_with_http_info(user_id, async_req=True)
262
+ >>> thread = api.product_license_service_get_license_with_http_info(id, async_req=True)
263
263
  >>> result = thread.get()
264
264
 
265
265
  :param async_req bool
266
- :param str user_id: (required)
267
- :return: V1ListProductLicensesResponse
266
+ :param str id: (required)
267
+ :return: V1License
268
268
  If the method is called asynchronously,
269
269
  returns the request thread.
270
270
  """
271
271
 
272
- all_params = ['user_id'] # noqa: E501
272
+ all_params = ['id'] # noqa: E501
273
273
  all_params.append('async_req')
274
274
  all_params.append('_return_http_data_only')
275
275
  all_params.append('_preload_content')
@@ -280,20 +280,20 @@ class ProductLicenseServiceApi(object):
280
280
  if key not in all_params:
281
281
  raise TypeError(
282
282
  "Got an unexpected keyword argument '%s'"
283
- " to method product_license_service_list_user_licenses" % key
283
+ " to method product_license_service_get_license" % key
284
284
  )
285
285
  params[key] = val
286
286
  del params['kwargs']
287
- # verify the required parameter 'user_id' is set
288
- if ('user_id' not in params or
289
- params['user_id'] is None):
290
- raise ValueError("Missing the required parameter `user_id` when calling `product_license_service_list_user_licenses`") # noqa: E501
287
+ # verify the required parameter 'id' is set
288
+ if ('id' not in params or
289
+ params['id'] is None):
290
+ raise ValueError("Missing the required parameter `id` when calling `product_license_service_get_license`") # noqa: E501
291
291
 
292
292
  collection_formats = {}
293
293
 
294
294
  path_params = {}
295
- if 'user_id' in params:
296
- path_params['userId'] = params['user_id'] # noqa: E501
295
+ if 'id' in params:
296
+ path_params['id'] = params['id'] # noqa: E501
297
297
 
298
298
  query_params = []
299
299
 
@@ -311,14 +311,14 @@ class ProductLicenseServiceApi(object):
311
311
  auth_settings = [] # noqa: E501
312
312
 
313
313
  return self.api_client.call_api(
314
- '/v1/users/{userId}/licenses', 'GET',
314
+ '/v1/licenses/{id}', 'GET',
315
315
  path_params,
316
316
  query_params,
317
317
  header_params,
318
318
  body=body_params,
319
319
  post_params=form_params,
320
320
  files=local_var_files,
321
- response_type='V1ListProductLicensesResponse', # noqa: E501
321
+ response_type='V1License', # noqa: E501
322
322
  auth_settings=auth_settings,
323
323
  async_req=params.get('async_req'),
324
324
  _return_http_data_only=params.get('_return_http_data_only'),
@@ -326,43 +326,45 @@ class ProductLicenseServiceApi(object):
326
326
  _request_timeout=params.get('_request_timeout'),
327
327
  collection_formats=collection_formats)
328
328
 
329
- def product_license_service_revoke_product_license(self, license_id: 'str', **kwargs) -> 'V1ProductLicense': # noqa: E501
330
- """revoke or invalidate product license # noqa: E501
329
+ def product_license_service_list_licenses(self, **kwargs) -> 'V1ListLicenseResponse': # noqa: E501
330
+ """product_license_service_list_licenses # noqa: E501
331
331
 
332
332
  This method makes a synchronous HTTP request by default. To make an
333
333
  asynchronous HTTP request, please pass async_req=True
334
- >>> thread = api.product_license_service_revoke_product_license(license_id, async_req=True)
334
+ >>> thread = api.product_license_service_list_licenses(async_req=True)
335
335
  >>> result = thread.get()
336
336
 
337
337
  :param async_req bool
338
- :param str license_id: (required)
339
- :return: V1ProductLicense
338
+ :param str owner_id:
339
+ :param str owner_type:
340
+ :return: V1ListLicenseResponse
340
341
  If the method is called asynchronously,
341
342
  returns the request thread.
342
343
  """
343
344
  kwargs['_return_http_data_only'] = True
344
345
  if kwargs.get('async_req'):
345
- return self.product_license_service_revoke_product_license_with_http_info(license_id, **kwargs) # noqa: E501
346
+ return self.product_license_service_list_licenses_with_http_info(**kwargs) # noqa: E501
346
347
  else:
347
- (data) = self.product_license_service_revoke_product_license_with_http_info(license_id, **kwargs) # noqa: E501
348
+ (data) = self.product_license_service_list_licenses_with_http_info(**kwargs) # noqa: E501
348
349
  return data
349
350
 
350
- def product_license_service_revoke_product_license_with_http_info(self, license_id: 'str', **kwargs) -> 'V1ProductLicense': # noqa: E501
351
- """revoke or invalidate product license # noqa: E501
351
+ def product_license_service_list_licenses_with_http_info(self, **kwargs) -> 'V1ListLicenseResponse': # noqa: E501
352
+ """product_license_service_list_licenses # noqa: E501
352
353
 
353
354
  This method makes a synchronous HTTP request by default. To make an
354
355
  asynchronous HTTP request, please pass async_req=True
355
- >>> thread = api.product_license_service_revoke_product_license_with_http_info(license_id, async_req=True)
356
+ >>> thread = api.product_license_service_list_licenses_with_http_info(async_req=True)
356
357
  >>> result = thread.get()
357
358
 
358
359
  :param async_req bool
359
- :param str license_id: (required)
360
- :return: V1ProductLicense
360
+ :param str owner_id:
361
+ :param str owner_type:
362
+ :return: V1ListLicenseResponse
361
363
  If the method is called asynchronously,
362
364
  returns the request thread.
363
365
  """
364
366
 
365
- all_params = ['license_id'] # noqa: E501
367
+ all_params = ['owner_id', 'owner_type'] # noqa: E501
366
368
  all_params.append('async_req')
367
369
  all_params.append('_return_http_data_only')
368
370
  all_params.append('_preload_content')
@@ -373,22 +375,20 @@ class ProductLicenseServiceApi(object):
373
375
  if key not in all_params:
374
376
  raise TypeError(
375
377
  "Got an unexpected keyword argument '%s'"
376
- " to method product_license_service_revoke_product_license" % key
378
+ " to method product_license_service_list_licenses" % key
377
379
  )
378
380
  params[key] = val
379
381
  del params['kwargs']
380
- # verify the required parameter 'license_id' is set
381
- if ('license_id' not in params or
382
- params['license_id'] is None):
383
- raise ValueError("Missing the required parameter `license_id` when calling `product_license_service_revoke_product_license`") # noqa: E501
384
382
 
385
383
  collection_formats = {}
386
384
 
387
385
  path_params = {}
388
- if 'license_id' in params:
389
- path_params['licenseId'] = params['license_id'] # noqa: E501
390
386
 
391
387
  query_params = []
388
+ if 'owner_id' in params:
389
+ query_params.append(('ownerId', params['owner_id'])) # noqa: E501
390
+ if 'owner_type' in params:
391
+ query_params.append(('ownerType', params['owner_type'])) # noqa: E501
392
392
 
393
393
  header_params = {}
394
394
 
@@ -404,14 +404,14 @@ class ProductLicenseServiceApi(object):
404
404
  auth_settings = [] # noqa: E501
405
405
 
406
406
  return self.api_client.call_api(
407
- '/v1/licenses/{licenseId}', 'DELETE',
407
+ '/v1/licenses', 'GET',
408
408
  path_params,
409
409
  query_params,
410
410
  header_params,
411
411
  body=body_params,
412
412
  post_params=form_params,
413
413
  files=local_var_files,
414
- response_type='V1ProductLicense', # noqa: E501
414
+ response_type='V1ListLicenseResponse', # noqa: E501
415
415
  auth_settings=auth_settings,
416
416
  async_req=params.get('async_req'),
417
417
  _return_http_data_only=params.get('_return_http_data_only'),
@@ -419,49 +419,45 @@ class ProductLicenseServiceApi(object):
419
419
  _request_timeout=params.get('_request_timeout'),
420
420
  collection_formats=collection_formats)
421
421
 
422
- def product_license_service_validate_product_license(self, license_key: 'str', **kwargs) -> 'V1ProductLicenseCheckResponse': # noqa: E501
423
- """Validate product license # noqa: E501
422
+ def product_license_service_validate_license(self, body: 'LicenseKeyValidateBody', license_key: 'str', **kwargs) -> 'V1ValidateLicenseResponse': # noqa: E501
423
+ """product_license_service_validate_license # noqa: E501
424
424
 
425
425
  This method makes a synchronous HTTP request by default. To make an
426
426
  asynchronous HTTP request, please pass async_req=True
427
- >>> thread = api.product_license_service_validate_product_license(license_key, async_req=True)
427
+ >>> thread = api.product_license_service_validate_license(body, license_key, async_req=True)
428
428
  >>> result = thread.get()
429
429
 
430
430
  :param async_req bool
431
+ :param LicenseKeyValidateBody body: (required)
431
432
  :param str license_key: (required)
432
- :param str product_name:
433
- :param str product_version:
434
- :param str product_type:
435
- :return: V1ProductLicenseCheckResponse
433
+ :return: V1ValidateLicenseResponse
436
434
  If the method is called asynchronously,
437
435
  returns the request thread.
438
436
  """
439
437
  kwargs['_return_http_data_only'] = True
440
438
  if kwargs.get('async_req'):
441
- return self.product_license_service_validate_product_license_with_http_info(license_key, **kwargs) # noqa: E501
439
+ return self.product_license_service_validate_license_with_http_info(body, license_key, **kwargs) # noqa: E501
442
440
  else:
443
- (data) = self.product_license_service_validate_product_license_with_http_info(license_key, **kwargs) # noqa: E501
441
+ (data) = self.product_license_service_validate_license_with_http_info(body, license_key, **kwargs) # noqa: E501
444
442
  return data
445
443
 
446
- def product_license_service_validate_product_license_with_http_info(self, license_key: 'str', **kwargs) -> 'V1ProductLicenseCheckResponse': # noqa: E501
447
- """Validate product license # noqa: E501
444
+ def product_license_service_validate_license_with_http_info(self, body: 'LicenseKeyValidateBody', license_key: 'str', **kwargs) -> 'V1ValidateLicenseResponse': # noqa: E501
445
+ """product_license_service_validate_license # noqa: E501
448
446
 
449
447
  This method makes a synchronous HTTP request by default. To make an
450
448
  asynchronous HTTP request, please pass async_req=True
451
- >>> thread = api.product_license_service_validate_product_license_with_http_info(license_key, async_req=True)
449
+ >>> thread = api.product_license_service_validate_license_with_http_info(body, license_key, async_req=True)
452
450
  >>> result = thread.get()
453
451
 
454
452
  :param async_req bool
453
+ :param LicenseKeyValidateBody body: (required)
455
454
  :param str license_key: (required)
456
- :param str product_name:
457
- :param str product_version:
458
- :param str product_type:
459
- :return: V1ProductLicenseCheckResponse
455
+ :return: V1ValidateLicenseResponse
460
456
  If the method is called asynchronously,
461
457
  returns the request thread.
462
458
  """
463
459
 
464
- all_params = ['license_key', 'product_name', 'product_version', 'product_type'] # noqa: E501
460
+ all_params = ['body', 'license_key'] # noqa: E501
465
461
  all_params.append('async_req')
466
462
  all_params.append('_return_http_data_only')
467
463
  all_params.append('_preload_content')
@@ -472,14 +468,18 @@ class ProductLicenseServiceApi(object):
472
468
  if key not in all_params:
473
469
  raise TypeError(
474
470
  "Got an unexpected keyword argument '%s'"
475
- " to method product_license_service_validate_product_license" % key
471
+ " to method product_license_service_validate_license" % key
476
472
  )
477
473
  params[key] = val
478
474
  del params['kwargs']
475
+ # verify the required parameter 'body' is set
476
+ if ('body' not in params or
477
+ params['body'] is None):
478
+ raise ValueError("Missing the required parameter `body` when calling `product_license_service_validate_license`") # noqa: E501
479
479
  # verify the required parameter 'license_key' is set
480
480
  if ('license_key' not in params or
481
481
  params['license_key'] is None):
482
- raise ValueError("Missing the required parameter `license_key` when calling `product_license_service_validate_product_license`") # noqa: E501
482
+ raise ValueError("Missing the required parameter `license_key` when calling `product_license_service_validate_license`") # noqa: E501
483
483
 
484
484
  collection_formats = {}
485
485
 
@@ -488,12 +488,6 @@ class ProductLicenseServiceApi(object):
488
488
  path_params['licenseKey'] = params['license_key'] # noqa: E501
489
489
 
490
490
  query_params = []
491
- if 'product_name' in params:
492
- query_params.append(('productName', params['product_name'])) # noqa: E501
493
- if 'product_version' in params:
494
- query_params.append(('productVersion', params['product_version'])) # noqa: E501
495
- if 'product_type' in params:
496
- query_params.append(('productType', params['product_type'])) # noqa: E501
497
491
 
498
492
  header_params = {}
499
493
 
@@ -501,22 +495,28 @@ class ProductLicenseServiceApi(object):
501
495
  local_var_files = {}
502
496
 
503
497
  body_params = None
498
+ if 'body' in params:
499
+ body_params = params['body']
504
500
  # HTTP header `Accept`
505
501
  header_params['Accept'] = self.api_client.select_header_accept(
506
502
  ['application/json']) # noqa: E501
507
503
 
504
+ # HTTP header `Content-Type`
505
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
506
+ ['application/json']) # noqa: E501
507
+
508
508
  # Authentication setting
509
509
  auth_settings = [] # noqa: E501
510
510
 
511
511
  return self.api_client.call_api(
512
- '/v1/licenses/{licenseKey}/validate', 'GET',
512
+ '/v1/licenses/{licenseKey}/validate', 'POST',
513
513
  path_params,
514
514
  query_params,
515
515
  header_params,
516
516
  body=body_params,
517
517
  post_params=form_params,
518
518
  files=local_var_files,
519
- response_type='V1ProductLicenseCheckResponse', # noqa: E501
519
+ response_type='V1ValidateLicenseResponse', # noqa: E501
520
520
  auth_settings=auth_settings,
521
521
  async_req=params.get('async_req'),
522
522
  _return_http_data_only=params.get('_return_http_data_only'),
@@ -0,0 +1,141 @@
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 SDKCommandHistoryServiceApi(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 s_dk_command_history_service_create_sdk_command_history(self, body: 'V1CreateSDKCommandHistoryRequest', **kwargs) -> 'V1CreateSDKCommandHistoryResponse': # noqa: E501
47
+ """s_dk_command_history_service_create_sdk_command_history # 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.s_dk_command_history_service_create_sdk_command_history(body, async_req=True)
52
+ >>> result = thread.get()
53
+
54
+ :param async_req bool
55
+ :param V1CreateSDKCommandHistoryRequest body: (required)
56
+ :return: V1CreateSDKCommandHistoryResponse
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.s_dk_command_history_service_create_sdk_command_history_with_http_info(body, **kwargs) # noqa: E501
63
+ else:
64
+ (data) = self.s_dk_command_history_service_create_sdk_command_history_with_http_info(body, **kwargs) # noqa: E501
65
+ return data
66
+
67
+ def s_dk_command_history_service_create_sdk_command_history_with_http_info(self, body: 'V1CreateSDKCommandHistoryRequest', **kwargs) -> 'V1CreateSDKCommandHistoryResponse': # noqa: E501
68
+ """s_dk_command_history_service_create_sdk_command_history # 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.s_dk_command_history_service_create_sdk_command_history_with_http_info(body, async_req=True)
73
+ >>> result = thread.get()
74
+
75
+ :param async_req bool
76
+ :param V1CreateSDKCommandHistoryRequest body: (required)
77
+ :return: V1CreateSDKCommandHistoryResponse
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 s_dk_command_history_service_create_sdk_command_history" % 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 `s_dk_command_history_service_create_sdk_command_history`") # 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/sdk-command-history', '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='V1CreateSDKCommandHistoryResponse', # 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)