anyscale 0.26.9__py3-none-any.whl → 0.26.11__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 (48) hide show
  1. anyscale/anyscale_halo/LICENSE +21 -0
  2. anyscale/anyscale_halo/README.md +1 -0
  3. anyscale/anyscale_halo/__init__.py +10 -0
  4. anyscale/anyscale_halo/_utils.py +148 -0
  5. anyscale/anyscale_halo/cursor.py +48 -0
  6. anyscale/anyscale_halo/halo.py +609 -0
  7. anyscale/anyscale_halo/halo_notebook.py +122 -0
  8. anyscale/cli_logger.py +1 -1
  9. anyscale/client/README.md +0 -35
  10. anyscale/client/openapi_client/__init__.py +0 -28
  11. anyscale/client/openapi_client/api/default_api.py +107 -878
  12. anyscale/client/openapi_client/models/__init__.py +0 -28
  13. anyscale/version.py +1 -1
  14. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/METADATA +5 -2
  15. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/RECORD +20 -41
  16. anyscale/client/openapi_client/models/card.py +0 -181
  17. anyscale/client/openapi_client/models/card_id.py +0 -108
  18. anyscale/client/openapi_client/models/card_list_response.py +0 -147
  19. anyscale/client/openapi_client/models/cluster_features.py +0 -152
  20. anyscale/client/openapi_client/models/clusterfeatures_response.py +0 -121
  21. anyscale/client/openapi_client/models/dismissal_type.py +0 -100
  22. anyscale/client/openapi_client/models/feature_compatibility.py +0 -152
  23. anyscale/client/openapi_client/models/onboarding_user_cards_query.py +0 -122
  24. anyscale/client/openapi_client/models/project_collaborators_put_message.py +0 -121
  25. anyscale/client/openapi_client/models/project_create_message.py +0 -148
  26. anyscale/client/openapi_client/models/project_delete_message.py +0 -121
  27. anyscale/client/openapi_client/models/project_patch_message.py +0 -121
  28. anyscale/client/openapi_client/models/session_autosync_sessions_update_message.py +0 -121
  29. anyscale/client/openapi_client/models/session_create_message.py +0 -148
  30. anyscale/client/openapi_client/models/session_delete_message.py +0 -121
  31. anyscale/client/openapi_client/models/session_execute_message.py +0 -121
  32. anyscale/client/openapi_client/models/session_finish_command_message.py +0 -175
  33. anyscale/client/openapi_client/models/session_kill_command_message.py +0 -121
  34. anyscale/client/openapi_client/models/session_patch_message.py +0 -121
  35. anyscale/client/openapi_client/models/session_state_change_message.py +0 -121
  36. anyscale/client/openapi_client/models/snapshot_create_message.py +0 -148
  37. anyscale/client/openapi_client/models/snapshot_delete_message.py +0 -148
  38. anyscale/client/openapi_client/models/snapshot_patch_message.py +0 -148
  39. anyscale/client/openapi_client/models/socket_message_schemas.py +0 -499
  40. anyscale/client/openapi_client/models/socket_message_types.py +0 -113
  41. anyscale/client/openapi_client/models/socketmessageschemas_response.py +0 -121
  42. anyscale/client/openapi_client/models/socketmessagetypes_response.py +0 -121
  43. anyscale/client/openapi_client/models/visibility.py +0 -100
  44. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/LICENSE +0 -0
  45. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/NOTICE +0 -0
  46. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/WHEEL +0 -0
  47. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/entry_points.txt +0 -0
  48. {anyscale-0.26.9.dist-info → anyscale-0.26.11.dist-info}/top_level.txt +0 -0
