lightning-sdk 0.1.37__py3-none-any.whl → 0.1.38__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.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/ai_hub.py +21 -23
- lightning_sdk/api/ai_hub_api.py +29 -4
- lightning_sdk/api/job_api.py +6 -2
- lightning_sdk/api/teamspace_api.py +18 -14
- lightning_sdk/api/utils.py +19 -0
- lightning_sdk/cli/ai_hub.py +1 -1
- lightning_sdk/cli/run.py +8 -0
- lightning_sdk/job/base.py +13 -0
- lightning_sdk/job/job.py +8 -0
- lightning_sdk/job/v1.py +5 -1
- lightning_sdk/job/v2.py +4 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +13 -2
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +680 -62
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +13 -2
- lightning_sdk/lightning_cloud/openapi/models/create.py +6 -32
- lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +32 -6
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/multimachinejobs_id_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_agents_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_multimachinejobs_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/update.py +6 -32
- lightning_sdk/lightning_cloud/openapi/models/v1_api_pricing_spec.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_template_request.py +32 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +6 -32
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_multi_machine_job_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_metrics.py +43 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_performance.py +305 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template.py +32 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_summary.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/{v1_efs_data_connection.py → v1_efs_config.py} +22 -22
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +125 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_multi_machine_jobs_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machines_selector.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_message.py +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_message_content.py +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_message_content_type.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +383 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_state.py +108 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_status.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_system_info.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_compute_config.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_data_connection_response.py +6 -32
- lightning_sdk/lightning_cloud/openapi/models/validate.py +6 -32
- lightning_sdk/teamspace.py +5 -0
- {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.38.dist-info}/METADATA +1 -1
- {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.38.dist-info}/RECORD +61 -50
- lightning_sdk/lightning_cloud/openapi/models/v1_efs_folder_data_connection.py +0 -201
- {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.38.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.38.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.38.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.38.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,383 @@
|
|
|
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
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1MultiMachineJob(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'cloudspace_id': 'str',
|
|
45
|
+
'created_at': 'datetime',
|
|
46
|
+
'desired_state': 'V1MultiMachineJobState',
|
|
47
|
+
'id': 'str',
|
|
48
|
+
'machines': 'int',
|
|
49
|
+
'name': 'str',
|
|
50
|
+
'project_id': 'str',
|
|
51
|
+
'spec': 'V1JobSpec',
|
|
52
|
+
'status': 'V1MultiMachineJobStatus',
|
|
53
|
+
'updated_at': 'datetime',
|
|
54
|
+
'user_id': 'str'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
attribute_map = {
|
|
58
|
+
'cloudspace_id': 'cloudspaceId',
|
|
59
|
+
'created_at': 'createdAt',
|
|
60
|
+
'desired_state': 'desiredState',
|
|
61
|
+
'id': 'id',
|
|
62
|
+
'machines': 'machines',
|
|
63
|
+
'name': 'name',
|
|
64
|
+
'project_id': 'projectId',
|
|
65
|
+
'spec': 'spec',
|
|
66
|
+
'status': 'status',
|
|
67
|
+
'updated_at': 'updatedAt',
|
|
68
|
+
'user_id': 'userId'
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1MultiMachineJobState' =None, id: 'str' =None, machines: 'int' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, status: 'V1MultiMachineJobStatus' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
72
|
+
"""V1MultiMachineJob - a model defined in Swagger""" # noqa: E501
|
|
73
|
+
self._cloudspace_id = None
|
|
74
|
+
self._created_at = None
|
|
75
|
+
self._desired_state = None
|
|
76
|
+
self._id = None
|
|
77
|
+
self._machines = None
|
|
78
|
+
self._name = None
|
|
79
|
+
self._project_id = None
|
|
80
|
+
self._spec = None
|
|
81
|
+
self._status = None
|
|
82
|
+
self._updated_at = None
|
|
83
|
+
self._user_id = None
|
|
84
|
+
self.discriminator = None
|
|
85
|
+
if cloudspace_id is not None:
|
|
86
|
+
self.cloudspace_id = cloudspace_id
|
|
87
|
+
if created_at is not None:
|
|
88
|
+
self.created_at = created_at
|
|
89
|
+
if desired_state is not None:
|
|
90
|
+
self.desired_state = desired_state
|
|
91
|
+
if id is not None:
|
|
92
|
+
self.id = id
|
|
93
|
+
if machines is not None:
|
|
94
|
+
self.machines = machines
|
|
95
|
+
if name is not None:
|
|
96
|
+
self.name = name
|
|
97
|
+
if project_id is not None:
|
|
98
|
+
self.project_id = project_id
|
|
99
|
+
if spec is not None:
|
|
100
|
+
self.spec = spec
|
|
101
|
+
if status is not None:
|
|
102
|
+
self.status = status
|
|
103
|
+
if updated_at is not None:
|
|
104
|
+
self.updated_at = updated_at
|
|
105
|
+
if user_id is not None:
|
|
106
|
+
self.user_id = user_id
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def cloudspace_id(self) -> 'str':
|
|
110
|
+
"""Gets the cloudspace_id of this V1MultiMachineJob. # noqa: E501
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
:return: The cloudspace_id of this V1MultiMachineJob. # noqa: E501
|
|
114
|
+
:rtype: str
|
|
115
|
+
"""
|
|
116
|
+
return self._cloudspace_id
|
|
117
|
+
|
|
118
|
+
@cloudspace_id.setter
|
|
119
|
+
def cloudspace_id(self, cloudspace_id: 'str'):
|
|
120
|
+
"""Sets the cloudspace_id of this V1MultiMachineJob.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
:param cloudspace_id: The cloudspace_id of this V1MultiMachineJob. # noqa: E501
|
|
124
|
+
:type: str
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
self._cloudspace_id = cloudspace_id
|
|
128
|
+
|
|
129
|
+
@property
|
|
130
|
+
def created_at(self) -> 'datetime':
|
|
131
|
+
"""Gets the created_at of this V1MultiMachineJob. # noqa: E501
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:return: The created_at of this V1MultiMachineJob. # noqa: E501
|
|
135
|
+
:rtype: datetime
|
|
136
|
+
"""
|
|
137
|
+
return self._created_at
|
|
138
|
+
|
|
139
|
+
@created_at.setter
|
|
140
|
+
def created_at(self, created_at: 'datetime'):
|
|
141
|
+
"""Sets the created_at of this V1MultiMachineJob.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
:param created_at: The created_at of this V1MultiMachineJob. # noqa: E501
|
|
145
|
+
:type: datetime
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
self._created_at = created_at
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def desired_state(self) -> 'V1MultiMachineJobState':
|
|
152
|
+
"""Gets the desired_state of this V1MultiMachineJob. # noqa: E501
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
:return: The desired_state of this V1MultiMachineJob. # noqa: E501
|
|
156
|
+
:rtype: V1MultiMachineJobState
|
|
157
|
+
"""
|
|
158
|
+
return self._desired_state
|
|
159
|
+
|
|
160
|
+
@desired_state.setter
|
|
161
|
+
def desired_state(self, desired_state: 'V1MultiMachineJobState'):
|
|
162
|
+
"""Sets the desired_state of this V1MultiMachineJob.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
:param desired_state: The desired_state of this V1MultiMachineJob. # noqa: E501
|
|
166
|
+
:type: V1MultiMachineJobState
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
self._desired_state = desired_state
|
|
170
|
+
|
|
171
|
+
@property
|
|
172
|
+
def id(self) -> 'str':
|
|
173
|
+
"""Gets the id of this V1MultiMachineJob. # noqa: E501
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
:return: The id of this V1MultiMachineJob. # noqa: E501
|
|
177
|
+
:rtype: str
|
|
178
|
+
"""
|
|
179
|
+
return self._id
|
|
180
|
+
|
|
181
|
+
@id.setter
|
|
182
|
+
def id(self, id: 'str'):
|
|
183
|
+
"""Sets the id of this V1MultiMachineJob.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
:param id: The id of this V1MultiMachineJob. # noqa: E501
|
|
187
|
+
:type: str
|
|
188
|
+
"""
|
|
189
|
+
|
|
190
|
+
self._id = id
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def machines(self) -> 'int':
|
|
194
|
+
"""Gets the machines of this V1MultiMachineJob. # noqa: E501
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
:return: The machines of this V1MultiMachineJob. # noqa: E501
|
|
198
|
+
:rtype: int
|
|
199
|
+
"""
|
|
200
|
+
return self._machines
|
|
201
|
+
|
|
202
|
+
@machines.setter
|
|
203
|
+
def machines(self, machines: 'int'):
|
|
204
|
+
"""Sets the machines of this V1MultiMachineJob.
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
:param machines: The machines of this V1MultiMachineJob. # noqa: E501
|
|
208
|
+
:type: int
|
|
209
|
+
"""
|
|
210
|
+
|
|
211
|
+
self._machines = machines
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def name(self) -> 'str':
|
|
215
|
+
"""Gets the name of this V1MultiMachineJob. # noqa: E501
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
:return: The name of this V1MultiMachineJob. # noqa: E501
|
|
219
|
+
:rtype: str
|
|
220
|
+
"""
|
|
221
|
+
return self._name
|
|
222
|
+
|
|
223
|
+
@name.setter
|
|
224
|
+
def name(self, name: 'str'):
|
|
225
|
+
"""Sets the name of this V1MultiMachineJob.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
:param name: The name of this V1MultiMachineJob. # noqa: E501
|
|
229
|
+
:type: str
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
self._name = name
|
|
233
|
+
|
|
234
|
+
@property
|
|
235
|
+
def project_id(self) -> 'str':
|
|
236
|
+
"""Gets the project_id of this V1MultiMachineJob. # noqa: E501
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
:return: The project_id of this V1MultiMachineJob. # noqa: E501
|
|
240
|
+
:rtype: str
|
|
241
|
+
"""
|
|
242
|
+
return self._project_id
|
|
243
|
+
|
|
244
|
+
@project_id.setter
|
|
245
|
+
def project_id(self, project_id: 'str'):
|
|
246
|
+
"""Sets the project_id of this V1MultiMachineJob.
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
:param project_id: The project_id of this V1MultiMachineJob. # noqa: E501
|
|
250
|
+
:type: str
|
|
251
|
+
"""
|
|
252
|
+
|
|
253
|
+
self._project_id = project_id
|
|
254
|
+
|
|
255
|
+
@property
|
|
256
|
+
def spec(self) -> 'V1JobSpec':
|
|
257
|
+
"""Gets the spec of this V1MultiMachineJob. # noqa: E501
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
:return: The spec of this V1MultiMachineJob. # noqa: E501
|
|
261
|
+
:rtype: V1JobSpec
|
|
262
|
+
"""
|
|
263
|
+
return self._spec
|
|
264
|
+
|
|
265
|
+
@spec.setter
|
|
266
|
+
def spec(self, spec: 'V1JobSpec'):
|
|
267
|
+
"""Sets the spec of this V1MultiMachineJob.
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
:param spec: The spec of this V1MultiMachineJob. # noqa: E501
|
|
271
|
+
:type: V1JobSpec
|
|
272
|
+
"""
|
|
273
|
+
|
|
274
|
+
self._spec = spec
|
|
275
|
+
|
|
276
|
+
@property
|
|
277
|
+
def status(self) -> 'V1MultiMachineJobStatus':
|
|
278
|
+
"""Gets the status of this V1MultiMachineJob. # noqa: E501
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
:return: The status of this V1MultiMachineJob. # noqa: E501
|
|
282
|
+
:rtype: V1MultiMachineJobStatus
|
|
283
|
+
"""
|
|
284
|
+
return self._status
|
|
285
|
+
|
|
286
|
+
@status.setter
|
|
287
|
+
def status(self, status: 'V1MultiMachineJobStatus'):
|
|
288
|
+
"""Sets the status of this V1MultiMachineJob.
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
:param status: The status of this V1MultiMachineJob. # noqa: E501
|
|
292
|
+
:type: V1MultiMachineJobStatus
|
|
293
|
+
"""
|
|
294
|
+
|
|
295
|
+
self._status = status
|
|
296
|
+
|
|
297
|
+
@property
|
|
298
|
+
def updated_at(self) -> 'datetime':
|
|
299
|
+
"""Gets the updated_at of this V1MultiMachineJob. # noqa: E501
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
:return: The updated_at of this V1MultiMachineJob. # noqa: E501
|
|
303
|
+
:rtype: datetime
|
|
304
|
+
"""
|
|
305
|
+
return self._updated_at
|
|
306
|
+
|
|
307
|
+
@updated_at.setter
|
|
308
|
+
def updated_at(self, updated_at: 'datetime'):
|
|
309
|
+
"""Sets the updated_at of this V1MultiMachineJob.
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
:param updated_at: The updated_at of this V1MultiMachineJob. # noqa: E501
|
|
313
|
+
:type: datetime
|
|
314
|
+
"""
|
|
315
|
+
|
|
316
|
+
self._updated_at = updated_at
|
|
317
|
+
|
|
318
|
+
@property
|
|
319
|
+
def user_id(self) -> 'str':
|
|
320
|
+
"""Gets the user_id of this V1MultiMachineJob. # noqa: E501
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
:return: The user_id of this V1MultiMachineJob. # noqa: E501
|
|
324
|
+
:rtype: str
|
|
325
|
+
"""
|
|
326
|
+
return self._user_id
|
|
327
|
+
|
|
328
|
+
@user_id.setter
|
|
329
|
+
def user_id(self, user_id: 'str'):
|
|
330
|
+
"""Sets the user_id of this V1MultiMachineJob.
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
:param user_id: The user_id of this V1MultiMachineJob. # noqa: E501
|
|
334
|
+
:type: str
|
|
335
|
+
"""
|
|
336
|
+
|
|
337
|
+
self._user_id = user_id
|
|
338
|
+
|
|
339
|
+
def to_dict(self) -> dict:
|
|
340
|
+
"""Returns the model properties as a dict"""
|
|
341
|
+
result = {}
|
|
342
|
+
|
|
343
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
344
|
+
value = getattr(self, attr)
|
|
345
|
+
if isinstance(value, list):
|
|
346
|
+
result[attr] = list(map(
|
|
347
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
348
|
+
value
|
|
349
|
+
))
|
|
350
|
+
elif hasattr(value, "to_dict"):
|
|
351
|
+
result[attr] = value.to_dict()
|
|
352
|
+
elif isinstance(value, dict):
|
|
353
|
+
result[attr] = dict(map(
|
|
354
|
+
lambda item: (item[0], item[1].to_dict())
|
|
355
|
+
if hasattr(item[1], "to_dict") else item,
|
|
356
|
+
value.items()
|
|
357
|
+
))
|
|
358
|
+
else:
|
|
359
|
+
result[attr] = value
|
|
360
|
+
if issubclass(V1MultiMachineJob, dict):
|
|
361
|
+
for key, value in self.items():
|
|
362
|
+
result[key] = value
|
|
363
|
+
|
|
364
|
+
return result
|
|
365
|
+
|
|
366
|
+
def to_str(self) -> str:
|
|
367
|
+
"""Returns the string representation of the model"""
|
|
368
|
+
return pprint.pformat(self.to_dict())
|
|
369
|
+
|
|
370
|
+
def __repr__(self) -> str:
|
|
371
|
+
"""For `print` and `pprint`"""
|
|
372
|
+
return self.to_str()
|
|
373
|
+
|
|
374
|
+
def __eq__(self, other: 'V1MultiMachineJob') -> bool:
|
|
375
|
+
"""Returns true if both objects are equal"""
|
|
376
|
+
if not isinstance(other, V1MultiMachineJob):
|
|
377
|
+
return False
|
|
378
|
+
|
|
379
|
+
return self.__dict__ == other.__dict__
|
|
380
|
+
|
|
381
|
+
def __ne__(self, other: 'V1MultiMachineJob') -> bool:
|
|
382
|
+
"""Returns true if both objects are not equal"""
|
|
383
|
+
return not self == other
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1MultiMachineJobState(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
"""
|
|
38
|
+
allowed enum values
|
|
39
|
+
"""
|
|
40
|
+
UNSPECIFIED = "MultiMachineJob_STATE_UNSPECIFIED"
|
|
41
|
+
RUNNING = "MultiMachineJob_STATE_RUNNING"
|
|
42
|
+
STOP = "MultiMachineJob_STATE_STOP"
|
|
43
|
+
STOPPED = "MultiMachineJob_STATE_STOPPED"
|
|
44
|
+
DELETE = "MultiMachineJob_STATE_DELETE"
|
|
45
|
+
DELETED = "MultiMachineJob_STATE_DELETED"
|
|
46
|
+
FAILED = "MultiMachineJob_STATE_FAILED"
|
|
47
|
+
"""
|
|
48
|
+
Attributes:
|
|
49
|
+
swagger_types (dict): The key is attribute name
|
|
50
|
+
and the value is attribute type.
|
|
51
|
+
attribute_map (dict): The key is attribute name
|
|
52
|
+
and the value is json key in definition.
|
|
53
|
+
"""
|
|
54
|
+
swagger_types = {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
attribute_map = {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
def __init__(self): # noqa: E501
|
|
61
|
+
"""V1MultiMachineJobState - a model defined in Swagger""" # noqa: E501
|
|
62
|
+
self.discriminator = None
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> dict:
|
|
65
|
+
"""Returns the model properties as a dict"""
|
|
66
|
+
result = {}
|
|
67
|
+
|
|
68
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
69
|
+
value = getattr(self, attr)
|
|
70
|
+
if isinstance(value, list):
|
|
71
|
+
result[attr] = list(map(
|
|
72
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
73
|
+
value
|
|
74
|
+
))
|
|
75
|
+
elif hasattr(value, "to_dict"):
|
|
76
|
+
result[attr] = value.to_dict()
|
|
77
|
+
elif isinstance(value, dict):
|
|
78
|
+
result[attr] = dict(map(
|
|
79
|
+
lambda item: (item[0], item[1].to_dict())
|
|
80
|
+
if hasattr(item[1], "to_dict") else item,
|
|
81
|
+
value.items()
|
|
82
|
+
))
|
|
83
|
+
else:
|
|
84
|
+
result[attr] = value
|
|
85
|
+
if issubclass(V1MultiMachineJobState, dict):
|
|
86
|
+
for key, value in self.items():
|
|
87
|
+
result[key] = value
|
|
88
|
+
|
|
89
|
+
return result
|
|
90
|
+
|
|
91
|
+
def to_str(self) -> str:
|
|
92
|
+
"""Returns the string representation of the model"""
|
|
93
|
+
return pprint.pformat(self.to_dict())
|
|
94
|
+
|
|
95
|
+
def __repr__(self) -> str:
|
|
96
|
+
"""For `print` and `pprint`"""
|
|
97
|
+
return self.to_str()
|
|
98
|
+
|
|
99
|
+
def __eq__(self, other: 'V1MultiMachineJobState') -> bool:
|
|
100
|
+
"""Returns true if both objects are equal"""
|
|
101
|
+
if not isinstance(other, V1MultiMachineJobState):
|
|
102
|
+
return False
|
|
103
|
+
|
|
104
|
+
return self.__dict__ == other.__dict__
|
|
105
|
+
|
|
106
|
+
def __ne__(self, other: 'V1MultiMachineJobState') -> bool:
|
|
107
|
+
"""Returns true if both objects are not equal"""
|
|
108
|
+
return not self == other
|