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.
Files changed (88) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +1 -1
  2. anyscale/_private/docgen/__main__.py +0 -8
  3. anyscale/_private/docgen/models.md +39 -182
  4. anyscale/_private/workload/workload_config.py +1 -1
  5. anyscale/client/README.md +2 -35
  6. anyscale/client/openapi_client/__init__.py +2 -21
  7. anyscale/client/openapi_client/api/default_api.py +275 -1868
  8. anyscale/client/openapi_client/models/__init__.py +2 -21
  9. anyscale/client/openapi_client/models/cloud_data_bucket_file_type.py +2 -1
  10. anyscale/client/openapi_client/models/cloud_deployment.py +2 -2
  11. anyscale/client/openapi_client/models/cloud_deployment_compute_config.py +291 -0
  12. anyscale/client/openapi_client/models/cloud_deployment_selector.py +206 -0
  13. anyscale/client/openapi_client/models/cloud_providers.py +2 -1
  14. anyscale/client/openapi_client/models/compute_template_config.py +61 -34
  15. anyscale/client/openapi_client/models/create_cluster_compute_config.py +59 -31
  16. anyscale/client/openapi_client/models/create_compute_template_config.py +61 -34
  17. anyscale/client/openapi_client/models/create_workspace_from_template.py +3 -2
  18. anyscale/client/openapi_client/models/decorated_compute_template_config.py +61 -34
  19. anyscale/client/openapi_client/models/decorated_session.py +31 -3
  20. anyscale/client/openapi_client/models/workspace_dataplane_proxied_artifacts.py +31 -3
  21. anyscale/cluster_compute.py +4 -4
  22. anyscale/commands/anyscale_api/sessions_commands.py +1 -70
  23. anyscale/commands/cloud_commands.py +5 -4
  24. anyscale/commands/image_commands.py +2 -2
  25. anyscale/commands/job_commands.py +1 -1
  26. anyscale/commands/service_commands.py +1 -1
  27. anyscale/commands/workspace_commands_v2.py +1 -1
  28. anyscale/connect_utils/prepare_cluster.py +1 -3
  29. anyscale/controllers/cloud_controller.py +12 -6
  30. anyscale/controllers/cloud_functional_verification_controller.py +2 -2
  31. anyscale/image/commands.py +1 -1
  32. anyscale/sdk/anyscale_client/__init__.py +2 -15
  33. anyscale/sdk/anyscale_client/api/default_api.py +1270 -2871
  34. anyscale/sdk/anyscale_client/models/__init__.py +2 -15
  35. anyscale/sdk/anyscale_client/models/cloud_deployment_compute_config.py +291 -0
  36. anyscale/sdk/anyscale_client/models/cloud_deployment_selector.py +206 -0
  37. anyscale/sdk/anyscale_client/models/cloud_providers.py +2 -1
  38. anyscale/sdk/anyscale_client/models/cluster_compute_config.py +61 -34
  39. anyscale/sdk/anyscale_client/models/cluster_services_urls.py +29 -1
  40. anyscale/sdk/anyscale_client/models/compute_template_config.py +61 -34
  41. anyscale/sdk/anyscale_client/models/create_cluster_compute_config.py +59 -31
  42. anyscale/sdk/anyscale_client/models/session.py +31 -3
  43. anyscale/shared_anyscale_utils/utils/id_gen.py +3 -1
  44. anyscale/version.py +1 -1
  45. anyscale/workspace/models.py +1 -1
  46. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/METADATA +1 -1
  47. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/RECORD +52 -84
  48. anyscale/client/openapi_client/models/bank_account_information.py +0 -239
  49. anyscale/client/openapi_client/models/billing_information.py +0 -181
  50. anyscale/client/openapi_client/models/credit_card_information.py +0 -268
  51. anyscale/client/openapi_client/models/decoratedunifiedjob_response.py +0 -121
  52. anyscale/client/openapi_client/models/invoice.py +0 -413
  53. anyscale/client/openapi_client/models/invoice_list_response.py +0 -147
  54. anyscale/client/openapi_client/models/invoice_status.py +0 -102
  55. anyscale/client/openapi_client/models/invoices_query.py +0 -150
  56. anyscale/client/openapi_client/models/log_stream.py +0 -151
  57. anyscale/client/openapi_client/models/logstream_response.py +0 -121
  58. anyscale/client/openapi_client/models/miniproject_list_response.py +0 -147
  59. anyscale/client/openapi_client/models/organization_project_collaborator.py +0 -175
  60. anyscale/client/openapi_client/models/organization_project_collaborator_value.py +0 -148
  61. anyscale/client/openapi_client/models/organizationprojectcollaborator_list_response.py +0 -147
  62. anyscale/client/openapi_client/models/product_type.py +0 -100
  63. anyscale/client/openapi_client/models/service_usage.py +0 -353
  64. anyscale/client/openapi_client/models/templatized_compute_configs.py +0 -202
  65. anyscale/client/openapi_client/models/templatized_decorated_application_templates.py +0 -202
  66. anyscale/client/openapi_client/models/templatizedcomputeconfigs_response.py +0 -121
  67. anyscale/client/openapi_client/models/templatizeddecoratedapplicationtemplates_response.py +0 -121
  68. anyscale/client/openapi_client/models/write_session.py +0 -147
  69. anyscale/sdk/anyscale_client/models/build_list_response.py +0 -147
  70. anyscale/sdk/anyscale_client/models/build_log_response.py +0 -123
  71. anyscale/sdk/anyscale_client/models/buildlogresponse_response.py +0 -121
  72. anyscale/sdk/anyscale_client/models/compute_template_query.py +0 -316
  73. anyscale/sdk/anyscale_client/models/computetemplate_list_response.py +0 -147
  74. anyscale/sdk/anyscale_client/models/create_build.py +0 -263
  75. anyscale/sdk/anyscale_client/models/create_compute_template.py +0 -229
  76. anyscale/sdk/anyscale_client/models/create_compute_template_config.py +0 -464
  77. anyscale/sdk/anyscale_client/models/session_list_response.py +0 -147
  78. anyscale/sdk/anyscale_client/models/sessions_query.py +0 -206
  79. anyscale/sdk/anyscale_client/models/start_session_options.py +0 -206
  80. anyscale/sdk/anyscale_client/models/terminate_session_options.py +0 -206
  81. anyscale/sdk/anyscale_client/models/update_compute_template.py +0 -146
  82. anyscale/sdk/anyscale_client/models/update_compute_template_config.py +0 -464
  83. anyscale/sdk/anyscale_client/models/update_session.py +0 -150
  84. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/LICENSE +0 -0
  85. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/NOTICE +0 -0
  86. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/WHEEL +0 -0
  87. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/entry_points.txt +0 -0
  88. {anyscale-0.26.23.dist-info → anyscale-0.26.24.dist-info}/top_level.txt +0 -0
