lightning-sdk 0.2.5__py3-none-any.whl → 0.2.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/api/ai_hub_api.py +1 -0
- lightning_sdk/api/lit_container_api.py +84 -24
- lightning_sdk/api/teamspace_api.py +8 -9
- lightning_sdk/api/utils.py +0 -1
- lightning_sdk/cli/docker.py +1 -1
- lightning_sdk/cli/download.py +10 -2
- lightning_sdk/cli/serve.py +26 -19
- lightning_sdk/cli/upload.py +41 -6
- lightning_sdk/lightning_cloud/openapi/__init__.py +16 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +9 -9
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +202 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +15 -3
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +16 -0
- lightning_sdk/lightning_cloud/openapi/models/alerts_config_billing.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/alerts_config_studios.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cluster.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_alert_method.py +102 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_alerts_config.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_cold_start_metrics.py +617 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +131 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_conversation_response_chunk.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_server_alert_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +81 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +1 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_cold_start_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_message.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_metadata.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_stop_at_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reservation_details.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_phase.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_severity.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_subnet_spec.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +131 -79
- lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +29 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +1 -27
- lightning_sdk/lit_container.py +19 -4
- lightning_sdk/models.py +1 -1
- lightning_sdk/serve.py +86 -15
- lightning_sdk/teamspace.py +32 -18
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/RECORD +65 -49
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
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 V1ServerAlert(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
|
+
'message': 'str',
|
|
45
|
+
'phase': 'V1ServerAlertPhase',
|
|
46
|
+
'severity': 'V1ServerAlertSeverity',
|
|
47
|
+
'type': 'V1ServerAlertType'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
attribute_map = {
|
|
51
|
+
'message': 'message',
|
|
52
|
+
'phase': 'phase',
|
|
53
|
+
'severity': 'severity',
|
|
54
|
+
'type': 'type'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def __init__(self, message: 'str' =None, phase: 'V1ServerAlertPhase' =None, severity: 'V1ServerAlertSeverity' =None, type: 'V1ServerAlertType' =None): # noqa: E501
|
|
58
|
+
"""V1ServerAlert - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self._message = None
|
|
60
|
+
self._phase = None
|
|
61
|
+
self._severity = None
|
|
62
|
+
self._type = None
|
|
63
|
+
self.discriminator = None
|
|
64
|
+
if message is not None:
|
|
65
|
+
self.message = message
|
|
66
|
+
if phase is not None:
|
|
67
|
+
self.phase = phase
|
|
68
|
+
if severity is not None:
|
|
69
|
+
self.severity = severity
|
|
70
|
+
if type is not None:
|
|
71
|
+
self.type = type
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def message(self) -> 'str':
|
|
75
|
+
"""Gets the message of this V1ServerAlert. # noqa: E501
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:return: The message of this V1ServerAlert. # noqa: E501
|
|
79
|
+
:rtype: str
|
|
80
|
+
"""
|
|
81
|
+
return self._message
|
|
82
|
+
|
|
83
|
+
@message.setter
|
|
84
|
+
def message(self, message: 'str'):
|
|
85
|
+
"""Sets the message of this V1ServerAlert.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:param message: The message of this V1ServerAlert. # noqa: E501
|
|
89
|
+
:type: str
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
self._message = message
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def phase(self) -> 'V1ServerAlertPhase':
|
|
96
|
+
"""Gets the phase of this V1ServerAlert. # noqa: E501
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:return: The phase of this V1ServerAlert. # noqa: E501
|
|
100
|
+
:rtype: V1ServerAlertPhase
|
|
101
|
+
"""
|
|
102
|
+
return self._phase
|
|
103
|
+
|
|
104
|
+
@phase.setter
|
|
105
|
+
def phase(self, phase: 'V1ServerAlertPhase'):
|
|
106
|
+
"""Sets the phase of this V1ServerAlert.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
:param phase: The phase of this V1ServerAlert. # noqa: E501
|
|
110
|
+
:type: V1ServerAlertPhase
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
self._phase = phase
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def severity(self) -> 'V1ServerAlertSeverity':
|
|
117
|
+
"""Gets the severity of this V1ServerAlert. # noqa: E501
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
:return: The severity of this V1ServerAlert. # noqa: E501
|
|
121
|
+
:rtype: V1ServerAlertSeverity
|
|
122
|
+
"""
|
|
123
|
+
return self._severity
|
|
124
|
+
|
|
125
|
+
@severity.setter
|
|
126
|
+
def severity(self, severity: 'V1ServerAlertSeverity'):
|
|
127
|
+
"""Sets the severity of this V1ServerAlert.
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
:param severity: The severity of this V1ServerAlert. # noqa: E501
|
|
131
|
+
:type: V1ServerAlertSeverity
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
self._severity = severity
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def type(self) -> 'V1ServerAlertType':
|
|
138
|
+
"""Gets the type of this V1ServerAlert. # noqa: E501
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
:return: The type of this V1ServerAlert. # noqa: E501
|
|
142
|
+
:rtype: V1ServerAlertType
|
|
143
|
+
"""
|
|
144
|
+
return self._type
|
|
145
|
+
|
|
146
|
+
@type.setter
|
|
147
|
+
def type(self, type: 'V1ServerAlertType'):
|
|
148
|
+
"""Sets the type of this V1ServerAlert.
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:param type: The type of this V1ServerAlert. # noqa: E501
|
|
152
|
+
:type: V1ServerAlertType
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
self._type = type
|
|
156
|
+
|
|
157
|
+
def to_dict(self) -> dict:
|
|
158
|
+
"""Returns the model properties as a dict"""
|
|
159
|
+
result = {}
|
|
160
|
+
|
|
161
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
162
|
+
value = getattr(self, attr)
|
|
163
|
+
if isinstance(value, list):
|
|
164
|
+
result[attr] = list(map(
|
|
165
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
166
|
+
value
|
|
167
|
+
))
|
|
168
|
+
elif hasattr(value, "to_dict"):
|
|
169
|
+
result[attr] = value.to_dict()
|
|
170
|
+
elif isinstance(value, dict):
|
|
171
|
+
result[attr] = dict(map(
|
|
172
|
+
lambda item: (item[0], item[1].to_dict())
|
|
173
|
+
if hasattr(item[1], "to_dict") else item,
|
|
174
|
+
value.items()
|
|
175
|
+
))
|
|
176
|
+
else:
|
|
177
|
+
result[attr] = value
|
|
178
|
+
if issubclass(V1ServerAlert, dict):
|
|
179
|
+
for key, value in self.items():
|
|
180
|
+
result[key] = value
|
|
181
|
+
|
|
182
|
+
return result
|
|
183
|
+
|
|
184
|
+
def to_str(self) -> str:
|
|
185
|
+
"""Returns the string representation of the model"""
|
|
186
|
+
return pprint.pformat(self.to_dict())
|
|
187
|
+
|
|
188
|
+
def __repr__(self) -> str:
|
|
189
|
+
"""For `print` and `pprint`"""
|
|
190
|
+
return self.to_str()
|
|
191
|
+
|
|
192
|
+
def __eq__(self, other: 'V1ServerAlert') -> bool:
|
|
193
|
+
"""Returns true if both objects are equal"""
|
|
194
|
+
if not isinstance(other, V1ServerAlert):
|
|
195
|
+
return False
|
|
196
|
+
|
|
197
|
+
return self.__dict__ == other.__dict__
|
|
198
|
+
|
|
199
|
+
def __ne__(self, other: 'V1ServerAlert') -> bool:
|
|
200
|
+
"""Returns true if both objects are not equal"""
|
|
201
|
+
return not self == other
|
|
@@ -0,0 +1,104 @@
|
|
|
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 V1ServerAlertPhase(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 = "SERVER_ALERT_PHASE_UNSPECIFIED"
|
|
41
|
+
STARTUP = "SERVER_ALERT_PHASE_STARTUP"
|
|
42
|
+
SHUTDOWN = "SERVER_ALERT_PHASE_SHUTDOWN"
|
|
43
|
+
"""
|
|
44
|
+
Attributes:
|
|
45
|
+
swagger_types (dict): The key is attribute name
|
|
46
|
+
and the value is attribute type.
|
|
47
|
+
attribute_map (dict): The key is attribute name
|
|
48
|
+
and the value is json key in definition.
|
|
49
|
+
"""
|
|
50
|
+
swagger_types = {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
attribute_map = {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
def __init__(self): # noqa: E501
|
|
57
|
+
"""V1ServerAlertPhase - a model defined in Swagger""" # noqa: E501
|
|
58
|
+
self.discriminator = None
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> dict:
|
|
61
|
+
"""Returns the model properties as a dict"""
|
|
62
|
+
result = {}
|
|
63
|
+
|
|
64
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
65
|
+
value = getattr(self, attr)
|
|
66
|
+
if isinstance(value, list):
|
|
67
|
+
result[attr] = list(map(
|
|
68
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
69
|
+
value
|
|
70
|
+
))
|
|
71
|
+
elif hasattr(value, "to_dict"):
|
|
72
|
+
result[attr] = value.to_dict()
|
|
73
|
+
elif isinstance(value, dict):
|
|
74
|
+
result[attr] = dict(map(
|
|
75
|
+
lambda item: (item[0], item[1].to_dict())
|
|
76
|
+
if hasattr(item[1], "to_dict") else item,
|
|
77
|
+
value.items()
|
|
78
|
+
))
|
|
79
|
+
else:
|
|
80
|
+
result[attr] = value
|
|
81
|
+
if issubclass(V1ServerAlertPhase, dict):
|
|
82
|
+
for key, value in self.items():
|
|
83
|
+
result[key] = value
|
|
84
|
+
|
|
85
|
+
return result
|
|
86
|
+
|
|
87
|
+
def to_str(self) -> str:
|
|
88
|
+
"""Returns the string representation of the model"""
|
|
89
|
+
return pprint.pformat(self.to_dict())
|
|
90
|
+
|
|
91
|
+
def __repr__(self) -> str:
|
|
92
|
+
"""For `print` and `pprint`"""
|
|
93
|
+
return self.to_str()
|
|
94
|
+
|
|
95
|
+
def __eq__(self, other: 'V1ServerAlertPhase') -> bool:
|
|
96
|
+
"""Returns true if both objects are equal"""
|
|
97
|
+
if not isinstance(other, V1ServerAlertPhase):
|
|
98
|
+
return False
|
|
99
|
+
|
|
100
|
+
return self.__dict__ == other.__dict__
|
|
101
|
+
|
|
102
|
+
def __ne__(self, other: 'V1ServerAlertPhase') -> bool:
|
|
103
|
+
"""Returns true if both objects are not equal"""
|
|
104
|
+
return not self == other
|
|
@@ -0,0 +1,103 @@
|
|
|
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 V1ServerAlertSeverity(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
|
+
ERROR = "SERVER_ALERT_SEVERITY_ERROR"
|
|
41
|
+
WARNING = "SERVER_ALERT_SEVERITY_WARNING"
|
|
42
|
+
"""
|
|
43
|
+
Attributes:
|
|
44
|
+
swagger_types (dict): The key is attribute name
|
|
45
|
+
and the value is attribute type.
|
|
46
|
+
attribute_map (dict): The key is attribute name
|
|
47
|
+
and the value is json key in definition.
|
|
48
|
+
"""
|
|
49
|
+
swagger_types = {
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
attribute_map = {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
def __init__(self): # noqa: E501
|
|
56
|
+
"""V1ServerAlertSeverity - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> dict:
|
|
60
|
+
"""Returns the model properties as a dict"""
|
|
61
|
+
result = {}
|
|
62
|
+
|
|
63
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
64
|
+
value = getattr(self, attr)
|
|
65
|
+
if isinstance(value, list):
|
|
66
|
+
result[attr] = list(map(
|
|
67
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
68
|
+
value
|
|
69
|
+
))
|
|
70
|
+
elif hasattr(value, "to_dict"):
|
|
71
|
+
result[attr] = value.to_dict()
|
|
72
|
+
elif isinstance(value, dict):
|
|
73
|
+
result[attr] = dict(map(
|
|
74
|
+
lambda item: (item[0], item[1].to_dict())
|
|
75
|
+
if hasattr(item[1], "to_dict") else item,
|
|
76
|
+
value.items()
|
|
77
|
+
))
|
|
78
|
+
else:
|
|
79
|
+
result[attr] = value
|
|
80
|
+
if issubclass(V1ServerAlertSeverity, dict):
|
|
81
|
+
for key, value in self.items():
|
|
82
|
+
result[key] = value
|
|
83
|
+
|
|
84
|
+
return result
|
|
85
|
+
|
|
86
|
+
def to_str(self) -> str:
|
|
87
|
+
"""Returns the string representation of the model"""
|
|
88
|
+
return pprint.pformat(self.to_dict())
|
|
89
|
+
|
|
90
|
+
def __repr__(self) -> str:
|
|
91
|
+
"""For `print` and `pprint`"""
|
|
92
|
+
return self.to_str()
|
|
93
|
+
|
|
94
|
+
def __eq__(self, other: 'V1ServerAlertSeverity') -> bool:
|
|
95
|
+
"""Returns true if both objects are equal"""
|
|
96
|
+
if not isinstance(other, V1ServerAlertSeverity):
|
|
97
|
+
return False
|
|
98
|
+
|
|
99
|
+
return self.__dict__ == other.__dict__
|
|
100
|
+
|
|
101
|
+
def __ne__(self, other: 'V1ServerAlertSeverity') -> bool:
|
|
102
|
+
"""Returns true if both objects are not equal"""
|
|
103
|
+
return not self == other
|
|
@@ -0,0 +1,105 @@
|
|
|
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 V1ServerAlertType(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
|
+
INTERNAL = "SERVER_ALERT_TYPE_INTERNAL"
|
|
41
|
+
APT_RESTORE = "SERVER_ALERT_TYPE_APT_RESTORE"
|
|
42
|
+
CONDA_RESTORE = "SERVER_ALERT_TYPE_CONDA_RESTORE"
|
|
43
|
+
SETTINGS_RESTORE = "SERVER_ALERT_TYPE_SETTINGS_RESTORE"
|
|
44
|
+
"""
|
|
45
|
+
Attributes:
|
|
46
|
+
swagger_types (dict): The key is attribute name
|
|
47
|
+
and the value is attribute type.
|
|
48
|
+
attribute_map (dict): The key is attribute name
|
|
49
|
+
and the value is json key in definition.
|
|
50
|
+
"""
|
|
51
|
+
swagger_types = {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
attribute_map = {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def __init__(self): # noqa: E501
|
|
58
|
+
"""V1ServerAlertType - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> dict:
|
|
62
|
+
"""Returns the model properties as a dict"""
|
|
63
|
+
result = {}
|
|
64
|
+
|
|
65
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
66
|
+
value = getattr(self, attr)
|
|
67
|
+
if isinstance(value, list):
|
|
68
|
+
result[attr] = list(map(
|
|
69
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
70
|
+
value
|
|
71
|
+
))
|
|
72
|
+
elif hasattr(value, "to_dict"):
|
|
73
|
+
result[attr] = value.to_dict()
|
|
74
|
+
elif isinstance(value, dict):
|
|
75
|
+
result[attr] = dict(map(
|
|
76
|
+
lambda item: (item[0], item[1].to_dict())
|
|
77
|
+
if hasattr(item[1], "to_dict") else item,
|
|
78
|
+
value.items()
|
|
79
|
+
))
|
|
80
|
+
else:
|
|
81
|
+
result[attr] = value
|
|
82
|
+
if issubclass(V1ServerAlertType, dict):
|
|
83
|
+
for key, value in self.items():
|
|
84
|
+
result[key] = value
|
|
85
|
+
|
|
86
|
+
return result
|
|
87
|
+
|
|
88
|
+
def to_str(self) -> str:
|
|
89
|
+
"""Returns the string representation of the model"""
|
|
90
|
+
return pprint.pformat(self.to_dict())
|
|
91
|
+
|
|
92
|
+
def __repr__(self) -> str:
|
|
93
|
+
"""For `print` and `pprint`"""
|
|
94
|
+
return self.to_str()
|
|
95
|
+
|
|
96
|
+
def __eq__(self, other: 'V1ServerAlertType') -> bool:
|
|
97
|
+
"""Returns true if both objects are equal"""
|
|
98
|
+
if not isinstance(other, V1ServerAlertType):
|
|
99
|
+
return False
|
|
100
|
+
|
|
101
|
+
return self.__dict__ == other.__dict__
|
|
102
|
+
|
|
103
|
+
def __ne__(self, other: 'V1ServerAlertType') -> bool:
|
|
104
|
+
"""Returns true if both objects are not equal"""
|
|
105
|
+
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 V1SubnetSpec(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
|
+
'cidr_range': 'str',
|
|
45
|
+
'region': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'cidr_range': 'cidrRange',
|
|
50
|
+
'region': 'region'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, cidr_range: 'str' =None, region: 'str' =None): # noqa: E501
|
|
54
|
+
"""V1SubnetSpec - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._cidr_range = None
|
|
56
|
+
self._region = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if cidr_range is not None:
|
|
59
|
+
self.cidr_range = cidr_range
|
|
60
|
+
if region is not None:
|
|
61
|
+
self.region = region
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def cidr_range(self) -> 'str':
|
|
65
|
+
"""Gets the cidr_range of this V1SubnetSpec. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The cidr_range of this V1SubnetSpec. # noqa: E501
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._cidr_range
|
|
72
|
+
|
|
73
|
+
@cidr_range.setter
|
|
74
|
+
def cidr_range(self, cidr_range: 'str'):
|
|
75
|
+
"""Sets the cidr_range of this V1SubnetSpec.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param cidr_range: The cidr_range of this V1SubnetSpec. # noqa: E501
|
|
79
|
+
:type: str
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._cidr_range = cidr_range
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def region(self) -> 'str':
|
|
86
|
+
"""Gets the region of this V1SubnetSpec. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The region of this V1SubnetSpec. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._region
|
|
93
|
+
|
|
94
|
+
@region.setter
|
|
95
|
+
def region(self, region: 'str'):
|
|
96
|
+
"""Sets the region of this V1SubnetSpec.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param region: The region of this V1SubnetSpec. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._region = region
|
|
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(V1SubnetSpec, 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: 'V1SubnetSpec') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1SubnetSpec):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1SubnetSpec') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|