anyscale 0.24.86__py3-none-any.whl → 0.24.88__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 (49) hide show
  1. anyscale/__init__.py +10 -0
  2. anyscale/_private/anyscale_client/anyscale_client.py +10 -0
  3. anyscale/_private/anyscale_client/common.py +9 -0
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +28 -0
  5. anyscale/_private/docgen/__main__.py +12 -0
  6. anyscale/_private/docgen/generator.py +1 -0
  7. anyscale/client/README.md +25 -2
  8. anyscale/client/openapi_client/__init__.py +18 -2
  9. anyscale/client/openapi_client/api/default_api.py +992 -105
  10. anyscale/client/openapi_client/models/__init__.py +18 -2
  11. anyscale/client/openapi_client/models/admin_create_user.py +255 -0
  12. anyscale/client/openapi_client/models/admin_created_user.py +281 -0
  13. anyscale/client/openapi_client/models/admincreateduser_list_response.py +147 -0
  14. anyscale/client/openapi_client/models/{aggregated_instance_usage_with_cost_model.py → aggregated_instance_usage_csv.py} +100 -100
  15. anyscale/client/openapi_client/models/aggregated_usage.py +147 -0
  16. anyscale/client/openapi_client/models/aggregated_usage_query.py +236 -0
  17. anyscale/client/openapi_client/models/{aggregatedinstanceusagewithcostmodel_list_response.py → aggregatedinstanceusagecsv_list_response.py} +15 -15
  18. anyscale/client/openapi_client/models/aggregatedusage_response.py +121 -0
  19. anyscale/client/openapi_client/models/cloud_resource.py +29 -1
  20. anyscale/client/openapi_client/models/cloud_resource_gcp.py +29 -1
  21. anyscale/client/openapi_client/models/create_cloud_resource.py +29 -1
  22. anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +29 -1
  23. anyscale/client/openapi_client/models/usage_by_cloud.py +201 -0
  24. anyscale/client/openapi_client/models/usage_by_cluster.py +544 -0
  25. anyscale/client/openapi_client/models/usage_by_instance_type.py +174 -0
  26. anyscale/client/openapi_client/models/usage_by_project.py +255 -0
  27. anyscale/client/openapi_client/models/usage_by_user.py +201 -0
  28. anyscale/client/openapi_client/models/usagebycloud_list_response.py +147 -0
  29. anyscale/client/openapi_client/models/usagebycluster_list_response.py +147 -0
  30. anyscale/client/openapi_client/models/usagebyinstancetype_list_response.py +147 -0
  31. anyscale/client/openapi_client/models/usagebyproject_list_response.py +147 -0
  32. anyscale/client/openapi_client/models/usagebyuser_list_response.py +147 -0
  33. anyscale/commands/cloud_commands.py +8 -0
  34. anyscale/commands/command_examples.py +6 -0
  35. anyscale/commands/user_commands.py +49 -0
  36. anyscale/controllers/cloud_controller.py +3 -0
  37. anyscale/scripts.py +2 -0
  38. anyscale/user/__init__.py +35 -0
  39. anyscale/user/_private/user_sdk.py +32 -0
  40. anyscale/user/commands.py +42 -0
  41. anyscale/user/models.py +191 -0
  42. anyscale/version.py +1 -1
  43. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/METADATA +1 -1
  44. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/RECORD +49 -28
  45. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/LICENSE +0 -0
  46. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/NOTICE +0 -0
  47. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/WHEEL +0 -0
  48. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/entry_points.txt +0 -0
  49. {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/top_level.txt +0 -0
@@ -41,6 +41,7 @@ class CloudResourceGCP(object):
41
41
  'kubernetes_nfs_persistent_volume_claim': 'str',
42
42
  'cloud_storage_bucket_name': 'str',
43
43
  'cloud_storage_bucket_endpoint': 'str',
44
+ 'cloud_storage_bucket_region': 'str',
44
45
  'nfs_mount_targets': 'list[NFSMountTarget]',
45
46
  'nfs_mount_path': 'str',
46
47
  'gcp_vpc_id': 'str',
@@ -65,6 +66,7 @@ class CloudResourceGCP(object):
65
66
  'kubernetes_nfs_persistent_volume_claim': 'kubernetes_nfs_persistent_volume_claim',
66
67
  'cloud_storage_bucket_name': 'cloud_storage_bucket_name',
67
68
  'cloud_storage_bucket_endpoint': 'cloud_storage_bucket_endpoint',
69
+ 'cloud_storage_bucket_region': 'cloud_storage_bucket_region',
68
70
  'nfs_mount_targets': 'nfs_mount_targets',
69
71
  'nfs_mount_path': 'nfs_mount_path',
70
72
  'gcp_vpc_id': 'gcp_vpc_id',
@@ -80,7 +82,7 @@ class CloudResourceGCP(object):
80
82
  'cloud_id': 'cloud_id'
81
83
  }
