lightning-sdk 0.2.5__py3-none-any.whl → 0.2.6__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 (40) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/cli/serve.py +29 -9
  3. lightning_sdk/lightning_cloud/openapi/__init__.py +8 -0
  4. lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +9 -9
  5. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
  6. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +15 -3
  7. lightning_sdk/lightning_cloud/openapi/models/__init__.py +8 -0
  8. lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +27 -1
  9. lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
  10. lightning_sdk/lightning_cloud/openapi/models/externalv1_cluster.py +27 -1
  11. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
  12. lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +175 -0
  13. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
  14. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +123 -0
  15. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  16. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +131 -1
  17. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +27 -1
  18. lightning_sdk/lightning_cloud/openapi/models/v1_create_server_alert_response.py +97 -0
  19. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +55 -3
  21. lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +1 -29
  22. lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +27 -1
  23. lightning_sdk/lightning_cloud/openapi/models/v1_metadata.py +27 -1
  24. lightning_sdk/lightning_cloud/openapi/models/v1_reservation_details.py +201 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +175 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_severity.py +103 -0
  28. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +105 -0
  29. lightning_sdk/lightning_cloud/openapi/models/v1_subnet_spec.py +149 -0
  30. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +79 -79
  31. lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +29 -29
  32. lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +1 -27
  33. lightning_sdk/lightning_cloud/rest_client.py +44 -42
  34. lightning_sdk/serve.py +5 -3
  35. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/METADATA +1 -1
  36. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/RECORD +40 -32
  37. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/LICENSE +0 -0
  38. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/WHEEL +0 -0
  39. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/entry_points.txt +0 -0
  40. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/top_level.txt +0 -0
@@ -42,6 +42,7 @@ class V1ListLitRegistryRepositoryImageArtifactVersionsResponse(object):
42
42
  """
43
43
  swagger_types = {
44
44
  'artifacts': 'list[V1LitRegistryArtifact]',
45
+ 'cluster_id': 'str',
45
46
  'latest_artifact': 'V1LitRegistryArtifact',
46
47
  'latest_tag_name': 'str',
47
48
  'lit_repo_name': 'str',
@@ -50,15 +51,17 @@ class V1ListLitRegistryRepositoryImageArtifactVersionsResponse(object):
50
51
 
51
52
  attribute_map = {
52
53
  'artifacts': 'artifacts',
54
+ 'cluster_id': 'clusterId',
53
55
  'latest_artifact': 'latestArtifact',
54
56
  'latest_tag_name': 'latestTagName',
55
57
  'lit_repo_name': 'litRepoName',
56
58
  'project_id': 'projectId'
57
59
  }
58
60
 
59
- def __init__(self, artifacts: 'list[V1LitRegistryArtifact]' =None, latest_artifact: 'V1LitRegistryArtifact' =None, latest_tag_name: 'str' =None, lit_repo_name: 'str' =None, project_id: 'str' =None): # noqa: E501
61
+ def __init__(self, artifacts: 'list[V1LitRegistryArtifact]' =None, cluster_id: 'str' =None, latest_artifact: 'V1LitRegistryArtifact' =None, latest_tag_name: 'str' =None, lit_repo_name: 'str' =None, project_id: 'str' =None): # noqa: E501
60
62
  """V1ListLitRegistryRepositoryImageArtifactVersionsResponse - a model defined in Swagger""" # noqa: E501
61
63
  self._artifacts = None
64
+ self._cluster_id = None
62
65
  self._latest_artifact = None
63
66
  self._latest_tag_name = None
64
67
  self._lit_repo_name = None
@@ -66,6 +69,8 @@ class V1ListLitRegistryRepositoryImageArtifactVersionsResponse(object):
66
69
  self.discriminator = None
67
70
  if artifacts is not None:
68
71
  self.artifacts = artifacts
72
+ if cluster_id is not None:
73
+ self.cluster_id = cluster_id
69
74
  if latest_artifact is not None:
70
75
  self.latest_artifact = latest_artifact
71
76
  if latest_tag_name is not None:
@@ -98,6 +103,27 @@ class V1ListLitRegistryRepositoryImageArtifactVersionsResponse(object):
98
103
 
99
104
  self._artifacts = artifacts
100
105
 
106
+ @property
107
+ def cluster_id(self) -> 'str':
108
+ """Gets the cluster_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
109
+
110
+
111
+ :return: The cluster_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
112
+ :rtype: str
113
+ """
114
+ return self._cluster_id
115
+
116
+ @cluster_id.setter
117
+ def cluster_id(self, cluster_id: 'str'):
118
+ """Sets the cluster_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse.
119
+
120
+
121
+ :param cluster_id: The cluster_id of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
122
+ :type: str
123
+ """
124
+
125
+ self._cluster_id = cluster_id
126
+
101
127
  @property
102
128
  def latest_artifact(self) -> 'V1LitRegistryArtifact':
103
129
  """Gets the latest_artifact of this V1ListLitRegistryRepositoryImageArtifactVersionsResponse. # noqa: E501
