lightning-sdk 0.2.6__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 (42) 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 +16 -29
  9. lightning_sdk/cli/upload.py +41 -6
  10. lightning_sdk/lightning_cloud/openapi/__init__.py +8 -0
  11. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +202 -0
  12. lightning_sdk/lightning_cloud/openapi/models/__init__.py +8 -0
  13. lightning_sdk/lightning_cloud/openapi/models/alerts_config_billing.py +175 -0
  14. lightning_sdk/lightning_cloud/openapi/models/alerts_config_studios.py +149 -0
  15. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +53 -1
  16. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  17. lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +27 -1
  18. lightning_sdk/lightning_cloud/openapi/models/v1_alert_method.py +102 -0
  19. lightning_sdk/lightning_cloud/openapi/models/v1_alerts_config.py +149 -0
  20. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_cold_start_metrics.py +617 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_conversation_response_chunk.py +29 -3
  22. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
  23. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +29 -3
  24. lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_cold_start_metrics_response.py +123 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +29 -3
  26. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +53 -1
  27. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_stop_at_response.py +97 -0
  29. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_phase.py +104 -0
  31. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -1
  32. lightning_sdk/lightning_cloud/rest_client.py +42 -44
  33. lightning_sdk/lit_container.py +19 -4
  34. lightning_sdk/models.py +1 -1
  35. lightning_sdk/serve.py +86 -17
  36. lightning_sdk/teamspace.py +32 -18
  37. {lightning_sdk-0.2.6.dist-info → lightning_sdk-0.2.7.dist-info}/METADATA +1 -1
  38. {lightning_sdk-0.2.6.dist-info → lightning_sdk-0.2.7.dist-info}/RECORD +42 -34
  39. {lightning_sdk-0.2.6.dist-info → lightning_sdk-0.2.7.dist-info}/LICENSE +0 -0
  40. {lightning_sdk-0.2.6.dist-info → lightning_sdk-0.2.7.dist-info}/WHEEL +0 -0
  41. {lightning_sdk-0.2.6.dist-info → lightning_sdk-0.2.7.dist-info}/entry_points.txt +0 -0
  42. {lightning_sdk-0.2.6.dist-info → lightning_sdk-0.2.7.dist-info}/top_level.txt +0 -0
@@ -41,6 +41,7 @@ class OrgsIdBody(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
+ 'alerts_config': 'V1AlertsConfig',
44
45
  'allow_aws_saas': 'bool',
45
46
  'allow_gcp_saas': 'bool',
46
47
  'allow_guest': 'bool',
@@ -51,6 +52,7 @@ class OrgsIdBody(object):
51
52
  'allow_vultr_saas': 'bool',
52
53
  'auto_invite_by_domain': 'bool',
53
54
  'auto_join_domains': 'list[str]',
55
+ 'default_machine_type': 'str',
54
56
  'description': 'str',
55
57
  'display_name': 'str',
56
58
  'domain': 'str',
@@ -66,6 +68,7 @@ class OrgsIdBody(object):
66
68
  }
67
69
 
68
70
  attribute_map = {
71
+ 'alerts_config': 'alertsConfig',
69
72
  'allow_aws_saas': 'allowAwsSaas',
70
73
  'allow_gcp_saas': 'allowGcpSaas',
71
74
  'allow_guest': 'allowGuest',
@@ -76,6 +79,7 @@ class OrgsIdBody(object):
76
79
  'allow_vultr_saas': 'allowVultrSaas',
77
80
  'auto_invite_by_domain': 'autoInviteByDomain',
78
81
  'auto_join_domains': 'autoJoinDomains',
82
+ 'default_machine_type': 'defaultMachineType',
79
83
  'description': 'description',
80
84
  'display_name': 'displayName',
81
85
  'domain': 'domain',
@@ -90,8 +94,9 @@ class OrgsIdBody(object):
90
94
  'twitter_username': 'twitterUsername'
91
95
  }
92
96
 
93
- def __init__(self, allow_aws_saas: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_guest: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_marketplace: 'bool' =None, allow_member_invitations: 'bool' =None, allow_member_teamspace_creation: 'bool' =None, allow_vultr_saas: 'bool' =None, auto_invite_by_domain: 'bool' =None, auto_join_domains: 'list[str]' =None, description: 'str' =None, display_name: 'str' =None, domain: 'str' =None, email: 'str' =None, featured_gallery: 'bool' =None, location: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, start_studios_on_spot_instance: 'bool' =None, teamspace_default_credits: 'float' =None, twitter_username: 'str' =None): # noqa: E501
97
+ def __init__(self, alerts_config: 'V1AlertsConfig' =None, allow_aws_saas: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_guest: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_marketplace: 'bool' =None, allow_member_invitations: 'bool' =None, allow_member_teamspace_creation: 'bool' =None, allow_vultr_saas: 'bool' =None, auto_invite_by_domain: 'bool' =None, auto_join_domains: 'list[str]' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, domain: 'str' =None, email: 'str' =None, featured_gallery: 'bool' =None, location: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, start_studios_on_spot_instance: 'bool' =None, teamspace_default_credits: 'float' =None, twitter_username: 'str' =None): # noqa: E501
94
98
  """OrgsIdBody - a model defined in Swagger""" # noqa: E501
