anyscale 0.26.15__py3-none-any.whl → 0.26.17__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 (66) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +4 -2
  2. anyscale/_private/anyscale_client/common.py +6 -4
  3. anyscale/_private/anyscale_client/fake_anyscale_client.py +15 -6
  4. anyscale/_private/docgen/__main__.py +4 -4
  5. anyscale/_private/docgen/generator.py +2 -2
  6. anyscale/_private/sdk/__init__.py +2 -2
  7. anyscale/_private/workload/workload_sdk.py +6 -4
  8. anyscale/aggregated_instance_usage/commands.py +6 -2
  9. anyscale/anyscale-cloud-setup-gcp.yaml +2 -0
  10. anyscale/client/README.md +11 -6
  11. anyscale/client/openapi_client/__init__.py +8 -4
  12. anyscale/client/openapi_client/api/default_api.py +402 -270
  13. anyscale/client/openapi_client/models/__init__.py +8 -4
  14. anyscale/client/openapi_client/models/alert_type.py +11 -2
  15. anyscale/client/openapi_client/models/create_job_queue_requests.py +3 -32
  16. anyscale/client/openapi_client/models/i_know_response.py +174 -0
  17. anyscale/client/openapi_client/models/i_know_time_series_event.py +148 -0
  18. anyscale/client/openapi_client/models/job_report.py +199 -0
  19. anyscale/client/openapi_client/models/job_with_report.py +254 -0
  20. anyscale/client/openapi_client/models/jobwithreport_list_response.py +147 -0
  21. anyscale/client/openapi_client/models/{product_autoscaler_flag.py → list_ray_sessions_response.py} +22 -23
  22. anyscale/client/openapi_client/models/{productautoscalerflag_response.py → listraysessionsresponse_response.py} +11 -11
  23. anyscale/client/openapi_client/models/metric.py +133 -3
  24. anyscale/client/openapi_client/models/ray_session.py +121 -0
  25. anyscale/cloud/__init__.py +2 -2
  26. anyscale/cloud/_private/cloud_sdk.py +2 -2
  27. anyscale/cloud/commands.py +9 -6
  28. anyscale/cloud_utils.py +5 -4
  29. anyscale/cluster_compute.py +2 -2
  30. anyscale/cluster_env.py +2 -0
  31. anyscale/commands/cloud_commands.py +43 -0
  32. anyscale/commands/login_commands.py +24 -3
  33. anyscale/commands/schedule_commands.py +2 -1
  34. anyscale/compute_config/commands.py +15 -7
  35. anyscale/controllers/cloud_controller.py +151 -8
  36. anyscale/controllers/cluster_controller.py +1 -0
  37. anyscale/controllers/job_controller.py +1 -1
  38. anyscale/controllers/service_controller.py +1 -0
  39. anyscale/image/commands.py +6 -6
  40. anyscale/job/_private/job_sdk.py +22 -24
  41. anyscale/job/commands.py +12 -12
  42. anyscale/organization_invitation/commands.py +11 -7
  43. anyscale/project/__init__.py +2 -2
  44. anyscale/project/_private/project_sdk.py +2 -2
  45. anyscale/project/commands.py +3 -3
  46. anyscale/project_utils.py +1 -1
  47. anyscale/resource_quota/commands.py +18 -10
  48. anyscale/schedule/commands.py +12 -8
  49. anyscale/sdk/anyscale_client/sdk.py +1 -0
  50. anyscale/service/commands.py +17 -17
  51. anyscale/service_account/commands.py +12 -10
  52. anyscale/user/commands.py +5 -3
  53. anyscale/utils/gcp_utils.py +25 -9
  54. anyscale/version.py +1 -1
  55. anyscale/workspace/__init__.py +1 -1
  56. anyscale/workspace/_private/workspace_sdk.py +5 -3
  57. anyscale/workspace/commands.py +26 -24
  58. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/METADATA +1 -1
  59. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/RECORD +64 -60
  60. anyscale/client/openapi_client/models/aviary_model_config_v2.py +0 -358
  61. anyscale/client/openapi_client/models/finish_ft_job_request_v2.py +0 -183
  62. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/LICENSE +0 -0
  63. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/NOTICE +0 -0
  64. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/WHEEL +0 -0
  65. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/entry_points.txt +0 -0
  66. {anyscale-0.26.15.dist-info → anyscale-0.26.17.dist-info}/top_level.txt +0 -0
