lightning-sdk 0.2.11__py3-none-any.whl → 0.2.12__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 (43) 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 +34 -0
  5. lightning_sdk/cli/serve.py +72 -23
  6. lightning_sdk/deployment/deployment.py +51 -5
  7. lightning_sdk/lightning_cloud/openapi/__init__.py +5 -1
  8. lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +4 -4
  9. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +13 -1
  10. lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +4 -4
  11. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +115 -0
  12. lightning_sdk/lightning_cloud/openapi/models/__init__.py +5 -1
  13. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +27 -1
  14. lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
  15. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +27 -1
  16. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  17. lightning_sdk/lightning_cloud/openapi/models/update.py +65 -195
  18. lightning_sdk/lightning_cloud/openapi/models/update1.py +357 -0
  19. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
  20. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
  21. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/v1_delete_cloud_space_environment_template_response.py +1 -53
  23. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +1 -27
  24. lightning_sdk/lightning_cloud/openapi/models/v1_job_resource.py +279 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_job_type.py +108 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_list_job_resources_response.py +123 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +55 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +29 -1
  29. lightning_sdk/lightning_cloud/openapi/models/v1_reservation_billing_session.py +279 -0
  30. lightning_sdk/lightning_cloud/openapi/models/v1_resources.py +55 -3
  31. lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +1 -27
  32. lightning_sdk/lightning_cloud/openapi/models/v1_usage.py +27 -1
  33. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +105 -1
  34. lightning_sdk/llm/__init__.py +3 -0
  35. lightning_sdk/llm/llm.py +56 -0
  36. lightning_sdk/serve.py +4 -6
  37. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.12.dist-info}/METADATA +1 -1
  38. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.12.dist-info}/RECORD +42 -35
  39. lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +0 -253
  40. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.12.dist-info}/LICENSE +0 -0
  41. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.12.dist-info}/WHEEL +0 -0
  42. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.12.dist-info}/entry_points.txt +0 -0
  43. {lightning_sdk-0.2.11.dist-info → lightning_sdk-0.2.12.dist-info}/top_level.txt +0 -0
