huaweicloudsdkmsgsms 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.
- huaweicloudsdkmsgsms/__init__.py +0 -0
- huaweicloudsdkmsgsms/v2/__init__.py +60 -0
- huaweicloudsdkmsgsms/v2/model/__init__.py +57 -0
- huaweicloudsdkmsgsms/v2/model/api_template_variable.py +289 -0
- huaweicloudsdkmsgsms/v2/model/create_app_request.py +111 -0
- huaweicloudsdkmsgsms/v2/model/create_app_response.py +203 -0
- huaweicloudsdkmsgsms/v2/model/create_signature_request.py +111 -0
- huaweicloudsdkmsgsms/v2/model/create_signature_response.py +174 -0
- huaweicloudsdkmsgsms/v2/model/create_template_request.py +111 -0
- huaweicloudsdkmsgsms/v2/model/create_template_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/delete_signature_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/delete_signature_response.py +85 -0
- huaweicloudsdkmsgsms/v2/model/delete_template_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/delete_template_response.py +85 -0
- huaweicloudsdkmsgsms/v2/model/enable_signature_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/enable_signature_response.py +85 -0
- huaweicloudsdkmsgsms/v2/model/list_app_details_request.py +347 -0
- huaweicloudsdkmsgsms/v2/model/list_app_details_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/list_send_country_details_request.py +144 -0
- huaweicloudsdkmsgsms/v2/model/list_send_country_details_response.py +112 -0
- huaweicloudsdkmsgsms/v2/model/list_signature_details_request.py +434 -0
- huaweicloudsdkmsgsms/v2/model/list_signature_details_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/list_template_details_request.py +521 -0
- huaweicloudsdkmsgsms/v2/model/list_template_details_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/list_template_varilable_details_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/list_template_varilable_details_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/show_app_count_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/show_app_count_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/show_app_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/show_app_response.py +721 -0
- huaweicloudsdkmsgsms/v2/model/show_signature_file_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/show_signature_file_response.py +348 -0
- huaweicloudsdkmsgsms/v2/model/show_signature_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/show_signature_response.py +837 -0
- huaweicloudsdkmsgsms/v2/model/show_template_request.py +114 -0
- huaweicloudsdkmsgsms/v2/model/show_template_response.py +953 -0
- huaweicloudsdkmsgsms/v2/model/sms_app_add_req.py +287 -0
- huaweicloudsdkmsgsms/v2/model/sms_app_query_resp.py +720 -0
- huaweicloudsdkmsgsms/v2/model/sms_app_update_req.py +258 -0
- huaweicloudsdkmsgsms/v2/model/sms_country_resp.py +173 -0
- huaweicloudsdkmsgsms/v2/model/sms_signature_req.py +371 -0
- huaweicloudsdkmsgsms/v2/model/sms_signature_resp.py +836 -0
- huaweicloudsdkmsgsms/v2/model/sms_template_req.py +429 -0
- huaweicloudsdkmsgsms/v2/model/sms_template_resp.py +952 -0
- huaweicloudsdkmsgsms/v2/model/sms_template_variable_attr_req.py +171 -0
- huaweicloudsdkmsgsms/v2/model/tenant_basic.py +173 -0
- huaweicloudsdkmsgsms/v2/model/update_app_request.py +139 -0
- huaweicloudsdkmsgsms/v2/model/update_app_response.py +174 -0
- huaweicloudsdkmsgsms/v2/model/update_signature_request.py +139 -0
- huaweicloudsdkmsgsms/v2/model/update_signature_response.py +174 -0
- huaweicloudsdkmsgsms/v2/model/update_template_request.py +139 -0
- huaweicloudsdkmsgsms/v2/model/update_template_response.py +145 -0
- huaweicloudsdkmsgsms/v2/model/upload_signature_file_request.py +140 -0
- huaweicloudsdkmsgsms/v2/model/upload_signature_file_request_body.py +114 -0
- huaweicloudsdkmsgsms/v2/model/upload_signature_file_response.py +116 -0
- huaweicloudsdkmsgsms/v2/msgsms_async_client.py +1461 -0
- huaweicloudsdkmsgsms/v2/msgsms_client.py +1458 -0
- huaweicloudsdkmsgsms/v2/region/__init__.py +0 -0
- huaweicloudsdkmsgsms/v2/region/msgsms_region.py +34 -0
- huaweicloudsdkmsgsms-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkmsgsms-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkmsgsms-3.1.160.dist-info/RECORD +64 -0
- huaweicloudsdkmsgsms-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkmsgsms-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1458 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
from __future__ import absolute_import
|
4
|
+
|
5
|
+
import importlib
|
6
|
+
import warnings
|
7
|
+
|
8
|
+
from huaweicloudsdkcore.client import Client, ClientBuilder
|
9
|
+
from huaweicloudsdkcore.utils import http_utils
|
10
|
+
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
|
11
|
+
|
12
|
+
try:
|
13
|
+
from huaweicloudsdkcore.invoker.invoker import SyncInvoker
|
14
|
+
except ImportError as e:
|
15
|
+
warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkmsgsms'")
|
16
|
+
|
17
|
+
|
18
|
+
class MsgsmsClient(Client):
|
19
|
+
def __init__(self):
|
20
|
+
super(MsgsmsClient, self).__init__()
|
21
|
+
self.model_package = importlib.import_module("huaweicloudsdkmsgsms.v2.model")
|
22
|
+
|
23
|
+
@classmethod
|
24
|
+
def new_builder(cls, clazz=None):
|
25
|
+
if not clazz:
|
26
|
+
client_builder = ClientBuilder(cls)
|
27
|
+
else:
|
28
|
+
if clazz.__name__ != "MsgsmsClient":
|
29
|
+
raise TypeError("client type error, support client type is MsgsmsClient")
|
30
|
+
client_builder = ClientBuilder(clazz)
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
return client_builder
|
35
|
+
|
36
|
+
def create_app(self, request):
|
37
|
+
r"""创建短信应用
|
38
|
+
|
39
|
+
该接口用于用户创建应用信息。
|
40
|
+
|
41
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
42
|
+
|
43
|
+
:param request: Request instance for CreateApp
|
44
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.CreateAppRequest`
|
45
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.CreateAppResponse`
|
46
|
+
"""
|
47
|
+
http_info = self._create_app_http_info(request)
|
48
|
+
return self._call_api(**http_info)
|
49
|
+
|
50
|
+
def create_app_invoker(self, request):
|
51
|
+
http_info = self._create_app_http_info(request)
|
52
|
+
return SyncInvoker(self, http_info)
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def _create_app_http_info(cls, request):
|
56
|
+
http_info = {
|
57
|
+
"method": "POST",
|
58
|
+
"resource_path": "/v2/{project_id}/msgsms/apps",
|
59
|
+
"request_type": request.__class__.__name__,
|
60
|
+
"response_type": "CreateAppResponse"
|
61
|
+
}
|
62
|
+
|
63
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
64
|
+
|
65
|
+
cname = None
|
66
|
+
|
67
|
+
collection_formats = {}
|
68
|
+
|
69
|
+
path_params = {}
|
70
|
+
|
71
|
+
query_params = []
|
72
|
+
|
73
|
+
header_params = {}
|
74
|
+
|
75
|
+
form_params = {}
|
76
|
+
|
77
|
+
body = None
|
78
|
+
if 'body' in local_var_params:
|
79
|
+
body = local_var_params['body']
|
80
|
+
if isinstance(request, SdkStreamRequest):
|
81
|
+
body = request.get_file_stream()
|
82
|
+
|
83
|
+
response_headers = []
|
84
|
+
|
85
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
86
|
+
['application/json'])
|
87
|
+
|
88
|
+
auth_settings = []
|
89
|
+
|
90
|
+
http_info["cname"] = cname
|
91
|
+
http_info["collection_formats"] = collection_formats
|
92
|
+
http_info["path_params"] = path_params
|
93
|
+
http_info["query_params"] = query_params
|
94
|
+
http_info["header_params"] = header_params
|
95
|
+
http_info["post_params"] = form_params
|
96
|
+
http_info["body"] = body
|
97
|
+
http_info["response_headers"] = response_headers
|
98
|
+
|
99
|
+
return http_info
|
100
|
+
|
101
|
+
def list_app_details(self, request):
|
102
|
+
r"""查询短信应用
|
103
|
+
|
104
|
+
该接口用于用户查询已创建的应用信息。
|
105
|
+
|
106
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
107
|
+
|
108
|
+
:param request: Request instance for ListAppDetails
|
109
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ListAppDetailsRequest`
|
110
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ListAppDetailsResponse`
|
111
|
+
"""
|
112
|
+
http_info = self._list_app_details_http_info(request)
|
113
|
+
return self._call_api(**http_info)
|
114
|
+
|
115
|
+
def list_app_details_invoker(self, request):
|
116
|
+
http_info = self._list_app_details_http_info(request)
|
117
|
+
return SyncInvoker(self, http_info)
|
118
|
+
|
119
|
+
@classmethod
|
120
|
+
def _list_app_details_http_info(cls, request):
|
121
|
+
http_info = {
|
122
|
+
"method": "GET",
|
123
|
+
"resource_path": "/v2/{project_id}/msgsms/apps",
|
124
|
+
"request_type": request.__class__.__name__,
|
125
|
+
"response_type": "ListAppDetailsResponse"
|
126
|
+
}
|
127
|
+
|
128
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
129
|
+
|
130
|
+
cname = None
|
131
|
+
|
132
|
+
collection_formats = {}
|
133
|
+
|
134
|
+
path_params = {}
|
135
|
+
|
136
|
+
query_params = []
|
137
|
+
if 'app_name' in local_var_params:
|
138
|
+
query_params.append(('app_name', local_var_params['app_name']))
|
139
|
+
if 'start_time' in local_var_params:
|
140
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
141
|
+
if 'end_time' in local_var_params:
|
142
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
143
|
+
if 'limit' in local_var_params:
|
144
|
+
query_params.append(('limit', local_var_params['limit']))
|
145
|
+
if 'offset' in local_var_params:
|
146
|
+
query_params.append(('offset', local_var_params['offset']))
|
147
|
+
if 'region' in local_var_params:
|
148
|
+
query_params.append(('region', local_var_params['region']))
|
149
|
+
if 'sort_dir' in local_var_params:
|
150
|
+
query_params.append(('sort_dir', local_var_params['sort_dir']))
|
151
|
+
if 'sort_key' in local_var_params:
|
152
|
+
query_params.append(('sort_key', local_var_params['sort_key']))
|
153
|
+
if 'status' in local_var_params:
|
154
|
+
query_params.append(('status', local_var_params['status']))
|
155
|
+
|
156
|
+
header_params = {}
|
157
|
+
|
158
|
+
form_params = {}
|
159
|
+
|
160
|
+
body = None
|
161
|
+
if isinstance(request, SdkStreamRequest):
|
162
|
+
body = request.get_file_stream()
|
163
|
+
|
164
|
+
response_headers = []
|
165
|
+
|
166
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
167
|
+
['application/json'])
|
168
|
+
|
169
|
+
auth_settings = []
|
170
|
+
|
171
|
+
http_info["cname"] = cname
|
172
|
+
http_info["collection_formats"] = collection_formats
|
173
|
+
http_info["path_params"] = path_params
|
174
|
+
http_info["query_params"] = query_params
|
175
|
+
http_info["header_params"] = header_params
|
176
|
+
http_info["post_params"] = form_params
|
177
|
+
http_info["body"] = body
|
178
|
+
http_info["response_headers"] = response_headers
|
179
|
+
|
180
|
+
return http_info
|
181
|
+
|
182
|
+
def show_app(self, request):
|
183
|
+
r"""获取应用详情
|
184
|
+
|
185
|
+
该接口用于用户查询应用详情信息。
|
186
|
+
|
187
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
188
|
+
|
189
|
+
:param request: Request instance for ShowApp
|
190
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ShowAppRequest`
|
191
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ShowAppResponse`
|
192
|
+
"""
|
193
|
+
http_info = self._show_app_http_info(request)
|
194
|
+
return self._call_api(**http_info)
|
195
|
+
|
196
|
+
def show_app_invoker(self, request):
|
197
|
+
http_info = self._show_app_http_info(request)
|
198
|
+
return SyncInvoker(self, http_info)
|
199
|
+
|
200
|
+
@classmethod
|
201
|
+
def _show_app_http_info(cls, request):
|
202
|
+
http_info = {
|
203
|
+
"method": "GET",
|
204
|
+
"resource_path": "/v2/{project_id}/msgsms/apps/{id}",
|
205
|
+
"request_type": request.__class__.__name__,
|
206
|
+
"response_type": "ShowAppResponse"
|
207
|
+
}
|
208
|
+
|
209
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
210
|
+
|
211
|
+
cname = None
|
212
|
+
|
213
|
+
collection_formats = {}
|
214
|
+
|
215
|
+
path_params = {}
|
216
|
+
if 'id' in local_var_params:
|
217
|
+
path_params['id'] = local_var_params['id']
|
218
|
+
|
219
|
+
query_params = []
|
220
|
+
|
221
|
+
header_params = {}
|
222
|
+
|
223
|
+
form_params = {}
|
224
|
+
|
225
|
+
body = None
|
226
|
+
if isinstance(request, SdkStreamRequest):
|
227
|
+
body = request.get_file_stream()
|
228
|
+
|
229
|
+
response_headers = []
|
230
|
+
|
231
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
232
|
+
['application/json'])
|
233
|
+
|
234
|
+
auth_settings = []
|
235
|
+
|
236
|
+
http_info["cname"] = cname
|
237
|
+
http_info["collection_formats"] = collection_formats
|
238
|
+
http_info["path_params"] = path_params
|
239
|
+
http_info["query_params"] = query_params
|
240
|
+
http_info["header_params"] = header_params
|
241
|
+
http_info["post_params"] = form_params
|
242
|
+
http_info["body"] = body
|
243
|
+
http_info["response_headers"] = response_headers
|
244
|
+
|
245
|
+
return http_info
|
246
|
+
|
247
|
+
def show_app_count(self, request):
|
248
|
+
r"""查询应用数量
|
249
|
+
|
250
|
+
该接口用于用户查询应用使用的数量信息。
|
251
|
+
|
252
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
253
|
+
|
254
|
+
:param request: Request instance for ShowAppCount
|
255
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ShowAppCountRequest`
|
256
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ShowAppCountResponse`
|
257
|
+
"""
|
258
|
+
http_info = self._show_app_count_http_info(request)
|
259
|
+
return self._call_api(**http_info)
|
260
|
+
|
261
|
+
def show_app_count_invoker(self, request):
|
262
|
+
http_info = self._show_app_count_http_info(request)
|
263
|
+
return SyncInvoker(self, http_info)
|
264
|
+
|
265
|
+
@classmethod
|
266
|
+
def _show_app_count_http_info(cls, request):
|
267
|
+
http_info = {
|
268
|
+
"method": "GET",
|
269
|
+
"resource_path": "/v2/{project_id}/msgsms/apps-count",
|
270
|
+
"request_type": request.__class__.__name__,
|
271
|
+
"response_type": "ShowAppCountResponse"
|
272
|
+
}
|
273
|
+
|
274
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
275
|
+
|
276
|
+
cname = None
|
277
|
+
|
278
|
+
collection_formats = {}
|
279
|
+
|
280
|
+
path_params = {}
|
281
|
+
|
282
|
+
query_params = []
|
283
|
+
if 'region' in local_var_params:
|
284
|
+
query_params.append(('region', local_var_params['region']))
|
285
|
+
|
286
|
+
header_params = {}
|
287
|
+
|
288
|
+
form_params = {}
|
289
|
+
|
290
|
+
body = None
|
291
|
+
if isinstance(request, SdkStreamRequest):
|
292
|
+
body = request.get_file_stream()
|
293
|
+
|
294
|
+
response_headers = []
|
295
|
+
|
296
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
297
|
+
['application/json'])
|
298
|
+
|
299
|
+
auth_settings = []
|
300
|
+
|
301
|
+
http_info["cname"] = cname
|
302
|
+
http_info["collection_formats"] = collection_formats
|
303
|
+
http_info["path_params"] = path_params
|
304
|
+
http_info["query_params"] = query_params
|
305
|
+
http_info["header_params"] = header_params
|
306
|
+
http_info["post_params"] = form_params
|
307
|
+
http_info["body"] = body
|
308
|
+
http_info["response_headers"] = response_headers
|
309
|
+
|
310
|
+
return http_info
|
311
|
+
|
312
|
+
def update_app(self, request):
|
313
|
+
r"""修改短信应用
|
314
|
+
|
315
|
+
该接口用于用户修改应用信息。
|
316
|
+
|
317
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
318
|
+
|
319
|
+
:param request: Request instance for UpdateApp
|
320
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.UpdateAppRequest`
|
321
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.UpdateAppResponse`
|
322
|
+
"""
|
323
|
+
http_info = self._update_app_http_info(request)
|
324
|
+
return self._call_api(**http_info)
|
325
|
+
|
326
|
+
def update_app_invoker(self, request):
|
327
|
+
http_info = self._update_app_http_info(request)
|
328
|
+
return SyncInvoker(self, http_info)
|
329
|
+
|
330
|
+
@classmethod
|
331
|
+
def _update_app_http_info(cls, request):
|
332
|
+
http_info = {
|
333
|
+
"method": "PUT",
|
334
|
+
"resource_path": "/v2/{project_id}/msgsms/apps/{id}",
|
335
|
+
"request_type": request.__class__.__name__,
|
336
|
+
"response_type": "UpdateAppResponse"
|
337
|
+
}
|
338
|
+
|
339
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
340
|
+
|
341
|
+
cname = None
|
342
|
+
|
343
|
+
collection_formats = {}
|
344
|
+
|
345
|
+
path_params = {}
|
346
|
+
if 'id' in local_var_params:
|
347
|
+
path_params['id'] = local_var_params['id']
|
348
|
+
|
349
|
+
query_params = []
|
350
|
+
|
351
|
+
header_params = {}
|
352
|
+
|
353
|
+
form_params = {}
|
354
|
+
|
355
|
+
body = None
|
356
|
+
if 'body' in local_var_params:
|
357
|
+
body = local_var_params['body']
|
358
|
+
if isinstance(request, SdkStreamRequest):
|
359
|
+
body = request.get_file_stream()
|
360
|
+
|
361
|
+
response_headers = []
|
362
|
+
|
363
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
364
|
+
['application/json'])
|
365
|
+
|
366
|
+
auth_settings = []
|
367
|
+
|
368
|
+
http_info["cname"] = cname
|
369
|
+
http_info["collection_formats"] = collection_formats
|
370
|
+
http_info["path_params"] = path_params
|
371
|
+
http_info["query_params"] = query_params
|
372
|
+
http_info["header_params"] = header_params
|
373
|
+
http_info["post_params"] = form_params
|
374
|
+
http_info["body"] = body
|
375
|
+
http_info["response_headers"] = response_headers
|
376
|
+
|
377
|
+
return http_info
|
378
|
+
|
379
|
+
def create_signature(self, request):
|
380
|
+
r"""创建短信签名
|
381
|
+
|
382
|
+
该接口用于用户创建签名。
|
383
|
+
|
384
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
385
|
+
|
386
|
+
:param request: Request instance for CreateSignature
|
387
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.CreateSignatureRequest`
|
388
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.CreateSignatureResponse`
|
389
|
+
"""
|
390
|
+
http_info = self._create_signature_http_info(request)
|
391
|
+
return self._call_api(**http_info)
|
392
|
+
|
393
|
+
def create_signature_invoker(self, request):
|
394
|
+
http_info = self._create_signature_http_info(request)
|
395
|
+
return SyncInvoker(self, http_info)
|
396
|
+
|
397
|
+
@classmethod
|
398
|
+
def _create_signature_http_info(cls, request):
|
399
|
+
http_info = {
|
400
|
+
"method": "POST",
|
401
|
+
"resource_path": "/v2/{project_id}/msgsms/signatures",
|
402
|
+
"request_type": request.__class__.__name__,
|
403
|
+
"response_type": "CreateSignatureResponse"
|
404
|
+
}
|
405
|
+
|
406
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
407
|
+
|
408
|
+
cname = None
|
409
|
+
|
410
|
+
collection_formats = {}
|
411
|
+
|
412
|
+
path_params = {}
|
413
|
+
|
414
|
+
query_params = []
|
415
|
+
|
416
|
+
header_params = {}
|
417
|
+
|
418
|
+
form_params = {}
|
419
|
+
|
420
|
+
body = None
|
421
|
+
if 'body' in local_var_params:
|
422
|
+
body = local_var_params['body']
|
423
|
+
if isinstance(request, SdkStreamRequest):
|
424
|
+
body = request.get_file_stream()
|
425
|
+
|
426
|
+
response_headers = []
|
427
|
+
|
428
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
429
|
+
['application/json'])
|
430
|
+
|
431
|
+
auth_settings = []
|
432
|
+
|
433
|
+
http_info["cname"] = cname
|
434
|
+
http_info["collection_formats"] = collection_formats
|
435
|
+
http_info["path_params"] = path_params
|
436
|
+
http_info["query_params"] = query_params
|
437
|
+
http_info["header_params"] = header_params
|
438
|
+
http_info["post_params"] = form_params
|
439
|
+
http_info["body"] = body
|
440
|
+
http_info["response_headers"] = response_headers
|
441
|
+
|
442
|
+
return http_info
|
443
|
+
|
444
|
+
def delete_signature(self, request):
|
445
|
+
r"""删除短信签名
|
446
|
+
|
447
|
+
该接口用于用户删除已创建的签名信息息。
|
448
|
+
|
449
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
450
|
+
|
451
|
+
:param request: Request instance for DeleteSignature
|
452
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.DeleteSignatureRequest`
|
453
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.DeleteSignatureResponse`
|
454
|
+
"""
|
455
|
+
http_info = self._delete_signature_http_info(request)
|
456
|
+
return self._call_api(**http_info)
|
457
|
+
|
458
|
+
def delete_signature_invoker(self, request):
|
459
|
+
http_info = self._delete_signature_http_info(request)
|
460
|
+
return SyncInvoker(self, http_info)
|
461
|
+
|
462
|
+
@classmethod
|
463
|
+
def _delete_signature_http_info(cls, request):
|
464
|
+
http_info = {
|
465
|
+
"method": "DELETE",
|
466
|
+
"resource_path": "/v2/{project_id}/msgsms/signatures/{id}",
|
467
|
+
"request_type": request.__class__.__name__,
|
468
|
+
"response_type": "DeleteSignatureResponse"
|
469
|
+
}
|
470
|
+
|
471
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
472
|
+
|
473
|
+
cname = None
|
474
|
+
|
475
|
+
collection_formats = {}
|
476
|
+
|
477
|
+
path_params = {}
|
478
|
+
if 'id' in local_var_params:
|
479
|
+
path_params['id'] = local_var_params['id']
|
480
|
+
|
481
|
+
query_params = []
|
482
|
+
|
483
|
+
header_params = {}
|
484
|
+
|
485
|
+
form_params = {}
|
486
|
+
|
487
|
+
body = None
|
488
|
+
if isinstance(request, SdkStreamRequest):
|
489
|
+
body = request.get_file_stream()
|
490
|
+
|
491
|
+
response_headers = []
|
492
|
+
|
493
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
494
|
+
['application/json'])
|
495
|
+
|
496
|
+
auth_settings = []
|
497
|
+
|
498
|
+
http_info["cname"] = cname
|
499
|
+
http_info["collection_formats"] = collection_formats
|
500
|
+
http_info["path_params"] = path_params
|
501
|
+
http_info["query_params"] = query_params
|
502
|
+
http_info["header_params"] = header_params
|
503
|
+
http_info["post_params"] = form_params
|
504
|
+
http_info["body"] = body
|
505
|
+
http_info["response_headers"] = response_headers
|
506
|
+
|
507
|
+
return http_info
|
508
|
+
|
509
|
+
def enable_signature(self, request):
|
510
|
+
r"""申请激活签名
|
511
|
+
|
512
|
+
该接口用于用户申请激活签名信息。
|
513
|
+
|
514
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
515
|
+
|
516
|
+
:param request: Request instance for EnableSignature
|
517
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.EnableSignatureRequest`
|
518
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.EnableSignatureResponse`
|
519
|
+
"""
|
520
|
+
http_info = self._enable_signature_http_info(request)
|
521
|
+
return self._call_api(**http_info)
|
522
|
+
|
523
|
+
def enable_signature_invoker(self, request):
|
524
|
+
http_info = self._enable_signature_http_info(request)
|
525
|
+
return SyncInvoker(self, http_info)
|
526
|
+
|
527
|
+
@classmethod
|
528
|
+
def _enable_signature_http_info(cls, request):
|
529
|
+
http_info = {
|
530
|
+
"method": "PUT",
|
531
|
+
"resource_path": "/v2/{project_id}/msgsms/signatures/{id}/active",
|
532
|
+
"request_type": request.__class__.__name__,
|
533
|
+
"response_type": "EnableSignatureResponse"
|
534
|
+
}
|
535
|
+
|
536
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
537
|
+
|
538
|
+
cname = None
|
539
|
+
|
540
|
+
collection_formats = {}
|
541
|
+
|
542
|
+
path_params = {}
|
543
|
+
if 'id' in local_var_params:
|
544
|
+
path_params['id'] = local_var_params['id']
|
545
|
+
|
546
|
+
query_params = []
|
547
|
+
|
548
|
+
header_params = {}
|
549
|
+
|
550
|
+
form_params = {}
|
551
|
+
|
552
|
+
body = None
|
553
|
+
if isinstance(request, SdkStreamRequest):
|
554
|
+
body = request.get_file_stream()
|
555
|
+
|
556
|
+
response_headers = []
|
557
|
+
|
558
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
559
|
+
['application/json'])
|
560
|
+
|
561
|
+
auth_settings = []
|
562
|
+
|
563
|
+
http_info["cname"] = cname
|
564
|
+
http_info["collection_formats"] = collection_formats
|
565
|
+
http_info["path_params"] = path_params
|
566
|
+
http_info["query_params"] = query_params
|
567
|
+
http_info["header_params"] = header_params
|
568
|
+
http_info["post_params"] = form_params
|
569
|
+
http_info["body"] = body
|
570
|
+
http_info["response_headers"] = response_headers
|
571
|
+
|
572
|
+
return http_info
|
573
|
+
|
574
|
+
def list_signature_details(self, request):
|
575
|
+
r"""查询签名信息
|
576
|
+
|
577
|
+
该接口用于用户查询已创建的短信签名信息。
|
578
|
+
|
579
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
580
|
+
|
581
|
+
:param request: Request instance for ListSignatureDetails
|
582
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ListSignatureDetailsRequest`
|
583
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ListSignatureDetailsResponse`
|
584
|
+
"""
|
585
|
+
http_info = self._list_signature_details_http_info(request)
|
586
|
+
return self._call_api(**http_info)
|
587
|
+
|
588
|
+
def list_signature_details_invoker(self, request):
|
589
|
+
http_info = self._list_signature_details_http_info(request)
|
590
|
+
return SyncInvoker(self, http_info)
|
591
|
+
|
592
|
+
@classmethod
|
593
|
+
def _list_signature_details_http_info(cls, request):
|
594
|
+
http_info = {
|
595
|
+
"method": "GET",
|
596
|
+
"resource_path": "/v2/{project_id}/msgsms/signatures",
|
597
|
+
"request_type": request.__class__.__name__,
|
598
|
+
"response_type": "ListSignatureDetailsResponse"
|
599
|
+
}
|
600
|
+
|
601
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
602
|
+
|
603
|
+
cname = None
|
604
|
+
|
605
|
+
collection_formats = {}
|
606
|
+
|
607
|
+
path_params = {}
|
608
|
+
|
609
|
+
query_params = []
|
610
|
+
if 'app_name' in local_var_params:
|
611
|
+
query_params.append(('app_name', local_var_params['app_name']))
|
612
|
+
if 'start_time' in local_var_params:
|
613
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
614
|
+
if 'end_time' in local_var_params:
|
615
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
616
|
+
if 'limit' in local_var_params:
|
617
|
+
query_params.append(('limit', local_var_params['limit']))
|
618
|
+
if 'offset' in local_var_params:
|
619
|
+
query_params.append(('offset', local_var_params['offset']))
|
620
|
+
if 'signature_id' in local_var_params:
|
621
|
+
query_params.append(('signature_id', local_var_params['signature_id']))
|
622
|
+
if 'signature_name' in local_var_params:
|
623
|
+
query_params.append(('signature_name', local_var_params['signature_name']))
|
624
|
+
if 'signature_type' in local_var_params:
|
625
|
+
query_params.append(('signature_type', local_var_params['signature_type']))
|
626
|
+
if 'site' in local_var_params:
|
627
|
+
query_params.append(('site', local_var_params['site']))
|
628
|
+
if 'sort_dir' in local_var_params:
|
629
|
+
query_params.append(('sort_dir', local_var_params['sort_dir']))
|
630
|
+
if 'sort_key' in local_var_params:
|
631
|
+
query_params.append(('sort_key', local_var_params['sort_key']))
|
632
|
+
if 'status' in local_var_params:
|
633
|
+
query_params.append(('status', local_var_params['status']))
|
634
|
+
|
635
|
+
header_params = {}
|
636
|
+
|
637
|
+
form_params = {}
|
638
|
+
|
639
|
+
body = None
|
640
|
+
if isinstance(request, SdkStreamRequest):
|
641
|
+
body = request.get_file_stream()
|
642
|
+
|
643
|
+
response_headers = []
|
644
|
+
|
645
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
646
|
+
['application/json'])
|
647
|
+
|
648
|
+
auth_settings = []
|
649
|
+
|
650
|
+
http_info["cname"] = cname
|
651
|
+
http_info["collection_formats"] = collection_formats
|
652
|
+
http_info["path_params"] = path_params
|
653
|
+
http_info["query_params"] = query_params
|
654
|
+
http_info["header_params"] = header_params
|
655
|
+
http_info["post_params"] = form_params
|
656
|
+
http_info["body"] = body
|
657
|
+
http_info["response_headers"] = response_headers
|
658
|
+
|
659
|
+
return http_info
|
660
|
+
|
661
|
+
def show_signature(self, request):
|
662
|
+
r"""获取签名详情
|
663
|
+
|
664
|
+
该接口用于用户查询签名详情信息。
|
665
|
+
|
666
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
667
|
+
|
668
|
+
:param request: Request instance for ShowSignature
|
669
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ShowSignatureRequest`
|
670
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ShowSignatureResponse`
|
671
|
+
"""
|
672
|
+
http_info = self._show_signature_http_info(request)
|
673
|
+
return self._call_api(**http_info)
|
674
|
+
|
675
|
+
def show_signature_invoker(self, request):
|
676
|
+
http_info = self._show_signature_http_info(request)
|
677
|
+
return SyncInvoker(self, http_info)
|
678
|
+
|
679
|
+
@classmethod
|
680
|
+
def _show_signature_http_info(cls, request):
|
681
|
+
http_info = {
|
682
|
+
"method": "GET",
|
683
|
+
"resource_path": "/v2/{project_id}/msgsms/signatures/{id}",
|
684
|
+
"request_type": request.__class__.__name__,
|
685
|
+
"response_type": "ShowSignatureResponse"
|
686
|
+
}
|
687
|
+
|
688
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
689
|
+
|
690
|
+
cname = None
|
691
|
+
|
692
|
+
collection_formats = {}
|
693
|
+
|
694
|
+
path_params = {}
|
695
|
+
if 'id' in local_var_params:
|
696
|
+
path_params['id'] = local_var_params['id']
|
697
|
+
|
698
|
+
query_params = []
|
699
|
+
|
700
|
+
header_params = {}
|
701
|
+
|
702
|
+
form_params = {}
|
703
|
+
|
704
|
+
body = None
|
705
|
+
if isinstance(request, SdkStreamRequest):
|
706
|
+
body = request.get_file_stream()
|
707
|
+
|
708
|
+
response_headers = []
|
709
|
+
|
710
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
711
|
+
['application/json'])
|
712
|
+
|
713
|
+
auth_settings = []
|
714
|
+
|
715
|
+
http_info["cname"] = cname
|
716
|
+
http_info["collection_formats"] = collection_formats
|
717
|
+
http_info["path_params"] = path_params
|
718
|
+
http_info["query_params"] = query_params
|
719
|
+
http_info["header_params"] = header_params
|
720
|
+
http_info["post_params"] = form_params
|
721
|
+
http_info["body"] = body
|
722
|
+
http_info["response_headers"] = response_headers
|
723
|
+
|
724
|
+
return http_info
|
725
|
+
|
726
|
+
def show_signature_file(self, request):
|
727
|
+
r"""查询申请文件
|
728
|
+
|
729
|
+
该接口用于用户查询上传的文件信息。
|
730
|
+
|
731
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
732
|
+
|
733
|
+
:param request: Request instance for ShowSignatureFile
|
734
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ShowSignatureFileRequest`
|
735
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ShowSignatureFileResponse`
|
736
|
+
"""
|
737
|
+
http_info = self._show_signature_file_http_info(request)
|
738
|
+
return self._call_api(**http_info)
|
739
|
+
|
740
|
+
def show_signature_file_invoker(self, request):
|
741
|
+
http_info = self._show_signature_file_http_info(request)
|
742
|
+
return SyncInvoker(self, http_info)
|
743
|
+
|
744
|
+
@classmethod
|
745
|
+
def _show_signature_file_http_info(cls, request):
|
746
|
+
http_info = {
|
747
|
+
"method": "GET",
|
748
|
+
"resource_path": "/v2/{project_id}/msgsms/upload-files",
|
749
|
+
"request_type": request.__class__.__name__,
|
750
|
+
"response_type": "ShowSignatureFileResponse"
|
751
|
+
}
|
752
|
+
|
753
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
754
|
+
|
755
|
+
cname = None
|
756
|
+
|
757
|
+
collection_formats = {}
|
758
|
+
|
759
|
+
path_params = {}
|
760
|
+
|
761
|
+
query_params = []
|
762
|
+
if 'file_id' in local_var_params:
|
763
|
+
query_params.append(('file_id', local_var_params['file_id']))
|
764
|
+
|
765
|
+
header_params = {}
|
766
|
+
|
767
|
+
form_params = {}
|
768
|
+
|
769
|
+
body = None
|
770
|
+
if isinstance(request, SdkStreamRequest):
|
771
|
+
body = request.get_file_stream()
|
772
|
+
|
773
|
+
response_headers = []
|
774
|
+
|
775
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
776
|
+
['application/json'])
|
777
|
+
|
778
|
+
auth_settings = []
|
779
|
+
|
780
|
+
http_info["cname"] = cname
|
781
|
+
http_info["collection_formats"] = collection_formats
|
782
|
+
http_info["path_params"] = path_params
|
783
|
+
http_info["query_params"] = query_params
|
784
|
+
http_info["header_params"] = header_params
|
785
|
+
http_info["post_params"] = form_params
|
786
|
+
http_info["body"] = body
|
787
|
+
http_info["response_headers"] = response_headers
|
788
|
+
|
789
|
+
return http_info
|
790
|
+
|
791
|
+
def update_signature(self, request):
|
792
|
+
r"""修改短信签名
|
793
|
+
|
794
|
+
该接口用于用户更新签名信息,目前仅支持审核不通过的短信签名重新修改。
|
795
|
+
|
796
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
797
|
+
|
798
|
+
:param request: Request instance for UpdateSignature
|
799
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.UpdateSignatureRequest`
|
800
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.UpdateSignatureResponse`
|
801
|
+
"""
|
802
|
+
http_info = self._update_signature_http_info(request)
|
803
|
+
return self._call_api(**http_info)
|
804
|
+
|
805
|
+
def update_signature_invoker(self, request):
|
806
|
+
http_info = self._update_signature_http_info(request)
|
807
|
+
return SyncInvoker(self, http_info)
|
808
|
+
|
809
|
+
@classmethod
|
810
|
+
def _update_signature_http_info(cls, request):
|
811
|
+
http_info = {
|
812
|
+
"method": "PUT",
|
813
|
+
"resource_path": "/v2/{project_id}/msgsms/signatures/{id}",
|
814
|
+
"request_type": request.__class__.__name__,
|
815
|
+
"response_type": "UpdateSignatureResponse"
|
816
|
+
}
|
817
|
+
|
818
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
819
|
+
|
820
|
+
cname = None
|
821
|
+
|
822
|
+
collection_formats = {}
|
823
|
+
|
824
|
+
path_params = {}
|
825
|
+
if 'id' in local_var_params:
|
826
|
+
path_params['id'] = local_var_params['id']
|
827
|
+
|
828
|
+
query_params = []
|
829
|
+
|
830
|
+
header_params = {}
|
831
|
+
|
832
|
+
form_params = {}
|
833
|
+
|
834
|
+
body = None
|
835
|
+
if 'body' in local_var_params:
|
836
|
+
body = local_var_params['body']
|
837
|
+
if isinstance(request, SdkStreamRequest):
|
838
|
+
body = request.get_file_stream()
|
839
|
+
|
840
|
+
response_headers = []
|
841
|
+
|
842
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
843
|
+
['application/json'])
|
844
|
+
|
845
|
+
auth_settings = []
|
846
|
+
|
847
|
+
http_info["cname"] = cname
|
848
|
+
http_info["collection_formats"] = collection_formats
|
849
|
+
http_info["path_params"] = path_params
|
850
|
+
http_info["query_params"] = query_params
|
851
|
+
http_info["header_params"] = header_params
|
852
|
+
http_info["post_params"] = form_params
|
853
|
+
http_info["body"] = body
|
854
|
+
http_info["response_headers"] = response_headers
|
855
|
+
|
856
|
+
return http_info
|
857
|
+
|
858
|
+
def upload_signature_file(self, request):
|
859
|
+
r"""上传申请文件
|
860
|
+
|
861
|
+
该接口用于用户上传文件信息。
|
862
|
+
|
863
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
864
|
+
|
865
|
+
:param request: Request instance for UploadSignatureFile
|
866
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.UploadSignatureFileRequest`
|
867
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.UploadSignatureFileResponse`
|
868
|
+
"""
|
869
|
+
http_info = self._upload_signature_file_http_info(request)
|
870
|
+
return self._call_api(**http_info)
|
871
|
+
|
872
|
+
def upload_signature_file_invoker(self, request):
|
873
|
+
http_info = self._upload_signature_file_http_info(request)
|
874
|
+
return SyncInvoker(self, http_info)
|
875
|
+
|
876
|
+
@classmethod
|
877
|
+
def _upload_signature_file_http_info(cls, request):
|
878
|
+
http_info = {
|
879
|
+
"method": "POST",
|
880
|
+
"resource_path": "/v2/{project_id}/msgsms/upload-files",
|
881
|
+
"request_type": request.__class__.__name__,
|
882
|
+
"response_type": "UploadSignatureFileResponse"
|
883
|
+
}
|
884
|
+
|
885
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
886
|
+
|
887
|
+
cname = None
|
888
|
+
|
889
|
+
collection_formats = {}
|
890
|
+
|
891
|
+
path_params = {}
|
892
|
+
|
893
|
+
query_params = []
|
894
|
+
if 'file_desc' in local_var_params:
|
895
|
+
query_params.append(('file_desc', local_var_params['file_desc']))
|
896
|
+
|
897
|
+
header_params = {}
|
898
|
+
|
899
|
+
form_params = {}
|
900
|
+
if 'file' in local_var_params:
|
901
|
+
form_params['file'] = local_var_params['file']
|
902
|
+
|
903
|
+
body = None
|
904
|
+
if 'body' in local_var_params:
|
905
|
+
body = local_var_params['body']
|
906
|
+
if isinstance(request, SdkStreamRequest):
|
907
|
+
body = request.get_file_stream()
|
908
|
+
|
909
|
+
response_headers = []
|
910
|
+
|
911
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
912
|
+
['multipart/form-data'])
|
913
|
+
|
914
|
+
auth_settings = []
|
915
|
+
|
916
|
+
http_info["cname"] = cname
|
917
|
+
http_info["collection_formats"] = collection_formats
|
918
|
+
http_info["path_params"] = path_params
|
919
|
+
http_info["query_params"] = query_params
|
920
|
+
http_info["header_params"] = header_params
|
921
|
+
http_info["post_params"] = form_params
|
922
|
+
http_info["body"] = body
|
923
|
+
http_info["response_headers"] = response_headers
|
924
|
+
|
925
|
+
return http_info
|
926
|
+
|
927
|
+
def create_template(self, request):
|
928
|
+
r"""创建短信模板
|
929
|
+
|
930
|
+
该接口用于用户创建模板。
|
931
|
+
|
932
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
933
|
+
|
934
|
+
:param request: Request instance for CreateTemplate
|
935
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.CreateTemplateRequest`
|
936
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.CreateTemplateResponse`
|
937
|
+
"""
|
938
|
+
http_info = self._create_template_http_info(request)
|
939
|
+
return self._call_api(**http_info)
|
940
|
+
|
941
|
+
def create_template_invoker(self, request):
|
942
|
+
http_info = self._create_template_http_info(request)
|
943
|
+
return SyncInvoker(self, http_info)
|
944
|
+
|
945
|
+
@classmethod
|
946
|
+
def _create_template_http_info(cls, request):
|
947
|
+
http_info = {
|
948
|
+
"method": "POST",
|
949
|
+
"resource_path": "/v2/{project_id}/msgsms/templates",
|
950
|
+
"request_type": request.__class__.__name__,
|
951
|
+
"response_type": "CreateTemplateResponse"
|
952
|
+
}
|
953
|
+
|
954
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
955
|
+
|
956
|
+
cname = None
|
957
|
+
|
958
|
+
collection_formats = {}
|
959
|
+
|
960
|
+
path_params = {}
|
961
|
+
|
962
|
+
query_params = []
|
963
|
+
|
964
|
+
header_params = {}
|
965
|
+
|
966
|
+
form_params = {}
|
967
|
+
|
968
|
+
body = None
|
969
|
+
if 'body' in local_var_params:
|
970
|
+
body = local_var_params['body']
|
971
|
+
if isinstance(request, SdkStreamRequest):
|
972
|
+
body = request.get_file_stream()
|
973
|
+
|
974
|
+
response_headers = []
|
975
|
+
|
976
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
977
|
+
['application/json'])
|
978
|
+
|
979
|
+
auth_settings = []
|
980
|
+
|
981
|
+
http_info["cname"] = cname
|
982
|
+
http_info["collection_formats"] = collection_formats
|
983
|
+
http_info["path_params"] = path_params
|
984
|
+
http_info["query_params"] = query_params
|
985
|
+
http_info["header_params"] = header_params
|
986
|
+
http_info["post_params"] = form_params
|
987
|
+
http_info["body"] = body
|
988
|
+
http_info["response_headers"] = response_headers
|
989
|
+
|
990
|
+
return http_info
|
991
|
+
|
992
|
+
def delete_template(self, request):
|
993
|
+
r"""删除短信模板
|
994
|
+
|
995
|
+
该接口用于用户删除已创建的模板信息。
|
996
|
+
|
997
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
998
|
+
|
999
|
+
:param request: Request instance for DeleteTemplate
|
1000
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.DeleteTemplateRequest`
|
1001
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.DeleteTemplateResponse`
|
1002
|
+
"""
|
1003
|
+
http_info = self._delete_template_http_info(request)
|
1004
|
+
return self._call_api(**http_info)
|
1005
|
+
|
1006
|
+
def delete_template_invoker(self, request):
|
1007
|
+
http_info = self._delete_template_http_info(request)
|
1008
|
+
return SyncInvoker(self, http_info)
|
1009
|
+
|
1010
|
+
@classmethod
|
1011
|
+
def _delete_template_http_info(cls, request):
|
1012
|
+
http_info = {
|
1013
|
+
"method": "DELETE",
|
1014
|
+
"resource_path": "/v2/{project_id}/msgsms/templates/{id}",
|
1015
|
+
"request_type": request.__class__.__name__,
|
1016
|
+
"response_type": "DeleteTemplateResponse"
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1020
|
+
|
1021
|
+
cname = None
|
1022
|
+
|
1023
|
+
collection_formats = {}
|
1024
|
+
|
1025
|
+
path_params = {}
|
1026
|
+
if 'id' in local_var_params:
|
1027
|
+
path_params['id'] = local_var_params['id']
|
1028
|
+
|
1029
|
+
query_params = []
|
1030
|
+
|
1031
|
+
header_params = {}
|
1032
|
+
|
1033
|
+
form_params = {}
|
1034
|
+
|
1035
|
+
body = None
|
1036
|
+
if isinstance(request, SdkStreamRequest):
|
1037
|
+
body = request.get_file_stream()
|
1038
|
+
|
1039
|
+
response_headers = []
|
1040
|
+
|
1041
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1042
|
+
['application/json'])
|
1043
|
+
|
1044
|
+
auth_settings = []
|
1045
|
+
|
1046
|
+
http_info["cname"] = cname
|
1047
|
+
http_info["collection_formats"] = collection_formats
|
1048
|
+
http_info["path_params"] = path_params
|
1049
|
+
http_info["query_params"] = query_params
|
1050
|
+
http_info["header_params"] = header_params
|
1051
|
+
http_info["post_params"] = form_params
|
1052
|
+
http_info["body"] = body
|
1053
|
+
http_info["response_headers"] = response_headers
|
1054
|
+
|
1055
|
+
return http_info
|
1056
|
+
|
1057
|
+
def list_send_country_details(self, request):
|
1058
|
+
r"""查询发送国家
|
1059
|
+
|
1060
|
+
该接口用于用户查询短信发送的国家信息
|
1061
|
+
|
1062
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1063
|
+
|
1064
|
+
:param request: Request instance for ListSendCountryDetails
|
1065
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ListSendCountryDetailsRequest`
|
1066
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ListSendCountryDetailsResponse`
|
1067
|
+
"""
|
1068
|
+
http_info = self._list_send_country_details_http_info(request)
|
1069
|
+
return self._call_api(**http_info)
|
1070
|
+
|
1071
|
+
def list_send_country_details_invoker(self, request):
|
1072
|
+
http_info = self._list_send_country_details_http_info(request)
|
1073
|
+
return SyncInvoker(self, http_info)
|
1074
|
+
|
1075
|
+
@classmethod
|
1076
|
+
def _list_send_country_details_http_info(cls, request):
|
1077
|
+
http_info = {
|
1078
|
+
"method": "GET",
|
1079
|
+
"resource_path": "/v2/{project_id}/msgsms/country",
|
1080
|
+
"request_type": request.__class__.__name__,
|
1081
|
+
"response_type": "ListSendCountryDetailsResponse"
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1085
|
+
|
1086
|
+
cname = None
|
1087
|
+
|
1088
|
+
collection_formats = {}
|
1089
|
+
|
1090
|
+
path_params = {}
|
1091
|
+
|
1092
|
+
query_params = []
|
1093
|
+
if 'country_name_en' in local_var_params:
|
1094
|
+
query_params.append(('country_name_en', local_var_params['country_name_en']))
|
1095
|
+
if 'country_name_zh' in local_var_params:
|
1096
|
+
query_params.append(('country_name_zh', local_var_params['country_name_zh']))
|
1097
|
+
|
1098
|
+
header_params = {}
|
1099
|
+
|
1100
|
+
form_params = {}
|
1101
|
+
|
1102
|
+
body = None
|
1103
|
+
if isinstance(request, SdkStreamRequest):
|
1104
|
+
body = request.get_file_stream()
|
1105
|
+
|
1106
|
+
response_headers = []
|
1107
|
+
|
1108
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1109
|
+
['application/json'])
|
1110
|
+
|
1111
|
+
auth_settings = []
|
1112
|
+
|
1113
|
+
http_info["cname"] = cname
|
1114
|
+
http_info["collection_formats"] = collection_formats
|
1115
|
+
http_info["path_params"] = path_params
|
1116
|
+
http_info["query_params"] = query_params
|
1117
|
+
http_info["header_params"] = header_params
|
1118
|
+
http_info["post_params"] = form_params
|
1119
|
+
http_info["body"] = body
|
1120
|
+
http_info["response_headers"] = response_headers
|
1121
|
+
|
1122
|
+
return http_info
|
1123
|
+
|
1124
|
+
def list_template_details(self, request):
|
1125
|
+
r"""查询短信模板
|
1126
|
+
|
1127
|
+
该接口用于用户查询已创建的模板信息。
|
1128
|
+
|
1129
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1130
|
+
|
1131
|
+
:param request: Request instance for ListTemplateDetails
|
1132
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ListTemplateDetailsRequest`
|
1133
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ListTemplateDetailsResponse`
|
1134
|
+
"""
|
1135
|
+
http_info = self._list_template_details_http_info(request)
|
1136
|
+
return self._call_api(**http_info)
|
1137
|
+
|
1138
|
+
def list_template_details_invoker(self, request):
|
1139
|
+
http_info = self._list_template_details_http_info(request)
|
1140
|
+
return SyncInvoker(self, http_info)
|
1141
|
+
|
1142
|
+
@classmethod
|
1143
|
+
def _list_template_details_http_info(cls, request):
|
1144
|
+
http_info = {
|
1145
|
+
"method": "GET",
|
1146
|
+
"resource_path": "/v2/{project_id}/msgsms/templates",
|
1147
|
+
"request_type": request.__class__.__name__,
|
1148
|
+
"response_type": "ListTemplateDetailsResponse"
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1152
|
+
|
1153
|
+
cname = None
|
1154
|
+
|
1155
|
+
collection_formats = {}
|
1156
|
+
|
1157
|
+
path_params = {}
|
1158
|
+
|
1159
|
+
query_params = []
|
1160
|
+
if 'app_key' in local_var_params:
|
1161
|
+
query_params.append(('app_key', local_var_params['app_key']))
|
1162
|
+
if 'app_name' in local_var_params:
|
1163
|
+
query_params.append(('app_name', local_var_params['app_name']))
|
1164
|
+
if 'start_time' in local_var_params:
|
1165
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
1166
|
+
if 'end_time' in local_var_params:
|
1167
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
1168
|
+
if 'limit' in local_var_params:
|
1169
|
+
query_params.append(('limit', local_var_params['limit']))
|
1170
|
+
if 'offset' in local_var_params:
|
1171
|
+
query_params.append(('offset', local_var_params['offset']))
|
1172
|
+
if 'flow_status' in local_var_params:
|
1173
|
+
query_params.append(('flow_status', local_var_params['flow_status']))
|
1174
|
+
if 'has_variable' in local_var_params:
|
1175
|
+
query_params.append(('has_variable', local_var_params['has_variable']))
|
1176
|
+
if 'region' in local_var_params:
|
1177
|
+
query_params.append(('region', local_var_params['region']))
|
1178
|
+
if 'sign_name' in local_var_params:
|
1179
|
+
query_params.append(('sign_name', local_var_params['sign_name']))
|
1180
|
+
if 'sort_dir' in local_var_params:
|
1181
|
+
query_params.append(('sort_dir', local_var_params['sort_dir']))
|
1182
|
+
if 'sort_key' in local_var_params:
|
1183
|
+
query_params.append(('sort_key', local_var_params['sort_key']))
|
1184
|
+
if 'template_id' in local_var_params:
|
1185
|
+
query_params.append(('template_id', local_var_params['template_id']))
|
1186
|
+
if 'template_name' in local_var_params:
|
1187
|
+
query_params.append(('template_name', local_var_params['template_name']))
|
1188
|
+
if 'template_type' in local_var_params:
|
1189
|
+
query_params.append(('template_type', local_var_params['template_type']))
|
1190
|
+
|
1191
|
+
header_params = {}
|
1192
|
+
|
1193
|
+
form_params = {}
|
1194
|
+
|
1195
|
+
body = None
|
1196
|
+
if isinstance(request, SdkStreamRequest):
|
1197
|
+
body = request.get_file_stream()
|
1198
|
+
|
1199
|
+
response_headers = []
|
1200
|
+
|
1201
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1202
|
+
['application/json'])
|
1203
|
+
|
1204
|
+
auth_settings = []
|
1205
|
+
|
1206
|
+
http_info["cname"] = cname
|
1207
|
+
http_info["collection_formats"] = collection_formats
|
1208
|
+
http_info["path_params"] = path_params
|
1209
|
+
http_info["query_params"] = query_params
|
1210
|
+
http_info["header_params"] = header_params
|
1211
|
+
http_info["post_params"] = form_params
|
1212
|
+
http_info["body"] = body
|
1213
|
+
http_info["response_headers"] = response_headers
|
1214
|
+
|
1215
|
+
return http_info
|
1216
|
+
|
1217
|
+
def list_template_varilable_details(self, request):
|
1218
|
+
r"""查询模板变量
|
1219
|
+
|
1220
|
+
该接口用于用户查询模板参数。
|
1221
|
+
|
1222
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1223
|
+
|
1224
|
+
:param request: Request instance for ListTemplateVarilableDetails
|
1225
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ListTemplateVarilableDetailsRequest`
|
1226
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ListTemplateVarilableDetailsResponse`
|
1227
|
+
"""
|
1228
|
+
http_info = self._list_template_varilable_details_http_info(request)
|
1229
|
+
return self._call_api(**http_info)
|
1230
|
+
|
1231
|
+
def list_template_varilable_details_invoker(self, request):
|
1232
|
+
http_info = self._list_template_varilable_details_http_info(request)
|
1233
|
+
return SyncInvoker(self, http_info)
|
1234
|
+
|
1235
|
+
@classmethod
|
1236
|
+
def _list_template_varilable_details_http_info(cls, request):
|
1237
|
+
http_info = {
|
1238
|
+
"method": "GET",
|
1239
|
+
"resource_path": "/v2/{project_id}/msgsms/templates/{id}/varilable",
|
1240
|
+
"request_type": request.__class__.__name__,
|
1241
|
+
"response_type": "ListTemplateVarilableDetailsResponse"
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1245
|
+
|
1246
|
+
cname = None
|
1247
|
+
|
1248
|
+
collection_formats = {}
|
1249
|
+
|
1250
|
+
path_params = {}
|
1251
|
+
if 'id' in local_var_params:
|
1252
|
+
path_params['id'] = local_var_params['id']
|
1253
|
+
|
1254
|
+
query_params = []
|
1255
|
+
|
1256
|
+
header_params = {}
|
1257
|
+
|
1258
|
+
form_params = {}
|
1259
|
+
|
1260
|
+
body = None
|
1261
|
+
if isinstance(request, SdkStreamRequest):
|
1262
|
+
body = request.get_file_stream()
|
1263
|
+
|
1264
|
+
response_headers = []
|
1265
|
+
|
1266
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1267
|
+
['application/json'])
|
1268
|
+
|
1269
|
+
auth_settings = []
|
1270
|
+
|
1271
|
+
http_info["cname"] = cname
|
1272
|
+
http_info["collection_formats"] = collection_formats
|
1273
|
+
http_info["path_params"] = path_params
|
1274
|
+
http_info["query_params"] = query_params
|
1275
|
+
http_info["header_params"] = header_params
|
1276
|
+
http_info["post_params"] = form_params
|
1277
|
+
http_info["body"] = body
|
1278
|
+
http_info["response_headers"] = response_headers
|
1279
|
+
|
1280
|
+
return http_info
|
1281
|
+
|
1282
|
+
def show_template(self, request):
|
1283
|
+
r"""获取模板详情
|
1284
|
+
|
1285
|
+
该接口用于用户查询已创建的模板详情。
|
1286
|
+
|
1287
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1288
|
+
|
1289
|
+
:param request: Request instance for ShowTemplate
|
1290
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.ShowTemplateRequest`
|
1291
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.ShowTemplateResponse`
|
1292
|
+
"""
|
1293
|
+
http_info = self._show_template_http_info(request)
|
1294
|
+
return self._call_api(**http_info)
|
1295
|
+
|
1296
|
+
def show_template_invoker(self, request):
|
1297
|
+
http_info = self._show_template_http_info(request)
|
1298
|
+
return SyncInvoker(self, http_info)
|
1299
|
+
|
1300
|
+
@classmethod
|
1301
|
+
def _show_template_http_info(cls, request):
|
1302
|
+
http_info = {
|
1303
|
+
"method": "GET",
|
1304
|
+
"resource_path": "/v2/{project_id}/msgsms/templates/{id}",
|
1305
|
+
"request_type": request.__class__.__name__,
|
1306
|
+
"response_type": "ShowTemplateResponse"
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1310
|
+
|
1311
|
+
cname = None
|
1312
|
+
|
1313
|
+
collection_formats = {}
|
1314
|
+
|
1315
|
+
path_params = {}
|
1316
|
+
if 'id' in local_var_params:
|
1317
|
+
path_params['id'] = local_var_params['id']
|
1318
|
+
|
1319
|
+
query_params = []
|
1320
|
+
|
1321
|
+
header_params = {}
|
1322
|
+
|
1323
|
+
form_params = {}
|
1324
|
+
|
1325
|
+
body = None
|
1326
|
+
if isinstance(request, SdkStreamRequest):
|
1327
|
+
body = request.get_file_stream()
|
1328
|
+
|
1329
|
+
response_headers = []
|
1330
|
+
|
1331
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1332
|
+
['application/json'])
|
1333
|
+
|
1334
|
+
auth_settings = []
|
1335
|
+
|
1336
|
+
http_info["cname"] = cname
|
1337
|
+
http_info["collection_formats"] = collection_formats
|
1338
|
+
http_info["path_params"] = path_params
|
1339
|
+
http_info["query_params"] = query_params
|
1340
|
+
http_info["header_params"] = header_params
|
1341
|
+
http_info["post_params"] = form_params
|
1342
|
+
http_info["body"] = body
|
1343
|
+
http_info["response_headers"] = response_headers
|
1344
|
+
|
1345
|
+
return http_info
|
1346
|
+
|
1347
|
+
def update_template(self, request):
|
1348
|
+
r"""修改短信模板
|
1349
|
+
|
1350
|
+
该接口用于用户修改模板信息,目前仅支持审核不通过的短信模板重新修改
|
1351
|
+
|
1352
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1353
|
+
|
1354
|
+
:param request: Request instance for UpdateTemplate
|
1355
|
+
:type request: :class:`huaweicloudsdkmsgsms.v2.UpdateTemplateRequest`
|
1356
|
+
:rtype: :class:`huaweicloudsdkmsgsms.v2.UpdateTemplateResponse`
|
1357
|
+
"""
|
1358
|
+
http_info = self._update_template_http_info(request)
|
1359
|
+
return self._call_api(**http_info)
|
1360
|
+
|
1361
|
+
def update_template_invoker(self, request):
|
1362
|
+
http_info = self._update_template_http_info(request)
|
1363
|
+
return SyncInvoker(self, http_info)
|
1364
|
+
|
1365
|
+
@classmethod
|
1366
|
+
def _update_template_http_info(cls, request):
|
1367
|
+
http_info = {
|
1368
|
+
"method": "PUT",
|
1369
|
+
"resource_path": "/v2/{project_id}/msgsms/templates/{id}",
|
1370
|
+
"request_type": request.__class__.__name__,
|
1371
|
+
"response_type": "UpdateTemplateResponse"
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1375
|
+
|
1376
|
+
cname = None
|
1377
|
+
|
1378
|
+
collection_formats = {}
|
1379
|
+
|
1380
|
+
path_params = {}
|
1381
|
+
if 'id' in local_var_params:
|
1382
|
+
path_params['id'] = local_var_params['id']
|
1383
|
+
|
1384
|
+
query_params = []
|
1385
|
+
|
1386
|
+
header_params = {}
|
1387
|
+
|
1388
|
+
form_params = {}
|
1389
|
+
|
1390
|
+
body = None
|
1391
|
+
if 'body' in local_var_params:
|
1392
|
+
body = local_var_params['body']
|
1393
|
+
if isinstance(request, SdkStreamRequest):
|
1394
|
+
body = request.get_file_stream()
|
1395
|
+
|
1396
|
+
response_headers = []
|
1397
|
+
|
1398
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1399
|
+
['application/json'])
|
1400
|
+
|
1401
|
+
auth_settings = []
|
1402
|
+
|
1403
|
+
http_info["cname"] = cname
|
1404
|
+
http_info["collection_formats"] = collection_formats
|
1405
|
+
http_info["path_params"] = path_params
|
1406
|
+
http_info["query_params"] = query_params
|
1407
|
+
http_info["header_params"] = header_params
|
1408
|
+
http_info["post_params"] = form_params
|
1409
|
+
http_info["body"] = body
|
1410
|
+
http_info["response_headers"] = response_headers
|
1411
|
+
|
1412
|
+
return http_info
|
1413
|
+
|
1414
|
+
def _call_api(self, **kwargs):
|
1415
|
+
try:
|
1416
|
+
return self.do_http_request(**kwargs)
|
1417
|
+
except TypeError:
|
1418
|
+
import inspect
|
1419
|
+
params = inspect.signature(self.do_http_request).parameters
|
1420
|
+
http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
|
1421
|
+
return self.do_http_request(**http_info)
|
1422
|
+
|
1423
|
+
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
1424
|
+
post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
|
1425
|
+
collection_formats=None, request_type=None):
|
1426
|
+
"""Makes the HTTP request and returns deserialized data.
|
1427
|
+
|
1428
|
+
:param resource_path: Path to method endpoint.
|
1429
|
+
:param method: Method to call.
|
1430
|
+
:param path_params: Path parameters in the url.
|
1431
|
+
:param query_params: Query parameters in the url.
|
1432
|
+
:param header_params: Header parameters to be placed in the request header.
|
1433
|
+
:param body: Request body.
|
1434
|
+
:param post_params: Request post form parameters,
|
1435
|
+
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
1436
|
+
:param cname: Used for obs endpoint.
|
1437
|
+
:param auth_settings: Auth Settings names for the request.
|
1438
|
+
:param response_type: Response data type.
|
1439
|
+
:param response_headers: Header should be added to response data.
|
1440
|
+
:param collection_formats: dict of collection formats for path, query,
|
1441
|
+
header, and post parameters.
|
1442
|
+
:param request_type: Request data type.
|
1443
|
+
:return:
|
1444
|
+
Return the response directly.
|
1445
|
+
"""
|
1446
|
+
return self.do_http_request(
|
1447
|
+
method=method,
|
1448
|
+
resource_path=resource_path,
|
1449
|
+
path_params=path_params,
|
1450
|
+
query_params=query_params,
|
1451
|
+
header_params=header_params,
|
1452
|
+
body=body,
|
1453
|
+
post_params=post_params,
|
1454
|
+
cname=cname,
|
1455
|
+
response_type=response_type,
|
1456
|
+
response_headers=response_headers,
|
1457
|
+
collection_formats=collection_formats,
|
1458
|
+
request_type=request_type)
|