huaweicloudsdkimagesearch 3.1.183__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.
- huaweicloudsdkimagesearch/__init__.py +0 -0
- huaweicloudsdkimagesearch/v2/__init__.py +40 -0
- huaweicloudsdkimagesearch/v2/imagesearch_async_client.py +418 -0
- huaweicloudsdkimagesearch/v2/imagesearch_client.py +415 -0
- huaweicloudsdkimagesearch/v2/model/__init__.py +37 -0
- huaweicloudsdkimagesearch/v2/model/add_data_optional_param.py +195 -0
- huaweicloudsdkimagesearch/v2/model/add_data_param.py +335 -0
- huaweicloudsdkimagesearch/v2/model/add_data_rest_info.py +104 -0
- huaweicloudsdkimagesearch/v2/model/add_data_rest_info_image_info.py +108 -0
- huaweicloudsdkimagesearch/v2/model/add_data_rest_info_image_info_objects.py +166 -0
- huaweicloudsdkimagesearch/v2/model/check_info.py +162 -0
- huaweicloudsdkimagesearch/v2/model/check_param.py +220 -0
- huaweicloudsdkimagesearch/v2/model/check_rest_info.py +187 -0
- huaweicloudsdkimagesearch/v2/model/delete_info.py +137 -0
- huaweicloudsdkimagesearch/v2/model/delete_param.py +195 -0
- huaweicloudsdkimagesearch/v2/model/delete_rest_info.py +133 -0
- huaweicloudsdkimagesearch/v2/model/delete_rest_info_items.py +108 -0
- huaweicloudsdkimagesearch/v2/model/item_source.py +195 -0
- huaweicloudsdkimagesearch/v2/model/range_param.py +137 -0
- huaweicloudsdkimagesearch/v2/model/run_add_data_request.py +132 -0
- huaweicloudsdkimagesearch/v2/model/run_add_data_response.py +137 -0
- huaweicloudsdkimagesearch/v2/model/run_check_data_request.py +132 -0
- huaweicloudsdkimagesearch/v2/model/run_check_data_response.py +137 -0
- huaweicloudsdkimagesearch/v2/model/run_delete_data_request.py +132 -0
- huaweicloudsdkimagesearch/v2/model/run_delete_data_response.py +137 -0
- huaweicloudsdkimagesearch/v2/model/run_search_request.py +132 -0
- huaweicloudsdkimagesearch/v2/model/run_search_response.py +137 -0
- huaweicloudsdkimagesearch/v2/model/run_update_data_request.py +132 -0
- huaweicloudsdkimagesearch/v2/model/run_update_data_response.py +112 -0
- huaweicloudsdkimagesearch/v2/model/search_after_param.py +137 -0
- huaweicloudsdkimagesearch/v2/model/search_info.py +191 -0
- huaweicloudsdkimagesearch/v2/model/search_item.py +162 -0
- huaweicloudsdkimagesearch/v2/model/search_optional_param.py +311 -0
- huaweicloudsdkimagesearch/v2/model/search_param.py +418 -0
- huaweicloudsdkimagesearch/v2/model/search_rest_info.py +158 -0
- huaweicloudsdkimagesearch/v2/model/search_rest_info_image_info.py +195 -0
- huaweicloudsdkimagesearch/v2/model/update_param.py +194 -0
- huaweicloudsdkimagesearch/v2/region/__init__.py +0 -0
- huaweicloudsdkimagesearch/v2/region/imagesearch_region.py +32 -0
- huaweicloudsdkimagesearch-3.1.183.dist-info/METADATA +25 -0
- huaweicloudsdkimagesearch-3.1.183.dist-info/RECORD +43 -0
- huaweicloudsdkimagesearch-3.1.183.dist-info/WHEEL +4 -0
- huaweicloudsdkimagesearch-3.1.183.dist-info/licenses/LICENSE +13 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SearchItem:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'id': 'str',
|
|
19
|
+
'score': 'float',
|
|
20
|
+
'source': 'ItemSource'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'id': 'id',
|
|
25
|
+
'score': 'score',
|
|
26
|
+
'source': 'source'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, id=None, score=None, source=None):
|
|
30
|
+
r"""SearchItem
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param id: 数据唯一ID。
|
|
35
|
+
:type id: str
|
|
36
|
+
:param score: 数据匹配分数。
|
|
37
|
+
:type score: float
|
|
38
|
+
:param source:
|
|
39
|
+
:type source: :class:`huaweicloudsdkimagesearch.v2.ItemSource`
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
self._id = None
|
|
45
|
+
self._score = None
|
|
46
|
+
self._source = None
|
|
47
|
+
self.discriminator = None
|
|
48
|
+
|
|
49
|
+
if id is not None:
|
|
50
|
+
self.id = id
|
|
51
|
+
if score is not None:
|
|
52
|
+
self.score = score
|
|
53
|
+
if source is not None:
|
|
54
|
+
self.source = source
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def id(self):
|
|
58
|
+
r"""Gets the id of this SearchItem.
|
|
59
|
+
|
|
60
|
+
数据唯一ID。
|
|
61
|
+
|
|
62
|
+
:return: The id of this SearchItem.
|
|
63
|
+
:rtype: str
|
|
64
|
+
"""
|
|
65
|
+
return self._id
|
|
66
|
+
|
|
67
|
+
@id.setter
|
|
68
|
+
def id(self, id):
|
|
69
|
+
r"""Sets the id of this SearchItem.
|
|
70
|
+
|
|
71
|
+
数据唯一ID。
|
|
72
|
+
|
|
73
|
+
:param id: The id of this SearchItem.
|
|
74
|
+
:type id: str
|
|
75
|
+
"""
|
|
76
|
+
self._id = id
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def score(self):
|
|
80
|
+
r"""Gets the score of this SearchItem.
|
|
81
|
+
|
|
82
|
+
数据匹配分数。
|
|
83
|
+
|
|
84
|
+
:return: The score of this SearchItem.
|
|
85
|
+
:rtype: float
|
|
86
|
+
"""
|
|
87
|
+
return self._score
|
|
88
|
+
|
|
89
|
+
@score.setter
|
|
90
|
+
def score(self, score):
|
|
91
|
+
r"""Sets the score of this SearchItem.
|
|
92
|
+
|
|
93
|
+
数据匹配分数。
|
|
94
|
+
|
|
95
|
+
:param score: The score of this SearchItem.
|
|
96
|
+
:type score: float
|
|
97
|
+
"""
|
|
98
|
+
self._score = score
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def source(self):
|
|
102
|
+
r"""Gets the source of this SearchItem.
|
|
103
|
+
|
|
104
|
+
:return: The source of this SearchItem.
|
|
105
|
+
:rtype: :class:`huaweicloudsdkimagesearch.v2.ItemSource`
|
|
106
|
+
"""
|
|
107
|
+
return self._source
|
|
108
|
+
|
|
109
|
+
@source.setter
|
|
110
|
+
def source(self, source):
|
|
111
|
+
r"""Sets the source of this SearchItem.
|
|
112
|
+
|
|
113
|
+
:param source: The source of this SearchItem.
|
|
114
|
+
:type source: :class:`huaweicloudsdkimagesearch.v2.ItemSource`
|
|
115
|
+
"""
|
|
116
|
+
self._source = source
|
|
117
|
+
|
|
118
|
+
def to_dict(self):
|
|
119
|
+
result = {}
|
|
120
|
+
|
|
121
|
+
for attr, _ in self.openapi_types.items():
|
|
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
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
148
|
+
|
|
149
|
+
def __repr__(self):
|
|
150
|
+
"""For `print`"""
|
|
151
|
+
return self.to_str()
|
|
152
|
+
|
|
153
|
+
def __eq__(self, other):
|
|
154
|
+
"""Returns true if both objects are equal"""
|
|
155
|
+
if not isinstance(other, SearchItem):
|
|
156
|
+
return False
|
|
157
|
+
|
|
158
|
+
return self.__dict__ == other.__dict__
|
|
159
|
+
|
|
160
|
+
def __ne__(self, other):
|
|
161
|
+
"""Returns true if both objects are not equal"""
|
|
162
|
+
return not self == other
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SearchOptionalParam:
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
Attributes:
|
|
10
|
+
openapi_types (dict): The key is attribute name
|
|
11
|
+
and the value is attribute type.
|
|
12
|
+
attribute_map (dict): The key is attribute name
|
|
13
|
+
and the value is json key in definition.
|
|
14
|
+
"""
|
|
15
|
+
sensitive_list = []
|
|
16
|
+
|
|
17
|
+
openapi_types = {
|
|
18
|
+
'do_det': 'bool',
|
|
19
|
+
'box': 'str',
|
|
20
|
+
'do_cls': 'bool',
|
|
21
|
+
'category': 'int',
|
|
22
|
+
'collapse_key': 'str',
|
|
23
|
+
'max_scan_num': 'int',
|
|
24
|
+
'nprobe': 'int',
|
|
25
|
+
'text_lang': 'str'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
attribute_map = {
|
|
29
|
+
'do_det': 'do_det',
|
|
30
|
+
'box': 'box',
|
|
31
|
+
'do_cls': 'do_cls',
|
|
32
|
+
'category': 'category',
|
|
33
|
+
'collapse_key': 'collapse_key',
|
|
34
|
+
'max_scan_num': 'max_scan_num',
|
|
35
|
+
'nprobe': 'nprobe',
|
|
36
|
+
'text_lang': 'text_lang'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def __init__(self, do_det=None, box=None, do_cls=None, category=None, collapse_key=None, max_scan_num=None, nprobe=None, text_lang=None):
|
|
40
|
+
r"""SearchOptionalParam
|
|
41
|
+
|
|
42
|
+
The model defined in huaweicloud sdk
|
|
43
|
+
|
|
44
|
+
:param do_det: 是否进行目标检测,默认为true。
|
|
45
|
+
:type do_det: bool
|
|
46
|
+
:param box: 目标矩形框坐标,如给定则不进行目标检测,直接使用该box作为目标。格式为“x1,y1,x2,y2”(无空格),x1/y1为目标左上角坐标,x2/y2为目标右下角坐标,具体要求如下: - 0 <= x1 < x2 <= width,默认要求x2-x1 >= 15,具体可参考服务类型说明。 - 0 <= y1 < y2 <= height,默认要求y2-y1 >= 15,具体可参考服务类型说明。
|
|
47
|
+
:type box: str
|
|
48
|
+
:param do_cls: 是否进行对象分类,默认为true。
|
|
49
|
+
:type do_cls: bool
|
|
50
|
+
:param category: 对象类目,如给定则不进行对象分类,直接使用该category作为类目。具体类目信息可参见对应的服务类型说明。
|
|
51
|
+
:type category: int
|
|
52
|
+
:param collapse_key: 去重标签名,必须为服务实例custom_tags中已存在的key。 - 如给定则会对该key下相同value的数据进行去重,仅保留得分最高的数据。 - 针对没有设置该标签的数据,会直接过滤。
|
|
53
|
+
:type collapse_key: str
|
|
54
|
+
:param max_scan_num: 扫描节点上限。值越大精度越高,查询速度变慢。默认值为10000。
|
|
55
|
+
:type max_scan_num: int
|
|
56
|
+
:param nprobe: 查询考察中心点的数目。值越大精度越高,查询速度变慢。默认值为100。
|
|
57
|
+
:type nprobe: int
|
|
58
|
+
:param text_lang: 文本字符串的语言类型枚举值。
|
|
59
|
+
:type text_lang: str
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
self._do_det = None
|
|
65
|
+
self._box = None
|
|
66
|
+
self._do_cls = None
|
|
67
|
+
self._category = None
|
|
68
|
+
self._collapse_key = None
|
|
69
|
+
self._max_scan_num = None
|
|
70
|
+
self._nprobe = None
|
|
71
|
+
self._text_lang = None
|
|
72
|
+
self.discriminator = None
|
|
73
|
+
|
|
74
|
+
if do_det is not None:
|
|
75
|
+
self.do_det = do_det
|
|
76
|
+
if box is not None:
|
|
77
|
+
self.box = box
|
|
78
|
+
if do_cls is not None:
|
|
79
|
+
self.do_cls = do_cls
|
|
80
|
+
if category is not None:
|
|
81
|
+
self.category = category
|
|
82
|
+
if collapse_key is not None:
|
|
83
|
+
self.collapse_key = collapse_key
|
|
84
|
+
if max_scan_num is not None:
|
|
85
|
+
self.max_scan_num = max_scan_num
|
|
86
|
+
if nprobe is not None:
|
|
87
|
+
self.nprobe = nprobe
|
|
88
|
+
if text_lang is not None:
|
|
89
|
+
self.text_lang = text_lang
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def do_det(self):
|
|
93
|
+
r"""Gets the do_det of this SearchOptionalParam.
|
|
94
|
+
|
|
95
|
+
是否进行目标检测,默认为true。
|
|
96
|
+
|
|
97
|
+
:return: The do_det of this SearchOptionalParam.
|
|
98
|
+
:rtype: bool
|
|
99
|
+
"""
|
|
100
|
+
return self._do_det
|
|
101
|
+
|
|
102
|
+
@do_det.setter
|
|
103
|
+
def do_det(self, do_det):
|
|
104
|
+
r"""Sets the do_det of this SearchOptionalParam.
|
|
105
|
+
|
|
106
|
+
是否进行目标检测,默认为true。
|
|
107
|
+
|
|
108
|
+
:param do_det: The do_det of this SearchOptionalParam.
|
|
109
|
+
:type do_det: bool
|
|
110
|
+
"""
|
|
111
|
+
self._do_det = do_det
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def box(self):
|
|
115
|
+
r"""Gets the box of this SearchOptionalParam.
|
|
116
|
+
|
|
117
|
+
目标矩形框坐标,如给定则不进行目标检测,直接使用该box作为目标。格式为“x1,y1,x2,y2”(无空格),x1/y1为目标左上角坐标,x2/y2为目标右下角坐标,具体要求如下: - 0 <= x1 < x2 <= width,默认要求x2-x1 >= 15,具体可参考服务类型说明。 - 0 <= y1 < y2 <= height,默认要求y2-y1 >= 15,具体可参考服务类型说明。
|
|
118
|
+
|
|
119
|
+
:return: The box of this SearchOptionalParam.
|
|
120
|
+
:rtype: str
|
|
121
|
+
"""
|
|
122
|
+
return self._box
|
|
123
|
+
|
|
124
|
+
@box.setter
|
|
125
|
+
def box(self, box):
|
|
126
|
+
r"""Sets the box of this SearchOptionalParam.
|
|
127
|
+
|
|
128
|
+
目标矩形框坐标,如给定则不进行目标检测,直接使用该box作为目标。格式为“x1,y1,x2,y2”(无空格),x1/y1为目标左上角坐标,x2/y2为目标右下角坐标,具体要求如下: - 0 <= x1 < x2 <= width,默认要求x2-x1 >= 15,具体可参考服务类型说明。 - 0 <= y1 < y2 <= height,默认要求y2-y1 >= 15,具体可参考服务类型说明。
|
|
129
|
+
|
|
130
|
+
:param box: The box of this SearchOptionalParam.
|
|
131
|
+
:type box: str
|
|
132
|
+
"""
|
|
133
|
+
self._box = box
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def do_cls(self):
|
|
137
|
+
r"""Gets the do_cls of this SearchOptionalParam.
|
|
138
|
+
|
|
139
|
+
是否进行对象分类,默认为true。
|
|
140
|
+
|
|
141
|
+
:return: The do_cls of this SearchOptionalParam.
|
|
142
|
+
:rtype: bool
|
|
143
|
+
"""
|
|
144
|
+
return self._do_cls
|
|
145
|
+
|
|
146
|
+
@do_cls.setter
|
|
147
|
+
def do_cls(self, do_cls):
|
|
148
|
+
r"""Sets the do_cls of this SearchOptionalParam.
|
|
149
|
+
|
|
150
|
+
是否进行对象分类,默认为true。
|
|
151
|
+
|
|
152
|
+
:param do_cls: The do_cls of this SearchOptionalParam.
|
|
153
|
+
:type do_cls: bool
|
|
154
|
+
"""
|
|
155
|
+
self._do_cls = do_cls
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def category(self):
|
|
159
|
+
r"""Gets the category of this SearchOptionalParam.
|
|
160
|
+
|
|
161
|
+
对象类目,如给定则不进行对象分类,直接使用该category作为类目。具体类目信息可参见对应的服务类型说明。
|
|
162
|
+
|
|
163
|
+
:return: The category of this SearchOptionalParam.
|
|
164
|
+
:rtype: int
|
|
165
|
+
"""
|
|
166
|
+
return self._category
|
|
167
|
+
|
|
168
|
+
@category.setter
|
|
169
|
+
def category(self, category):
|
|
170
|
+
r"""Sets the category of this SearchOptionalParam.
|
|
171
|
+
|
|
172
|
+
对象类目,如给定则不进行对象分类,直接使用该category作为类目。具体类目信息可参见对应的服务类型说明。
|
|
173
|
+
|
|
174
|
+
:param category: The category of this SearchOptionalParam.
|
|
175
|
+
:type category: int
|
|
176
|
+
"""
|
|
177
|
+
self._category = category
|
|
178
|
+
|
|
179
|
+
@property
|
|
180
|
+
def collapse_key(self):
|
|
181
|
+
r"""Gets the collapse_key of this SearchOptionalParam.
|
|
182
|
+
|
|
183
|
+
去重标签名,必须为服务实例custom_tags中已存在的key。 - 如给定则会对该key下相同value的数据进行去重,仅保留得分最高的数据。 - 针对没有设置该标签的数据,会直接过滤。
|
|
184
|
+
|
|
185
|
+
:return: The collapse_key of this SearchOptionalParam.
|
|
186
|
+
:rtype: str
|
|
187
|
+
"""
|
|
188
|
+
return self._collapse_key
|
|
189
|
+
|
|
190
|
+
@collapse_key.setter
|
|
191
|
+
def collapse_key(self, collapse_key):
|
|
192
|
+
r"""Sets the collapse_key of this SearchOptionalParam.
|
|
193
|
+
|
|
194
|
+
去重标签名,必须为服务实例custom_tags中已存在的key。 - 如给定则会对该key下相同value的数据进行去重,仅保留得分最高的数据。 - 针对没有设置该标签的数据,会直接过滤。
|
|
195
|
+
|
|
196
|
+
:param collapse_key: The collapse_key of this SearchOptionalParam.
|
|
197
|
+
:type collapse_key: str
|
|
198
|
+
"""
|
|
199
|
+
self._collapse_key = collapse_key
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def max_scan_num(self):
|
|
203
|
+
r"""Gets the max_scan_num of this SearchOptionalParam.
|
|
204
|
+
|
|
205
|
+
扫描节点上限。值越大精度越高,查询速度变慢。默认值为10000。
|
|
206
|
+
|
|
207
|
+
:return: The max_scan_num of this SearchOptionalParam.
|
|
208
|
+
:rtype: int
|
|
209
|
+
"""
|
|
210
|
+
return self._max_scan_num
|
|
211
|
+
|
|
212
|
+
@max_scan_num.setter
|
|
213
|
+
def max_scan_num(self, max_scan_num):
|
|
214
|
+
r"""Sets the max_scan_num of this SearchOptionalParam.
|
|
215
|
+
|
|
216
|
+
扫描节点上限。值越大精度越高,查询速度变慢。默认值为10000。
|
|
217
|
+
|
|
218
|
+
:param max_scan_num: The max_scan_num of this SearchOptionalParam.
|
|
219
|
+
:type max_scan_num: int
|
|
220
|
+
"""
|
|
221
|
+
self._max_scan_num = max_scan_num
|
|
222
|
+
|
|
223
|
+
@property
|
|
224
|
+
def nprobe(self):
|
|
225
|
+
r"""Gets the nprobe of this SearchOptionalParam.
|
|
226
|
+
|
|
227
|
+
查询考察中心点的数目。值越大精度越高,查询速度变慢。默认值为100。
|
|
228
|
+
|
|
229
|
+
:return: The nprobe of this SearchOptionalParam.
|
|
230
|
+
:rtype: int
|
|
231
|
+
"""
|
|
232
|
+
return self._nprobe
|
|
233
|
+
|
|
234
|
+
@nprobe.setter
|
|
235
|
+
def nprobe(self, nprobe):
|
|
236
|
+
r"""Sets the nprobe of this SearchOptionalParam.
|
|
237
|
+
|
|
238
|
+
查询考察中心点的数目。值越大精度越高,查询速度变慢。默认值为100。
|
|
239
|
+
|
|
240
|
+
:param nprobe: The nprobe of this SearchOptionalParam.
|
|
241
|
+
:type nprobe: int
|
|
242
|
+
"""
|
|
243
|
+
self._nprobe = nprobe
|
|
244
|
+
|
|
245
|
+
@property
|
|
246
|
+
def text_lang(self):
|
|
247
|
+
r"""Gets the text_lang of this SearchOptionalParam.
|
|
248
|
+
|
|
249
|
+
文本字符串的语言类型枚举值。
|
|
250
|
+
|
|
251
|
+
:return: The text_lang of this SearchOptionalParam.
|
|
252
|
+
:rtype: str
|
|
253
|
+
"""
|
|
254
|
+
return self._text_lang
|
|
255
|
+
|
|
256
|
+
@text_lang.setter
|
|
257
|
+
def text_lang(self, text_lang):
|
|
258
|
+
r"""Sets the text_lang of this SearchOptionalParam.
|
|
259
|
+
|
|
260
|
+
文本字符串的语言类型枚举值。
|
|
261
|
+
|
|
262
|
+
:param text_lang: The text_lang of this SearchOptionalParam.
|
|
263
|
+
:type text_lang: str
|
|
264
|
+
"""
|
|
265
|
+
self._text_lang = text_lang
|
|
266
|
+
|
|
267
|
+
def to_dict(self):
|
|
268
|
+
result = {}
|
|
269
|
+
|
|
270
|
+
for attr, _ in self.openapi_types.items():
|
|
271
|
+
value = getattr(self, attr)
|
|
272
|
+
if isinstance(value, list):
|
|
273
|
+
result[attr] = list(map(
|
|
274
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
275
|
+
value
|
|
276
|
+
))
|
|
277
|
+
elif hasattr(value, "to_dict"):
|
|
278
|
+
result[attr] = value.to_dict()
|
|
279
|
+
elif isinstance(value, dict):
|
|
280
|
+
result[attr] = dict(map(
|
|
281
|
+
lambda item: (item[0], item[1].to_dict())
|
|
282
|
+
if hasattr(item[1], "to_dict") else item,
|
|
283
|
+
value.items()
|
|
284
|
+
))
|
|
285
|
+
else:
|
|
286
|
+
if attr in self.sensitive_list:
|
|
287
|
+
result[attr] = "****"
|
|
288
|
+
else:
|
|
289
|
+
result[attr] = value
|
|
290
|
+
|
|
291
|
+
return result
|
|
292
|
+
|
|
293
|
+
def to_str(self):
|
|
294
|
+
"""Returns the string representation of the model"""
|
|
295
|
+
import simplejson as json
|
|
296
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
297
|
+
|
|
298
|
+
def __repr__(self):
|
|
299
|
+
"""For `print`"""
|
|
300
|
+
return self.to_str()
|
|
301
|
+
|
|
302
|
+
def __eq__(self, other):
|
|
303
|
+
"""Returns true if both objects are equal"""
|
|
304
|
+
if not isinstance(other, SearchOptionalParam):
|
|
305
|
+
return False
|
|
306
|
+
|
|
307
|
+
return self.__dict__ == other.__dict__
|
|
308
|
+
|
|
309
|
+
def __ne__(self, other):
|
|
310
|
+
"""Returns true if both objects are not equal"""
|
|
311
|
+
return not self == other
|