huaweicloudsdkimagesearch 3.1.160__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.

Potentially problematic release.


This version of huaweicloudsdkimagesearch might be problematic. Click here for more details.

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