82
84
 
83
- def __init__(self, compute_stack=None, kubernetes_ingress_external_address=None, kubernetes_namespaces=None, kubernetes_zones=None, kubernetes_dataplane_identity=None, kubernetes_nfs_persistent_volume_claim=None, cloud_storage_bucket_name=None, cloud_storage_bucket_endpoint=None, nfs_mount_targets=None, nfs_mount_path=None, gcp_vpc_id=None, gcp_subnet_ids=None, gcp_cluster_node_service_account_email=None, gcp_anyscale_iam_service_account_email=None, gcp_filestore_config=None, gcp_firewall_policy_ids=None, gcp_cloud_storage_bucket_id=None, gcp_deployment_manager_id=None, memorystore_instance_config=None, id=None, cloud_id=None, local_vars_configuration=None): # noqa: E501
85
+ def __init__(self, compute_stack=None, kubernetes_ingress_external_address=None, kubernetes_namespaces=None, kubernetes_zones=None, kubernetes_dataplane_identity=None, kubernetes_nfs_persistent_volume_claim=None, cloud_storage_bucket_name=None, cloud_storage_bucket_endpoint=None, cloud_storage_bucket_region=None, nfs_mount_targets=None, nfs_mount_path=None, gcp_vpc_id=None, gcp_subnet_ids=None, gcp_cluster_node_service_account_email=None, gcp_anyscale_iam_service_account_email=None, gcp_filestore_config=None, gcp_firewall_policy_ids=None, gcp_cloud_storage_bucket_id=None, gcp_deployment_manager_id=None, memorystore_instance_config=None, id=None, cloud_id=None, local_vars_configuration=None): # noqa: E501
84
86
  """CloudResourceGCP - a model defined in OpenAPI""" # noqa: E501
85
87
  if local_vars_configuration is None:
86
88
  local_vars_configuration = Configuration()
@@ -94,6 +96,7 @@ class CloudResourceGCP(object):
94
96
  self._kubernetes_nfs_persistent_volume_claim = None
95
97
  self._cloud_storage_bucket_name = None
96
98
  self._cloud_storage_bucket_endpoint = None
99
+ self._cloud_storage_bucket_region = None
97
100
  self._nfs_mount_targets = None
98
101
  self._nfs_mount_path = None
99
102
  self._gcp_vpc_id = None
@@ -125,6 +128,8 @@ class CloudResourceGCP(object):
125
128
  self.cloud_storage_bucket_name = cloud_storage_bucket_name
126
129
  if cloud_storage_bucket_endpoint is not None:
127
130
  self.cloud_storage_bucket_endpoint = cloud_storage_bucket_endpoint
131
+ if cloud_storage_bucket_region is not None:
132
+ self.cloud_storage_bucket_region = cloud_storage_bucket_region
128
133
  if nfs_mount_targets is not None:
129
134
  self.nfs_mount_targets = nfs_mount_targets
130
135
  if nfs_mount_path is not None:
@@ -327,6 +332,29 @@ class CloudResourceGCP(object):
327
332
 
328
333
  self._cloud_storage_bucket_endpoint = cloud_storage_bucket_endpoint
329
334
 
335
+ @property
336
+ def cloud_storage_bucket_region(self):
337
+ """Gets the cloud_storage_bucket_region of this CloudResourceGCP. # noqa: E501
338
+
339
+ The region of the cloud storage bucket. # noqa: E501
340
+
341
+ :return: The cloud_storage_bucket_region of this CloudResourceGCP. # noqa: E501
342
+ :rtype: str
343
+ """
344
+ return self._cloud_storage_bucket_region
345
+
346
+ @cloud_storage_bucket_region.setter
347
+ def cloud_storage_bucket_region(self, cloud_storage_bucket_region):
348
+ """Sets the cloud_storage_bucket_region of this CloudResourceGCP.
349
+
350
+ The region of the cloud storage bucket. # noqa: E501
351
+
352
+ :param cloud_storage_bucket_region: The cloud_storage_bucket_region of this CloudResourceGCP. # noqa: E501
353
+ :type: str
354
+ """
355
+
356
+ self._cloud_storage_bucket_region = cloud_storage_bucket_region
357
+
330
358
  @property