@@ -47,7 +47,6 @@ from openapi_client.models.archived_logs_info import ArchivedLogsInfo
47
47
  from openapi_client.models.archivedlogsinfo_response import ArchivedlogsinfoResponse
48
48
  from openapi_client.models.attach_machine_pool_to_cloud_request import AttachMachinePoolToCloudRequest
49
49
  from openapi_client.models.attachmachinepooltocloudresponse_response import AttachmachinepooltocloudresponseResponse
50
- from openapi_client.models.aviary_model_config_v2 import AviaryModelConfigV2
51
50
  from openapi_client.models.aws_region_and_zones import AwsRegionAndZones
52
51
  from openapi_client.models.aws_region_info import AwsRegionInfo
53
52
  from openapi_client.models.awsregionandzones_response import AwsregionandzonesResponse
@@ -282,7 +281,6 @@ from openapi_client.models.fine_tune_type import FineTuneType
282
281
  from openapi_client.models.fine_tuned_model import FineTunedModel
283
282
  from openapi_client.models.finetunedmodel_list_response import FinetunedmodelListResponse
284
283
  from openapi_client.models.finetunedmodel_response import FinetunedmodelResponse
285
- from openapi_client.models.finish_ft_job_request_v2 import FinishFTJobRequestV2
286
284
  from openapi_client.models.gcp_file_store_config import GCPFileStoreConfig
287
285
  from openapi_client.models.gcp_memorystore_instance_config import GCPMemorystoreInstanceConfig
288
286
  from openapi_client.models.grafana_dashboard import GrafanaDashboard
@@ -298,6 +296,8 @@ from openapi_client.models.ha_jobs_sort_field import HaJobsSortField
298
296
  from openapi_client.models.head_ip import HeadIp
299
297
  from openapi_client.models.headip_response import HeadipResponse
300
298
  from openapi_client.models.http_protocol_config import HttpProtocolConfig
299
+ from openapi_client.models.i_know_response import IKnowResponse
300
+ from openapi_client.models.i_know_time_series_event import IKnowTimeSeriesEvent
301
301
  from openapi_client.models.idle_termination_status import IdleTerminationStatus
302
302
  from openapi_client.models.instance_usage_budget import InstanceUsageBudget
303
303
  from openapi_client.models.instance_usage_budget_evaluation_period import InstanceUsageBudgetEvaluationPeriod
@@ -318,10 +318,13 @@ from openapi_client.models.job_queue_execution_mode import JobQueueExecutionMode
318
318
  from openapi_client.models.job_queue_spec import JobQueueSpec
319
319
  from openapi_client.models.job_queue_state import JobQueueState
320
320
  from openapi_client.models.job_queues_query import JobQueuesQuery
321
+ from openapi_client.models.job_report import JobReport
321
322
  from openapi_client.models.job_run_type import JobRunType
322
323
  from openapi_client.models.job_state_log_level_types import JobStateLogLevelTypes
324
+ from openapi_client.models.job_with_report import JobWithReport
323
325
  from openapi_client.models.jobqueue_response import JobqueueResponse
324
326
  from openapi_client.models.jobs_sort_field import JobsSortField
327
+ from openapi_client.models.jobwithreport_list_response import JobwithreportListResponse
325
328
  from openapi_client.models.json_patch_operation import JsonPatchOperation
326
329
  from openapi_client.models.kubernetes_manager_registration_request import KubernetesManagerRegistrationRequest
327
330
  from openapi_client.models.kubernetes_manager_registration_response import KubernetesManagerRegistrationResponse
