huaweicloudsdkversatile 3.1.184__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.
- huaweicloudsdkversatile/__init__.py +0 -0
- huaweicloudsdkversatile/v1/__init__.py +32 -0
- huaweicloudsdkversatile/v1/model/__init__.py +29 -0
- huaweicloudsdkversatile/v1/model/agent_run_req.py +302 -0
- huaweicloudsdkversatile/v1/model/conversation.py +129 -0
- huaweicloudsdkversatile/v1/model/feedback_reason.py +136 -0
- huaweicloudsdkversatile/v1/model/knowledge_base_retrieval_req.py +251 -0
- huaweicloudsdkversatile/v1/model/message.py +506 -0
- huaweicloudsdkversatile/v1/model/node_message.py +282 -0
- huaweicloudsdkversatile/v1/model/node_run_info.py +709 -0
- huaweicloudsdkversatile/v1/model/node_run_info_inner_error.py +133 -0
- huaweicloudsdkversatile/v1/model/node_run_info_inner_error_error_body.py +137 -0
- huaweicloudsdkversatile/v1/model/plugin_config.py +137 -0
- huaweicloudsdkversatile/v1/model/retrieval_result_info.py +282 -0
- huaweicloudsdkversatile/v1/model/run_agent_request.py +276 -0
- huaweicloudsdkversatile/v1/model/run_agent_response.py +378 -0
- huaweicloudsdkversatile/v1/model/run_workflow_request.py +247 -0
- huaweicloudsdkversatile/v1/model/run_workflow_response.py +378 -0
- huaweicloudsdkversatile/v1/model/search_knowledge_base_request.py +104 -0
- huaweicloudsdkversatile/v1/model/search_knowledge_base_response.py +141 -0
- huaweicloudsdkversatile/v1/model/status.py +135 -0
- huaweicloudsdkversatile/v1/model/upload_agent_file_request.py +190 -0
- huaweicloudsdkversatile/v1/model/upload_agent_file_request_body.py +107 -0
- huaweicloudsdkversatile/v1/model/upload_agent_file_response.py +170 -0
- huaweicloudsdkversatile/v1/model/user_profile.py +137 -0
- huaweicloudsdkversatile/v1/model/workflow_run_req.py +344 -0
- huaweicloudsdkversatile/v1/model/workflow_run_stream_rsp.py +195 -0
- huaweicloudsdkversatile/v1/region/__init__.py +0 -0
- huaweicloudsdkversatile/v1/region/versatile_region.py +31 -0
- huaweicloudsdkversatile/v1/versatile_async_client.py +378 -0
- huaweicloudsdkversatile/v1/versatile_client.py +375 -0
- huaweicloudsdkversatile-3.1.184.dist-info/METADATA +25 -0
- huaweicloudsdkversatile-3.1.184.dist-info/RECORD +35 -0
- huaweicloudsdkversatile-3.1.184.dist-info/WHEEL +4 -0
- huaweicloudsdkversatile-3.1.184.dist-info/licenses/LICENSE +13 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SearchKnowledgeBaseRequest:
|
|
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
|
+
'body': 'KnowledgeBaseRetrievalReq'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
attribute_map = {
|
|
22
|
+
'body': 'body'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
def __init__(self, body=None):
|
|
26
|
+
r"""SearchKnowledgeBaseRequest
|
|
27
|
+
|
|
28
|
+
The model defined in huaweicloud sdk
|
|
29
|
+
|
|
30
|
+
:param body: Body of the SearchKnowledgeBaseRequest
|
|
31
|
+
:type body: :class:`huaweicloudsdkversatile.v1.KnowledgeBaseRetrievalReq`
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
self._body = None
|
|
37
|
+
self.discriminator = None
|
|
38
|
+
|
|
39
|
+
if body is not None:
|
|
40
|
+
self.body = body
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def body(self):
|
|
44
|
+
r"""Gets the body of this SearchKnowledgeBaseRequest.
|
|
45
|
+
|
|
46
|
+
:return: The body of this SearchKnowledgeBaseRequest.
|
|
47
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.KnowledgeBaseRetrievalReq`
|
|
48
|
+
"""
|
|
49
|
+
return self._body
|
|
50
|
+
|
|
51
|
+
@body.setter
|
|
52
|
+
def body(self, body):
|
|
53
|
+
r"""Sets the body of this SearchKnowledgeBaseRequest.
|
|
54
|
+
|
|
55
|
+
:param body: The body of this SearchKnowledgeBaseRequest.
|
|
56
|
+
:type body: :class:`huaweicloudsdkversatile.v1.KnowledgeBaseRetrievalReq`
|
|
57
|
+
"""
|
|
58
|
+
self._body = body
|
|
59
|
+
|
|
60
|
+
def to_dict(self):
|
|
61
|
+
result = {}
|
|
62
|
+
|
|
63
|
+
for attr, _ in self.openapi_types.items():
|
|
64
|
+
value = getattr(self, attr)
|
|
65
|
+
if isinstance(value, list):
|
|
66
|
+
result[attr] = list(map(
|
|
67
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
68
|
+
value
|
|
69
|
+
))
|
|
70
|
+
elif hasattr(value, "to_dict"):
|
|
71
|
+
result[attr] = value.to_dict()
|
|
72
|
+
elif isinstance(value, dict):
|
|
73
|
+
result[attr] = dict(map(
|
|
74
|
+
lambda item: (item[0], item[1].to_dict())
|
|
75
|
+
if hasattr(item[1], "to_dict") else item,
|
|
76
|
+
value.items()
|
|
77
|
+
))
|
|
78
|
+
else:
|
|
79
|
+
if attr in self.sensitive_list:
|
|
80
|
+
result[attr] = "****"
|
|
81
|
+
else:
|
|
82
|
+
result[attr] = value
|
|
83
|
+
|
|
84
|
+
return result
|
|
85
|
+
|
|
86
|
+
def to_str(self):
|
|
87
|
+
"""Returns the string representation of the model"""
|
|
88
|
+
import simplejson as json
|
|
89
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
90
|
+
|
|
91
|
+
def __repr__(self):
|
|
92
|
+
"""For `print`"""
|
|
93
|
+
return self.to_str()
|
|
94
|
+
|
|
95
|
+
def __eq__(self, other):
|
|
96
|
+
"""Returns true if both objects are equal"""
|
|
97
|
+
if not isinstance(other, SearchKnowledgeBaseRequest):
|
|
98
|
+
return False
|
|
99
|
+
|
|
100
|
+
return self.__dict__ == other.__dict__
|
|
101
|
+
|
|
102
|
+
def __ne__(self, other):
|
|
103
|
+
"""Returns true if both objects are not equal"""
|
|
104
|
+
return not self == other
|
|
@@ -0,0 +1,141 @@
|
|
|
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 SearchKnowledgeBaseResponse(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
|
+
'total': 'int',
|
|
20
|
+
'retrieve_result_list': 'list[RetrievalResultInfo]'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'total': 'total',
|
|
25
|
+
'retrieve_result_list': 'retrieve_result_list'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
def __init__(self, total=None, retrieve_result_list=None):
|
|
29
|
+
r"""SearchKnowledgeBaseResponse
|
|
30
|
+
|
|
31
|
+
The model defined in huaweicloud sdk
|
|
32
|
+
|
|
33
|
+
:param total: **参数解释**: 检索结果总数。 **取值范围**: 不涉及。
|
|
34
|
+
:type total: int
|
|
35
|
+
:param retrieve_result_list: **参数解释**: 检索结果列表。 **取值范围**: 不涉及。
|
|
36
|
+
:type retrieve_result_list: list[:class:`huaweicloudsdkversatile.v1.RetrievalResultInfo`]
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
super().__init__()
|
|
40
|
+
|
|
41
|
+
self._total = None
|
|
42
|
+
self._retrieve_result_list = None
|
|
43
|
+
self.discriminator = None
|
|
44
|
+
|
|
45
|
+
if total is not None:
|
|
46
|
+
self.total = total
|
|
47
|
+
if retrieve_result_list is not None:
|
|
48
|
+
self.retrieve_result_list = retrieve_result_list
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def total(self):
|
|
52
|
+
r"""Gets the total of this SearchKnowledgeBaseResponse.
|
|
53
|
+
|
|
54
|
+
**参数解释**: 检索结果总数。 **取值范围**: 不涉及。
|
|
55
|
+
|
|
56
|
+
:return: The total of this SearchKnowledgeBaseResponse.
|
|
57
|
+
:rtype: int
|
|
58
|
+
"""
|
|
59
|
+
return self._total
|
|
60
|
+
|
|
61
|
+
@total.setter
|
|
62
|
+
def total(self, total):
|
|
63
|
+
r"""Sets the total of this SearchKnowledgeBaseResponse.
|
|
64
|
+
|
|
65
|
+
**参数解释**: 检索结果总数。 **取值范围**: 不涉及。
|
|
66
|
+
|
|
67
|
+
:param total: The total of this SearchKnowledgeBaseResponse.
|
|
68
|
+
:type total: int
|
|
69
|
+
"""
|
|
70
|
+
self._total = total
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def retrieve_result_list(self):
|
|
74
|
+
r"""Gets the retrieve_result_list of this SearchKnowledgeBaseResponse.
|
|
75
|
+
|
|
76
|
+
**参数解释**: 检索结果列表。 **取值范围**: 不涉及。
|
|
77
|
+
|
|
78
|
+
:return: The retrieve_result_list of this SearchKnowledgeBaseResponse.
|
|
79
|
+
:rtype: list[:class:`huaweicloudsdkversatile.v1.RetrievalResultInfo`]
|
|
80
|
+
"""
|
|
81
|
+
return self._retrieve_result_list
|
|
82
|
+
|
|
83
|
+
@retrieve_result_list.setter
|
|
84
|
+
def retrieve_result_list(self, retrieve_result_list):
|
|
85
|
+
r"""Sets the retrieve_result_list of this SearchKnowledgeBaseResponse.
|
|
86
|
+
|
|
87
|
+
**参数解释**: 检索结果列表。 **取值范围**: 不涉及。
|
|
88
|
+
|
|
89
|
+
:param retrieve_result_list: The retrieve_result_list of this SearchKnowledgeBaseResponse.
|
|
90
|
+
:type retrieve_result_list: list[:class:`huaweicloudsdkversatile.v1.RetrievalResultInfo`]
|
|
91
|
+
"""
|
|
92
|
+
self._retrieve_result_list = retrieve_result_list
|
|
93
|
+
|
|
94
|
+
def to_dict(self):
|
|
95
|
+
import warnings
|
|
96
|
+
warnings.warn("SearchKnowledgeBaseResponse.to_dict() is deprecated and no longer maintained, "
|
|
97
|
+
"use to_json_object() to get the response content.", DeprecationWarning)
|
|
98
|
+
result = {}
|
|
99
|
+
|
|
100
|
+
for attr, _ in self.openapi_types.items():
|
|
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
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
127
|
+
|
|
128
|
+
def __repr__(self):
|
|
129
|
+
"""For `print`"""
|
|
130
|
+
return self.to_str()
|
|
131
|
+
|
|
132
|
+
def __eq__(self, other):
|
|
133
|
+
"""Returns true if both objects are equal"""
|
|
134
|
+
if not isinstance(other, SearchKnowledgeBaseResponse):
|
|
135
|
+
return False
|
|
136
|
+
|
|
137
|
+
return self.__dict__ == other.__dict__
|
|
138
|
+
|
|
139
|
+
def __ne__(self, other):
|
|
140
|
+
"""Returns true if both objects are not equal"""
|
|
141
|
+
return not self == other
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Status:
|
|
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
|
+
'code': 'int',
|
|
19
|
+
'desc': 'str'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
attribute_map = {
|
|
23
|
+
'code': 'code',
|
|
24
|
+
'desc': 'desc'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, code=None, desc=None):
|
|
28
|
+
r"""Status
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param code: 错误码
|
|
33
|
+
:type code: int
|
|
34
|
+
:param desc: 错误描述信息
|
|
35
|
+
:type desc: str
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
self._code = None
|
|
41
|
+
self._desc = None
|
|
42
|
+
self.discriminator = None
|
|
43
|
+
|
|
44
|
+
self.code = code
|
|
45
|
+
self.desc = desc
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def code(self):
|
|
49
|
+
r"""Gets the code of this Status.
|
|
50
|
+
|
|
51
|
+
错误码
|
|
52
|
+
|
|
53
|
+
:return: The code of this Status.
|
|
54
|
+
:rtype: int
|
|
55
|
+
"""
|
|
56
|
+
return self._code
|
|
57
|
+
|
|
58
|
+
@code.setter
|
|
59
|
+
def code(self, code):
|
|
60
|
+
r"""Sets the code of this Status.
|
|
61
|
+
|
|
62
|
+
错误码
|
|
63
|
+
|
|
64
|
+
:param code: The code of this Status.
|
|
65
|
+
:type code: int
|
|
66
|
+
"""
|
|
67
|
+
self._code = code
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def desc(self):
|
|
71
|
+
r"""Gets the desc of this Status.
|
|
72
|
+
|
|
73
|
+
错误描述信息
|
|
74
|
+
|
|
75
|
+
:return: The desc of this Status.
|
|
76
|
+
:rtype: str
|
|
77
|
+
"""
|
|
78
|
+
return self._desc
|
|
79
|
+
|
|
80
|
+
@desc.setter
|
|
81
|
+
def desc(self, desc):
|
|
82
|
+
r"""Sets the desc of this Status.
|
|
83
|
+
|
|
84
|
+
错误描述信息
|
|
85
|
+
|
|
86
|
+
:param desc: The desc of this Status.
|
|
87
|
+
:type desc: str
|
|
88
|
+
"""
|
|
89
|
+
self._desc = desc
|
|
90
|
+
|
|
91
|
+
def to_dict(self):
|
|
92
|
+
result = {}
|
|
93
|
+
|
|
94
|
+
for attr, _ in self.openapi_types.items():
|
|
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
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
121
|
+
|
|
122
|
+
def __repr__(self):
|
|
123
|
+
"""For `print`"""
|
|
124
|
+
return self.to_str()
|
|
125
|
+
|
|
126
|
+
def __eq__(self, other):
|
|
127
|
+
"""Returns true if both objects are equal"""
|
|
128
|
+
if not isinstance(other, Status):
|
|
129
|
+
return False
|
|
130
|
+
|
|
131
|
+
return self.__dict__ == other.__dict__
|
|
132
|
+
|
|
133
|
+
def __ne__(self, other):
|
|
134
|
+
"""Returns true if both objects are not equal"""
|
|
135
|
+
return not self == other
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class UploadAgentFileRequest:
|
|
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
|
+
'workspace_id': 'str',
|
|
19
|
+
'expires': 'int',
|
|
20
|
+
'is_image': 'bool',
|
|
21
|
+
'body': 'UploadAgentFileRequestBody'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'workspace_id': 'workspace_id',
|
|
26
|
+
'expires': 'expires',
|
|
27
|
+
'is_image': 'is_image',
|
|
28
|
+
'body': 'body'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, workspace_id=None, expires=None, is_image=None, body=None):
|
|
32
|
+
r"""UploadAgentFileRequest
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param workspace_id: **参数解释**: 空间ID,当前资源所属工作空间 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符
|
|
37
|
+
:type workspace_id: str
|
|
38
|
+
:param expires: 访问授权过期时间(天)
|
|
39
|
+
:type expires: int
|
|
40
|
+
:param is_image: 是否是图片上传
|
|
41
|
+
:type is_image: bool
|
|
42
|
+
:param body: Body of the UploadAgentFileRequest
|
|
43
|
+
:type body: :class:`huaweicloudsdkversatile.v1.UploadAgentFileRequestBody`
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
self._workspace_id = None
|
|
49
|
+
self._expires = None
|
|
50
|
+
self._is_image = None
|
|
51
|
+
self._body = None
|
|
52
|
+
self.discriminator = None
|
|
53
|
+
|
|
54
|
+
self.workspace_id = workspace_id
|
|
55
|
+
if expires is not None:
|
|
56
|
+
self.expires = expires
|
|
57
|
+
if is_image is not None:
|
|
58
|
+
self.is_image = is_image
|
|
59
|
+
if body is not None:
|
|
60
|
+
self.body = body
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def workspace_id(self):
|
|
64
|
+
r"""Gets the workspace_id of this UploadAgentFileRequest.
|
|
65
|
+
|
|
66
|
+
**参数解释**: 空间ID,当前资源所属工作空间 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符
|
|
67
|
+
|
|
68
|
+
:return: The workspace_id of this UploadAgentFileRequest.
|
|
69
|
+
:rtype: str
|
|
70
|
+
"""
|
|
71
|
+
return self._workspace_id
|
|
72
|
+
|
|
73
|
+
@workspace_id.setter
|
|
74
|
+
def workspace_id(self, workspace_id):
|
|
75
|
+
r"""Sets the workspace_id of this UploadAgentFileRequest.
|
|
76
|
+
|
|
77
|
+
**参数解释**: 空间ID,当前资源所属工作空间 **取值范围**: 由英文,数字,“-”,“_”组成,不超过64位字符
|
|
78
|
+
|
|
79
|
+
:param workspace_id: The workspace_id of this UploadAgentFileRequest.
|
|
80
|
+
:type workspace_id: str
|
|
81
|
+
"""
|
|
82
|
+
self._workspace_id = workspace_id
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def expires(self):
|
|
86
|
+
r"""Gets the expires of this UploadAgentFileRequest.
|
|
87
|
+
|
|
88
|
+
访问授权过期时间(天)
|
|
89
|
+
|
|
90
|
+
:return: The expires of this UploadAgentFileRequest.
|
|
91
|
+
:rtype: int
|
|
92
|
+
"""
|
|
93
|
+
return self._expires
|
|
94
|
+
|
|
95
|
+
@expires.setter
|
|
96
|
+
def expires(self, expires):
|
|
97
|
+
r"""Sets the expires of this UploadAgentFileRequest.
|
|
98
|
+
|
|
99
|
+
访问授权过期时间(天)
|
|
100
|
+
|
|
101
|
+
:param expires: The expires of this UploadAgentFileRequest.
|
|
102
|
+
:type expires: int
|
|
103
|
+
"""
|
|
104
|
+
self._expires = expires
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def is_image(self):
|
|
108
|
+
r"""Gets the is_image of this UploadAgentFileRequest.
|
|
109
|
+
|
|
110
|
+
是否是图片上传
|
|
111
|
+
|
|
112
|
+
:return: The is_image of this UploadAgentFileRequest.
|
|
113
|
+
:rtype: bool
|
|
114
|
+
"""
|
|
115
|
+
return self._is_image
|
|
116
|
+
|
|
117
|
+
@is_image.setter
|
|
118
|
+
def is_image(self, is_image):
|
|
119
|
+
r"""Sets the is_image of this UploadAgentFileRequest.
|
|
120
|
+
|
|
121
|
+
是否是图片上传
|
|
122
|
+
|
|
123
|
+
:param is_image: The is_image of this UploadAgentFileRequest.
|
|
124
|
+
:type is_image: bool
|
|
125
|
+
"""
|
|
126
|
+
self._is_image = is_image
|
|
127
|
+
|
|
128
|
+
@property
|
|
129
|
+
def body(self):
|
|
130
|
+
r"""Gets the body of this UploadAgentFileRequest.
|
|
131
|
+
|
|
132
|
+
:return: The body of this UploadAgentFileRequest.
|
|
133
|
+
:rtype: :class:`huaweicloudsdkversatile.v1.UploadAgentFileRequestBody`
|
|
134
|
+
"""
|
|
135
|
+
return self._body
|
|
136
|
+
|
|
137
|
+
@body.setter
|
|
138
|
+
def body(self, body):
|
|
139
|
+
r"""Sets the body of this UploadAgentFileRequest.
|
|
140
|
+
|
|
141
|
+
:param body: The body of this UploadAgentFileRequest.
|
|
142
|
+
:type body: :class:`huaweicloudsdkversatile.v1.UploadAgentFileRequestBody`
|
|
143
|
+
"""
|
|
144
|
+
self._body = body
|
|
145
|
+
|
|
146
|
+
def to_dict(self):
|
|
147
|
+
result = {}
|
|
148
|
+
|
|
149
|
+
for attr, _ in self.openapi_types.items():
|
|
150
|
+
value = getattr(self, attr)
|
|
151
|
+
if isinstance(value, list):
|
|
152
|
+
result[attr] = list(map(
|
|
153
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
154
|
+
value
|
|
155
|
+
))
|
|
156
|
+
elif hasattr(value, "to_dict"):
|
|
157
|
+
result[attr] = value.to_dict()
|
|
158
|
+
elif isinstance(value, dict):
|
|
159
|
+
result[attr] = dict(map(
|
|
160
|
+
lambda item: (item[0], item[1].to_dict())
|
|
161
|
+
if hasattr(item[1], "to_dict") else item,
|
|
162
|
+
value.items()
|
|
163
|
+
))
|
|
164
|
+
else:
|
|
165
|
+
if attr in self.sensitive_list:
|
|
166
|
+
result[attr] = "****"
|
|
167
|
+
else:
|
|
168
|
+
result[attr] = value
|
|
169
|
+
|
|
170
|
+
return result
|
|
171
|
+
|
|
172
|
+
def to_str(self):
|
|
173
|
+
"""Returns the string representation of the model"""
|
|
174
|
+
import simplejson as json
|
|
175
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
176
|
+
|
|
177
|
+
def __repr__(self):
|
|
178
|
+
"""For `print`"""
|
|
179
|
+
return self.to_str()
|
|
180
|
+
|
|
181
|
+
def __eq__(self, other):
|
|
182
|
+
"""Returns true if both objects are equal"""
|
|
183
|
+
if not isinstance(other, UploadAgentFileRequest):
|
|
184
|
+
return False
|
|
185
|
+
|
|
186
|
+
return self.__dict__ == other.__dict__
|
|
187
|
+
|
|
188
|
+
def __ne__(self, other):
|
|
189
|
+
"""Returns true if both objects are not equal"""
|
|
190
|
+
return not self == other
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class UploadAgentFileRequestBody:
|
|
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
|
+
'file': 'file'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
attribute_map = {
|
|
22
|
+
'file': 'file'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
def __init__(self, file=None):
|
|
26
|
+
r"""UploadAgentFileRequestBody
|
|
27
|
+
|
|
28
|
+
The model defined in huaweicloud sdk
|
|
29
|
+
|
|
30
|
+
:param file: 待上传的文件
|
|
31
|
+
:type file: :class:`huaweicloudsdkcore.http.formdata.FormFile`
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
self._file = None
|
|
37
|
+
self.discriminator = None
|
|
38
|
+
|
|
39
|
+
self.file = file
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def file(self):
|
|
43
|
+
r"""Gets the file of this UploadAgentFileRequestBody.
|
|
44
|
+
|
|
45
|
+
待上传的文件
|
|
46
|
+
|
|
47
|
+
:return: The file of this UploadAgentFileRequestBody.
|
|
48
|
+
:rtype: :class:`huaweicloudsdkcore.http.formdata.FormFile`
|
|
49
|
+
"""
|
|
50
|
+
return self._file
|
|
51
|
+
|
|
52
|
+
@file.setter
|
|
53
|
+
def file(self, file):
|
|
54
|
+
r"""Sets the file of this UploadAgentFileRequestBody.
|
|
55
|
+
|
|
56
|
+
待上传的文件
|
|
57
|
+
|
|
58
|
+
:param file: The file of this UploadAgentFileRequestBody.
|
|
59
|
+
:type file: :class:`huaweicloudsdkcore.http.formdata.FormFile`
|
|
60
|
+
"""
|
|
61
|
+
self._file = file
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
result = {}
|
|
65
|
+
|
|
66
|
+
for attr, _ in self.openapi_types.items():
|
|
67
|
+
value = getattr(self, attr)
|
|
68
|
+
if isinstance(value, list):
|
|
69
|
+
result[attr] = list(map(
|
|
70
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
71
|
+
value
|
|
72
|
+
))
|
|
73
|
+
elif hasattr(value, "to_dict"):
|
|
74
|
+
result[attr] = value.to_dict()
|
|
75
|
+
elif isinstance(value, dict):
|
|
76
|
+
result[attr] = dict(map(
|
|
77
|
+
lambda item: (item[0], item[1].to_dict())
|
|
78
|
+
if hasattr(item[1], "to_dict") else item,
|
|
79
|
+
value.items()
|
|
80
|
+
))
|
|
81
|
+
else:
|
|
82
|
+
if attr in self.sensitive_list:
|
|
83
|
+
result[attr] = "****"
|
|
84
|
+
else:
|
|
85
|
+
result[attr] = value
|
|
86
|
+
|
|
87
|
+
return result
|
|
88
|
+
|
|
89
|
+
def to_str(self):
|
|
90
|
+
"""Returns the string representation of the model"""
|
|
91
|
+
import simplejson as json
|
|
92
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
93
|
+
|
|
94
|
+
def __repr__(self):
|
|
95
|
+
"""For `print`"""
|
|
96
|
+
return self.to_str()
|
|
97
|
+
|
|
98
|
+
def __eq__(self, other):
|
|
99
|
+
"""Returns true if both objects are equal"""
|
|
100
|
+
if not isinstance(other, UploadAgentFileRequestBody):
|
|
101
|
+
return False
|
|
102
|
+
|
|
103
|
+
return self.__dict__ == other.__dict__
|
|
104
|
+
|
|
105
|
+
def __ne__(self, other):
|
|
106
|
+
"""Returns true if both objects are not equal"""
|
|
107
|
+
return not self == other
|