331
359
  def nfs_mount_targets(self):
332
360
  """Gets the nfs_mount_targets of this CloudResourceGCP. # noqa: E501
@@ -41,6 +41,7 @@ class CreateCloudResource(object):
41
41
  'kubernetes_nfs_persistent_volume_claim': 'str',
42
42
  'cloud_storage_bucket_name': 'str',
43
43
  'cloud_storage_bucket_endpoint': 'str',
44
+ 'cloud_storage_bucket_region': 'str',
44
45
  'nfs_mount_targets': 'list[NFSMountTarget]',
45
46
  'nfs_mount_path': 'str',
46
47
  'aws_vpc_id': 'str',
@@ -65,6 +66,7 @@ class CreateCloudResource(object):
65
66
  'kubernetes_nfs_persistent_volume_claim': 'kubernetes_nfs_persistent_volume_claim',
66
67
  'cloud_storage_bucket_name': 'cloud_storage_bucket_name',
67
68
  'cloud_storage_bucket_endpoint': 'cloud_storage_bucket_endpoint',
69
+ 'cloud_storage_bucket_region': 'cloud_storage_bucket_region',
68
70
  'nfs_mount_targets': 'nfs_mount_targets',
69
71
  'nfs_mount_path': 'nfs_mount_path',
70
72
  'aws_vpc_id': 'aws_vpc_id',
@@ -80,7 +82,7 @@ class CreateCloudResource(object):
80
82
  'memorydb_cluster_config': 'memorydb_cluster_config'
81
83
  }
82
84
 
83
- def __init__(self, compute_stack=None, kubernetes_ingress_external_address=None, kubernetes_namespaces=None, kubernetes_zones=None, kubernetes_dataplane_identity=None, kubernetes_nfs_persistent_volume_claim=None, cloud_storage_bucket_name=None, cloud_storage_bucket_endpoint=None, nfs_mount_targets=None, nfs_mount_path=None, aws_vpc_id=None, aws_subnet_ids_with_availability_zones=None, aws_iam_role_arns=None, aws_security_groups=None, aws_s3_id=None, aws_efs_id=None, aws_efs_mount_target_ip=None, aws_cloudformation_stack_id=None, gcp_vpc_id=None, gcp_subnet_ids=None, memorydb_cluster_config=None, local_vars_configuration=None): # noqa: E501
85
+ def __init__(self, compute_stack=None, kubernetes_ingress_external_address=None, kubernetes_namespaces=None, kubernetes_zones=None, kubernetes_dataplane_identity=None, kubernetes_nfs_persistent_volume_claim=None, cloud_storage_bucket_name=None, cloud_storage_bucket_endpoint=None, cloud_storage_bucket_region=None, nfs_mount_targets=None, nfs_mount_path=None, aws_vpc_id=None, aws_subnet_ids_with_availability_zones=None, aws_iam_role_arns=None, aws_security_groups=None, aws_s3_id=None, aws_efs_id=None, aws_efs_mount_target_ip=None, aws_cloudformation_stack_id=None, gcp_vpc_id=None, gcp_subnet_ids=None, memorydb_cluster_config=None, local_vars_configuration=None): # noqa: E501
84
86
  """CreateCloudResource - a model defined in OpenAPI""" # noqa: E501
85
87
  if local_vars_configuration is None:
86
88
  local_vars_configuration = Configuration()
@@ -94,6 +96,7 @@ class CreateCloudResource(object):
94
96
  self._kubernetes_nfs_persistent_volume_claim = None
95
97
  self._cloud_storage_bucket_name = None
96
98
  self._cloud_storage_bucket_endpoint = None
99
+ self._cloud_storage_bucket_region = None
97
100
  self._nfs_mount_targets = None
98
101
  self._nfs_mount_path = None
99
102
  self._aws_vpc_id = None
@@ -125,6 +128,8 @@ class CreateCloudResource(object):
125
128
  self.cloud_storage_bucket_name = cloud_storage_bucket_name
126
129
  if cloud_storage_bucket_endpoint is not None:
127
130
  self.cloud_storage_bucket_endpoint = cloud_storage_bucket_endpoint
131
+ if cloud_storage_bucket_region is not None:
132
+ self.cloud_storage_bucket_region = cloud_storage_bucket_region
128
133
  if nfs_mount_targets is not None:
129
134
  self.nfs_mount_targets = nfs_mount_targets
130
135
  if nfs_mount_path is not None:
@@ -336,6 +341,29 @@ class CreateCloudResource(object):
336
341
 
337
342
  self._cloud_storage_bucket_endpoint = cloud_storage_bucket_endpoint
338
343
 
344
+ @property
345
+ def cloud_storage_bucket_region(self):
346
+ """Gets the cloud_storage_bucket_region of this CreateCloudResource. # noqa: E501
347
+
348
+ The region of the cloud storage bucket. # noqa: E501
349
+
350
+ :return: The cloud_storage_bucket_region of this CreateCloudResource. # noqa: E501
351
+ :rtype: str
352
+ """
353
+ return self._cloud_storage_bucket_region
354
+
355
+ @cloud_storage_bucket_region.setter
356
+ def cloud_storage_bucket_region(self, cloud_storage_bucket_region):
357
+ """Sets the cloud_storage_bucket_region of this CreateCloudResource.
358
+
359
+ The region of the cloud storage bucket. # noqa: E501
360
+
361
+ :param cloud_storage_bucket_region: The cloud_storage_bucket_region of this CreateCloudResource. # noqa: E501
362
+ :type: str
363
+ """
364
+
365
+ self._cloud_storage_bucket_region = cloud_storage_bucket_region
366
+
339
367
  @property
340
368
  def nfs_mount_targets(self):
341
369
  """Gets the nfs_mount_targets of this CreateCloudResource. # noqa: E501
