anyscale 0.26.27__py3-none-any.whl → 0.26.29__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 (48) hide show
  1. anyscale/_private/docgen/__main__.py +0 -18
  2. anyscale/_private/docgen/api.md +0 -125
  3. anyscale/_private/docgen/models.md +1 -111
  4. anyscale/client/README.md +0 -6
  5. anyscale/client/openapi_client/__init__.py +0 -4
  6. anyscale/client/openapi_client/api/default_api.py +0 -228
  7. anyscale/client/openapi_client/models/__init__.py +0 -4
  8. anyscale/client/openapi_client/models/cloud.py +31 -3
  9. anyscale/client/openapi_client/models/cloud_with_cloud_resource.py +29 -1
  10. anyscale/client/openapi_client/models/cloud_with_cloud_resource_gcp.py +29 -1
  11. anyscale/client/openapi_client/models/dataset_metrics.py +2 -3
  12. anyscale/client/openapi_client/models/operator_metrics.py +2 -3
  13. anyscale/client/openapi_client/models/workload_info.py +59 -3
  14. anyscale/cloud/models.py +13 -0
  15. anyscale/commands/machine_pool_commands.py +11 -9
  16. anyscale/commands/service_commands.py +4 -2
  17. anyscale/controllers/cloud_controller.py +0 -1
  18. anyscale/formatters/clouds_formatter.py +8 -0
  19. anyscale/sdk/anyscale_client/__init__.py +0 -11
  20. anyscale/sdk/anyscale_client/api/default_api.py +140 -1433
  21. anyscale/sdk/anyscale_client/models/__init__.py +0 -11
  22. anyscale/sdk/anyscale_client/models/cloud.py +31 -3
  23. anyscale/service/__init__.py +4 -1
  24. anyscale/service/_private/service_sdk.py +5 -0
  25. anyscale/service/commands.py +4 -2
  26. anyscale/version.py +1 -1
  27. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/METADATA +1 -1
  28. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/RECORD +33 -48
  29. anyscale/client/openapi_client/models/serve_deployment_fast_api_docs_status.py +0 -123
  30. anyscale/client/openapi_client/models/servedeploymentfastapidocsstatus_response.py +0 -121
  31. anyscale/client/openapi_client/models/web_terminal.py +0 -121
  32. anyscale/client/openapi_client/models/webterminal_response.py +0 -121
  33. anyscale/sdk/anyscale_client/models/cluster_environment_build_log_response.py +0 -123
  34. anyscale/sdk/anyscale_client/models/clusterenvironmentbuildlogresponse_response.py +0 -121
  35. anyscale/sdk/anyscale_client/models/create_cloud.py +0 -518
  36. anyscale/sdk/anyscale_client/models/object_storage_config.py +0 -122
  37. anyscale/sdk/anyscale_client/models/object_storage_config_s3.py +0 -256
  38. anyscale/sdk/anyscale_client/models/objectstorageconfig_response.py +0 -121
  39. anyscale/sdk/anyscale_client/models/session_operation.py +0 -266
  40. anyscale/sdk/anyscale_client/models/session_operation_type.py +0 -101
  41. anyscale/sdk/anyscale_client/models/sessionoperation_response.py +0 -121
  42. anyscale/sdk/anyscale_client/models/update_cloud.py +0 -150
  43. anyscale/sdk/anyscale_client/models/update_project.py +0 -150
  44. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/LICENSE +0 -0
  45. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/NOTICE +0 -0
  46. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/WHEEL +0 -0
  47. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/entry_points.txt +0 -0
  48. {anyscale-0.26.27.dist-info → anyscale-0.26.29.dist-info}/top_level.txt +0 -0
