anyscale 0.24.86__py3-none-any.whl → 0.24.87__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 (34) hide show
  1. anyscale/client/README.md +22 -2
  2. anyscale/client/openapi_client/__init__.py +16 -2
  3. anyscale/client/openapi_client/api/default_api.py +704 -3
  4. anyscale/client/openapi_client/models/__init__.py +16 -2
  5. anyscale/client/openapi_client/models/{aggregated_instance_usage_with_cost_model.py → aggregated_instance_usage_csv.py} +100 -100
  6. anyscale/client/openapi_client/models/aggregated_usage.py +147 -0
  7. anyscale/client/openapi_client/models/aggregated_usage_query.py +264 -0
  8. anyscale/client/openapi_client/models/{aggregatedinstanceusagewithcostmodel_list_response.py → aggregatedinstanceusagecsv_list_response.py} +15 -15
  9. anyscale/client/openapi_client/models/aggregatedusage_response.py +121 -0
  10. anyscale/client/openapi_client/models/cloud_resource.py +29 -1
  11. anyscale/client/openapi_client/models/cloud_resource_gcp.py +29 -1
  12. anyscale/client/openapi_client/models/create_cloud_resource.py +29 -1
  13. anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +29 -1
  14. anyscale/client/openapi_client/models/paging_context.py +172 -0
  15. anyscale/client/openapi_client/models/usage_by_cloud.py +201 -0
  16. anyscale/client/openapi_client/models/usage_by_cluster.py +544 -0
  17. anyscale/client/openapi_client/models/usage_by_instance_type.py +174 -0
  18. anyscale/client/openapi_client/models/usage_by_project.py +255 -0
  19. anyscale/client/openapi_client/models/usage_by_user.py +201 -0
  20. anyscale/client/openapi_client/models/usagebycloud_list_response.py +147 -0
  21. anyscale/client/openapi_client/models/usagebycluster_list_response.py +147 -0
  22. anyscale/client/openapi_client/models/usagebyinstancetype_list_response.py +147 -0
  23. anyscale/client/openapi_client/models/usagebyproject_list_response.py +147 -0
  24. anyscale/client/openapi_client/models/usagebyuser_list_response.py +147 -0
  25. anyscale/commands/cloud_commands.py +8 -0
  26. anyscale/controllers/cloud_controller.py +3 -0
  27. anyscale/version.py +1 -1
  28. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/METADATA +1 -1
  29. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/RECORD +34 -20
  30. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/LICENSE +0 -0
  31. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/NOTICE +0 -0
  32. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/WHEEL +0 -0
  33. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/entry_points.txt +0 -0
  34. {anyscale-0.24.86.dist-info → anyscale-0.24.87.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,147 @@
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 AggregatedUsage(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
+ }
39
+
40
+ attribute_map = {
41
+ 'anyscale_credits': 'anyscale_credits',
42
+ 'date': 'date'
43
+ }
44
+
45
+ def __init__(self, anyscale_credits=None, date=None, local_vars_configuration=None): # noqa: E501
46
+ """AggregatedUsage - a model defined in OpenAPI""" # noqa: E501
47
+ if local_vars_configuration is None:
48
+ local_vars_configuration = Configuration()
49
+ self.local_vars_configuration = local_vars_configuration
50
+
51
+ self._anyscale_credits = None
52
+ self._date = None
53
+ self.discriminator = None
54
+
55
+ self.anyscale_credits = anyscale_credits
56
+ if date is not None:
57
+ self.date = date
58
+
59
+ @property
60
+ def anyscale_credits(self):
61
+ """Gets the anyscale_credits of this AggregatedUsage. # noqa: E501
62
+
63
+
64
+ :return: The anyscale_credits of this AggregatedUsage. # noqa: E501
65
+ :rtype: float
66
+ """
67
+ return self._anyscale_credits
68
+
69
+ @anyscale_credits.setter
70
+ def anyscale_credits(self, anyscale_credits):
71
+ """Sets the anyscale_credits of this AggregatedUsage.
72
+
73
+
74
+ :param anyscale_credits: The anyscale_credits of this AggregatedUsage. # noqa: E501
75
+ :type: float
76
+ """
77
+ if self.local_vars_configuration.client_side_validation and anyscale_credits is None: # noqa: E501
78
+ raise ValueError("Invalid value for `anyscale_credits`, must not be `None`") # noqa: E501
79
+
80
+ self._anyscale_credits = anyscale_credits
81
+
82
+ @property
83
+ def date(self):
84
+ """Gets the date of this AggregatedUsage. # noqa: E501
85
+
86
+
87
+ :return: The date of this AggregatedUsage. # noqa: E501
88
+ :rtype: date
89
+ """
90
+ return self._date
91
+
92
+ @date.setter
93
+ def date(self, date):
94
+ """Sets the date of this AggregatedUsage.
95
+
96
+
97
+ :param date: The date of this AggregatedUsage. # noqa: E501
98
+ :type: date
99
+ """
100
+
101
+ self._date = date
102
+
103
+ def to_dict(self):
104
+ """Returns the model properties as a dict"""
105
+ result = {}
106
+
107
+ for attr, _ in six.iteritems(self.openapi_types):
108
+ value = getattr(self, attr)
109
+ if isinstance(value, list):
110
+ result[attr] = list(map(
111
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
112
+ value
113
+ ))
114
+ elif hasattr(value, "to_dict"):
115
+ result[attr] = value.to_dict()
116
+ elif isinstance(value, dict):
117
+ result[attr] = dict(map(
118
+ lambda item: (item[0], item[1].to_dict())
119
+ if hasattr(item[1], "to_dict") else item,
120
+ value.items()
121
+ ))
122
+ else:
123
+ result[attr] = value
124
+
125
+ return result
126
+
127
+ def to_str(self):
128
+ """Returns the string representation of the model"""
129
+ return pprint.pformat(self.to_dict())
130
+
131
+ def __repr__(self):
132
+ """For `print` and `pprint`"""
133
+ return self.to_str()
134
+
135
+ def __eq__(self, other):
136
+ """Returns true if both objects are equal"""
137
+ if not isinstance(other, AggregatedUsage):
138
+ return False
139
+
140
+ return self.to_dict() == other.to_dict()
141
+
142
+ def __ne__(self, other):
143
+ """Returns true if both objects are not equal"""
144
+ if not isinstance(other, AggregatedUsage):
145
+ return True
146
+
147
+ return self.to_dict() != other.to_dict()
@@ -0,0 +1,264 @@
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 AggregatedUsageQuery(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
+ 'start_date': 'date',
37
+ 'end_date': 'date',
38
+ 'paging': 'PagingContext',
39
+ 'name_contains': 'str',
40
+ 'group_by_date': 'bool',
41
+ 'asc': 'bool'
42
+ }
43
+
44
+ attribute_map = {
45
+ 'start_date': 'start_date',
46
+ 'end_date': 'end_date',
47
+ 'paging': 'paging',
48
+ 'name_contains': 'name_contains',
49
+ 'group_by_date': 'group_by_date',
50
+ 'asc': 'asc'
51
+ }
52
+
53
+ def __init__(self, start_date=None, end_date=None, paging=None, name_contains=None, group_by_date=False, asc=False, local_vars_configuration=None): # noqa: E501
54
+ """AggregatedUsageQuery - 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._start_date = None
60
+ self._end_date = None
61
+ self._paging = None
62
+ self._name_contains = None
63
+ self._group_by_date = None
64
+ self._asc = None
65
+ self.discriminator = None
66
+
67
+ self.start_date = start_date
68
+ self.end_date = end_date
69
+ if paging is not None:
70
+ self.paging = paging
71
+ if name_contains is not None:
72
+ self.name_contains = name_contains
73
+ if group_by_date is not None:
74
+ self.group_by_date = group_by_date
75
+ if asc is not None:
76
+ self.asc = asc
77
+
78
+ @property
79
+ def start_date(self):
80
+ """Gets the start_date of this AggregatedUsageQuery. # noqa: E501
81
+
82
+ Start date of the usage data to query # noqa: E501
83
+
84
+ :return: The start_date of this AggregatedUsageQuery. # noqa: E501
85
+ :rtype: date
86
+ """
87
+ return self._start_date
88
+
89
+ @start_date.setter
90
+ def start_date(self, start_date):
91
+ """Sets the start_date of this AggregatedUsageQuery.
92
+
93
+ Start date of the usage data to query # noqa: E501
94
+
95
+ :param start_date: The start_date of this AggregatedUsageQuery. # noqa: E501
96
+ :type: date
97
+ """
98
+ if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501
99
+ raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501
100
+
101
+ self._start_date = start_date
102
+
103
+ @property
104
+ def end_date(self):
105
+ """Gets the end_date of this AggregatedUsageQuery. # noqa: E501
106
+
107
+ End date of the usage data to query # noqa: E501
108
+
109
+ :return: The end_date of this AggregatedUsageQuery. # noqa: E501
110
+ :rtype: date
111
+ """
112
+ return self._end_date
113
+
114
+ @end_date.setter
115
+ def end_date(self, end_date):
116
+ """Sets the end_date of this AggregatedUsageQuery.
117
+
118
+ End date of the usage data to query # noqa: E501
119
+
120
+ :param end_date: The end_date of this AggregatedUsageQuery. # noqa: E501
121
+ :type: date
122
+ """
123
+ if self.local_vars_configuration.client_side_validation and end_date is None: # noqa: E501
124
+ raise ValueError("Invalid value for `end_date`, must not be `None`") # noqa: E501
125
+
126
+ self._end_date = end_date
127
+
128
+ @property
129
+ def paging(self):
130
+ """Gets the paging of this AggregatedUsageQuery. # noqa: E501
131
+
132
+ Pagination information. # noqa: E501
133
+
134
+ :return: The paging of this AggregatedUsageQuery. # noqa: E501
135
+ :rtype: PagingContext
136
+ """
137
+ return self._paging
138
+
139
+ @paging.setter
140
+ def paging(self, paging):
141
+ """Sets the paging of this AggregatedUsageQuery.
142
+
143
+ Pagination information. # noqa: E501
144
+
145
+ :param paging: The paging of this AggregatedUsageQuery. # noqa: E501
146
+ :type: PagingContext
147
+ """
148
+
149
+ self._paging = paging
150
+
151
+ @property
152
+ def name_contains(self):
153
+ """Gets the name_contains of this AggregatedUsageQuery. # noqa: E501
154
+
155
+ Filter the usage data by name containing this string # noqa: E501
156
+
157
+ :return: The name_contains of this AggregatedUsageQuery. # noqa: E501
158
+ :rtype: str
159
+ """
160
+ return self._name_contains
161
+
162
+ @name_contains.setter
163
+ def name_contains(self, name_contains):
164
+ """Sets the name_contains of this AggregatedUsageQuery.
165
+
166
+ Filter the usage data by name containing this string # noqa: E501
167
+
168
+ :param name_contains: The name_contains of this AggregatedUsageQuery. # noqa: E501
169
+ :type: str
170
+ """
171
+
172
+ self._name_contains = name_contains
173
+
174
+ @property
175
+ def group_by_date(self):
176
+ """Gets the group_by_date of this AggregatedUsageQuery. # noqa: E501
177
+
178
+ Whether to group the usage data by date # noqa: E501
179
+
180
+ :return: The group_by_date of this AggregatedUsageQuery. # noqa: E501
181
+ :rtype: bool
182
+ """
183
+ return self._group_by_date
184
+
185
+ @group_by_date.setter
186
+ def group_by_date(self, group_by_date):
187
+ """Sets the group_by_date of this AggregatedUsageQuery.
188
+
189
+ Whether to group the usage data by date # noqa: E501
190
+
191
+ :param group_by_date: The group_by_date of this AggregatedUsageQuery. # noqa: E501
192
+ :type: bool
193
+ """
194
+
195
+ self._group_by_date = group_by_date
196
+
197
+ @property
198
+ def asc(self):
199
+ """Gets the asc of this AggregatedUsageQuery. # noqa: E501
200
+
201
+ Whether to sort the usage data in ascending order # noqa: E501
202
+
203
+ :return: The asc of this AggregatedUsageQuery. # noqa: E501
204
+ :rtype: bool
205
+ """
206
+ return self._asc
207
+
208
+ @asc.setter
209
+ def asc(self, asc):
210
+ """Sets the asc of this AggregatedUsageQuery.
211
+
212
+ Whether to sort the usage data in ascending order # noqa: E501
213
+
214
+ :param asc: The asc of this AggregatedUsageQuery. # noqa: E501
215
+ :type: bool
216
+ """
217
+
218
+ self._asc = asc
219
+
220
+ def to_dict(self):
221
+ """Returns the model properties as a dict"""
222
+ result = {}
223
+
224
+ for attr, _ in six.iteritems(self.openapi_types):
225
+ value = getattr(self, attr)
226
+ if isinstance(value, list):
227
+ result[attr] = list(map(
228
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
229
+ value
230
+ ))
231
+ elif hasattr(value, "to_dict"):
232
+ result[attr] = value.to_dict()
233
+ elif isinstance(value, dict):
234
+ result[attr] = dict(map(
235
+ lambda item: (item[0], item[1].to_dict())
236
+ if hasattr(item[1], "to_dict") else item,
237
+ value.items()
238
+ ))
239
+ else:
240
+ result[attr] = value
241
+
242
+ return result
243
+
244
+ def to_str(self):
245
+ """Returns the string representation of the model"""
246
+ return pprint.pformat(self.to_dict())
247
+
248
+ def __repr__(self):
249
+ """For `print` and `pprint`"""
250
+ return self.to_str()
251
+
252
+ def __eq__(self, other):
253
+ """Returns true if both objects are equal"""
254
+ if not isinstance(other, AggregatedUsageQuery):
255
+ return False
256
+
257
+ return self.to_dict() == other.to_dict()
258
+
259
+ def __ne__(self, other):
260
+ """Returns true if both objects are not equal"""
261
+ if not isinstance(other, AggregatedUsageQuery):
262
+ return True
263
+
264
+ return self.to_dict() != other.to_dict()
@@ -18,7 +18,7 @@ import six
18
18
  from openapi_client.configuration import Configuration
19
19
 
20
20
 
21
- class AggregatedinstanceusagewithcostmodelListResponse(object):
21
+ class AggregatedinstanceusagecsvListResponse(object):
22
22
  """NOTE: This class is auto generated by OpenAPI Generator.
23
23
  Ref: https://openapi-generator.tech
24
24
 
@@ -33,7 +33,7 @@ class AggregatedinstanceusagewithcostmodelListResponse(object):
33
33
  and the value is json key in definition.
34
34
  """
35
35
  openapi_types = {
36
- 'results': 'list[AggregatedInstanceUsageWithCostModel]',
36
+ 'results': 'list[AggregatedInstanceUsageCSV]',
37
37
  'metadata': 'ListResponseMetadata'
38
38
  }
39
39
 
@@ -43,7 +43,7 @@ class AggregatedinstanceusagewithcostmodelListResponse(object):
43
43
  }
44
44
 
45
45
  def __init__(self, results=None, metadata=None, local_vars_configuration=None): # noqa: E501
46
- """AggregatedinstanceusagewithcostmodelListResponse - a model defined in OpenAPI""" # noqa: E501
46
+ """AggregatedinstanceusagecsvListResponse - a model defined in OpenAPI""" # noqa: E501
47
47
  if local_vars_configuration is None:
48
48
  local_vars_configuration = Configuration()
49
49
  self.local_vars_configuration = local_vars_configuration
@@ -58,21 +58,21 @@ class AggregatedinstanceusagewithcostmodelListResponse(object):
58
58
 
59
59
  @property
60
60
  def results(self):
61
- """Gets the results of this AggregatedinstanceusagewithcostmodelListResponse. # noqa: E501
61
+ """Gets the results of this AggregatedinstanceusagecsvListResponse. # noqa: E501
62
62
 
63
63
 
64
- :return: The results of this AggregatedinstanceusagewithcostmodelListResponse. # noqa: E501
65
- :rtype: list[AggregatedInstanceUsageWithCostModel]
64
+ :return: The results of this AggregatedinstanceusagecsvListResponse. # noqa: E501
65
+ :rtype: list[AggregatedInstanceUsageCSV]
66
66
  """
67
67
  return self._results
68
68
 
69
69
  @results.setter
70
70
  def results(self, results):
71
- """Sets the results of this AggregatedinstanceusagewithcostmodelListResponse.
71
+ """Sets the results of this AggregatedinstanceusagecsvListResponse.
72
72
 
73
73
 
74
- :param results: The results of this AggregatedinstanceusagewithcostmodelListResponse. # noqa: E501
75
- :type: list[AggregatedInstanceUsageWithCostModel]
74
+ :param results: The results of this AggregatedinstanceusagecsvListResponse. # noqa: E501
75
+ :type: list[AggregatedInstanceUsageCSV]
76
76
  """
77
77
  if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
78
78
  raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
@@ -81,20 +81,20 @@ class AggregatedinstanceusagewithcostmodelListResponse(object):
81
81
 
82
82
  @property
83
83
  def metadata(self):
84
- """Gets the metadata of this AggregatedinstanceusagewithcostmodelListResponse. # noqa: E501
84
+ """Gets the metadata of this AggregatedinstanceusagecsvListResponse. # noqa: E501
85
85
 
86
86
 
87
- :return: The metadata of this AggregatedinstanceusagewithcostmodelListResponse. # noqa: E501
87
+ :return: The metadata of this AggregatedinstanceusagecsvListResponse. # noqa: E501
88
88
  :rtype: ListResponseMetadata
89
89
  """
90
90
  return self._metadata
91
91
 
92
92
  @metadata.setter
93
93
  def metadata(self, metadata):
94
- """Sets the metadata of this AggregatedinstanceusagewithcostmodelListResponse.
94
+ """Sets the metadata of this AggregatedinstanceusagecsvListResponse.
95
95
 
96
96
 
97
- :param metadata: The metadata of this AggregatedinstanceusagewithcostmodelListResponse. # noqa: E501
97
+ :param metadata: The metadata of this AggregatedinstanceusagecsvListResponse. # noqa: E501
98
98
  :type: ListResponseMetadata
99
99
  """
100
100
 
@@ -134,14 +134,14 @@ class AggregatedinstanceusagewithcostmodelListResponse(object):
134
134
 
135
135
  def __eq__(self, other):
136
136
  """Returns true if both objects are equal"""
137
- if not isinstance(other, AggregatedinstanceusagewithcostmodelListResponse):
137
+ if not isinstance(other, AggregatedinstanceusagecsvListResponse):
138
138
  return False
139
139
 
140
140
  return self.to_dict() == other.to_dict()
141
141
 
142
142
  def __ne__(self, other):
143
143
  """Returns true if both objects are not equal"""
144
- if not isinstance(other, AggregatedinstanceusagewithcostmodelListResponse):
144
+ if not isinstance(other, AggregatedinstanceusagecsvListResponse):
145
145
  return True
146
146
 
147
147
  return self.to_dict() != other.to_dict()
@@ -0,0 +1,121 @@
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 AggregatedusageResponse(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': 'AggregatedUsage'
37
+ }
38
+
39
+ attribute_map = {
40
+ 'result': 'result'
41
+ }
42
+
43
+ def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
44
+ """AggregatedusageResponse - 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 AggregatedusageResponse. # noqa: E501
57
+
58
+
59
+ :return: The result of this AggregatedusageResponse. # noqa: E501
60
+ :rtype: AggregatedUsage
61
+ """
62
+ return self._result
63
+
64
+ @result.setter
65
+ def result(self, result):
66
+ """Sets the result of this AggregatedusageResponse.
67
+
68
+
69
+ :param result: The result of this AggregatedusageResponse. # noqa: E501
70
+ :type: AggregatedUsage
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, AggregatedusageResponse):
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, AggregatedusageResponse):
119
+ return True
120
+
121
+ return self.to_dict() != other.to_dict()