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,544 @@
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 UsageByCluster(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
+ 'user_id': 'str',
39
+ 'user_email': 'str',
40
+ 'cloud_id': 'str',
41
+ 'cloud_name': 'str',
42
+ 'project_id': 'str',
43
+ 'project_name': 'str',
44
+ 'cluster_id': 'str',
45
+ 'job_id': 'str',
46
+ 'job_name': 'str',
47
+ 'job_queue_id': 'str',
48
+ 'job_queue_name': 'str',
49
+ 'service_id': 'str',
50
+ 'service_name': 'str',
51
+ 'workspace_id': 'str',
52
+ 'workspace_name': 'str'
53
+ }
54
+
55
+ attribute_map = {
56
+ 'anyscale_credits': 'anyscale_credits',
57
+ 'date': 'date',
58
+ 'user_id': 'user_id',
59
+ 'user_email': 'user_email',
60
+ 'cloud_id': 'cloud_id',
61
+ 'cloud_name': 'cloud_name',
62
+ 'project_id': 'project_id',
63
+ 'project_name': 'project_name',
64
+ 'cluster_id': 'cluster_id',
65
+ 'job_id': 'job_id',
66
+ 'job_name': 'job_name',
67
+ 'job_queue_id': 'job_queue_id',
68
+ 'job_queue_name': 'job_queue_name',
69
+ 'service_id': 'service_id',
70
+ 'service_name': 'service_name',
71
+ 'workspace_id': 'workspace_id',
72
+ 'workspace_name': 'workspace_name'
73
+ }
74
+
75
+ def __init__(self, anyscale_credits=None, date=None, user_id=None, user_email=None, cloud_id=None, cloud_name=None, project_id=None, project_name=None, cluster_id=None, job_id=None, job_name=None, job_queue_id=None, job_queue_name=None, service_id=None, service_name=None, workspace_id=None, workspace_name=None, local_vars_configuration=None): # noqa: E501
76
+ """UsageByCluster - a model defined in OpenAPI""" # noqa: E501
77
+ if local_vars_configuration is None:
78
+ local_vars_configuration = Configuration()
79
+ self.local_vars_configuration = local_vars_configuration
80
+
81
+ self._anyscale_credits = None
82
+ self._date = None
83
+ self._user_id = None
84
+ self._user_email = None
85
+ self._cloud_id = None
86
+ self._cloud_name = None
87
+ self._project_id = None
88
+ self._project_name = None
89
+ self._cluster_id = None
90
+ self._job_id = None
91
+ self._job_name = None
92
+ self._job_queue_id = None
93
+ self._job_queue_name = None
94
+ self._service_id = None
95
+ self._service_name = None
96
+ self._workspace_id = None
97
+ self._workspace_name = None
98
+ self.discriminator = None
99
+
100
+ self.anyscale_credits = anyscale_credits
101
+ if date is not None:
102
+ self.date = date
103
+ self.user_id = user_id
104
+ self.user_email = user_email
105
+ self.cloud_id = cloud_id
106
+ self.cloud_name = cloud_name
107
+ self.project_id = project_id
108
+ self.project_name = project_name
109
+ self.cluster_id = cluster_id
110
+ if job_id is not None:
111
+ self.job_id = job_id
112
+ if job_name is not None:
113
+ self.job_name = job_name
114
+ if job_queue_id is not None:
115
+ self.job_queue_id = job_queue_id
116
+ if job_queue_name is not None:
117
+ self.job_queue_name = job_queue_name
118
+ if service_id is not None:
119
+ self.service_id = service_id
120
+ if service_name is not None:
121
+ self.service_name = service_name
122
+ if workspace_id is not None:
123
+ self.workspace_id = workspace_id
124
+ if workspace_name is not None:
125
+ self.workspace_name = workspace_name
126
+
127
+ @property
128
+ def anyscale_credits(self):
129
+ """Gets the anyscale_credits of this UsageByCluster. # noqa: E501
130
+
131
+
132
+ :return: The anyscale_credits of this UsageByCluster. # noqa: E501
133
+ :rtype: float
134
+ """
135
+ return self._anyscale_credits
136
+
137
+ @anyscale_credits.setter
138
+ def anyscale_credits(self, anyscale_credits):
139
+ """Sets the anyscale_credits of this UsageByCluster.
140
+
141
+
142
+ :param anyscale_credits: The anyscale_credits of this UsageByCluster. # noqa: E501
143
+ :type: float
144
+ """
145
+ if self.local_vars_configuration.client_side_validation and anyscale_credits is None: # noqa: E501
146
+ raise ValueError("Invalid value for `anyscale_credits`, must not be `None`") # noqa: E501
147
+
148
+ self._anyscale_credits = anyscale_credits
149
+
150
+ @property
151
+ def date(self):
152
+ """Gets the date of this UsageByCluster. # noqa: E501
153
+
154
+
155
+ :return: The date of this UsageByCluster. # noqa: E501
156
+ :rtype: date
157
+ """
158
+ return self._date
159
+
160
+ @date.setter
161
+ def date(self, date):
162
+ """Sets the date of this UsageByCluster.
163
+
164
+
165
+ :param date: The date of this UsageByCluster. # noqa: E501
166
+ :type: date
167
+ """
168
+
169
+ self._date = date
170
+
171
+ @property
172
+ def user_id(self):
173
+ """Gets the user_id of this UsageByCluster. # noqa: E501
174
+
175
+
176
+ :return: The user_id of this UsageByCluster. # noqa: E501
177
+ :rtype: str
178
+ """
179
+ return self._user_id
180
+
181
+ @user_id.setter
182
+ def user_id(self, user_id):
183
+ """Sets the user_id of this UsageByCluster.
184
+
185
+
186
+ :param user_id: The user_id of this UsageByCluster. # noqa: E501
187
+ :type: str
188
+ """
189
+ if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501
190
+ raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501
191
+
192
+ self._user_id = user_id
193
+
194
+ @property
195
+ def user_email(self):
196
+ """Gets the user_email of this UsageByCluster. # noqa: E501
197
+
198
+
199
+ :return: The user_email of this UsageByCluster. # noqa: E501
200
+ :rtype: str
201
+ """
202
+ return self._user_email
203
+
204
+ @user_email.setter
205
+ def user_email(self, user_email):
206
+ """Sets the user_email of this UsageByCluster.
207
+
208
+
209
+ :param user_email: The user_email of this UsageByCluster. # noqa: E501
210
+ :type: str
211
+ """
212
+ if self.local_vars_configuration.client_side_validation and user_email is None: # noqa: E501
213
+ raise ValueError("Invalid value for `user_email`, must not be `None`") # noqa: E501
214
+
215
+ self._user_email = user_email
216
+
217
+ @property
218
+ def cloud_id(self):
219
+ """Gets the cloud_id of this UsageByCluster. # noqa: E501
220
+
221
+
222
+ :return: The cloud_id of this UsageByCluster. # noqa: E501
223
+ :rtype: str
224
+ """
225
+ return self._cloud_id
226
+
227
+ @cloud_id.setter
228
+ def cloud_id(self, cloud_id):
229
+ """Sets the cloud_id of this UsageByCluster.
230
+
231
+
232
+ :param cloud_id: The cloud_id of this UsageByCluster. # noqa: E501
233
+ :type: str
234
+ """
235
+ if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
236
+ raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
237
+
238
+ self._cloud_id = cloud_id
239
+
240
+ @property
241
+ def cloud_name(self):
242
+ """Gets the cloud_name of this UsageByCluster. # noqa: E501
243
+
244
+
245
+ :return: The cloud_name of this UsageByCluster. # noqa: E501
246
+ :rtype: str
247
+ """
248
+ return self._cloud_name
249
+
250
+ @cloud_name.setter
251
+ def cloud_name(self, cloud_name):
252
+ """Sets the cloud_name of this UsageByCluster.
253
+
254
+
255
+ :param cloud_name: The cloud_name of this UsageByCluster. # noqa: E501
256
+ :type: str
257
+ """
258
+ if self.local_vars_configuration.client_side_validation and cloud_name is None: # noqa: E501
259
+ raise ValueError("Invalid value for `cloud_name`, must not be `None`") # noqa: E501
260
+
261
+ self._cloud_name = cloud_name
262
+
263
+ @property
264
+ def project_id(self):
265
+ """Gets the project_id of this UsageByCluster. # noqa: E501
266
+
267
+
268
+ :return: The project_id of this UsageByCluster. # noqa: E501
269
+ :rtype: str
270
+ """
271
+ return self._project_id
272
+
273
+ @project_id.setter
274
+ def project_id(self, project_id):
275
+ """Sets the project_id of this UsageByCluster.
276
+
277
+
278
+ :param project_id: The project_id of this UsageByCluster. # noqa: E501
279
+ :type: str
280
+ """
281
+ if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
282
+ raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
283
+
284
+ self._project_id = project_id
285
+
286
+ @property
287
+ def project_name(self):
288
+ """Gets the project_name of this UsageByCluster. # noqa: E501
289
+
290
+
291
+ :return: The project_name of this UsageByCluster. # noqa: E501
292
+ :rtype: str
293
+ """
294
+ return self._project_name
295
+
296
+ @project_name.setter
297
+ def project_name(self, project_name):
298
+ """Sets the project_name of this UsageByCluster.
299
+
300
+
301
+ :param project_name: The project_name of this UsageByCluster. # noqa: E501
302
+ :type: str
303
+ """
304
+ if self.local_vars_configuration.client_side_validation and project_name is None: # noqa: E501
305
+ raise ValueError("Invalid value for `project_name`, must not be `None`") # noqa: E501
306
+
307
+ self._project_name = project_name
308
+
309
+ @property
310
+ def cluster_id(self):
311
+ """Gets the cluster_id of this UsageByCluster. # noqa: E501
312
+
313
+
314
+ :return: The cluster_id of this UsageByCluster. # noqa: E501
315
+ :rtype: str
316
+ """
317
+ return self._cluster_id
318
+
319
+ @cluster_id.setter
320
+ def cluster_id(self, cluster_id):
321
+ """Sets the cluster_id of this UsageByCluster.
322
+
323
+
324
+ :param cluster_id: The cluster_id of this UsageByCluster. # noqa: E501
325
+ :type: str
326
+ """
327
+ if self.local_vars_configuration.client_side_validation and cluster_id is None: # noqa: E501
328
+ raise ValueError("Invalid value for `cluster_id`, must not be `None`") # noqa: E501
329
+
330
+ self._cluster_id = cluster_id
331
+
332
+ @property
333
+ def job_id(self):
334
+ """Gets the job_id of this UsageByCluster. # noqa: E501
335
+
336
+
337
+ :return: The job_id of this UsageByCluster. # noqa: E501
338
+ :rtype: str
339
+ """
340
+ return self._job_id
341
+
342
+ @job_id.setter
343
+ def job_id(self, job_id):
344
+ """Sets the job_id of this UsageByCluster.
345
+
346
+
347
+ :param job_id: The job_id of this UsageByCluster. # noqa: E501
348
+ :type: str
349
+ """
350
+
351
+ self._job_id = job_id
352
+
353
+ @property
354
+ def job_name(self):
355
+ """Gets the job_name of this UsageByCluster. # noqa: E501
356
+
357
+
358
+ :return: The job_name of this UsageByCluster. # noqa: E501
359
+ :rtype: str
360
+ """
361
+ return self._job_name
362
+
363
+ @job_name.setter
364
+ def job_name(self, job_name):
365
+ """Sets the job_name of this UsageByCluster.
366
+
367
+
368
+ :param job_name: The job_name of this UsageByCluster. # noqa: E501
369
+ :type: str
370
+ """
371
+
372
+ self._job_name = job_name
373
+
374
+ @property
375
+ def job_queue_id(self):
376
+ """Gets the job_queue_id of this UsageByCluster. # noqa: E501
377
+
378
+
379
+ :return: The job_queue_id of this UsageByCluster. # noqa: E501
380
+ :rtype: str
381
+ """
382
+ return self._job_queue_id
383
+
384
+ @job_queue_id.setter
385
+ def job_queue_id(self, job_queue_id):
386
+ """Sets the job_queue_id of this UsageByCluster.
387
+
388
+
389
+ :param job_queue_id: The job_queue_id of this UsageByCluster. # noqa: E501
390
+ :type: str
391
+ """
392
+
393
+ self._job_queue_id = job_queue_id
394
+
395
+ @property
396
+ def job_queue_name(self):
397
+ """Gets the job_queue_name of this UsageByCluster. # noqa: E501
398
+
399
+
400
+ :return: The job_queue_name of this UsageByCluster. # noqa: E501
401
+ :rtype: str
402
+ """
403
+ return self._job_queue_name
404
+
405
+ @job_queue_name.setter
406
+ def job_queue_name(self, job_queue_name):
407
+ """Sets the job_queue_name of this UsageByCluster.
408
+
409
+
410
+ :param job_queue_name: The job_queue_name of this UsageByCluster. # noqa: E501
411
+ :type: str
412
+ """
413
+
414
+ self._job_queue_name = job_queue_name
415
+
416
+ @property
417
+ def service_id(self):
418
+ """Gets the service_id of this UsageByCluster. # noqa: E501
419
+
420
+
421
+ :return: The service_id of this UsageByCluster. # noqa: E501
422
+ :rtype: str
423
+ """
424
+ return self._service_id
425
+
426
+ @service_id.setter
427
+ def service_id(self, service_id):
428
+ """Sets the service_id of this UsageByCluster.
429
+
430
+
431
+ :param service_id: The service_id of this UsageByCluster. # noqa: E501
432
+ :type: str
433
+ """
434
+
435
+ self._service_id = service_id
436
+
437
+ @property
438
+ def service_name(self):
439
+ """Gets the service_name of this UsageByCluster. # noqa: E501
440
+
441
+
442
+ :return: The service_name of this UsageByCluster. # noqa: E501
443
+ :rtype: str
444
+ """
445
+ return self._service_name
446
+
447
+ @service_name.setter
448
+ def service_name(self, service_name):
449
+ """Sets the service_name of this UsageByCluster.
450
+
451
+
452
+ :param service_name: The service_name of this UsageByCluster. # noqa: E501
453
+ :type: str
454
+ """
455
+
456
+ self._service_name = service_name
457
+
458
+ @property
459
+ def workspace_id(self):
460
+ """Gets the workspace_id of this UsageByCluster. # noqa: E501
461
+
462
+
463
+ :return: The workspace_id of this UsageByCluster. # noqa: E501
464
+ :rtype: str
465
+ """
466
+ return self._workspace_id
467
+
468
+ @workspace_id.setter
469
+ def workspace_id(self, workspace_id):
470
+ """Sets the workspace_id of this UsageByCluster.
471
+
472
+
473
+ :param workspace_id: The workspace_id of this UsageByCluster. # noqa: E501
474
+ :type: str
475
+ """
476
+
477
+ self._workspace_id = workspace_id
478
+
479
+ @property
480
+ def workspace_name(self):
481
+ """Gets the workspace_name of this UsageByCluster. # noqa: E501
482
+
483
+
484
+ :return: The workspace_name of this UsageByCluster. # noqa: E501
485
+ :rtype: str
486
+ """
487
+ return self._workspace_name
488
+
489
+ @workspace_name.setter
490
+ def workspace_name(self, workspace_name):
491
+ """Sets the workspace_name of this UsageByCluster.
492
+
493
+
494
+ :param workspace_name: The workspace_name of this UsageByCluster. # noqa: E501
495
+ :type: str
496
+ """
497
+
498
+ self._workspace_name = workspace_name
499
+
500
+ def to_dict(self):
501
+ """Returns the model properties as a dict"""
502
+ result = {}
503
+
504
+ for attr, _ in six.iteritems(self.openapi_types):
505
+ value = getattr(self, attr)
506
+ if isinstance(value, list):
507
+ result[attr] = list(map(
508
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
509
+ value
510
+ ))
511
+ elif hasattr(value, "to_dict"):
512
+ result[attr] = value.to_dict()
513
+ elif isinstance(value, dict):
514
+ result[attr] = dict(map(
515
+ lambda item: (item[0], item[1].to_dict())
516
+ if hasattr(item[1], "to_dict") else item,
517
+ value.items()
518
+ ))
519
+ else:
520
+ result[attr] = value
521
+
522
+ return result
523
+
524
+ def to_str(self):
525
+ """Returns the string representation of the model"""
526
+ return pprint.pformat(self.to_dict())
527
+
528
+ def __repr__(self):
529
+ """For `print` and `pprint`"""
530
+ return self.to_str()
531
+
532
+ def __eq__(self, other):
533
+ """Returns true if both objects are equal"""
534
+ if not isinstance(other, UsageByCluster):
535
+ return False
536
+
537
+ return self.to_dict() == other.to_dict()
538
+
539
+ def __ne__(self, other):
540
+ """Returns true if both objects are not equal"""
541
+ if not isinstance(other, UsageByCluster):
542
+ return True
543
+
544
+ return self.to_dict() != other.to_dict()
@@ -0,0 +1,174 @@
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 UsageByInstanceType(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
+ 'instance_type': 'str'
39
+ }
40
+
41
+ attribute_map = {
42
+ 'anyscale_credits': 'anyscale_credits',
43
+ 'date': 'date',
44
+ 'instance_type': 'instance_type'
45
+ }
46
+
47
+ def __init__(self, anyscale_credits=None, date=None, instance_type=None, local_vars_configuration=None): # noqa: E501
48
+ """UsageByInstanceType - a model defined in OpenAPI""" # noqa: E501
49
+ if local_vars_configuration is None:
50
+ local_vars_configuration = Configuration()
51
+ self.local_vars_configuration = local_vars_configuration
52
+
53
+ self._anyscale_credits = None
54
+ self._date = None
55
+ self._instance_type = None
56
+ self.discriminator = None
57
+
58
+ self.anyscale_credits = anyscale_credits
59
+ if date is not None:
60
+ self.date = date
61
+ self.instance_type = instance_type
62
+
63
+ @property
64
+ def anyscale_credits(self):
65
+ """Gets the anyscale_credits of this UsageByInstanceType. # noqa: E501
66
+
67
+
68
+ :return: The anyscale_credits of this UsageByInstanceType. # noqa: E501
69
+ :rtype: float
70
+ """
71
+ return self._anyscale_credits
72
+
73
+ @anyscale_credits.setter
74
+ def anyscale_credits(self, anyscale_credits):
75
+ """Sets the anyscale_credits of this UsageByInstanceType.
76
+
77
+
78
+ :param anyscale_credits: The anyscale_credits of this UsageByInstanceType. # noqa: E501
79
+ :type: float
80
+ """
81
+ if self.local_vars_configuration.client_side_validation and anyscale_credits is None: # noqa: E501
82
+ raise ValueError("Invalid value for `anyscale_credits`, must not be `None`") # noqa: E501
83
+
84
+ self._anyscale_credits = anyscale_credits
85
+
86
+ @property
87
+ def date(self):
88
+ """Gets the date of this UsageByInstanceType. # noqa: E501
89
+
90
+
91
+ :return: The date of this UsageByInstanceType. # noqa: E501
92
+ :rtype: date
93
+ """
94
+ return self._date
95
+
96
+ @date.setter
97
+ def date(self, date):
98
+ """Sets the date of this UsageByInstanceType.
99
+
100
+
101
+ :param date: The date of this UsageByInstanceType. # noqa: E501
102
+ :type: date
103
+ """
104
+
105
+ self._date = date
106
+
107
+ @property
108
+ def instance_type(self):
109
+ """Gets the instance_type of this UsageByInstanceType. # noqa: E501
110
+
111
+
112
+ :return: The instance_type of this UsageByInstanceType. # noqa: E501
113
+ :rtype: str
114
+ """
115
+ return self._instance_type
116
+
117
+ @instance_type.setter
118
+ def instance_type(self, instance_type):
119
+ """Sets the instance_type of this UsageByInstanceType.
120
+
121
+
122
+ :param instance_type: The instance_type of this UsageByInstanceType. # noqa: E501
123
+ :type: str
124
+ """
125
+ if self.local_vars_configuration.client_side_validation and instance_type is None: # noqa: E501
126
+ raise ValueError("Invalid value for `instance_type`, must not be `None`") # noqa: E501
127
+
128
+ self._instance_type = instance_type
129
+
130
+ def to_dict(self):
131
+ """Returns the model properties as a dict"""
132
+ result = {}
133
+
134
+ for attr, _ in six.iteritems(self.openapi_types):
135
+ value = getattr(self, attr)
136
+ if isinstance(value, list):
137
+ result[attr] = list(map(
138
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
139
+ value
140
+ ))
141
+ elif hasattr(value, "to_dict"):
142
+ result[attr] = value.to_dict()
143
+ elif isinstance(value, dict):
144
+ result[attr] = dict(map(
145
+ lambda item: (item[0], item[1].to_dict())
146
+ if hasattr(item[1], "to_dict") else item,
147
+ value.items()
148
+ ))
149
+ else:
150
+ result[attr] = value
151
+
152
+ return result
153
+
154
+ def to_str(self):
155
+ """Returns the string representation of the model"""
156
+ return pprint.pformat(self.to_dict())
157
+
158
+ def __repr__(self):
159
+ """For `print` and `pprint`"""
160
+ return self.to_str()
161
+
162
+ def __eq__(self, other):
163
+ """Returns true if both objects are equal"""
164
+ if not isinstance(other, UsageByInstanceType):
165
+ return False
166
+
167
+ return self.to_dict() == other.to_dict()
168
+
169
+ def __ne__(self, other):
170
+ """Returns true if both objects are not equal"""
171
+ if not isinstance(other, UsageByInstanceType):
172
+ return True
173
+
174
+ return self.to_dict() != other.to_dict()