@@ -330,11 +333,13 @@ from openapi_client.models.lb_resource import LBResource
330
333
  from openapi_client.models.lbresource_response import LbresourceResponse
331
334
  from openapi_client.models.list_machine_pools_response import ListMachinePoolsResponse
332
335
  from openapi_client.models.list_machines_response import ListMachinesResponse
336
+ from openapi_client.models.list_ray_sessions_response import ListRaySessionsResponse
333
337
  from openapi_client.models.list_resource_notifications_query import ListResourceNotificationsQuery
334
338
  from openapi_client.models.list_resource_quotas_query import ListResourceQuotasQuery
335
339
  from openapi_client.models.list_response_metadata import ListResponseMetadata
336
340
  from openapi_client.models.listmachinepoolsresponse_response import ListmachinepoolsresponseResponse
337
341
  from openapi_client.models.listmachinesresponse_response import ListmachinesresponseResponse
342
+ from openapi_client.models.listraysessionsresponse_response import ListraysessionsresponseResponse
338
343
  from openapi_client.models.log_download_config import LogDownloadConfig
339
344
  from openapi_client.models.log_download_request import LogDownloadRequest
340
345
  from openapi_client.models.log_download_result import LogDownloadResult
@@ -419,9 +424,7 @@ from openapi_client.models.organizationusagealert_list_response import Organizat
419
424
  from openapi_client.models.page_query import PageQuery
420
425
  from openapi_client.models.pause_schedule import PauseSchedule
421
426
  from openapi_client.models.permission_level import PermissionLevel
422
- from openapi_client.models.product_autoscaler_flag import ProductAutoscalerFlag
423
427
  from openapi_client.models.product_type import ProductType
424
- from openapi_client.models.productautoscalerflag_response import ProductautoscalerflagResponse
425
428
  from openapi_client.models.production_job import ProductionJob
426
429
  from openapi_client.models.production_job_config import ProductionJobConfig
427
430
  from openapi_client.models.production_job_event import ProductionJobEvent
@@ -445,6 +448,7 @@ from openapi_client.models.python_modules import PythonModules
445
448
  from openapi_client.models.quota import Quota
446
449
  from openapi_client.models.ray_gcs_external_storage_config import RayGCSExternalStorageConfig
447
450
  from openapi_client.models.ray_runtime_env_config import RayRuntimeEnvConfig
451
+ from openapi_client.models.ray_session import RaySession
448
452
  from openapi_client.models.read_billing_version import ReadBillingVersion
449
453
  from openapi_client.models.readbillingversion_list_response import ReadbillingversionListResponse
450
454
  from openapi_client.models.replica_details import ReplicaDetails
@@ -33,8 +33,17 @@ class AlertType(object):
33
33
  LOW_REMAINING_DAYS_IN_PLAN_REACHED = "low_remaining_days_in_plan_reached"
34
34
  LOW_REMAINING_CREDIT_PERCENTAGE_REACHED = "low_remaining_credit_percentage_reached"
35
35
  USAGE_THRESHOLD_REACHED = "usage_threshold_reached"