@@ -1,518 +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 CreateCloud(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
- 'name': 'str',
37
- 'provider': 'CloudProviders',
38
- 'compute_stack': 'ComputeStack',
39
- 'region': 'str',
40
- 'credentials': 'str',
41
- 'config': 'CloudConfig',
42
- 'is_k8s': 'bool',
43
- 'is_aioa': 'bool',
44
- 'availability_zones': 'list[str]',
45
- 'is_bring_your_own_resource': 'bool',
46
- 'is_private_cloud': 'bool',
47
- 'cluster_management_stack_version': 'ClusterManagementStackVersions',
48
- 'is_private_service_cloud': 'bool',
49
- 'auto_add_user': 'bool',
50
- 'external_id': 'str'
51
- }
52
-
53
- attribute_map = {
54
- 'name': 'name',
55
- 'provider': 'provider',
56
- 'compute_stack': 'compute_stack',
57
- 'region': 'region',
58
- 'credentials': 'credentials',
59
- 'config': 'config',
60
- 'is_k8s': 'is_k8s',
61
- 'is_aioa': 'is_aioa',
62
- 'availability_zones': 'availability_zones',
63
- 'is_bring_your_own_resource': 'is_bring_your_own_resource',
64
- 'is_private_cloud': 'is_private_cloud',
65
- 'cluster_management_stack_version': 'cluster_management_stack_version',
66
- 'is_private_service_cloud': 'is_private_service_cloud',
67
- 'auto_add_user': 'auto_add_user',
68
- 'external_id': 'external_id'
69
- }
70
-
71
- def __init__(self, name=None, provider=None, compute_stack=None, region=None, credentials=None, config=None, is_k8s=False, is_aioa=False, availability_zones=None, is_bring_your_own_resource=None, is_private_cloud=False, cluster_management_stack_version=None, is_private_service_cloud=None, auto_add_user=False, external_id=None, local_vars_configuration=None): # noqa: E501
72
- """CreateCloud - a model defined in OpenAPI""" # noqa: E501
73
- if local_vars_configuration is None:
74
- local_vars_configuration = Configuration()
75
- self.local_vars_configuration = local_vars_configuration
76
-
77
- self._name = None
78
- self._provider = None
79
- self._compute_stack = None
80
- self._region = None
81
- self._credentials = None
82
- self._config = None
83
- self._is_k8s = None
84
- self._is_aioa = None
85
- self._availability_zones = None
86
- self._is_bring_your_own_resource = None
87
- self._is_private_cloud = None
88
- self._cluster_management_stack_version = None
89
- self._is_private_service_cloud = None
90
- self._auto_add_user = None
91
- self._external_id = None
92
- self.discriminator = None
93
-
94
- self.name = name
95
- self.provider = provider
96
- if compute_stack is not None:
97
- self.compute_stack = compute_stack
98
- self.region = region
99
- self.credentials = credentials
100
- if config is not None:
101
- self.config = config
102
- if is_k8s is not None:
103
- self.is_k8s = is_k8s
104
- if is_aioa is not None:
105
- self.is_aioa = is_aioa
106
- if availability_zones is not None:
107
- self.availability_zones = availability_zones
108
- if is_bring_your_own_resource is not None:
109
- self.is_bring_your_own_resource = is_bring_your_own_resource
110
- if is_private_cloud is not None:
111
- self.is_private_cloud = is_private_cloud
112
- if cluster_management_stack_version is not None:
113
- self.cluster_management_stack_version = cluster_management_stack_version
114
- if is_private_service_cloud is not None:
115
- self.is_private_service_cloud = is_private_service_cloud
116
- if auto_add_user is not None:
117
- self.auto_add_user = auto_add_user
118
- if external_id is not None:
119
- self.external_id = external_id
120
-
121
- @property
122
- def name(self):
123
- """Gets the name of this CreateCloud. # noqa: E501
124
-
125
- Name of this Cloud. # noqa: E501
126
-
127
- :return: The name of this CreateCloud. # noqa: E501
128
- :rtype: str
129
- """
130
- return self._name
131
-
132
- @name.setter
133
- def name(self, name):
134
- """Sets the name of this CreateCloud.
135
-
136
- Name of this Cloud. # noqa: E501
137
-
138
- :param name: The name of this CreateCloud. # noqa: E501
139
- :type: str
140
- """
141
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
142
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
143
-
144
- self._name = name
145
-
146
- @property
147
- def provider(self):
148
- """Gets the provider of this CreateCloud. # noqa: E501
149
-
150
- Provider of this Cloud (e.g. AWS). # noqa: E501
151
-
152
- :return: The provider of this CreateCloud. # noqa: E501
153
- :rtype: CloudProviders
154
- """
155
- return self._provider
156
-
157
- @provider.setter
158
- def provider(self, provider):
159
- """Sets the provider of this CreateCloud.
160
-
161
- Provider of this Cloud (e.g. AWS). # noqa: E501
162
-
163
- :param provider: The provider of this CreateCloud. # noqa: E501
164
- :type: CloudProviders
165
- """
166
- if self.local_vars_configuration.client_side_validation and provider is None: # noqa: E501
167
- raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501
168
-
169
- self._provider = provider
170
-
171
- @property
172
- def compute_stack(self):
173
- """Gets the compute_stack of this CreateCloud. # noqa: E501
174
-
175
- The compute stack associated with this cloud's primary cloud resource. # noqa: E501
176
-
177
- :return: The compute_stack of this CreateCloud. # noqa: E501
178
- :rtype: ComputeStack
179
- """
180
- return self._compute_stack
181
-
182
- @compute_stack.setter
183
- def compute_stack(self, compute_stack):
184
- """Sets the compute_stack of this CreateCloud.
185
-
186
- The compute stack associated with this cloud's primary cloud resource. # noqa: E501
187
-
188
- :param compute_stack: The compute_stack of this CreateCloud. # noqa: E501
189
- :type: ComputeStack
190
- """
191
-
192
- self._compute_stack = compute_stack
193
-
194
- @property
195
- def region(self):
196
- """Gets the region of this CreateCloud. # noqa: E501
197
-
198
- Region this Cloud is operating in. This value needs to be supported by this Cloud's provider. (e.g. us-west-2) # noqa: E501
199
-
200
- :return: The region of this CreateCloud. # noqa: E501
201
- :rtype: str
202
- """
203
- return self._region
204
-
205
- @region.setter
206
- def region(self, region):
207
- """Sets the region of this CreateCloud.
208
-
209
- Region this Cloud is operating in. This value needs to be supported by this Cloud's provider. (e.g. us-west-2) # noqa: E501
210
-
211
- :param region: The region of this CreateCloud. # noqa: E501
212
- :type: str
213
- """
214
- if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501
215
- raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501
216
-
217
- self._region = region
218
-
219
- @property
220
- def credentials(self):
221
- """Gets the credentials of this CreateCloud. # noqa: E501
222
-
223
- Credentials needed to interact with this Cloud. # noqa: E501
224
-
225
- :return: The credentials of this CreateCloud. # noqa: E501
226
- :rtype: str
227
- """
228
- return self._credentials
229
-
230
- @credentials.setter
231
- def credentials(self, credentials):
232
- """Sets the credentials of this CreateCloud.
233
-
234
- Credentials needed to interact with this Cloud. # noqa: E501
235
-
236
- :param credentials: The credentials of this CreateCloud. # noqa: E501
237
- :type: str
238
- """
239
- if self.local_vars_configuration.client_side_validation and credentials is None: # noqa: E501
240
- raise ValueError("Invalid value for `credentials`, must not be `None`") # noqa: E501
241
-
242
- self._credentials = credentials
243
-
244
- @property
245
- def config(self):
246
- """Gets the config of this CreateCloud. # noqa: E501
247
-
248
- Additional configurable properties of this Cloud. # noqa: E501
249
-
250
- :return: The config of this CreateCloud. # noqa: E501
251
- :rtype: CloudConfig
252
- """
253
- return self._config
254
-
255
- @config.setter
256
- def config(self, config):
257
- """Sets the config of this CreateCloud.
258
-
259
- Additional configurable properties of this Cloud. # noqa: E501
260
-
261
- :param config: The config of this CreateCloud. # noqa: E501
262
- :type: CloudConfig
263
- """
264
-
265
- self._config = config
266
-
267
- @property
268
- def is_k8s(self):
269
- """Gets the is_k8s of this CreateCloud. # noqa: E501
270
-
271
- Whether this cloud is managed via Kubernetes. # noqa: E501
272
-
273
- :return: The is_k8s of this CreateCloud. # noqa: E501
274
- :rtype: bool
275
- """
276
- return self._is_k8s
277
-
278
- @is_k8s.setter
279
- def is_k8s(self, is_k8s):
280
- """Sets the is_k8s of this CreateCloud.
281
-
282
- Whether this cloud is managed via Kubernetes. # noqa: E501
283
-
284
- :param is_k8s: The is_k8s of this CreateCloud. # noqa: E501
285
- :type: bool
286
- """
287
-
288
- self._is_k8s = is_k8s
289
-
290
- @property
291
- def is_aioa(self):
292
- """Gets the is_aioa of this CreateCloud. # noqa: E501
293
-
294
- Whether this cloud is an AIOA cloud. # noqa: E501
295
-
296
- :return: The is_aioa of this CreateCloud. # noqa: E501
297
- :rtype: bool
298
- """
299
- return self._is_aioa
300
-
301
- @is_aioa.setter
302
- def is_aioa(self, is_aioa):
303
- """Sets the is_aioa of this CreateCloud.
304
-
305
- Whether this cloud is an AIOA cloud. # noqa: E501
306
-
307
- :param is_aioa: The is_aioa of this CreateCloud. # noqa: E501
308
- :type: bool
309
- """
310
-
311
- self._is_aioa = is_aioa
312
-
313
- @property
314
- def availability_zones(self):
315
- """Gets the availability_zones of this CreateCloud. # noqa: E501
316
-
317
- The availability zones that instances of this cloud are allowed to be launched in. # noqa: E501
318
-
319
- :return: The availability_zones of this CreateCloud. # noqa: E501
320
- :rtype: list[str]
321
- """
322
- return self._availability_zones
323
-
324
- @availability_zones.setter
325
- def availability_zones(self, availability_zones):
326
- """Sets the availability_zones of this CreateCloud.
327
-
328
- The availability zones that instances of this cloud are allowed to be launched in. # noqa: E501
329
-
330
- :param availability_zones: The availability_zones of this CreateCloud. # noqa: E501
331
- :type: list[str]
332
- """
333
-
334
- self._availability_zones = availability_zones
335
-
336
- @property
337
- def is_bring_your_own_resource(self):
338
- """Gets the is_bring_your_own_resource of this CreateCloud. # noqa: E501
339
-
340
- Whether the resources of this cloud are provided by the customer. # noqa: E501
341
-
342
- :return: The is_bring_your_own_resource of this CreateCloud. # noqa: E501
343
- :rtype: bool
344
- """
345
- return self._is_bring_your_own_resource
346
-
347
- @is_bring_your_own_resource.setter
348
- def is_bring_your_own_resource(self, is_bring_your_own_resource):
349
- """Sets the is_bring_your_own_resource of this CreateCloud.
350
-
351
- Whether the resources of this cloud are provided by the customer. # noqa: E501
352
-
353
- :param is_bring_your_own_resource: The is_bring_your_own_resource of this CreateCloud. # noqa: E501
354
- :type: bool
355
- """
356
-
357
- self._is_bring_your_own_resource = is_bring_your_own_resource
358
-
359
- @property
360
- def is_private_cloud(self):
361
- """Gets the is_private_cloud of this CreateCloud. # noqa: E501
362
-
363
- Whether this cloud is a private cloud. # noqa: E501
364
-
365
- :return: The is_private_cloud of this CreateCloud. # noqa: E501
366
- :rtype: bool
367
- """
368
- return self._is_private_cloud
369
-
370
- @is_private_cloud.setter
371
- def is_private_cloud(self, is_private_cloud):
372
- """Sets the is_private_cloud of this CreateCloud.
373
-
374
- Whether this cloud is a private cloud. # noqa: E501
375
-
376
- :param is_private_cloud: The is_private_cloud of this CreateCloud. # noqa: E501
377
- :type: bool
378
- """
379
-
380
- self._is_private_cloud = is_private_cloud
381
-
382
- @property
383
- def cluster_management_stack_version(self):
384
- """Gets the cluster_management_stack_version of this CreateCloud. # noqa: E501
385
-
386
- The cluster management stack version of the cloud. # noqa: E501
387
-
388
- :return: The cluster_management_stack_version of this CreateCloud. # noqa: E501
389
- :rtype: ClusterManagementStackVersions
390
- """
391
- return self._cluster_management_stack_version
392
-
393
- @cluster_management_stack_version.setter
394
- def cluster_management_stack_version(self, cluster_management_stack_version):
395
- """Sets the cluster_management_stack_version of this CreateCloud.
396
-
397
- The cluster management stack version of the cloud. # noqa: E501
398
-
399
- :param cluster_management_stack_version: The cluster_management_stack_version of this CreateCloud. # noqa: E501
400
- :type: ClusterManagementStackVersions
401
- """
402
-
403
- self._cluster_management_stack_version = cluster_management_stack_version
404
-
405
- @property
406
- def is_private_service_cloud(self):
407
- """Gets the is_private_service_cloud of this CreateCloud. # noqa: E501
408
-
409
- Whether services created in this cloud should be private. # noqa: E501
410
-
411
- :return: The is_private_service_cloud of this CreateCloud. # noqa: E501
412
- :rtype: bool
413
- """
414
- return self._is_private_service_cloud
415
-
416
- @is_private_service_cloud.setter
417
- def is_private_service_cloud(self, is_private_service_cloud):
418
- """Sets the is_private_service_cloud of this CreateCloud.
419
-
420
- Whether services created in this cloud should be private. # noqa: E501
421
-
422
- :param is_private_service_cloud: The is_private_service_cloud of this CreateCloud. # noqa: E501
423
- :type: bool
424
- """
425
-
426
- self._is_private_service_cloud = is_private_service_cloud
427
-
428
- @property
429
- def auto_add_user(self):
430
- """Gets the auto_add_user of this CreateCloud. # noqa: E501
431
-
432
- Whether all users in the organization should be automatically added to this cloud. This field is only relevant for organizations with cloud isolation enabled, because all users in the organization automatically have access to all clouds if cloud isolation is not enabled. # noqa: E501
433
-
434
- :return: The auto_add_user of this CreateCloud. # noqa: E501
435
- :rtype: bool
436
- """
437
- return self._auto_add_user
438
-
439
- @auto_add_user.setter
440
- def auto_add_user(self, auto_add_user):
441
- """Sets the auto_add_user of this CreateCloud.
442
-
443
- Whether all users in the organization should be automatically added to this cloud. This field is only relevant for organizations with cloud isolation enabled, because all users in the organization automatically have access to all clouds if cloud isolation is not enabled. # noqa: E501
444
-
445
- :param auto_add_user: The auto_add_user of this CreateCloud. # noqa: E501
446
- :type: bool
447
- """
448
-
449
- self._auto_add_user = auto_add_user
450
-
451
- @property
452
- def external_id(self):
453
- """Gets the external_id of this CreateCloud. # noqa: E501
454
-
455
- The trust policy external ID specified by the user for the cloud control plane role. It must start with the organization ID. # noqa: E501
456
-
457
- :return: The external_id of this CreateCloud. # noqa: E501
458
- :rtype: str
459
- """
460
- return self._external_id
461
-
462
- @external_id.setter
463
- def external_id(self, external_id):
464
- """Sets the external_id of this CreateCloud.
465
-
466
- The trust policy external ID specified by the user for the cloud control plane role. It must start with the organization ID. # noqa: E501
467
-
468
- :param external_id: The external_id of this CreateCloud. # noqa: E501
469
- :type: str
470
- """
471
-
472
- self._external_id = external_id
473
-
474
- def to_dict(self):
475
- """Returns the model properties as a dict"""
476
- result = {}
477
-
478
- for attr, _ in six.iteritems(self.openapi_types):
479
- value = getattr(self, attr)
480
- if isinstance(value, list):
481
- result[attr] = list(map(
482
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
483
- value
484
- ))
485
- elif hasattr(value, "to_dict"):
486
- result[attr] = value.to_dict()
487
- elif isinstance(value, dict):
488
- result[attr] = dict(map(
489
- lambda item: (item[0], item[1].to_dict())
490
- if hasattr(item[1], "to_dict") else item,
491
- value.items()
492
- ))
493
- else:
494
- result[attr] = value
495
-
496
- return result
497
-
498
- def to_str(self):
499
- """Returns the string representation of the model"""
500
- return pprint.pformat(self.to_dict())
501
-
502
- def __repr__(self):
503
- """For `print` and `pprint`"""
504
- return self.to_str()
505
-
506
- def __eq__(self, other):
507
- """Returns true if both objects are equal"""
508
- if not isinstance(other, CreateCloud):
509
- return False
510
-
511
- return self.to_dict() == other.to_dict()
512
-
513
- def __ne__(self, other):
514
- """Returns true if both objects are not equal"""
515
- if not isinstance(other, CreateCloud):
516
- return True
517
-
518
- return self.to_dict() != other.to_dict()
@@ -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()