@@ -43,6 +43,7 @@ class V1CloudSpaceEnvironmentTemplate(object):
43
43
  swagger_types = {
44
44
  'config': 'V1CloudSpaceEnvironmentTemplateConfig',
45
45
  'created_at': 'datetime',
46
+ 'disabled': 'bool',
46
47
  'id': 'str',
47
48
  'name': 'str',
48
49
  'org_id': 'str',
@@ -53,6 +54,7 @@ class V1CloudSpaceEnvironmentTemplate(object):
53
54
  attribute_map = {
54
55
  'config': 'config',
55
56
  'created_at': 'createdAt',
57
+ 'disabled': 'disabled',
56
58
  'id': 'id',
57
59
  'name': 'name',
58
60
  'org_id': 'orgId',
@@ -60,10 +62,11 @@ class V1CloudSpaceEnvironmentTemplate(object):
60
62
  'user_id': 'userId'
61
63
  }
62
64
 
63
- def __init__(self, config: 'V1CloudSpaceEnvironmentTemplateConfig' =None, created_at: 'datetime' =None, id: 'str' =None, name: 'str' =None, org_id: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
65
+ def __init__(self, config: 'V1CloudSpaceEnvironmentTemplateConfig' =None, created_at: 'datetime' =None, disabled: 'bool' =None, id: 'str' =None, name: 'str' =None, org_id: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
64
66
  """V1CloudSpaceEnvironmentTemplate - a model defined in Swagger""" # noqa: E501
65
67
  self._config = None
66
68
  self._created_at = None
69
+ self._disabled = None
67
70
  self._id = None
68
71
  self._name = None
69
72
  self._org_id = None
@@ -74,6 +77,8 @@ class V1CloudSpaceEnvironmentTemplate(object):
74
77
  self.config = config
75
78
  if created_at is not None:
76
79
  self.created_at = created_at
80
+ if disabled is not None:
81
+ self.disabled = disabled
77
82
  if id is not None:
78
83
  self.id = id
79
84
  if name is not None:
@@ -127,6 +132,27 @@ class V1CloudSpaceEnvironmentTemplate(object):
127
132
 
128
133
  self._created_at = created_at
129
134
 
135
+ @property
136
+ def disabled(self) -> 'bool':
137
+ """Gets the disabled of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
138
+
139
+
140
+ :return: The disabled of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
141
+ :rtype: bool
142
+ """
143
+ return self._disabled
144
+
145
+ @disabled.setter
146
+ def disabled(self, disabled: 'bool'):
147
+ """Sets the disabled of this V1CloudSpaceEnvironmentTemplate.
148
+
149
+
150
+ :param disabled: The disabled of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
151
+ :type: bool
152
+ """
153
+
154
+ self._disabled = disabled
155
+
130
156
  @property
131
157
  def id(self) -> 'str':
132
158
  """Gets the id of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
@@ -47,6 +47,7 @@ class V1CreateDeploymentRequest(object):
47
47
  'cloudspace_id': 'str',
48
48
  'cluster_id': 'str',
49
49
  'endpoint': 'V1Endpoint',
50
+ 'from_litserve': 'bool',
50
51
  'from_onboarding': 'bool',
51
52
  'name': 'str',
52
53
  'parameter_spec': 'V1ParameterizationSpec',
@@ -64,6 +65,7 @@ class V1CreateDeploymentRequest(object):
64
65
  'cloudspace_id': 'cloudspaceId',
65
66
  'cluster_id': 'clusterId',
66
67
  'endpoint': 'endpoint',
68
+ 'from_litserve': 'fromLitserve',
67
69
  'from_onboarding': 'fromOnboarding',
68
70
  'name': 'name',
69
71
  'parameter_spec': 'parameterSpec',
@@ -74,7 +76,7 @@ class V1CreateDeploymentRequest(object):
74
76
  'strategy': 'strategy'
75
77
  }
76
78
 
77
- def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_onboarding: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, project_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None): # noqa: E501
79
+ def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, project_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None): # noqa: E501
78
80
  """V1CreateDeploymentRequest - a model defined in Swagger""" # noqa: E501
79
81
  self._api_standard = None
80
82
  self._apis = None
@@ -82,6 +84,7 @@ class V1CreateDeploymentRequest(object):
82
84
  self._cloudspace_id = None
83
85
  self._cluster_id = None
84
86
  self._endpoint = None
87
+ self._from_litserve = None
85
88
  self._from_onboarding = None
86
89
  self._name = None
87
90
  self._parameter_spec = None
@@ -103,6 +106,8 @@ class V1CreateDeploymentRequest(object):
103
106
  self.cluster_id = cluster_id
104
107
  if endpoint is not None:
105
108
  self.endpoint = endpoint
109
+ if from_litserve is not None:
110
+ self.from_litserve = from_litserve
106
111
  if from_onboarding is not None:
107
112
  self.from_onboarding = from_onboarding
108
113
  if name is not None:
@@ -246,6 +251,27 @@ class V1CreateDeploymentRequest(object):
246
251
 
247
252
  self._endpoint = endpoint
248
253
 
254
+ @property
255
+ def from_litserve(self) -> 'bool':
256
+ """Gets the from_litserve of this V1CreateDeploymentRequest. # noqa: E501
257
+
258
+
259
+ :return: The from_litserve of this V1CreateDeploymentRequest. # noqa: E501
260
+ :rtype: bool
261
+ """
262
+ return self._from_litserve
263
+
264
+ @from_litserve.setter
265
+ def from_litserve(self, from_litserve: 'bool'):
266
+ """Sets the from_litserve of this V1CreateDeploymentRequest.
267
+
268
+
269
+ :param from_litserve: The from_litserve of this V1CreateDeploymentRequest. # noqa: E501
270
+ :type: bool
271
+ """
272
+
273
+ self._from_litserve = from_litserve
274
+
249
275
  @property
250
276
  def from_onboarding(self) -> 'bool':
251
277
  """Gets the from_onboarding of this V1CreateDeploymentRequest. # noqa: E501
@@ -41,66 +41,14 @@ class V1DeleteCloudSpaceEnvironmentTemplateResponse(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
- 'id': 'str',
45
- 'org_id': 'str'
46
44
  }
47
45
 
48
46
  attribute_map = {
49
- 'id': 'id',
50
- 'org_id': 'orgId'
51
47
  }
52
48
 
53
- def __init__(self, id: 'str' =None, org_id: 'str' =None): # noqa: E501
49
+ def __init__(self): # noqa: E501
54
50
  """V1DeleteCloudSpaceEnvironmentTemplateResponse - a model defined in Swagger""" # noqa: E501
55
- self._id = None
56
- self._org_id = None
57
51
  self.discriminator = None
58
- if id is not None:
59
- self.id = id
60
- if org_id is not None:
61
- self.org_id = org_id
62
-
63
- @property
64
- def id(self) -> 'str':
65
- """Gets the id of this V1DeleteCloudSpaceEnvironmentTemplateResponse. # noqa: E501
66
-
67
-
68
- :return: The id of this V1DeleteCloudSpaceEnvironmentTemplateResponse. # noqa: E501
69
- :rtype: str
70
- """
71
- return self._id
72
-
73
- @id.setter
74
- def id(self, id: 'str'):
75
- """Sets the id of this V1DeleteCloudSpaceEnvironmentTemplateResponse.
76
-
77
-
78
- :param id: The id of this V1DeleteCloudSpaceEnvironmentTemplateResponse. # noqa: E501
79
- :type: str
80
- """
81
-
82
- self._id = id
83
-
84
- @property
85
- def org_id(self) -> 'str':
86
- """Gets the org_id of this V1DeleteCloudSpaceEnvironmentTemplateResponse. # noqa: E501
87
-
88
-
89
- :return: The org_id of this V1DeleteCloudSpaceEnvironmentTemplateResponse. # noqa: E501
90
- :rtype: str
91
- """
92
- return self._org_id
93
-
94
- @org_id.setter
95
- def org_id(self, org_id: 'str'):
96
- """Sets the org_id of this V1DeleteCloudSpaceEnvironmentTemplateResponse.
97
-
98
-
99
- :param org_id: The org_id of this V1DeleteCloudSpaceEnvironmentTemplateResponse. # noqa: E501
100
- :type: str
101
- """
102
-
103
- self._org_id = org_id
104
52
 
105
53
  def to_dict(self) -> dict:
106
54
  """Returns the model properties as a dict"""
@@ -50,7 +50,6 @@ class V1GetUserResponse(object):
50
50
  'features': 'V1UserFeatures',
51
51
  'first_name': 'str',
52
52
  'general_audience_mode': 'bool',
53
- 'git_credentials_id': 'str',
54
53
  'id': 'str',
55
54
  'internal_docs_admin': 'bool',
56
55
  'invite_code': 'str',
@@ -89,7 +88,6 @@ class V1GetUserResponse(object):
89
88
  'features': 'features',
90
89
  'first_name': 'firstName',
91
90
  'general_audience_mode': 'generalAudienceMode',
92
- 'git_credentials_id': 'gitCredentialsId',
93
91
  'id': 'id',
94
92
  'internal_docs_admin': 'internalDocsAdmin',
95
93
  'invite_code': 'inviteCode',
@@ -118,7 +116,7 @@ class V1GetUserResponse(object):
118
116
  'website': 'website'
119
117
  }
120
118
 
121
- def __init__(self, agree_to_terms_and_conditions: 'bool' =None, api_key: 'str' =None, country: 'str' =None, discounted_pro_plan: 'bool' =None, email: 'str' =None, experimentation_id: 'str' =None, features: 'V1UserFeatures' =None, first_name: 'str' =None, general_audience_mode: 'bool' =None, git_credentials_id: 'str' =None, id: 'str' =None, internal_docs_admin: 'bool' =None, invite_code: 'str' =None, is_internal: 'bool' =None, last_name: 'str' =None, non_developer_mode: 'bool' =None, opted_in_marketing_emails: 'bool' =None, organization: 'str' =None, organizations: 'list[V1Organization]' =None, phone_number: 'str' =None, picture_url: 'str' =None, preferred_color_scheme: 'str' =None, preferred_ide: 'str' =None, preferred_shell: 'str' =None, preferred_vscode_marketplace: 'str' =None, role: 'str' =None, saw_create_first_project_dialog: 'bool' =None, saw_forums_login_merge_dialog: 'bool' =None, saw_free_credits_notification: 'bool' =None, sb: 'bool' =None, status: 'Externalv1UserStatus' =None, storage_bytes: 'str' =None, user_metadata: 'str' =None, username: 'str' =None, waitlisted: 'bool' =None, website: 'str' =None): # noqa: E501
119
+ def __init__(self, agree_to_terms_and_conditions: 'bool' =None, api_key: 'str' =None, country: 'str' =None, discounted_pro_plan: 'bool' =None, email: 'str' =None, experimentation_id: 'str' =None, features: 'V1UserFeatures' =None, first_name: 'str' =None, general_audience_mode: 'bool' =None, id: 'str' =None, internal_docs_admin: 'bool' =None, invite_code: 'str' =None, is_internal: 'bool' =None, last_name: 'str' =None, non_developer_mode: 'bool' =None, opted_in_marketing_emails: 'bool' =None, organization: 'str' =None, organizations: 'list[V1Organization]' =None, phone_number: 'str' =None, picture_url: 'str' =None, preferred_color_scheme: 'str' =None, preferred_ide: 'str' =None, preferred_shell: 'str' =None, preferred_vscode_marketplace: 'str' =None, role: 'str' =None, saw_create_first_project_dialog: 'bool' =None, saw_forums_login_merge_dialog: 'bool' =None, saw_free_credits_notification: 'bool' =None, sb: 'bool' =None, status: 'Externalv1UserStatus' =None, storage_bytes: 'str' =None, user_metadata: 'str' =None, username: 'str' =None, waitlisted: 'bool' =None, website: 'str' =None): # noqa: E501
122
120
  """V1GetUserResponse - a model defined in Swagger""" # noqa: E501
123
121
  self._agree_to_terms_and_conditions = None
124
122
  self._api_key = None
@@ -129,7 +127,6 @@ class V1GetUserResponse(object):
129
127
  self._features = None
130
128
  self._first_name = None
131
129
  self._general_audience_mode = None
132
- self._git_credentials_id = None
133
130
  self._id = None
134
131
  self._internal_docs_admin = None
135
132
  self._invite_code = None
@@ -175,8 +172,6 @@ class V1GetUserResponse(object):
175
172
  self.first_name = first_name
176
173
  if general_audience_mode is not None:
177
174
  self.general_audience_mode = general_audience_mode
178
- if git_credentials_id is not None:
179
- self.git_credentials_id = git_credentials_id
180
175
  if id is not None:
181
176
  self.id = id
182
177
  if internal_docs_admin is not None:
@@ -419,27 +414,6 @@ class V1GetUserResponse(object):
419
414
 
420
415
  self._general_audience_mode = general_audience_mode
421
416
 
422
- @property
423
- def git_credentials_id(self) -> 'str':
424
- """Gets the git_credentials_id of this V1GetUserResponse. # noqa: E501
425
-
426
-
427
- :return: The git_credentials_id of this V1GetUserResponse. # noqa: E501
428
- :rtype: str
429
- """
430
- return self._git_credentials_id
431
-
432
- @git_credentials_id.setter
433
- def git_credentials_id(self, git_credentials_id: 'str'):
434
- """Sets the git_credentials_id of this V1GetUserResponse.
435
-
436
-
437
- :param git_credentials_id: The git_credentials_id of this V1GetUserResponse. # noqa: E501
438
- :type: str
439
- """
440
-
441
- self._git_credentials_id = git_credentials_id
442
-
443
417
  @property
444
418
  def id(self) -> 'str':
445
419
  """Gets the id of this V1GetUserResponse. # noqa: E501
@@ -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