lightning-sdk 2025.11.13.post0__py3-none-any.whl → 2025.11.21__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 +2 -0
- lightning_sdk/__version__.py +1 -1
- lightning_sdk/api/__init__.py +2 -9
- lightning_sdk/api/k8s_api.py +105 -0
- lightning_sdk/api/studio_api.py +19 -0
- lightning_sdk/api/utils.py +19 -0
- lightning_sdk/exceptions.py +2 -0
- lightning_sdk/k8s_cluster.py +83 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +15 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +134 -1
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +539 -2
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +114 -0
- lightning_sdk/lightning_cloud/openapi/api/markets_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py +99 -2
- lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +15 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/deployments_deployment_id_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/id_content_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/job_id_systemmetrics_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/message_id_actions_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_compute_cluster_machines.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_compute_cluster_request.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_generic_job.py +305 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_project_balance_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_pod.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_all_jobs_response.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_jobs_sort_by.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_jobs_sort_order.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_pods_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_pipelines_response.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_machine_direct_v1.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_message.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_message_action.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_org_deployment_visibility.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pod_preemption_event.py +305 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_report_job_system_metrics_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_conversation_message_content_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +133 -107
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_storage_transfer_response.py +15 -15
- lightning_sdk/lightning_cloud/rest_client.py +2 -0
- lightning_sdk/studio.py +12 -0
- {lightning_sdk-2025.11.13.post0.dist-info → lightning_sdk-2025.11.21.dist-info}/METADATA +2 -1
- {lightning_sdk-2025.11.13.post0.dist-info → lightning_sdk-2025.11.21.dist-info}/RECORD +61 -43
- {lightning_sdk-2025.11.13.post0.dist-info → lightning_sdk-2025.11.21.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.11.13.post0.dist-info → lightning_sdk-2025.11.21.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.11.13.post0.dist-info → lightning_sdk-2025.11.21.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.11.13.post0.dist-info → lightning_sdk-2025.11.21.dist-info}/top_level.txt +0 -0
|
@@ -49,6 +49,7 @@ class V1ClusterSpec(object):
|
|
|
49
49
|
'cloudflare_v1': 'V1CloudflareV1',
|
|
50
50
|
'cluster_type': 'V1ClusterType',
|
|
51
51
|
'compute_cluster_ids': 'list[str]',
|
|
52
|
+
'compute_cluster_request': 'V1ComputeClusterRequest',
|
|
52
53
|
'deletion_options': 'V1ClusterDeletionOptions',
|
|
53
54
|
'desired_state': 'V1ClusterState',
|
|
54
55
|
'domain': 'str',
|
|
@@ -74,6 +75,7 @@ class V1ClusterSpec(object):
|
|
|
74
75
|
'security_options': 'V1ClusterSecurityOptions',
|
|
75
76
|
'slurm_v1': 'V1SlurmV1',
|
|
76
77
|
'tagging_options': 'V1ClusterTaggingOptions',
|
|
78
|
+
'unavailability_spikes_detection_enabled': 'bool',
|
|
77
79
|
'user_id': 'str',
|
|
78
80
|
'vibe_coding_enabled': 'bool',
|
|
79
81
|
'voltage_park_v1': 'V1VoltageParkDirectV1',
|
|
@@ -89,6 +91,7 @@ class V1ClusterSpec(object):
|
|
|
89
91
|
'cloudflare_v1': 'cloudflareV1',
|
|
90
92
|
'cluster_type': 'clusterType',
|
|
91
93
|
'compute_cluster_ids': 'computeClusterIds',
|
|
94
|
+
'compute_cluster_request': 'computeClusterRequest',
|
|
92
95
|
'deletion_options': 'deletionOptions',
|
|
93
96
|
'desired_state': 'desiredState',
|
|
94
97
|
'domain': 'domain',
|
|
@@ -114,13 +117,14 @@ class V1ClusterSpec(object):
|
|
|
114
117
|
'security_options': 'securityOptions',
|
|
115
118
|
'slurm_v1': 'slurmV1',
|
|
116
119
|
'tagging_options': 'taggingOptions',
|
|
120
|
+
'unavailability_spikes_detection_enabled': 'unavailabilitySpikesDetectionEnabled',
|
|
117
121
|
'user_id': 'userId',
|
|
118
122
|
'vibe_coding_enabled': 'vibeCodingEnabled',
|
|
119
123
|
'voltage_park_v1': 'voltageParkV1',
|
|
120
124
|
'vultr_v1': 'vultrV1'
|
|
121
125
|
}
|
|
122
126
|
|
|
123
|
-
def __init__(self, ai_pod_v1: 'V1AiPodV1' =None, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, cloud_pricing_enabled: 'bool' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, freeze_accelerators: 'bool' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, insurer_disabled: 'bool' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, lock_overprovisioning: 'bool' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, user_id: 'str' =None, vibe_coding_enabled: 'bool' =None, voltage_park_v1: 'V1VoltageParkDirectV1' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501
|
|
127
|
+
def __init__(self, ai_pod_v1: 'V1AiPodV1' =None, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, cloud_pricing_enabled: 'bool' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, compute_cluster_request: 'V1ComputeClusterRequest' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, freeze_accelerators: 'bool' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, insurer_disabled: 'bool' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, lock_overprovisioning: 'bool' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, unavailability_spikes_detection_enabled: 'bool' =None, user_id: 'str' =None, vibe_coding_enabled: 'bool' =None, voltage_park_v1: 'V1VoltageParkDirectV1' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501
|
|
124
128
|
"""V1ClusterSpec - a model defined in Swagger""" # noqa: E501
|
|
125
129
|
self._ai_pod_v1 = None
|
|
126
130
|
self._auth_token = None
|
|
@@ -130,6 +134,7 @@ class V1ClusterSpec(object):
|
|
|
130
134
|
self._cloudflare_v1 = None
|
|
131
135
|
self._cluster_type = None
|
|
132
136
|
self._compute_cluster_ids = None
|
|
137
|
+
self._compute_cluster_request = None
|
|
133
138
|
self._deletion_options = None
|
|
134
139
|
self._desired_state = None
|
|
135
140
|
self._domain = None
|
|
@@ -155,6 +160,7 @@ class V1ClusterSpec(object):
|
|
|
155
160
|
self._security_options = None
|
|
156
161
|
self._slurm_v1 = None
|
|
157
162
|
self._tagging_options = None
|
|
163
|
+
self._unavailability_spikes_detection_enabled = None
|
|
158
164
|
self._user_id = None
|
|
159
165
|
self._vibe_coding_enabled = None
|
|
160
166
|
self._voltage_park_v1 = None
|
|
@@ -176,6 +182,8 @@ class V1ClusterSpec(object):
|
|
|
176
182
|
self.cluster_type = cluster_type
|
|
177
183
|
if compute_cluster_ids is not None:
|
|
178
184
|
self.compute_cluster_ids = compute_cluster_ids
|
|
185
|
+
if compute_cluster_request is not None:
|
|
186
|
+
self.compute_cluster_request = compute_cluster_request
|
|
179
187
|
if deletion_options is not None:
|
|
180
188
|
self.deletion_options = deletion_options
|
|
181
189
|
if desired_state is not None:
|
|
@@ -226,6 +234,8 @@ class V1ClusterSpec(object):
|
|
|
226
234
|
self.slurm_v1 = slurm_v1
|
|
227
235
|
if tagging_options is not None:
|
|
228
236
|
self.tagging_options = tagging_options
|
|
237
|
+
if unavailability_spikes_detection_enabled is not None:
|
|
238
|
+
self.unavailability_spikes_detection_enabled = unavailability_spikes_detection_enabled
|
|
229
239
|
if user_id is not None:
|
|
230
240
|
self.user_id = user_id
|
|
231
241
|
if vibe_coding_enabled is not None:
|
|
@@ -403,6 +413,27 @@ class V1ClusterSpec(object):
|
|
|
403
413
|
|
|
404
414
|
self._compute_cluster_ids = compute_cluster_ids
|
|
405
415
|
|
|
416
|
+
@property
|
|
417
|
+
def compute_cluster_request(self) -> 'V1ComputeClusterRequest':
|
|
418
|
+
"""Gets the compute_cluster_request of this V1ClusterSpec. # noqa: E501
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
:return: The compute_cluster_request of this V1ClusterSpec. # noqa: E501
|
|
422
|
+
:rtype: V1ComputeClusterRequest
|
|
423
|
+
"""
|
|
424
|
+
return self._compute_cluster_request
|
|
425
|
+
|
|
426
|
+
@compute_cluster_request.setter
|
|
427
|
+
def compute_cluster_request(self, compute_cluster_request: 'V1ComputeClusterRequest'):
|
|
428
|
+
"""Sets the compute_cluster_request of this V1ClusterSpec.
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
:param compute_cluster_request: The compute_cluster_request of this V1ClusterSpec. # noqa: E501
|
|
432
|
+
:type: V1ComputeClusterRequest
|
|
433
|
+
"""
|
|
434
|
+
|
|
435
|
+
self._compute_cluster_request = compute_cluster_request
|
|
436
|
+
|
|
406
437
|
@property
|
|
407
438
|
def deletion_options(self) -> 'V1ClusterDeletionOptions':
|
|
408
439
|
"""Gets the deletion_options of this V1ClusterSpec. # noqa: E501
|
|
@@ -930,6 +961,27 @@ class V1ClusterSpec(object):
|
|
|
930
961
|
|
|
931
962
|
self._tagging_options = tagging_options
|
|
932
963
|
|
|
964
|
+
@property
|
|
965
|
+
def unavailability_spikes_detection_enabled(self) -> 'bool':
|
|
966
|
+
"""Gets the unavailability_spikes_detection_enabled of this V1ClusterSpec. # noqa: E501
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
:return: The unavailability_spikes_detection_enabled of this V1ClusterSpec. # noqa: E501
|
|
970
|
+
:rtype: bool
|
|
971
|
+
"""
|
|
972
|
+
return self._unavailability_spikes_detection_enabled
|
|
973
|
+
|
|
974
|
+
@unavailability_spikes_detection_enabled.setter
|
|
975
|
+
def unavailability_spikes_detection_enabled(self, unavailability_spikes_detection_enabled: 'bool'):
|
|
976
|
+
"""Sets the unavailability_spikes_detection_enabled of this V1ClusterSpec.
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
:param unavailability_spikes_detection_enabled: The unavailability_spikes_detection_enabled of this V1ClusterSpec. # noqa: E501
|
|
980
|
+
:type: bool
|
|
981
|
+
"""
|
|
982
|
+
|
|
983
|
+
self._unavailability_spikes_detection_enabled = unavailability_spikes_detection_enabled
|
|
984
|
+
|
|
933
985
|
@property
|
|
934
986
|
def user_id(self) -> 'str':
|
|
935
987
|
"""Gets the user_id of this V1ClusterSpec. # noqa: E501
|
|
@@ -0,0 +1,149 @@
|
|
|
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 V1ComputeClusterMachines(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
|
+
'gpu': 'str',
|
|
45
|
+
'quantity': 'int'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'gpu': 'gpu',
|
|
50
|
+
'quantity': 'quantity'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, gpu: 'str' =None, quantity: 'int' =None): # noqa: E501
|
|
54
|
+
"""V1ComputeClusterMachines - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._gpu = None
|
|
56
|
+
self._quantity = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if gpu is not None:
|
|
59
|
+
self.gpu = gpu
|
|
60
|
+
if quantity is not None:
|
|
61
|
+
self.quantity = quantity
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def gpu(self) -> 'str':
|
|
65
|
+
"""Gets the gpu of this V1ComputeClusterMachines. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The gpu of this V1ComputeClusterMachines. # noqa: E501
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._gpu
|
|
72
|
+
|
|
73
|
+
@gpu.setter
|
|
74
|
+
def gpu(self, gpu: 'str'):
|
|
75
|
+
"""Sets the gpu of this V1ComputeClusterMachines.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param gpu: The gpu of this V1ComputeClusterMachines. # noqa: E501
|
|
79
|
+
:type: str
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._gpu = gpu
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def quantity(self) -> 'int':
|
|
86
|
+
"""Gets the quantity of this V1ComputeClusterMachines. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The quantity of this V1ComputeClusterMachines. # noqa: E501
|
|
90
|
+
:rtype: int
|
|
91
|
+
"""
|
|
92
|
+
return self._quantity
|
|
93
|
+
|
|
94
|
+
@quantity.setter
|
|
95
|
+
def quantity(self, quantity: 'int'):
|
|
96
|
+
"""Sets the quantity of this V1ComputeClusterMachines.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param quantity: The quantity of this V1ComputeClusterMachines. # noqa: E501
|
|
100
|
+
:type: int
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._quantity = quantity
|
|
104
|
+
|
|
105
|
+
def to_dict(self) -> dict:
|
|
106
|
+
"""Returns the model properties as a dict"""
|
|
107
|
+
result = {}
|
|
108
|
+
|
|
109
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
110
|
+
value = getattr(self, attr)
|
|
111
|
+
if isinstance(value, list):
|
|
112
|
+
result[attr] = list(map(
|
|
113
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
114
|
+
value
|
|
115
|
+
))
|
|
116
|
+
elif hasattr(value, "to_dict"):
|
|
117
|
+
result[attr] = value.to_dict()
|
|
118
|
+
elif isinstance(value, dict):
|
|
119
|
+
result[attr] = dict(map(
|
|
120
|
+
lambda item: (item[0], item[1].to_dict())
|
|
121
|
+
if hasattr(item[1], "to_dict") else item,
|
|
122
|
+
value.items()
|
|
123
|
+
))
|
|
124
|
+
else:
|
|
125
|
+
result[attr] = value
|
|
126
|
+
if issubclass(V1ComputeClusterMachines, dict):
|
|
127
|
+
for key, value in self.items():
|
|
128
|
+
result[key] = value
|
|
129
|
+
|
|
130
|
+
return result
|
|
131
|
+
|
|
132
|
+
def to_str(self) -> str:
|
|
133
|
+
"""Returns the string representation of the model"""
|
|
134
|
+
return pprint.pformat(self.to_dict())
|
|
135
|
+
|
|
136
|
+
def __repr__(self) -> str:
|
|
137
|
+
"""For `print` and `pprint`"""
|
|
138
|
+
return self.to_str()
|
|
139
|
+
|
|
140
|
+
def __eq__(self, other: 'V1ComputeClusterMachines') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1ComputeClusterMachines):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1ComputeClusterMachines') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -0,0 +1,149 @@
|
|
|
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 V1ComputeClusterRequest(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
|
+
'duration': 'str',
|
|
45
|
+
'machines': 'list[V1ComputeClusterMachines]'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'duration': 'duration',
|
|
50
|
+
'machines': 'machines'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, duration: 'str' =None, machines: 'list[V1ComputeClusterMachines]' =None): # noqa: E501
|
|
54
|
+
"""V1ComputeClusterRequest - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._duration = None
|
|
56
|
+
self._machines = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if duration is not None:
|
|
59
|
+
self.duration = duration
|
|
60
|
+
if machines is not None:
|
|
61
|
+
self.machines = machines
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def duration(self) -> 'str':
|
|
65
|
+
"""Gets the duration of this V1ComputeClusterRequest. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The duration of this V1ComputeClusterRequest. # noqa: E501
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._duration
|
|
72
|
+
|
|
73
|
+
@duration.setter
|
|
74
|
+
def duration(self, duration: 'str'):
|
|
75
|
+
"""Sets the duration of this V1ComputeClusterRequest.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param duration: The duration of this V1ComputeClusterRequest. # noqa: E501
|
|
79
|
+
:type: str
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._duration = duration
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def machines(self) -> 'list[V1ComputeClusterMachines]':
|
|
86
|
+
"""Gets the machines of this V1ComputeClusterRequest. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The machines of this V1ComputeClusterRequest. # noqa: E501
|
|
90
|
+
:rtype: list[V1ComputeClusterMachines]
|
|
91
|
+
"""
|
|
92
|
+
return self._machines
|
|
93
|
+
|
|
94
|
+
@machines.setter
|
|
95
|
+
def machines(self, machines: 'list[V1ComputeClusterMachines]'):
|
|
96
|
+
"""Sets the machines of this V1ComputeClusterRequest.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param machines: The machines of this V1ComputeClusterRequest. # noqa: E501
|
|
100
|
+
:type: list[V1ComputeClusterMachines]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._machines = machines
|
|
104
|
+
|
|
105
|
+
def to_dict(self) -> dict:
|
|
106
|
+
"""Returns the model properties as a dict"""
|
|
107
|
+
result = {}
|
|
108
|
+
|
|
109
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
110
|
+
value = getattr(self, attr)
|
|
111
|
+
if isinstance(value, list):
|
|
112
|
+
result[attr] = list(map(
|
|
113
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
114
|
+
value
|
|
115
|
+
))
|
|
116
|
+
elif hasattr(value, "to_dict"):
|
|
117
|
+
result[attr] = value.to_dict()
|
|
118
|
+
elif isinstance(value, dict):
|
|
119
|
+
result[attr] = dict(map(
|
|
120
|
+
lambda item: (item[0], item[1].to_dict())
|
|
121
|
+
if hasattr(item[1], "to_dict") else item,
|
|
122
|
+
value.items()
|
|
123
|
+
))
|
|
124
|
+
else:
|
|
125
|
+
result[attr] = value
|
|
126
|
+
if issubclass(V1ComputeClusterRequest, dict):
|
|
127
|
+
for key, value in self.items():
|
|
128
|
+
result[key] = value
|
|
129
|
+
|
|
130
|
+
return result
|
|
131
|
+
|
|
132
|
+
def to_str(self) -> str:
|
|
133
|
+
"""Returns the string representation of the model"""
|
|
134
|
+
return pprint.pformat(self.to_dict())
|
|
135
|
+
|
|
136
|
+
def __repr__(self) -> str:
|
|
137
|
+
"""For `print` and `pprint`"""
|
|
138
|
+
return self.to_str()
|
|
139
|
+
|
|
140
|
+
def __eq__(self, other: 'V1ComputeClusterRequest') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1ComputeClusterRequest):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1ComputeClusterRequest') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -51,7 +51,6 @@ class V1CreateProjectRequest(object):
|
|
|
51
51
|
'display_name': 'str',
|
|
52
52
|
'layout_config': 'list[V1ProjectTab]',
|
|
53
53
|
'name': 'str',
|
|
54
|
-
'organization_billing_enabled': 'bool',
|
|
55
54
|
'organization_id': 'str',
|
|
56
55
|
'preferred_cluster': 'str',
|
|
57
56
|
'quotas': 'V1Quotas'
|
|
@@ -68,13 +67,12 @@ class V1CreateProjectRequest(object):
|
|
|
68
67
|
'display_name': 'displayName',
|
|
69
68
|
'layout_config': 'layoutConfig',
|
|
70
69
|
'name': 'name',
|
|
71
|
-
'organization_billing_enabled': 'organizationBillingEnabled',
|
|
72
70
|
'organization_id': 'organizationId',
|
|
73
71
|
'preferred_cluster': 'preferredCluster',
|
|
74
72
|
'quotas': 'quotas'
|
|
75
73
|
}
|
|
76
74
|
|
|
77
|
-
def __init__(self, allow_credits_auto_replenish: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, budgeting_enabled: 'bool' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, layout_config: 'list[V1ProjectTab]' =None, name: 'str' =None,
|
|
75
|
+
def __init__(self, allow_credits_auto_replenish: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, budgeting_enabled: 'bool' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, layout_config: 'list[V1ProjectTab]' =None, name: 'str' =None, organization_id: 'str' =None, preferred_cluster: 'str' =None, quotas: 'V1Quotas' =None): # noqa: E501
|
|
78
76
|
"""V1CreateProjectRequest - a model defined in Swagger""" # noqa: E501
|
|
79
77
|
self._allow_credits_auto_replenish = None
|
|
80
78
|
self._auto_replenish_amount = None
|
|
@@ -86,7 +84,6 @@ class V1CreateProjectRequest(object):
|
|
|
86
84
|
self._display_name = None
|
|
87
85
|
self._layout_config = None
|
|
88
86
|
self._name = None
|
|
89
|
-
self._organization_billing_enabled = None
|
|
90
87
|
self._organization_id = None
|
|
91
88
|
self._preferred_cluster = None
|
|
92
89
|
self._quotas = None
|
|
@@ -111,8 +108,6 @@ class V1CreateProjectRequest(object):
|
|
|
111
108
|
self.layout_config = layout_config
|
|
112
109
|
if name is not None:
|
|
113
110
|
self.name = name
|
|
114
|
-
if organization_billing_enabled is not None:
|
|
115
|
-
self.organization_billing_enabled = organization_billing_enabled
|
|
116
111
|
if organization_id is not None:
|
|
117
112
|
self.organization_id = organization_id
|
|
118
113
|
if preferred_cluster is not None:
|
|
@@ -330,27 +325,6 @@ class V1CreateProjectRequest(object):
|
|
|
330
325
|
|
|
331
326
|
self._name = name
|
|
332
327
|
|
|
333
|
-
@property
|
|
334
|
-
def organization_billing_enabled(self) -> 'bool':
|
|
335
|
-
"""Gets the organization_billing_enabled of this V1CreateProjectRequest. # noqa: E501
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
:return: The organization_billing_enabled of this V1CreateProjectRequest. # noqa: E501
|
|
339
|
-
:rtype: bool
|
|
340
|
-
"""
|
|
341
|
-
return self._organization_billing_enabled
|
|
342
|
-
|
|
343
|
-
@organization_billing_enabled.setter
|
|
344
|
-
def organization_billing_enabled(self, organization_billing_enabled: 'bool'):
|
|
345
|
-
"""Sets the organization_billing_enabled of this V1CreateProjectRequest.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
:param organization_billing_enabled: The organization_billing_enabled of this V1CreateProjectRequest. # noqa: E501
|
|
349
|
-
:type: bool
|
|
350
|
-
"""
|
|
351
|
-
|
|
352
|
-
self._organization_billing_enabled = organization_billing_enabled
|
|
353
|
-
|
|
354
328
|
@property
|
|
355
329
|
def organization_id(self) -> 'str':
|
|
356
330
|
"""Gets the organization_id of this V1CreateProjectRequest. # noqa: E501
|