36
-
37
- allowable_values = [LOW_CREDIT_BALANCE_REACHED, SPEND_THRESHOLD_REACHED, LOW_REMAINING_DAYS_IN_PLAN_REACHED, LOW_REMAINING_CREDIT_PERCENTAGE_REACHED, USAGE_THRESHOLD_REACHED] # noqa: E501
36
+ LOW_REMAINING_COMMIT_BALANCE_REACHED = "low_remaining_commit_balance_reached"
37
+ LOW_REMAINING_COMMIT_PERCENTAGE_REACHED = "low_remaining_commit_percentage_reached"
38
+ LOW_REMAINING_DAYS_FOR_COMMIT_SEGMENT_REACHED = "low_remaining_days_for_commit_segment_reached"
39
+ LOW_REMAINING_CONTRACT_CREDIT_BALANCE_REACHED = "low_remaining_contract_credit_balance_reached"
40
+ LOW_REMAINING_CONTRACT_CREDIT_PERCENTAGE_REACHED = "low_remaining_contract_credit_percentage_reached"
41
+ LOW_REMAINING_DAYS_FOR_CONTRACT_CREDIT_SEGMENT_REACHED = "low_remaining_days_for_contract_credit_segment_reached"
42
+ LOW_REMAINING_CONTRACT_CREDIT_AND_COMMIT_BALANCE_REACHED = "low_remaining_contract_credit_and_commit_balance_reached"
43
+ MONTHLY_INVOICE_TOTAL_SPEND_THRESHOLD_REACHED = "monthly_invoice_total_spend_threshold_reached"
44
+ INVOICE_TOTAL_REACHED = "invoice_total_reached"
45
+
46
+ allowable_values = [LOW_CREDIT_BALANCE_REACHED, SPEND_THRESHOLD_REACHED, LOW_REMAINING_DAYS_IN_PLAN_REACHED, LOW_REMAINING_CREDIT_PERCENTAGE_REACHED, USAGE_THRESHOLD_REACHED, LOW_REMAINING_COMMIT_BALANCE_REACHED, LOW_REMAINING_COMMIT_PERCENTAGE_REACHED, LOW_REMAINING_DAYS_FOR_COMMIT_SEGMENT_REACHED, LOW_REMAINING_CONTRACT_CREDIT_BALANCE_REACHED, LOW_REMAINING_CONTRACT_CREDIT_PERCENTAGE_REACHED, LOW_REMAINING_DAYS_FOR_CONTRACT_CREDIT_SEGMENT_REACHED, LOW_REMAINING_CONTRACT_CREDIT_AND_COMMIT_BALANCE_REACHED, MONTHLY_INVOICE_TOTAL_SPEND_THRESHOLD_REACHED, INVOICE_TOTAL_REACHED] # noqa: E501
38
47
 
