anyscale 0.26.16__py3-none-any.whl → 0.26.18__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 (40) hide show
  1. anyscale/anyscale-cloud-setup-gcp.yaml +2 -0
  2. anyscale/anyscale-cloud-setup.yaml +0 -4
  3. anyscale/client/README.md +7 -37
  4. anyscale/client/openapi_client/__init__.py +5 -20
  5. anyscale/client/openapi_client/api/default_api.py +410 -2163
  6. anyscale/client/openapi_client/models/__init__.py +5 -20
  7. anyscale/client/openapi_client/models/{create_session_response.py → i_know_response.py} +51 -51
  8. anyscale/client/openapi_client/models/{session_details.py → i_know_time_series_event.py} +35 -35
  9. anyscale/client/openapi_client/models/job_report.py +199 -0
  10. anyscale/client/openapi_client/models/job_with_report.py +254 -0
  11. anyscale/client/openapi_client/models/{webterminal_list_response.py → jobwithreport_list_response.py} +15 -15
  12. anyscale/commands/cloud_commands.py +71 -0
  13. anyscale/connect_utils/prepare_cluster.py +19 -14
  14. anyscale/controllers/cloud_controller.py +164 -1
  15. anyscale/job/_private/job_sdk.py +22 -24
  16. anyscale/version.py +1 -1
  17. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/METADATA +1 -1
  18. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/RECORD +23 -38
  19. anyscale/client/openapi_client/models/archived_logs_info.py +0 -164
  20. anyscale/client/openapi_client/models/archivedlogsinfo_response.py +0 -121
  21. anyscale/client/openapi_client/models/create_experimental_workspace_from_job.py +0 -123
  22. anyscale/client/openapi_client/models/create_session_from_snapshot_options.py +0 -538
  23. anyscale/client/openapi_client/models/create_session_in_db.py +0 -434
  24. anyscale/client/openapi_client/models/createsessionresponse_response.py +0 -121
  25. anyscale/client/openapi_client/models/external_service_status.py +0 -147
  26. anyscale/client/openapi_client/models/external_service_status_response.py +0 -250
  27. anyscale/client/openapi_client/models/externalservicestatusresponse_response.py +0 -121
  28. anyscale/client/openapi_client/models/monitor_logs_extension.py +0 -100
  29. anyscale/client/openapi_client/models/session_describe.py +0 -175
  30. anyscale/client/openapi_client/models/session_history_item.py +0 -146
  31. anyscale/client/openapi_client/models/sessiondescribe_response.py +0 -121
  32. anyscale/client/openapi_client/models/sessiondetails_response.py +0 -121
  33. anyscale/client/openapi_client/models/sessionhistoryitem_list_response.py +0 -147
  34. anyscale/client/openapi_client/models/update_compute_template.py +0 -146
  35. anyscale/client/openapi_client/models/update_compute_template_config.py +0 -464
  36. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/LICENSE +0 -0
  37. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/NOTICE +0 -0
  38. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/WHEEL +0 -0
  39. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/entry_points.txt +0 -0
  40. {anyscale-0.26.16.dist-info → anyscale-0.26.18.dist-info}/top_level.txt +0 -0
