lightning-sdk 2025.10.8__py3-none-any.whl → 2025.10.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +6 -3
- lightning_sdk/api/base_studio_api.py +13 -9
- lightning_sdk/api/cloud_account_api.py +0 -2
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/studio_api.py +15 -2
- lightning_sdk/base_studio.py +30 -17
- lightning_sdk/cli/base_studio/list.py +1 -3
- lightning_sdk/cli/entrypoint.py +8 -34
- lightning_sdk/cli/studio/connect.py +42 -92
- lightning_sdk/cli/studio/create.py +23 -1
- lightning_sdk/cli/studio/start.py +12 -2
- lightning_sdk/cli/utils/get_base_studio.py +24 -0
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +71 -0
- lightning_sdk/cli/utils/logging.py +121 -0
- lightning_sdk/cli/utils/ssh_connection.py +1 -1
- lightning_sdk/constants.py +1 -0
- lightning_sdk/helpers.py +53 -34
- lightning_sdk/job/job.py +5 -0
- lightning_sdk/job/v1.py +8 -0
- lightning_sdk/job/v2.py +8 -0
- lightning_sdk/lightning_cloud/login.py +260 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +30 -3
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +19 -19
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +97 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +1463 -240
- lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/api/sdk_command_history_service_api.py +141 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_visibility_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_transfer_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/incident_id_messages_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/incidents_id_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/messages_message_id_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_incidents_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_transfer_metadata.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_message_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_group_pod_metrics.py +1241 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +565 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_message.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kai_scheduler_queue_metrics.py +627 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_group_pod_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_messages_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incidents_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kai_scheduler_queues_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_severity.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +209 -131
- lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
- lightning_sdk/lightning_cloud/rest_client.py +48 -45
- lightning_sdk/machine.py +2 -1
- lightning_sdk/studio.py +22 -2
- lightning_sdk/utils/license.py +13 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/RECORD +94 -64
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
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 V1License(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
|
+
'id': 'str',
|
|
45
|
+
'license_key': 'str',
|
|
46
|
+
'owner_id': 'str',
|
|
47
|
+
'owner_type': 'V1TokenOwnerType',
|
|
48
|
+
'product_id': 'str'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
attribute_map = {
|
|
52
|
+
'id': 'id',
|
|
53
|
+
'license_key': 'licenseKey',
|
|
54
|
+
'owner_id': 'ownerId',
|
|
55
|
+
'owner_type': 'ownerType',
|
|
56
|
+
'product_id': 'productId'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
def __init__(self, id: 'str' =None, license_key: 'str' =None, owner_id: 'str' =None, owner_type: 'V1TokenOwnerType' =None, product_id: 'str' =None): # noqa: E501
|
|
60
|
+
"""V1License - a model defined in Swagger""" # noqa: E501
|
|
61
|
+
self._id = None
|
|
62
|
+
self._license_key = None
|
|
63
|
+
self._owner_id = None
|
|
64
|
+
self._owner_type = None
|
|
65
|
+
self._product_id = None
|
|
66
|
+
self.discriminator = None
|
|
67
|
+
if id is not None:
|
|
68
|
+
self.id = id
|
|
69
|
+
if license_key is not None:
|
|
70
|
+
self.license_key = license_key
|
|
71
|
+
if owner_id is not None:
|
|
72
|
+
self.owner_id = owner_id
|
|
73
|
+
if owner_type is not None:
|
|
74
|
+
self.owner_type = owner_type
|
|
75
|
+
if product_id is not None:
|
|
76
|
+
self.product_id = product_id
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def id(self) -> 'str':
|
|
80
|
+
"""Gets the id of this V1License. # noqa: E501
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:return: The id of this V1License. # noqa: E501
|
|
84
|
+
:rtype: str
|
|
85
|
+
"""
|
|
86
|
+
return self._id
|
|
87
|
+
|
|
88
|
+
@id.setter
|
|
89
|
+
def id(self, id: 'str'):
|
|
90
|
+
"""Sets the id of this V1License.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
:param id: The id of this V1License. # noqa: E501
|
|
94
|
+
:type: str
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
self._id = id
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def license_key(self) -> 'str':
|
|
101
|
+
"""Gets the license_key of this V1License. # noqa: E501
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:return: The license_key of this V1License. # noqa: E501
|
|
105
|
+
:rtype: str
|
|
106
|
+
"""
|
|
107
|
+
return self._license_key
|
|
108
|
+
|
|
109
|
+
@license_key.setter
|
|
110
|
+
def license_key(self, license_key: 'str'):
|
|
111
|
+
"""Sets the license_key of this V1License.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
:param license_key: The license_key of this V1License. # noqa: E501
|
|
115
|
+
:type: str
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
self._license_key = license_key
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def owner_id(self) -> 'str':
|
|
122
|
+
"""Gets the owner_id of this V1License. # noqa: E501
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:return: The owner_id of this V1License. # noqa: E501
|
|
126
|
+
:rtype: str
|
|
127
|
+
"""
|
|
128
|
+
return self._owner_id
|
|
129
|
+
|
|
130
|
+
@owner_id.setter
|
|
131
|
+
def owner_id(self, owner_id: 'str'):
|
|
132
|
+
"""Sets the owner_id of this V1License.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param owner_id: The owner_id of this V1License. # noqa: E501
|
|
136
|
+
:type: str
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
self._owner_id = owner_id
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def owner_type(self) -> 'V1TokenOwnerType':
|
|
143
|
+
"""Gets the owner_type of this V1License. # noqa: E501
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
:return: The owner_type of this V1License. # noqa: E501
|
|
147
|
+
:rtype: V1TokenOwnerType
|
|
148
|
+
"""
|
|
149
|
+
return self._owner_type
|
|
150
|
+
|
|
151
|
+
@owner_type.setter
|
|
152
|
+
def owner_type(self, owner_type: 'V1TokenOwnerType'):
|
|
153
|
+
"""Sets the owner_type of this V1License.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
:param owner_type: The owner_type of this V1License. # noqa: E501
|
|
157
|
+
:type: V1TokenOwnerType
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
self._owner_type = owner_type
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def product_id(self) -> 'str':
|
|
164
|
+
"""Gets the product_id of this V1License. # noqa: E501
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
:return: The product_id of this V1License. # noqa: E501
|
|
168
|
+
:rtype: str
|
|
169
|
+
"""
|
|
170
|
+
return self._product_id
|
|
171
|
+
|
|
172
|
+
@product_id.setter
|
|
173
|
+
def product_id(self, product_id: 'str'):
|
|
174
|
+
"""Sets the product_id of this V1License.
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
:param product_id: The product_id of this V1License. # noqa: E501
|
|
178
|
+
:type: str
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
self._product_id = product_id
|
|
182
|
+
|
|
183
|
+
def to_dict(self) -> dict:
|
|
184
|
+
"""Returns the model properties as a dict"""
|
|
185
|
+
result = {}
|
|
186
|
+
|
|
187
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
188
|
+
value = getattr(self, attr)
|
|
189
|
+
if isinstance(value, list):
|
|
190
|
+
result[attr] = list(map(
|
|
191
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
192
|
+
value
|
|
193
|
+
))
|
|
194
|
+
elif hasattr(value, "to_dict"):
|
|
195
|
+
result[attr] = value.to_dict()
|
|
196
|
+
elif isinstance(value, dict):
|
|
197
|
+
result[attr] = dict(map(
|
|
198
|
+
lambda item: (item[0], item[1].to_dict())
|
|
199
|
+
if hasattr(item[1], "to_dict") else item,
|
|
200
|
+
value.items()
|
|
201
|
+
))
|
|
202
|
+
else:
|
|
203
|
+
result[attr] = value
|
|
204
|
+
if issubclass(V1License, dict):
|
|
205
|
+
for key, value in self.items():
|
|
206
|
+
result[key] = value
|
|
207
|
+
|
|
208
|
+
return result
|
|
209
|
+
|
|
210
|
+
def to_str(self) -> str:
|
|
211
|
+
"""Returns the string representation of the model"""
|
|
212
|
+
return pprint.pformat(self.to_dict())
|
|
213
|
+
|
|
214
|
+
def __repr__(self) -> str:
|
|
215
|
+
"""For `print` and `pprint`"""
|
|
216
|
+
return self.to_str()
|
|
217
|
+
|
|
218
|
+
def __eq__(self, other: 'V1License') -> bool:
|
|
219
|
+
"""Returns true if both objects are equal"""
|
|
220
|
+
if not isinstance(other, V1License):
|
|
221
|
+
return False
|
|
222
|
+
|
|
223
|
+
return self.__dict__ == other.__dict__
|
|
224
|
+
|
|
225
|
+
def __ne__(self, other: 'V1License') -> bool:
|
|
226
|
+
"""Returns true if both objects are not equal"""
|
|
227
|
+
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 V1ListGroupPodMetricsResponse(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
|
+
'metrics': 'list[V1GroupPodMetrics]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'metrics': 'metrics'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, metrics: 'list[V1GroupPodMetrics]' =None): # noqa: E501
|
|
52
|
+
"""V1ListGroupPodMetricsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._metrics = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if metrics is not None:
|
|
56
|
+
self.metrics = metrics
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def metrics(self) -> 'list[V1GroupPodMetrics]':
|
|
60
|
+
"""Gets the metrics of this V1ListGroupPodMetricsResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The metrics of this V1ListGroupPodMetricsResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1GroupPodMetrics]
|
|
65
|
+
"""
|
|
66
|
+
return self._metrics
|
|
67
|
+
|
|
68
|
+
@metrics.setter
|
|
69
|
+
def metrics(self, metrics: 'list[V1GroupPodMetrics]'):
|
|
70
|
+
"""Sets the metrics of this V1ListGroupPodMetricsResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param metrics: The metrics of this V1ListGroupPodMetricsResponse. # noqa: E501
|
|
74
|
+
:type: list[V1GroupPodMetrics]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._metrics = metrics
|
|
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(V1ListGroupPodMetricsResponse, 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: 'V1ListGroupPodMetricsResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1ListGroupPodMetricsResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1ListGroupPodMetricsResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
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 V1ListIncidentMessagesResponse(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
|
+
'messages': 'list[V1IncidentMessage]',
|
|
45
|
+
'next_page_token': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'messages': 'messages',
|
|
50
|
+
'next_page_token': 'nextPageToken'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, messages: 'list[V1IncidentMessage]' =None, next_page_token: 'str' =None): # noqa: E501
|
|
54
|
+
"""V1ListIncidentMessagesResponse - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._messages = None
|
|
56
|
+
self._next_page_token = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if messages is not None:
|
|
59
|
+
self.messages = messages
|
|
60
|
+
if next_page_token is not None:
|
|
61
|
+
self.next_page_token = next_page_token
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def messages(self) -> 'list[V1IncidentMessage]':
|
|
65
|
+
"""Gets the messages of this V1ListIncidentMessagesResponse. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The messages of this V1ListIncidentMessagesResponse. # noqa: E501
|
|
69
|
+
:rtype: list[V1IncidentMessage]
|
|
70
|
+
"""
|
|
71
|
+
return self._messages
|
|
72
|
+
|
|
73
|
+
@messages.setter
|
|
74
|
+
def messages(self, messages: 'list[V1IncidentMessage]'):
|
|
75
|
+
"""Sets the messages of this V1ListIncidentMessagesResponse.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param messages: The messages of this V1ListIncidentMessagesResponse. # noqa: E501
|
|
79
|
+
:type: list[V1IncidentMessage]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._messages = messages
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def next_page_token(self) -> 'str':
|
|
86
|
+
"""Gets the next_page_token of this V1ListIncidentMessagesResponse. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The next_page_token of this V1ListIncidentMessagesResponse. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._next_page_token
|
|
93
|
+
|
|
94
|
+
@next_page_token.setter
|
|
95
|
+
def next_page_token(self, next_page_token: 'str'):
|
|
96
|
+
"""Sets the next_page_token of this V1ListIncidentMessagesResponse.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param next_page_token: The next_page_token of this V1ListIncidentMessagesResponse. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._next_page_token = next_page_token
|
|
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(V1ListIncidentMessagesResponse, 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: 'V1ListIncidentMessagesResponse') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1ListIncidentMessagesResponse):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1ListIncidentMessagesResponse') -> 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 V1ListIncidentsResponse(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
|
+
'incidents': 'list[V1Incident]',
|
|
45
|
+
'next_page_token': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'incidents': 'incidents',
|
|
50
|
+
'next_page_token': 'nextPageToken'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, incidents: 'list[V1Incident]' =None, next_page_token: 'str' =None): # noqa: E501
|
|
54
|
+
"""V1ListIncidentsResponse - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._incidents = None
|
|
56
|
+
self._next_page_token = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if incidents is not None:
|
|
59
|
+
self.incidents = incidents
|
|
60
|
+
if next_page_token is not None:
|
|
61
|
+
self.next_page_token = next_page_token
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def incidents(self) -> 'list[V1Incident]':
|
|
65
|
+
"""Gets the incidents of this V1ListIncidentsResponse. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The incidents of this V1ListIncidentsResponse. # noqa: E501
|
|
69
|
+
:rtype: list[V1Incident]
|
|
70
|
+
"""
|
|
71
|
+
return self._incidents
|
|
72
|
+
|
|
73
|
+
@incidents.setter
|
|
74
|
+
def incidents(self, incidents: 'list[V1Incident]'):
|
|
75
|
+
"""Sets the incidents of this V1ListIncidentsResponse.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param incidents: The incidents of this V1ListIncidentsResponse. # noqa: E501
|
|
79
|
+
:type: list[V1Incident]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._incidents = incidents
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def next_page_token(self) -> 'str':
|
|
86
|
+
"""Gets the next_page_token of this V1ListIncidentsResponse. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The next_page_token of this V1ListIncidentsResponse. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._next_page_token
|
|
93
|
+
|
|
94
|
+
@next_page_token.setter
|
|
95
|
+
def next_page_token(self, next_page_token: 'str'):
|
|
96
|
+
"""Sets the next_page_token of this V1ListIncidentsResponse.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param next_page_token: The next_page_token of this V1ListIncidentsResponse. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._next_page_token = next_page_token
|
|
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(V1ListIncidentsResponse, 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: 'V1ListIncidentsResponse') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1ListIncidentsResponse):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1ListIncidentsResponse') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|