@@ -41,6 +41,7 @@ class CreateCloudResourceGCP(object):
41
41
  'kubernetes_nfs_persistent_volume_claim': 'str',
42
42
  'cloud_storage_bucket_name': 'str',
43
43
  'cloud_storage_bucket_endpoint': 'str',
44
+ 'cloud_storage_bucket_region': 'str',
44
45
  'nfs_mount_targets': 'list[NFSMountTarget]',
45
46
  'nfs_mount_path': 'str',
46
47
  'gcp_vpc_id': 'str',
@@ -63,6 +64,7 @@ class CreateCloudResourceGCP(object):
63
64
  'kubernetes_nfs_persistent_volume_claim': 'kubernetes_nfs_persistent_volume_claim',
64
65
  'cloud_storage_bucket_name': 'cloud_storage_bucket_name',
65
66
  'cloud_storage_bucket_endpoint': 'cloud_storage_bucket_endpoint',
67
+ 'cloud_storage_bucket_region': 'cloud_storage_bucket_region',
66
68
  'nfs_mount_targets': 'nfs_mount_targets',
67
69
  'nfs_mount_path': 'nfs_mount_path',
68
70
  'gcp_vpc_id': 'gcp_vpc_id',
@@ -76,7 +78,7 @@ class CreateCloudResourceGCP(object):
76
78
  'memorystore_instance_config': 'memorystore_instance_config'
77
79
  }
78
80
 
79
- def __init__(self, compute_stack=None, kubernetes_ingress_external_address=None, kubernetes_namespaces=None, kubernetes_zones=None, kubernetes_dataplane_identity=None, kubernetes_nfs_persistent_volume_claim=None, cloud_storage_bucket_name=None, cloud_storage_bucket_endpoint=None, nfs_mount_targets=None, nfs_mount_path=None, gcp_vpc_id=None, gcp_subnet_ids=None, gcp_cluster_node_service_account_email=None, gcp_anyscale_iam_service_account_email=None, gcp_filestore_config=None, gcp_firewall_policy_ids=None, gcp_cloud_storage_bucket_id=None, gcp_deployment_manager_id=None, memorystore_instance_config=None, local_vars_configuration=None): # noqa: E501
81
+ def __init__(self, compute_stack=None, kubernetes_ingress_external_address=None, kubernetes_namespaces=None, kubernetes_zones=None, kubernetes_dataplane_identity=None, kubernetes_nfs_persistent_volume_claim=None, cloud_storage_bucket_name=None, cloud_storage_bucket_endpoint=None, cloud_storage_bucket_region=None, nfs_mount_targets=None, nfs_mount_path=None, gcp_vpc_id=None, gcp_subnet_ids=None, gcp_cluster_node_service_account_email=None, gcp_anyscale_iam_service_account_email=None, gcp_filestore_config=None, gcp_firewall_policy_ids=None, gcp_cloud_storage_bucket_id=None, gcp_deployment_manager_id=None, memorystore_instance_config=None, local_vars_configuration=None): # noqa: E501
80
82
  """CreateCloudResourceGCP - a model defined in OpenAPI""" # noqa: E501