@@ -1,434 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class CreateSessionInDb(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
- 'name': 'str',
37
- 'project_id': 'str',
38
- 'cloud_id': 'str',
39
- 'cluster_config': 'str',
40
- 'build_id': 'str',
41
- 'compute_template_id': 'str',
42
- 'idle_timeout': 'int',
43
- 'uses_app_config': 'bool',
44
- 'allow_public_internet_traffic': 'bool',
45
- 'user_service_access': 'UserServiceAccessTypes',
46
- 'user_service_token': 'str',
47
- 'ha_job_id': 'str'
48
- }
49
-
50
- attribute_map = {
51
- 'name': 'name',
52
- 'project_id': 'project_id',
53
- 'cloud_id': 'cloud_id',
54
- 'cluster_config': 'cluster_config',
55
- 'build_id': 'build_id',
56
- 'compute_template_id': 'compute_template_id',
57
- 'idle_timeout': 'idle_timeout',
58
- 'uses_app_config': 'uses_app_config',
59
- 'allow_public_internet_traffic': 'allow_public_internet_traffic',
60
- 'user_service_access': 'user_service_access',
61
- 'user_service_token': 'user_service_token',
62
- 'ha_job_id': 'ha_job_id'
63
- }
64
-
65
- def __init__(self, name=None, project_id=None, cloud_id=None, cluster_config=None, build_id=None, compute_template_id=None, idle_timeout=None, uses_app_config=False, allow_public_internet_traffic=False, user_service_access=None, user_service_token=None, ha_job_id=None, local_vars_configuration=None): # noqa: E501
66
- """CreateSessionInDb - a model defined in OpenAPI""" # noqa: E501
67
- if local_vars_configuration is None:
68
- local_vars_configuration = Configuration()
69
- self.local_vars_configuration = local_vars_configuration
70
-
71
- self._name = None
72
- self._project_id = None
73
- self._cloud_id = None
74
- self._cluster_config = None
75
- self._build_id = None
76
- self._compute_template_id = None
77
- self._idle_timeout = None
78
- self._uses_app_config = None
79
- self._allow_public_internet_traffic = None
80
- self._user_service_access = None
81
- self._user_service_token = None
82
- self._ha_job_id = None
83
- self.discriminator = None
84
-
85
- self.name = name
86
- self.project_id = project_id
87
- self.cloud_id = cloud_id
88
- self.cluster_config = cluster_config
89
- if build_id is not None:
90
- self.build_id = build_id
91
- if compute_template_id is not None:
92
- self.compute_template_id = compute_template_id
93
- if idle_timeout is not None:
94
- self.idle_timeout = idle_timeout
95
- if uses_app_config is not None:
96
- self.uses_app_config = uses_app_config
97
- if allow_public_internet_traffic is not None:
98
- self.allow_public_internet_traffic = allow_public_internet_traffic
99
- if user_service_access is not None:
100
- self.user_service_access = user_service_access
101
- if user_service_token is not None:
102
- self.user_service_token = user_service_token
103
- if ha_job_id is not None:
104
- self.ha_job_id = ha_job_id
105
-
106
- @property
107
- def name(self):
108
- """Gets the name of this CreateSessionInDb. # noqa: E501
109
-
110
- Name of the session to be created. # noqa: E501
111
-
112
- :return: The name of this CreateSessionInDb. # noqa: E501
113
- :rtype: str
114
- """
115
- return self._name
116
-
117
- @name.setter
118
- def name(self, name):
119
- """Sets the name of this CreateSessionInDb.
120
-
121
- Name of the session to be created. # noqa: E501
122
-
123
- :param name: The name of this CreateSessionInDb. # noqa: E501
124
- :type: str
125
- """
126
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
127
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
128
-
129
- self._name = name
130
-
131
- @property
132
- def project_id(self):
133
- """Gets the project_id of this CreateSessionInDb. # noqa: E501
134
-
135
- Project that the session will be created in. # noqa: E501
136
-
137
- :return: The project_id of this CreateSessionInDb. # noqa: E501
138
- :rtype: str
139
- """
140
- return self._project_id
141
-
142
- @project_id.setter
143
- def project_id(self, project_id):
144
- """Sets the project_id of this CreateSessionInDb.
145
-
146
- Project that the session will be created in. # noqa: E501
147
-
148
- :param project_id: The project_id of this CreateSessionInDb. # noqa: E501
149
- :type: str
150
- """
151
- if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
152
- raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
153
-
154
- self._project_id = project_id
155
-
156
- @property
157
- def cloud_id(self):
158
- """Gets the cloud_id of this CreateSessionInDb. # noqa: E501
159
-
160
- Cloud that the session will use. # noqa: E501
161
-
162
- :return: The cloud_id of this CreateSessionInDb. # noqa: E501
163
- :rtype: str
164
- """
165
- return self._cloud_id
166
-
167
- @cloud_id.setter
168
- def cloud_id(self, cloud_id):
169
- """Sets the cloud_id of this CreateSessionInDb.
170
-
171
- Cloud that the session will use. # noqa: E501
172
-
173
- :param cloud_id: The cloud_id of this CreateSessionInDb. # noqa: E501
174
- :type: str
175
- """
176
- if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
177
- raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
178
-
179
- self._cloud_id = cloud_id
180
-
181
- @property
182
- def cluster_config(self):
183
- """Gets the cluster_config of this CreateSessionInDb. # noqa: E501
184
-
185
- Cluster config that the session can later be started with. # noqa: E501
186
-
187
- :return: The cluster_config of this CreateSessionInDb. # noqa: E501
188
- :rtype: str
189
- """
190
- return self._cluster_config
191
-
192
- @cluster_config.setter
193
- def cluster_config(self, cluster_config):
194
- """Sets the cluster_config of this CreateSessionInDb.
195
-
196
- Cluster config that the session can later be started with. # noqa: E501
197
-
198
- :param cluster_config: The cluster_config of this CreateSessionInDb. # noqa: E501
199
- :type: str
200
- """
201
- if self.local_vars_configuration.client_side_validation and cluster_config is None: # noqa: E501
202
- raise ValueError("Invalid value for `cluster_config`, must not be `None`") # noqa: E501
203
-
204
- self._cluster_config = cluster_config
205
-
206
- @property
207
- def build_id(self):
208
- """Gets the build_id of this CreateSessionInDb. # noqa: E501
209
-
210
- ID of the Build that this session was started with. # noqa: E501
211
-
212
- :return: The build_id of this CreateSessionInDb. # noqa: E501
213
- :rtype: str
214
- """
215
- return self._build_id
216
-
217
- @build_id.setter
218
- def build_id(self, build_id):
219
- """Sets the build_id of this CreateSessionInDb.
220
-
221
- ID of the Build that this session was started with. # noqa: E501
222
-
223
- :param build_id: The build_id of this CreateSessionInDb. # noqa: E501
224
- :type: str
225
- """
226
-
227
- self._build_id = build_id
228
-
229
- @property
230
- def compute_template_id(self):
231
- """Gets the compute_template_id of this CreateSessionInDb. # noqa: E501
232
-
233
- ID of the compute template that this session was started with. # noqa: E501
234
-
235
- :return: The compute_template_id of this CreateSessionInDb. # noqa: E501
236
- :rtype: str
237
- """
238
- return self._compute_template_id
239
-
240
- @compute_template_id.setter
241
- def compute_template_id(self, compute_template_id):
242
- """Sets the compute_template_id of this CreateSessionInDb.
243
-
244
- ID of the compute template that this session was started with. # noqa: E501
245
-
246
- :param compute_template_id: The compute_template_id of this CreateSessionInDb. # noqa: E501
247
- :type: str
248
- """
249
-
250
- self._compute_template_id = compute_template_id
251
-
252
- @property
253
- def idle_timeout(self):
254
- """Gets the idle_timeout of this CreateSessionInDb. # noqa: E501
255
-
256
- Idle timeout (in minutes), after which the session is stopped. Idle time is defined as the time during which a session is not running a user command (through 'anyscale exec' or the Web UI), and does not have an attached driver. Time spent running Jupyter commands, or commands run through ssh, is still considered 'idle'. # noqa: E501
257
-
258
- :return: The idle_timeout of this CreateSessionInDb. # noqa: E501
259
- :rtype: int
260
- """
261
- return self._idle_timeout
262
-
263
- @idle_timeout.setter
264
- def idle_timeout(self, idle_timeout):
265
- """Sets the idle_timeout of this CreateSessionInDb.
266
-
267
- Idle timeout (in minutes), after which the session is stopped. Idle time is defined as the time during which a session is not running a user command (through 'anyscale exec' or the Web UI), and does not have an attached driver. Time spent running Jupyter commands, or commands run through ssh, is still considered 'idle'. # noqa: E501
268
-
269
- :param idle_timeout: The idle_timeout of this CreateSessionInDb. # noqa: E501
270
- :type: int
271
- """
272
-
273
- self._idle_timeout = idle_timeout
274
-
275
- @property
276
- def uses_app_config(self):
277
- """Gets the uses_app_config of this CreateSessionInDb. # noqa: E501
278
-
279
- Whether or not the session uses app config. If true, it means this is not a legacy session started with cluster yaml. # noqa: E501
280
-
281
- :return: The uses_app_config of this CreateSessionInDb. # noqa: E501
282
- :rtype: bool
283
- """
284
- return self._uses_app_config
285
-
286
- @uses_app_config.setter
287
- def uses_app_config(self, uses_app_config):
288
- """Sets the uses_app_config of this CreateSessionInDb.
289
-
290
- Whether or not the session uses app config. If true, it means this is not a legacy session started with cluster yaml. # noqa: E501
291
-
292
- :param uses_app_config: The uses_app_config of this CreateSessionInDb. # noqa: E501
293
- :type: bool
294
- """
295
-
296
- self._uses_app_config = uses_app_config
297
-
298
- @property
299
- def allow_public_internet_traffic(self):
300
- """Gets the allow_public_internet_traffic of this CreateSessionInDb. # noqa: E501
301
-
302
- Whether public internet traffic can access Serve endpoints or if an authentication token is required. # noqa: E501
303
-
304
- :return: The allow_public_internet_traffic of this CreateSessionInDb. # noqa: E501
305
- :rtype: bool
306
- """
307
- return self._allow_public_internet_traffic
308
-
309
- @allow_public_internet_traffic.setter
310
- def allow_public_internet_traffic(self, allow_public_internet_traffic):
311
- """Sets the allow_public_internet_traffic of this CreateSessionInDb.
312
-
313
- Whether public internet traffic can access Serve endpoints or if an authentication token is required. # noqa: E501
314
-
315
- :param allow_public_internet_traffic: The allow_public_internet_traffic of this CreateSessionInDb. # noqa: E501
316
- :type: bool
317
- """
318
-
319
- self._allow_public_internet_traffic = allow_public_internet_traffic
320
-
321
- @property
322
- def user_service_access(self):
323
- """Gets the user_service_access of this CreateSessionInDb. # noqa: E501
324
-
325
- Whether user service can be accessed by public internet traffic. # noqa: E501
326
-
327
- :return: The user_service_access of this CreateSessionInDb. # noqa: E501
328
- :rtype: UserServiceAccessTypes
329
- """
330
- return self._user_service_access
331
-
332
- @user_service_access.setter
333
- def user_service_access(self, user_service_access):
334
- """Sets the user_service_access of this CreateSessionInDb.
335
-
336
- Whether user service can be accessed by public internet traffic. # noqa: E501
337
-
338
- :param user_service_access: The user_service_access of this CreateSessionInDb. # noqa: E501
339
- :type: UserServiceAccessTypes
340
- """
341
-
342
- self._user_service_access = user_service_access
343
-
344
- @property
345
- def user_service_token(self):
346
- """Gets the user_service_token of this CreateSessionInDb. # noqa: E501
347
-
348
- User service token that is used to authenticate access to public user services. This must be a valid 32 byte URL safe string and can be generated by calling `secrets.token_urlsafe(32))`. This is ignored if the user service has private access. If not specified for a public user service, a token is autogenerated. # noqa: E501
349
-
350
- :return: The user_service_token of this CreateSessionInDb. # noqa: E501
351
- :rtype: str
352
- """
353
- return self._user_service_token
354
-
355
- @user_service_token.setter
356
- def user_service_token(self, user_service_token):
357
- """Sets the user_service_token of this CreateSessionInDb.
358
-
359
- User service token that is used to authenticate access to public user services. This must be a valid 32 byte URL safe string and can be generated by calling `secrets.token_urlsafe(32))`. This is ignored if the user service has private access. If not specified for a public user service, a token is autogenerated. # noqa: E501
360
-
361
- :param user_service_token: The user_service_token of this CreateSessionInDb. # noqa: E501
362
- :type: str
363
- """
364
-
365
- self._user_service_token = user_service_token
366
-
367
- @property
368
- def ha_job_id(self):
369
- """Gets the ha_job_id of this CreateSessionInDb. # noqa: E501
370
-
371
- This is used internally by Anyscale to associate clusters to a job. It is set automatically and should *not* be used directly. # noqa: E501
372
-
373
- :return: The ha_job_id of this CreateSessionInDb. # noqa: E501
374
- :rtype: str
375
- """
376
- return self._ha_job_id
377
-
378
- @ha_job_id.setter
379
- def ha_job_id(self, ha_job_id):
380
- """Sets the ha_job_id of this CreateSessionInDb.
381
-
382
- This is used internally by Anyscale to associate clusters to a job. It is set automatically and should *not* be used directly. # noqa: E501
383
-
384
- :param ha_job_id: The ha_job_id of this CreateSessionInDb. # noqa: E501
385
- :type: str
386
- """
387
-
388
- self._ha_job_id = ha_job_id
389
-
390
- def to_dict(self):
391
- """Returns the model properties as a dict"""
392
- result = {}
393
-
394
- for attr, _ in six.iteritems(self.openapi_types):
395
- value = getattr(self, attr)
396
- if isinstance(value, list):
397
- result[attr] = list(map(
398
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
399
- value
400
- ))
401
- elif hasattr(value, "to_dict"):
402
- result[attr] = value.to_dict()
403
- elif isinstance(value, dict):
404
- result[attr] = dict(map(
405
- lambda item: (item[0], item[1].to_dict())
406
- if hasattr(item[1], "to_dict") else item,
407
- value.items()
408
- ))
409
- else:
410
- result[attr] = value
411
-
412
- return result
413
-
414
- def to_str(self):
415
- """Returns the string representation of the model"""
416
- return pprint.pformat(self.to_dict())
417
-
418
- def __repr__(self):
419
- """For `print` and `pprint`"""
420
- return self.to_str()
421
-
422
- def __eq__(self, other):
423
- """Returns true if both objects are equal"""
424
- if not isinstance(other, CreateSessionInDb):
425
- return False
426
-
427
- return self.to_dict() == other.to_dict()
428
-
429
- def __ne__(self, other):
430
- """Returns true if both objects are not equal"""
431
- if not isinstance(other, CreateSessionInDb):
432
- return True
433
-
434
- return self.to_dict() != other.to_dict()
@@ -1,121 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class CreatesessionresponseResponse(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
- 'result': 'CreateSessionResponse'
37
- }
38
-
39
- attribute_map = {
40
- 'result': 'result'
41
- }
42
-
43
- def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
44
- """CreatesessionresponseResponse - 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._result = None
50
- self.discriminator = None
51
-
52
- self.result = result
53
-
54
- @property
55
- def result(self):
56
- """Gets the result of this CreatesessionresponseResponse. # noqa: E501
57
-
58
-
59
- :return: The result of this CreatesessionresponseResponse. # noqa: E501
60
- :rtype: CreateSessionResponse
61
- """
62
- return self._result
63
-
64
- @result.setter
65
- def result(self, result):
66
- """Sets the result of this CreatesessionresponseResponse.
67
-
68
-
69
- :param result: The result of this CreatesessionresponseResponse. # noqa: E501
70
- :type: CreateSessionResponse
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
-
77
- def to_dict(self):
78
- """Returns the model properties as a dict"""
79
- result = {}
80
-
81
- for attr, _ in six.iteritems(self.openapi_types):
82
- value = getattr(self, attr)
83
- if isinstance(value, list):
84
- result[attr] = list(map(
85
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86
- value
87
- ))
88
- elif hasattr(value, "to_dict"):
89
- result[attr] = value.to_dict()
90
- elif isinstance(value, dict):
91
- result[attr] = dict(map(
92
- lambda item: (item[0], item[1].to_dict())
93
- if hasattr(item[1], "to_dict") else item,
94
- value.items()
95
- ))
96
- else:
97
- result[attr] = value
98
-
99
- return result
100
-
101
- def to_str(self):
102
- """Returns the string representation of the model"""
103
- return pprint.pformat(self.to_dict())
104
-
105
- def __repr__(self):
106
- """For `print` and `pprint`"""
107
- return self.to_str()
108
-
109
- def __eq__(self, other):
110
- """Returns true if both objects are equal"""
111
- if not isinstance(other, CreatesessionresponseResponse):
112
- return False
113
-
114
- return self.to_dict() == other.to_dict()
115
-
116
- def __ne__(self, other):
117
- """Returns true if both objects are not equal"""
118
- if not isinstance(other, CreatesessionresponseResponse):
119
- return True
120
-
121
- return self.to_dict() != other.to_dict()
@@ -1,147 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class ExternalServiceStatus(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
- 'status_code': 'int',
37
- 'error_reason': 'str'
38
- }
39
-
40
- attribute_map = {
41
- 'status_code': 'status_code',
42
- 'error_reason': 'error_reason'
43
- }
44
-
45
- def __init__(self, status_code=None, error_reason=None, local_vars_configuration=None): # noqa: E501
46
- """ExternalServiceStatus - 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._status_code = None
52
- self._error_reason = None
53
- self.discriminator = None
54
-
55
- self.status_code = status_code
56
- if error_reason is not None:
57
- self.error_reason = error_reason
58
-
59
- @property
60
- def status_code(self):
61
- """Gets the status_code of this ExternalServiceStatus. # noqa: E501
62
-
63
-
64
- :return: The status_code of this ExternalServiceStatus. # noqa: E501
65
- :rtype: int
66
- """
67
- return self._status_code
68
-
69
- @status_code.setter
70
- def status_code(self, status_code):
71
- """Sets the status_code of this ExternalServiceStatus.
72
-
73
-
74
- :param status_code: The status_code of this ExternalServiceStatus. # noqa: E501
75
- :type: int
76
- """
77
- if self.local_vars_configuration.client_side_validation and status_code is None: # noqa: E501
78
- raise ValueError("Invalid value for `status_code`, must not be `None`") # noqa: E501
79
-
80
- self._status_code = status_code
81
-
82
- @property
83
- def error_reason(self):
84
- """Gets the error_reason of this ExternalServiceStatus. # noqa: E501
85
-
86
-
87
- :return: The error_reason of this ExternalServiceStatus. # noqa: E501
88
- :rtype: str
89
- """
90
- return self._error_reason
91
-
92
- @error_reason.setter
93
- def error_reason(self, error_reason):
94
- """Sets the error_reason of this ExternalServiceStatus.
95
-
96
-
97
- :param error_reason: The error_reason of this ExternalServiceStatus. # noqa: E501
98
- :type: str
99
- """
100
-
101
- self._error_reason = error_reason
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, ExternalServiceStatus):
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, ExternalServiceStatus):
145
- return True
146
-
147
- return self.to_dict() != other.to_dict()