lightning-sdk 0.1.50__py3-none-any.whl → 0.1.53__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/ai_hub.py +16 -27
- lightning_sdk/api/ai_hub_api.py +7 -1
- lightning_sdk/api/job_api.py +12 -7
- lightning_sdk/api/lit_container_api.py +24 -7
- lightning_sdk/api/mmt_api.py +12 -7
- lightning_sdk/api/utils.py +52 -0
- lightning_sdk/cli/run.py +65 -18
- lightning_sdk/cli/serve.py +1 -5
- lightning_sdk/cli/upload.py +33 -15
- lightning_sdk/helpers.py +1 -1
- lightning_sdk/job/base.py +28 -1
- lightning_sdk/job/job.py +27 -25
- lightning_sdk/job/v1.py +6 -2
- lightning_sdk/job/v2.py +12 -12
- lightning_sdk/lightning_cloud/login.py +4 -1
- lightning_sdk/lightning_cloud/openapi/__init__.py +17 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +417 -1
- lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +113 -0
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +101 -0
- lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +17 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_usagerestrictions_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_contactowner_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/litregistry_lit_repo_name_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/usagerestrictions_id_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant_model_status.py +4 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event_type.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +81 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_tagging_options.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_usage_restriction.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_reason.py +102 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_cluster_usage_restriction_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_mmt.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_usage_restrictions_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_mm_ts_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_model.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_path_mapping.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_post_cloud_space_artifact_events_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_update_lit_repository_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +128 -76
- lightning_sdk/lightning_cloud/utils/data_connection.py +75 -7
- lightning_sdk/mmt/base.py +36 -26
- lightning_sdk/mmt/mmt.py +28 -26
- lightning_sdk/mmt/v1.py +4 -1
- lightning_sdk/mmt/v2.py +14 -13
- lightning_sdk/models.py +5 -4
- lightning_sdk/studio.py +68 -1
- lightning_sdk/utils/resolve.py +7 -0
- {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/METADATA +2 -2
- {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/RECORD +69 -52
- {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/top_level.txt +0 -0
|
@@ -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 V1PathMapping(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
|
+
'connection_name': 'str',
|
|
45
|
+
'connection_path': 'str',
|
|
46
|
+
'container_path': 'str'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
attribute_map = {
|
|
50
|
+
'connection_name': 'connectionName',
|
|
51
|
+
'connection_path': 'connectionPath',
|
|
52
|
+
'container_path': 'containerPath'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
def __init__(self, connection_name: 'str' =None, connection_path: 'str' =None, container_path: 'str' =None): # noqa: E501
|
|
56
|
+
"""V1PathMapping - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._connection_name = None
|
|
58
|
+
self._connection_path = None
|
|
59
|
+
self._container_path = None
|
|
60
|
+
self.discriminator = None
|
|
61
|
+
if connection_name is not None:
|
|
62
|
+
self.connection_name = connection_name
|
|
63
|
+
if connection_path is not None:
|
|
64
|
+
self.connection_path = connection_path
|
|
65
|
+
if container_path is not None:
|
|
66
|
+
self.container_path = container_path
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def connection_name(self) -> 'str':
|
|
70
|
+
"""Gets the connection_name of this V1PathMapping. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The connection_name of this V1PathMapping. # noqa: E501
|
|
74
|
+
:rtype: str
|
|
75
|
+
"""
|
|
76
|
+
return self._connection_name
|
|
77
|
+
|
|
78
|
+
@connection_name.setter
|
|
79
|
+
def connection_name(self, connection_name: 'str'):
|
|
80
|
+
"""Sets the connection_name of this V1PathMapping.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param connection_name: The connection_name of this V1PathMapping. # noqa: E501
|
|
84
|
+
:type: str
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._connection_name = connection_name
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def connection_path(self) -> 'str':
|
|
91
|
+
"""Gets the connection_path of this V1PathMapping. # noqa: E501
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:return: The connection_path of this V1PathMapping. # noqa: E501
|
|
95
|
+
:rtype: str
|
|
96
|
+
"""
|
|
97
|
+
return self._connection_path
|
|
98
|
+
|
|
99
|
+
@connection_path.setter
|
|
100
|
+
def connection_path(self, connection_path: 'str'):
|
|
101
|
+
"""Sets the connection_path of this V1PathMapping.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:param connection_path: The connection_path of this V1PathMapping. # noqa: E501
|
|
105
|
+
:type: str
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
self._connection_path = connection_path
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def container_path(self) -> 'str':
|
|
112
|
+
"""Gets the container_path of this V1PathMapping. # noqa: E501
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
:return: The container_path of this V1PathMapping. # noqa: E501
|
|
116
|
+
:rtype: str
|
|
117
|
+
"""
|
|
118
|
+
return self._container_path
|
|
119
|
+
|
|
120
|
+
@container_path.setter
|
|
121
|
+
def container_path(self, container_path: 'str'):
|
|
122
|
+
"""Sets the container_path of this V1PathMapping.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:param container_path: The container_path of this V1PathMapping. # noqa: E501
|
|
126
|
+
:type: str
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
self._container_path = container_path
|
|
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(V1PathMapping, 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: 'V1PathMapping') -> bool:
|
|
167
|
+
"""Returns true if both objects are equal"""
|
|
168
|
+
if not isinstance(other, V1PathMapping):
|
|
169
|
+
return False
|
|
170
|
+
|
|
171
|
+
return self.__dict__ == other.__dict__
|
|
172
|
+
|
|
173
|
+
def __ne__(self, other: 'V1PathMapping') -> bool:
|
|
174
|
+
"""Returns true if both objects are not equal"""
|
|
175
|
+
return not self == other
|
|
@@ -0,0 +1,97 @@
|
|
|
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 V1PostCloudSpaceArtifactEventsResponse(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
|
+
}
|
|
45
|
+
|
|
46
|
+
attribute_map = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self): # noqa: E501
|
|
50
|
+
"""V1PostCloudSpaceArtifactEventsResponse - a model defined in Swagger""" # noqa: E501
|
|
51
|
+
self.discriminator = None
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict:
|
|
54
|
+
"""Returns the model properties as a dict"""
|
|
55
|
+
result = {}
|
|
56
|
+
|
|
57
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
58
|
+
value = getattr(self, attr)
|
|
59
|
+
if isinstance(value, list):
|
|
60
|
+
result[attr] = list(map(
|
|
61
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
62
|
+
value
|
|
63
|
+
))
|
|
64
|
+
elif hasattr(value, "to_dict"):
|
|
65
|
+
result[attr] = value.to_dict()
|
|
66
|
+
elif isinstance(value, dict):
|
|
67
|
+
result[attr] = dict(map(
|
|
68
|
+
lambda item: (item[0], item[1].to_dict())
|
|
69
|
+
if hasattr(item[1], "to_dict") else item,
|
|
70
|
+
value.items()
|
|
71
|
+
))
|
|
72
|
+
else:
|
|
73
|
+
result[attr] = value
|
|
74
|
+
if issubclass(V1PostCloudSpaceArtifactEventsResponse, dict):
|
|
75
|
+
for key, value in self.items():
|
|
76
|
+
result[key] = value
|
|
77
|
+
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
def to_str(self) -> str:
|
|
81
|
+
"""Returns the string representation of the model"""
|
|
82
|
+
return pprint.pformat(self.to_dict())
|
|
83
|
+
|
|
84
|
+
def __repr__(self) -> str:
|
|
85
|
+
"""For `print` and `pprint`"""
|
|
86
|
+
return self.to_str()
|
|
87
|
+
|
|
88
|
+
def __eq__(self, other: 'V1PostCloudSpaceArtifactEventsResponse') -> bool:
|
|
89
|
+
"""Returns true if both objects are equal"""
|
|
90
|
+
if not isinstance(other, V1PostCloudSpaceArtifactEventsResponse):
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
return self.__dict__ == other.__dict__
|
|
94
|
+
|
|
95
|
+
def __ne__(self, other: 'V1PostCloudSpaceArtifactEventsResponse') -> bool:
|
|
96
|
+
"""Returns true if both objects are not equal"""
|
|
97
|
+
return not self == other
|
|
@@ -41,25 +41,51 @@ class V1ResourceVisibility(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'all_org_users': 'bool',
|
|
44
45
|
'all_users': 'bool',
|
|
45
46
|
'user_ids': 'list[str]'
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
attribute_map = {
|
|
50
|
+
'all_org_users': 'allOrgUsers',
|
|
49
51
|
'all_users': 'allUsers',
|
|
50
52
|
'user_ids': 'userIds'
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
def __init__(self, all_users: 'bool' =None, user_ids: 'list[str]' =None): # noqa: E501
|
|
55
|
+
def __init__(self, all_org_users: 'bool' =None, all_users: 'bool' =None, user_ids: 'list[str]' =None): # noqa: E501
|
|
54
56
|
"""V1ResourceVisibility - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._all_org_users = None
|
|
55
58
|
self._all_users = None
|
|
56
59
|
self._user_ids = None
|
|
57
60
|
self.discriminator = None
|
|
61
|
+
if all_org_users is not None:
|
|
62
|
+
self.all_org_users = all_org_users
|
|
58
63
|
if all_users is not None:
|
|
59
64
|
self.all_users = all_users
|
|
60
65
|
if user_ids is not None:
|
|
61
66
|
self.user_ids = user_ids
|
|
62
67
|
|
|
68
|
+
@property
|
|
69
|
+
def all_org_users(self) -> 'bool':
|
|
70
|
+
"""Gets the all_org_users of this V1ResourceVisibility. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The all_org_users of this V1ResourceVisibility. # noqa: E501
|
|
74
|
+
:rtype: bool
|
|
75
|
+
"""
|
|
76
|
+
return self._all_org_users
|
|
77
|
+
|
|
78
|
+
@all_org_users.setter
|
|
79
|
+
def all_org_users(self, all_org_users: 'bool'):
|
|
80
|
+
"""Sets the all_org_users of this V1ResourceVisibility.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param all_org_users: The all_org_users of this V1ResourceVisibility. # noqa: E501
|
|
84
|
+
:type: bool
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._all_org_users = all_org_users
|
|
88
|
+
|
|
63
89
|
@property
|
|
64
90
|
def all_users(self) -> 'bool':
|
|
65
91
|
"""Gets the all_users of this V1ResourceVisibility. # noqa: E501
|
|
@@ -0,0 +1,97 @@
|
|
|
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 V1UpdateLitRepositoryResponse(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
|
+
}
|
|
45
|
+
|
|
46
|
+
attribute_map = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self): # noqa: E501
|
|
50
|
+
"""V1UpdateLitRepositoryResponse - a model defined in Swagger""" # noqa: E501
|
|
51
|
+
self.discriminator = None
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict:
|
|
54
|
+
"""Returns the model properties as a dict"""
|
|
55
|
+
result = {}
|
|
56
|
+
|
|
57
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
58
|
+
value = getattr(self, attr)
|
|
59
|
+
if isinstance(value, list):
|
|
60
|
+
result[attr] = list(map(
|
|
61
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
62
|
+
value
|
|
63
|
+
))
|
|
64
|
+
elif hasattr(value, "to_dict"):
|
|
65
|
+
result[attr] = value.to_dict()
|
|
66
|
+
elif isinstance(value, dict):
|
|
67
|
+
result[attr] = dict(map(
|
|
68
|
+
lambda item: (item[0], item[1].to_dict())
|
|
69
|
+
if hasattr(item[1], "to_dict") else item,
|
|
70
|
+
value.items()
|
|
71
|
+
))
|
|
72
|
+
else:
|
|
73
|
+
result[attr] = value
|
|
74
|
+
if issubclass(V1UpdateLitRepositoryResponse, dict):
|
|
75
|
+
for key, value in self.items():
|
|
76
|
+
result[key] = value
|
|
77
|
+
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
def to_str(self) -> str:
|
|
81
|
+
"""Returns the string representation of the model"""
|
|
82
|
+
return pprint.pformat(self.to_dict())
|
|
83
|
+
|
|
84
|
+
def __repr__(self) -> str:
|
|
85
|
+
"""For `print` and `pprint`"""
|
|
86
|
+
return self.to_str()
|
|
87
|
+
|
|
88
|
+
def __eq__(self, other: 'V1UpdateLitRepositoryResponse') -> bool:
|
|
89
|
+
"""Returns true if both objects are equal"""
|
|
90
|
+
if not isinstance(other, V1UpdateLitRepositoryResponse):
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
return self.__dict__ == other.__dict__
|
|
94
|
+
|
|
95
|
+
def __ne__(self, other: 'V1UpdateLitRepositoryResponse') -> bool:
|
|
96
|
+
"""Returns true if both objects are not equal"""
|
|
97
|
+
return not self == other
|