@@ -1,464 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Anyscale 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 anyscale_client.configuration import Configuration
19
-
20
-
21
- class CreateComputeTemplateConfig(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
- 'cloud_id': 'str',
37
- 'max_workers': 'int',
38
- 'region': 'str',
39
- 'allowed_azs': 'list[str]',
40
- 'head_node_type': 'ComputeNodeType',
41
- 'worker_node_types': 'list[WorkerNodeType]',
42
- 'aws_advanced_configurations_json': 'object',
43
- 'gcp_advanced_configurations_json': 'object',
44
- 'advanced_configurations_json': 'object',
45
- 'maximum_uptime_minutes': 'int',
46
- 'auto_select_worker_config': 'bool',
47
- 'flags': 'object',
48
- 'idle_termination_minutes': 'int'
49
- }
50
-
51
- attribute_map = {
52
- 'cloud_id': 'cloud_id',
53
- 'max_workers': 'max_workers',
54
- 'region': 'region',
55
- 'allowed_azs': 'allowed_azs',
56
- 'head_node_type': 'head_node_type',
57
- 'worker_node_types': 'worker_node_types',
58
- 'aws_advanced_configurations_json': 'aws_advanced_configurations_json',
59
- 'gcp_advanced_configurations_json': 'gcp_advanced_configurations_json',
60
- 'advanced_configurations_json': 'advanced_configurations_json',
61
- 'maximum_uptime_minutes': 'maximum_uptime_minutes',
62
- 'auto_select_worker_config': 'auto_select_worker_config',
63
- 'flags': 'flags',
64
- 'idle_termination_minutes': 'idle_termination_minutes'
65
- }
66
-
67
- def __init__(self, cloud_id=None, max_workers=None, region=None, allowed_azs=None, head_node_type=None, worker_node_types=None, aws_advanced_configurations_json=None, gcp_advanced_configurations_json=None, advanced_configurations_json=None, maximum_uptime_minutes=None, auto_select_worker_config=False, flags=None, idle_termination_minutes=120, local_vars_configuration=None): # noqa: E501
68
- """CreateComputeTemplateConfig - a model defined in OpenAPI""" # noqa: E501
69
- if local_vars_configuration is None:
70
- local_vars_configuration = Configuration()
71
- self.local_vars_configuration = local_vars_configuration
72
-
73
- self._cloud_id = None
74
- self._max_workers = None
75
- self._region = None
76
- self._allowed_azs = None
77
- self._head_node_type = None
78
- self._worker_node_types = None
79
- self._aws_advanced_configurations_json = None
80
- self._gcp_advanced_configurations_json = None
81
- self._advanced_configurations_json = None
82
- self._maximum_uptime_minutes = None
83
- self._auto_select_worker_config = None
84
- self._flags = None
85
- self._idle_termination_minutes = None
86
- self.discriminator = None
87
-
88
- self.cloud_id = cloud_id
89
- if max_workers is not None:
90
- self.max_workers = max_workers
91
- self.region = region
92
- if allowed_azs is not None:
93
- self.allowed_azs = allowed_azs
94
- self.head_node_type = head_node_type
95
- if worker_node_types is not None:
96
- self.worker_node_types = worker_node_types
97
- if aws_advanced_configurations_json is not None:
98
- self.aws_advanced_configurations_json = aws_advanced_configurations_json
99
- if gcp_advanced_configurations_json is not None:
100
- self.gcp_advanced_configurations_json = gcp_advanced_configurations_json
101
- if advanced_configurations_json is not None:
102
- self.advanced_configurations_json = advanced_configurations_json
103
- if maximum_uptime_minutes is not None:
104
- self.maximum_uptime_minutes = maximum_uptime_minutes
105
- if auto_select_worker_config is not None:
106
- self.auto_select_worker_config = auto_select_worker_config
107
- if flags is not None:
108
- self.flags = flags
109
- if idle_termination_minutes is not None:
110
- self.idle_termination_minutes = idle_termination_minutes
111
-
112
- @property
113
- def cloud_id(self):
114
- """Gets the cloud_id of this CreateComputeTemplateConfig. # noqa: E501
115
-
116
- The ID of the Anyscale cloud to use for launching sessions. # noqa: E501
117
-
118
- :return: The cloud_id of this CreateComputeTemplateConfig. # noqa: E501
119
- :rtype: str
120
- """
121
- return self._cloud_id
122
-
123
- @cloud_id.setter
124
- def cloud_id(self, cloud_id):
125
- """Sets the cloud_id of this CreateComputeTemplateConfig.
126
-
127
- The ID of the Anyscale cloud to use for launching sessions. # noqa: E501
128
-
129
- :param cloud_id: The cloud_id of this CreateComputeTemplateConfig. # noqa: E501
130
- :type: str
131
- """
132
- if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
133
- raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
134
-
135
- self._cloud_id = cloud_id
136
-
137
- @property
138
- def max_workers(self):
139
- """Gets the max_workers of this CreateComputeTemplateConfig. # noqa: E501
140
-
141
- Desired limit on total running workers for this session. # noqa: E501
142
-
143
- :return: The max_workers of this CreateComputeTemplateConfig. # noqa: E501
144
- :rtype: int
145
- """
146
- return self._max_workers
147
-
148
- @max_workers.setter
149
- def max_workers(self, max_workers):
150
- """Sets the max_workers of this CreateComputeTemplateConfig.
151
-
152
- Desired limit on total running workers for this session. # noqa: E501
153
-
154
- :param max_workers: The max_workers of this CreateComputeTemplateConfig. # noqa: E501
155
- :type: int
156
- """
157
-
158
- self._max_workers = max_workers
159
-
160
- @property
161
- def region(self):
162
- """Gets the region of this CreateComputeTemplateConfig. # noqa: E501
163
-
164
- The region to launch sessions in, e.g. \"us-west-2\". # noqa: E501
165
-
166
- :return: The region of this CreateComputeTemplateConfig. # noqa: E501
167
- :rtype: str
168
- """
169
- return self._region
170
-
171
- @region.setter
172
- def region(self, region):
173
- """Sets the region of this CreateComputeTemplateConfig.
174
-
175
- The region to launch sessions in, e.g. \"us-west-2\". # noqa: E501
176
-
177
- :param region: The region of this CreateComputeTemplateConfig. # noqa: E501
178
- :type: str
179
- """
180
- if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501
181
- raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501
182
-
183
- self._region = region
184
-
185
- @property
186
- def allowed_azs(self):
187
- """Gets the allowed_azs of this CreateComputeTemplateConfig. # noqa: E501
188
-
189
- The availability zones that sessions are allowed to be launched in, e.g. \"us-west-2a\". If not specified or \"any\" is provided as the option, any AZ may be used. If \"any\" is provided, it must be the only item in the list. # noqa: E501
190
-
191
- :return: The allowed_azs of this CreateComputeTemplateConfig. # noqa: E501
192
- :rtype: list[str]
193
- """
194
- return self._allowed_azs
195
-
196
- @allowed_azs.setter
197
- def allowed_azs(self, allowed_azs):
198
- """Sets the allowed_azs of this CreateComputeTemplateConfig.
199
-
200
- The availability zones that sessions are allowed to be launched in, e.g. \"us-west-2a\". If not specified or \"any\" is provided as the option, any AZ may be used. If \"any\" is provided, it must be the only item in the list. # noqa: E501
201
-
202
- :param allowed_azs: The allowed_azs of this CreateComputeTemplateConfig. # noqa: E501
203
- :type: list[str]
204
- """
205
-
206
- self._allowed_azs = allowed_azs
207
-
208
- @property
209
- def head_node_type(self):
210
- """Gets the head_node_type of this CreateComputeTemplateConfig. # noqa: E501
211
-
212
- Node configuration to use for the head node. # noqa: E501
213
-
214
- :return: The head_node_type of this CreateComputeTemplateConfig. # noqa: E501
215
- :rtype: ComputeNodeType
216
- """
217
- return self._head_node_type
218
-
219
- @head_node_type.setter
220
- def head_node_type(self, head_node_type):
221
- """Sets the head_node_type of this CreateComputeTemplateConfig.
222
-
223
- Node configuration to use for the head node. # noqa: E501
224
-
225
- :param head_node_type: The head_node_type of this CreateComputeTemplateConfig. # noqa: E501
226
- :type: ComputeNodeType
227
- """
228
- if self.local_vars_configuration.client_side_validation and head_node_type is None: # noqa: E501
229
- raise ValueError("Invalid value for `head_node_type`, must not be `None`") # noqa: E501
230
-
231
- self._head_node_type = head_node_type
232
-
233
- @property
234
- def worker_node_types(self):
235
- """Gets the worker_node_types of this CreateComputeTemplateConfig. # noqa: E501
236
-
237
- A list of node types to use for worker nodes. # noqa: E501
238
-
239
- :return: The worker_node_types of this CreateComputeTemplateConfig. # noqa: E501
240
- :rtype: list[WorkerNodeType]
241
- """
242
- return self._worker_node_types
243
-
244
- @worker_node_types.setter
245
- def worker_node_types(self, worker_node_types):
246
- """Sets the worker_node_types of this CreateComputeTemplateConfig.
247
-
248
- A list of node types to use for worker nodes. # noqa: E501
249
-
250
- :param worker_node_types: The worker_node_types of this CreateComputeTemplateConfig. # noqa: E501
251
- :type: list[WorkerNodeType]
252
- """
253
-
254
- self._worker_node_types = worker_node_types
255
-
256
- @property
257
- def aws_advanced_configurations_json(self):
258
- """Gets the aws_advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
259
-
260
- The advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support. # noqa: E501
261
-
262
- :return: The aws_advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
263
- :rtype: object
264
- """
265
- return self._aws_advanced_configurations_json
266
-
267
- @aws_advanced_configurations_json.setter
268
- def aws_advanced_configurations_json(self, aws_advanced_configurations_json):
269
- """Sets the aws_advanced_configurations_json of this CreateComputeTemplateConfig.
270
-
271
- The advanced configuration json that we pass directly AWS APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support. # noqa: E501
272
-
273
- :param aws_advanced_configurations_json: The aws_advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
274
- :type: object
275
- """
276
-
277
- self._aws_advanced_configurations_json = aws_advanced_configurations_json
278
-
279
- @property
280
- def gcp_advanced_configurations_json(self):
281
- """Gets the gcp_advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
282
-
283
- The advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support. # noqa: E501
284
-
285
- :return: The gcp_advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
286
- :rtype: object
287
- """
288
- return self._gcp_advanced_configurations_json
289
-
290
- @gcp_advanced_configurations_json.setter
291
- def gcp_advanced_configurations_json(self, gcp_advanced_configurations_json):
292
- """Sets the gcp_advanced_configurations_json of this CreateComputeTemplateConfig.
293
-
294
- The advanced configuration json that we pass directly GCP APIs when launching an instance. We may do some validation on this json and reject the json if it is using a configuration that Anyscale does not support. # noqa: E501
295
-
296
- :param gcp_advanced_configurations_json: The gcp_advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
297
- :type: object
298
- """
299
-
300
- self._gcp_advanced_configurations_json = gcp_advanced_configurations_json
301
-
302
- @property
303
- def advanced_configurations_json(self):
304
- """Gets the advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
305
-
306
- Advanced configurations for this compute node type to pass to the cloud provider when launching this instance. # noqa: E501
307
-
308
- :return: The advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
309
- :rtype: object
310
- """
311
- return self._advanced_configurations_json
312
-
313
- @advanced_configurations_json.setter
314
- def advanced_configurations_json(self, advanced_configurations_json):
315
- """Sets the advanced_configurations_json of this CreateComputeTemplateConfig.
316
-
317
- Advanced configurations for this compute node type to pass to the cloud provider when launching this instance. # noqa: E501
318
-
319
- :param advanced_configurations_json: The advanced_configurations_json of this CreateComputeTemplateConfig. # noqa: E501
320
- :type: object
321
- """
322
-
323
- self._advanced_configurations_json = advanced_configurations_json
324
-
325
- @property
326
- def maximum_uptime_minutes(self):
327
- """Gets the maximum_uptime_minutes of this CreateComputeTemplateConfig. # noqa: E501
328
-
329
- If set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start. # noqa: E501
330
-
331
- :return: The maximum_uptime_minutes of this CreateComputeTemplateConfig. # noqa: E501
332
- :rtype: int
333
- """
334
- return self._maximum_uptime_minutes
335
-
336
- @maximum_uptime_minutes.setter
337
- def maximum_uptime_minutes(self, maximum_uptime_minutes):
338
- """Sets the maximum_uptime_minutes of this CreateComputeTemplateConfig.
339
-
340
- If set to a positive number, Anyscale will terminate the cluster this many minutes after cluster start. # noqa: E501
341
-
342
- :param maximum_uptime_minutes: The maximum_uptime_minutes of this CreateComputeTemplateConfig. # noqa: E501
343
- :type: int
344
- """
345
-
346
- self._maximum_uptime_minutes = maximum_uptime_minutes
347
-
348
- @property
349
- def auto_select_worker_config(self):
350
- """Gets the auto_select_worker_config of this CreateComputeTemplateConfig. # noqa: E501
351
-
352
- If set to true, worker node groups will automatically be selected based on workload. # noqa: E501
353
-
354
- :return: The auto_select_worker_config of this CreateComputeTemplateConfig. # noqa: E501
355
- :rtype: bool
356
- """
357
- return self._auto_select_worker_config
358
-
359
- @auto_select_worker_config.setter
360
- def auto_select_worker_config(self, auto_select_worker_config):
361
- """Sets the auto_select_worker_config of this CreateComputeTemplateConfig.
362
-
363
- If set to true, worker node groups will automatically be selected based on workload. # noqa: E501
364
-
365
- :param auto_select_worker_config: The auto_select_worker_config of this CreateComputeTemplateConfig. # noqa: E501
366
- :type: bool
367
- """
368
-
369
- self._auto_select_worker_config = auto_select_worker_config
370
-
371
- @property
372
- def flags(self):
373
- """Gets the flags of this CreateComputeTemplateConfig. # noqa: E501
374
-
375
- A set of advanced cluster-level flags that can be used to configure a particular workload. # noqa: E501
376
-
377
- :return: The flags of this CreateComputeTemplateConfig. # noqa: E501
378
- :rtype: object
379
- """
380
- return self._flags
381
-
382
- @flags.setter
383
- def flags(self, flags):
384
- """Sets the flags of this CreateComputeTemplateConfig.
385
-
386
- A set of advanced cluster-level flags that can be used to configure a particular workload. # noqa: E501
387
-
388
- :param flags: The flags of this CreateComputeTemplateConfig. # noqa: E501
389
- :type: object
390
- """
391
-
392
- self._flags = flags
393
-
394
- @property
395
- def idle_termination_minutes(self):
396
- """Gets the idle_termination_minutes of this CreateComputeTemplateConfig. # noqa: E501
397
-
398
- If set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0. # noqa: E501
399
-
400
- :return: The idle_termination_minutes of this CreateComputeTemplateConfig. # noqa: E501
401
- :rtype: int
402
- """
403
- return self._idle_termination_minutes
404
-
405
- @idle_termination_minutes.setter
406
- def idle_termination_minutes(self, idle_termination_minutes):
407
- """Sets the idle_termination_minutes of this CreateComputeTemplateConfig.
408
-
409
- If set to a positive number, Anyscale will terminate the cluster this many minutes after the cluster is idle. Idle time is defined as the time during which a Cluster is not running a user command or a Ray driver. Time spent running commands on Jupyter or ssh is still considered 'idle'. To disable, set this field to 0. # noqa: E501
410
-
411
- :param idle_termination_minutes: The idle_termination_minutes of this CreateComputeTemplateConfig. # noqa: E501
412
- :type: int
413
- """
414
- if (self.local_vars_configuration.client_side_validation and
415
- idle_termination_minutes is not None and idle_termination_minutes < 0): # noqa: E501
416
- raise ValueError("Invalid value for `idle_termination_minutes`, must be a value greater than or equal to `0`") # noqa: E501
417
-
418
- self._idle_termination_minutes = idle_termination_minutes
419
-
420
- def to_dict(self):
421
- """Returns the model properties as a dict"""
422
- result = {}
423
-
424
- for attr, _ in six.iteritems(self.openapi_types):
425
- value = getattr(self, attr)
426
- if isinstance(value, list):
427
- result[attr] = list(map(
428
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
429
- value
430
- ))
431
- elif hasattr(value, "to_dict"):
432
- result[attr] = value.to_dict()
433
- elif isinstance(value, dict):
434
- result[attr] = dict(map(
435
- lambda item: (item[0], item[1].to_dict())
436
- if hasattr(item[1], "to_dict") else item,
437
- value.items()
438
- ))
439
- else:
440
- result[attr] = value
441
-
442
- return result
443
-
444
- def to_str(self):
445
- """Returns the string representation of the model"""
446
- return pprint.pformat(self.to_dict())
447
-
448
- def __repr__(self):
449
- """For `print` and `pprint`"""
450
- return self.to_str()
451
-
452
- def __eq__(self, other):
453
- """Returns true if both objects are equal"""
454
- if not isinstance(other, CreateComputeTemplateConfig):
455
- return False
456
-
457
- return self.to_dict() == other.to_dict()
458
-
459
- def __ne__(self, other):
460
- """Returns true if both objects are not equal"""
461
- if not isinstance(other, CreateComputeTemplateConfig):
462
- return True
463
-
464
- return self.to_dict() != other.to_dict()
@@ -1,147 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Anyscale 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 anyscale_client.configuration import Configuration
19
-
20
-
21
- class SessionListResponse(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[Session]',
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
- """SessionListResponse - 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 SessionListResponse. # noqa: E501
62
-
63
-
64
- :return: The results of this SessionListResponse. # noqa: E501
65
- :rtype: list[Session]
66
- """
67
- return self._results
68
-
69
- @results.setter
70
- def results(self, results):
71
- """Sets the results of this SessionListResponse.
72
-
73
-
74
- :param results: The results of this SessionListResponse. # noqa: E501
75
- :type: list[Session]
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 SessionListResponse. # noqa: E501
85
-
86
-
87
- :return: The metadata of this SessionListResponse. # 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 SessionListResponse.
95
-
96
-
97
- :param metadata: The metadata of this SessionListResponse. # 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, SessionListResponse):
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, SessionListResponse):
145
- return True
146
-
147
- return self.to_dict() != other.to_dict()