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.
Files changed (65) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/ai_hub_api.py +1 -0
  3. lightning_sdk/api/lit_container_api.py +84 -24
  4. lightning_sdk/api/teamspace_api.py +8 -9
  5. lightning_sdk/api/utils.py +0 -1
  6. lightning_sdk/cli/docker.py +1 -1
  7. lightning_sdk/cli/download.py +10 -2
  8. lightning_sdk/cli/serve.py +26 -19
  9. lightning_sdk/cli/upload.py +41 -6
  10. lightning_sdk/lightning_cloud/openapi/__init__.py +16 -0
  11. lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +9 -9
  12. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +202 -0
  13. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
  14. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +15 -3
  15. lightning_sdk/lightning_cloud/openapi/models/__init__.py +16 -0
  16. lightning_sdk/lightning_cloud/openapi/models/alerts_config_billing.py +175 -0
  17. lightning_sdk/lightning_cloud/openapi/models/alerts_config_studios.py +149 -0
  18. lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/externalv1_cluster.py +27 -1
  21. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +53 -1
  22. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
  23. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  24. lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +201 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_alert_method.py +102 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_alerts_config.py +149 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_cold_start_metrics.py +617 -0
  28. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
  29. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +123 -0
  30. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
  31. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +131 -1
  32. lightning_sdk/lightning_cloud/openapi/models/v1_conversation_response_chunk.py +29 -3
  33. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/v1_create_server_alert_response.py +97 -0
  36. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  37. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +81 -3
  38. lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +1 -29
  39. lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_cold_start_metrics_response.py +123 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +27 -1
  41. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +29 -3
  42. lightning_sdk/lightning_cloud/openapi/models/v1_metadata.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +53 -1
  44. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
  45. lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_stop_at_response.py +97 -0
  46. lightning_sdk/lightning_cloud/openapi/models/v1_reservation_details.py +201 -0
  47. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +201 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_phase.py +104 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_severity.py +103 -0
  51. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +105 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_subnet_spec.py +149 -0
  53. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +131 -79
  54. lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +29 -29
  55. lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +1 -27
  56. lightning_sdk/lit_container.py +19 -4
  57. lightning_sdk/models.py +1 -1
  58. lightning_sdk/serve.py +86 -15
  59. lightning_sdk/teamspace.py +32 -18
  60. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/METADATA +1 -1
  61. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/RECORD +65 -49
  62. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/LICENSE +0 -0
  63. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/WHEEL +0 -0
  64. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/entry_points.txt +0 -0
  65. {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.7.dist-info}/top_level.txt +0 -0
