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.
- anyscale/__init__.py +10 -0
- anyscale/_private/anyscale_client/anyscale_client.py +10 -0
- anyscale/_private/anyscale_client/common.py +9 -0
- anyscale/_private/anyscale_client/fake_anyscale_client.py +28 -0
- anyscale/_private/docgen/__main__.py +12 -0
- anyscale/_private/docgen/generator.py +1 -0
- anyscale/client/README.md +25 -2
- anyscale/client/openapi_client/__init__.py +18 -2
- anyscale/client/openapi_client/api/default_api.py +992 -105
- anyscale/client/openapi_client/models/__init__.py +18 -2
- anyscale/client/openapi_client/models/admin_create_user.py +255 -0
- anyscale/client/openapi_client/models/admin_created_user.py +281 -0
- anyscale/client/openapi_client/models/admincreateduser_list_response.py +147 -0
- anyscale/client/openapi_client/models/{aggregated_instance_usage_with_cost_model.py → aggregated_instance_usage_csv.py} +100 -100
- anyscale/client/openapi_client/models/aggregated_usage.py +147 -0
- anyscale/client/openapi_client/models/aggregated_usage_query.py +236 -0
- anyscale/client/openapi_client/models/{aggregatedinstanceusagewithcostmodel_list_response.py → aggregatedinstanceusagecsv_list_response.py} +15 -15
- anyscale/client/openapi_client/models/aggregatedusage_response.py +121 -0
- anyscale/client/openapi_client/models/cloud_resource.py +29 -1
- anyscale/client/openapi_client/models/cloud_resource_gcp.py +29 -1
- anyscale/client/openapi_client/models/create_cloud_resource.py +29 -1
- anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +29 -1
- anyscale/client/openapi_client/models/usage_by_cloud.py +201 -0
- anyscale/client/openapi_client/models/usage_by_cluster.py +544 -0
- anyscale/client/openapi_client/models/usage_by_instance_type.py +174 -0
- anyscale/client/openapi_client/models/usage_by_project.py +255 -0
- anyscale/client/openapi_client/models/usage_by_user.py +201 -0
- anyscale/client/openapi_client/models/usagebycloud_list_response.py +147 -0
- anyscale/client/openapi_client/models/usagebycluster_list_response.py +147 -0
- anyscale/client/openapi_client/models/usagebyinstancetype_list_response.py +147 -0
- anyscale/client/openapi_client/models/usagebyproject_list_response.py +147 -0
- anyscale/client/openapi_client/models/usagebyuser_list_response.py +147 -0
- anyscale/commands/cloud_commands.py +8 -0
- anyscale/commands/command_examples.py +6 -0
- anyscale/commands/user_commands.py +49 -0
- anyscale/controllers/cloud_controller.py +3 -0
- anyscale/scripts.py +2 -0
- anyscale/user/__init__.py +35 -0
- anyscale/user/_private/user_sdk.py +32 -0
- anyscale/user/commands.py +42 -0
- anyscale/user/models.py +191 -0
- anyscale/version.py +1 -1
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/METADATA +1 -1
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/RECORD +49 -28
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/LICENSE +0 -0
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/NOTICE +0 -0
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/WHEEL +0 -0
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/entry_points.txt +0 -0
- {anyscale-0.24.86.dist-info → anyscale-0.24.88.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,255 @@
|
|
|
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 UsageByProject(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
|
+
'project_id': 'str',
|
|
41
|
+
'project_name': 'str'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
attribute_map = {
|
|
45
|
+
'anyscale_credits': 'anyscale_credits',
|
|
46
|
+
'date': 'date',
|
|
47
|
+
'cloud_id': 'cloud_id',
|
|
48
|
+
'cloud_name': 'cloud_name',
|
|
49
|
+
'project_id': 'project_id',
|
|
50
|
+
'project_name': 'project_name'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, anyscale_credits=None, date=None, cloud_id=None, cloud_name=None, project_id=None, project_name=None, local_vars_configuration=None): # noqa: E501
|
|
54
|
+
"""UsageByProject - 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._anyscale_credits = None
|
|
60
|
+
self._date = None
|
|
61
|
+
self._cloud_id = None
|
|
62
|
+
self._cloud_name = None
|
|
63
|
+
self._project_id = None
|
|
64
|
+
self._project_name = None
|
|
65
|
+
self.discriminator = None
|
|
66
|
+
|
|
67
|
+
self.anyscale_credits = anyscale_credits
|
|
68
|
+
if date is not None:
|
|
69
|
+
self.date = date
|
|
70
|
+
self.cloud_id = cloud_id
|
|
71
|
+
self.cloud_name = cloud_name
|
|
72
|
+
self.project_id = project_id
|
|
73
|
+
self.project_name = project_name
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def anyscale_credits(self):
|
|
77
|
+
"""Gets the anyscale_credits of this UsageByProject. # noqa: E501
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
:return: The anyscale_credits of this UsageByProject. # noqa: E501
|
|
81
|
+
:rtype: float
|
|
82
|
+
"""
|
|
83
|
+
return self._anyscale_credits
|
|
84
|
+
|
|
85
|
+
@anyscale_credits.setter
|
|
86
|
+
def anyscale_credits(self, anyscale_credits):
|
|
87
|
+
"""Sets the anyscale_credits of this UsageByProject.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
:param anyscale_credits: The anyscale_credits of this UsageByProject. # noqa: E501
|
|
91
|
+
:type: float
|
|
92
|
+
"""
|
|
93
|
+
if self.local_vars_configuration.client_side_validation and anyscale_credits is None: # noqa: E501
|
|
94
|
+
raise ValueError("Invalid value for `anyscale_credits`, must not be `None`") # noqa: E501
|
|
95
|
+
|
|
96
|
+
self._anyscale_credits = anyscale_credits
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def date(self):
|
|
100
|
+
"""Gets the date of this UsageByProject. # noqa: E501
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
:return: The date of this UsageByProject. # noqa: E501
|
|
104
|
+
:rtype: date
|
|
105
|
+
"""
|
|
106
|
+
return self._date
|
|
107
|
+
|
|
108
|
+
@date.setter
|
|
109
|
+
def date(self, date):
|
|
110
|
+
"""Sets the date of this UsageByProject.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
:param date: The date of this UsageByProject. # noqa: E501
|
|
114
|
+
:type: date
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
self._date = date
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def cloud_id(self):
|
|
121
|
+
"""Gets the cloud_id of this UsageByProject. # noqa: E501
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
:return: The cloud_id of this UsageByProject. # noqa: E501
|
|
125
|
+
:rtype: str
|
|
126
|
+
"""
|
|
127
|
+
return self._cloud_id
|
|
128
|
+
|
|
129
|
+
@cloud_id.setter
|
|
130
|
+
def cloud_id(self, cloud_id):
|
|
131
|
+
"""Sets the cloud_id of this UsageByProject.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:param cloud_id: The cloud_id of this UsageByProject. # noqa: E501
|
|
135
|
+
:type: str
|
|
136
|
+
"""
|
|
137
|
+
if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
|
|
138
|
+
raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
|
|
139
|
+
|
|
140
|
+
self._cloud_id = cloud_id
|
|
141
|
+
|
|
142
|
+
@property
|
|
143
|
+
def cloud_name(self):
|
|
144
|
+
"""Gets the cloud_name of this UsageByProject. # noqa: E501
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
:return: The cloud_name of this UsageByProject. # noqa: E501
|
|
148
|
+
:rtype: str
|
|
149
|
+
"""
|
|
150
|
+
return self._cloud_name
|
|
151
|
+
|
|
152
|
+
@cloud_name.setter
|
|
153
|
+
def cloud_name(self, cloud_name):
|
|
154
|
+
"""Sets the cloud_name of this UsageByProject.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
:param cloud_name: The cloud_name of this UsageByProject. # noqa: E501
|
|
158
|
+
:type: str
|
|
159
|
+
"""
|
|
160
|
+
if self.local_vars_configuration.client_side_validation and cloud_name is None: # noqa: E501
|
|
161
|
+
raise ValueError("Invalid value for `cloud_name`, must not be `None`") # noqa: E501
|
|
162
|
+
|
|
163
|
+
self._cloud_name = cloud_name
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def project_id(self):
|
|
167
|
+
"""Gets the project_id of this UsageByProject. # noqa: E501
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
:return: The project_id of this UsageByProject. # noqa: E501
|
|
171
|
+
:rtype: str
|
|
172
|
+
"""
|
|
173
|
+
return self._project_id
|
|
174
|
+
|
|
175
|
+
@project_id.setter
|
|
176
|
+
def project_id(self, project_id):
|
|
177
|
+
"""Sets the project_id of this UsageByProject.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
:param project_id: The project_id of this UsageByProject. # noqa: E501
|
|
181
|
+
:type: str
|
|
182
|
+
"""
|
|
183
|
+
if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
|
|
184
|
+
raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
|
|
185
|
+
|
|
186
|
+
self._project_id = project_id
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def project_name(self):
|
|
190
|
+
"""Gets the project_name of this UsageByProject. # noqa: E501
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
:return: The project_name of this UsageByProject. # noqa: E501
|
|
194
|
+
:rtype: str
|
|
195
|
+
"""
|
|
196
|
+
return self._project_name
|
|
197
|
+
|
|
198
|
+
@project_name.setter
|
|
199
|
+
def project_name(self, project_name):
|
|
200
|
+
"""Sets the project_name of this UsageByProject.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
:param project_name: The project_name of this UsageByProject. # noqa: E501
|
|
204
|
+
:type: str
|
|
205
|
+
"""
|
|
206
|
+
if self.local_vars_configuration.client_side_validation and project_name is None: # noqa: E501
|
|
207
|
+
raise ValueError("Invalid value for `project_name`, must not be `None`") # noqa: E501
|
|
208
|
+
|
|
209
|
+
self._project_name = project_name
|
|
210
|
+
|
|
211
|
+
def to_dict(self):
|
|
212
|
+
"""Returns the model properties as a dict"""
|
|
213
|
+
result = {}
|
|
214
|
+
|
|
215
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
216
|
+
value = getattr(self, attr)
|
|
217
|
+
if isinstance(value, list):
|
|
218
|
+
result[attr] = list(map(
|
|
219
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
220
|
+
value
|
|
221
|
+
))
|
|
222
|
+
elif hasattr(value, "to_dict"):
|
|
223
|
+
result[attr] = value.to_dict()
|
|
224
|
+
elif isinstance(value, dict):
|
|
225
|
+
result[attr] = dict(map(
|
|
226
|
+
lambda item: (item[0], item[1].to_dict())
|
|
227
|
+
if hasattr(item[1], "to_dict") else item,
|
|
228
|
+
value.items()
|
|
229
|
+
))
|
|
230
|
+
else:
|
|
231
|
+
result[attr] = value
|
|
232
|
+
|
|
233
|
+
return result
|
|
234
|
+
|
|
235
|
+
def to_str(self):
|
|
236
|
+
"""Returns the string representation of the model"""
|
|
237
|
+
return pprint.pformat(self.to_dict())
|
|
238
|
+
|
|
239
|
+
def __repr__(self):
|
|
240
|
+
"""For `print` and `pprint`"""
|
|
241
|
+
return self.to_str()
|
|
242
|
+
|
|
243
|
+
def __eq__(self, other):
|
|
244
|
+
"""Returns true if both objects are equal"""
|
|
245
|
+
if not isinstance(other, UsageByProject):
|
|
246
|
+
return False
|
|
247
|
+
|
|
248
|
+
return self.to_dict() == other.to_dict()
|
|
249
|
+
|
|
250
|
+
def __ne__(self, other):
|
|
251
|
+
"""Returns true if both objects are not equal"""
|
|
252
|
+
if not isinstance(other, UsageByProject):
|
|
253
|
+
return True
|
|
254
|
+
|
|
255
|
+
return self.to_dict() != other.to_dict()
|
|
@@ -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 UsageByUser(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
|
+
}
|
|
41
|
+
|
|
42
|
+
attribute_map = {
|
|
43
|
+
'anyscale_credits': 'anyscale_credits',
|
|
44
|
+
'date': 'date',
|
|
45
|
+
'user_id': 'user_id',
|
|
46
|
+
'user_email': 'user_email'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self, anyscale_credits=None, date=None, user_id=None, user_email=None, local_vars_configuration=None): # noqa: E501
|
|
50
|
+
"""UsageByUser - 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._user_id = None
|
|
58
|
+
self._user_email = None
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
self.anyscale_credits = anyscale_credits
|
|
62
|
+
if date is not None:
|
|
63
|
+
self.date = date
|
|
64
|
+
self.user_id = user_id
|
|
65
|
+
self.user_email = user_email
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def anyscale_credits(self):
|
|
69
|
+
"""Gets the anyscale_credits of this UsageByUser. # noqa: E501
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
:return: The anyscale_credits of this UsageByUser. # 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 UsageByUser.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
:param anyscale_credits: The anyscale_credits of this UsageByUser. # 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 UsageByUser. # noqa: E501
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
:return: The date of this UsageByUser. # 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 UsageByUser.
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
:param date: The date of this UsageByUser. # noqa: E501
|
|
106
|
+
:type: date
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
self._date = date
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def user_id(self):
|
|
113
|
+
"""Gets the user_id of this UsageByUser. # noqa: E501
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
:return: The user_id of this UsageByUser. # noqa: E501
|
|
117
|
+
:rtype: str
|
|
118
|
+
"""
|
|
119
|
+
return self._user_id
|
|
120
|
+
|
|
121
|
+
@user_id.setter
|
|
122
|
+
def user_id(self, user_id):
|
|
123
|
+
"""Sets the user_id of this UsageByUser.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
:param user_id: The user_id of this UsageByUser. # noqa: E501
|
|
127
|
+
:type: str
|
|
128
|
+
"""
|
|
129
|
+
if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501
|
|
130
|
+
raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501
|
|
131
|
+
|
|
132
|
+
self._user_id = user_id
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def user_email(self):
|
|
136
|
+
"""Gets the user_email of this UsageByUser. # noqa: E501
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
:return: The user_email of this UsageByUser. # noqa: E501
|
|
140
|
+
:rtype: str
|
|
141
|
+
"""
|
|
142
|
+
return self._user_email
|
|
143
|
+
|
|
144
|
+
@user_email.setter
|
|
145
|
+
def user_email(self, user_email):
|
|
146
|
+
"""Sets the user_email of this UsageByUser.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
:param user_email: The user_email of this UsageByUser. # noqa: E501
|
|
150
|
+
:type: str
|
|
151
|
+
"""
|
|
152
|
+
if self.local_vars_configuration.client_side_validation and user_email is None: # noqa: E501
|
|
153
|
+
raise ValueError("Invalid value for `user_email`, must not be `None`") # noqa: E501
|
|
154
|
+
|
|
155
|
+
self._user_email = user_email
|
|
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, UsageByUser):
|
|
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, UsageByUser):
|
|
199
|
+
return True
|
|
200
|
+
|
|
201
|
+
return self.to_dict() != other.to_dict()
|
|
@@ -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 UsagebycloudListResponse(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
|
+
'results': 'list[UsageByCloud]',
|
|
37
|
+
'metadata': 'ListResponseMetadata'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
attribute_map = {
|
|
41
|
+
'results': 'results',
|
|
42
|
+
'metadata': 'metadata'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
def __init__(self, results=None, metadata=None, local_vars_configuration=None): # noqa: E501
|
|
46
|
+
"""UsagebycloudListResponse - 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._results = None
|
|
52
|
+
self._metadata = None
|
|
53
|
+
self.discriminator = None
|
|
54
|
+
|
|
55
|
+
self.results = results
|
|
56
|
+
if metadata is not None:
|
|
57
|
+
self.metadata = metadata
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def results(self):
|
|
61
|
+
"""Gets the results of this UsagebycloudListResponse. # noqa: E501
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:return: The results of this UsagebycloudListResponse. # noqa: E501
|
|
65
|
+
:rtype: list[UsageByCloud]
|
|
66
|
+
"""
|
|
67
|
+
return self._results
|
|
68
|
+
|
|
69
|
+
@results.setter
|
|
70
|
+
def results(self, results):
|
|
71
|
+
"""Sets the results of this UsagebycloudListResponse.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
:param results: The results of this UsagebycloudListResponse. # noqa: E501
|
|
75
|
+
:type: list[UsageByCloud]
|
|
76
|
+
"""
|
|
77
|
+
if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
|
|
78
|
+
raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
|
|
79
|
+
|
|
80
|
+
self._results = results
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def metadata(self):
|
|
84
|
+
"""Gets the metadata of this UsagebycloudListResponse. # noqa: E501
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
:return: The metadata of this UsagebycloudListResponse. # noqa: E501
|
|
88
|
+
:rtype: ListResponseMetadata
|
|
89
|
+
"""
|
|
90
|
+
return self._metadata
|
|
91
|
+
|
|
92
|
+
@metadata.setter
|
|
93
|
+
def metadata(self, metadata):
|
|
94
|
+
"""Sets the metadata of this UsagebycloudListResponse.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
:param metadata: The metadata of this UsagebycloudListResponse. # noqa: E501
|
|
98
|
+
:type: ListResponseMetadata
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
self._metadata = metadata
|
|
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, UsagebycloudListResponse):
|
|
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, UsagebycloudListResponse):
|
|
145
|
+
return True
|
|
146
|
+
|
|
147
|
+
return self.to_dict() != other.to_dict()
|