lightning-sdk 0.2.14__py3-none-any.whl → 0.2.16__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 (122) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/base_studio_api.py +79 -0
  3. lightning_sdk/api/cluster_api.py +83 -1
  4. lightning_sdk/api/license_api.py +48 -0
  5. lightning_sdk/api/llm_api.py +73 -12
  6. lightning_sdk/api/studio_api.py +50 -1
  7. lightning_sdk/api/teamspace_api.py +127 -1
  8. lightning_sdk/api/utils.py +4 -0
  9. lightning_sdk/base_studio.py +83 -0
  10. lightning_sdk/cli/create.py +21 -1
  11. lightning_sdk/cli/delete.py +6 -8
  12. lightning_sdk/cli/deploy/__init__.py +0 -0
  13. lightning_sdk/cli/deploy/_auth.py +189 -0
  14. lightning_sdk/cli/deploy/devbox.py +157 -0
  15. lightning_sdk/cli/{serve.py → deploy/serve.py} +22 -281
  16. lightning_sdk/cli/download.py +69 -16
  17. lightning_sdk/cli/entrypoint.py +1 -1
  18. lightning_sdk/cli/open.py +21 -2
  19. lightning_sdk/cli/start.py +12 -3
  20. lightning_sdk/cli/teamspace_menu.py +9 -1
  21. lightning_sdk/cli/upload.py +2 -5
  22. lightning_sdk/lightning_cloud/openapi/__init__.py +29 -0
  23. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  24. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +121 -0
  25. lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +9 -1
  26. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +226 -0
  27. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
  28. lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +178 -0
  29. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +984 -101
  30. lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +525 -0
  31. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +93 -0
  32. lightning_sdk/lightning_cloud/openapi/configuration.py +1 -1
  33. lightning_sdk/lightning_cloud/openapi/models/__init__.py +28 -0
  34. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +79 -1
  35. lightning_sdk/lightning_cloud/openapi/models/cloudspaces_id_body.py +53 -1
  36. lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body.py +331 -0
  37. lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body1.py +305 -0
  38. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +53 -1
  39. lightning_sdk/lightning_cloud/openapi/models/endpoints_id_body.py +27 -1
  40. lightning_sdk/lightning_cloud/openapi/models/model_id_versions_body.py +27 -1
  41. lightning_sdk/lightning_cloud/openapi/models/models_id_body.py +123 -0
  42. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +183 -1
  43. lightning_sdk/lightning_cloud/openapi/models/pipelines_id_body.py +6 -6
  44. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
  45. lightning_sdk/lightning_cloud/openapi/models/project_id_storage_body.py +27 -1
  46. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +107 -3
  47. lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +27 -1
  48. lightning_sdk/lightning_cloud/openapi/models/update.py +79 -1
  49. lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body1.py +55 -3
  50. lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py +53 -1
  51. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +3 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +79 -1
  53. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_config.py +123 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +79 -1
  55. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_type.py +104 -0
  56. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_source_type.py +103 -0
  57. lightning_sdk/lightning_cloud/openapi/models/v1_cloudflare_v1.py +66 -66
  58. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  59. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_tagging_options.py +27 -1
  60. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_upload.py +149 -0
  61. lightning_sdk/lightning_cloud/openapi/models/v1_complete_upload.py +55 -3
  62. lightning_sdk/lightning_cloud/openapi/models/v1_conversation.py +27 -1
  63. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +79 -1
  64. lightning_sdk/lightning_cloud/openapi/models/v1_delete_deployment_alerting_policy_response.py +175 -0
  65. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +53 -1
  66. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_event.py +487 -0
  67. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy.py +383 -0
  68. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_frequency.py +105 -0
  69. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_operation.py +105 -0
  70. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_severity.py +106 -0
  71. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_type.py +111 -0
  72. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +27 -1
  73. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_state.py +4 -4
  74. lightning_sdk/lightning_cloud/openapi/models/v1_endpoint.py +27 -1
  75. lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
  76. lightning_sdk/lightning_cloud/openapi/models/v1_ge_list_deployment_routing_telemetry_response.py +123 -0
  77. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_instance_open_ports_response.py +123 -0
  78. lightning_sdk/lightning_cloud/openapi/models/v1_get_deployment_routing_telemetry_content_response.py +123 -0
  79. lightning_sdk/lightning_cloud/openapi/models/v1_get_job_stats_response.py +53 -1
  80. lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py +331 -0
  81. lightning_sdk/lightning_cloud/openapi/models/v1_get_project_balance_response.py +1 -27
  82. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +27 -1
  83. lightning_sdk/lightning_cloud/openapi/models/v1_job_type.py +1 -0
  84. lightning_sdk/lightning_cloud/openapi/models/v1_list_deployment_alerting_events_response.py +123 -0
  85. lightning_sdk/lightning_cloud/openapi/models/v1_list_deployment_alerting_policies_response.py +175 -0
  86. lightning_sdk/lightning_cloud/openapi/models/v1_list_product_licenses_response.py +123 -0
  87. lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +27 -1
  88. lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +43 -17
  89. lightning_sdk/lightning_cloud/openapi/models/v1_modify_filesystem_volume_response.py +97 -0
  90. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +183 -1
  91. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +6 -6
  92. lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_state.py +111 -0
  93. lightning_sdk/lightning_cloud/openapi/models/v1_presigned_url.py +53 -1
  94. lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +409 -0
  95. lightning_sdk/lightning_cloud/openapi/models/v1_product_license_check_response.py +123 -0
  96. lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
  97. lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +43 -17
  98. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +107 -3
  99. lightning_sdk/lightning_cloud/openapi/models/v1_project_storage.py +53 -1
  100. lightning_sdk/lightning_cloud/openapi/models/v1_r2_data_connection.py +53 -1
  101. lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +253 -0
  102. lightning_sdk/lightning_cloud/openapi/models/v1_secret_type.py +1 -0
  103. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +2 -0
  104. lightning_sdk/lightning_cloud/openapi/models/v1_sleep_server_response.py +97 -0
  105. lightning_sdk/lightning_cloud/openapi/models/v1_trigger_filesystem_upgrade_response.py +123 -0
  106. lightning_sdk/lightning_cloud/openapi/models/v1_upload_project_artifact_response.py +27 -1
  107. lightning_sdk/lightning_cloud/openapi/models/v1_usage_report.py +79 -1
  108. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +347 -113
  109. lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_compute_config.py +27 -1
  110. lightning_sdk/lightning_cloud/rest_client.py +4 -0
  111. lightning_sdk/llm/llm.py +132 -40
  112. lightning_sdk/services/__init__.py +1 -1
  113. lightning_sdk/services/license.py +236 -0
  114. lightning_sdk/studio.py +62 -1
  115. lightning_sdk/teamspace.py +68 -0
  116. {lightning_sdk-0.2.14.dist-info → lightning_sdk-0.2.16.dist-info}/METADATA +1 -1
  117. {lightning_sdk-0.2.14.dist-info → lightning_sdk-0.2.16.dist-info}/RECORD +122 -86
  118. /lightning_sdk/services/{finetune/__init__.py → finetune_llm.py} +0 -0
  119. {lightning_sdk-0.2.14.dist-info → lightning_sdk-0.2.16.dist-info}/LICENSE +0 -0
  120. {lightning_sdk-0.2.14.dist-info → lightning_sdk-0.2.16.dist-info}/WHEEL +0 -0
  121. {lightning_sdk-0.2.14.dist-info → lightning_sdk-0.2.16.dist-info}/entry_points.txt +0 -0
  122. {lightning_sdk-0.2.14.dist-info → lightning_sdk-0.2.16.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,331 @@
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 DeploymentIdAlertingpoliciesBody(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
+ 'description': 'str',
45
+ 'frequency': 'V1DeploymentAlertingPolicyFrequency',
46
+ 'id': 'str',
47
+ 'limit': 'float',
48
+ 'name': 'str',
49
+ 'operation': 'V1DeploymentAlertingPolicyOperation',
50
+ 'severity': 'V1DeploymentAlertingPolicySeverity',
51
+ 'type': 'V1DeploymentAlertingPolicyType',
52
+ 'value': 'float'
53
+ }
54
+
55
+ attribute_map = {
56
+ 'description': 'description',
57
+ 'frequency': 'frequency',
58
+ 'id': 'id',
59
+ 'limit': 'limit',
60
+ 'name': 'name',
61
+ 'operation': 'operation',
62
+ 'severity': 'severity',
63
+ 'type': 'type',
64
+ 'value': 'value'
65
+ }
66
+
67
+ def __init__(self, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, id: 'str' =None, limit: 'float' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None): # noqa: E501
68
+ """DeploymentIdAlertingpoliciesBody - a model defined in Swagger""" # noqa: E501
69
+ self._description = None
70
+ self._frequency = None
71
+ self._id = None
72
+ self._limit = None
73
+ self._name = None
74
+ self._operation = None
75
+ self._severity = None
76
+ self._type = None
77
+ self._value = None
78
+ self.discriminator = None
79
+ if description is not None:
80
+ self.description = description
81
+ if frequency is not None:
82
+ self.frequency = frequency
83
+ if id is not None:
84
+ self.id = id
85
+ if limit is not None:
86
+ self.limit = limit
87
+ if name is not None:
88
+ self.name = name
89
+ if operation is not None:
90
+ self.operation = operation
91
+ if severity is not None:
92
+ self.severity = severity
93
+ if type is not None:
94
+ self.type = type
95
+ if value is not None:
96
+ self.value = value
97
+
98
+ @property
99
+ def description(self) -> 'str':
100
+ """Gets the description of this DeploymentIdAlertingpoliciesBody. # noqa: E501
101
+
102
+
103
+ :return: The description of this DeploymentIdAlertingpoliciesBody. # noqa: E501
104
+ :rtype: str
105
+ """
106
+ return self._description
107
+
108
+ @description.setter
109
+ def description(self, description: 'str'):
110
+ """Sets the description of this DeploymentIdAlertingpoliciesBody.
111
+
112
+
113
+ :param description: The description of this DeploymentIdAlertingpoliciesBody. # noqa: E501
114
+ :type: str
115
+ """
116
+
117
+ self._description = description
118
+
119
+ @property
120
+ def frequency(self) -> 'V1DeploymentAlertingPolicyFrequency':
121
+ """Gets the frequency of this DeploymentIdAlertingpoliciesBody. # noqa: E501
122
+
123
+
124
+ :return: The frequency of this DeploymentIdAlertingpoliciesBody. # noqa: E501
125
+ :rtype: V1DeploymentAlertingPolicyFrequency
126
+ """
127
+ return self._frequency
128
+
129
+ @frequency.setter
130
+ def frequency(self, frequency: 'V1DeploymentAlertingPolicyFrequency'):
131
+ """Sets the frequency of this DeploymentIdAlertingpoliciesBody.
132
+
133
+
134
+ :param frequency: The frequency of this DeploymentIdAlertingpoliciesBody. # noqa: E501
135
+ :type: V1DeploymentAlertingPolicyFrequency
136
+ """
137
+
138
+ self._frequency = frequency
139
+
140
+ @property
141
+ def id(self) -> 'str':
142
+ """Gets the id of this DeploymentIdAlertingpoliciesBody. # noqa: E501
143
+
144
+
145
+ :return: The id of this DeploymentIdAlertingpoliciesBody. # noqa: E501
146
+ :rtype: str
147
+ """
148
+ return self._id
149
+
150
+ @id.setter
151
+ def id(self, id: 'str'):
152
+ """Sets the id of this DeploymentIdAlertingpoliciesBody.
153
+
154
+
155
+ :param id: The id of this DeploymentIdAlertingpoliciesBody. # noqa: E501
156
+ :type: str
157
+ """
158
+
159
+ self._id = id
160
+
161
+ @property
162
+ def limit(self) -> 'float':
163
+ """Gets the limit of this DeploymentIdAlertingpoliciesBody. # noqa: E501
164
+
165
+
166
+ :return: The limit of this DeploymentIdAlertingpoliciesBody. # noqa: E501
167
+ :rtype: float
168
+ """
169
+ return self._limit
170
+
171
+ @limit.setter
172
+ def limit(self, limit: 'float'):
173
+ """Sets the limit of this DeploymentIdAlertingpoliciesBody.
174
+
175
+
176
+ :param limit: The limit of this DeploymentIdAlertingpoliciesBody. # noqa: E501
177
+ :type: float
178
+ """
179
+
180
+ self._limit = limit
181
+
182
+ @property
183
+ def name(self) -> 'str':
184
+ """Gets the name of this DeploymentIdAlertingpoliciesBody. # noqa: E501
185
+
186
+
187
+ :return: The name of this DeploymentIdAlertingpoliciesBody. # noqa: E501
188
+ :rtype: str
189
+ """
190
+ return self._name
191
+
192
+ @name.setter
193
+ def name(self, name: 'str'):
194
+ """Sets the name of this DeploymentIdAlertingpoliciesBody.
195
+
196
+
197
+ :param name: The name of this DeploymentIdAlertingpoliciesBody. # noqa: E501
198
+ :type: str
199
+ """
200
+
201
+ self._name = name
202
+
203
+ @property
204
+ def operation(self) -> 'V1DeploymentAlertingPolicyOperation':
205
+ """Gets the operation of this DeploymentIdAlertingpoliciesBody. # noqa: E501
206
+
207
+
208
+ :return: The operation of this DeploymentIdAlertingpoliciesBody. # noqa: E501
209
+ :rtype: V1DeploymentAlertingPolicyOperation
210
+ """
211
+ return self._operation
212
+
213
+ @operation.setter
214
+ def operation(self, operation: 'V1DeploymentAlertingPolicyOperation'):
215
+ """Sets the operation of this DeploymentIdAlertingpoliciesBody.
216
+
217
+
218
+ :param operation: The operation of this DeploymentIdAlertingpoliciesBody. # noqa: E501
219
+ :type: V1DeploymentAlertingPolicyOperation
220
+ """
221
+
222
+ self._operation = operation
223
+
224
+ @property
225
+ def severity(self) -> 'V1DeploymentAlertingPolicySeverity':
226
+ """Gets the severity of this DeploymentIdAlertingpoliciesBody. # noqa: E501
227
+
228
+
229
+ :return: The severity of this DeploymentIdAlertingpoliciesBody. # noqa: E501
230
+ :rtype: V1DeploymentAlertingPolicySeverity
231
+ """
232
+ return self._severity
233
+
234
+ @severity.setter
235
+ def severity(self, severity: 'V1DeploymentAlertingPolicySeverity'):
236
+ """Sets the severity of this DeploymentIdAlertingpoliciesBody.
237
+
238
+
239
+ :param severity: The severity of this DeploymentIdAlertingpoliciesBody. # noqa: E501
240
+ :type: V1DeploymentAlertingPolicySeverity
241
+ """
242
+
243
+ self._severity = severity
244
+
245
+ @property
246
+ def type(self) -> 'V1DeploymentAlertingPolicyType':
247
+ """Gets the type of this DeploymentIdAlertingpoliciesBody. # noqa: E501
248
+
249
+
250
+ :return: The type of this DeploymentIdAlertingpoliciesBody. # noqa: E501
251
+ :rtype: V1DeploymentAlertingPolicyType
252
+ """
253
+ return self._type
254
+
255
+ @type.setter
256
+ def type(self, type: 'V1DeploymentAlertingPolicyType'):
257
+ """Sets the type of this DeploymentIdAlertingpoliciesBody.
258
+
259
+
260
+ :param type: The type of this DeploymentIdAlertingpoliciesBody. # noqa: E501
261
+ :type: V1DeploymentAlertingPolicyType
262
+ """
263
+
264
+ self._type = type
265
+
266
+ @property
267
+ def value(self) -> 'float':
268
+ """Gets the value of this DeploymentIdAlertingpoliciesBody. # noqa: E501
269
+
270
+
271
+ :return: The value of this DeploymentIdAlertingpoliciesBody. # noqa: E501
272
+ :rtype: float
273
+ """
274
+ return self._value
275
+
276
+ @value.setter
277
+ def value(self, value: 'float'):
278
+ """Sets the value of this DeploymentIdAlertingpoliciesBody.
279
+
280
+
281
+ :param value: The value of this DeploymentIdAlertingpoliciesBody. # noqa: E501
282
+ :type: float
283
+ """
284
+
285
+ self._value = value
286
+
287
+ def to_dict(self) -> dict:
288
+ """Returns the model properties as a dict"""
289
+ result = {}
290
+
291
+ for attr, _ in six.iteritems(self.swagger_types):
292
+ value = getattr(self, attr)
293
+ if isinstance(value, list):
294
+ result[attr] = list(map(
295
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
296
+ value
297
+ ))
298
+ elif hasattr(value, "to_dict"):
299
+ result[attr] = value.to_dict()
300
+ elif isinstance(value, dict):
301
+ result[attr] = dict(map(
302
+ lambda item: (item[0], item[1].to_dict())
303
+ if hasattr(item[1], "to_dict") else item,
304
+ value.items()
305
+ ))
306
+ else:
307
+ result[attr] = value
308
+ if issubclass(DeploymentIdAlertingpoliciesBody, dict):
309
+ for key, value in self.items():
310
+ result[key] = value
311
+
312
+ return result
313
+
314
+ def to_str(self) -> str:
315
+ """Returns the string representation of the model"""
316
+ return pprint.pformat(self.to_dict())
317
+
318
+ def __repr__(self) -> str:
319
+ """For `print` and `pprint`"""
320
+ return self.to_str()
321
+
322
+ def __eq__(self, other: 'DeploymentIdAlertingpoliciesBody') -> bool:
323
+ """Returns true if both objects are equal"""
324
+ if not isinstance(other, DeploymentIdAlertingpoliciesBody):
325
+ return False
326
+
327
+ return self.__dict__ == other.__dict__
328
+
329
+ def __ne__(self, other: 'DeploymentIdAlertingpoliciesBody') -> bool:
330
+ """Returns true if both objects are not equal"""
331
+ return not self == other
@@ -0,0 +1,305 @@
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 DeploymentIdAlertingpoliciesBody1(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
+ 'description': 'str',
45
+ 'frequency': 'V1DeploymentAlertingPolicyFrequency',
46
+ 'limit': 'float',
47
+ 'name': 'str',
48
+ 'operation': 'V1DeploymentAlertingPolicyOperation',
49
+ 'severity': 'V1DeploymentAlertingPolicySeverity',
50
+ 'type': 'V1DeploymentAlertingPolicyType',
51
+ 'value': 'float'
52
+ }
53
+
54
+ attribute_map = {
55
+ 'description': 'description',
56
+ 'frequency': 'frequency',
57
+ 'limit': 'limit',
58
+ 'name': 'name',
59
+ 'operation': 'operation',
60
+ 'severity': 'severity',
61
+ 'type': 'type',
62
+ 'value': 'value'
63
+ }
64
+
65
+ def __init__(self, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, limit: 'float' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None): # noqa: E501
66
+ """DeploymentIdAlertingpoliciesBody1 - a model defined in Swagger""" # noqa: E501
67
+ self._description = None
68
+ self._frequency = None
69
+ self._limit = None
70
+ self._name = None
71
+ self._operation = None
72
+ self._severity = None
73
+ self._type = None
74
+ self._value = None
75
+ self.discriminator = None
76
+ if description is not None:
77
+ self.description = description
78
+ if frequency is not None:
79
+ self.frequency = frequency
80
+ if limit is not None:
81
+ self.limit = limit
82
+ if name is not None:
83
+ self.name = name
84
+ if operation is not None:
85
+ self.operation = operation
86
+ if severity is not None:
87
+ self.severity = severity
88
+ if type is not None:
89
+ self.type = type
90
+ if value is not None:
91
+ self.value = value
92
+
93
+ @property
94
+ def description(self) -> 'str':
95
+ """Gets the description of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
96
+
97
+
98
+ :return: The description of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
99
+ :rtype: str
100
+ """
101
+ return self._description
102
+
103
+ @description.setter
104
+ def description(self, description: 'str'):
105
+ """Sets the description of this DeploymentIdAlertingpoliciesBody1.
106
+
107
+
108
+ :param description: The description of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
109
+ :type: str
110
+ """
111
+
112
+ self._description = description
113
+
114
+ @property
115
+ def frequency(self) -> 'V1DeploymentAlertingPolicyFrequency':
116
+ """Gets the frequency of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
117
+
118
+
119
+ :return: The frequency of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
120
+ :rtype: V1DeploymentAlertingPolicyFrequency
121
+ """
122
+ return self._frequency
123
+
124
+ @frequency.setter
125
+ def frequency(self, frequency: 'V1DeploymentAlertingPolicyFrequency'):
126
+ """Sets the frequency of this DeploymentIdAlertingpoliciesBody1.
127
+
128
+
129
+ :param frequency: The frequency of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
130
+ :type: V1DeploymentAlertingPolicyFrequency
131
+ """
132
+
133
+ self._frequency = frequency
134
+
135
+ @property
136
+ def limit(self) -> 'float':
137
+ """Gets the limit of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
138
+
139
+
140
+ :return: The limit of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
141
+ :rtype: float
142
+ """
143
+ return self._limit
144
+
145
+ @limit.setter
146
+ def limit(self, limit: 'float'):
147
+ """Sets the limit of this DeploymentIdAlertingpoliciesBody1.
148
+
149
+
150
+ :param limit: The limit of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
151
+ :type: float
152
+ """
153
+
154
+ self._limit = limit
155
+
156
+ @property
157
+ def name(self) -> 'str':
158
+ """Gets the name of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
159
+
160
+
161
+ :return: The name of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
162
+ :rtype: str
163
+ """
164
+ return self._name
165
+
166
+ @name.setter
167
+ def name(self, name: 'str'):
168
+ """Sets the name of this DeploymentIdAlertingpoliciesBody1.
169
+
170
+
171
+ :param name: The name of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
172
+ :type: str
173
+ """
174
+
175
+ self._name = name
176
+
177
+ @property
178
+ def operation(self) -> 'V1DeploymentAlertingPolicyOperation':
179
+ """Gets the operation of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
180
+
181
+
182
+ :return: The operation of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
183
+ :rtype: V1DeploymentAlertingPolicyOperation
184
+ """
185
+ return self._operation
186
+
187
+ @operation.setter
188
+ def operation(self, operation: 'V1DeploymentAlertingPolicyOperation'):
189
+ """Sets the operation of this DeploymentIdAlertingpoliciesBody1.
190
+
191
+
192
+ :param operation: The operation of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
193
+ :type: V1DeploymentAlertingPolicyOperation
194
+ """
195
+
196
+ self._operation = operation
197
+
198
+ @property
199
+ def severity(self) -> 'V1DeploymentAlertingPolicySeverity':
200
+ """Gets the severity of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
201
+
202
+
203
+ :return: The severity of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
204
+ :rtype: V1DeploymentAlertingPolicySeverity
205
+ """
206
+ return self._severity
207
+
208
+ @severity.setter
209
+ def severity(self, severity: 'V1DeploymentAlertingPolicySeverity'):
210
+ """Sets the severity of this DeploymentIdAlertingpoliciesBody1.
211
+
212
+
213
+ :param severity: The severity of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
214
+ :type: V1DeploymentAlertingPolicySeverity
215
+ """
216
+
217
+ self._severity = severity
218
+
219
+ @property
220
+ def type(self) -> 'V1DeploymentAlertingPolicyType':
221
+ """Gets the type of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
222
+
223
+
224
+ :return: The type of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
225
+ :rtype: V1DeploymentAlertingPolicyType
226
+ """
227
+ return self._type
228
+
229
+ @type.setter
230
+ def type(self, type: 'V1DeploymentAlertingPolicyType'):
231
+ """Sets the type of this DeploymentIdAlertingpoliciesBody1.
232
+
233
+
234
+ :param type: The type of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
235
+ :type: V1DeploymentAlertingPolicyType
236
+ """
237
+
238
+ self._type = type
239
+
240
+ @property
241
+ def value(self) -> 'float':
242
+ """Gets the value of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
243
+
244
+
245
+ :return: The value of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
246
+ :rtype: float
247
+ """
248
+ return self._value
249
+
250
+ @value.setter
251
+ def value(self, value: 'float'):
252
+ """Sets the value of this DeploymentIdAlertingpoliciesBody1.
253
+
254
+
255
+ :param value: The value of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
256
+ :type: float
257
+ """
258
+
259
+ self._value = value
260
+
261
+ def to_dict(self) -> dict:
262
+ """Returns the model properties as a dict"""
263
+ result = {}
264
+
265
+ for attr, _ in six.iteritems(self.swagger_types):
266
+ value = getattr(self, attr)
267
+ if isinstance(value, list):
268
+ result[attr] = list(map(
269
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
270
+ value
271
+ ))
272
+ elif hasattr(value, "to_dict"):
273
+ result[attr] = value.to_dict()
274
+ elif isinstance(value, dict):
275
+ result[attr] = dict(map(
276
+ lambda item: (item[0], item[1].to_dict())
277
+ if hasattr(item[1], "to_dict") else item,
278
+ value.items()
279
+ ))
280
+ else:
281
+ result[attr] = value
282
+ if issubclass(DeploymentIdAlertingpoliciesBody1, dict):
283
+ for key, value in self.items():
284
+ result[key] = value
285
+
286
+ return result
287
+
288
+ def to_str(self) -> str:
289
+ """Returns the string representation of the model"""
290
+ return pprint.pformat(self.to_dict())
291
+
292
+ def __repr__(self) -> str:
293
+ """For `print` and `pprint`"""
294
+ return self.to_str()
295
+
296
+ def __eq__(self, other: 'DeploymentIdAlertingpoliciesBody1') -> bool:
297
+ """Returns true if both objects are equal"""
298
+ if not isinstance(other, DeploymentIdAlertingpoliciesBody1):
299
+ return False
300
+
301
+ return self.__dict__ == other.__dict__
302
+
303
+ def __ne__(self, other: 'DeploymentIdAlertingpoliciesBody1') -> bool:
304
+ """Returns true if both objects are not equal"""
305
+ return not self == other