81
83
  if local_vars_configuration is None:
82
84
  local_vars_configuration = Configuration()
@@ -90,6 +92,7 @@ class CreateCloudResourceGCP(object):
90
92
  self._kubernetes_nfs_persistent_volume_claim = None
91
93
  self._cloud_storage_bucket_name = None
92
94
  self._cloud_storage_bucket_endpoint = None
95
+ self._cloud_storage_bucket_region = None
93
96
  self._nfs_mount_targets = None
94
97
  self._nfs_mount_path = None
95
98
  self._gcp_vpc_id = None
@@ -119,6 +122,8 @@ class CreateCloudResourceGCP(object):
119
122
  self.cloud_storage_bucket_name = cloud_storage_bucket_name
120
123
  if cloud_storage_bucket_endpoint is not None:
121
124
  self.cloud_storage_bucket_endpoint = cloud_storage_bucket_endpoint
125
+ if cloud_storage_bucket_region is not None:
126
+ self.cloud_storage_bucket_region = cloud_storage_bucket_region
122
127
  if nfs_mount_targets is not None:
123
128
  self.nfs_mount_targets = nfs_mount_targets
124
129
  if nfs_mount_path is not None:
@@ -319,6 +324,29 @@ class CreateCloudResourceGCP(object):
319
324
 
320
325
  self._cloud_storage_bucket_endpoint = cloud_storage_bucket_endpoint
321
326
 
327
+ @property
328
+ def cloud_storage_bucket_region(self):
329
+ """Gets the cloud_storage_bucket_region of this CreateCloudResourceGCP. # noqa: E501
330
+
331
+ The region of the cloud storage bucket. # noqa: E501
332
+
333
+ :return: The cloud_storage_bucket_region of this CreateCloudResourceGCP. # noqa: E501
334
+ :rtype: str
335
+ """
336
+ return self._cloud_storage_bucket_region
337
+
338
+ @cloud_storage_bucket_region.setter
339
+ def cloud_storage_bucket_region(self, cloud_storage_bucket_region):
340
+ """Sets the cloud_storage_bucket_region of this CreateCloudResourceGCP.
341
+
342
+ The region of the cloud storage bucket. # noqa: E501
343
+
344
+ :param cloud_storage_bucket_region: The cloud_storage_bucket_region of this CreateCloudResourceGCP. # noqa: E501
345
+ :type: str
346
+ """
347
+
348
+ self._cloud_storage_bucket_region = cloud_storage_bucket_region
349
+
322
350
  @property
323
351
  def nfs_mount_targets(self):
