anyscale 0.26.17__py3-none-any.whl → 0.26.19__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 (49) hide show
  1. anyscale/_private/docgen/models.md +2 -2
  2. anyscale/anyscale-cloud-setup.yaml +0 -4
  3. anyscale/client/README.md +12 -37
  4. anyscale/client/openapi_client/__init__.py +11 -20
  5. anyscale/client/openapi_client/api/default_api.py +115 -2004
  6. anyscale/client/openapi_client/models/__init__.py +11 -20
  7. anyscale/client/openapi_client/models/aws_config.py +402 -0
  8. anyscale/client/openapi_client/models/baseimagesenum.py +68 -1
  9. anyscale/client/openapi_client/models/cloud_deployment.py +397 -0
  10. anyscale/client/openapi_client/models/{webterminal_list_response.py → clouddeployment_list_response.py} +15 -15
  11. anyscale/client/openapi_client/models/file_storage.py +206 -0
  12. anyscale/client/openapi_client/models/gcp_config.py +402 -0
  13. anyscale/client/openapi_client/models/kubernetes_config.py +150 -0
  14. anyscale/client/openapi_client/models/{monitor_logs_extension.py → networking_mode.py} +7 -7
  15. anyscale/client/openapi_client/models/object_storage.py +178 -0
  16. anyscale/client/openapi_client/models/{sessiondetails_response.py → pcp_config.py} +23 -22
  17. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +68 -1
  18. anyscale/client/openapi_client/models/workspace_template_readme.py +181 -0
  19. anyscale/client/openapi_client/models/{archivedlogsinfo_response.py → workspacetemplatereadme_response.py} +11 -11
  20. anyscale/commands/cloud_commands.py +55 -7
  21. anyscale/connect_utils/prepare_cluster.py +19 -14
  22. anyscale/controllers/cloud_controller.py +60 -3
  23. anyscale/sdk/anyscale_client/models/baseimagesenum.py +68 -1
  24. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +68 -1
  25. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  26. anyscale/version.py +1 -1
  27. {anyscale-0.26.17.dist-info → anyscale-0.26.19.dist-info}/METADATA +1 -1
  28. {anyscale-0.26.17.dist-info → anyscale-0.26.19.dist-info}/RECORD +33 -42
  29. anyscale/client/openapi_client/models/archived_logs_info.py +0 -164
  30. anyscale/client/openapi_client/models/create_experimental_workspace_from_job.py +0 -123
  31. anyscale/client/openapi_client/models/create_session_from_snapshot_options.py +0 -538
  32. anyscale/client/openapi_client/models/create_session_in_db.py +0 -434
  33. anyscale/client/openapi_client/models/create_session_response.py +0 -174
  34. anyscale/client/openapi_client/models/createsessionresponse_response.py +0 -121
  35. anyscale/client/openapi_client/models/external_service_status.py +0 -147
  36. anyscale/client/openapi_client/models/external_service_status_response.py +0 -250
  37. anyscale/client/openapi_client/models/externalservicestatusresponse_response.py +0 -121
  38. anyscale/client/openapi_client/models/session_describe.py +0 -175
  39. anyscale/client/openapi_client/models/session_details.py +0 -148
  40. anyscale/client/openapi_client/models/session_history_item.py +0 -146
  41. anyscale/client/openapi_client/models/sessiondescribe_response.py +0 -121
  42. anyscale/client/openapi_client/models/sessionhistoryitem_list_response.py +0 -147
  43. anyscale/client/openapi_client/models/update_compute_template.py +0 -146
  44. anyscale/client/openapi_client/models/update_compute_template_config.py +0 -464
  45. {anyscale-0.26.17.dist-info → anyscale-0.26.19.dist-info}/LICENSE +0 -0
  46. {anyscale-0.26.17.dist-info → anyscale-0.26.19.dist-info}/NOTICE +0 -0
  47. {anyscale-0.26.17.dist-info → anyscale-0.26.19.dist-info}/WHEEL +0 -0
  48. {anyscale-0.26.17.dist-info → anyscale-0.26.19.dist-info}/entry_points.txt +0 -0
  49. {anyscale-0.26.17.dist-info → anyscale-0.26.19.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,174 +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 CreateSessionResponse(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
- 'startup_succeded': 'bool',
38
- 'project_id': 'str'
39
- }
40
-
41
- attribute_map = {
42
- 'id': 'id',
43
- 'startup_succeded': 'startup_succeded',
44
- 'project_id': 'project_id'
45
- }
46
-
47
- def __init__(self, id=None, startup_succeded=True, project_id=None, local_vars_configuration=None): # noqa: E501
48
- """CreateSessionResponse - 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._id = None
54
- self._startup_succeded = None
55
- self._project_id = None
56
- self.discriminator = None
57
-
58
- self.id = id
59
- if startup_succeded is not None:
60
- self.startup_succeded = startup_succeded
61
- self.project_id = project_id
62
-
63
- @property
64
- def id(self):
65
- """Gets the id of this CreateSessionResponse. # noqa: E501
66
-
67
-
68
- :return: The id of this CreateSessionResponse. # noqa: E501
69
- :rtype: str
70
- """
71
- return self._id
72
-
73
- @id.setter
74
- def id(self, id):
75
- """Sets the id of this CreateSessionResponse.
76
-
77
-
78
- :param id: The id of this CreateSessionResponse. # noqa: E501
79
- :type: str
80
- """
81
- if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
82
- raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
83
-
84
- self._id = id
85
-
86
- @property
87
- def startup_succeded(self):
88
- """Gets the startup_succeded of this CreateSessionResponse. # noqa: E501
89
-
90
-
91
- :return: The startup_succeded of this CreateSessionResponse. # noqa: E501
92
- :rtype: bool
93
- """
94
- return self._startup_succeded
95
-
96
- @startup_succeded.setter
97
- def startup_succeded(self, startup_succeded):
98
- """Sets the startup_succeded of this CreateSessionResponse.
99
-
100
-
101
- :param startup_succeded: The startup_succeded of this CreateSessionResponse. # noqa: E501
102
- :type: bool
103
- """
104
-
105
- self._startup_succeded = startup_succeded
106
-
107
- @property
108
- def project_id(self):
109
- """Gets the project_id of this CreateSessionResponse. # noqa: E501
110
-
111
-
112
- :return: The project_id of this CreateSessionResponse. # noqa: E501
113
- :rtype: str
114
- """
115
- return self._project_id
116
-
117
- @project_id.setter
118
- def project_id(self, project_id):
119
- """Sets the project_id of this CreateSessionResponse.
120
-
121
-
122
- :param project_id: The project_id of this CreateSessionResponse. # noqa: E501
123
- :type: str
124
- """
125
- if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
126
- raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
127
-
128
- self._project_id = project_id
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, CreateSessionResponse):
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, CreateSessionResponse):
172
- return True
173
-
174
- return self.to_dict() != other.to_dict()