anyscale 0.26.31__py3-none-any.whl → 0.26.33__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 (53) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +15 -0
  2. anyscale/_private/anyscale_client/common.py +12 -1
  3. anyscale/_private/anyscale_client/fake_anyscale_client.py +24 -0
  4. anyscale/_private/docgen/__main__.py +2 -0
  5. anyscale/_private/docgen/models.md +2 -2
  6. anyscale/api.py +22 -0
  7. anyscale/aws_iam_policies.py +0 -3
  8. anyscale/client/README.md +22 -1
  9. anyscale/client/openapi_client/__init__.py +17 -0
  10. anyscale/client/openapi_client/api/default_api.py +611 -157
  11. anyscale/client/openapi_client/models/__init__.py +17 -0
  12. anyscale/client/openapi_client/models/baseimagesenum.py +68 -1
  13. anyscale/client/openapi_client/models/cli_usage_payload.py +440 -0
  14. anyscale/client/openapi_client/models/cluster_operation.py +266 -0
  15. anyscale/client/openapi_client/models/cluster_operation_type.py +101 -0
  16. anyscale/client/openapi_client/models/clusteroperation_response.py +121 -0
  17. anyscale/client/openapi_client/models/commit_ledger_item_type.py +111 -0
  18. anyscale/client/openapi_client/models/commit_ledger_record_v2.py +207 -0
  19. anyscale/client/openapi_client/models/complexity_level.py +101 -0
  20. anyscale/client/openapi_client/models/credit_grant_record_v2.py +181 -0
  21. anyscale/client/openapi_client/models/credit_ledger_item_type.py +104 -0
  22. anyscale/client/openapi_client/models/credit_ledger_record_v2.py +207 -0
  23. anyscale/client/openapi_client/models/credit_record_commit_v2.py +410 -0
  24. anyscale/client/openapi_client/models/credit_record_credit_v2.py +410 -0
  25. anyscale/client/openapi_client/models/credit_type.py +100 -0
  26. anyscale/client/openapi_client/models/credits_v2.py +355 -0
  27. anyscale/client/openapi_client/models/operation_error.py +123 -0
  28. anyscale/client/openapi_client/models/operation_progress.py +123 -0
  29. anyscale/client/openapi_client/models/operation_result.py +150 -0
  30. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +68 -1
  31. anyscale/client/openapi_client/models/workspace_template.py +115 -3
  32. anyscale/client/openapi_client/models/workspace_template_readme.py +59 -3
  33. anyscale/cloud/__init__.py +16 -0
  34. anyscale/cloud/_private/cloud_sdk.py +33 -0
  35. anyscale/cloud/commands.py +35 -0
  36. anyscale/commands/cloud_commands.py +35 -0
  37. anyscale/commands/command_examples.py +6 -0
  38. anyscale/commands/list_util.py +100 -38
  39. anyscale/integrations.py +0 -20
  40. anyscale/scripts.py +1 -0
  41. anyscale/sdk/anyscale_client/models/baseimagesenum.py +68 -1
  42. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +68 -1
  43. anyscale/shared_anyscale_utils/headers.py +4 -0
  44. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  45. anyscale/telemetry.py +424 -0
  46. anyscale/version.py +1 -1
  47. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/METADATA +1 -1
  48. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/RECORD +53 -35
  49. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/LICENSE +0 -0
  50. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/NOTICE +0 -0
  51. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/WHEEL +0 -0
  52. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/entry_points.txt +0 -0
  53. {anyscale-0.26.31.dist-info → anyscale-0.26.33.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,440 @@
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 CLIUsagePayload(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
+ 'trace_id': 'str',
37
+ 'cmd_path': 'str',
38
+ 'options': 'list[str]',
39
+ 'flags_used': 'list[str]',
40
+ 'duration_ms': 'float',
41
+ 'exit_code': 'int',
42
+ 'exception_type': 'str',
43
+ 'cli_version': 'str',
44
+ 'python_version': 'str',
45
+ 'timestamp': 'int',
46
+ 'session_id': 'str',
47
+ 'event_type': 'str',
48
+ 'page_number': 'int'
49
+ }
50
+
51
+ attribute_map = {
52
+ 'trace_id': 'trace_id',
53
+ 'cmd_path': 'cmd_path',
54
+ 'options': 'options',
55
+ 'flags_used': 'flags_used',
56
+ 'duration_ms': 'duration_ms',
57
+ 'exit_code': 'exit_code',
58
+ 'exception_type': 'exception_type',
59
+ 'cli_version': 'cli_version',
60
+ 'python_version': 'python_version',
61
+ 'timestamp': 'timestamp',
62
+ 'session_id': 'session_id',
63
+ 'event_type': 'event_type',
64
+ 'page_number': 'page_number'
65
+ }
66
+
67
+ def __init__(self, trace_id=None, cmd_path=None, options=None, flags_used=None, duration_ms=None, exit_code=None, exception_type=None, cli_version=None, python_version=None, timestamp=None, session_id=None, event_type='command', page_number=None, local_vars_configuration=None): # noqa: E501
68
+ """CLIUsagePayload - 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._trace_id = None
74
+ self._cmd_path = None
75
+ self._options = None
76
+ self._flags_used = None
77
+ self._duration_ms = None
78
+ self._exit_code = None
79
+ self._exception_type = None
80
+ self._cli_version = None
81
+ self._python_version = None
82
+ self._timestamp = None
83
+ self._session_id = None
84
+ self._event_type = None
85
+ self._page_number = None
86
+ self.discriminator = None
87
+
88
+ self.trace_id = trace_id
89
+ self.cmd_path = cmd_path
90
+ self.options = options
91
+ self.flags_used = flags_used
92
+ self.duration_ms = duration_ms
93
+ self.exit_code = exit_code
94
+ if exception_type is not None:
95
+ self.exception_type = exception_type
96
+ if cli_version is not None:
97
+ self.cli_version = cli_version
98
+ self.python_version = python_version
99
+ self.timestamp = timestamp
100
+ if session_id is not None:
101
+ self.session_id = session_id
102
+ if event_type is not None:
103
+ self.event_type = event_type
104
+ if page_number is not None:
105
+ self.page_number = page_number
106
+
107
+ @property
108
+ def trace_id(self):
109
+ """Gets the trace_id of this CLIUsagePayload. # noqa: E501
110
+
111
+
112
+ :return: The trace_id of this CLIUsagePayload. # noqa: E501
113
+ :rtype: str
114
+ """
115
+ return self._trace_id
116
+
117
+ @trace_id.setter
118
+ def trace_id(self, trace_id):
119
+ """Sets the trace_id of this CLIUsagePayload.
120
+
121
+
122
+ :param trace_id: The trace_id of this CLIUsagePayload. # noqa: E501
123
+ :type: str
124
+ """
125
+ if self.local_vars_configuration.client_side_validation and trace_id is None: # noqa: E501
126
+ raise ValueError("Invalid value for `trace_id`, must not be `None`") # noqa: E501
127
+
128
+ self._trace_id = trace_id
129
+
130
+ @property
131
+ def cmd_path(self):
132
+ """Gets the cmd_path of this CLIUsagePayload. # noqa: E501
133
+
134
+
135
+ :return: The cmd_path of this CLIUsagePayload. # noqa: E501
136
+ :rtype: str
137
+ """
138
+ return self._cmd_path
139
+
140
+ @cmd_path.setter
141
+ def cmd_path(self, cmd_path):
142
+ """Sets the cmd_path of this CLIUsagePayload.
143
+
144
+
145
+ :param cmd_path: The cmd_path of this CLIUsagePayload. # noqa: E501
146
+ :type: str
147
+ """
148
+ if self.local_vars_configuration.client_side_validation and cmd_path is None: # noqa: E501
149
+ raise ValueError("Invalid value for `cmd_path`, must not be `None`") # noqa: E501
150
+
151
+ self._cmd_path = cmd_path
152
+
153
+ @property
154
+ def options(self):
155
+ """Gets the options of this CLIUsagePayload. # noqa: E501
156
+
157
+
158
+ :return: The options of this CLIUsagePayload. # noqa: E501
159
+ :rtype: list[str]
160
+ """
161
+ return self._options
162
+
163
+ @options.setter
164
+ def options(self, options):
165
+ """Sets the options of this CLIUsagePayload.
166
+
167
+
168
+ :param options: The options of this CLIUsagePayload. # noqa: E501
169
+ :type: list[str]
170
+ """
171
+ if self.local_vars_configuration.client_side_validation and options is None: # noqa: E501
172
+ raise ValueError("Invalid value for `options`, must not be `None`") # noqa: E501
173
+
174
+ self._options = options
175
+
176
+ @property
177
+ def flags_used(self):
178
+ """Gets the flags_used of this CLIUsagePayload. # noqa: E501
179
+
180
+
181
+ :return: The flags_used of this CLIUsagePayload. # noqa: E501
182
+ :rtype: list[str]
183
+ """
184
+ return self._flags_used
185
+
186
+ @flags_used.setter
187
+ def flags_used(self, flags_used):
188
+ """Sets the flags_used of this CLIUsagePayload.
189
+
190
+
191
+ :param flags_used: The flags_used of this CLIUsagePayload. # noqa: E501
192
+ :type: list[str]
193
+ """
194
+ if self.local_vars_configuration.client_side_validation and flags_used is None: # noqa: E501
195
+ raise ValueError("Invalid value for `flags_used`, must not be `None`") # noqa: E501
196
+
197
+ self._flags_used = flags_used
198
+
199
+ @property
200
+ def duration_ms(self):
201
+ """Gets the duration_ms of this CLIUsagePayload. # noqa: E501
202
+
203
+
204
+ :return: The duration_ms of this CLIUsagePayload. # noqa: E501
205
+ :rtype: float
206
+ """
207
+ return self._duration_ms
208
+
209
+ @duration_ms.setter
210
+ def duration_ms(self, duration_ms):
211
+ """Sets the duration_ms of this CLIUsagePayload.
212
+
213
+
214
+ :param duration_ms: The duration_ms of this CLIUsagePayload. # noqa: E501
215
+ :type: float
216
+ """
217
+ if self.local_vars_configuration.client_side_validation and duration_ms is None: # noqa: E501
218
+ raise ValueError("Invalid value for `duration_ms`, must not be `None`") # noqa: E501
219
+
220
+ self._duration_ms = duration_ms
221
+
222
+ @property
223
+ def exit_code(self):
224
+ """Gets the exit_code of this CLIUsagePayload. # noqa: E501
225
+
226
+
227
+ :return: The exit_code of this CLIUsagePayload. # noqa: E501
228
+ :rtype: int
229
+ """
230
+ return self._exit_code
231
+
232
+ @exit_code.setter
233
+ def exit_code(self, exit_code):
234
+ """Sets the exit_code of this CLIUsagePayload.
235
+
236
+
237
+ :param exit_code: The exit_code of this CLIUsagePayload. # noqa: E501
238
+ :type: int
239
+ """
240
+ if self.local_vars_configuration.client_side_validation and exit_code is None: # noqa: E501
241
+ raise ValueError("Invalid value for `exit_code`, must not be `None`") # noqa: E501
242
+
243
+ self._exit_code = exit_code
244
+
245
+ @property
246
+ def exception_type(self):
247
+ """Gets the exception_type of this CLIUsagePayload. # noqa: E501
248
+
249
+
250
+ :return: The exception_type of this CLIUsagePayload. # noqa: E501
251
+ :rtype: str
252
+ """
253
+ return self._exception_type
254
+
255
+ @exception_type.setter
256
+ def exception_type(self, exception_type):
257
+ """Sets the exception_type of this CLIUsagePayload.
258
+
259
+
260
+ :param exception_type: The exception_type of this CLIUsagePayload. # noqa: E501
261
+ :type: str
262
+ """
263
+
264
+ self._exception_type = exception_type
265
+
266
+ @property
267
+ def cli_version(self):
268
+ """Gets the cli_version of this CLIUsagePayload. # noqa: E501
269
+
270
+
271
+ :return: The cli_version of this CLIUsagePayload. # noqa: E501
272
+ :rtype: str
273
+ """
274
+ return self._cli_version
275
+
276
+ @cli_version.setter
277
+ def cli_version(self, cli_version):
278
+ """Sets the cli_version of this CLIUsagePayload.
279
+
280
+
281
+ :param cli_version: The cli_version of this CLIUsagePayload. # noqa: E501
282
+ :type: str
283
+ """
284
+
285
+ self._cli_version = cli_version
286
+
287
+ @property
288
+ def python_version(self):
289
+ """Gets the python_version of this CLIUsagePayload. # noqa: E501
290
+
291
+
292
+ :return: The python_version of this CLIUsagePayload. # noqa: E501
293
+ :rtype: str
294
+ """
295
+ return self._python_version
296
+
297
+ @python_version.setter
298
+ def python_version(self, python_version):
299
+ """Sets the python_version of this CLIUsagePayload.
300
+
301
+
302
+ :param python_version: The python_version of this CLIUsagePayload. # noqa: E501
303
+ :type: str
304
+ """
305
+ if self.local_vars_configuration.client_side_validation and python_version is None: # noqa: E501
306
+ raise ValueError("Invalid value for `python_version`, must not be `None`") # noqa: E501
307
+
308
+ self._python_version = python_version
309
+
310
+ @property
311
+ def timestamp(self):
312
+ """Gets the timestamp of this CLIUsagePayload. # noqa: E501
313
+
314
+
315
+ :return: The timestamp of this CLIUsagePayload. # noqa: E501
316
+ :rtype: int
317
+ """
318
+ return self._timestamp
319
+
320
+ @timestamp.setter
321
+ def timestamp(self, timestamp):
322
+ """Sets the timestamp of this CLIUsagePayload.
323
+
324
+
325
+ :param timestamp: The timestamp of this CLIUsagePayload. # noqa: E501
326
+ :type: int
327
+ """
328
+ if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501
329
+ raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
330
+
331
+ self._timestamp = timestamp
332
+
333
+ @property
334
+ def session_id(self):
335
+ """Gets the session_id of this CLIUsagePayload. # noqa: E501
336
+
337
+
338
+ :return: The session_id of this CLIUsagePayload. # noqa: E501
339
+ :rtype: str
340
+ """
341
+ return self._session_id
342
+
343
+ @session_id.setter
344
+ def session_id(self, session_id):
345
+ """Sets the session_id of this CLIUsagePayload.
346
+
347
+
348
+ :param session_id: The session_id of this CLIUsagePayload. # noqa: E501
349
+ :type: str
350
+ """
351
+
352
+ self._session_id = session_id
353
+
354
+ @property
355
+ def event_type(self):
356
+ """Gets the event_type of this CLIUsagePayload. # noqa: E501
357
+
358
+
359
+ :return: The event_type of this CLIUsagePayload. # noqa: E501
360
+ :rtype: str
361
+ """
362
+ return self._event_type
363
+
364
+ @event_type.setter
365
+ def event_type(self, event_type):
366
+ """Sets the event_type of this CLIUsagePayload.
367
+
368
+
369
+ :param event_type: The event_type of this CLIUsagePayload. # noqa: E501
370
+ :type: str
371
+ """
372
+
373
+ self._event_type = event_type
374
+
375
+ @property
376
+ def page_number(self):
377
+ """Gets the page_number of this CLIUsagePayload. # noqa: E501
378
+
379
+
380
+ :return: The page_number of this CLIUsagePayload. # noqa: E501
381
+ :rtype: int
382
+ """
383
+ return self._page_number
384
+
385
+ @page_number.setter
386
+ def page_number(self, page_number):
387
+ """Sets the page_number of this CLIUsagePayload.
388
+
389
+
390
+ :param page_number: The page_number of this CLIUsagePayload. # noqa: E501
391
+ :type: int
392
+ """
393
+
394
+ self._page_number = page_number
395
+
396
+ def to_dict(self):
397
+ """Returns the model properties as a dict"""
398
+ result = {}
399
+
400
+ for attr, _ in six.iteritems(self.openapi_types):
401
+ value = getattr(self, attr)
402
+ if isinstance(value, list):
403
+ result[attr] = list(map(
404
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
405
+ value
406
+ ))
407
+ elif hasattr(value, "to_dict"):
408
+ result[attr] = value.to_dict()
409
+ elif isinstance(value, dict):
410
+ result[attr] = dict(map(
411
+ lambda item: (item[0], item[1].to_dict())
412
+ if hasattr(item[1], "to_dict") else item,
413
+ value.items()
414
+ ))
415
+ else:
416
+ result[attr] = value
417
+
418
+ return result
419
+
420
+ def to_str(self):
421
+ """Returns the string representation of the model"""
422
+ return pprint.pformat(self.to_dict())
423
+
424
+ def __repr__(self):
425
+ """For `print` and `pprint`"""
426
+ return self.to_str()
427
+
428
+ def __eq__(self, other):
429
+ """Returns true if both objects are equal"""
430
+ if not isinstance(other, CLIUsagePayload):
431
+ return False
432
+
433
+ return self.to_dict() == other.to_dict()
434
+
435
+ def __ne__(self, other):
436
+ """Returns true if both objects are not equal"""
437
+ if not isinstance(other, CLIUsagePayload):
438
+ return True
439
+
440
+ return self.to_dict() != other.to_dict()
@@ -0,0 +1,266 @@
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 ClusterOperation(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
+ 'id': 'str',
37
+ 'completed': 'bool',
38
+ 'progress': 'OperationProgress',
39
+ 'result': 'OperationResult',
40
+ 'cluster_id': 'str',
41
+ 'cluster_operation_type': 'ClusterOperationType'
42
+ }
43
+
44
+ attribute_map = {
45
+ 'id': 'id',
46
+ 'completed': 'completed',
47
+ 'progress': 'progress',
48
+ 'result': 'result',
49
+ 'cluster_id': 'cluster_id',
50
+ 'cluster_operation_type': 'cluster_operation_type'
51
+ }
52
+
53
+ def __init__(self, id=None, completed=None, progress=None, result=None, cluster_id=None, cluster_operation_type=None, local_vars_configuration=None): # noqa: E501
54
+ """ClusterOperation - 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._id = None
60
+ self._completed = None
61
+ self._progress = None
62
+ self._result = None
63
+ self._cluster_id = None
64
+ self._cluster_operation_type = None
65
+ self.discriminator = None
66
+
67
+ self.id = id
68
+ self.completed = completed
69
+ if progress is not None:
70
+ self.progress = progress
71
+ if result is not None:
72
+ self.result = result
73
+ self.cluster_id = cluster_id
74
+ self.cluster_operation_type = cluster_operation_type
75
+
76
+ @property
77
+ def id(self):
78
+ """Gets the id of this ClusterOperation. # noqa: E501
79
+
80
+ ID of this operation. # noqa: E501
81
+
82
+ :return: The id of this ClusterOperation. # noqa: E501
83
+ :rtype: str
84
+ """
85
+ return self._id
86
+
87
+ @id.setter
88
+ def id(self, id):
89
+ """Sets the id of this ClusterOperation.
90
+
91
+ ID of this operation. # noqa: E501
92
+
93
+ :param id: The id of this ClusterOperation. # noqa: E501
94
+ :type: str
95
+ """
96
+ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
97
+ raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
98
+
99
+ self._id = id
100
+
101
+ @property
102
+ def completed(self):
103
+ """Gets the completed of this ClusterOperation. # noqa: E501
104
+
105
+ Boolean indicating if this operation is completed. # noqa: E501
106
+
107
+ :return: The completed of this ClusterOperation. # noqa: E501
108
+ :rtype: bool
109
+ """
110
+ return self._completed
111
+
112
+ @completed.setter
113
+ def completed(self, completed):
114
+ """Sets the completed of this ClusterOperation.
115
+
116
+ Boolean indicating if this operation is completed. # noqa: E501
117
+
118
+ :param completed: The completed of this ClusterOperation. # noqa: E501
119
+ :type: bool
120
+ """
121
+ if self.local_vars_configuration.client_side_validation and completed is None: # noqa: E501
122
+ raise ValueError("Invalid value for `completed`, must not be `None`") # noqa: E501
123
+
124
+ self._completed = completed
125
+
126
+ @property
127
+ def progress(self):
128
+ """Gets the progress of this ClusterOperation. # noqa: E501
129
+
130
+ Details about the progress of this operation at the time of the request. This will be absent for completed operations. # noqa: E501
131
+
132
+ :return: The progress of this ClusterOperation. # noqa: E501
133
+ :rtype: OperationProgress
134
+ """
135
+ return self._progress
136
+
137
+ @progress.setter
138
+ def progress(self, progress):
139
+ """Sets the progress of this ClusterOperation.
140
+
141
+ Details about the progress of this operation at the time of the request. This will be absent for completed operations. # noqa: E501
142
+
143
+ :param progress: The progress of this ClusterOperation. # noqa: E501
144
+ :type: OperationProgress
145
+ """
146
+
147
+ self._progress = progress
148
+
149
+ @property
150
+ def result(self):
151
+ """Gets the result of this ClusterOperation. # noqa: E501
152
+
153
+ The result of this operation after it has completed. This is always provided when the operation is complete. # noqa: E501
154
+
155
+ :return: The result of this ClusterOperation. # noqa: E501
156
+ :rtype: OperationResult
157
+ """
158
+ return self._result
159
+
160
+ @result.setter
161
+ def result(self, result):
162
+ """Sets the result of this ClusterOperation.
163
+
164
+ The result of this operation after it has completed. This is always provided when the operation is complete. # noqa: E501
165
+
166
+ :param result: The result of this ClusterOperation. # noqa: E501
167
+ :type: OperationResult
168
+ """
169
+
170
+ self._result = result
171
+
172
+ @property
173
+ def cluster_id(self):
174
+ """Gets the cluster_id of this ClusterOperation. # noqa: E501
175
+
176
+ ID of the Cluster that is being updated. # noqa: E501
177
+
178
+ :return: The cluster_id of this ClusterOperation. # noqa: E501
179
+ :rtype: str
180
+ """
181
+ return self._cluster_id
182
+
183
+ @cluster_id.setter
184
+ def cluster_id(self, cluster_id):
185
+ """Sets the cluster_id of this ClusterOperation.
186
+
187
+ ID of the Cluster that is being updated. # noqa: E501
188
+
189
+ :param cluster_id: The cluster_id of this ClusterOperation. # noqa: E501
190
+ :type: str
191
+ """
192
+ if self.local_vars_configuration.client_side_validation and cluster_id is None: # noqa: E501
193
+ raise ValueError("Invalid value for `cluster_id`, must not be `None`") # noqa: E501
194
+
195
+ self._cluster_id = cluster_id
196
+
197
+ @property
198
+ def cluster_operation_type(self):
199
+ """Gets the cluster_operation_type of this ClusterOperation. # noqa: E501
200
+
201
+ The variety of operation being performed: start sets the Cluster's goal state to Running, terminate sets the Cluster's goal state to Terminated # noqa: E501
202
+
203
+ :return: The cluster_operation_type of this ClusterOperation. # noqa: E501
204
+ :rtype: ClusterOperationType
205
+ """
206
+ return self._cluster_operation_type
207
+
208
+ @cluster_operation_type.setter
209
+ def cluster_operation_type(self, cluster_operation_type):
210
+ """Sets the cluster_operation_type of this ClusterOperation.
211
+
212
+ The variety of operation being performed: start sets the Cluster's goal state to Running, terminate sets the Cluster's goal state to Terminated # noqa: E501
213
+
214
+ :param cluster_operation_type: The cluster_operation_type of this ClusterOperation. # noqa: E501
215
+ :type: ClusterOperationType
216
+ """
217
+ if self.local_vars_configuration.client_side_validation and cluster_operation_type is None: # noqa: E501
218
+ raise ValueError("Invalid value for `cluster_operation_type`, must not be `None`") # noqa: E501
219
+
220
+ self._cluster_operation_type = cluster_operation_type
221
+
222
+ def to_dict(self):
223
+ """Returns the model properties as a dict"""
224
+ result = {}
225
+
226
+ for attr, _ in six.iteritems(self.openapi_types):
227
+ value = getattr(self, attr)
228
+ if isinstance(value, list):
229
+ result[attr] = list(map(
230
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
231
+ value
232
+ ))
233
+ elif hasattr(value, "to_dict"):
234
+ result[attr] = value.to_dict()
235
+ elif isinstance(value, dict):
236
+ result[attr] = dict(map(
237
+ lambda item: (item[0], item[1].to_dict())
238
+ if hasattr(item[1], "to_dict") else item,
239
+ value.items()
240
+ ))
241
+ else:
242
+ result[attr] = value
243
+
244
+ return result
245
+
246
+ def to_str(self):
247
+ """Returns the string representation of the model"""
248
+ return pprint.pformat(self.to_dict())
249
+
250
+ def __repr__(self):
251
+ """For `print` and `pprint`"""
252
+ return self.to_str()
253
+
254
+ def __eq__(self, other):
255
+ """Returns true if both objects are equal"""
256
+ if not isinstance(other, ClusterOperation):
257
+ return False
258
+
259
+ return self.to_dict() == other.to_dict()
260
+
261
+ def __ne__(self, other):
262
+ """Returns true if both objects are not equal"""
263
+ if not isinstance(other, ClusterOperation):
264
+ return True
265
+
266
+ return self.to_dict() != other.to_dict()