@@ -42,6 +42,7 @@ class ProjectIdCloudspacesBody(object):
42
42
  """
43
43
  swagger_types = {
44
44
  'can_download_source_code': 'bool',
45
+ 'cloud_space_environment_template_id': 'str',
45
46
  'cloud_space_instance_cpu_image_override': 'str',
46
47
  'cloud_space_instance_gpu_image_override': 'str',
47
48
  'cluster_id': 'str',
@@ -59,6 +60,7 @@ class ProjectIdCloudspacesBody(object):
59
60
 
60
61
  attribute_map = {
61
62
  'can_download_source_code': 'canDownloadSourceCode',
63
+ 'cloud_space_environment_template_id': 'cloudSpaceEnvironmentTemplateId',
62
64
  'cloud_space_instance_cpu_image_override': 'cloudSpaceInstanceCpuImageOverride',
63
65
  'cloud_space_instance_gpu_image_override': 'cloudSpaceInstanceGpuImageOverride',
64
66
  'cluster_id': 'clusterId',
@@ -74,9 +76,10 @@ class ProjectIdCloudspacesBody(object):
74
76
  'spot': 'spot'
75
77
  }
76
78
 
77
- def __init__(self, can_download_source_code: 'bool' =None, cloud_space_instance_cpu_image_override: 'str' =None, cloud_space_instance_gpu_image_override: 'str' =None, cluster_id: 'str' =None, compute_name: 'str' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, disk_size: 'str' =None, display_name: 'str' =None, name: 'str' =None, plugins: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, same_compute_on_resume: 'bool' =None, seed_files: 'list[V1CloudSpaceSeedFile]' =None, spot: 'bool' =None): # noqa: E501
79
+ def __init__(self, can_download_source_code: 'bool' =None, cloud_space_environment_template_id: 'str' =None, cloud_space_instance_cpu_image_override: 'str' =None, cloud_space_instance_gpu_image_override: 'str' =None, cluster_id: 'str' =None, compute_name: 'str' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, disk_size: 'str' =None, display_name: 'str' =None, name: 'str' =None, plugins: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, same_compute_on_resume: 'bool' =None, seed_files: 'list[V1CloudSpaceSeedFile]' =None, spot: 'bool' =None): # noqa: E501
78
80
  """ProjectIdCloudspacesBody - a model defined in Swagger""" # noqa: E501
79
81
  self._can_download_source_code = None
82
+ self._cloud_space_environment_template_id = None
80
83
  self._cloud_space_instance_cpu_image_override = None
81
84
  self._cloud_space_instance_gpu_image_override = None
82
85
  self._cluster_id = None
@@ -93,6 +96,8 @@ class ProjectIdCloudspacesBody(object):
93
96
  self.discriminator = None
94
97
  if can_download_source_code is not None:
95
98
  self.can_download_source_code = can_download_source_code
99
+ if cloud_space_environment_template_id is not None:
100
+ self.cloud_space_environment_template_id = cloud_space_environment_template_id
96
101
  if cloud_space_instance_cpu_image_override is not None:
97
102
  self.cloud_space_instance_cpu_image_override = cloud_space_instance_cpu_image_override
98
103
  if cloud_space_instance_gpu_image_override is not None:
@@ -141,6 +146,27 @@ class ProjectIdCloudspacesBody(object):
141
146
 
142
147
  self._can_download_source_code = can_download_source_code
143
148
 
149
+ @property
150
+ def cloud_space_environment_template_id(self) -> 'str':
151
+ """Gets the cloud_space_environment_template_id of this ProjectIdCloudspacesBody. # noqa: E501
152
+
153
+
154
+ :return: The cloud_space_environment_template_id of this ProjectIdCloudspacesBody. # noqa: E501
155
+ :rtype: str
156
+ """
157
+ return self._cloud_space_environment_template_id
158
+
159
+ @cloud_space_environment_template_id.setter
160
+ def cloud_space_environment_template_id(self, cloud_space_environment_template_id: 'str'):
161
+ """Sets the cloud_space_environment_template_id of this ProjectIdCloudspacesBody.
162
+
163
+
164
+ :param cloud_space_environment_template_id: The cloud_space_environment_template_id of this ProjectIdCloudspacesBody. # noqa: E501
165
+ :type: str
166
+ """
167
+
168
+ self._cloud_space_environment_template_id = cloud_space_environment_template_id
169
+
144
170
  @property
145
171
  def cloud_space_instance_cpu_image_override(self) -> 'str':
146
172
  """Gets the cloud_space_instance_cpu_image_override of this ProjectIdCloudspacesBody. # noqa: E501
@@ -45,6 +45,7 @@ class ProjectsIdBody(object):
45
45
  'allow_gcp_saas': 'bool',
46
46
  'allow_lambda_saas': 'bool',
47
47
  'allow_vultr_saas': 'bool',
48
+ 'default_machine_type': 'str',
48
49
  'description': 'str',
49
50
  'display_name': 'str',
50
51
  'name': 'str',
@@ -61,6 +62,7 @@ class ProjectsIdBody(object):
61
62
  'allow_gcp_saas': 'allowGcpSaas',
62
63
  'allow_lambda_saas': 'allowLambdaSaas',
63
64
  'allow_vultr_saas': 'allowVultrSaas',
65
+ 'default_machine_type': 'defaultMachineType',
64
66
  'description': 'description',
65
67
  'display_name': 'displayName',
66
68
  'name': 'name',
@@ -72,12 +74,13 @@ class ProjectsIdBody(object):
72
74
  'start_studio_on_spot_instance': 'startStudioOnSpotInstance'
73
75
  }
74
76
 
75
- def __init__(self, allow_aws_saas: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, description: 'str' =None, display_name: 'str' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, quotas: 'V1Quotas' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None): # noqa: E501
77
+ def __init__(self, allow_aws_saas: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, quotas: 'V1Quotas' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None): # noqa: E501
76
78
  """ProjectsIdBody - a model defined in Swagger""" # noqa: E501