39
48
  """
40
49
  Attributes:
@@ -39,8 +39,7 @@ class CreateJobQueueRequests(object):
39
39
  'cluster_environment_build_id': 'str',
40
40
  'max_concurrency': 'int',
41
41
  'idle_timeout_sec': 'int',
42
- 'project_id': 'str',
43
- 'cloud_id': 'str'
42
+ 'project_id': 'str'
44
43
  }
45
44
 
46
45
  attribute_map = {
@@ -50,11 +49,10 @@ class CreateJobQueueRequests(object):
50
49
  'cluster_environment_build_id': 'cluster_environment_build_id',
51
50
  'max_concurrency': 'max_concurrency',
52
51
  'idle_timeout_sec': 'idle_timeout_sec',
53
- 'project_id': 'project_id',
54
- 'cloud_id': 'cloud_id'
52
+ 'project_id': 'project_id'
55
53
  }
56
54
 
57
- def __init__(self, job_queue_name=None, execution_mode=None, compute_config_id=None, cluster_environment_build_id=None, max_concurrency=1, idle_timeout_sec=None, project_id=None, cloud_id=None, local_vars_configuration=None): # noqa: E501
55
+ def __init__(self, job_queue_name=None, execution_mode=None, compute_config_id=None, cluster_environment_build_id=None, max_concurrency=1, idle_timeout_sec=None, project_id=None, local_vars_configuration=None): # noqa: E501
58
56
  """CreateJobQueueRequests - a model defined in OpenAPI""" # noqa: E501
59
57
  if local_vars_configuration is None:
60
58
  local_vars_configuration = Configuration()
@@ -67,7 +65,6 @@ class CreateJobQueueRequests(object):
67
65
  self._max_concurrency = None
68
66
  self._idle_timeout_sec = None
69
67
  self._project_id = None
70
- self._cloud_id = None
71
68
  self.discriminator = None
72
69
 
73
70
  if job_queue_name is not None:
@@ -80,7 +77,6 @@ class CreateJobQueueRequests(object):
80
77
  self.max_concurrency = max_concurrency
81
78
  self.idle_timeout_sec = idle_timeout_sec
82
79
  self.project_id = project_id
83
- self.cloud_id = cloud_id
84
80
 
85
81
  @property
86
82
  def job_queue_name(self):
@@ -251,31 +247,6 @@ class CreateJobQueueRequests(object):
251
247
 
252
248
  self._project_id = project_id
253
249
 
254
- @property
255
- def cloud_id(self):
256
- """Gets the cloud_id of this CreateJobQueueRequests. # noqa: E501
257
-
258
- The cloud id to which the job queue belongs to. # noqa: E501
259
-
260
- :return: The cloud_id of this CreateJobQueueRequests. # noqa: E501
261
- :rtype: str
262
- """
263
- return self._cloud_id
264
-
265
- @cloud_id.setter
266
- def cloud_id(self, cloud_id):
267
- """Sets the cloud_id of this CreateJobQueueRequests.
268
-
269
- The cloud id to which the job queue belongs to. # noqa: E501
270
-
271
- :param cloud_id: The cloud_id of this CreateJobQueueRequests. # noqa: E501
272
- :type: str
273
- """
274
- if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
275
- raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
276
-
277
- self._cloud_id = cloud_id
278
-
279
250
  def to_dict(self):
280
251
  """Returns the model properties as a dict"""
281
252
  result = {}
@@ -0,0 +1,174 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Managed Ray API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ import pprint
14
+ import re # noqa: F401
15
+
16
+ import six
17
+
18
+ from openapi_client.configuration import Configuration
19
+
20
+
21
+ class IKnowResponse(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
+ 'error': 'str',
37
+ 'time_series_events': 'list[IKnowTimeSeriesEvent]',
38
+ 'rootcause': 'str'
39
+ }
40
+
41
+ attribute_map = {
42
+ 'error': 'error',
43
+ 'time_series_events': 'time_series_events',
44
+ 'rootcause': 'rootcause'
45
+ }
46
+
47
+ def __init__(self, error=None, time_series_events=None, rootcause=None, local_vars_configuration=None): # noqa: E501
48
+ """IKnowResponse - a model defined in OpenAPI""" # noqa: E501
49
+ if local_vars_configuration is None:
50
+ local_vars_configuration = Configuration()
51
+ self.local_vars_configuration = local_vars_configuration
52
+
53
+ self._error = None
54
+ self._time_series_events = None
55
+ self._rootcause = None
56
+ self.discriminator = None
57
+
58
+ if error is not None:
59
+ self.error = error
60
+ self.time_series_events = time_series_events
61
+ self.rootcause = rootcause
62
+
63
+ @property
64
+ def error(self):
65
+ """Gets the error of this IKnowResponse. # noqa: E501
66
+
67
+
68
+ :return: The error of this IKnowResponse. # noqa: E501
69
+ :rtype: str
70
+ """
71
+ return self._error
72
+
73
+ @error.setter
74
+ def error(self, error):
75
+ """Sets the error of this IKnowResponse.
76
+
77
+
78
+ :param error: The error of this IKnowResponse. # noqa: E501
79
+ :type: str
80
+ """
81
+
82
+ self._error = error
83
+
84
+ @property
85
+ def time_series_events(self):
86
+ """Gets the time_series_events of this IKnowResponse. # noqa: E501
87
+
88
+
89
+ :return: The time_series_events of this IKnowResponse. # noqa: E501
90
+ :rtype: list[IKnowTimeSeriesEvent]
91
+ """
92
+ return self._time_series_events
93
+
94
+ @time_series_events.setter
95
+ def time_series_events(self, time_series_events):
96
+ """Sets the time_series_events of this IKnowResponse.
97
+
98
+
99
+ :param time_series_events: The time_series_events of this IKnowResponse. # noqa: E501
100
+ :type: list[IKnowTimeSeriesEvent]
101
+ """
102
+ if self.local_vars_configuration.client_side_validation and time_series_events is None: # noqa: E501
103
+ raise ValueError("Invalid value for `time_series_events`, must not be `None`") # noqa: E501
104
+
105
+ self._time_series_events = time_series_events
106
+
107
+ @property
108
+ def rootcause(self):
109
+ """Gets the rootcause of this IKnowResponse. # noqa: E501
110
+
111
+
112
+ :return: The rootcause of this IKnowResponse. # noqa: E501
113
+ :rtype: str
114
+ """
115
+ return self._rootcause
116
+
117
+ @rootcause.setter
118
+ def rootcause(self, rootcause):
119
+ """Sets the rootcause of this IKnowResponse.
120
+
121
+
122
+ :param rootcause: The rootcause of this IKnowResponse. # noqa: E501
123
+ :type: str
124
+ """
125
+ if self.local_vars_configuration.client_side_validation and rootcause is None: # noqa: E501
126
+ raise ValueError("Invalid value for `rootcause`, must not be `None`") # noqa: E501
127
+
128
+ self._rootcause = rootcause
129
+
130
+ def to_dict(self):
131
+ """Returns the model properties as a dict"""
132
+ result = {}
133
+
134
+ for attr, _ in six.iteritems(self.openapi_types):
135
+ value = getattr(self, attr)
136
+ if isinstance(value, list):
137
+ result[attr] = list(map(
138
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
139
+ value
140
+ ))
141
+ elif hasattr(value, "to_dict"):
142
+ result[attr] = value.to_dict()
143
+ elif isinstance(value, dict):
144
+ result[attr] = dict(map(
145
+ lambda item: (item[0], item[1].to_dict())
146
+ if hasattr(item[1], "to_dict") else item,
147
+ value.items()
148
+ ))
149
+ else:
150
+ result[attr] = value
151
+
152
+ return result
153
+
154
+ def to_str(self):
155
+ """Returns the string representation of the model"""
156
+ return pprint.pformat(self.to_dict())
157
+
158
+ def __repr__(self):
159
+ """For `print` and `pprint`"""
160
+ return self.to_str()
161
+
162
+ def __eq__(self, other):
163
+ """Returns true if both objects are equal"""
164
+ if not isinstance(other, IKnowResponse):
165
+ return False
166
+
167
+ return self.to_dict() == other.to_dict()
168
+
169
+ def __ne__(self, other):
170
+ """Returns true if both objects are not equal"""
171
+ if not isinstance(other, IKnowResponse):
172
+ return True
173
+
174
+ return self.to_dict() != other.to_dict()
@@ -0,0 +1,148 @@
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 IKnowTimeSeriesEvent(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
+ 'timestamp': 'str',
37
+ 'event': 'str'
38
+ }
39
+
40
+ attribute_map = {
41
+ 'timestamp': 'timestamp',
42
+ 'event': 'event'
43
+ }
44
+
45
+ def __init__(self, timestamp=None, event=None, local_vars_configuration=None): # noqa: E501
46
+ """IKnowTimeSeriesEvent - 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._timestamp = None
52
+ self._event = None
53
+ self.discriminator = None
54
+
55
+ self.timestamp = timestamp
56
+ self.event = event
57
+
58
+ @property
59
+ def timestamp(self):
60
+ """Gets the timestamp of this IKnowTimeSeriesEvent. # noqa: E501
61
+
62
+
63
+ :return: The timestamp of this IKnowTimeSeriesEvent. # noqa: E501
64
+ :rtype: str
65
+ """
66
+ return self._timestamp
67
+
68
+ @timestamp.setter
69
+ def timestamp(self, timestamp):
70
+ """Sets the timestamp of this IKnowTimeSeriesEvent.
71
+
72
+
73
+ :param timestamp: The timestamp of this IKnowTimeSeriesEvent. # noqa: E501
74
+ :type: str
75
+ """
76
+ if self.local_vars_configuration.client_side_validation and timestamp is None: # noqa: E501
77
+ raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501
78
+
79
+ self._timestamp = timestamp
80
+
81
+ @property
82
+ def event(self):
83
+ """Gets the event of this IKnowTimeSeriesEvent. # noqa: E501
84
+
85
+
86
+ :return: The event of this IKnowTimeSeriesEvent. # noqa: E501
87
+ :rtype: str
88
+ """
89
+ return self._event
90
+
91
+ @event.setter
92
+ def event(self, event):
93
+ """Sets the event of this IKnowTimeSeriesEvent.
94
+
95
+
96
+ :param event: The event of this IKnowTimeSeriesEvent. # noqa: E501
97
+ :type: str
98
+ """
99
+ if self.local_vars_configuration.client_side_validation and event is None: # noqa: E501
100
+ raise ValueError("Invalid value for `event`, must not be `None`") # noqa: E501
101
+
102
+ self._event = event
103
+
104
+ def to_dict(self):
105
+ """Returns the model properties as a dict"""
106
+ result = {}
107
+
108
+ for attr, _ in six.iteritems(self.openapi_types):
109
+ value = getattr(self, attr)
110
+ if isinstance(value, list):
111
+ result[attr] = list(map(
112
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
113
+ value
114
+ ))
115
+ elif hasattr(value, "to_dict"):
116
+ result[attr] = value.to_dict()
117
+ elif isinstance(value, dict):
118
+ result[attr] = dict(map(
119
+ lambda item: (item[0], item[1].to_dict())
120
+ if hasattr(item[1], "to_dict") else item,
121
+ value.items()
122
+ ))
123
+ else:
124
+ result[attr] = value
125
+
126
+ return result
127
+
128
+ def to_str(self):
129
+ """Returns the string representation of the model"""
130
+ return pprint.pformat(self.to_dict())
131
+
132
+ def __repr__(self):
133
+ """For `print` and `pprint`"""
134
+ return self.to_str()
135
+
136
+ def __eq__(self, other):
137
+ """Returns true if both objects are equal"""
138
+ if not isinstance(other, IKnowTimeSeriesEvent):
139
+ return False
140
+
141
+ return self.to_dict() == other.to_dict()
142
+
143
+ def __ne__(self, other):
144
+ """Returns true if both objects are not equal"""
145
+ if not isinstance(other, IKnowTimeSeriesEvent):
146
+ return True
147
+
148
+ return self.to_dict() != other.to_dict()
@@ -0,0 +1,199 @@
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 JobReport(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
+ 'job_id': 'str',
37
+ 'unused_cpu_hours': 'float',
38
+ 'unused_gpu_hours': 'float',
39
+ 'max_instances_launched': 'int'
40
+ }
41
+
42
+ attribute_map = {
43
+ 'job_id': 'job_id',
44
+ 'unused_cpu_hours': 'unused_cpu_hours',
45
+ 'unused_gpu_hours': 'unused_gpu_hours',
46
+ 'max_instances_launched': 'max_instances_launched'
47
+ }
48
+
49
+ def __init__(self, job_id=None, unused_cpu_hours=None, unused_gpu_hours=None, max_instances_launched=None, local_vars_configuration=None): # noqa: E501
50
+ """JobReport - 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._job_id = None
56
+ self._unused_cpu_hours = None
57
+ self._unused_gpu_hours = None
58
+ self._max_instances_launched = None
59
+ self.discriminator = None
60
+
61
+ self.job_id = job_id
62
+ if unused_cpu_hours is not None:
63
+ self.unused_cpu_hours = unused_cpu_hours
64
+ if unused_gpu_hours is not None:
65
+ self.unused_gpu_hours = unused_gpu_hours
66
+ if max_instances_launched is not None:
67
+ self.max_instances_launched = max_instances_launched
68
+
69
+ @property
70
+ def job_id(self):
71
+ """Gets the job_id of this JobReport. # noqa: E501
72
+
73
+
74
+ :return: The job_id of this JobReport. # noqa: E501
75
+ :rtype: str
76
+ """
77
+ return self._job_id
78
+
79
+ @job_id.setter
80
+ def job_id(self, job_id):
81
+ """Sets the job_id of this JobReport.
82
+
83
+
84
+ :param job_id: The job_id of this JobReport. # noqa: E501
85
+ :type: str
86
+ """
87
+ if self.local_vars_configuration.client_side_validation and job_id is None: # noqa: E501
88
+ raise ValueError("Invalid value for `job_id`, must not be `None`") # noqa: E501
89
+
90
+ self._job_id = job_id
91
+
92
+ @property
93
+ def unused_cpu_hours(self):
94
+ """Gets the unused_cpu_hours of this JobReport. # noqa: E501
95
+
96
+
97
+ :return: The unused_cpu_hours of this JobReport. # noqa: E501
98
+ :rtype: float
99
+ """
100
+ return self._unused_cpu_hours
101
+
102
+ @unused_cpu_hours.setter
103
+ def unused_cpu_hours(self, unused_cpu_hours):
104
+ """Sets the unused_cpu_hours of this JobReport.
105
+
106
+
107
+ :param unused_cpu_hours: The unused_cpu_hours of this JobReport. # noqa: E501
108
+ :type: float
109
+ """
110
+
111
+ self._unused_cpu_hours = unused_cpu_hours
112
+
113
+ @property
114
+ def unused_gpu_hours(self):
115
+ """Gets the unused_gpu_hours of this JobReport. # noqa: E501
116
+
117
+
118
+ :return: The unused_gpu_hours of this JobReport. # noqa: E501
119
+ :rtype: float
120
+ """
121
+ return self._unused_gpu_hours
122
+
123
+ @unused_gpu_hours.setter
124
+ def unused_gpu_hours(self, unused_gpu_hours):
125
+ """Sets the unused_gpu_hours of this JobReport.
126
+
127
+
128
+ :param unused_gpu_hours: The unused_gpu_hours of this JobReport. # noqa: E501
129
+ :type: float
130
+ """
131
+
132
+ self._unused_gpu_hours = unused_gpu_hours
133
+
134
+ @property
135
+ def max_instances_launched(self):
136
+ """Gets the max_instances_launched of this JobReport. # noqa: E501
137
+
138
+
139
+ :return: The max_instances_launched of this JobReport. # noqa: E501
140
+ :rtype: int
141
+ """
142
+ return self._max_instances_launched
143
+
144
+ @max_instances_launched.setter
145
+ def max_instances_launched(self, max_instances_launched):
146
+ """Sets the max_instances_launched of this JobReport.
147
+
148
+
149
+ :param max_instances_launched: The max_instances_launched of this JobReport. # noqa: E501
150
+ :type: int
151
+ """
152
+
153
+ self._max_instances_launched = max_instances_launched
154
+
155
+ def to_dict(self):
156
+ """Returns the model properties as a dict"""
157
+ result = {}
158
+
159
+ for attr, _ in six.iteritems(self.openapi_types):
160
+ value = getattr(self, attr)
161
+ if isinstance(value, list):
162
+ result[attr] = list(map(
163
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
164
+ value
165
+ ))
166
+ elif hasattr(value, "to_dict"):
167
+ result[attr] = value.to_dict()
168
+ elif isinstance(value, dict):
169
+ result[attr] = dict(map(
170
+ lambda item: (item[0], item[1].to_dict())
171
+ if hasattr(item[1], "to_dict") else item,
172
+ value.items()
173
+ ))
174
+ else:
175
+ result[attr] = value
176
+
177
+ return result
178
+
179
+ def to_str(self):
180
+ """Returns the string representation of the model"""
181
+ return pprint.pformat(self.to_dict())
182
+
183
+ def __repr__(self):
184
+ """For `print` and `pprint`"""
185
+ return self.to_str()
186
+
187
+ def __eq__(self, other):
188
+ """Returns true if both objects are equal"""
189
+ if not isinstance(other, JobReport):
190
+ return False
191
+
192
+ return self.to_dict() == other.to_dict()
193
+
194
+ def __ne__(self, other):
195
+ """Returns true if both objects are not equal"""
196
+ if not isinstance(other, JobReport):
197
+ return True
198
+
199
+ return self.to_dict() != other.to_dict()