anyscale 0.26.28__py3-none-any.whl → 0.26.30__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.
- anyscale/__init__.py +10 -0
- anyscale/_private/anyscale_client/anyscale_client.py +69 -0
- anyscale/_private/anyscale_client/common.py +38 -0
- anyscale/_private/anyscale_client/fake_anyscale_client.py +11 -0
- anyscale/_private/docgen/__main__.py +4 -18
- anyscale/_private/docgen/api.md +0 -125
- anyscale/_private/docgen/models.md +0 -111
- anyscale/client/README.md +0 -6
- anyscale/client/openapi_client/__init__.py +0 -4
- anyscale/client/openapi_client/api/default_api.py +0 -228
- anyscale/client/openapi_client/models/__init__.py +0 -4
- anyscale/client/openapi_client/models/workload_info.py +59 -3
- anyscale/commands/command_examples.py +10 -0
- anyscale/commands/job_queue_commands.py +295 -104
- anyscale/commands/list_util.py +14 -1
- anyscale/commands/machine_pool_commands.py +25 -11
- anyscale/commands/service_commands.py +10 -14
- anyscale/commands/workspace_commands_v2.py +462 -25
- anyscale/controllers/job_controller.py +5 -210
- anyscale/job_queue/__init__.py +89 -0
- anyscale/job_queue/_private/job_queue_sdk.py +158 -0
- anyscale/job_queue/commands.py +130 -0
- anyscale/job_queue/models.py +284 -0
- anyscale/scripts.py +1 -1
- anyscale/sdk/anyscale_client/__init__.py +0 -11
- anyscale/sdk/anyscale_client/api/default_api.py +140 -1433
- anyscale/sdk/anyscale_client/models/__init__.py +0 -11
- anyscale/service/__init__.py +4 -1
- anyscale/service/_private/service_sdk.py +5 -0
- anyscale/service/commands.py +4 -2
- anyscale/utils/ssh_websocket_proxy.py +178 -0
- anyscale/version.py +1 -1
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/METADATA +3 -1
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/RECORD +39 -49
- anyscale/client/openapi_client/models/serve_deployment_fast_api_docs_status.py +0 -123
- anyscale/client/openapi_client/models/servedeploymentfastapidocsstatus_response.py +0 -121
- anyscale/client/openapi_client/models/web_terminal.py +0 -121
- anyscale/client/openapi_client/models/webterminal_response.py +0 -121
- anyscale/sdk/anyscale_client/models/cluster_environment_build_log_response.py +0 -123
- anyscale/sdk/anyscale_client/models/clusterenvironmentbuildlogresponse_response.py +0 -121
- anyscale/sdk/anyscale_client/models/create_cloud.py +0 -518
- anyscale/sdk/anyscale_client/models/object_storage_config.py +0 -122
- anyscale/sdk/anyscale_client/models/object_storage_config_s3.py +0 -256
- anyscale/sdk/anyscale_client/models/objectstorageconfig_response.py +0 -121
- anyscale/sdk/anyscale_client/models/session_operation.py +0 -266
- anyscale/sdk/anyscale_client/models/session_operation_type.py +0 -101
- anyscale/sdk/anyscale_client/models/sessionoperation_response.py +0 -121
- anyscale/sdk/anyscale_client/models/update_cloud.py +0 -150
- anyscale/sdk/anyscale_client/models/update_project.py +0 -150
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/LICENSE +0 -0
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/NOTICE +0 -0
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/WHEEL +0 -0
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.28.dist-info → anyscale-0.26.30.dist-info}/top_level.txt +0 -0
@@ -1,122 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Anyscale API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by: https://openapi-generator.tech
|
10
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
15
|
-
|
16
|
-
import six
|
17
|
-
|
18
|
-
from anyscale_client.configuration import Configuration
|
19
|
-
|
20
|
-
|
21
|
-
class ObjectStorageConfig(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
|
-
|
25
|
-
Do not edit the class manually.
|
26
|
-
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
Attributes:
|
30
|
-
openapi_types (dict): The key is attribute name
|
31
|
-
and the value is attribute type.
|
32
|
-
attribute_map (dict): The key is attribute name
|
33
|
-
and the value is json key in definition.
|
34
|
-
"""
|
35
|
-
openapi_types = {
|
36
|
-
's3': 'ObjectStorageConfigS3'
|
37
|
-
}
|
38
|
-
|
39
|
-
attribute_map = {
|
40
|
-
's3': 's3'
|
41
|
-
}
|
42
|
-
|
43
|
-
def __init__(self, s3=None, local_vars_configuration=None): # noqa: E501
|
44
|
-
"""ObjectStorageConfig - a model defined in OpenAPI""" # noqa: E501
|
45
|
-
if local_vars_configuration is None:
|
46
|
-
local_vars_configuration = Configuration()
|
47
|
-
self.local_vars_configuration = local_vars_configuration
|
48
|
-
|
49
|
-
self._s3 = None
|
50
|
-
self.discriminator = None
|
51
|
-
|
52
|
-
if s3 is not None:
|
53
|
-
self.s3 = s3
|
54
|
-
|
55
|
-
@property
|
56
|
-
def s3(self):
|
57
|
-
"""Gets the s3 of this ObjectStorageConfig. # noqa: E501
|
58
|
-
|
59
|
-
S3 configuration # noqa: E501
|
60
|
-
|
61
|
-
:return: The s3 of this ObjectStorageConfig. # noqa: E501
|
62
|
-
:rtype: ObjectStorageConfigS3
|
63
|
-
"""
|
64
|
-
return self._s3
|
65
|
-
|
66
|
-
@s3.setter
|
67
|
-
def s3(self, s3):
|
68
|
-
"""Sets the s3 of this ObjectStorageConfig.
|
69
|
-
|
70
|
-
S3 configuration # noqa: E501
|
71
|
-
|
72
|
-
:param s3: The s3 of this ObjectStorageConfig. # noqa: E501
|
73
|
-
:type: ObjectStorageConfigS3
|
74
|
-
"""
|
75
|
-
|
76
|
-
self._s3 = s3
|
77
|
-
|
78
|
-
def to_dict(self):
|
79
|
-
"""Returns the model properties as a dict"""
|
80
|
-
result = {}
|
81
|
-
|
82
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
83
|
-
value = getattr(self, attr)
|
84
|
-
if isinstance(value, list):
|
85
|
-
result[attr] = list(map(
|
86
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
87
|
-
value
|
88
|
-
))
|
89
|
-
elif hasattr(value, "to_dict"):
|
90
|
-
result[attr] = value.to_dict()
|
91
|
-
elif isinstance(value, dict):
|
92
|
-
result[attr] = dict(map(
|
93
|
-
lambda item: (item[0], item[1].to_dict())
|
94
|
-
if hasattr(item[1], "to_dict") else item,
|
95
|
-
value.items()
|
96
|
-
))
|
97
|
-
else:
|
98
|
-
result[attr] = value
|
99
|
-
|
100
|
-
return result
|
101
|
-
|
102
|
-
def to_str(self):
|
103
|
-
"""Returns the string representation of the model"""
|
104
|
-
return pprint.pformat(self.to_dict())
|
105
|
-
|
106
|
-
def __repr__(self):
|
107
|
-
"""For `print` and `pprint`"""
|
108
|
-
return self.to_str()
|
109
|
-
|
110
|
-
def __eq__(self, other):
|
111
|
-
"""Returns true if both objects are equal"""
|
112
|
-
if not isinstance(other, ObjectStorageConfig):
|
113
|
-
return False
|
114
|
-
|
115
|
-
return self.to_dict() == other.to_dict()
|
116
|
-
|
117
|
-
def __ne__(self, other):
|
118
|
-
"""Returns true if both objects are not equal"""
|
119
|
-
if not isinstance(other, ObjectStorageConfig):
|
120
|
-
return True
|
121
|
-
|
122
|
-
return self.to_dict() != other.to_dict()
|
@@ -1,256 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Anyscale API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by: https://openapi-generator.tech
|
10
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
15
|
-
|
16
|
-
import six
|
17
|
-
|
18
|
-
from anyscale_client.configuration import Configuration
|
19
|
-
|
20
|
-
|
21
|
-
class ObjectStorageConfigS3(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
|
-
|
25
|
-
Do not edit the class manually.
|
26
|
-
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
Attributes:
|
30
|
-
openapi_types (dict): The key is attribute name
|
31
|
-
and the value is attribute type.
|
32
|
-
attribute_map (dict): The key is attribute name
|
33
|
-
and the value is json key in definition.
|
34
|
-
"""
|
35
|
-
openapi_types = {
|
36
|
-
'region': 'str',
|
37
|
-
'bucket': 'str',
|
38
|
-
'path': 'str',
|
39
|
-
'aws_access_key_id': 'str',
|
40
|
-
'aws_secret_access_key': 'str',
|
41
|
-
'aws_session_token': 'str'
|
42
|
-
}
|
43
|
-
|
44
|
-
attribute_map = {
|
45
|
-
'region': 'region',
|
46
|
-
'bucket': 'bucket',
|
47
|
-
'path': 'path',
|
48
|
-
'aws_access_key_id': 'aws_access_key_id',
|
49
|
-
'aws_secret_access_key': 'aws_secret_access_key',
|
50
|
-
'aws_session_token': 'aws_session_token'
|
51
|
-
}
|
52
|
-
|
53
|
-
def __init__(self, region=None, bucket=None, path=None, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, local_vars_configuration=None): # noqa: E501
|
54
|
-
"""ObjectStorageConfigS3 - a model defined in OpenAPI""" # noqa: E501
|
55
|
-
if local_vars_configuration is None:
|
56
|
-
local_vars_configuration = Configuration()
|
57
|
-
self.local_vars_configuration = local_vars_configuration
|
58
|
-
|
59
|
-
self._region = None
|
60
|
-
self._bucket = None
|
61
|
-
self._path = None
|
62
|
-
self._aws_access_key_id = None
|
63
|
-
self._aws_secret_access_key = None
|
64
|
-
self._aws_session_token = None
|
65
|
-
self.discriminator = None
|
66
|
-
|
67
|
-
self.region = region
|
68
|
-
self.bucket = bucket
|
69
|
-
self.path = path
|
70
|
-
self.aws_access_key_id = aws_access_key_id
|
71
|
-
self.aws_secret_access_key = aws_secret_access_key
|
72
|
-
self.aws_session_token = aws_session_token
|
73
|
-
|
74
|
-
@property
|
75
|
-
def region(self):
|
76
|
-
"""Gets the region of this ObjectStorageConfigS3. # noqa: E501
|
77
|
-
|
78
|
-
|
79
|
-
:return: The region of this ObjectStorageConfigS3. # noqa: E501
|
80
|
-
:rtype: str
|
81
|
-
"""
|
82
|
-
return self._region
|
83
|
-
|
84
|
-
@region.setter
|
85
|
-
def region(self, region):
|
86
|
-
"""Sets the region of this ObjectStorageConfigS3.
|
87
|
-
|
88
|
-
|
89
|
-
:param region: The region of this ObjectStorageConfigS3. # noqa: E501
|
90
|
-
:type: str
|
91
|
-
"""
|
92
|
-
if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501
|
93
|
-
raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501
|
94
|
-
|
95
|
-
self._region = region
|
96
|
-
|
97
|
-
@property
|
98
|
-
def bucket(self):
|
99
|
-
"""Gets the bucket of this ObjectStorageConfigS3. # noqa: E501
|
100
|
-
|
101
|
-
|
102
|
-
:return: The bucket of this ObjectStorageConfigS3. # noqa: E501
|
103
|
-
:rtype: str
|
104
|
-
"""
|
105
|
-
return self._bucket
|
106
|
-
|
107
|
-
@bucket.setter
|
108
|
-
def bucket(self, bucket):
|
109
|
-
"""Sets the bucket of this ObjectStorageConfigS3.
|
110
|
-
|
111
|
-
|
112
|
-
:param bucket: The bucket of this ObjectStorageConfigS3. # noqa: E501
|
113
|
-
:type: str
|
114
|
-
"""
|
115
|
-
if self.local_vars_configuration.client_side_validation and bucket is None: # noqa: E501
|
116
|
-
raise ValueError("Invalid value for `bucket`, must not be `None`") # noqa: E501
|
117
|
-
|
118
|
-
self._bucket = bucket
|
119
|
-
|
120
|
-
@property
|
121
|
-
def path(self):
|
122
|
-
"""Gets the path of this ObjectStorageConfigS3. # noqa: E501
|
123
|
-
|
124
|
-
|
125
|
-
:return: The path of this ObjectStorageConfigS3. # noqa: E501
|
126
|
-
:rtype: str
|
127
|
-
"""
|
128
|
-
return self._path
|
129
|
-
|
130
|
-
@path.setter
|
131
|
-
def path(self, path):
|
132
|
-
"""Sets the path of this ObjectStorageConfigS3.
|
133
|
-
|
134
|
-
|
135
|
-
:param path: The path of this ObjectStorageConfigS3. # noqa: E501
|
136
|
-
:type: str
|
137
|
-
"""
|
138
|
-
if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501
|
139
|
-
raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501
|
140
|
-
|
141
|
-
self._path = path
|
142
|
-
|
143
|
-
@property
|
144
|
-
def aws_access_key_id(self):
|
145
|
-
"""Gets the aws_access_key_id of this ObjectStorageConfigS3. # noqa: E501
|
146
|
-
|
147
|
-
|
148
|
-
:return: The aws_access_key_id of this ObjectStorageConfigS3. # noqa: E501
|
149
|
-
:rtype: str
|
150
|
-
"""
|
151
|
-
return self._aws_access_key_id
|
152
|
-
|
153
|
-
@aws_access_key_id.setter
|
154
|
-
def aws_access_key_id(self, aws_access_key_id):
|
155
|
-
"""Sets the aws_access_key_id of this ObjectStorageConfigS3.
|
156
|
-
|
157
|
-
|
158
|
-
:param aws_access_key_id: The aws_access_key_id of this ObjectStorageConfigS3. # noqa: E501
|
159
|
-
:type: str
|
160
|
-
"""
|
161
|
-
if self.local_vars_configuration.client_side_validation and aws_access_key_id is None: # noqa: E501
|
162
|
-
raise ValueError("Invalid value for `aws_access_key_id`, must not be `None`") # noqa: E501
|
163
|
-
|
164
|
-
self._aws_access_key_id = aws_access_key_id
|
165
|
-
|
166
|
-
@property
|
167
|
-
def aws_secret_access_key(self):
|
168
|
-
"""Gets the aws_secret_access_key of this ObjectStorageConfigS3. # noqa: E501
|
169
|
-
|
170
|
-
|
171
|
-
:return: The aws_secret_access_key of this ObjectStorageConfigS3. # noqa: E501
|
172
|
-
:rtype: str
|
173
|
-
"""
|
174
|
-
return self._aws_secret_access_key
|
175
|
-
|
176
|
-
@aws_secret_access_key.setter
|
177
|
-
def aws_secret_access_key(self, aws_secret_access_key):
|
178
|
-
"""Sets the aws_secret_access_key of this ObjectStorageConfigS3.
|
179
|
-
|
180
|
-
|
181
|
-
:param aws_secret_access_key: The aws_secret_access_key of this ObjectStorageConfigS3. # noqa: E501
|
182
|
-
:type: str
|
183
|
-
"""
|
184
|
-
if self.local_vars_configuration.client_side_validation and aws_secret_access_key is None: # noqa: E501
|
185
|
-
raise ValueError("Invalid value for `aws_secret_access_key`, must not be `None`") # noqa: E501
|
186
|
-
|
187
|
-
self._aws_secret_access_key = aws_secret_access_key
|
188
|
-
|
189
|
-
@property
|
190
|
-
def aws_session_token(self):
|
191
|
-
"""Gets the aws_session_token of this ObjectStorageConfigS3. # noqa: E501
|
192
|
-
|
193
|
-
|
194
|
-
:return: The aws_session_token of this ObjectStorageConfigS3. # noqa: E501
|
195
|
-
:rtype: str
|
196
|
-
"""
|
197
|
-
return self._aws_session_token
|
198
|
-
|
199
|
-
@aws_session_token.setter
|
200
|
-
def aws_session_token(self, aws_session_token):
|
201
|
-
"""Sets the aws_session_token of this ObjectStorageConfigS3.
|
202
|
-
|
203
|
-
|
204
|
-
:param aws_session_token: The aws_session_token of this ObjectStorageConfigS3. # noqa: E501
|
205
|
-
:type: str
|
206
|
-
"""
|
207
|
-
if self.local_vars_configuration.client_side_validation and aws_session_token is None: # noqa: E501
|
208
|
-
raise ValueError("Invalid value for `aws_session_token`, must not be `None`") # noqa: E501
|
209
|
-
|
210
|
-
self._aws_session_token = aws_session_token
|
211
|
-
|
212
|
-
def to_dict(self):
|
213
|
-
"""Returns the model properties as a dict"""
|
214
|
-
result = {}
|
215
|
-
|
216
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
217
|
-
value = getattr(self, attr)
|
218
|
-
if isinstance(value, list):
|
219
|
-
result[attr] = list(map(
|
220
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
221
|
-
value
|
222
|
-
))
|
223
|
-
elif hasattr(value, "to_dict"):
|
224
|
-
result[attr] = value.to_dict()
|
225
|
-
elif isinstance(value, dict):
|
226
|
-
result[attr] = dict(map(
|
227
|
-
lambda item: (item[0], item[1].to_dict())
|
228
|
-
if hasattr(item[1], "to_dict") else item,
|
229
|
-
value.items()
|
230
|
-
))
|
231
|
-
else:
|
232
|
-
result[attr] = value
|
233
|
-
|
234
|
-
return result
|
235
|
-
|
236
|
-
def to_str(self):
|
237
|
-
"""Returns the string representation of the model"""
|
238
|
-
return pprint.pformat(self.to_dict())
|
239
|
-
|
240
|
-
def __repr__(self):
|
241
|
-
"""For `print` and `pprint`"""
|
242
|
-
return self.to_str()
|
243
|
-
|
244
|
-
def __eq__(self, other):
|
245
|
-
"""Returns true if both objects are equal"""
|
246
|
-
if not isinstance(other, ObjectStorageConfigS3):
|
247
|
-
return False
|
248
|
-
|
249
|
-
return self.to_dict() == other.to_dict()
|
250
|
-
|
251
|
-
def __ne__(self, other):
|
252
|
-
"""Returns true if both objects are not equal"""
|
253
|
-
if not isinstance(other, ObjectStorageConfigS3):
|
254
|
-
return True
|
255
|
-
|
256
|
-
return self.to_dict() != other.to_dict()
|
@@ -1,121 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Anyscale API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by: https://openapi-generator.tech
|
10
|
-
"""
|
11
|
-
|
12
|
-
|
13
|
-
import pprint
|
14
|
-
import re # noqa: F401
|
15
|
-
|
16
|
-
import six
|
17
|
-
|
18
|
-
from anyscale_client.configuration import Configuration
|
19
|
-
|
20
|
-
|
21
|
-
class ObjectstorageconfigResponse(object):
|
22
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
-
Ref: https://openapi-generator.tech
|
24
|
-
|
25
|
-
Do not edit the class manually.
|
26
|
-
"""
|
27
|
-
|
28
|
-
"""
|
29
|
-
Attributes:
|
30
|
-
openapi_types (dict): The key is attribute name
|
31
|
-
and the value is attribute type.
|
32
|
-
attribute_map (dict): The key is attribute name
|
33
|
-
and the value is json key in definition.
|
34
|
-
"""
|
35
|
-
openapi_types = {
|
36
|
-
'result': 'ObjectStorageConfig'
|
37
|
-
}
|
38
|
-
|
39
|
-
attribute_map = {
|
40
|
-
'result': 'result'
|
41
|
-
}
|
42
|
-
|
43
|
-
def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
|
44
|
-
"""ObjectstorageconfigResponse - a model defined in OpenAPI""" # noqa: E501
|
45
|
-
if local_vars_configuration is None:
|
46
|
-
local_vars_configuration = Configuration()
|
47
|
-
self.local_vars_configuration = local_vars_configuration
|
48
|
-
|
49
|
-
self._result = None
|
50
|
-
self.discriminator = None
|
51
|
-
|
52
|
-
self.result = result
|
53
|
-
|
54
|
-
@property
|
55
|
-
def result(self):
|
56
|
-
"""Gets the result of this ObjectstorageconfigResponse. # noqa: E501
|
57
|
-
|
58
|
-
|
59
|
-
:return: The result of this ObjectstorageconfigResponse. # noqa: E501
|
60
|
-
:rtype: ObjectStorageConfig
|
61
|
-
"""
|
62
|
-
return self._result
|
63
|
-
|
64
|
-
@result.setter
|
65
|
-
def result(self, result):
|
66
|
-
"""Sets the result of this ObjectstorageconfigResponse.
|
67
|
-
|
68
|
-
|
69
|
-
:param result: The result of this ObjectstorageconfigResponse. # noqa: E501
|
70
|
-
:type: ObjectStorageConfig
|
71
|
-
"""
|
72
|
-
if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501
|
73
|
-
raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
|
74
|
-
|
75
|
-
self._result = result
|
76
|
-
|
77
|
-
def to_dict(self):
|
78
|
-
"""Returns the model properties as a dict"""
|
79
|
-
result = {}
|
80
|
-
|
81
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
82
|
-
value = getattr(self, attr)
|
83
|
-
if isinstance(value, list):
|
84
|
-
result[attr] = list(map(
|
85
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
86
|
-
value
|
87
|
-
))
|
88
|
-
elif hasattr(value, "to_dict"):
|
89
|
-
result[attr] = value.to_dict()
|
90
|
-
elif isinstance(value, dict):
|
91
|
-
result[attr] = dict(map(
|
92
|
-
lambda item: (item[0], item[1].to_dict())
|
93
|
-
if hasattr(item[1], "to_dict") else item,
|
94
|
-
value.items()
|
95
|
-
))
|
96
|
-
else:
|
97
|
-
result[attr] = value
|
98
|
-
|
99
|
-
return result
|
100
|
-
|
101
|
-
def to_str(self):
|
102
|
-
"""Returns the string representation of the model"""
|
103
|
-
return pprint.pformat(self.to_dict())
|
104
|
-
|
105
|
-
def __repr__(self):
|
106
|
-
"""For `print` and `pprint`"""
|
107
|
-
return self.to_str()
|
108
|
-
|
109
|
-
def __eq__(self, other):
|
110
|
-
"""Returns true if both objects are equal"""
|
111
|
-
if not isinstance(other, ObjectstorageconfigResponse):
|
112
|
-
return False
|
113
|
-
|
114
|
-
return self.to_dict() == other.to_dict()
|
115
|
-
|
116
|
-
def __ne__(self, other):
|
117
|
-
"""Returns true if both objects are not equal"""
|
118
|
-
if not isinstance(other, ObjectstorageconfigResponse):
|
119
|
-
return True
|
120
|
-
|
121
|
-
return self.to_dict() != other.to_dict()
|