77
79
  self._allow_aws_saas = None
78
80
  self._allow_gcp_saas = None
79
81
  self._allow_lambda_saas = None
80
82
  self._allow_vultr_saas = None
83
+ self._default_machine_type = None
81
84
  self._description = None
82
85
  self._display_name = None
83
86
  self._name = None
@@ -96,6 +99,8 @@ class ProjectsIdBody(object):
96
99
  self.allow_lambda_saas = allow_lambda_saas
97
100
  if allow_vultr_saas is not None:
98
101
  self.allow_vultr_saas = allow_vultr_saas
102
+ if default_machine_type is not None:
103
+ self.default_machine_type = default_machine_type
99
104
  if description is not None:
100
105
  self.description = description
101
106
  if display_name is not None:
@@ -199,6 +204,27 @@ class ProjectsIdBody(object):
199
204
 
200
205
  self._allow_vultr_saas = allow_vultr_saas
201
206
 
207
+ @property
208
+ def default_machine_type(self) -> 'str':
209
+ """Gets the default_machine_type of this ProjectsIdBody. # noqa: E501
210
+
211
+
212
+ :return: The default_machine_type of this ProjectsIdBody. # noqa: E501
213
+ :rtype: str
214
+ """
215
+ return self._default_machine_type
216
+
217
+ @default_machine_type.setter
218
+ def default_machine_type(self, default_machine_type: 'str'):
219
+ """Sets the default_machine_type of this ProjectsIdBody.
220
+
221
+
222
+ :param default_machine_type: The default_machine_type of this ProjectsIdBody. # noqa: E501
223
+ :type: str
224
+ """
225
+
226
+ self._default_machine_type = default_machine_type
227
+
202
228
  @property
203
229
  def description(self) -> 'str':