324
352
  """Gets the nfs_mount_targets of this CreateCloudResourceGCP. # noqa: E501
@@ -0,0 +1,201 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Managed Ray 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 openapi_client.configuration import Configuration
19
+
20
+
21
+ class UsageByCloud(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
+ 'anyscale_credits': 'float',
37
+ 'date': 'date',
38
+ 'cloud_id': 'str',
39
+ 'cloud_name': 'str'
40
+ }
41
+
42
+ attribute_map = {
43
+ 'anyscale_credits': 'anyscale_credits',
44
+ 'date': 'date',
45
+ 'cloud_id': 'cloud_id',
46
+ 'cloud_name': 'cloud_name'
47
+ }
48
+
49
+ def __init__(self, anyscale_credits=None, date=None, cloud_id=None, cloud_name=None, local_vars_configuration=None): # noqa: E501
50
+ """UsageByCloud - a model defined in OpenAPI""" # noqa: E501
51
+ if local_vars_configuration is None:
52
+ local_vars_configuration = Configuration()
53
+ self.local_vars_configuration = local_vars_configuration
54
+
55
+ self._anyscale_credits = None
56
+ self._date = None
57
+ self._cloud_id = None
58
+ self._cloud_name = None
59
+ self.discriminator = None
60
+
61
+ self.anyscale_credits = anyscale_credits
62
+ if date is not None:
63
+ self.date = date
64
+ self.cloud_id = cloud_id
65
+ self.cloud_name = cloud_name
66
+
67
+ @property
68
+ def anyscale_credits(self):
69
+ """Gets the anyscale_credits of this UsageByCloud. # noqa: E501
70
+
71
+
72
+ :return: The anyscale_credits of this UsageByCloud. # noqa: E501
73
+ :rtype: float
74
+ """
75
+ return self._anyscale_credits
76
+
77
+ @anyscale_credits.setter
78
+ def anyscale_credits(self, anyscale_credits):
79
+ """Sets the anyscale_credits of this UsageByCloud.
80
+
81
+
82
+ :param anyscale_credits: The anyscale_credits of this UsageByCloud. # noqa: E501
83
+ :type: float
84
+ """
85
+ if self.local_vars_configuration.client_side_validation and anyscale_credits is None: # noqa: E501
86
+ raise ValueError("Invalid value for `anyscale_credits`, must not be `None`") # noqa: E501
87
+
88
+ self._anyscale_credits = anyscale_credits
89
+
90
+ @property
91
+ def date(self):
92
+ """Gets the date of this UsageByCloud. # noqa: E501
93
+
94
+
95
+ :return: The date of this UsageByCloud. # noqa: E501
96
+ :rtype: date
97
+ """
98
+ return self._date
99
+
100
+ @date.setter
101
+ def date(self, date):
102
+ """Sets the date of this UsageByCloud.
103
+
104
+
105
+ :param date: The date of this UsageByCloud. # noqa: E501
106
+ :type: date
107
+ """
108
+
109
+ self._date = date
110
+
111
+ @property
112
+ def cloud_id(self):
113
+ """Gets the cloud_id of this UsageByCloud. # noqa: E501
114
+
115
+
116
+ :return: The cloud_id of this UsageByCloud. # noqa: E501
117
+ :rtype: str
118
+ """
119
+ return self._cloud_id
120
+
121
+ @cloud_id.setter
122
+ def cloud_id(self, cloud_id):
123
+ """Sets the cloud_id of this UsageByCloud.
124
+
125
+
126
+ :param cloud_id: The cloud_id of this UsageByCloud. # noqa: E501
127
+ :type: str
128
+ """
129
+ if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
130
+ raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
131
+
132
+ self._cloud_id = cloud_id
133
+
134
+ @property
135
+ def cloud_name(self):
136
+ """Gets the cloud_name of this UsageByCloud. # noqa: E501
137
+
138
+
139
+ :return: The cloud_name of this UsageByCloud. # noqa: E501
140
+ :rtype: str
141
+ """
142
+ return self._cloud_name
143
+
144
+ @cloud_name.setter
145
+ def cloud_name(self, cloud_name):
146
+ """Sets the cloud_name of this UsageByCloud.
147
+
148
+
149
+ :param cloud_name: The cloud_name of this UsageByCloud. # noqa: E501
150
+ :type: str
151
+ """
152
+ if self.local_vars_configuration.client_side_validation and cloud_name is None: # noqa: E501
153
+ raise ValueError("Invalid value for `cloud_name`, must not be `None`") # noqa: E501
154
+
155
+ self._cloud_name = cloud_name
156
+
157
+ def to_dict(self):
158
+ """Returns the model properties as a dict"""
159
+ result = {}
160
+
161
+ for attr, _ in six.iteritems(self.openapi_types):
162
+ value = getattr(self, attr)
163
+ if isinstance(value, list):
164
+ result[attr] = list(map(
165
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
166
+ value
167
+ ))
168
+ elif hasattr(value, "to_dict"):
169
+ result[attr] = value.to_dict()
170
+ elif isinstance(value, dict):
171
+ result[attr] = dict(map(
172
+ lambda item: (item[0], item[1].to_dict())
173
+ if hasattr(item[1], "to_dict") else item,
174
+ value.items()
175
+ ))
176
+ else:
177
+ result[attr] = value
178
+
179
+ return result
180
+
181
+ def to_str(self):
182
+ """Returns the string representation of the model"""
183
+ return pprint.pformat(self.to_dict())
184
+
185
+ def __repr__(self):
186
+ """For `print` and `pprint`"""
187
+ return self.to_str()
188
+
189
+ def __eq__(self, other):
190
+ """Returns true if both objects are equal"""
191
+ if not isinstance(other, UsageByCloud):
192
+ return False
193
+
194
+ return self.to_dict() == other.to_dict()
195
+
196
+ def __ne__(self, other):
197
+ """Returns true if both objects are not equal"""
198
+ if not isinstance(other, UsageByCloud):
199
+ return True
200
+
201
+ return self.to_dict() != other.to_dict()