lightning-sdk 0.2.11__py3-none-any.whl → 0.2.13__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 (61) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/deployment_api.py +35 -3
  3. lightning_sdk/api/lit_container_api.py +13 -7
  4. lightning_sdk/api/llm_api.py +46 -0
  5. lightning_sdk/api/studio_api.py +17 -0
  6. lightning_sdk/cli/entrypoint.py +1 -1
  7. lightning_sdk/cli/serve.py +221 -62
  8. lightning_sdk/deployment/deployment.py +53 -7
  9. lightning_sdk/lightning_cloud/openapi/__init__.py +11 -1
  10. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  11. lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +4 -4
  12. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +13 -1
  13. lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +4 -4
  14. lightning_sdk/lightning_cloud/openapi/api/git_credentials_service_api.py +497 -0
  15. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +124 -0
  16. lightning_sdk/lightning_cloud/openapi/models/__init__.py +10 -1
  17. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +27 -1
  18. lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +27 -1
  21. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/update.py +65 -195
  23. lightning_sdk/lightning_cloud/openapi/models/update1.py +357 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
  26. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
  27. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +79 -1
  29. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/v1_create_git_credentials_request.py +175 -0
  31. lightning_sdk/lightning_cloud/openapi/models/v1_delete_cloud_space_environment_template_response.py +1 -53
  32. lightning_sdk/lightning_cloud/openapi/models/v1_delete_git_credentials_response.py +97 -0
  33. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_state.py +2 -0
  35. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +1 -27
  36. lightning_sdk/lightning_cloud/openapi/models/v1_git_credentials.py +227 -0
  37. lightning_sdk/lightning_cloud/openapi/models/v1_job_resource.py +279 -0
  38. lightning_sdk/lightning_cloud/openapi/models/v1_job_type.py +108 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_list_git_credentials_response.py +123 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_list_job_resources_response.py +123 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_nebius_direct_v1.py +149 -0
  42. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +55 -1
  43. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +29 -1
  44. lightning_sdk/lightning_cloud/openapi/models/v1_reservation_billing_session.py +279 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_resources.py +55 -3
  46. lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +1 -27
  47. lightning_sdk/lightning_cloud/openapi/models/v1_usage.py +27 -1
  48. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +157 -1
  49. lightning_sdk/llm/__init__.py +3 -0
  50. lightning_sdk/llm/llm.py +118 -0
  51. lightning_sdk/plugin.py +19 -0
  52. lightning_sdk/serve.py +4 -6
  53. lightning_sdk/studio.py +33 -0
  54. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.13.dist-info}/METADATA +1 -1
  55. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.13.dist-info}/RECORD +60 -47
  56. lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +0 -253
  57. /lightning_sdk/cli/{docker.py → docker_cli.py} +0 -0
  58. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.13.dist-info}/LICENSE +0 -0
  59. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.13.dist-info}/WHEEL +0 -0
  60. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.13.dist-info}/entry_points.txt +0 -0
  61. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.13.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,279 @@
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 V1JobResource(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
+ 'agent_job': 'V1AgentJob',
45
+ 'app_instance': 'Externalv1LightningappInstance',
46
+ 'batch_job': 'V1Job',
47
+ 'deployment': 'V1Deployment',
48
+ 'multi_machine_job': 'V1MultiMachineJob',
49
+ 'pipeline': 'V1Pipeline',
50
+ 'project_id': 'str'
51
+ }
52
+
53
+ attribute_map = {
54
+ 'agent_job': 'agentJob',
55
+ 'app_instance': 'appInstance',
56
+ 'batch_job': 'batchJob',
57
+ 'deployment': 'deployment',
58
+ 'multi_machine_job': 'multiMachineJob',
59
+ 'pipeline': 'pipeline',
60
+ 'project_id': 'projectId'
61
+ }
62
+
63
+ def __init__(self, agent_job: 'V1AgentJob' =None, app_instance: 'Externalv1LightningappInstance' =None, batch_job: 'V1Job' =None, deployment: 'V1Deployment' =None, multi_machine_job: 'V1MultiMachineJob' =None, pipeline: 'V1Pipeline' =None, project_id: 'str' =None): # noqa: E501
64
+ """V1JobResource - a model defined in Swagger""" # noqa: E501
65
+ self._agent_job = None
66
+ self._app_instance = None
67
+ self._batch_job = None
68
+ self._deployment = None
69
+ self._multi_machine_job = None
70
+ self._pipeline = None
71
+ self._project_id = None
72
+ self.discriminator = None
73
+ if agent_job is not None:
74
+ self.agent_job = agent_job
75
+ if app_instance is not None:
76
+ self.app_instance = app_instance
77
+ if batch_job is not None:
78
+ self.batch_job = batch_job
79
+ if deployment is not None:
80
+ self.deployment = deployment
81
+ if multi_machine_job is not None:
82
+ self.multi_machine_job = multi_machine_job
83
+ if pipeline is not None:
84
+ self.pipeline = pipeline
85
+ if project_id is not None:
86
+ self.project_id = project_id
87
+
88
+ @property
89
+ def agent_job(self) -> 'V1AgentJob':
90
+ """Gets the agent_job of this V1JobResource. # noqa: E501
91
+
92
+
93
+ :return: The agent_job of this V1JobResource. # noqa: E501
94
+ :rtype: V1AgentJob
95
+ """
96
+ return self._agent_job
97
+
98
+ @agent_job.setter
99
+ def agent_job(self, agent_job: 'V1AgentJob'):
100
+ """Sets the agent_job of this V1JobResource.
101
+
102
+
103
+ :param agent_job: The agent_job of this V1JobResource. # noqa: E501
104
+ :type: V1AgentJob
105
+ """
106
+
107
+ self._agent_job = agent_job
108
+
109
+ @property
110
+ def app_instance(self) -> 'Externalv1LightningappInstance':
111
+ """Gets the app_instance of this V1JobResource. # noqa: E501
112
+
113
+
114
+ :return: The app_instance of this V1JobResource. # noqa: E501
115
+ :rtype: Externalv1LightningappInstance
116
+ """
117
+ return self._app_instance
118
+
119
+ @app_instance.setter
120
+ def app_instance(self, app_instance: 'Externalv1LightningappInstance'):
121
+ """Sets the app_instance of this V1JobResource.
122
+
123
+
124
+ :param app_instance: The app_instance of this V1JobResource. # noqa: E501
125
+ :type: Externalv1LightningappInstance
126
+ """
127
+
128
+ self._app_instance = app_instance
129
+
130
+ @property
131
+ def batch_job(self) -> 'V1Job':
132
+ """Gets the batch_job of this V1JobResource. # noqa: E501
133
+
134
+
135
+ :return: The batch_job of this V1JobResource. # noqa: E501
136
+ :rtype: V1Job
137
+ """
138
+ return self._batch_job
139
+
140
+ @batch_job.setter
141
+ def batch_job(self, batch_job: 'V1Job'):
142
+ """Sets the batch_job of this V1JobResource.
143
+
144
+
145
+ :param batch_job: The batch_job of this V1JobResource. # noqa: E501
146
+ :type: V1Job
147
+ """
148
+
149
+ self._batch_job = batch_job
150
+
151
+ @property
152
+ def deployment(self) -> 'V1Deployment':
153
+ """Gets the deployment of this V1JobResource. # noqa: E501
154
+
155
+
156
+ :return: The deployment of this V1JobResource. # noqa: E501
157
+ :rtype: V1Deployment
158
+ """
159
+ return self._deployment
160
+
161
+ @deployment.setter
162
+ def deployment(self, deployment: 'V1Deployment'):
163
+ """Sets the deployment of this V1JobResource.
164
+
165
+
166
+ :param deployment: The deployment of this V1JobResource. # noqa: E501
167
+ :type: V1Deployment
168
+ """
169
+
170
+ self._deployment = deployment
171
+
172
+ @property
173
+ def multi_machine_job(self) -> 'V1MultiMachineJob':
174
+ """Gets the multi_machine_job of this V1JobResource. # noqa: E501
175
+
176
+
177
+ :return: The multi_machine_job of this V1JobResource. # noqa: E501
178
+ :rtype: V1MultiMachineJob
179
+ """
180
+ return self._multi_machine_job
181
+
182
+ @multi_machine_job.setter
183
+ def multi_machine_job(self, multi_machine_job: 'V1MultiMachineJob'):
184
+ """Sets the multi_machine_job of this V1JobResource.
185
+
186
+
187
+ :param multi_machine_job: The multi_machine_job of this V1JobResource. # noqa: E501
188
+ :type: V1MultiMachineJob
189
+ """
190
+
191
+ self._multi_machine_job = multi_machine_job
192
+
193
+ @property
194
+ def pipeline(self) -> 'V1Pipeline':
195
+ """Gets the pipeline of this V1JobResource. # noqa: E501
196
+
197
+
198
+ :return: The pipeline of this V1JobResource. # noqa: E501
199
+ :rtype: V1Pipeline
200
+ """
201
+ return self._pipeline
202
+
203
+ @pipeline.setter
204
+ def pipeline(self, pipeline: 'V1Pipeline'):
205
+ """Sets the pipeline of this V1JobResource.
206
+
207
+
208
+ :param pipeline: The pipeline of this V1JobResource. # noqa: E501
209
+ :type: V1Pipeline
210
+ """
211
+
212
+ self._pipeline = pipeline
213
+
214
+ @property
215
+ def project_id(self) -> 'str':
216
+ """Gets the project_id of this V1JobResource. # noqa: E501
217
+
218
+
219
+ :return: The project_id of this V1JobResource. # noqa: E501
220
+ :rtype: str
221
+ """
222
+ return self._project_id
223
+
224
+ @project_id.setter
225
+ def project_id(self, project_id: 'str'):
226
+ """Sets the project_id of this V1JobResource.
227
+
228
+
229
+ :param project_id: The project_id of this V1JobResource. # noqa: E501
230
+ :type: str
231
+ """
232
+
233
+ self._project_id = project_id
234
+
235
+ def to_dict(self) -> dict:
236
+ """Returns the model properties as a dict"""
237
+ result = {}
238
+
239
+ for attr, _ in six.iteritems(self.swagger_types):
240
+ value = getattr(self, attr)
241
+ if isinstance(value, list):
242
+ result[attr] = list(map(
243
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
244
+ value
245
+ ))
246
+ elif hasattr(value, "to_dict"):
247
+ result[attr] = value.to_dict()
248
+ elif isinstance(value, dict):
249
+ result[attr] = dict(map(
250
+ lambda item: (item[0], item[1].to_dict())
251
+ if hasattr(item[1], "to_dict") else item,
252
+ value.items()
253
+ ))
254
+ else:
255
+ result[attr] = value
256
+ if issubclass(V1JobResource, dict):
257
+ for key, value in self.items():
258
+ result[key] = value
259
+
260
+ return result
261
+
262
+ def to_str(self) -> str:
263
+ """Returns the string representation of the model"""
264
+ return pprint.pformat(self.to_dict())
265
+
266
+ def __repr__(self) -> str:
267
+ """For `print` and `pprint`"""
268
+ return self.to_str()
269
+
270
+ def __eq__(self, other: 'V1JobResource') -> bool:
271
+ """Returns true if both objects are equal"""
272
+ if not isinstance(other, V1JobResource):
273
+ return False
274
+
275
+ return self.__dict__ == other.__dict__
276
+
277
+ def __ne__(self, other: 'V1JobResource') -> bool:
278
+ """Returns true if both objects are not equal"""
279
+ 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 V1JobType(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 = "JOB_TYPE_UNSPECIFIED"
41
+ APP_INSTANCE = "JOB_TYPE_APP_INSTANCE"
42
+ BATCH_JOB = "JOB_TYPE_BATCH_JOB"
43
+ DEPLOYMENT = "JOB_TYPE_DEPLOYMENT"
44
+ PIPELINE = "JOB_TYPE_PIPELINE"
45
+ SLURM_JOB = "JOB_TYPE_SLURM_JOB"
46
+ MULTI_MACHINE_JOB = "JOB_TYPE_MULTI_MACHINE_JOB"
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
+ """V1JobType - 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(V1JobType, 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: 'V1JobType') -> bool:
100
+ """Returns true if both objects are equal"""
101
+ if not isinstance(other, V1JobType):
102
+ return False
103
+
104
+ return self.__dict__ == other.__dict__
105
+
106
+ def __ne__(self, other: 'V1JobType') -> bool:
107
+ """Returns true if both objects are not equal"""
108
+ return not self == other
@@ -0,0 +1,123 @@
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 V1ListGitCredentialsResponse(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
+ 'credentials': 'list[V1GitCredentials]'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'credentials': 'credentials'
49
+ }
50
+
51
+ def __init__(self, credentials: 'list[V1GitCredentials]' =None): # noqa: E501
52
+ """V1ListGitCredentialsResponse - a model defined in Swagger""" # noqa: E501
53
+ self._credentials = None
54
+ self.discriminator = None
55
+ if credentials is not None:
56
+ self.credentials = credentials
57
+
58
+ @property
59
+ def credentials(self) -> 'list[V1GitCredentials]':
60
+ """Gets the credentials of this V1ListGitCredentialsResponse. # noqa: E501
61
+
62
+
63
+ :return: The credentials of this V1ListGitCredentialsResponse. # noqa: E501
64
+ :rtype: list[V1GitCredentials]
65
+ """
66
+ return self._credentials
67
+
68
+ @credentials.setter
69
+ def credentials(self, credentials: 'list[V1GitCredentials]'):
70
+ """Sets the credentials of this V1ListGitCredentialsResponse.
71
+
72
+
73
+ :param credentials: The credentials of this V1ListGitCredentialsResponse. # noqa: E501
74
+ :type: list[V1GitCredentials]
75
+ """
76
+
77
+ self._credentials = credentials
78
+
79
+ def to_dict(self) -> dict:
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.swagger_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+ if issubclass(V1ListGitCredentialsResponse, dict):
101
+ for key, value in self.items():
102
+ result[key] = value
103
+
104
+ return result
105
+
106
+ def to_str(self) -> str:
107
+ """Returns the string representation of the model"""
108
+ return pprint.pformat(self.to_dict())
109
+
110
+ def __repr__(self) -> str:
111
+ """For `print` and `pprint`"""
112
+ return self.to_str()
113
+
114
+ def __eq__(self, other: 'V1ListGitCredentialsResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1ListGitCredentialsResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1ListGitCredentialsResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other
@@ -0,0 +1,123 @@
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 V1ListJobResourcesResponse(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
+ 'job_resources': 'list[V1JobResource]'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'job_resources': 'jobResources'
49
+ }
50
+
51
+ def __init__(self, job_resources: 'list[V1JobResource]' =None): # noqa: E501
52
+ """V1ListJobResourcesResponse - a model defined in Swagger""" # noqa: E501
53
+ self._job_resources = None
54
+ self.discriminator = None
55
+ if job_resources is not None:
56
+ self.job_resources = job_resources
57
+
58
+ @property
59
+ def job_resources(self) -> 'list[V1JobResource]':
60
+ """Gets the job_resources of this V1ListJobResourcesResponse. # noqa: E501
61
+
62
+
63
+ :return: The job_resources of this V1ListJobResourcesResponse. # noqa: E501
64
+ :rtype: list[V1JobResource]
65
+ """
66
+ return self._job_resources
67
+
68
+ @job_resources.setter
69
+ def job_resources(self, job_resources: 'list[V1JobResource]'):
70
+ """Sets the job_resources of this V1ListJobResourcesResponse.
71
+
72
+
73
+ :param job_resources: The job_resources of this V1ListJobResourcesResponse. # noqa: E501
74
+ :type: list[V1JobResource]
75
+ """
76
+
77
+ self._job_resources = job_resources
78
+
79
+ def to_dict(self) -> dict:
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.swagger_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+ if issubclass(V1ListJobResourcesResponse, dict):
101
+ for key, value in self.items():
102
+ result[key] = value
103
+
104
+ return result
105
+
106
+ def to_str(self) -> str:
107
+ """Returns the string representation of the model"""
108
+ return pprint.pformat(self.to_dict())
109
+
110
+ def __repr__(self) -> str:
111
+ """For `print` and `pprint`"""
112
+ return self.to_str()
113
+
114
+ def __eq__(self, other: 'V1ListJobResourcesResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1ListJobResourcesResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1ListJobResourcesResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other