huaweicloudsdkmrs 3.1.70__py2.py3-none-any.whl → 3.1.72__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- huaweicloudsdkmrs/v1/__init__.py +9 -0
- huaweicloudsdkmrs/v1/model/__init__.py +9 -0
- huaweicloudsdkmrs/v1/model/component_external_datasource.py +144 -0
- huaweicloudsdkmrs/v1/model/flavor_lists.py +173 -0
- huaweicloudsdkmrs/v1/model/node_constraint.py +376 -0
- huaweicloudsdkmrs/v1/model/node_constraints.py +315 -0
- huaweicloudsdkmrs/v1/model/role_deploy_meta.py +637 -0
- huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_request.py +143 -0
- huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_response.py +456 -0
- huaweicloudsdkmrs/v1/model/version_component.py +434 -0
- huaweicloudsdkmrs/v1/model/version_constraint.py +169 -0
- huaweicloudsdkmrs/v1/mrs_async_client.py +75 -0
- huaweicloudsdkmrs/v1/mrs_client.py +75 -0
- huaweicloudsdkmrs/v1/region/mrs_region.py +3 -0
- huaweicloudsdkmrs/v2/__init__.py +15 -0
- huaweicloudsdkmrs/v2/model/__init__.py +15 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_delete_req.py +142 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_info.py +257 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_v2.py +11 -12
- huaweicloudsdkmrs/v2/model/create_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/create_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/delete_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/delete_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/modify_default_tags_request_body.py +114 -0
- huaweicloudsdkmrs/v2/model/show_tag_quota_request.py +143 -0
- huaweicloudsdkmrs/v2/model/show_tag_quota_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_tag_status_request.py +114 -0
- huaweicloudsdkmrs/v2/model/show_tag_status_response.py +145 -0
- huaweicloudsdkmrs/v2/model/switch_cluster_tags_request.py +139 -0
- huaweicloudsdkmrs/v2/model/switch_cluster_tags_response.py +85 -0
- huaweicloudsdkmrs/v2/model/update_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/mrs_async_client.py +400 -0
- huaweicloudsdkmrs/v2/mrs_client.py +400 -0
- huaweicloudsdkmrs/v2/region/mrs_region.py +3 -0
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/METADATA +2 -2
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/RECORD +40 -16
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/LICENSE +0 -0
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/WHEEL +0 -0
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/top_level.txt +0 -0
huaweicloudsdkmrs/v1/__init__.py
CHANGED
@@ -22,6 +22,7 @@ from huaweicloudsdkmrs.v1.model.cluster_scaling_params import ClusterScalingPara
|
|
22
22
|
from huaweicloudsdkmrs.v1.model.cluster_scaling_req import ClusterScalingReq
|
23
23
|
from huaweicloudsdkmrs.v1.model.component_amb import ComponentAmb
|
24
24
|
from huaweicloudsdkmrs.v1.model.component_amb_v11 import ComponentAmbV11
|
25
|
+
from huaweicloudsdkmrs.v1.model.component_external_datasource import ComponentExternalDatasource
|
25
26
|
from huaweicloudsdkmrs.v1.model.create_and_execute_job_request import CreateAndExecuteJobRequest
|
26
27
|
from huaweicloudsdkmrs.v1.model.create_and_execute_job_response import CreateAndExecuteJobResponse
|
27
28
|
from huaweicloudsdkmrs.v1.model.create_cluster_req_v11 import CreateClusterReqV11
|
@@ -38,6 +39,7 @@ from huaweicloudsdkmrs.v1.model.delete_cluster_tag_request import DeleteClusterT
|
|
38
39
|
from huaweicloudsdkmrs.v1.model.delete_cluster_tag_response import DeleteClusterTagResponse
|
39
40
|
from huaweicloudsdkmrs.v1.model.delete_job_execution_request import DeleteJobExecutionRequest
|
40
41
|
from huaweicloudsdkmrs.v1.model.delete_job_execution_response import DeleteJobExecutionResponse
|
42
|
+
from huaweicloudsdkmrs.v1.model.flavor_lists import FlavorLists
|
41
43
|
from huaweicloudsdkmrs.v1.model.host_model import HostModel
|
42
44
|
from huaweicloudsdkmrs.v1.model.job_exe_result import JobExeResult
|
43
45
|
from huaweicloudsdkmrs.v1.model.list_all_tags_request import ListAllTagsRequest
|
@@ -57,15 +59,20 @@ from huaweicloudsdkmrs.v1.model.list_hosts_response import ListHostsResponse
|
|
57
59
|
from huaweicloudsdkmrs.v1.model.list_resource_req import ListResourceReq
|
58
60
|
from huaweicloudsdkmrs.v1.model.mrs_resource import MRSResource
|
59
61
|
from huaweicloudsdkmrs.v1.model.match import Match
|
62
|
+
from huaweicloudsdkmrs.v1.model.node_constraint import NodeConstraint
|
63
|
+
from huaweicloudsdkmrs.v1.model.node_constraints import NodeConstraints
|
60
64
|
from huaweicloudsdkmrs.v1.model.node_group_v10 import NodeGroupV10
|
61
65
|
from huaweicloudsdkmrs.v1.model.node_group_v11 import NodeGroupV11
|
62
66
|
from huaweicloudsdkmrs.v1.model.resources_plan import ResourcesPlan
|
67
|
+
from huaweicloudsdkmrs.v1.model.role_deploy_meta import RoleDeployMeta
|
63
68
|
from huaweicloudsdkmrs.v1.model.rule import Rule
|
64
69
|
from huaweicloudsdkmrs.v1.model.scale_script import ScaleScript
|
65
70
|
from huaweicloudsdkmrs.v1.model.show_cluster_details_request import ShowClusterDetailsRequest
|
66
71
|
from huaweicloudsdkmrs.v1.model.show_cluster_details_response import ShowClusterDetailsResponse
|
67
72
|
from huaweicloudsdkmrs.v1.model.show_job_exes_request import ShowJobExesRequest
|
68
73
|
from huaweicloudsdkmrs.v1.model.show_job_exes_response import ShowJobExesResponse
|
74
|
+
from huaweicloudsdkmrs.v1.model.show_mrs_version_metadata_request import ShowMrsVersionMetadataRequest
|
75
|
+
from huaweicloudsdkmrs.v1.model.show_mrs_version_metadata_response import ShowMrsVersionMetadataResponse
|
69
76
|
from huaweicloudsdkmrs.v1.model.submit_job_req_v11 import SubmitJobReqV11
|
70
77
|
from huaweicloudsdkmrs.v1.model.tag import Tag
|
71
78
|
from huaweicloudsdkmrs.v1.model.tag_plain import TagPlain
|
@@ -75,4 +82,6 @@ from huaweicloudsdkmrs.v1.model.task_node_info import TaskNodeInfo
|
|
75
82
|
from huaweicloudsdkmrs.v1.model.trigger import Trigger
|
76
83
|
from huaweicloudsdkmrs.v1.model.update_cluster_scaling_request import UpdateClusterScalingRequest
|
77
84
|
from huaweicloudsdkmrs.v1.model.update_cluster_scaling_response import UpdateClusterScalingResponse
|
85
|
+
from huaweicloudsdkmrs.v1.model.version_component import VersionComponent
|
86
|
+
from huaweicloudsdkmrs.v1.model.version_constraint import VersionConstraint
|
78
87
|
|
@@ -20,6 +20,7 @@ from huaweicloudsdkmrs.v1.model.cluster_scaling_params import ClusterScalingPara
|
|
20
20
|
from huaweicloudsdkmrs.v1.model.cluster_scaling_req import ClusterScalingReq
|
21
21
|
from huaweicloudsdkmrs.v1.model.component_amb import ComponentAmb
|
22
22
|
from huaweicloudsdkmrs.v1.model.component_amb_v11 import ComponentAmbV11
|
23
|
+
from huaweicloudsdkmrs.v1.model.component_external_datasource import ComponentExternalDatasource
|
23
24
|
from huaweicloudsdkmrs.v1.model.create_and_execute_job_request import CreateAndExecuteJobRequest
|
24
25
|
from huaweicloudsdkmrs.v1.model.create_and_execute_job_response import CreateAndExecuteJobResponse
|
25
26
|
from huaweicloudsdkmrs.v1.model.create_cluster_req_v11 import CreateClusterReqV11
|
@@ -36,6 +37,7 @@ from huaweicloudsdkmrs.v1.model.delete_cluster_tag_request import DeleteClusterT
|
|
36
37
|
from huaweicloudsdkmrs.v1.model.delete_cluster_tag_response import DeleteClusterTagResponse
|
37
38
|
from huaweicloudsdkmrs.v1.model.delete_job_execution_request import DeleteJobExecutionRequest
|
38
39
|
from huaweicloudsdkmrs.v1.model.delete_job_execution_response import DeleteJobExecutionResponse
|
40
|
+
from huaweicloudsdkmrs.v1.model.flavor_lists import FlavorLists
|
39
41
|
from huaweicloudsdkmrs.v1.model.host_model import HostModel
|
40
42
|
from huaweicloudsdkmrs.v1.model.job_exe_result import JobExeResult
|
41
43
|
from huaweicloudsdkmrs.v1.model.list_all_tags_request import ListAllTagsRequest
|
@@ -55,15 +57,20 @@ from huaweicloudsdkmrs.v1.model.list_hosts_response import ListHostsResponse
|
|
55
57
|
from huaweicloudsdkmrs.v1.model.list_resource_req import ListResourceReq
|
56
58
|
from huaweicloudsdkmrs.v1.model.mrs_resource import MRSResource
|
57
59
|
from huaweicloudsdkmrs.v1.model.match import Match
|
60
|
+
from huaweicloudsdkmrs.v1.model.node_constraint import NodeConstraint
|
61
|
+
from huaweicloudsdkmrs.v1.model.node_constraints import NodeConstraints
|
58
62
|
from huaweicloudsdkmrs.v1.model.node_group_v10 import NodeGroupV10
|
59
63
|
from huaweicloudsdkmrs.v1.model.node_group_v11 import NodeGroupV11
|
60
64
|
from huaweicloudsdkmrs.v1.model.resources_plan import ResourcesPlan
|
65
|
+
from huaweicloudsdkmrs.v1.model.role_deploy_meta import RoleDeployMeta
|
61
66
|
from huaweicloudsdkmrs.v1.model.rule import Rule
|
62
67
|
from huaweicloudsdkmrs.v1.model.scale_script import ScaleScript
|
63
68
|
from huaweicloudsdkmrs.v1.model.show_cluster_details_request import ShowClusterDetailsRequest
|
64
69
|
from huaweicloudsdkmrs.v1.model.show_cluster_details_response import ShowClusterDetailsResponse
|
65
70
|
from huaweicloudsdkmrs.v1.model.show_job_exes_request import ShowJobExesRequest
|
66
71
|
from huaweicloudsdkmrs.v1.model.show_job_exes_response import ShowJobExesResponse
|
72
|
+
from huaweicloudsdkmrs.v1.model.show_mrs_version_metadata_request import ShowMrsVersionMetadataRequest
|
73
|
+
from huaweicloudsdkmrs.v1.model.show_mrs_version_metadata_response import ShowMrsVersionMetadataResponse
|
67
74
|
from huaweicloudsdkmrs.v1.model.submit_job_req_v11 import SubmitJobReqV11
|
68
75
|
from huaweicloudsdkmrs.v1.model.tag import Tag
|
69
76
|
from huaweicloudsdkmrs.v1.model.tag_plain import TagPlain
|
@@ -73,3 +80,5 @@ from huaweicloudsdkmrs.v1.model.task_node_info import TaskNodeInfo
|
|
73
80
|
from huaweicloudsdkmrs.v1.model.trigger import Trigger
|
74
81
|
from huaweicloudsdkmrs.v1.model.update_cluster_scaling_request import UpdateClusterScalingRequest
|
75
82
|
from huaweicloudsdkmrs.v1.model.update_cluster_scaling_response import UpdateClusterScalingResponse
|
83
|
+
from huaweicloudsdkmrs.v1.model.version_component import VersionComponent
|
84
|
+
from huaweicloudsdkmrs.v1.model.version_constraint import VersionConstraint
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ComponentExternalDatasource:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'name': 'str',
|
21
|
+
'types': 'list[str]'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'name': 'name',
|
26
|
+
'types': 'types'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, name=None, types=None):
|
30
|
+
"""ComponentExternalDatasource
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param name: 外部数据源名称
|
35
|
+
:type name: str
|
36
|
+
:param types: 外部数据源类型
|
37
|
+
:type types: list[str]
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._name = None
|
43
|
+
self._types = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
if name is not None:
|
47
|
+
self.name = name
|
48
|
+
if types is not None:
|
49
|
+
self.types = types
|
50
|
+
|
51
|
+
@property
|
52
|
+
def name(self):
|
53
|
+
"""Gets the name of this ComponentExternalDatasource.
|
54
|
+
|
55
|
+
外部数据源名称
|
56
|
+
|
57
|
+
:return: The name of this ComponentExternalDatasource.
|
58
|
+
:rtype: str
|
59
|
+
"""
|
60
|
+
return self._name
|
61
|
+
|
62
|
+
@name.setter
|
63
|
+
def name(self, name):
|
64
|
+
"""Sets the name of this ComponentExternalDatasource.
|
65
|
+
|
66
|
+
外部数据源名称
|
67
|
+
|
68
|
+
:param name: The name of this ComponentExternalDatasource.
|
69
|
+
:type name: str
|
70
|
+
"""
|
71
|
+
self._name = name
|
72
|
+
|
73
|
+
@property
|
74
|
+
def types(self):
|
75
|
+
"""Gets the types of this ComponentExternalDatasource.
|
76
|
+
|
77
|
+
外部数据源类型
|
78
|
+
|
79
|
+
:return: The types of this ComponentExternalDatasource.
|
80
|
+
:rtype: list[str]
|
81
|
+
"""
|
82
|
+
return self._types
|
83
|
+
|
84
|
+
@types.setter
|
85
|
+
def types(self, types):
|
86
|
+
"""Sets the types of this ComponentExternalDatasource.
|
87
|
+
|
88
|
+
外部数据源类型
|
89
|
+
|
90
|
+
:param types: The types of this ComponentExternalDatasource.
|
91
|
+
:type types: list[str]
|
92
|
+
"""
|
93
|
+
self._types = types
|
94
|
+
|
95
|
+
def to_dict(self):
|
96
|
+
"""Returns the model properties as a dict"""
|
97
|
+
result = {}
|
98
|
+
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
100
|
+
value = getattr(self, attr)
|
101
|
+
if isinstance(value, list):
|
102
|
+
result[attr] = list(map(
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
104
|
+
value
|
105
|
+
))
|
106
|
+
elif hasattr(value, "to_dict"):
|
107
|
+
result[attr] = value.to_dict()
|
108
|
+
elif isinstance(value, dict):
|
109
|
+
result[attr] = dict(map(
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
112
|
+
value.items()
|
113
|
+
))
|
114
|
+
else:
|
115
|
+
if attr in self.sensitive_list:
|
116
|
+
result[attr] = "****"
|
117
|
+
else:
|
118
|
+
result[attr] = value
|
119
|
+
|
120
|
+
return result
|
121
|
+
|
122
|
+
def to_str(self):
|
123
|
+
"""Returns the string representation of the model"""
|
124
|
+
import simplejson as json
|
125
|
+
if six.PY2:
|
126
|
+
import sys
|
127
|
+
reload(sys)
|
128
|
+
sys.setdefaultencoding("utf-8")
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
130
|
+
|
131
|
+
def __repr__(self):
|
132
|
+
"""For `print`"""
|
133
|
+
return self.to_str()
|
134
|
+
|
135
|
+
def __eq__(self, other):
|
136
|
+
"""Returns true if both objects are equal"""
|
137
|
+
if not isinstance(other, ComponentExternalDatasource):
|
138
|
+
return False
|
139
|
+
|
140
|
+
return self.__dict__ == other.__dict__
|
141
|
+
|
142
|
+
def __ne__(self, other):
|
143
|
+
"""Returns true if both objects are not equal"""
|
144
|
+
return not self == other
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class FlavorLists:
|
9
|
+
|
10
|
+
"""
|
11
|
+
Attributes:
|
12
|
+
openapi_types (dict): The key is attribute name
|
13
|
+
and the value is attribute type.
|
14
|
+
attribute_map (dict): The key is attribute name
|
15
|
+
and the value is json key in definition.
|
16
|
+
"""
|
17
|
+
sensitive_list = []
|
18
|
+
|
19
|
+
openapi_types = {
|
20
|
+
'master': 'list[str]',
|
21
|
+
'core': 'list[str]',
|
22
|
+
'task': 'list[str]'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'master': 'master',
|
27
|
+
'core': 'core',
|
28
|
+
'task': 'task'
|
29
|
+
}
|
30
|
+
|
31
|
+
def __init__(self, master=None, core=None, task=None):
|
32
|
+
"""FlavorLists
|
33
|
+
|
34
|
+
The model defined in huaweicloud sdk
|
35
|
+
|
36
|
+
:param master: master节点支持的规格列表
|
37
|
+
:type master: list[str]
|
38
|
+
:param core: core节点支持的规格列表
|
39
|
+
:type core: list[str]
|
40
|
+
:param task: task节点支持的规格列表
|
41
|
+
:type task: list[str]
|
42
|
+
"""
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
self._master = None
|
47
|
+
self._core = None
|
48
|
+
self._task = None
|
49
|
+
self.discriminator = None
|
50
|
+
|
51
|
+
if master is not None:
|
52
|
+
self.master = master
|
53
|
+
if core is not None:
|
54
|
+
self.core = core
|
55
|
+
if task is not None:
|
56
|
+
self.task = task
|
57
|
+
|
58
|
+
@property
|
59
|
+
def master(self):
|
60
|
+
"""Gets the master of this FlavorLists.
|
61
|
+
|
62
|
+
master节点支持的规格列表
|
63
|
+
|
64
|
+
:return: The master of this FlavorLists.
|
65
|
+
:rtype: list[str]
|
66
|
+
"""
|
67
|
+
return self._master
|
68
|
+
|
69
|
+
@master.setter
|
70
|
+
def master(self, master):
|
71
|
+
"""Sets the master of this FlavorLists.
|
72
|
+
|
73
|
+
master节点支持的规格列表
|
74
|
+
|
75
|
+
:param master: The master of this FlavorLists.
|
76
|
+
:type master: list[str]
|
77
|
+
"""
|
78
|
+
self._master = master
|
79
|
+
|
80
|
+
@property
|
81
|
+
def core(self):
|
82
|
+
"""Gets the core of this FlavorLists.
|
83
|
+
|
84
|
+
core节点支持的规格列表
|
85
|
+
|
86
|
+
:return: The core of this FlavorLists.
|
87
|
+
:rtype: list[str]
|
88
|
+
"""
|
89
|
+
return self._core
|
90
|
+
|
91
|
+
@core.setter
|
92
|
+
def core(self, core):
|
93
|
+
"""Sets the core of this FlavorLists.
|
94
|
+
|
95
|
+
core节点支持的规格列表
|
96
|
+
|
97
|
+
:param core: The core of this FlavorLists.
|
98
|
+
:type core: list[str]
|
99
|
+
"""
|
100
|
+
self._core = core
|
101
|
+
|
102
|
+
@property
|
103
|
+
def task(self):
|
104
|
+
"""Gets the task of this FlavorLists.
|
105
|
+
|
106
|
+
task节点支持的规格列表
|
107
|
+
|
108
|
+
:return: The task of this FlavorLists.
|
109
|
+
:rtype: list[str]
|
110
|
+
"""
|
111
|
+
return self._task
|
112
|
+
|
113
|
+
@task.setter
|
114
|
+
def task(self, task):
|
115
|
+
"""Sets the task of this FlavorLists.
|
116
|
+
|
117
|
+
task节点支持的规格列表
|
118
|
+
|
119
|
+
:param task: The task of this FlavorLists.
|
120
|
+
:type task: list[str]
|
121
|
+
"""
|
122
|
+
self._task = task
|
123
|
+
|
124
|
+
def to_dict(self):
|
125
|
+
"""Returns the model properties as a dict"""
|
126
|
+
result = {}
|
127
|
+
|
128
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
129
|
+
value = getattr(self, attr)
|
130
|
+
if isinstance(value, list):
|
131
|
+
result[attr] = list(map(
|
132
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
133
|
+
value
|
134
|
+
))
|
135
|
+
elif hasattr(value, "to_dict"):
|
136
|
+
result[attr] = value.to_dict()
|
137
|
+
elif isinstance(value, dict):
|
138
|
+
result[attr] = dict(map(
|
139
|
+
lambda item: (item[0], item[1].to_dict())
|
140
|
+
if hasattr(item[1], "to_dict") else item,
|
141
|
+
value.items()
|
142
|
+
))
|
143
|
+
else:
|
144
|
+
if attr in self.sensitive_list:
|
145
|
+
result[attr] = "****"
|
146
|
+
else:
|
147
|
+
result[attr] = value
|
148
|
+
|
149
|
+
return result
|
150
|
+
|
151
|
+
def to_str(self):
|
152
|
+
"""Returns the string representation of the model"""
|
153
|
+
import simplejson as json
|
154
|
+
if six.PY2:
|
155
|
+
import sys
|
156
|
+
reload(sys)
|
157
|
+
sys.setdefaultencoding("utf-8")
|
158
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
159
|
+
|
160
|
+
def __repr__(self):
|
161
|
+
"""For `print`"""
|
162
|
+
return self.to_str()
|
163
|
+
|
164
|
+
def __eq__(self, other):
|
165
|
+
"""Returns true if both objects are equal"""
|
166
|
+
if not isinstance(other, FlavorLists):
|
167
|
+
return False
|
168
|
+
|
169
|
+
return self.__dict__ == other.__dict__
|
170
|
+
|
171
|
+
def __ne__(self, other):
|
172
|
+
"""Returns true if both objects are not equal"""
|
173
|
+
return not self == other
|