anyscale 0.24.87__py3-none-any.whl → 0.24.91__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 (120) hide show
  1. anyscale/__init__.py +56 -0
  2. anyscale/_private/anyscale_client/anyscale_client.py +158 -28
  3. anyscale/_private/anyscale_client/common.py +82 -0
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +193 -1
  5. anyscale/_private/docgen/README.md +1 -1
  6. anyscale/_private/docgen/__main__.py +74 -19
  7. anyscale/_private/docgen/api.md +0 -20
  8. anyscale/_private/docgen/generator.py +4 -2
  9. anyscale/_private/docgen/models.md +1 -46
  10. anyscale/_private/workload/workload_config.py +1 -1
  11. anyscale/aggregated_instance_usage/__init__.py +1 -1
  12. anyscale/aggregated_instance_usage/commands.py +2 -4
  13. anyscale/aggregated_instance_usage/models.py +8 -8
  14. anyscale/client/README.md +19 -23
  15. anyscale/client/openapi_client/__init__.py +13 -15
  16. anyscale/client/openapi_client/api/default_api.py +825 -962
  17. anyscale/client/openapi_client/models/__init__.py +13 -15
  18. anyscale/client/openapi_client/models/admin_create_user.py +255 -0
  19. anyscale/client/openapi_client/models/admin_created_user.py +281 -0
  20. anyscale/client/openapi_client/models/{sessionevent_list_response.py → admincreateduser_list_response.py} +15 -15
  21. anyscale/client/openapi_client/models/aggregated_usage_query.py +1 -29
  22. anyscale/client/openapi_client/models/{session_event_types.py → cloud_deployment_config.py} +35 -24
  23. anyscale/client/openapi_client/models/{platformfinetuningjob_response.py → clouddeploymentconfig_response.py} +11 -11
  24. anyscale/client/openapi_client/models/{company_size.py → cluster_size.py} +10 -10
  25. anyscale/client/openapi_client/models/cluster_status_details.py +2 -1
  26. anyscale/client/openapi_client/models/create_experimental_workspace.py +29 -1
  27. anyscale/client/openapi_client/models/{resubmit_ft_job_request.py → describe_machine_pool_request.py} +21 -20
  28. anyscale/client/openapi_client/models/describe_machine_pool_response.py +123 -0
  29. anyscale/client/openapi_client/models/{fine_tuning_job_status.py → describemachinepoolresponse_response.py} +34 -16
  30. anyscale/client/openapi_client/models/machine_allocation_state.py +3 -1
  31. anyscale/client/openapi_client/models/machine_state_info.py +326 -0
  32. anyscale/client/openapi_client/models/organization_marketing_questions.py +80 -54
  33. anyscale/client/openapi_client/models/request_state_info.py +210 -0
  34. anyscale/client/openapi_client/models/{platformfinetuningjob_list_response.py → scheduler_info.py} +43 -38
  35. anyscale/client/openapi_client/models/usage_by_cluster.py +28 -1
  36. anyscale/client/openapi_client/models/usage_by_user.py +30 -3
  37. anyscale/client/openapi_client/models/workload_info.py +210 -0
  38. anyscale/cloud/__init__.py +83 -0
  39. anyscale/cloud/_private/cloud_sdk.py +25 -0
  40. anyscale/cloud/commands.py +45 -0
  41. anyscale/cloud/models.py +91 -0
  42. anyscale/cluster_compute.py +1 -1
  43. anyscale/commands/aggregated_instance_usage_commands.py +4 -4
  44. anyscale/commands/cloud_commands.py +38 -2
  45. anyscale/commands/command_examples.py +67 -0
  46. anyscale/commands/job_commands.py +15 -3
  47. anyscale/commands/machine_pool_commands.py +113 -1
  48. anyscale/commands/organization_invitation_commands.py +98 -0
  49. anyscale/commands/project_commands.py +52 -2
  50. anyscale/commands/resource_quota_commands.py +98 -11
  51. anyscale/commands/service_commands.py +1 -1
  52. anyscale/commands/session_commands_hidden.py +5 -1
  53. anyscale/commands/user_commands.py +49 -0
  54. anyscale/commands/util.py +1 -1
  55. anyscale/commands/workspace_commands.py +1 -1
  56. anyscale/connect.py +1 -1
  57. anyscale/connect_utils/project.py +7 -4
  58. anyscale/controllers/cloud_controller.py +6 -6
  59. anyscale/controllers/cloud_functional_verification_controller.py +1 -1
  60. anyscale/controllers/cluster_controller.py +2 -2
  61. anyscale/controllers/compute_config_controller.py +1 -1
  62. anyscale/controllers/experimental_integrations_controller.py +1 -1
  63. anyscale/controllers/job_controller.py +8 -3
  64. anyscale/controllers/list_controller.py +2 -2
  65. anyscale/controllers/machine_pool_controller.py +12 -1
  66. anyscale/controllers/project_controller.py +4 -3
  67. anyscale/controllers/schedule_controller.py +1 -1
  68. anyscale/controllers/service_controller.py +1 -1
  69. anyscale/controllers/workspace_controller.py +1 -1
  70. anyscale/models/job_model.py +1 -1
  71. anyscale/organization_invitation/__init__.py +61 -0
  72. anyscale/organization_invitation/_private/organization_invitation_sdk.py +24 -0
  73. anyscale/organization_invitation/commands.py +84 -0
  74. anyscale/organization_invitation/models.py +45 -0
  75. anyscale/project/__init__.py +35 -0
  76. anyscale/project/_private/project_sdk.py +27 -0
  77. anyscale/project/commands.py +56 -0
  78. anyscale/project/models.py +91 -0
  79. anyscale/{project.py → project_utils.py} +3 -4
  80. anyscale/resource_quota/__init__.py +99 -0
  81. anyscale/resource_quota/_private/resource_quota_sdk.py +111 -0
  82. anyscale/resource_quota/commands.py +150 -0
  83. anyscale/resource_quota/models.py +303 -0
  84. anyscale/scripts.py +6 -0
  85. anyscale/sdk/anyscale_client/__init__.py +0 -5
  86. anyscale/sdk/anyscale_client/api/default_api.py +0 -150
  87. anyscale/sdk/anyscale_client/models/__init__.py +0 -5
  88. anyscale/sdk/anyscale_client/models/cluster_status_details.py +2 -1
  89. anyscale/sdk/anyscale_client/sdk.py +1 -1
  90. anyscale/user/__init__.py +35 -0
  91. anyscale/user/_private/user_sdk.py +32 -0
  92. anyscale/user/commands.py +42 -0
  93. anyscale/user/models.py +201 -0
  94. anyscale/util.py +15 -0
  95. anyscale/utils/cloud_utils.py +1 -1
  96. anyscale/version.py +1 -1
  97. anyscale/workspace_utils.py +1 -1
  98. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/METADATA +1 -5
  99. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/RECORD +105 -92
  100. anyscale/client/openapi_client/models/create_fine_tuning_hyperparameters.py +0 -156
  101. anyscale/client/openapi_client/models/create_fine_tuning_job_product_request.py +0 -353
  102. anyscale/client/openapi_client/models/finish_ft_job_request.py +0 -204
  103. anyscale/client/openapi_client/models/log_level_types.py +0 -100
  104. anyscale/client/openapi_client/models/paging_context.py +0 -172
  105. anyscale/client/openapi_client/models/platform_fine_tuning_job.py +0 -577
  106. anyscale/client/openapi_client/models/session_event.py +0 -267
  107. anyscale/client/openapi_client/models/session_event_cause.py +0 -150
  108. anyscale/controllers/resource_quota_controller.py +0 -183
  109. anyscale/sdk/anyscale_client/models/log_level_types.py +0 -100
  110. anyscale/sdk/anyscale_client/models/session_event.py +0 -267
  111. anyscale/sdk/anyscale_client/models/session_event_cause.py +0 -150
  112. anyscale/sdk/anyscale_client/models/session_event_types.py +0 -111
  113. anyscale/sdk/anyscale_client/models/sessionevent_list_response.py +0 -147
  114. anyscale/utils/imports/azure.py +0 -14
  115. /anyscale/{cloud.py → cloud_utils.py} +0 -0
  116. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/LICENSE +0 -0
  117. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/NOTICE +0 -0
  118. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/WHEEL +0 -0
  119. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/entry_points.txt +0 -0
  120. {anyscale-0.24.87.dist-info → anyscale-0.24.91.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,123 @@
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 DescribeMachinePoolResponse(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
+ 'scheduler_info': 'SchedulerInfo'
37
+ }
38
+
39
+ attribute_map = {
40
+ 'scheduler_info': 'scheduler_info'
41
+ }
42
+
43
+ def __init__(self, scheduler_info=None, local_vars_configuration=None): # noqa: E501
44
+ """DescribeMachinePoolResponse - a model defined in OpenAPI""" # noqa: E501
45
+ if local_vars_configuration is None:
46
+ local_vars_configuration = Configuration()
47
+ self.local_vars_configuration = local_vars_configuration
48
+
49
+ self._scheduler_info = None
50
+ self.discriminator = None
51
+
52
+ self.scheduler_info = scheduler_info
53
+
54
+ @property
55
+ def scheduler_info(self):
56
+ """Gets the scheduler_info of this DescribeMachinePoolResponse. # noqa: E501
57
+
58
+ State provided by the scheduler. # noqa: E501
59
+
60
+ :return: The scheduler_info of this DescribeMachinePoolResponse. # noqa: E501
61
+ :rtype: SchedulerInfo
62
+ """
63
+ return self._scheduler_info
64
+
65
+ @scheduler_info.setter
66
+ def scheduler_info(self, scheduler_info):
67
+ """Sets the scheduler_info of this DescribeMachinePoolResponse.
68
+
69
+ State provided by the scheduler. # noqa: E501
70
+
71
+ :param scheduler_info: The scheduler_info of this DescribeMachinePoolResponse. # noqa: E501
72
+ :type: SchedulerInfo
73
+ """
74
+ if self.local_vars_configuration.client_side_validation and scheduler_info is None: # noqa: E501
75
+ raise ValueError("Invalid value for `scheduler_info`, must not be `None`") # noqa: E501
76
+
77
+ self._scheduler_info = scheduler_info
78
+
79
+ def to_dict(self):
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.openapi_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+
101
+ return result
102
+
103
+ def to_str(self):
104
+ """Returns the string representation of the model"""
105
+ return pprint.pformat(self.to_dict())
106
+
107
+ def __repr__(self):
108
+ """For `print` and `pprint`"""
109
+ return self.to_str()
110
+
111
+ def __eq__(self, other):
112
+ """Returns true if both objects are equal"""
113
+ if not isinstance(other, DescribeMachinePoolResponse):
114
+ return False
115
+
116
+ return self.to_dict() == other.to_dict()
117
+
118
+ def __ne__(self, other):
119
+ """Returns true if both objects are not equal"""
120
+ if not isinstance(other, DescribeMachinePoolResponse):
121
+ return True
122
+
123
+ return self.to_dict() != other.to_dict()
@@ -18,24 +18,13 @@ import six
18
18
  from openapi_client.configuration import Configuration
19
19
 
20
20
 
21
- class FineTuningJobStatus(object):
21
+ class DescribemachinepoolresponseResponse(object):
22
22
  """NOTE: This class is auto generated by OpenAPI Generator.
23
23
  Ref: https://openapi-generator.tech
24
24
 
25
25
  Do not edit the class manually.
26
26
  """
27
27
 
28
- """
29
- allowed enum values
30
- """
31
- PENDING = "pending"
32
- RUNNING = "running"
33
- SUCCEEDED = "succeeded"
34
- FAILED = "failed"
35
- CANCELLED = "cancelled"
36
-
37
- allowable_values = [PENDING, RUNNING, SUCCEEDED, FAILED, CANCELLED] # noqa: E501
38
-
39
28
  """
40
29
  Attributes:
41
30
  openapi_types (dict): The key is attribute name
@@ -44,18 +33,47 @@ class FineTuningJobStatus(object):
44
33
  and the value is json key in definition.
45
34
  """
46
35
  openapi_types = {
36
+ 'result': 'DescribeMachinePoolResponse'
47
37
  }
48
38
 
49
39
  attribute_map = {
40
+ 'result': 'result'
50
41
  }
51
42
 
52
- def __init__(self, local_vars_configuration=None): # noqa: E501
53
- """FineTuningJobStatus - a model defined in OpenAPI""" # noqa: E501
43
+ def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
44
+ """DescribemachinepoolresponseResponse - a model defined in OpenAPI""" # noqa: E501
54
45
  if local_vars_configuration is None:
55
46
  local_vars_configuration = Configuration()
56
47
  self.local_vars_configuration = local_vars_configuration
48
+
49
+ self._result = None
57
50
  self.discriminator = None
58
51
 
52
+ self.result = result
53
+
54
+ @property
55
+ def result(self):
56
+ """Gets the result of this DescribemachinepoolresponseResponse. # noqa: E501
57
+
58
+
59
+ :return: The result of this DescribemachinepoolresponseResponse. # noqa: E501
60
+ :rtype: DescribeMachinePoolResponse
61
+ """
62
+ return self._result
63
+
64
+ @result.setter
65
+ def result(self, result):
66
+ """Sets the result of this DescribemachinepoolresponseResponse.
67
+
68
+
69
+ :param result: The result of this DescribemachinepoolresponseResponse. # noqa: E501
70
+ :type: DescribeMachinePoolResponse
71
+ """
72
+ if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501
73
+ raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
74
+
75
+ self._result = result
76
+
59
77
  def to_dict(self):
60
78
  """Returns the model properties as a dict"""
61
79
  result = {}
@@ -90,14 +108,14 @@ class FineTuningJobStatus(object):
90
108
 
91
109
  def __eq__(self, other):
92
110
  """Returns true if both objects are equal"""
93
- if not isinstance(other, FineTuningJobStatus):
111
+ if not isinstance(other, DescribemachinepoolresponseResponse):
94
112
  return False
95
113
 
96
114
  return self.to_dict() == other.to_dict()
97
115
 
98
116
  def __ne__(self, other):
99
117
  """Returns true if both objects are not equal"""
100
- if not isinstance(other, FineTuningJobStatus):
118
+ if not isinstance(other, DescribemachinepoolresponseResponse):
101
119
  return True
102
120
 
103
121
  return self.to_dict() != other.to_dict()
@@ -30,8 +30,10 @@ class MachineAllocationState(object):
30
30
  """
31
31
  AVAILABLE = "available"
32
32
  ALLOCATED = "allocated"
33
+ MIGRATING = "migrating"
34
+ RESTORING = "restoring"
33
35
 
34
- allowable_values = [AVAILABLE, ALLOCATED] # noqa: E501
36
+ allowable_values = [AVAILABLE, ALLOCATED, MIGRATING, RESTORING] # noqa: E501
35
37
 
36
38
  """
37
39
  Attributes:
@@ -0,0 +1,326 @@
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 MachineStateInfo(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
+ 'machine_id': 'str',
37
+ 'machine_type': 'str',
38
+ 'partition': 'str',
39
+ 'allocation_state': 'MachineAllocationState',
40
+ 'workload_info': 'WorkloadInfo',
41
+ 'workload_score': 'int',
42
+ 'workload_instance_id': 'str',
43
+ 'cloud_instance_id': 'str'
44
+ }
45
+
46
+ attribute_map = {
47
+ 'machine_id': 'machine_id',
48
+ 'machine_type': 'machine_type',
49
+ 'partition': 'partition',
50
+ 'allocation_state': 'allocation_state',
51
+ 'workload_info': 'workload_info',
52
+ 'workload_score': 'workload_score',
53
+ 'workload_instance_id': 'workload_instance_id',
54
+ 'cloud_instance_id': 'cloud_instance_id'
55
+ }
56
+
57
+ def __init__(self, machine_id=None, machine_type=None, partition=None, allocation_state=None, workload_info=None, workload_score=None, workload_instance_id=None, cloud_instance_id=None, local_vars_configuration=None): # noqa: E501
58
+ """MachineStateInfo - a model defined in OpenAPI""" # noqa: E501
59
+ if local_vars_configuration is None:
60
+ local_vars_configuration = Configuration()
61
+ self.local_vars_configuration = local_vars_configuration
62
+
63
+ self._machine_id = None
64
+ self._machine_type = None
65
+ self._partition = None
66
+ self._allocation_state = None
67
+ self._workload_info = None
68
+ self._workload_score = None
69
+ self._workload_instance_id = None
70
+ self._cloud_instance_id = None
71
+ self.discriminator = None
72
+
73
+ self.machine_id = machine_id
74
+ self.machine_type = machine_type
75
+ self.partition = partition
76
+ self.allocation_state = allocation_state
77
+ self.workload_info = workload_info
78
+ self.workload_score = workload_score
79
+ self.workload_instance_id = workload_instance_id
80
+ self.cloud_instance_id = cloud_instance_id
81
+
82
+ @property
83
+ def machine_id(self):
84
+ """Gets the machine_id of this MachineStateInfo. # noqa: E501
85
+
86
+ The ID of the machine. # noqa: E501
87
+
88
+ :return: The machine_id of this MachineStateInfo. # noqa: E501
89
+ :rtype: str
90
+ """
91
+ return self._machine_id
92
+
93
+ @machine_id.setter
94
+ def machine_id(self, machine_id):
95
+ """Sets the machine_id of this MachineStateInfo.
96
+
97
+ The ID of the machine. # noqa: E501
98
+
99
+ :param machine_id: The machine_id of this MachineStateInfo. # noqa: E501
100
+ :type: str
101
+ """
102
+ if self.local_vars_configuration.client_side_validation and machine_id is None: # noqa: E501
103
+ raise ValueError("Invalid value for `machine_id`, must not be `None`") # noqa: E501
104
+
105
+ self._machine_id = machine_id
106
+
107
+ @property
108
+ def machine_type(self):
109
+ """Gets the machine_type of this MachineStateInfo. # noqa: E501
110
+
111
+ The type of the machine. # noqa: E501
112
+
113
+ :return: The machine_type of this MachineStateInfo. # noqa: E501
114
+ :rtype: str
115
+ """
116
+ return self._machine_type
117
+
118
+ @machine_type.setter
119
+ def machine_type(self, machine_type):
120
+ """Sets the machine_type of this MachineStateInfo.
121
+
122
+ The type of the machine. # noqa: E501
123
+
124
+ :param machine_type: The machine_type of this MachineStateInfo. # noqa: E501
125
+ :type: str
126
+ """
127
+ if self.local_vars_configuration.client_side_validation and machine_type is None: # noqa: E501
128
+ raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501
129
+
130
+ self._machine_type = machine_type
131
+
132
+ @property
133
+ def partition(self):
134
+ """Gets the partition of this MachineStateInfo. # noqa: E501
135
+
136
+ The partition of the machine. # noqa: E501
137
+
138
+ :return: The partition of this MachineStateInfo. # noqa: E501
139
+ :rtype: str
140
+ """
141
+ return self._partition
142
+
143
+ @partition.setter
144
+ def partition(self, partition):
145
+ """Sets the partition of this MachineStateInfo.
146
+
147
+ The partition of the machine. # noqa: E501
148
+
149
+ :param partition: The partition of this MachineStateInfo. # noqa: E501
150
+ :type: str
151
+ """
152
+ if self.local_vars_configuration.client_side_validation and partition is None: # noqa: E501
153
+ raise ValueError("Invalid value for `partition`, must not be `None`") # noqa: E501
154
+
155
+ self._partition = partition
156
+
157
+ @property
158
+ def allocation_state(self):
159
+ """Gets the allocation_state of this MachineStateInfo. # noqa: E501
160
+
161
+ The allocation state of the machine. # noqa: E501
162
+
163
+ :return: The allocation_state of this MachineStateInfo. # noqa: E501
164
+ :rtype: MachineAllocationState
165
+ """
166
+ return self._allocation_state
167
+
168
+ @allocation_state.setter
169
+ def allocation_state(self, allocation_state):
170
+ """Sets the allocation_state of this MachineStateInfo.
171
+
172
+ The allocation state of the machine. # noqa: E501
173
+
174
+ :param allocation_state: The allocation_state of this MachineStateInfo. # noqa: E501
175
+ :type: MachineAllocationState
176
+ """
177
+ if self.local_vars_configuration.client_side_validation and allocation_state is None: # noqa: E501
178
+ raise ValueError("Invalid value for `allocation_state`, must not be `None`") # noqa: E501
179
+
180
+ self._allocation_state = allocation_state
181
+
182
+ @property
183
+ def workload_info(self):
184
+ """Gets the workload_info of this MachineStateInfo. # noqa: E501
185
+
186
+ Workload metadata associated with this machine. # noqa: E501
187
+
188
+ :return: The workload_info of this MachineStateInfo. # noqa: E501
189
+ :rtype: WorkloadInfo
190
+ """
191
+ return self._workload_info
192
+
193
+ @workload_info.setter
194
+ def workload_info(self, workload_info):
195
+ """Sets the workload_info of this MachineStateInfo.
196
+
197
+ Workload metadata associated with this machine. # noqa: E501
198
+
199
+ :param workload_info: The workload_info of this MachineStateInfo. # noqa: E501
200
+ :type: WorkloadInfo
201
+ """
202
+ if self.local_vars_configuration.client_side_validation and workload_info is None: # noqa: E501
203
+ raise ValueError("Invalid value for `workload_info`, must not be `None`") # noqa: E501
204
+
205
+ self._workload_info = workload_info
206
+
207
+ @property
208
+ def workload_score(self):
209
+ """Gets the workload_score of this MachineStateInfo. # noqa: E501
210
+
211
+ The score of the workload. # noqa: E501
212
+
213
+ :return: The workload_score of this MachineStateInfo. # noqa: E501
214
+ :rtype: int
215
+ """
216
+ return self._workload_score
217
+
218
+ @workload_score.setter
219
+ def workload_score(self, workload_score):
220
+ """Sets the workload_score of this MachineStateInfo.
221
+
222
+ The score of the workload. # noqa: E501
223
+
224
+ :param workload_score: The workload_score of this MachineStateInfo. # noqa: E501
225
+ :type: int
226
+ """
227
+ if self.local_vars_configuration.client_side_validation and workload_score is None: # noqa: E501
228
+ raise ValueError("Invalid value for `workload_score`, must not be `None`") # noqa: E501
229
+
230
+ self._workload_score = workload_score
231
+
232
+ @property
233
+ def workload_instance_id(self):
234
+ """Gets the workload_instance_id of this MachineStateInfo. # noqa: E501
235
+
236
+ The instance ID of the workload. # noqa: E501
237
+
238
+ :return: The workload_instance_id of this MachineStateInfo. # noqa: E501
239
+ :rtype: str
240
+ """
241
+ return self._workload_instance_id
242
+
243
+ @workload_instance_id.setter
244
+ def workload_instance_id(self, workload_instance_id):
245
+ """Sets the workload_instance_id of this MachineStateInfo.
246
+
247
+ The instance ID of the workload. # noqa: E501
248
+
249
+ :param workload_instance_id: The workload_instance_id of this MachineStateInfo. # noqa: E501
250
+ :type: str
251
+ """
252
+ if self.local_vars_configuration.client_side_validation and workload_instance_id is None: # noqa: E501
253
+ raise ValueError("Invalid value for `workload_instance_id`, must not be `None`") # noqa: E501
254
+
255
+ self._workload_instance_id = workload_instance_id
256
+
257
+ @property
258
+ def cloud_instance_id(self):
259
+ """Gets the cloud_instance_id of this MachineStateInfo. # noqa: E501
260
+
261
+ The cloud instance ID of the cloud instance backing this machine. # noqa: E501
262
+
263
+ :return: The cloud_instance_id of this MachineStateInfo. # noqa: E501
264
+ :rtype: str
265
+ """
266
+ return self._cloud_instance_id
267
+
268
+ @cloud_instance_id.setter
269
+ def cloud_instance_id(self, cloud_instance_id):
270
+ """Sets the cloud_instance_id of this MachineStateInfo.
271
+
272
+ The cloud instance ID of the cloud instance backing this machine. # noqa: E501
273
+
274
+ :param cloud_instance_id: The cloud_instance_id of this MachineStateInfo. # noqa: E501
275
+ :type: str
276
+ """
277
+ if self.local_vars_configuration.client_side_validation and cloud_instance_id is None: # noqa: E501
278
+ raise ValueError("Invalid value for `cloud_instance_id`, must not be `None`") # noqa: E501
279
+
280
+ self._cloud_instance_id = cloud_instance_id
281
+
282
+ def to_dict(self):
283
+ """Returns the model properties as a dict"""
284
+ result = {}
285
+
286
+ for attr, _ in six.iteritems(self.openapi_types):
287
+ value = getattr(self, attr)
288
+ if isinstance(value, list):
289
+ result[attr] = list(map(
290
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
291
+ value
292
+ ))
293
+ elif hasattr(value, "to_dict"):
294
+ result[attr] = value.to_dict()
295
+ elif isinstance(value, dict):
296
+ result[attr] = dict(map(
297
+ lambda item: (item[0], item[1].to_dict())
298
+ if hasattr(item[1], "to_dict") else item,
299
+ value.items()
300
+ ))
301
+ else:
302
+ result[attr] = value
303
+
304
+ return result
305
+
306
+ def to_str(self):
307
+ """Returns the string representation of the model"""
308
+ return pprint.pformat(self.to_dict())
309
+
310
+ def __repr__(self):
311
+ """For `print` and `pprint`"""
312
+ return self.to_str()
313
+
314
+ def __eq__(self, other):
315
+ """Returns true if both objects are equal"""
316
+ if not isinstance(other, MachineStateInfo):
317
+ return False
318
+
319
+ return self.to_dict() == other.to_dict()
320
+
321
+ def __ne__(self, other):
322
+ """Returns true if both objects are not equal"""
323
+ if not isinstance(other, MachineStateInfo):
324
+ return True
325
+
326
+ return self.to_dict() != other.to_dict()