99
+ self._alerts_config = None
95
100
  self._allow_aws_saas = None
96
101
  self._allow_gcp_saas = None
97
102
  self._allow_guest = None
@@ -102,6 +107,7 @@ class OrgsIdBody(object):
102
107
  self._allow_vultr_saas = None
103
108
  self._auto_invite_by_domain = None
104
109
  self._auto_join_domains = None
110
+ self._default_machine_type = None
105
111
  self._description = None
106
112
  self._display_name = None
107
113
  self._domain = None
@@ -115,6 +121,8 @@ class OrgsIdBody(object):
115
121
  self._teamspace_default_credits = None
116
122
  self._twitter_username = None
117
123
  self.discriminator = None
124
+ if alerts_config is not None:
125
+ self.alerts_config = alerts_config
118
126
  if allow_aws_saas is not None:
119
127
  self.allow_aws_saas = allow_aws_saas
120
128
  if allow_gcp_saas is not None:
@@ -135,6 +143,8 @@ class OrgsIdBody(object):
135
143
  self.auto_invite_by_domain = auto_invite_by_domain
136
144
  if auto_join_domains is not None:
137
145
  self.auto_join_domains = auto_join_domains
146
+ if default_machine_type is not None:
147
+ self.default_machine_type = default_machine_type
138
148
  if description is not None:
139
149
  self.description = description
140
150
  if display_name is not None:
@@ -160,6 +170,27 @@ class OrgsIdBody(object):
160
170
  if twitter_username is not None:
161
171
  self.twitter_username = twitter_username
162
172
 
173
+ @property
174
+ def alerts_config(self) -> 'V1AlertsConfig':
175
+ """Gets the alerts_config of this OrgsIdBody. # noqa: E501
176
+
177
+
178
+ :return: The alerts_config of this OrgsIdBody. # noqa: E501
179
+ :rtype: V1AlertsConfig
180
+ """
181
+ return self._alerts_config
182
+
183
+ @alerts_config.setter
184
+ def alerts_config(self, alerts_config: 'V1AlertsConfig'):
185
+ """Sets the alerts_config of this OrgsIdBody.
186
+
187
+
188
+ :param alerts_config: The alerts_config of this OrgsIdBody. # noqa: E501
189
+ :type: V1AlertsConfig
190
+ """
191
+
192
+ self._alerts_config = alerts_config
193
+
163
194
  @property
164
195
  def allow_aws_saas(self) -> 'bool':
165
196
  """Gets the allow_aws_saas of this OrgsIdBody. # noqa: E501
@@ -370,6 +401,27 @@ class OrgsIdBody(object):
370
401
 
371
402
  self._auto_join_domains = auto_join_domains
372
403
 
404
+ @property
405
+ def default_machine_type(self) -> 'str':
406
+ """Gets the default_machine_type of this OrgsIdBody. # noqa: E501
407
+
408
+
409
+ :return: The default_machine_type of this OrgsIdBody. # noqa: E501
410
+ :rtype: str
411
+ """
412
+ return self._default_machine_type
413
+
414
+ @default_machine_type.setter
415
+ def default_machine_type(self, default_machine_type: 'str'):
416
+ """Sets the default_machine_type of this OrgsIdBody.
417
+
418
+
419
+ :param default_machine_type: The default_machine_type of this OrgsIdBody. # noqa: E501
420
+ :type: str
421
+ """
422
+
423
+ self._default_machine_type = default_machine_type
424
+
373
425
  @property
374
426
  def description(self) -> 'str':
375
427
  """Gets the description of this OrgsIdBody. # 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
@@ -42,24 +42,29 @@ class ServerIdAlertsBody(object):
42
42
  """
43
43
  swagger_types = {
44
44
  'message': 'str',
45
+ 'phase': 'V1ServerAlertPhase',
45
46
  'severity': 'V1ServerAlertSeverity',
46
47
  'type': 'V1ServerAlertType'
47
48
  }
48
49
 
49
50
  attribute_map = {
50
51
  'message': 'message',
52
+ 'phase': 'phase',
51
53
  'severity': 'severity',
52
54
  'type': 'type'
53
55
  }
54
56
 
55
- def __init__(self, message: 'str' =None, severity: 'V1ServerAlertSeverity' =None, type: 'V1ServerAlertType' =None): # noqa: E501
57
+ def __init__(self, message: 'str' =None, phase: 'V1ServerAlertPhase' =None, severity: 'V1ServerAlertSeverity' =None, type: 'V1ServerAlertType' =None): # noqa: E501
56
58
  """ServerIdAlertsBody - a model defined in Swagger""" # noqa: E501
57
59
  self._message = None
60
+ self._phase = None
58
61
  self._severity = None
59
62
  self._type = None
60
63
  self.discriminator = None
61
64
  if message is not None:
62
65
  self.message = message
66
+ if phase is not None:
67
+ self.phase = phase
63
68
  if severity is not None:
64
69
  self.severity = severity
65
70
  if type is not None:
@@ -86,6 +91,27 @@ class ServerIdAlertsBody(object):
86
91
 
87
92
  self._message = message
88
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
+
89
115
  @property
90
116
  def severity(self) -> 'V1ServerAlertSeverity':
91
117
  """Gets the severity of this ServerIdAlertsBody. # noqa: E501
@@ -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