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,137 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
4
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RunSearchResponse(SdkResponse):
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
Attributes:
|
|
11
|
+
openapi_types (dict): The key is attribute name
|
|
12
|
+
and the value is attribute type.
|
|
13
|
+
attribute_map (dict): The key is attribute name
|
|
14
|
+
and the value is json key in definition.
|
|
15
|
+
"""
|
|
16
|
+
sensitive_list = []
|
|
17
|
+
|
|
18
|
+
openapi_types = {
|
|
19
|
+
'result': 'str',
|
|
20
|
+
'data': 'SearchRestInfo'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'result': 'result',
|
|
25
|
+
'data': 'data'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
def __init__(self, result=None, data=None):
|
|
29
|
+
r"""RunSearchResponse
|
|
30
|
+
|
|
31
|
+
The model defined in huaweicloud sdk
|
|
32
|
+
|
|
33
|
+
:param result: 搜索完成返回success。
|
|
34
|
+
:type result: str
|
|
35
|
+
:param data:
|
|
36
|
+
:type data: :class:`huaweicloudsdkimagesearch.v2.SearchRestInfo`
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
super().__init__()
|
|
40
|
+
|
|
41
|
+
self._result = None
|
|
42
|
+
self._data = None
|
|
43
|
+
self.discriminator = None
|
|
44
|
+
|
|
45
|
+
if result is not None:
|
|
46
|
+
self.result = result
|
|
47
|
+
if data is not None:
|
|
48
|
+
self.data = data
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def result(self):
|
|
52
|
+
r"""Gets the result of this RunSearchResponse.
|
|
53
|
+
|
|
54
|
+
搜索完成返回success。
|
|
55
|
+
|
|
56
|
+
:return: The result of this RunSearchResponse.
|
|
57
|
+
:rtype: str
|
|
58
|
+
"""
|
|
59
|
+
return self._result
|
|
60
|
+
|
|
61
|
+
@result.setter
|
|
62
|
+
def result(self, result):
|
|
63
|
+
r"""Sets the result of this RunSearchResponse.
|
|
64
|
+
|
|
65
|
+
搜索完成返回success。
|
|
66
|
+
|
|
67
|
+
:param result: The result of this RunSearchResponse.
|
|
68
|
+
:type result: str
|
|
69
|
+
"""
|
|
70
|
+
self._result = result
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def data(self):
|
|
74
|
+
r"""Gets the data of this RunSearchResponse.
|
|
75
|
+
|
|
76
|
+
:return: The data of this RunSearchResponse.
|
|
77
|
+
:rtype: :class:`huaweicloudsdkimagesearch.v2.SearchRestInfo`
|
|
78
|
+
"""
|
|
79
|
+
return self._data
|
|
80
|
+
|
|
81
|
+
@data.setter
|
|
82
|
+
def data(self, data):
|
|
83
|
+
r"""Sets the data of this RunSearchResponse.
|
|
84
|
+
|
|
85
|
+
:param data: The data of this RunSearchResponse.
|
|
86
|
+
:type data: :class:`huaweicloudsdkimagesearch.v2.SearchRestInfo`
|
|
87
|
+
"""
|
|
88
|
+
self._data = data
|
|
89
|
+
|
|
90
|
+
def to_dict(self):
|
|
91
|
+
import warnings
|
|
92
|
+
warnings.warn("RunSearchResponse.to_dict() is deprecated and no longer maintained, "
|
|
93
|
+
"use to_json_object() to get the response content.", DeprecationWarning)
|
|
94
|
+
result = {}
|
|
95
|
+
|
|
96
|
+
for attr, _ in self.openapi_types.items():
|
|
97
|
+
value = getattr(self, attr)
|
|
98
|
+
if isinstance(value, list):
|
|
99
|
+
result[attr] = list(map(
|
|
100
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
101
|
+
value
|
|
102
|
+
))
|
|
103
|
+
elif hasattr(value, "to_dict"):
|
|
104
|
+
result[attr] = value.to_dict()
|
|
105
|
+
elif isinstance(value, dict):
|
|
106
|
+
result[attr] = dict(map(
|
|
107
|
+
lambda item: (item[0], item[1].to_dict())
|
|
108
|
+
if hasattr(item[1], "to_dict") else item,
|
|
109
|
+
value.items()
|
|
110
|
+
))
|
|
111
|
+
else:
|
|
112
|
+
if attr in self.sensitive_list:
|
|
113
|
+
result[attr] = "****"
|
|
114
|
+
else:
|
|
115
|
+
result[attr] = value
|
|
116
|
+
|
|
117
|
+
return result
|
|
118
|
+
|
|
119
|
+
def to_str(self):
|
|
120
|
+
"""Returns the string representation of the model"""
|
|
121
|
+
import simplejson as json
|
|
122
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
123
|
+
|
|
124
|
+
def __repr__(self):
|
|
125
|
+
"""For `print`"""
|
|
126
|
+
return self.to_str()
|
|
127
|
+
|
|
128
|
+
def __eq__(self, other):
|
|
129
|
+
"""Returns true if both objects are equal"""
|
|
130
|
+
if not isinstance(other, RunSearchResponse):
|
|
131
|
+
return False
|
|
132
|
+
|
|
133
|
+
return self.__dict__ == other.__dict__
|
|
134
|
+
|
|
135
|
+
def __ne__(self, other):
|
|
136
|
+
"""Returns true if both objects are not equal"""
|
|
137
|
+
return not self == other
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class RunUpdateDataRequest:
|
|
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
|
+
'service_name': 'str',
|
|
19
|
+
'body': 'UpdateParam'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'service_name': 'service_name',
|
|
24
|
+
'body': 'body'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, service_name=None, body=None):
|
|
28
|
+
r"""RunUpdateDataRequest
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param service_name: 服务实例的名称,用户创建服务实例时指定。
|
|
33
|
+
:type service_name: str
|
|
34
|
+
:param body: Body of the RunUpdateDataRequest
|
|
35
|
+
:type body: :class:`huaweicloudsdkimagesearch.v2.UpdateParam`
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._service_name = None
|
|
41
|
+
self._body = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
self.service_name = service_name
|
|
45
|
+
if body is not None:
|
|
46
|
+
self.body = body
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def service_name(self):
|
|
50
|
+
r"""Gets the service_name of this RunUpdateDataRequest.
|
|
51
|
+
|
|
52
|
+
服务实例的名称,用户创建服务实例时指定。
|
|
53
|
+
|
|
54
|
+
:return: The service_name of this RunUpdateDataRequest.
|
|
55
|
+
:rtype: str
|
|
56
|
+
"""
|
|
57
|
+
return self._service_name
|
|
58
|
+
|
|
59
|
+
@service_name.setter
|
|
60
|
+
def service_name(self, service_name):
|
|
61
|
+
r"""Sets the service_name of this RunUpdateDataRequest.
|
|
62
|
+
|
|
63
|
+
服务实例的名称,用户创建服务实例时指定。
|
|
64
|
+
|
|
65
|
+
:param service_name: The service_name of this RunUpdateDataRequest.
|
|
66
|
+
:type service_name: str
|
|
67
|
+
"""
|
|
68
|
+
self._service_name = service_name
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def body(self):
|
|
72
|
+
r"""Gets the body of this RunUpdateDataRequest.
|
|
73
|
+
|
|
74
|
+
:return: The body of this RunUpdateDataRequest.
|
|
75
|
+
:rtype: :class:`huaweicloudsdkimagesearch.v2.UpdateParam`
|
|
76
|
+
"""
|
|
77
|
+
return self._body
|
|
78
|
+
|
|
79
|
+
@body.setter
|
|
80
|
+
def body(self, body):
|
|
81
|
+
r"""Sets the body of this RunUpdateDataRequest.
|
|
82
|
+
|
|
83
|
+
:param body: The body of this RunUpdateDataRequest.
|
|
84
|
+
:type body: :class:`huaweicloudsdkimagesearch.v2.UpdateParam`
|
|
85
|
+
"""
|
|
86
|
+
self._body = body
|
|
87
|
+
|
|
88
|
+
def to_dict(self):
|
|
89
|
+
result = {}
|
|
90
|
+
|
|
91
|
+
for attr, _ in self.openapi_types.items():
|
|
92
|
+
value = getattr(self, attr)
|
|
93
|
+
if isinstance(value, list):
|
|
94
|
+
result[attr] = list(map(
|
|
95
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
96
|
+
value
|
|
97
|
+
))
|
|
98
|
+
elif hasattr(value, "to_dict"):
|
|
99
|
+
result[attr] = value.to_dict()
|
|
100
|
+
elif isinstance(value, dict):
|
|
101
|
+
result[attr] = dict(map(
|
|
102
|
+
lambda item: (item[0], item[1].to_dict())
|
|
103
|
+
if hasattr(item[1], "to_dict") else item,
|
|
104
|
+
value.items()
|
|
105
|
+
))
|
|
106
|
+
else:
|
|
107
|
+
if attr in self.sensitive_list:
|
|
108
|
+
result[attr] = "****"
|
|
109
|
+
else:
|
|
110
|
+
result[attr] = value
|
|
111
|
+
|
|
112
|
+
return result
|
|
113
|
+
|
|
114
|
+
def to_str(self):
|
|
115
|
+
"""Returns the string representation of the model"""
|
|
116
|
+
import simplejson as json
|
|
117
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
118
|
+
|
|
119
|
+
def __repr__(self):
|
|
120
|
+
"""For `print`"""
|
|
121
|
+
return self.to_str()
|
|
122
|
+
|
|
123
|
+
def __eq__(self, other):
|
|
124
|
+
"""Returns true if both objects are equal"""
|
|
125
|
+
if not isinstance(other, RunUpdateDataRequest):
|
|
126
|
+
return False
|
|
127
|
+
|
|
128
|
+
return self.__dict__ == other.__dict__
|
|
129
|
+
|
|
130
|
+
def __ne__(self, other):
|
|
131
|
+
"""Returns true if both objects are not equal"""
|
|
132
|
+
return not self == other
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
4
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RunUpdateDataResponse(SdkResponse):
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
Attributes:
|
|
11
|
+
openapi_types (dict): The key is attribute name
|
|
12
|
+
and the value is attribute type.
|
|
13
|
+
attribute_map (dict): The key is attribute name
|
|
14
|
+
and the value is json key in definition.
|
|
15
|
+
"""
|
|
16
|
+
sensitive_list = []
|
|
17
|
+
|
|
18
|
+
openapi_types = {
|
|
19
|
+
'result': 'str'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'result': 'result'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def __init__(self, result=None):
|
|
27
|
+
r"""RunUpdateDataResponse
|
|
28
|
+
|
|
29
|
+
The model defined in huaweicloud sdk
|
|
30
|
+
|
|
31
|
+
:param result: 更新数据完成返回success。
|
|
32
|
+
:type result: str
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
super().__init__()
|
|
36
|
+
|
|
37
|
+
self._result = None
|
|
38
|
+
self.discriminator = None
|
|
39
|
+
|
|
40
|
+
if result is not None:
|
|
41
|
+
self.result = result
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def result(self):
|
|
45
|
+
r"""Gets the result of this RunUpdateDataResponse.
|
|
46
|
+
|
|
47
|
+
更新数据完成返回success。
|
|
48
|
+
|
|
49
|
+
:return: The result of this RunUpdateDataResponse.
|
|
50
|
+
:rtype: str
|
|
51
|
+
"""
|
|
52
|
+
return self._result
|
|
53
|
+
|
|
54
|
+
@result.setter
|
|
55
|
+
def result(self, result):
|
|
56
|
+
r"""Sets the result of this RunUpdateDataResponse.
|
|
57
|
+
|
|
58
|
+
更新数据完成返回success。
|
|
59
|
+
|
|
60
|
+
:param result: The result of this RunUpdateDataResponse.
|
|
61
|
+
:type result: str
|
|
62
|
+
"""
|
|
63
|
+
self._result = result
|
|
64
|
+
|
|
65
|
+
def to_dict(self):
|
|
66
|
+
import warnings
|
|
67
|
+
warnings.warn("RunUpdateDataResponse.to_dict() is deprecated and no longer maintained, "
|
|
68
|
+
"use to_json_object() to get the response content.", DeprecationWarning)
|
|
69
|
+
result = {}
|
|
70
|
+
|
|
71
|
+
for attr, _ in self.openapi_types.items():
|
|
72
|
+
value = getattr(self, attr)
|
|
73
|
+
if isinstance(value, list):
|
|
74
|
+
result[attr] = list(map(
|
|
75
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
76
|
+
value
|
|
77
|
+
))
|
|
78
|
+
elif hasattr(value, "to_dict"):
|
|
79
|
+
result[attr] = value.to_dict()
|
|
80
|
+
elif isinstance(value, dict):
|
|
81
|
+
result[attr] = dict(map(
|
|
82
|
+
lambda item: (item[0], item[1].to_dict())
|
|
83
|
+
if hasattr(item[1], "to_dict") else item,
|
|
84
|
+
value.items()
|
|
85
|
+
))
|
|
86
|
+
else:
|
|
87
|
+
if attr in self.sensitive_list:
|
|
88
|
+
result[attr] = "****"
|
|
89
|
+
else:
|
|
90
|
+
result[attr] = value
|
|
91
|
+
|
|
92
|
+
return result
|
|
93
|
+
|
|
94
|
+
def to_str(self):
|
|
95
|
+
"""Returns the string representation of the model"""
|
|
96
|
+
import simplejson as json
|
|
97
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
98
|
+
|
|
99
|
+
def __repr__(self):
|
|
100
|
+
"""For `print`"""
|
|
101
|
+
return self.to_str()
|
|
102
|
+
|
|
103
|
+
def __eq__(self, other):
|
|
104
|
+
"""Returns true if both objects are equal"""
|
|
105
|
+
if not isinstance(other, RunUpdateDataResponse):
|
|
106
|
+
return False
|
|
107
|
+
|
|
108
|
+
return self.__dict__ == other.__dict__
|
|
109
|
+
|
|
110
|
+
def __ne__(self, other):
|
|
111
|
+
"""Returns true if both objects are not equal"""
|
|
112
|
+
return not self == other
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SearchAfterParam:
|
|
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
|
+
'score': 'float',
|
|
19
|
+
'id': 'str'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'score': 'score',
|
|
24
|
+
'id': 'id'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, score=None, id=None):
|
|
28
|
+
r"""SearchAfterParam
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param score: 结果的得分。
|
|
33
|
+
:type score: float
|
|
34
|
+
:param id: 结果的唯一ID。
|
|
35
|
+
:type id: str
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._score = None
|
|
41
|
+
self._id = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
if score is not None:
|
|
45
|
+
self.score = score
|
|
46
|
+
if id is not None:
|
|
47
|
+
self.id = id
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def score(self):
|
|
51
|
+
r"""Gets the score of this SearchAfterParam.
|
|
52
|
+
|
|
53
|
+
结果的得分。
|
|
54
|
+
|
|
55
|
+
:return: The score of this SearchAfterParam.
|
|
56
|
+
:rtype: float
|
|
57
|
+
"""
|
|
58
|
+
return self._score
|
|
59
|
+
|
|
60
|
+
@score.setter
|
|
61
|
+
def score(self, score):
|
|
62
|
+
r"""Sets the score of this SearchAfterParam.
|
|
63
|
+
|
|
64
|
+
结果的得分。
|
|
65
|
+
|
|
66
|
+
:param score: The score of this SearchAfterParam.
|
|
67
|
+
:type score: float
|
|
68
|
+
"""
|
|
69
|
+
self._score = score
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def id(self):
|
|
73
|
+
r"""Gets the id of this SearchAfterParam.
|
|
74
|
+
|
|
75
|
+
结果的唯一ID。
|
|
76
|
+
|
|
77
|
+
:return: The id of this SearchAfterParam.
|
|
78
|
+
:rtype: str
|
|
79
|
+
"""
|
|
80
|
+
return self._id
|
|
81
|
+
|
|
82
|
+
@id.setter
|
|
83
|
+
def id(self, id):
|
|
84
|
+
r"""Sets the id of this SearchAfterParam.
|
|
85
|
+
|
|
86
|
+
结果的唯一ID。
|
|
87
|
+
|
|
88
|
+
:param id: The id of this SearchAfterParam.
|
|
89
|
+
:type id: str
|
|
90
|
+
"""
|
|
91
|
+
self._id = id
|
|
92
|
+
|
|
93
|
+
def to_dict(self):
|
|
94
|
+
result = {}
|
|
95
|
+
|
|
96
|
+
for attr, _ in self.openapi_types.items():
|
|
97
|
+
value = getattr(self, attr)
|
|
98
|
+
if isinstance(value, list):
|
|
99
|
+
result[attr] = list(map(
|
|
100
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
101
|
+
value
|
|
102
|
+
))
|
|
103
|
+
elif hasattr(value, "to_dict"):
|
|
104
|
+
result[attr] = value.to_dict()
|
|
105
|
+
elif isinstance(value, dict):
|
|
106
|
+
result[attr] = dict(map(
|
|
107
|
+
lambda item: (item[0], item[1].to_dict())
|
|
108
|
+
if hasattr(item[1], "to_dict") else item,
|
|
109
|
+
value.items()
|
|
110
|
+
))
|
|
111
|
+
else:
|
|
112
|
+
if attr in self.sensitive_list:
|
|
113
|
+
result[attr] = "****"
|
|
114
|
+
else:
|
|
115
|
+
result[attr] = value
|
|
116
|
+
|
|
117
|
+
return result
|
|
118
|
+
|
|
119
|
+
def to_str(self):
|
|
120
|
+
"""Returns the string representation of the model"""
|
|
121
|
+
import simplejson as json
|
|
122
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
123
|
+
|
|
124
|
+
def __repr__(self):
|
|
125
|
+
"""For `print`"""
|
|
126
|
+
return self.to_str()
|
|
127
|
+
|
|
128
|
+
def __eq__(self, other):
|
|
129
|
+
"""Returns true if both objects are equal"""
|
|
130
|
+
if not isinstance(other, SearchAfterParam):
|
|
131
|
+
return False
|
|
132
|
+
|
|
133
|
+
return self.__dict__ == other.__dict__
|
|
134
|
+
|
|
135
|
+
def __ne__(self, other):
|
|
136
|
+
"""Returns true if both objects are not equal"""
|
|
137
|
+
return not self == other
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SearchInfo:
|
|
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
|
+
'total_num': 'int',
|
|
19
|
+
'return_num': 'int',
|
|
20
|
+
'search_time': 'int',
|
|
21
|
+
'last_item': 'SearchAfterParam'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'total_num': 'total_num',
|
|
26
|
+
'return_num': 'return_num',
|
|
27
|
+
'search_time': 'search_time',
|
|
28
|
+
'last_item': 'last_item'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, total_num=None, return_num=None, search_time=None, last_item=None):
|
|
32
|
+
r"""SearchInfo
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param total_num: 搜索结果总数。
|
|
37
|
+
:type total_num: int
|
|
38
|
+
:param return_num: 返回结果总数。
|
|
39
|
+
:type return_num: int
|
|
40
|
+
:param search_time: 搜索过程耗时,单位为毫秒。
|
|
41
|
+
:type search_time: int
|
|
42
|
+
:param last_item:
|
|
43
|
+
:type last_item: :class:`huaweicloudsdkimagesearch.v2.SearchAfterParam`
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
self._total_num = None
|
|
49
|
+
self._return_num = None
|
|
50
|
+
self._search_time = None
|
|
51
|
+
self._last_item = None
|
|
52
|
+
self.discriminator = None
|
|
53
|
+
|
|
54
|
+
if total_num is not None:
|
|
55
|
+
self.total_num = total_num
|
|
56
|
+
if return_num is not None:
|
|
57
|
+
self.return_num = return_num
|
|
58
|
+
if search_time is not None:
|
|
59
|
+
self.search_time = search_time
|
|
60
|
+
if last_item is not None:
|
|
61
|
+
self.last_item = last_item
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def total_num(self):
|
|
65
|
+
r"""Gets the total_num of this SearchInfo.
|
|
66
|
+
|
|
67
|
+
搜索结果总数。
|
|
68
|
+
|
|
69
|
+
:return: The total_num of this SearchInfo.
|
|
70
|
+
:rtype: int
|
|
71
|
+
"""
|
|
72
|
+
return self._total_num
|
|
73
|
+
|
|
74
|
+
@total_num.setter
|
|
75
|
+
def total_num(self, total_num):
|
|
76
|
+
r"""Sets the total_num of this SearchInfo.
|
|
77
|
+
|
|
78
|
+
搜索结果总数。
|
|
79
|
+
|
|
80
|
+
:param total_num: The total_num of this SearchInfo.
|
|
81
|
+
:type total_num: int
|
|
82
|
+
"""
|
|
83
|
+
self._total_num = total_num
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def return_num(self):
|
|
87
|
+
r"""Gets the return_num of this SearchInfo.
|
|
88
|
+
|
|
89
|
+
返回结果总数。
|
|
90
|
+
|
|
91
|
+
:return: The return_num of this SearchInfo.
|
|
92
|
+
:rtype: int
|
|
93
|
+
"""
|
|
94
|
+
return self._return_num
|
|
95
|
+
|
|
96
|
+
@return_num.setter
|
|
97
|
+
def return_num(self, return_num):
|
|
98
|
+
r"""Sets the return_num of this SearchInfo.
|
|
99
|
+
|
|
100
|
+
返回结果总数。
|
|
101
|
+
|
|
102
|
+
:param return_num: The return_num of this SearchInfo.
|
|
103
|
+
:type return_num: int
|
|
104
|
+
"""
|
|
105
|
+
self._return_num = return_num
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def search_time(self):
|
|
109
|
+
r"""Gets the search_time of this SearchInfo.
|
|
110
|
+
|
|
111
|
+
搜索过程耗时,单位为毫秒。
|
|
112
|
+
|
|
113
|
+
:return: The search_time of this SearchInfo.
|
|
114
|
+
:rtype: int
|
|
115
|
+
"""
|
|
116
|
+
return self._search_time
|
|
117
|
+
|
|
118
|
+
@search_time.setter
|
|
119
|
+
def search_time(self, search_time):
|
|
120
|
+
r"""Sets the search_time of this SearchInfo.
|
|
121
|
+
|
|
122
|
+
搜索过程耗时,单位为毫秒。
|
|
123
|
+
|
|
124
|
+
:param search_time: The search_time of this SearchInfo.
|
|
125
|
+
:type search_time: int
|
|
126
|
+
"""
|
|
127
|
+
self._search_time = search_time
|
|
128
|
+
|
|
129
|
+
@property
|
|
130
|
+
def last_item(self):
|
|
131
|
+
r"""Gets the last_item of this SearchInfo.
|
|
132
|
+
|
|
133
|
+
:return: The last_item of this SearchInfo.
|
|
134
|
+
:rtype: :class:`huaweicloudsdkimagesearch.v2.SearchAfterParam`
|
|
135
|
+
"""
|
|
136
|
+
return self._last_item
|
|
137
|
+
|
|
138
|
+
@last_item.setter
|
|
139
|
+
def last_item(self, last_item):
|
|
140
|
+
r"""Sets the last_item of this SearchInfo.
|
|
141
|
+
|
|
142
|
+
:param last_item: The last_item of this SearchInfo.
|
|
143
|
+
:type last_item: :class:`huaweicloudsdkimagesearch.v2.SearchAfterParam`
|
|
144
|
+
"""
|
|
145
|
+
self._last_item = last_item
|
|
146
|
+
|
|
147
|
+
def to_dict(self):
|
|
148
|
+
result = {}
|
|
149
|
+
|
|
150
|
+
for attr, _ in self.openapi_types.items():
|
|
151
|
+
value = getattr(self, attr)
|
|
152
|
+
if isinstance(value, list):
|
|
153
|
+
result[attr] = list(map(
|
|
154
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
155
|
+
value
|
|
156
|
+
))
|
|
157
|
+
elif hasattr(value, "to_dict"):
|
|
158
|
+
result[attr] = value.to_dict()
|
|
159
|
+
elif isinstance(value, dict):
|
|
160
|
+
result[attr] = dict(map(
|
|
161
|
+
lambda item: (item[0], item[1].to_dict())
|
|
162
|
+
if hasattr(item[1], "to_dict") else item,
|
|
163
|
+
value.items()
|
|
164
|
+
))
|
|
165
|
+
else:
|
|
166
|
+
if attr in self.sensitive_list:
|
|
167
|
+
result[attr] = "****"
|
|
168
|
+
else:
|
|
169
|
+
result[attr] = value
|
|
170
|
+
|
|
171
|
+
return result
|
|
172
|
+
|
|
173
|
+
def to_str(self):
|
|
174
|
+
"""Returns the string representation of the model"""
|
|
175
|
+
import simplejson as json
|
|
176
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
177
|
+
|
|
178
|
+
def __repr__(self):
|
|
179
|
+
"""For `print`"""
|
|
180
|
+
return self.to_str()
|
|
181
|
+
|
|
182
|
+
def __eq__(self, other):
|
|
183
|
+
"""Returns true if both objects are equal"""
|
|
184
|
+
if not isinstance(other, SearchInfo):
|
|
185
|
+
return False
|
|
186
|
+
|
|
187
|
+
return self.__dict__ == other.__dict__
|
|
188
|
+
|
|
189
|
+
def __ne__(self, other):
|
|
190
|
+
"""Returns true if both objects are not equal"""
|
|
191
|
+
return not self == other
|