anyscale 0.26.23__py3-none-any.whl → 0.26.24__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/_private/anyscale_client/anyscale_client.py +1 -1
- anyscale/_private/docgen/__main__.py +0 -8
- anyscale/_private/docgen/models.md +39 -182
- anyscale/_private/workload/workload_config.py +1 -1
- anyscale/client/README.md +2 -35
- anyscale/client/openapi_client/__init__.py +2 -21
- anyscale/client/openapi_client/api/default_api.py +275 -1868
- anyscale/client/openapi_client/models/__init__.py +2 -21
- anyscale/client/openapi_client/models/cloud_data_bucket_file_type.py +2 -1
- anyscale/client/openapi_client/models/cloud_deployment.py +2 -2
- anyscale/client/openapi_client/models/cloud_deployment_compute_config.py +291 -0
- anyscale/client/openapi_client/models/cloud_deployment_selector.py +206 -0
- anyscale/client/openapi_client/models/cloud_providers.py +2 -1
- anyscale/client/openapi_client/models/compute_template_config.py +61 -34
- anyscale/client/openapi_client/models/create_cluster_compute_config.py +59 -31
- anyscale/client/openapi_client/models/create_compute_template_config.py +61 -34
- anyscale/client/openapi_client/models/create_workspace_from_template.py +3 -2
- anyscale/client/openapi_client/models/decorated_compute_template_config.py +61 -34
- anyscale/client/openapi_client/models/decorated_session.py +31 -3
- anyscale/client/openapi_client/models/workspace_dataplane_proxied_artifacts.py +31 -3
- anyscale/cluster_compute.py +4 -4
- anyscale/commands/anyscale_api/sessions_commands.py +1 -70
- anyscale/commands/cloud_commands.py +5 -4
- anyscale/commands/image_commands.py +2 -2
- anyscale/commands/job_commands.py +1 -1
- anyscale/commands/service_commands.py +1 -1
- anyscale/commands/workspace_commands_v2.py +1 -1
- anyscale/connect_utils/prepare_cluster.py +1 -3
- anyscale/controllers/cloud_controller.py +12 -6
- anyscale/controllers/cloud_functional_verification_controller.py +2 -2
- anyscale/image/commands.py +1 -1
- anyscale/sdk/anyscale_client/__init__.py +2 -15
- anyscale/sdk/anyscale_client/api/default_api.py +1270 -2871
- anyscale/sdk/anyscale_client/models/__init__.py +2 -15
- anyscale/sdk/anyscale_client/models/cloud_deployment_compute_config.py +291 -0
- anyscale/sdk/anyscale_client/models/cloud_deployment_selector.py +206 -0
- anyscale/sdk/anyscale_client/models/cloud_providers.py +2 -1
- anyscale/sdk/anyscale_client/models/cluster_compute_config.py +61 -34
- anyscale/sdk/anyscale_client/models/cluster_services_urls.py +29 -1
- anyscale/sdk/anyscale_client/models/compute_template_config.py +61 -34
- anyscale/sdk/anyscale_client/models/create_cluster_compute_config.py +59 -31
- anyscale/sdk/anyscale_client/models/session.py +31 -3
- anyscale/shared_anyscale_utils/utils/id_gen.py +3 -1
- anyscale/version.py +1 -1
- anyscale/workspace/models.py +1 -1
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/METADATA +1 -1
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/RECORD +52 -84
- anyscale/client/openapi_client/models/bank_account_information.py +0 -239
- anyscale/client/openapi_client/models/billing_information.py +0 -181
- anyscale/client/openapi_client/models/credit_card_information.py +0 -268
- anyscale/client/openapi_client/models/decoratedunifiedjob_response.py +0 -121
- anyscale/client/openapi_client/models/invoice.py +0 -413
- anyscale/client/openapi_client/models/invoice_list_response.py +0 -147
- anyscale/client/openapi_client/models/invoice_status.py +0 -102
- anyscale/client/openapi_client/models/invoices_query.py +0 -150
- anyscale/client/openapi_client/models/log_stream.py +0 -151
- anyscale/client/openapi_client/models/logstream_response.py +0 -121
- anyscale/client/openapi_client/models/miniproject_list_response.py +0 -147
- anyscale/client/openapi_client/models/organization_project_collaborator.py +0 -175
- anyscale/client/openapi_client/models/organization_project_collaborator_value.py +0 -148
- anyscale/client/openapi_client/models/organizationprojectcollaborator_list_response.py +0 -147
- anyscale/client/openapi_client/models/product_type.py +0 -100
- anyscale/client/openapi_client/models/service_usage.py +0 -353
- anyscale/client/openapi_client/models/templatized_compute_configs.py +0 -202
- anyscale/client/openapi_client/models/templatized_decorated_application_templates.py +0 -202
- anyscale/client/openapi_client/models/templatizedcomputeconfigs_response.py +0 -121
- anyscale/client/openapi_client/models/templatizeddecoratedapplicationtemplates_response.py +0 -121
- anyscale/client/openapi_client/models/write_session.py +0 -147
- anyscale/sdk/anyscale_client/models/build_list_response.py +0 -147
- anyscale/sdk/anyscale_client/models/build_log_response.py +0 -123
- anyscale/sdk/anyscale_client/models/buildlogresponse_response.py +0 -121
- anyscale/sdk/anyscale_client/models/compute_template_query.py +0 -316
- anyscale/sdk/anyscale_client/models/computetemplate_list_response.py +0 -147
- anyscale/sdk/anyscale_client/models/create_build.py +0 -263
- anyscale/sdk/anyscale_client/models/create_compute_template.py +0 -229
- anyscale/sdk/anyscale_client/models/create_compute_template_config.py +0 -464
- anyscale/sdk/anyscale_client/models/session_list_response.py +0 -147
- anyscale/sdk/anyscale_client/models/sessions_query.py +0 -206
- anyscale/sdk/anyscale_client/models/start_session_options.py +0 -206
- anyscale/sdk/anyscale_client/models/terminate_session_options.py +0 -206
- anyscale/sdk/anyscale_client/models/update_compute_template.py +0 -146
- anyscale/sdk/anyscale_client/models/update_compute_template_config.py +0 -464
- anyscale/sdk/anyscale_client/models/update_session.py +0 -150
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/LICENSE +0 -0
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/NOTICE +0 -0
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/WHEEL +0 -0
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/top_level.txt +0 -0
@@ -1,353 +0,0 @@
|
|
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 ServiceUsage(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
|
-
'product_type': 'ProductType',
|
37
|
-
'credit_card_information': 'CreditCardInformation',
|
38
|
-
'bank_account_information': 'BankAccountInformation',
|
39
|
-
'current_billing_period_start': 'datetime',
|
40
|
-
'current_billing_period_end': 'datetime',
|
41
|
-
'unpaid_balance': 'int',
|
42
|
-
'available_credits': 'int',
|
43
|
-
'current_period_usage': 'int',
|
44
|
-
'projected_balance_due': 'int'
|
45
|
-
}
|
46
|
-
|
47
|
-
attribute_map = {
|
48
|
-
'product_type': 'product_type',
|
49
|
-
'credit_card_information': 'credit_card_information',
|
50
|
-
'bank_account_information': 'bank_account_information',
|
51
|
-
'current_billing_period_start': 'current_billing_period_start',
|
52
|
-
'current_billing_period_end': 'current_billing_period_end',
|
53
|
-
'unpaid_balance': 'unpaid_balance',
|
54
|
-
'available_credits': 'available_credits',
|
55
|
-
'current_period_usage': 'current_period_usage',
|
56
|
-
'projected_balance_due': 'projected_balance_due'
|
57
|
-
}
|
58
|
-
|
59
|
-
def __init__(self, product_type=None, credit_card_information=None, bank_account_information=None, current_billing_period_start=None, current_billing_period_end=None, unpaid_balance=None, available_credits=None, current_period_usage=None, projected_balance_due=None, local_vars_configuration=None): # noqa: E501
|
60
|
-
"""ServiceUsage - a model defined in OpenAPI""" # noqa: E501
|
61
|
-
if local_vars_configuration is None:
|
62
|
-
local_vars_configuration = Configuration()
|
63
|
-
self.local_vars_configuration = local_vars_configuration
|
64
|
-
|
65
|
-
self._product_type = None
|
66
|
-
self._credit_card_information = None
|
67
|
-
self._bank_account_information = None
|
68
|
-
self._current_billing_period_start = None
|
69
|
-
self._current_billing_period_end = None
|
70
|
-
self._unpaid_balance = None
|
71
|
-
self._available_credits = None
|
72
|
-
self._current_period_usage = None
|
73
|
-
self._projected_balance_due = None
|
74
|
-
self.discriminator = None
|
75
|
-
|
76
|
-
self.product_type = product_type
|
77
|
-
if credit_card_information is not None:
|
78
|
-
self.credit_card_information = credit_card_information
|
79
|
-
if bank_account_information is not None:
|
80
|
-
self.bank_account_information = bank_account_information
|
81
|
-
self.current_billing_period_start = current_billing_period_start
|
82
|
-
self.current_billing_period_end = current_billing_period_end
|
83
|
-
self.unpaid_balance = unpaid_balance
|
84
|
-
self.available_credits = available_credits
|
85
|
-
self.current_period_usage = current_period_usage
|
86
|
-
self.projected_balance_due = projected_balance_due
|
87
|
-
|
88
|
-
@property
|
89
|
-
def product_type(self):
|
90
|
-
"""Gets the product_type of this ServiceUsage. # noqa: E501
|
91
|
-
|
92
|
-
Type of product subscription this information is about. # noqa: E501
|
93
|
-
|
94
|
-
:return: The product_type of this ServiceUsage. # noqa: E501
|
95
|
-
:rtype: ProductType
|
96
|
-
"""
|
97
|
-
return self._product_type
|
98
|
-
|
99
|
-
@product_type.setter
|
100
|
-
def product_type(self, product_type):
|
101
|
-
"""Sets the product_type of this ServiceUsage.
|
102
|
-
|
103
|
-
Type of product subscription this information is about. # noqa: E501
|
104
|
-
|
105
|
-
:param product_type: The product_type of this ServiceUsage. # noqa: E501
|
106
|
-
:type: ProductType
|
107
|
-
"""
|
108
|
-
if self.local_vars_configuration.client_side_validation and product_type is None: # noqa: E501
|
109
|
-
raise ValueError("Invalid value for `product_type`, must not be `None`") # noqa: E501
|
110
|
-
|
111
|
-
self._product_type = product_type
|
112
|
-
|
113
|
-
@property
|
114
|
-
def credit_card_information(self):
|
115
|
-
"""Gets the credit_card_information of this ServiceUsage. # noqa: E501
|
116
|
-
|
117
|
-
Payment information if payment type is credit card. # noqa: E501
|
118
|
-
|
119
|
-
:return: The credit_card_information of this ServiceUsage. # noqa: E501
|
120
|
-
:rtype: CreditCardInformation
|
121
|
-
"""
|
122
|
-
return self._credit_card_information
|
123
|
-
|
124
|
-
@credit_card_information.setter
|
125
|
-
def credit_card_information(self, credit_card_information):
|
126
|
-
"""Sets the credit_card_information of this ServiceUsage.
|
127
|
-
|
128
|
-
Payment information if payment type is credit card. # noqa: E501
|
129
|
-
|
130
|
-
:param credit_card_information: The credit_card_information of this ServiceUsage. # noqa: E501
|
131
|
-
:type: CreditCardInformation
|
132
|
-
"""
|
133
|
-
|
134
|
-
self._credit_card_information = credit_card_information
|
135
|
-
|
136
|
-
@property
|
137
|
-
def bank_account_information(self):
|
138
|
-
"""Gets the bank_account_information of this ServiceUsage. # noqa: E501
|
139
|
-
|
140
|
-
Payment information if payment type is bank account. # noqa: E501
|
141
|
-
|
142
|
-
:return: The bank_account_information of this ServiceUsage. # noqa: E501
|
143
|
-
:rtype: BankAccountInformation
|
144
|
-
"""
|
145
|
-
return self._bank_account_information
|
146
|
-
|
147
|
-
@bank_account_information.setter
|
148
|
-
def bank_account_information(self, bank_account_information):
|
149
|
-
"""Sets the bank_account_information of this ServiceUsage.
|
150
|
-
|
151
|
-
Payment information if payment type is bank account. # noqa: E501
|
152
|
-
|
153
|
-
:param bank_account_information: The bank_account_information of this ServiceUsage. # noqa: E501
|
154
|
-
:type: BankAccountInformation
|
155
|
-
"""
|
156
|
-
|
157
|
-
self._bank_account_information = bank_account_information
|
158
|
-
|
159
|
-
@property
|
160
|
-
def current_billing_period_start(self):
|
161
|
-
"""Gets the current_billing_period_start of this ServiceUsage. # noqa: E501
|
162
|
-
|
163
|
-
Start date for current billing period. # noqa: E501
|
164
|
-
|
165
|
-
:return: The current_billing_period_start of this ServiceUsage. # noqa: E501
|
166
|
-
:rtype: datetime
|
167
|
-
"""
|
168
|
-
return self._current_billing_period_start
|
169
|
-
|
170
|
-
@current_billing_period_start.setter
|
171
|
-
def current_billing_period_start(self, current_billing_period_start):
|
172
|
-
"""Sets the current_billing_period_start of this ServiceUsage.
|
173
|
-
|
174
|
-
Start date for current billing period. # noqa: E501
|
175
|
-
|
176
|
-
:param current_billing_period_start: The current_billing_period_start of this ServiceUsage. # noqa: E501
|
177
|
-
:type: datetime
|
178
|
-
"""
|
179
|
-
if self.local_vars_configuration.client_side_validation and current_billing_period_start is None: # noqa: E501
|
180
|
-
raise ValueError("Invalid value for `current_billing_period_start`, must not be `None`") # noqa: E501
|
181
|
-
|
182
|
-
self._current_billing_period_start = current_billing_period_start
|
183
|
-
|
184
|
-
@property
|
185
|
-
def current_billing_period_end(self):
|
186
|
-
"""Gets the current_billing_period_end of this ServiceUsage. # noqa: E501
|
187
|
-
|
188
|
-
End date for current billing period. # noqa: E501
|
189
|
-
|
190
|
-
:return: The current_billing_period_end of this ServiceUsage. # noqa: E501
|
191
|
-
:rtype: datetime
|
192
|
-
"""
|
193
|
-
return self._current_billing_period_end
|
194
|
-
|
195
|
-
@current_billing_period_end.setter
|
196
|
-
def current_billing_period_end(self, current_billing_period_end):
|
197
|
-
"""Sets the current_billing_period_end of this ServiceUsage.
|
198
|
-
|
199
|
-
End date for current billing period. # noqa: E501
|
200
|
-
|
201
|
-
:param current_billing_period_end: The current_billing_period_end of this ServiceUsage. # noqa: E501
|
202
|
-
:type: datetime
|
203
|
-
"""
|
204
|
-
if self.local_vars_configuration.client_side_validation and current_billing_period_end is None: # noqa: E501
|
205
|
-
raise ValueError("Invalid value for `current_billing_period_end`, must not be `None`") # noqa: E501
|
206
|
-
|
207
|
-
self._current_billing_period_end = current_billing_period_end
|
208
|
-
|
209
|
-
@property
|
210
|
-
def unpaid_balance(self):
|
211
|
-
"""Gets the unpaid_balance of this ServiceUsage. # noqa: E501
|
212
|
-
|
213
|
-
Accumulated unpaid balances from previous billing periods in cents. # noqa: E501
|
214
|
-
|
215
|
-
:return: The unpaid_balance of this ServiceUsage. # noqa: E501
|
216
|
-
:rtype: int
|
217
|
-
"""
|
218
|
-
return self._unpaid_balance
|
219
|
-
|
220
|
-
@unpaid_balance.setter
|
221
|
-
def unpaid_balance(self, unpaid_balance):
|
222
|
-
"""Sets the unpaid_balance of this ServiceUsage.
|
223
|
-
|
224
|
-
Accumulated unpaid balances from previous billing periods in cents. # noqa: E501
|
225
|
-
|
226
|
-
:param unpaid_balance: The unpaid_balance of this ServiceUsage. # noqa: E501
|
227
|
-
:type: int
|
228
|
-
"""
|
229
|
-
if self.local_vars_configuration.client_side_validation and unpaid_balance is None: # noqa: E501
|
230
|
-
raise ValueError("Invalid value for `unpaid_balance`, must not be `None`") # noqa: E501
|
231
|
-
|
232
|
-
self._unpaid_balance = unpaid_balance
|
233
|
-
|
234
|
-
@property
|
235
|
-
def available_credits(self):
|
236
|
-
"""Gets the available_credits of this ServiceUsage. # noqa: E501
|
237
|
-
|
238
|
-
Available free and prepaid credits (in cents) at start of current billing cycle (not projected). # noqa: E501
|
239
|
-
|
240
|
-
:return: The available_credits of this ServiceUsage. # noqa: E501
|
241
|
-
:rtype: int
|
242
|
-
"""
|
243
|
-
return self._available_credits
|
244
|
-
|
245
|
-
@available_credits.setter
|
246
|
-
def available_credits(self, available_credits):
|
247
|
-
"""Sets the available_credits of this ServiceUsage.
|
248
|
-
|
249
|
-
Available free and prepaid credits (in cents) at start of current billing cycle (not projected). # noqa: E501
|
250
|
-
|
251
|
-
:param available_credits: The available_credits of this ServiceUsage. # noqa: E501
|
252
|
-
:type: int
|
253
|
-
"""
|
254
|
-
if self.local_vars_configuration.client_side_validation and available_credits is None: # noqa: E501
|
255
|
-
raise ValueError("Invalid value for `available_credits`, must not be `None`") # noqa: E501
|
256
|
-
|
257
|
-
self._available_credits = available_credits
|
258
|
-
|
259
|
-
@property
|
260
|
-
def current_period_usage(self):
|
261
|
-
"""Gets the current_period_usage of this ServiceUsage. # noqa: E501
|
262
|
-
|
263
|
-
Cost of usage in current billing period (in cents). # noqa: E501
|
264
|
-
|
265
|
-
:return: The current_period_usage of this ServiceUsage. # noqa: E501
|
266
|
-
:rtype: int
|
267
|
-
"""
|
268
|
-
return self._current_period_usage
|
269
|
-
|
270
|
-
@current_period_usage.setter
|
271
|
-
def current_period_usage(self, current_period_usage):
|
272
|
-
"""Sets the current_period_usage of this ServiceUsage.
|
273
|
-
|
274
|
-
Cost of usage in current billing period (in cents). # noqa: E501
|
275
|
-
|
276
|
-
:param current_period_usage: The current_period_usage of this ServiceUsage. # noqa: E501
|
277
|
-
:type: int
|
278
|
-
"""
|
279
|
-
if self.local_vars_configuration.client_side_validation and current_period_usage is None: # noqa: E501
|
280
|
-
raise ValueError("Invalid value for `current_period_usage`, must not be `None`") # noqa: E501
|
281
|
-
|
282
|
-
self._current_period_usage = current_period_usage
|
283
|
-
|
284
|
-
@property
|
285
|
-
def projected_balance_due(self):
|
286
|
-
"""Gets the projected_balance_due of this ServiceUsage. # noqa: E501
|
287
|
-
|
288
|
-
Projected balance due at end of billing period (for only current billing period). # noqa: E501
|
289
|
-
|
290
|
-
:return: The projected_balance_due of this ServiceUsage. # noqa: E501
|
291
|
-
:rtype: int
|
292
|
-
"""
|
293
|
-
return self._projected_balance_due
|
294
|
-
|
295
|
-
@projected_balance_due.setter
|
296
|
-
def projected_balance_due(self, projected_balance_due):
|
297
|
-
"""Sets the projected_balance_due of this ServiceUsage.
|
298
|
-
|
299
|
-
Projected balance due at end of billing period (for only current billing period). # noqa: E501
|
300
|
-
|
301
|
-
:param projected_balance_due: The projected_balance_due of this ServiceUsage. # noqa: E501
|
302
|
-
:type: int
|
303
|
-
"""
|
304
|
-
if self.local_vars_configuration.client_side_validation and projected_balance_due is None: # noqa: E501
|
305
|
-
raise ValueError("Invalid value for `projected_balance_due`, must not be `None`") # noqa: E501
|
306
|
-
|
307
|
-
self._projected_balance_due = projected_balance_due
|
308
|
-
|
309
|
-
def to_dict(self):
|
310
|
-
"""Returns the model properties as a dict"""
|
311
|
-
result = {}
|
312
|
-
|
313
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
314
|
-
value = getattr(self, attr)
|
315
|
-
if isinstance(value, list):
|
316
|
-
result[attr] = list(map(
|
317
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
318
|
-
value
|
319
|
-
))
|
320
|
-
elif hasattr(value, "to_dict"):
|
321
|
-
result[attr] = value.to_dict()
|
322
|
-
elif isinstance(value, dict):
|
323
|
-
result[attr] = dict(map(
|
324
|
-
lambda item: (item[0], item[1].to_dict())
|
325
|
-
if hasattr(item[1], "to_dict") else item,
|
326
|
-
value.items()
|
327
|
-
))
|
328
|
-
else:
|
329
|
-
result[attr] = value
|
330
|
-
|
331
|
-
return result
|
332
|
-
|
333
|
-
def to_str(self):
|
334
|
-
"""Returns the string representation of the model"""
|
335
|
-
return pprint.pformat(self.to_dict())
|
336
|
-
|
337
|
-
def __repr__(self):
|
338
|
-
"""For `print` and `pprint`"""
|
339
|
-
return self.to_str()
|
340
|
-
|
341
|
-
def __eq__(self, other):
|
342
|
-
"""Returns true if both objects are equal"""
|
343
|
-
if not isinstance(other, ServiceUsage):
|
344
|
-
return False
|
345
|
-
|
346
|
-
return self.to_dict() == other.to_dict()
|
347
|
-
|
348
|
-
def __ne__(self, other):
|
349
|
-
"""Returns true if both objects are not equal"""
|
350
|
-
if not isinstance(other, ServiceUsage):
|
351
|
-
return True
|
352
|
-
|
353
|
-
return self.to_dict() != other.to_dict()
|
@@ -1,202 +0,0 @@
|
|
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 TemplatizedComputeConfigs(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
|
-
'cpu_optimized': 'ComputeTemplateConfig',
|
37
|
-
'gpu_optimized': 'ComputeTemplateConfig',
|
38
|
-
'memory_optimized': 'ComputeTemplateConfig',
|
39
|
-
'default': 'ComputeTemplateConfig'
|
40
|
-
}
|
41
|
-
|
42
|
-
attribute_map = {
|
43
|
-
'cpu_optimized': 'cpu_optimized',
|
44
|
-
'gpu_optimized': 'gpu_optimized',
|
45
|
-
'memory_optimized': 'memory_optimized',
|
46
|
-
'default': 'default'
|
47
|
-
}
|
48
|
-
|
49
|
-
def __init__(self, cpu_optimized=None, gpu_optimized=None, memory_optimized=None, default=None, local_vars_configuration=None): # noqa: E501
|
50
|
-
"""TemplatizedComputeConfigs - 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._cpu_optimized = None
|
56
|
-
self._gpu_optimized = None
|
57
|
-
self._memory_optimized = None
|
58
|
-
self._default = None
|
59
|
-
self.discriminator = None
|
60
|
-
|
61
|
-
self.cpu_optimized = cpu_optimized
|
62
|
-
self.gpu_optimized = gpu_optimized
|
63
|
-
self.memory_optimized = memory_optimized
|
64
|
-
self.default = default
|
65
|
-
|
66
|
-
@property
|
67
|
-
def cpu_optimized(self):
|
68
|
-
"""Gets the cpu_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
69
|
-
|
70
|
-
|
71
|
-
:return: The cpu_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
72
|
-
:rtype: ComputeTemplateConfig
|
73
|
-
"""
|
74
|
-
return self._cpu_optimized
|
75
|
-
|
76
|
-
@cpu_optimized.setter
|
77
|
-
def cpu_optimized(self, cpu_optimized):
|
78
|
-
"""Sets the cpu_optimized of this TemplatizedComputeConfigs.
|
79
|
-
|
80
|
-
|
81
|
-
:param cpu_optimized: The cpu_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
82
|
-
:type: ComputeTemplateConfig
|
83
|
-
"""
|
84
|
-
if self.local_vars_configuration.client_side_validation and cpu_optimized is None: # noqa: E501
|
85
|
-
raise ValueError("Invalid value for `cpu_optimized`, must not be `None`") # noqa: E501
|
86
|
-
|
87
|
-
self._cpu_optimized = cpu_optimized
|
88
|
-
|
89
|
-
@property
|
90
|
-
def gpu_optimized(self):
|
91
|
-
"""Gets the gpu_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
92
|
-
|
93
|
-
|
94
|
-
:return: The gpu_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
95
|
-
:rtype: ComputeTemplateConfig
|
96
|
-
"""
|
97
|
-
return self._gpu_optimized
|
98
|
-
|
99
|
-
@gpu_optimized.setter
|
100
|
-
def gpu_optimized(self, gpu_optimized):
|
101
|
-
"""Sets the gpu_optimized of this TemplatizedComputeConfigs.
|
102
|
-
|
103
|
-
|
104
|
-
:param gpu_optimized: The gpu_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
105
|
-
:type: ComputeTemplateConfig
|
106
|
-
"""
|
107
|
-
if self.local_vars_configuration.client_side_validation and gpu_optimized is None: # noqa: E501
|
108
|
-
raise ValueError("Invalid value for `gpu_optimized`, must not be `None`") # noqa: E501
|
109
|
-
|
110
|
-
self._gpu_optimized = gpu_optimized
|
111
|
-
|
112
|
-
@property
|
113
|
-
def memory_optimized(self):
|
114
|
-
"""Gets the memory_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
115
|
-
|
116
|
-
|
117
|
-
:return: The memory_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
118
|
-
:rtype: ComputeTemplateConfig
|
119
|
-
"""
|
120
|
-
return self._memory_optimized
|
121
|
-
|
122
|
-
@memory_optimized.setter
|
123
|
-
def memory_optimized(self, memory_optimized):
|
124
|
-
"""Sets the memory_optimized of this TemplatizedComputeConfigs.
|
125
|
-
|
126
|
-
|
127
|
-
:param memory_optimized: The memory_optimized of this TemplatizedComputeConfigs. # noqa: E501
|
128
|
-
:type: ComputeTemplateConfig
|
129
|
-
"""
|
130
|
-
if self.local_vars_configuration.client_side_validation and memory_optimized is None: # noqa: E501
|
131
|
-
raise ValueError("Invalid value for `memory_optimized`, must not be `None`") # noqa: E501
|
132
|
-
|
133
|
-
self._memory_optimized = memory_optimized
|
134
|
-
|
135
|
-
@property
|
136
|
-
def default(self):
|
137
|
-
"""Gets the default of this TemplatizedComputeConfigs. # noqa: E501
|
138
|
-
|
139
|
-
|
140
|
-
:return: The default of this TemplatizedComputeConfigs. # noqa: E501
|
141
|
-
:rtype: ComputeTemplateConfig
|
142
|
-
"""
|
143
|
-
return self._default
|
144
|
-
|
145
|
-
@default.setter
|
146
|
-
def default(self, default):
|
147
|
-
"""Sets the default of this TemplatizedComputeConfigs.
|
148
|
-
|
149
|
-
|
150
|
-
:param default: The default of this TemplatizedComputeConfigs. # noqa: E501
|
151
|
-
:type: ComputeTemplateConfig
|
152
|
-
"""
|
153
|
-
if self.local_vars_configuration.client_side_validation and default is None: # noqa: E501
|
154
|
-
raise ValueError("Invalid value for `default`, must not be `None`") # noqa: E501
|
155
|
-
|
156
|
-
self._default = default
|
157
|
-
|
158
|
-
def to_dict(self):
|
159
|
-
"""Returns the model properties as a dict"""
|
160
|
-
result = {}
|
161
|
-
|
162
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
163
|
-
value = getattr(self, attr)
|
164
|
-
if isinstance(value, list):
|
165
|
-
result[attr] = list(map(
|
166
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
167
|
-
value
|
168
|
-
))
|
169
|
-
elif hasattr(value, "to_dict"):
|
170
|
-
result[attr] = value.to_dict()
|
171
|
-
elif isinstance(value, dict):
|
172
|
-
result[attr] = dict(map(
|
173
|
-
lambda item: (item[0], item[1].to_dict())
|
174
|
-
if hasattr(item[1], "to_dict") else item,
|
175
|
-
value.items()
|
176
|
-
))
|
177
|
-
else:
|
178
|
-
result[attr] = value
|
179
|
-
|
180
|
-
return result
|
181
|
-
|
182
|
-
def to_str(self):
|
183
|
-
"""Returns the string representation of the model"""
|
184
|
-
return pprint.pformat(self.to_dict())
|
185
|
-
|
186
|
-
def __repr__(self):
|
187
|
-
"""For `print` and `pprint`"""
|
188
|
-
return self.to_str()
|
189
|
-
|
190
|
-
def __eq__(self, other):
|
191
|
-
"""Returns true if both objects are equal"""
|
192
|
-
if not isinstance(other, TemplatizedComputeConfigs):
|
193
|
-
return False
|
194
|
-
|
195
|
-
return self.to_dict() == other.to_dict()
|
196
|
-
|
197
|
-
def __ne__(self, other):
|
198
|
-
"""Returns true if both objects are not equal"""
|
199
|
-
if not isinstance(other, TemplatizedComputeConfigs):
|
200
|
-
return True
|
201
|
-
|
202
|
-
return self.to_dict() != other.to_dict()
|