huaweicloudsdkeihealth 3.1.107__py2.py3-none-any.whl → 3.1.109__py2.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 (57) hide show
  1. huaweicloudsdkeihealth/v1/__init__.py +31 -0
  2. huaweicloudsdkeihealth/v1/eihealth_async_client.py +543 -0
  3. huaweicloudsdkeihealth/v1/eihealth_client.py +543 -0
  4. huaweicloudsdkeihealth/v1/model/__init__.py +31 -0
  5. huaweicloudsdkeihealth/v1/model/base_model.py +142 -0
  6. huaweicloudsdkeihealth/v1/model/base_model_dto.py +231 -0
  7. huaweicloudsdkeihealth/v1/model/bind_site_dto.py +3 -3
  8. huaweicloudsdkeihealth/v1/model/cpi_receptor.py +226 -0
  9. huaweicloudsdkeihealth/v1/model/create_admet_job_req.py +61 -3
  10. huaweicloudsdkeihealth/v1/model/create_cpi_job_req.py +166 -0
  11. huaweicloudsdkeihealth/v1/model/create_cpi_job_request.py +139 -0
  12. huaweicloudsdkeihealth/v1/model/create_cpi_job_response.py +145 -0
  13. huaweicloudsdkeihealth/v1/model/create_dock_job_req.py +32 -3
  14. huaweicloudsdkeihealth/v1/model/create_drug_ligand_interaction2d_svg_req.py +32 -3
  15. huaweicloudsdkeihealth/v1/model/create_gen_job_req.py +338 -0
  16. huaweicloudsdkeihealth/v1/model/create_gen_job_request.py +139 -0
  17. huaweicloudsdkeihealth/v1/model/create_gen_job_response.py +145 -0
  18. huaweicloudsdkeihealth/v1/model/create_ligand_preview_task_req.py +32 -3
  19. huaweicloudsdkeihealth/v1/model/create_model_req.py +32 -3
  20. huaweicloudsdkeihealth/v1/model/create_optm_job_req.py +30 -1
  21. huaweicloudsdkeihealth/v1/model/create_target_opt_job_req.py +184 -0
  22. huaweicloudsdkeihealth/v1/model/create_target_opt_job_request.py +139 -0
  23. huaweicloudsdkeihealth/v1/model/create_target_opt_job_response.py +145 -0
  24. huaweicloudsdkeihealth/v1/model/fasta_receptor.py +197 -0
  25. huaweicloudsdkeihealth/v1/model/interaction.py +166 -0
  26. huaweicloudsdkeihealth/v1/model/interaction_constraint_dto.py +167 -0
  27. huaweicloudsdkeihealth/v1/model/interaction_type.py +91 -0
  28. huaweicloudsdkeihealth/v1/model/list_base_model_request.py +202 -0
  29. huaweicloudsdkeihealth/v1/model/list_base_model_response.py +145 -0
  30. huaweicloudsdkeihealth/v1/model/list_drug_model_request.py +35 -6
  31. huaweicloudsdkeihealth/v1/model/md_param.py +169 -0
  32. huaweicloudsdkeihealth/v1/model/md_step_param.py +202 -0
  33. huaweicloudsdkeihealth/v1/model/model_dto.py +61 -3
  34. huaweicloudsdkeihealth/v1/model/pocket_fragment.py +30 -1
  35. huaweicloudsdkeihealth/v1/model/run_fasta_preprocess_req.py +168 -0
  36. huaweicloudsdkeihealth/v1/model/run_fasta_preprocess_request.py +139 -0
  37. huaweicloudsdkeihealth/v1/model/run_fasta_preprocess_response.py +145 -0
  38. huaweicloudsdkeihealth/v1/model/show_admet_job_response.py +57 -3
  39. huaweicloudsdkeihealth/v1/model/show_cpi_job_request.py +142 -0
  40. huaweicloudsdkeihealth/v1/model/show_cpi_job_response.py +170 -0
  41. huaweicloudsdkeihealth/v1/model/show_docking_job_response.py +30 -1
  42. huaweicloudsdkeihealth/v1/model/show_gen_job_request.py +142 -0
  43. huaweicloudsdkeihealth/v1/model/show_gen_job_response.py +365 -0
  44. huaweicloudsdkeihealth/v1/model/show_optm_job_response.py +26 -1
  45. huaweicloudsdkeihealth/v1/model/show_target_opt_job_request.py +142 -0
  46. huaweicloudsdkeihealth/v1/model/show_target_opt_job_response.py +187 -0
  47. huaweicloudsdkeihealth/v1/model/strong_constraint_dto.py +28 -3
  48. huaweicloudsdkeihealth/v1/model/strong_constraint_type.py +1 -0
  49. huaweicloudsdkeihealth/v1/model/target_opt_ligand.py +139 -0
  50. huaweicloudsdkeihealth/v1/model/target_opt_receptor.py +255 -0
  51. huaweicloudsdkeihealth/v1/model/weak_constraint_dto.py +28 -3
  52. huaweicloudsdkeihealth/v1/model/weak_constraint_type.py +1 -0
  53. {huaweicloudsdkeihealth-3.1.107.dist-info → huaweicloudsdkeihealth-3.1.109.dist-info}/METADATA +2 -2
  54. {huaweicloudsdkeihealth-3.1.107.dist-info → huaweicloudsdkeihealth-3.1.109.dist-info}/RECORD +57 -26
  55. {huaweicloudsdkeihealth-3.1.107.dist-info → huaweicloudsdkeihealth-3.1.109.dist-info}/WHEEL +1 -1
  56. {huaweicloudsdkeihealth-3.1.107.dist-info → huaweicloudsdkeihealth-3.1.109.dist-info}/LICENSE +0 -0
  57. {huaweicloudsdkeihealth-3.1.107.dist-info → huaweicloudsdkeihealth-3.1.109.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,139 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateTargetOptJobRequest:
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
+ 'eihealth_project_id': 'str',
21
+ 'body': 'CreateTargetOptJobReq'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'eihealth_project_id': 'eihealth_project_id',
26
+ 'body': 'body'
27
+ }
28
+
29
+ def __init__(self, eihealth_project_id=None, body=None):
30
+ """CreateTargetOptJobRequest
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param eihealth_project_id: 平台项目ID。
35
+ :type eihealth_project_id: str
36
+ :param body: Body of the CreateTargetOptJobRequest
37
+ :type body: :class:`huaweicloudsdkeihealth.v1.CreateTargetOptJobReq`
38
+ """
39
+
40
+
41
+
42
+ self._eihealth_project_id = None
43
+ self._body = None
44
+ self.discriminator = None
45
+
46
+ self.eihealth_project_id = eihealth_project_id
47
+ if body is not None:
48
+ self.body = body
49
+
50
+ @property
51
+ def eihealth_project_id(self):
52
+ """Gets the eihealth_project_id of this CreateTargetOptJobRequest.
53
+
54
+ 平台项目ID。
55
+
56
+ :return: The eihealth_project_id of this CreateTargetOptJobRequest.
57
+ :rtype: str
58
+ """
59
+ return self._eihealth_project_id
60
+
61
+ @eihealth_project_id.setter
62
+ def eihealth_project_id(self, eihealth_project_id):
63
+ """Sets the eihealth_project_id of this CreateTargetOptJobRequest.
64
+
65
+ 平台项目ID。
66
+
67
+ :param eihealth_project_id: The eihealth_project_id of this CreateTargetOptJobRequest.
68
+ :type eihealth_project_id: str
69
+ """
70
+ self._eihealth_project_id = eihealth_project_id
71
+
72
+ @property
73
+ def body(self):
74
+ """Gets the body of this CreateTargetOptJobRequest.
75
+
76
+ :return: The body of this CreateTargetOptJobRequest.
77
+ :rtype: :class:`huaweicloudsdkeihealth.v1.CreateTargetOptJobReq`
78
+ """
79
+ return self._body
80
+
81
+ @body.setter
82
+ def body(self, body):
83
+ """Sets the body of this CreateTargetOptJobRequest.
84
+
85
+ :param body: The body of this CreateTargetOptJobRequest.
86
+ :type body: :class:`huaweicloudsdkeihealth.v1.CreateTargetOptJobReq`
87
+ """
88
+ self._body = body
89
+
90
+ def to_dict(self):
91
+ """Returns the model properties as a dict"""
92
+ result = {}
93
+
94
+ for attr, _ in six.iteritems(self.openapi_types):
95
+ value = getattr(self, attr)
96
+ if isinstance(value, list):
97
+ result[attr] = list(map(
98
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
99
+ value
100
+ ))
101
+ elif hasattr(value, "to_dict"):
102
+ result[attr] = value.to_dict()
103
+ elif isinstance(value, dict):
104
+ result[attr] = dict(map(
105
+ lambda item: (item[0], item[1].to_dict())
106
+ if hasattr(item[1], "to_dict") else item,
107
+ value.items()
108
+ ))
109
+ else:
110
+ if attr in self.sensitive_list:
111
+ result[attr] = "****"
112
+ else:
113
+ result[attr] = value
114
+
115
+ return result
116
+
117
+ def to_str(self):
118
+ """Returns the string representation of the model"""
119
+ import simplejson as json
120
+ if six.PY2:
121
+ import sys
122
+ reload(sys)
123
+ sys.setdefaultencoding("utf-8")
124
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
125
+
126
+ def __repr__(self):
127
+ """For `print`"""
128
+ return self.to_str()
129
+
130
+ def __eq__(self, other):
131
+ """Returns true if both objects are equal"""
132
+ if not isinstance(other, CreateTargetOptJobRequest):
133
+ return False
134
+
135
+ return self.__dict__ == other.__dict__
136
+
137
+ def __ne__(self, other):
138
+ """Returns true if both objects are not equal"""
139
+ return not self == other
@@ -0,0 +1,145 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.sdk_response import SdkResponse
6
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
7
+
8
+
9
+ class CreateTargetOptJobResponse(SdkResponse):
10
+
11
+ """
12
+ Attributes:
13
+ openapi_types (dict): The key is attribute name
14
+ and the value is attribute type.
15
+ attribute_map (dict): The key is attribute name
16
+ and the value is json key in definition.
17
+ """
18
+ sensitive_list = []
19
+
20
+ openapi_types = {
21
+ 'id': 'str',
22
+ 'limit_concurrency': 'int'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'id': 'id',
27
+ 'limit_concurrency': 'limit_concurrency'
28
+ }
29
+
30
+ def __init__(self, id=None, limit_concurrency=None):
31
+ """CreateTargetOptJobResponse
32
+
33
+ The model defined in huaweicloud sdk
34
+
35
+ :param id: 作业id
36
+ :type id: str
37
+ :param limit_concurrency: 限制的并发量
38
+ :type limit_concurrency: int
39
+ """
40
+
41
+ super(CreateTargetOptJobResponse, self).__init__()
42
+
43
+ self._id = None
44
+ self._limit_concurrency = None
45
+ self.discriminator = None
46
+
47
+ if id is not None:
48
+ self.id = id
49
+ if limit_concurrency is not None:
50
+ self.limit_concurrency = limit_concurrency
51
+
52
+ @property
53
+ def id(self):
54
+ """Gets the id of this CreateTargetOptJobResponse.
55
+
56
+ 作业id
57
+
58
+ :return: The id of this CreateTargetOptJobResponse.
59
+ :rtype: str
60
+ """
61
+ return self._id
62
+
63
+ @id.setter
64
+ def id(self, id):
65
+ """Sets the id of this CreateTargetOptJobResponse.
66
+
67
+ 作业id
68
+
69
+ :param id: The id of this CreateTargetOptJobResponse.
70
+ :type id: str
71
+ """
72
+ self._id = id
73
+
74
+ @property
75
+ def limit_concurrency(self):
76
+ """Gets the limit_concurrency of this CreateTargetOptJobResponse.
77
+
78
+ 限制的并发量
79
+
80
+ :return: The limit_concurrency of this CreateTargetOptJobResponse.
81
+ :rtype: int
82
+ """
83
+ return self._limit_concurrency
84
+
85
+ @limit_concurrency.setter
86
+ def limit_concurrency(self, limit_concurrency):
87
+ """Sets the limit_concurrency of this CreateTargetOptJobResponse.
88
+
89
+ 限制的并发量
90
+
91
+ :param limit_concurrency: The limit_concurrency of this CreateTargetOptJobResponse.
92
+ :type limit_concurrency: int
93
+ """
94
+ self._limit_concurrency = limit_concurrency
95
+
96
+ def to_dict(self):
97
+ """Returns the model properties as a dict"""
98
+ result = {}
99
+
100
+ for attr, _ in six.iteritems(self.openapi_types):
101
+ value = getattr(self, attr)
102
+ if isinstance(value, list):
103
+ result[attr] = list(map(
104
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
105
+ value
106
+ ))
107
+ elif hasattr(value, "to_dict"):
108
+ result[attr] = value.to_dict()
109
+ elif isinstance(value, dict):
110
+ result[attr] = dict(map(
111
+ lambda item: (item[0], item[1].to_dict())
112
+ if hasattr(item[1], "to_dict") else item,
113
+ value.items()
114
+ ))
115
+ else:
116
+ if attr in self.sensitive_list:
117
+ result[attr] = "****"
118
+ else:
119
+ result[attr] = value
120
+
121
+ return result
122
+
123
+ def to_str(self):
124
+ """Returns the string representation of the model"""
125
+ import simplejson as json
126
+ if six.PY2:
127
+ import sys
128
+ reload(sys)
129
+ sys.setdefaultencoding("utf-8")
130
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
131
+
132
+ def __repr__(self):
133
+ """For `print`"""
134
+ return self.to_str()
135
+
136
+ def __eq__(self, other):
137
+ """Returns true if both objects are equal"""
138
+ if not isinstance(other, CreateTargetOptJobResponse):
139
+ return False
140
+
141
+ return self.__dict__ == other.__dict__
142
+
143
+ def __ne__(self, other):
144
+ """Returns true if both objects are not equal"""
145
+ return not self == other
@@ -0,0 +1,197 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class FastaReceptor:
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
+ 'source': 'DrugFileSource',
21
+ 'url': 'str',
22
+ 'format': 'str',
23
+ 'data': 'str'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'source': 'source',
28
+ 'url': 'url',
29
+ 'format': 'format',
30
+ 'data': 'data'
31
+ }
32
+
33
+ def __init__(self, source=None, url=None, format=None, data=None):
34
+ """FastaReceptor
35
+
36
+ The model defined in huaweicloud sdk
37
+
38
+ :param source:
39
+ :type source: :class:`huaweicloudsdkeihealth.v1.DrugFileSource`
40
+ :param url: 文件URL,当数据源为外部网络数据时为https地址;用户私有数据中心为项目路径、公共数据场景为obs地址
41
+ :type url: str
42
+ :param format: 文件格式,仅支持FASTA,仅数据源为RAW时提供
43
+ :type format: str
44
+ :param data: 文件原始数据,仅数据源为RAW时提供
45
+ :type data: str
46
+ """
47
+
48
+
49
+
50
+ self._source = None
51
+ self._url = None
52
+ self._format = None
53
+ self._data = None
54
+ self.discriminator = None
55
+
56
+ self.source = source
57
+ if url is not None:
58
+ self.url = url
59
+ if format is not None:
60
+ self.format = format
61
+ if data is not None:
62
+ self.data = data
63
+
64
+ @property
65
+ def source(self):
66
+ """Gets the source of this FastaReceptor.
67
+
68
+ :return: The source of this FastaReceptor.
69
+ :rtype: :class:`huaweicloudsdkeihealth.v1.DrugFileSource`
70
+ """
71
+ return self._source
72
+
73
+ @source.setter
74
+ def source(self, source):
75
+ """Sets the source of this FastaReceptor.
76
+
77
+ :param source: The source of this FastaReceptor.
78
+ :type source: :class:`huaweicloudsdkeihealth.v1.DrugFileSource`
79
+ """
80
+ self._source = source
81
+
82
+ @property
83
+ def url(self):
84
+ """Gets the url of this FastaReceptor.
85
+
86
+ 文件URL,当数据源为外部网络数据时为https地址;用户私有数据中心为项目路径、公共数据场景为obs地址
87
+
88
+ :return: The url of this FastaReceptor.
89
+ :rtype: str
90
+ """
91
+ return self._url
92
+
93
+ @url.setter
94
+ def url(self, url):
95
+ """Sets the url of this FastaReceptor.
96
+
97
+ 文件URL,当数据源为外部网络数据时为https地址;用户私有数据中心为项目路径、公共数据场景为obs地址
98
+
99
+ :param url: The url of this FastaReceptor.
100
+ :type url: str
101
+ """
102
+ self._url = url
103
+
104
+ @property
105
+ def format(self):
106
+ """Gets the format of this FastaReceptor.
107
+
108
+ 文件格式,仅支持FASTA,仅数据源为RAW时提供
109
+
110
+ :return: The format of this FastaReceptor.
111
+ :rtype: str
112
+ """
113
+ return self._format
114
+
115
+ @format.setter
116
+ def format(self, format):
117
+ """Sets the format of this FastaReceptor.
118
+
119
+ 文件格式,仅支持FASTA,仅数据源为RAW时提供
120
+
121
+ :param format: The format of this FastaReceptor.
122
+ :type format: str
123
+ """
124
+ self._format = format
125
+
126
+ @property
127
+ def data(self):
128
+ """Gets the data of this FastaReceptor.
129
+
130
+ 文件原始数据,仅数据源为RAW时提供
131
+
132
+ :return: The data of this FastaReceptor.
133
+ :rtype: str
134
+ """
135
+ return self._data
136
+
137
+ @data.setter
138
+ def data(self, data):
139
+ """Sets the data of this FastaReceptor.
140
+
141
+ 文件原始数据,仅数据源为RAW时提供
142
+
143
+ :param data: The data of this FastaReceptor.
144
+ :type data: str
145
+ """
146
+ self._data = data
147
+
148
+ def to_dict(self):
149
+ """Returns the model properties as a dict"""
150
+ result = {}
151
+
152
+ for attr, _ in six.iteritems(self.openapi_types):
153
+ value = getattr(self, attr)
154
+ if isinstance(value, list):
155
+ result[attr] = list(map(
156
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
157
+ value
158
+ ))
159
+ elif hasattr(value, "to_dict"):
160
+ result[attr] = value.to_dict()
161
+ elif isinstance(value, dict):
162
+ result[attr] = dict(map(
163
+ lambda item: (item[0], item[1].to_dict())
164
+ if hasattr(item[1], "to_dict") else item,
165
+ value.items()
166
+ ))
167
+ else:
168
+ if attr in self.sensitive_list:
169
+ result[attr] = "****"
170
+ else:
171
+ result[attr] = value
172
+
173
+ return result
174
+
175
+ def to_str(self):
176
+ """Returns the string representation of the model"""
177
+ import simplejson as json
178
+ if six.PY2:
179
+ import sys
180
+ reload(sys)
181
+ sys.setdefaultencoding("utf-8")
182
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
183
+
184
+ def __repr__(self):
185
+ """For `print`"""
186
+ return self.to_str()
187
+
188
+ def __eq__(self, other):
189
+ """Returns true if both objects are equal"""
190
+ if not isinstance(other, FastaReceptor):
191
+ return False
192
+
193
+ return self.__dict__ == other.__dict__
194
+
195
+ def __ne__(self, other):
196
+ """Returns true if both objects are not equal"""
197
+ return not self == other
@@ -0,0 +1,166 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class Interaction:
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
+ 'binding_site': 'str',
21
+ 'type': 'InteractionType',
22
+ 'amino_acid': 'str'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'binding_site': 'binding_site',
27
+ 'type': 'type',
28
+ 'amino_acid': 'amino_acid'
29
+ }
30
+
31
+ def __init__(self, binding_site=None, type=None, amino_acid=None):
32
+ """Interaction
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param binding_site: 靶点,只支持target1或target2。
37
+ :type binding_site: str
38
+ :param type:
39
+ :type type: :class:`huaweicloudsdkeihealth.v1.InteractionType`
40
+ :param amino_acid: 氨基酸
41
+ :type amino_acid: str
42
+ """
43
+
44
+
45
+
46
+ self._binding_site = None
47
+ self._type = None
48
+ self._amino_acid = None
49
+ self.discriminator = None
50
+
51
+ self.binding_site = binding_site
52
+ self.type = type
53
+ self.amino_acid = amino_acid
54
+
55
+ @property
56
+ def binding_site(self):
57
+ """Gets the binding_site of this Interaction.
58
+
59
+ 靶点,只支持target1或target2。
60
+
61
+ :return: The binding_site of this Interaction.
62
+ :rtype: str
63
+ """
64
+ return self._binding_site
65
+
66
+ @binding_site.setter
67
+ def binding_site(self, binding_site):
68
+ """Sets the binding_site of this Interaction.
69
+
70
+ 靶点,只支持target1或target2。
71
+
72
+ :param binding_site: The binding_site of this Interaction.
73
+ :type binding_site: str
74
+ """
75
+ self._binding_site = binding_site
76
+
77
+ @property
78
+ def type(self):
79
+ """Gets the type of this Interaction.
80
+
81
+ :return: The type of this Interaction.
82
+ :rtype: :class:`huaweicloudsdkeihealth.v1.InteractionType`
83
+ """
84
+ return self._type
85
+
86
+ @type.setter
87
+ def type(self, type):
88
+ """Sets the type of this Interaction.
89
+
90
+ :param type: The type of this Interaction.
91
+ :type type: :class:`huaweicloudsdkeihealth.v1.InteractionType`
92
+ """
93
+ self._type = type
94
+
95
+ @property
96
+ def amino_acid(self):
97
+ """Gets the amino_acid of this Interaction.
98
+
99
+ 氨基酸
100
+
101
+ :return: The amino_acid of this Interaction.
102
+ :rtype: str
103
+ """
104
+ return self._amino_acid
105
+
106
+ @amino_acid.setter
107
+ def amino_acid(self, amino_acid):
108
+ """Sets the amino_acid of this Interaction.
109
+
110
+ 氨基酸
111
+
112
+ :param amino_acid: The amino_acid of this Interaction.
113
+ :type amino_acid: str
114
+ """
115
+ self._amino_acid = amino_acid
116
+
117
+ def to_dict(self):
118
+ """Returns the model properties as a dict"""
119
+ result = {}
120
+
121
+ for attr, _ in six.iteritems(self.openapi_types):
122
+ value = getattr(self, attr)
123
+ if isinstance(value, list):
124
+ result[attr] = list(map(
125
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
126
+ value
127
+ ))
128
+ elif hasattr(value, "to_dict"):
129
+ result[attr] = value.to_dict()
130
+ elif isinstance(value, dict):
131
+ result[attr] = dict(map(
132
+ lambda item: (item[0], item[1].to_dict())
133
+ if hasattr(item[1], "to_dict") else item,
134
+ value.items()
135
+ ))
136
+ else:
137
+ if attr in self.sensitive_list:
138
+ result[attr] = "****"
139
+ else:
140
+ result[attr] = value
141
+
142
+ return result
143
+
144
+ def to_str(self):
145
+ """Returns the string representation of the model"""
146
+ import simplejson as json
147
+ if six.PY2:
148
+ import sys
149
+ reload(sys)
150
+ sys.setdefaultencoding("utf-8")
151
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
152
+
153
+ def __repr__(self):
154
+ """For `print`"""
155
+ return self.to_str()
156
+
157
+ def __eq__(self, other):
158
+ """Returns true if both objects are equal"""
159
+ if not isinstance(other, Interaction):
160
+ return False
161
+
162
+ return self.__dict__ == other.__dict__
163
+
164
+ def __ne__(self, other):
165
+ """Returns true if both objects are not equal"""
166
+ return not self == other