@@ -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 SessionAutosyncSessionsUpdateMessage(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
- 'session_id': 'str'
37
- }
38
-
39
- attribute_map = {
40
- 'session_id': 'session_id'
41
- }
42
-
43
- def __init__(self, session_id=None, local_vars_configuration=None): # noqa: E501
44
- """SessionAutosyncSessionsUpdateMessage - 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._session_id = None
50
- self.discriminator = None
51
-
52
- self.session_id = session_id
53
-
54
- @property
55
- def session_id(self):
56
- """Gets the session_id of this SessionAutosyncSessionsUpdateMessage. # noqa: E501
57
-
58
-
59
- :return: The session_id of this SessionAutosyncSessionsUpdateMessage. # noqa: E501
60
- :rtype: str
61
- """
62
- return self._session_id
63
-
64
- @session_id.setter
65
- def session_id(self, session_id):
66
- """Sets the session_id of this SessionAutosyncSessionsUpdateMessage.
67
-
68
-
69
- :param session_id: The session_id of this SessionAutosyncSessionsUpdateMessage. # noqa: E501
70
- :type: str
71
- """
72
- if self.local_vars_configuration.client_side_validation and session_id is None: # noqa: E501
73
- raise ValueError("Invalid value for `session_id`, must not be `None`") # noqa: E501
74
-
75
- self._session_id = session_id
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, SessionAutosyncSessionsUpdateMessage):
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, SessionAutosyncSessionsUpdateMessage):
119
- return True
120
-
121
- return self.to_dict() != other.to_dict()
@@ -1,148 +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 SessionCreateMessage(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
- 'session_id': 'str',
37
- 'project_id': 'str'
38
- }
39
-
40
- attribute_map = {
41
- 'session_id': 'session_id',
42
- 'project_id': 'project_id'
43
- }
44
-
45
- def __init__(self, session_id=None, project_id=None, local_vars_configuration=None): # noqa: E501
46
- """SessionCreateMessage - 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._session_id = None
52
- self._project_id = None
53
- self.discriminator = None
54
-
55
- self.session_id = session_id
56
- self.project_id = project_id
57
-
58
- @property
59
- def session_id(self):
60
- """Gets the session_id of this SessionCreateMessage. # noqa: E501
61
-
62
-
63
- :return: The session_id of this SessionCreateMessage. # noqa: E501
64
- :rtype: str
65
- """
66
- return self._session_id
67
-
68
- @session_id.setter
69
- def session_id(self, session_id):
70
- """Sets the session_id of this SessionCreateMessage.
71
-
72
-
73
- :param session_id: The session_id of this SessionCreateMessage. # noqa: E501
74
- :type: str
75
- """
76
- if self.local_vars_configuration.client_side_validation and session_id is None: # noqa: E501
77
- raise ValueError("Invalid value for `session_id`, must not be `None`") # noqa: E501
78
-
79
- self._session_id = session_id
80
-
81
- @property
82
- def project_id(self):
83
- """Gets the project_id of this SessionCreateMessage. # noqa: E501
84
-
85
-
86
- :return: The project_id of this SessionCreateMessage. # noqa: E501
87
- :rtype: str
88
- """
89
- return self._project_id
90
-
91
- @project_id.setter
92
- def project_id(self, project_id):
93
- """Sets the project_id of this SessionCreateMessage.
94
-
95
-
96
- :param project_id: The project_id of this SessionCreateMessage. # noqa: E501
97
- :type: str
98
- """
99
- if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
100
- raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
101
-
102
- self._project_id = project_id
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, SessionCreateMessage):
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, SessionCreateMessage):
146
- return True
147
-
148
- 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 SessionDeleteMessage(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
- 'session_id': 'str'
37
- }
38
-
39
- attribute_map = {
40
- 'session_id': 'session_id'
41
- }
42
-
43
- def __init__(self, session_id=None, local_vars_configuration=None): # noqa: E501
44
- """SessionDeleteMessage - 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._session_id = None
50
- self.discriminator = None
51
-
52
- self.session_id = session_id
53
-
54
- @property
55
- def session_id(self):
56
- """Gets the session_id of this SessionDeleteMessage. # noqa: E501
57
-
58
-
59
- :return: The session_id of this SessionDeleteMessage. # noqa: E501
60
- :rtype: str
61
- """
62
- return self._session_id
63
-
64
- @session_id.setter
65
- def session_id(self, session_id):
66
- """Sets the session_id of this SessionDeleteMessage.
67
-
68
-
69
- :param session_id: The session_id of this SessionDeleteMessage. # noqa: E501
70
- :type: str
71
- """
72
- if self.local_vars_configuration.client_side_validation and session_id is None: # noqa: E501
73
- raise ValueError("Invalid value for `session_id`, must not be `None`") # noqa: E501
74
-
75
- self._session_id = session_id
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, SessionDeleteMessage):
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, SessionDeleteMessage):
119
- return True
120
-
121
- 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 SessionExecuteMessage(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
- 'session_id': 'str'
37
- }
38
-
39
- attribute_map = {
40
- 'session_id': 'session_id'
41
- }
42
-
43
- def __init__(self, session_id=None, local_vars_configuration=None): # noqa: E501
44
- """SessionExecuteMessage - 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._session_id = None
50
- self.discriminator = None
51
-
52
- self.session_id = session_id
53
-
54
- @property
55
- def session_id(self):
56
- """Gets the session_id of this SessionExecuteMessage. # noqa: E501
57
-
58
-
59
- :return: The session_id of this SessionExecuteMessage. # noqa: E501
60
- :rtype: str
61
- """
62
- return self._session_id
63
-
64
- @session_id.setter
65
- def session_id(self, session_id):
66
- """Sets the session_id of this SessionExecuteMessage.
67
-
68
-
69
- :param session_id: The session_id of this SessionExecuteMessage. # noqa: E501
70
- :type: str
71
- """
72
- if self.local_vars_configuration.client_side_validation and session_id is None: # noqa: E501
73
- raise ValueError("Invalid value for `session_id`, must not be `None`") # noqa: E501
74
-
75
- self._session_id = session_id
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, SessionExecuteMessage):
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, SessionExecuteMessage):
119
- return True
120
-
121
- return self.to_dict() != other.to_dict()
@@ -1,175 +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 SessionFinishCommandMessage(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
- 'session_command_id': 'str',
37
- 'status_code': 'int',
38
- 'stop': 'bool'
39
- }
40
-
41
- attribute_map = {
42
- 'session_command_id': 'session_command_id',
43
- 'status_code': 'status_code',
44
- 'stop': 'stop'
45
- }
46
-
47
- def __init__(self, session_command_id=None, status_code=None, stop=None, local_vars_configuration=None): # noqa: E501
48
- """SessionFinishCommandMessage - 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._session_command_id = None
54
- self._status_code = None
55
- self._stop = None
56
- self.discriminator = None
57
-
58
- self.session_command_id = session_command_id
59
- self.status_code = status_code
60
- self.stop = stop
61
-
62
- @property
63
- def session_command_id(self):
64
- """Gets the session_command_id of this SessionFinishCommandMessage. # noqa: E501
65
-
66
-
67
- :return: The session_command_id of this SessionFinishCommandMessage. # noqa: E501
68
- :rtype: str
69
- """
70
- return self._session_command_id
71
-
72
- @session_command_id.setter
73
- def session_command_id(self, session_command_id):
74
- """Sets the session_command_id of this SessionFinishCommandMessage.
75
-
76
-
77
- :param session_command_id: The session_command_id of this SessionFinishCommandMessage. # noqa: E501
78
- :type: str
79
- """
80
- if self.local_vars_configuration.client_side_validation and session_command_id is None: # noqa: E501
81
- raise ValueError("Invalid value for `session_command_id`, must not be `None`") # noqa: E501
82
-
83
- self._session_command_id = session_command_id
84
-
85
- @property
86
- def status_code(self):
87
- """Gets the status_code of this SessionFinishCommandMessage. # noqa: E501
88
-
89
-
90
- :return: The status_code of this SessionFinishCommandMessage. # noqa: E501
91
- :rtype: int
92
- """
93
- return self._status_code
94
-
95
- @status_code.setter
96
- def status_code(self, status_code):
97
- """Sets the status_code of this SessionFinishCommandMessage.
98
-
99
-
100
- :param status_code: The status_code of this SessionFinishCommandMessage. # noqa: E501
101
- :type: int
102
- """
103
- if self.local_vars_configuration.client_side_validation and status_code is None: # noqa: E501
104
- raise ValueError("Invalid value for `status_code`, must not be `None`") # noqa: E501
105
-
106
- self._status_code = status_code
107
-
108
- @property
109
- def stop(self):
110
- """Gets the stop of this SessionFinishCommandMessage. # noqa: E501
111
-
112
-
113
- :return: The stop of this SessionFinishCommandMessage. # noqa: E501
114
- :rtype: bool
115
- """
116
- return self._stop
117
-
118
- @stop.setter
119
- def stop(self, stop):
120
- """Sets the stop of this SessionFinishCommandMessage.
121
-
122
-
123
- :param stop: The stop of this SessionFinishCommandMessage. # noqa: E501
124
- :type: bool
125
- """
126
- if self.local_vars_configuration.client_side_validation and stop is None: # noqa: E501
127
- raise ValueError("Invalid value for `stop`, must not be `None`") # noqa: E501
128
-
129
- self._stop = stop
130
-
131
- def to_dict(self):
132
- """Returns the model properties as a dict"""
133
- result = {}
134
-
135
- for attr, _ in six.iteritems(self.openapi_types):
136
- value = getattr(self, attr)
137
- if isinstance(value, list):
138
- result[attr] = list(map(
139
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
- value
141
- ))
142
- elif hasattr(value, "to_dict"):
143
- result[attr] = value.to_dict()
144
- elif isinstance(value, dict):
145
- result[attr] = dict(map(
146
- lambda item: (item[0], item[1].to_dict())
147
- if hasattr(item[1], "to_dict") else item,
148
- value.items()
149
- ))
150
- else:
151
- result[attr] = value
152
-
153
- return result
154
-
155
- def to_str(self):
156
- """Returns the string representation of the model"""
157
- return pprint.pformat(self.to_dict())
158
-
159
- def __repr__(self):
160
- """For `print` and `pprint`"""
161
- return self.to_str()
162
-
163
- def __eq__(self, other):
164
- """Returns true if both objects are equal"""
165
- if not isinstance(other, SessionFinishCommandMessage):
166
- return False
167
-
168
- return self.to_dict() == other.to_dict()
169
-
170
- def __ne__(self, other):
171
- """Returns true if both objects are not equal"""
172
- if not isinstance(other, SessionFinishCommandMessage):
173
- return True
174
-
175
- return self.to_dict() != other.to_dict()