@@ -56,6 +56,7 @@ class V1Metadata(object):
56
56
  'name': 'str',
57
57
  'org_id': 'str',
58
58
  'project_id': 'str',
59
+ 'protected': 'bool',
59
60
  'resource_version': 'str',
60
61
  'updated_at': 'datetime'
61
62
  }
@@ -76,11 +77,12 @@ class V1Metadata(object):
76
77
  'name': 'name',
77
78
  'org_id': 'orgId',
78
79
  'project_id': 'projectId',
80
+ 'protected': 'protected',
79
81
  'resource_version': 'resourceVersion',
80
82
  'updated_at': 'updatedAt'
81
83
  }
82
84
 
83
- def __init__(self, annotations: 'dict(str, str)' =None, cluster_id: 'str' =None, creation_timestamp: 'datetime' =None, deletion_timestamp: 'datetime' =None, deployment_id: 'str' =None, display_name: 'str' =None, finalizers: 'list[str]' =None, id: 'str' =None, labels: 'dict(str, str)' =None, last_updated_by_user_at: 'datetime' =None, linked_project_id: 'str' =None, linked_user_id: 'str' =None, name: 'str' =None, org_id: 'str' =None, project_id: 'str' =None, resource_version: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
85
+ def __init__(self, annotations: 'dict(str, str)' =None, cluster_id: 'str' =None, creation_timestamp: 'datetime' =None, deletion_timestamp: 'datetime' =None, deployment_id: 'str' =None, display_name: 'str' =None, finalizers: 'list[str]' =None, id: 'str' =None, labels: 'dict(str, str)' =None, last_updated_by_user_at: 'datetime' =None, linked_project_id: 'str' =None, linked_user_id: 'str' =None, name: 'str' =None, org_id: 'str' =None, project_id: 'str' =None, protected: 'bool' =None, resource_version: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
84
86
  """V1Metadata - a model defined in Swagger""" # noqa: E501
85
87
  self._annotations = None
86
88
  self._cluster_id = None
@@ -97,6 +99,7 @@ class V1Metadata(object):
97
99
  self._name = None
98
100
  self._org_id = None
99
101
  self._project_id = None
102
+ self._protected = None
100
103
  self._resource_version = None
101
104
  self._updated_at = None
102
105
  self.discriminator = None
@@ -130,6 +133,8 @@ class V1Metadata(object):
130
133
  self.org_id = org_id
131
134
  if project_id is not None:
132
135
  self.project_id = project_id
136
+ if protected is not None:
137
+ self.protected = protected
133
138
  if resource_version is not None:
134
139
  self.resource_version = resource_version
135
140
  if updated_at is not None:
@@ -452,6 +457,27 @@ class V1Metadata(object):
452
457
 
453
458
  self._project_id = project_id
454
459
 
460
+ @property
461
+ def protected(self) -> 'bool':
462
+ """Gets the protected of this V1Metadata. # noqa: E501
463
+
464
+
465
+ :return: The protected of this V1Metadata. # noqa: E501
466
+ :rtype: bool
467
+ """
468
+ return self._protected
469
+
470
+ @protected.setter
471
+ def protected(self, protected: 'bool'):
472
+ """Sets the protected of this V1Metadata.
473
+
474
+
475
+ :param protected: The protected of this V1Metadata. # noqa: E501
476
+ :type: bool
477
+ """
478
+
479
+ self._protected = protected
480
+
455
481
  @property
456
482
  def resource_version(self) -> 'str':
457
483
  """Gets the resource_version of this V1Metadata. # noqa: E501
@@ -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 V1ReservationDetails(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
+ 'cost_per_hour': 'float',
45
+ 'end_time': 'datetime',
46
+ 'name': 'str',
47
+ 'start_time': 'datetime'
48
+ }
49
+
50
+ attribute_map = {
51
+ 'cost_per_hour': 'costPerHour',
52
+ 'end_time': 'endTime',
53
+ 'name': 'name',
54
+ 'start_time': 'startTime'
55
+ }
56
+
57
+ def __init__(self, cost_per_hour: 'float' =None, end_time: 'datetime' =None, name: 'str' =None, start_time: 'datetime' =None): # noqa: E501
58
+ """V1ReservationDetails - a model defined in Swagger""" # noqa: E501
59
+ self._cost_per_hour = None
60
+ self._end_time = None
61
+ self._name = None
62
+ self._start_time = None
63
+ self.discriminator = None
64
+ if cost_per_hour is not None:
65
+ self.cost_per_hour = cost_per_hour
66
+ if end_time is not None:
67
+ self.end_time = end_time
68
+ if name is not None:
69
+ self.name = name
70
+ if start_time is not None:
71
+ self.start_time = start_time
72
+
73
+ @property
74
+ def cost_per_hour(self) -> 'float':
75
+ """Gets the cost_per_hour of this V1ReservationDetails. # noqa: E501
76
+
77
+
78
+ :return: The cost_per_hour of this V1ReservationDetails. # noqa: E501
79
+ :rtype: float
80
+ """
81
+ return self._cost_per_hour
82
+
83
+ @cost_per_hour.setter
84
+ def cost_per_hour(self, cost_per_hour: 'float'):
85
+ """Sets the cost_per_hour of this V1ReservationDetails.
86
+
87
+
88
+ :param cost_per_hour: The cost_per_hour of this V1ReservationDetails. # noqa: E501
89
+ :type: float
90
+ """
91
+
92
+ self._cost_per_hour = cost_per_hour
93
+
94
+ @property
95
+ def end_time(self) -> 'datetime':
96
+ """Gets the end_time of this V1ReservationDetails. # noqa: E501
97
+
98
+
99
+ :return: The end_time of this V1ReservationDetails. # noqa: E501
100
+ :rtype: datetime
101
+ """
102
+ return self._end_time
103
+
104
+ @end_time.setter
105
+ def end_time(self, end_time: 'datetime'):
106
+ """Sets the end_time of this V1ReservationDetails.
107
+
108
+
109
+ :param end_time: The end_time of this V1ReservationDetails. # noqa: E501
110
+ :type: datetime
111
+ """
112
+
113
+ self._end_time = end_time
114
+
115
+ @property
116
+ def name(self) -> 'str':
117
+ """Gets the name of this V1ReservationDetails. # noqa: E501
118
+
119
+
120
+ :return: The name of this V1ReservationDetails. # noqa: E501
121
+ :rtype: str
122
+ """
123
+ return self._name
124
+
125
+ @name.setter
126
+ def name(self, name: 'str'):
127
+ """Sets the name of this V1ReservationDetails.
128
+
129
+
130
+ :param name: The name of this V1ReservationDetails. # noqa: E501
131
+ :type: str
132
+ """
133
+
134
+ self._name = name
135
+
136
+ @property
137
+ def start_time(self) -> 'datetime':
138
+ """Gets the start_time of this V1ReservationDetails. # noqa: E501
139
+
140
+
141
+ :return: The start_time of this V1ReservationDetails. # noqa: E501
142
+ :rtype: datetime
143
+ """
144
+ return self._start_time
145
+
146
+ @start_time.setter
147
+ def start_time(self, start_time: 'datetime'):
148
+ """Sets the start_time of this V1ReservationDetails.
149
+
150
+
151
+ :param start_time: The start_time of this V1ReservationDetails. # noqa: E501
152
+ :type: datetime
153
+ """
154
+
155
+ self._start_time = start_time
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(V1ReservationDetails, 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: 'V1ReservationDetails') -> bool:
193
+ """Returns true if both objects are equal"""
194
+ if not isinstance(other, V1ReservationDetails):
195
+ return False
196
+
197
+ return self.__dict__ == other.__dict__
198
+
199
+ def __ne__(self, other: 'V1ReservationDetails') -> bool:
200
+ """Returns true if both objects are not equal"""
201
+ return not self == other
@@ -75,6 +75,7 @@ class V1RuleResource(object):
75
75
  MULTIMACHINEJOB = "multiMachineJob"
76
76
  LITLOGGER = "litLogger"
77
77
  PIPELINE = "pipeline"
78
+ CLOUDSPACEENVIRONMENTTEMPLATE = "cloudSpaceEnvironmentTemplate"
78
79
  """
79
80
  Attributes:
80
81
  swagger_types (dict): The key is attribute name
@@ -0,0 +1,175 @@
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
+ 'severity': 'V1ServerAlertSeverity',
46
+ 'type': 'V1ServerAlertType'
47
+ }
48
+
49
+ attribute_map = {
50
+ 'message': 'message',
51
+ 'severity': 'severity',
52
+ 'type': 'type'
53
+ }
54
+
55
+ def __init__(self, message: 'str' =None, severity: 'V1ServerAlertSeverity' =None, type: 'V1ServerAlertType' =None): # noqa: E501
56
+ """V1ServerAlert - a model defined in Swagger""" # noqa: E501
57
+ self._message = None
58
+ self._severity = None
59
+ self._type = None
60
+ self.discriminator = None
61
+ if message is not None:
62
+ self.message = message
63
+ if severity is not None:
64
+ self.severity = severity
65
+ if type is not None:
66
+ self.type = type
67
+
68
+ @property
69
+ def message(self) -> 'str':
70
+ """Gets the message of this V1ServerAlert. # noqa: E501
71
+
72
+
73
+ :return: The message of this V1ServerAlert. # noqa: E501
74
+ :rtype: str
75
+ """
76
+ return self._message
77
+
78
+ @message.setter
79
+ def message(self, message: 'str'):
80
+ """Sets the message of this V1ServerAlert.
81
+
82
+
83
+ :param message: The message of this V1ServerAlert. # noqa: E501
84
+ :type: str
85
+ """
86
+
87
+ self._message = message
88
+
89
+ @property
90
+ def severity(self) -> 'V1ServerAlertSeverity':
91
+ """Gets the severity of this V1ServerAlert. # noqa: E501
92
+
93
+
94
+ :return: The severity of this V1ServerAlert. # noqa: E501
95
+ :rtype: V1ServerAlertSeverity
96
+ """
97
+ return self._severity
98
+
99
+ @severity.setter
100
+ def severity(self, severity: 'V1ServerAlertSeverity'):
101
+ """Sets the severity of this V1ServerAlert.
102
+
103
+
104
+ :param severity: The severity of this V1ServerAlert. # noqa: E501
105
+ :type: V1ServerAlertSeverity
106
+ """
107
+
108
+ self._severity = severity
109
+
110
+ @property
111
+ def type(self) -> 'V1ServerAlertType':
112
+ """Gets the type of this V1ServerAlert. # noqa: E501
113
+
114
+
115
+ :return: The type of this V1ServerAlert. # noqa: E501
116
+ :rtype: V1ServerAlertType
117
+ """
118
+ return self._type
119
+
120
+ @type.setter
121
+ def type(self, type: 'V1ServerAlertType'):
122
+ """Sets the type of this V1ServerAlert.
123
+
124
+
125
+ :param type: The type of this V1ServerAlert. # noqa: E501
126
+ :type: V1ServerAlertType
127
+ """
128
+
129
+ self._type = type
130
+
131
+ def to_dict(self) -> dict:
132
+ """Returns the model properties as a dict"""
133
+ result = {}
134
+
135
+ for attr, _ in six.iteritems(self.swagger_types):
136
+ value = getattr(self, attr)
137
+ if isinstance(value, list):
138
+ result[attr] = list(map(
139
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
+ value
141
+ ))
142
+ elif hasattr(value, "to_dict"):
143
+ result[attr] = value.to_dict()
144
+ elif isinstance(value, dict):
145
+ result[attr] = dict(map(
146
+ lambda item: (item[0], item[1].to_dict())
147
+ if hasattr(item[1], "to_dict") else item,
148
+ value.items()
149
+ ))
150
+ else:
151
+ result[attr] = value
152
+ if issubclass(V1ServerAlert, dict):
153
+ for key, value in self.items():
154
+ result[key] = value
155
+
156
+ return result
157
+
158
+ def to_str(self) -> str:
159
+ """Returns the string representation of the model"""
160
+ return pprint.pformat(self.to_dict())
161
+
162
+ def __repr__(self) -> str:
163
+ """For `print` and `pprint`"""
164
+ return self.to_str()
165
+
166
+ def __eq__(self, other: 'V1ServerAlert') -> bool:
167
+ """Returns true if both objects are equal"""
168
+ if not isinstance(other, V1ServerAlert):
169
+ return False
170
+
171
+ return self.__dict__ == other.__dict__
172
+
173
+ def __ne__(self, other: 'V1ServerAlert') -> bool:
174
+ """Returns true if both objects are not equal"""
175
+ 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