204
230
  """Gets the description of this ProjectsIdBody. # 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 ServerIdAlertsBody(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
+ """ServerIdAlertsBody - 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 ServerIdAlertsBody. # noqa: E501
76
+
77
+
78
+ :return: The message of this ServerIdAlertsBody. # 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 ServerIdAlertsBody.
86
+
87
+
88
+ :param message: The message of this ServerIdAlertsBody. # 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 ServerIdAlertsBody. # noqa: E501
97
+
98
+
99
+ :return: The phase of this ServerIdAlertsBody. # 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 ServerIdAlertsBody.
107
+
108
+
109
+ :param phase: The phase of this ServerIdAlertsBody. # 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 ServerIdAlertsBody. # noqa: E501
118
+
119
+
120
+ :return: The severity of this ServerIdAlertsBody. # 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 ServerIdAlertsBody.
128
+
129
+
130
+ :param severity: The severity of this ServerIdAlertsBody. # 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 ServerIdAlertsBody. # noqa: E501
139
+
140
+
141
+ :return: The type of this ServerIdAlertsBody. # 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 ServerIdAlertsBody.
149
+
150
+
151
+ :param type: The type of this ServerIdAlertsBody. # 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(ServerIdAlertsBody, 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: 'ServerIdAlertsBody') -> bool:
193
+ """Returns true if both objects are equal"""
194
+ if not isinstance(other, ServerIdAlertsBody):
195
+ return False
196
+
197
+ return self.__dict__ == other.__dict__
198
+
199
+ def __ne__(self, other: 'ServerIdAlertsBody') -> bool:
200
+ """Returns true if both objects are not equal"""
201
+ return not self == other
@@ -0,0 +1,102 @@
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 V1AlertMethod(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
+ EMAIL = "EMAIL"
41
+ """
42
+ Attributes:
43
+ swagger_types (dict): The key is attribute name
44
+ and the value is attribute type.
45
+ attribute_map (dict): The key is attribute name
46
+ and the value is json key in definition.
47
+ """
48
+ swagger_types = {
49
+ }
50
+
51
+ attribute_map = {
52
+ }
53
+
54
+ def __init__(self): # noqa: E501
55
+ """V1AlertMethod - a model defined in Swagger""" # noqa: E501
56
+ self.discriminator = None
57
+
58
+ def to_dict(self) -> dict:
59
+ """Returns the model properties as a dict"""
60
+ result = {}
61
+
62
+ for attr, _ in six.iteritems(self.swagger_types):
63
+ value = getattr(self, attr)
64
+ if isinstance(value, list):
65
+ result[attr] = list(map(
66
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
67
+ value
68
+ ))
69
+ elif hasattr(value, "to_dict"):
70
+ result[attr] = value.to_dict()
71
+ elif isinstance(value, dict):
72
+ result[attr] = dict(map(
73
+ lambda item: (item[0], item[1].to_dict())
74
+ if hasattr(item[1], "to_dict") else item,
75
+ value.items()
76
+ ))
77
+ else:
78
+ result[attr] = value
79
+ if issubclass(V1AlertMethod, dict):
80
+ for key, value in self.items():
81
+ result[key] = value
82
+
83
+ return result
84
+
85
+ def to_str(self) -> str:
86
+ """Returns the string representation of the model"""
87
+ return pprint.pformat(self.to_dict())
88
+
89
+ def __repr__(self) -> str:
90
+ """For `print` and `pprint`"""
91
+ return self.to_str()
92
+
93
+ def __eq__(self, other: 'V1AlertMethod') -> bool:
94
+ """Returns true if both objects are equal"""
95
+ if not isinstance(other, V1AlertMethod):
96
+ return False
97
+
98
+ return self.__dict__ == other.__dict__
99
+
100
+ def __ne__(self, other: 'V1AlertMethod') -> bool:
101
+ """Returns true if both objects are not equal"""
102
+ 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 V1AlertsConfig(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
+ 'billing': 'AlertsConfigBilling',
45
+ 'studios': 'AlertsConfigStudios'
46
+ }
47
+
48
+ attribute_map = {
49
+ 'billing': 'billing',
50
+ 'studios': 'studios'
51
+ }
52
+
53
+ def __init__(self, billing: 'AlertsConfigBilling' =None, studios: 'AlertsConfigStudios' =None): # noqa: E501
54
+ """V1AlertsConfig - a model defined in Swagger""" # noqa: E501
55
+ self._billing = None
56
+ self._studios = None
57
+ self.discriminator = None
58
+ if billing is not None:
59
+ self.billing = billing
60
+ if studios is not None:
61
+ self.studios = studios
62
+
63
+ @property
64
+ def billing(self) -> 'AlertsConfigBilling':
65
+ """Gets the billing of this V1AlertsConfig. # noqa: E501
66
+
67
+
68
+ :return: The billing of this V1AlertsConfig. # noqa: E501
69
+ :rtype: AlertsConfigBilling
70
+ """
71
+ return self._billing
72
+
73
+ @billing.setter
74
+ def billing(self, billing: 'AlertsConfigBilling'):
75
+ """Sets the billing of this V1AlertsConfig.
76
+
77
+
78
+ :param billing: The billing of this V1AlertsConfig. # noqa: E501
79
+ :type: AlertsConfigBilling
80
+ """
81
+
82
+ self._billing = billing
83
+
84
+ @property
85
+ def studios(self) -> 'AlertsConfigStudios':
86
+ """Gets the studios of this V1AlertsConfig. # noqa: E501
87
+
88
+
89
+ :return: The studios of this V1AlertsConfig. # noqa: E501
90
+ :rtype: AlertsConfigStudios
91
+ """
92
+ return self._studios
93
+
94
+ @studios.setter
95
+ def studios(self, studios: 'AlertsConfigStudios'):
96
+ """Sets the studios of this V1AlertsConfig.
97
+
98
+
99
+ :param studios: The studios of this V1AlertsConfig. # noqa: E501
100
+ :type: AlertsConfigStudios
101
+ """
102
+
103
+ self._studios = studios
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(V1AlertsConfig, 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: 'V1AlertsConfig') -> bool:
141
+ """Returns true if both objects are equal"""
142
+ if not isinstance(other, V1AlertsConfig):
143
+ return False
144
+
145
+ return self.__dict__ == other.__dict__
146
+
147
+ def __ne__(self, other: 'V1AlertsConfig') -> bool:
148
+ """Returns true if both objects are not equal"""
149
+ return not self == other