@aws-sdk/client-connectcampaigns 3.131.0 → 3.142.0
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.
- package/CHANGELOG.md +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/CreateCampaignCommand.js +2 -2
- package/dist-cjs/commands/DeleteCampaignCommand.js +1 -1
- package/dist-cjs/commands/DeleteConnectInstanceConfigCommand.js +1 -1
- package/dist-cjs/commands/DeleteInstanceOnboardingJobCommand.js +1 -1
- package/dist-cjs/commands/DescribeCampaignCommand.js +2 -2
- package/dist-cjs/commands/GetCampaignStateBatchCommand.js +2 -2
- package/dist-cjs/commands/GetCampaignStateCommand.js +2 -2
- package/dist-cjs/commands/GetConnectInstanceConfigCommand.js +2 -2
- package/dist-cjs/commands/GetInstanceOnboardingJobStatusCommand.js +2 -2
- package/dist-cjs/commands/ListCampaignsCommand.js +2 -2
- package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
- package/dist-cjs/commands/PauseCampaignCommand.js +1 -1
- package/dist-cjs/commands/PutDialRequestBatchCommand.js +2 -2
- package/dist-cjs/commands/ResumeCampaignCommand.js +1 -1
- package/dist-cjs/commands/StartCampaignCommand.js +1 -1
- package/dist-cjs/commands/StartInstanceOnboardingJobCommand.js +2 -2
- package/dist-cjs/commands/StopCampaignCommand.js +1 -1
- package/dist-cjs/commands/TagResourceCommand.js +1 -1
- package/dist-cjs/commands/UntagResourceCommand.js +1 -1
- package/dist-cjs/commands/UpdateCampaignDialerConfigCommand.js +1 -1
- package/dist-cjs/commands/UpdateCampaignNameCommand.js +1 -1
- package/dist-cjs/commands/UpdateCampaignOutboundCallConfigCommand.js +1 -1
- package/dist-cjs/models/models_0.js +210 -305
- package/dist-cjs/protocols/Aws_restJson1.js +253 -519
- package/dist-es/commands/CreateCampaignCommand.js +3 -3
- package/dist-es/commands/DeleteCampaignCommand.js +2 -2
- package/dist-es/commands/DeleteConnectInstanceConfigCommand.js +2 -2
- package/dist-es/commands/DeleteInstanceOnboardingJobCommand.js +2 -2
- package/dist-es/commands/DescribeCampaignCommand.js +3 -3
- package/dist-es/commands/GetCampaignStateBatchCommand.js +3 -3
- package/dist-es/commands/GetCampaignStateCommand.js +3 -3
- package/dist-es/commands/GetConnectInstanceConfigCommand.js +3 -3
- package/dist-es/commands/GetInstanceOnboardingJobStatusCommand.js +3 -3
- package/dist-es/commands/ListCampaignsCommand.js +3 -3
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
- package/dist-es/commands/PauseCampaignCommand.js +2 -2
- package/dist-es/commands/PutDialRequestBatchCommand.js +3 -3
- package/dist-es/commands/ResumeCampaignCommand.js +2 -2
- package/dist-es/commands/StartCampaignCommand.js +2 -2
- package/dist-es/commands/StartInstanceOnboardingJobCommand.js +3 -3
- package/dist-es/commands/StopCampaignCommand.js +2 -2
- package/dist-es/commands/TagResourceCommand.js +2 -2
- package/dist-es/commands/UntagResourceCommand.js +2 -2
- package/dist-es/commands/UpdateCampaignDialerConfigCommand.js +2 -2
- package/dist-es/commands/UpdateCampaignNameCommand.js +2 -2
- package/dist-es/commands/UpdateCampaignOutboundCallConfigCommand.js +2 -2
- package/dist-es/models/models_0.js +57 -201
- package/dist-es/protocols/Aws_restJson1.js +339 -537
- package/dist-types/models/models_0.d.ts +196 -292
- package/dist-types/ts3.4/models/models_0.d.ts +98 -194
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion,
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map as __map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { ConnectCampaignsServiceException as __BaseException } from "../models/ConnectCampaignsServiceException";
|
|
5
5
|
import { AccessDeniedException, ConflictException, DialerConfig, InternalServerException, InvalidCampaignStateException, InvalidStateException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
6
|
export var serializeAws_restJson1CreateCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -32,7 +32,7 @@ export var serializeAws_restJson1CreateCampaignCommand = function (input, contex
|
|
|
32
32
|
});
|
|
33
33
|
}); };
|
|
34
34
|
export var serializeAws_restJson1DeleteCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
35
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
35
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
36
36
|
return __generator(this, function (_c) {
|
|
37
37
|
switch (_c.label) {
|
|
38
38
|
case 0: return [4, context.endpoint()];
|
|
@@ -40,16 +40,7 @@ export var serializeAws_restJson1DeleteCampaignCommand = function (input, contex
|
|
|
40
40
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
41
41
|
headers = {};
|
|
42
42
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}";
|
|
43
|
-
|
|
44
|
-
labelValue = input.id;
|
|
45
|
-
if (labelValue.length <= 0) {
|
|
46
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
47
|
-
}
|
|
48
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
52
|
-
}
|
|
43
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
53
44
|
return [2, new __HttpRequest({
|
|
54
45
|
protocol: protocol,
|
|
55
46
|
hostname: hostname,
|
|
@@ -63,7 +54,7 @@ export var serializeAws_restJson1DeleteCampaignCommand = function (input, contex
|
|
|
63
54
|
});
|
|
64
55
|
}); };
|
|
65
56
|
export var serializeAws_restJson1DeleteConnectInstanceConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
57
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
67
58
|
return __generator(this, function (_c) {
|
|
68
59
|
switch (_c.label) {
|
|
69
60
|
case 0: return [4, context.endpoint()];
|
|
@@ -72,16 +63,7 @@ export var serializeAws_restJson1DeleteConnectInstanceConfigCommand = function (
|
|
|
72
63
|
headers = {};
|
|
73
64
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
74
65
|
"/connect-instance/{connectInstanceId}/config";
|
|
75
|
-
|
|
76
|
-
labelValue = input.connectInstanceId;
|
|
77
|
-
if (labelValue.length <= 0) {
|
|
78
|
-
throw new Error("Empty value provided for input HTTP label: connectInstanceId.");
|
|
79
|
-
}
|
|
80
|
-
resolvedPath = resolvedPath.replace("{connectInstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
throw new Error("No value provided for input HTTP label: connectInstanceId.");
|
|
84
|
-
}
|
|
66
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
85
67
|
return [2, new __HttpRequest({
|
|
86
68
|
protocol: protocol,
|
|
87
69
|
hostname: hostname,
|
|
@@ -95,7 +77,7 @@ export var serializeAws_restJson1DeleteConnectInstanceConfigCommand = function (
|
|
|
95
77
|
});
|
|
96
78
|
}); };
|
|
97
79
|
export var serializeAws_restJson1DeleteInstanceOnboardingJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
98
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
80
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
99
81
|
return __generator(this, function (_c) {
|
|
100
82
|
switch (_c.label) {
|
|
101
83
|
case 0: return [4, context.endpoint()];
|
|
@@ -104,16 +86,7 @@ export var serializeAws_restJson1DeleteInstanceOnboardingJobCommand = function (
|
|
|
104
86
|
headers = {};
|
|
105
87
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
106
88
|
"/connect-instance/{connectInstanceId}/onboarding";
|
|
107
|
-
|
|
108
|
-
labelValue = input.connectInstanceId;
|
|
109
|
-
if (labelValue.length <= 0) {
|
|
110
|
-
throw new Error("Empty value provided for input HTTP label: connectInstanceId.");
|
|
111
|
-
}
|
|
112
|
-
resolvedPath = resolvedPath.replace("{connectInstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
throw new Error("No value provided for input HTTP label: connectInstanceId.");
|
|
116
|
-
}
|
|
89
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
117
90
|
return [2, new __HttpRequest({
|
|
118
91
|
protocol: protocol,
|
|
119
92
|
hostname: hostname,
|
|
@@ -127,7 +100,7 @@ export var serializeAws_restJson1DeleteInstanceOnboardingJobCommand = function (
|
|
|
127
100
|
});
|
|
128
101
|
}); };
|
|
129
102
|
export var serializeAws_restJson1DescribeCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
130
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
103
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
131
104
|
return __generator(this, function (_c) {
|
|
132
105
|
switch (_c.label) {
|
|
133
106
|
case 0: return [4, context.endpoint()];
|
|
@@ -135,16 +108,7 @@ export var serializeAws_restJson1DescribeCampaignCommand = function (input, cont
|
|
|
135
108
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
136
109
|
headers = {};
|
|
137
110
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}";
|
|
138
|
-
|
|
139
|
-
labelValue = input.id;
|
|
140
|
-
if (labelValue.length <= 0) {
|
|
141
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
142
|
-
}
|
|
143
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
147
|
-
}
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
148
112
|
return [2, new __HttpRequest({
|
|
149
113
|
protocol: protocol,
|
|
150
114
|
hostname: hostname,
|
|
@@ -158,7 +122,7 @@ export var serializeAws_restJson1DescribeCampaignCommand = function (input, cont
|
|
|
158
122
|
});
|
|
159
123
|
}); };
|
|
160
124
|
export var serializeAws_restJson1GetCampaignStateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
161
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
125
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
162
126
|
return __generator(this, function (_c) {
|
|
163
127
|
switch (_c.label) {
|
|
164
128
|
case 0: return [4, context.endpoint()];
|
|
@@ -166,16 +130,7 @@ export var serializeAws_restJson1GetCampaignStateCommand = function (input, cont
|
|
|
166
130
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
167
131
|
headers = {};
|
|
168
132
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/state";
|
|
169
|
-
|
|
170
|
-
labelValue = input.id;
|
|
171
|
-
if (labelValue.length <= 0) {
|
|
172
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
173
|
-
}
|
|
174
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
178
|
-
}
|
|
133
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
179
134
|
return [2, new __HttpRequest({
|
|
180
135
|
protocol: protocol,
|
|
181
136
|
hostname: hostname,
|
|
@@ -213,7 +168,7 @@ export var serializeAws_restJson1GetCampaignStateBatchCommand = function (input,
|
|
|
213
168
|
});
|
|
214
169
|
}); };
|
|
215
170
|
export var serializeAws_restJson1GetConnectInstanceConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
216
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
171
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
217
172
|
return __generator(this, function (_c) {
|
|
218
173
|
switch (_c.label) {
|
|
219
174
|
case 0: return [4, context.endpoint()];
|
|
@@ -222,16 +177,7 @@ export var serializeAws_restJson1GetConnectInstanceConfigCommand = function (inp
|
|
|
222
177
|
headers = {};
|
|
223
178
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
224
179
|
"/connect-instance/{connectInstanceId}/config";
|
|
225
|
-
|
|
226
|
-
labelValue = input.connectInstanceId;
|
|
227
|
-
if (labelValue.length <= 0) {
|
|
228
|
-
throw new Error("Empty value provided for input HTTP label: connectInstanceId.");
|
|
229
|
-
}
|
|
230
|
-
resolvedPath = resolvedPath.replace("{connectInstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
throw new Error("No value provided for input HTTP label: connectInstanceId.");
|
|
234
|
-
}
|
|
180
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
235
181
|
return [2, new __HttpRequest({
|
|
236
182
|
protocol: protocol,
|
|
237
183
|
hostname: hostname,
|
|
@@ -245,7 +191,7 @@ export var serializeAws_restJson1GetConnectInstanceConfigCommand = function (inp
|
|
|
245
191
|
});
|
|
246
192
|
}); };
|
|
247
193
|
export var serializeAws_restJson1GetInstanceOnboardingJobStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
248
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
194
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
249
195
|
return __generator(this, function (_c) {
|
|
250
196
|
switch (_c.label) {
|
|
251
197
|
case 0: return [4, context.endpoint()];
|
|
@@ -254,16 +200,7 @@ export var serializeAws_restJson1GetInstanceOnboardingJobStatusCommand = functio
|
|
|
254
200
|
headers = {};
|
|
255
201
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
256
202
|
"/connect-instance/{connectInstanceId}/onboarding";
|
|
257
|
-
|
|
258
|
-
labelValue = input.connectInstanceId;
|
|
259
|
-
if (labelValue.length <= 0) {
|
|
260
|
-
throw new Error("Empty value provided for input HTTP label: connectInstanceId.");
|
|
261
|
-
}
|
|
262
|
-
resolvedPath = resolvedPath.replace("{connectInstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
throw new Error("No value provided for input HTTP label: connectInstanceId.");
|
|
266
|
-
}
|
|
203
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
267
204
|
return [2, new __HttpRequest({
|
|
268
205
|
protocol: protocol,
|
|
269
206
|
hostname: hostname,
|
|
@@ -301,7 +238,7 @@ export var serializeAws_restJson1ListCampaignsCommand = function (input, context
|
|
|
301
238
|
});
|
|
302
239
|
}); };
|
|
303
240
|
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
304
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
241
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
305
242
|
return __generator(this, function (_c) {
|
|
306
243
|
switch (_c.label) {
|
|
307
244
|
case 0: return [4, context.endpoint()];
|
|
@@ -309,16 +246,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
309
246
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
310
247
|
headers = {};
|
|
311
248
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{arn}";
|
|
312
|
-
|
|
313
|
-
labelValue = input.arn;
|
|
314
|
-
if (labelValue.length <= 0) {
|
|
315
|
-
throw new Error("Empty value provided for input HTTP label: arn.");
|
|
316
|
-
}
|
|
317
|
-
resolvedPath = resolvedPath.replace("{arn}", __extendedEncodeURIComponent(labelValue));
|
|
318
|
-
}
|
|
319
|
-
else {
|
|
320
|
-
throw new Error("No value provided for input HTTP label: arn.");
|
|
321
|
-
}
|
|
249
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "arn", function () { return input.arn; }, "{arn}", false);
|
|
322
250
|
return [2, new __HttpRequest({
|
|
323
251
|
protocol: protocol,
|
|
324
252
|
hostname: hostname,
|
|
@@ -332,7 +260,7 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
332
260
|
});
|
|
333
261
|
}); };
|
|
334
262
|
export var serializeAws_restJson1PauseCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
335
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
263
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
336
264
|
return __generator(this, function (_c) {
|
|
337
265
|
switch (_c.label) {
|
|
338
266
|
case 0: return [4, context.endpoint()];
|
|
@@ -340,16 +268,7 @@ export var serializeAws_restJson1PauseCampaignCommand = function (input, context
|
|
|
340
268
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
341
269
|
headers = {};
|
|
342
270
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/pause";
|
|
343
|
-
|
|
344
|
-
labelValue = input.id;
|
|
345
|
-
if (labelValue.length <= 0) {
|
|
346
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
347
|
-
}
|
|
348
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
352
|
-
}
|
|
271
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
353
272
|
return [2, new __HttpRequest({
|
|
354
273
|
protocol: protocol,
|
|
355
274
|
hostname: hostname,
|
|
@@ -363,7 +282,7 @@ export var serializeAws_restJson1PauseCampaignCommand = function (input, context
|
|
|
363
282
|
});
|
|
364
283
|
}); };
|
|
365
284
|
export var serializeAws_restJson1PutDialRequestBatchCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
366
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
285
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
367
286
|
return __generator(this, function (_c) {
|
|
368
287
|
switch (_c.label) {
|
|
369
288
|
case 0: return [4, context.endpoint()];
|
|
@@ -373,16 +292,7 @@ export var serializeAws_restJson1PutDialRequestBatchCommand = function (input, c
|
|
|
373
292
|
"content-type": "application/json",
|
|
374
293
|
};
|
|
375
294
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/dial-requests";
|
|
376
|
-
|
|
377
|
-
labelValue = input.id;
|
|
378
|
-
if (labelValue.length <= 0) {
|
|
379
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
380
|
-
}
|
|
381
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
385
|
-
}
|
|
295
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
386
296
|
body = JSON.stringify(__assign({}, (input.dialRequests != null && {
|
|
387
297
|
dialRequests: serializeAws_restJson1DialRequestList(input.dialRequests, context),
|
|
388
298
|
})));
|
|
@@ -399,7 +309,7 @@ export var serializeAws_restJson1PutDialRequestBatchCommand = function (input, c
|
|
|
399
309
|
});
|
|
400
310
|
}); };
|
|
401
311
|
export var serializeAws_restJson1ResumeCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
402
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
312
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
403
313
|
return __generator(this, function (_c) {
|
|
404
314
|
switch (_c.label) {
|
|
405
315
|
case 0: return [4, context.endpoint()];
|
|
@@ -407,16 +317,7 @@ export var serializeAws_restJson1ResumeCampaignCommand = function (input, contex
|
|
|
407
317
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
408
318
|
headers = {};
|
|
409
319
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/resume";
|
|
410
|
-
|
|
411
|
-
labelValue = input.id;
|
|
412
|
-
if (labelValue.length <= 0) {
|
|
413
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
414
|
-
}
|
|
415
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
419
|
-
}
|
|
320
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
420
321
|
return [2, new __HttpRequest({
|
|
421
322
|
protocol: protocol,
|
|
422
323
|
hostname: hostname,
|
|
@@ -430,7 +331,7 @@ export var serializeAws_restJson1ResumeCampaignCommand = function (input, contex
|
|
|
430
331
|
});
|
|
431
332
|
}); };
|
|
432
333
|
export var serializeAws_restJson1StartCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
433
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
334
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
434
335
|
return __generator(this, function (_c) {
|
|
435
336
|
switch (_c.label) {
|
|
436
337
|
case 0: return [4, context.endpoint()];
|
|
@@ -438,16 +339,7 @@ export var serializeAws_restJson1StartCampaignCommand = function (input, context
|
|
|
438
339
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
439
340
|
headers = {};
|
|
440
341
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/start";
|
|
441
|
-
|
|
442
|
-
labelValue = input.id;
|
|
443
|
-
if (labelValue.length <= 0) {
|
|
444
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
445
|
-
}
|
|
446
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
450
|
-
}
|
|
342
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
451
343
|
return [2, new __HttpRequest({
|
|
452
344
|
protocol: protocol,
|
|
453
345
|
hostname: hostname,
|
|
@@ -461,7 +353,7 @@ export var serializeAws_restJson1StartCampaignCommand = function (input, context
|
|
|
461
353
|
});
|
|
462
354
|
}); };
|
|
463
355
|
export var serializeAws_restJson1StartInstanceOnboardingJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
464
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
356
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
465
357
|
return __generator(this, function (_c) {
|
|
466
358
|
switch (_c.label) {
|
|
467
359
|
case 0: return [4, context.endpoint()];
|
|
@@ -472,16 +364,7 @@ export var serializeAws_restJson1StartInstanceOnboardingJobCommand = function (i
|
|
|
472
364
|
};
|
|
473
365
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
474
366
|
"/connect-instance/{connectInstanceId}/onboarding";
|
|
475
|
-
|
|
476
|
-
labelValue = input.connectInstanceId;
|
|
477
|
-
if (labelValue.length <= 0) {
|
|
478
|
-
throw new Error("Empty value provided for input HTTP label: connectInstanceId.");
|
|
479
|
-
}
|
|
480
|
-
resolvedPath = resolvedPath.replace("{connectInstanceId}", __extendedEncodeURIComponent(labelValue));
|
|
481
|
-
}
|
|
482
|
-
else {
|
|
483
|
-
throw new Error("No value provided for input HTTP label: connectInstanceId.");
|
|
484
|
-
}
|
|
367
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
485
368
|
body = JSON.stringify(__assign({}, (input.encryptionConfig != null && {
|
|
486
369
|
encryptionConfig: serializeAws_restJson1EncryptionConfig(input.encryptionConfig, context),
|
|
487
370
|
})));
|
|
@@ -498,7 +381,7 @@ export var serializeAws_restJson1StartInstanceOnboardingJobCommand = function (i
|
|
|
498
381
|
});
|
|
499
382
|
}); };
|
|
500
383
|
export var serializeAws_restJson1StopCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
501
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
384
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
502
385
|
return __generator(this, function (_c) {
|
|
503
386
|
switch (_c.label) {
|
|
504
387
|
case 0: return [4, context.endpoint()];
|
|
@@ -506,16 +389,7 @@ export var serializeAws_restJson1StopCampaignCommand = function (input, context)
|
|
|
506
389
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
507
390
|
headers = {};
|
|
508
391
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/stop";
|
|
509
|
-
|
|
510
|
-
labelValue = input.id;
|
|
511
|
-
if (labelValue.length <= 0) {
|
|
512
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
513
|
-
}
|
|
514
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
515
|
-
}
|
|
516
|
-
else {
|
|
517
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
518
|
-
}
|
|
392
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
519
393
|
return [2, new __HttpRequest({
|
|
520
394
|
protocol: protocol,
|
|
521
395
|
hostname: hostname,
|
|
@@ -529,7 +403,7 @@ export var serializeAws_restJson1StopCampaignCommand = function (input, context)
|
|
|
529
403
|
});
|
|
530
404
|
}); };
|
|
531
405
|
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
532
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
406
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
533
407
|
return __generator(this, function (_c) {
|
|
534
408
|
switch (_c.label) {
|
|
535
409
|
case 0: return [4, context.endpoint()];
|
|
@@ -539,16 +413,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
539
413
|
"content-type": "application/json",
|
|
540
414
|
};
|
|
541
415
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{arn}";
|
|
542
|
-
|
|
543
|
-
labelValue = input.arn;
|
|
544
|
-
if (labelValue.length <= 0) {
|
|
545
|
-
throw new Error("Empty value provided for input HTTP label: arn.");
|
|
546
|
-
}
|
|
547
|
-
resolvedPath = resolvedPath.replace("{arn}", __extendedEncodeURIComponent(labelValue));
|
|
548
|
-
}
|
|
549
|
-
else {
|
|
550
|
-
throw new Error("No value provided for input HTTP label: arn.");
|
|
551
|
-
}
|
|
416
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "arn", function () { return input.arn; }, "{arn}", false);
|
|
552
417
|
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
553
418
|
return [2, new __HttpRequest({
|
|
554
419
|
protocol: protocol,
|
|
@@ -563,7 +428,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
|
|
|
563
428
|
});
|
|
564
429
|
}); };
|
|
565
430
|
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
566
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
431
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
567
432
|
return __generator(this, function (_c) {
|
|
568
433
|
switch (_c.label) {
|
|
569
434
|
case 0: return [4, context.endpoint()];
|
|
@@ -571,17 +436,10 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
|
|
|
571
436
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
572
437
|
headers = {};
|
|
573
438
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{arn}";
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}
|
|
579
|
-
resolvedPath = resolvedPath.replace("{arn}", __extendedEncodeURIComponent(labelValue));
|
|
580
|
-
}
|
|
581
|
-
else {
|
|
582
|
-
throw new Error("No value provided for input HTTP label: arn.");
|
|
583
|
-
}
|
|
584
|
-
query = __assign({}, (input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map(function (_entry) { return _entry; }) }));
|
|
439
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "arn", function () { return input.arn; }, "{arn}", false);
|
|
440
|
+
query = map({
|
|
441
|
+
tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
442
|
+
});
|
|
585
443
|
return [2, new __HttpRequest({
|
|
586
444
|
protocol: protocol,
|
|
587
445
|
hostname: hostname,
|
|
@@ -596,7 +454,7 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
|
|
|
596
454
|
});
|
|
597
455
|
}); };
|
|
598
456
|
export var serializeAws_restJson1UpdateCampaignDialerConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
599
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
457
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
600
458
|
return __generator(this, function (_c) {
|
|
601
459
|
switch (_c.label) {
|
|
602
460
|
case 0: return [4, context.endpoint()];
|
|
@@ -606,16 +464,7 @@ export var serializeAws_restJson1UpdateCampaignDialerConfigCommand = function (i
|
|
|
606
464
|
"content-type": "application/json",
|
|
607
465
|
};
|
|
608
466
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/dialer-config";
|
|
609
|
-
|
|
610
|
-
labelValue = input.id;
|
|
611
|
-
if (labelValue.length <= 0) {
|
|
612
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
613
|
-
}
|
|
614
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
615
|
-
}
|
|
616
|
-
else {
|
|
617
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
618
|
-
}
|
|
467
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
619
468
|
body = JSON.stringify(__assign({}, (input.dialerConfig != null && {
|
|
620
469
|
dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
|
|
621
470
|
})));
|
|
@@ -632,7 +481,7 @@ export var serializeAws_restJson1UpdateCampaignDialerConfigCommand = function (i
|
|
|
632
481
|
});
|
|
633
482
|
}); };
|
|
634
483
|
export var serializeAws_restJson1UpdateCampaignNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
635
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
484
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
636
485
|
return __generator(this, function (_c) {
|
|
637
486
|
switch (_c.label) {
|
|
638
487
|
case 0: return [4, context.endpoint()];
|
|
@@ -642,16 +491,7 @@ export var serializeAws_restJson1UpdateCampaignNameCommand = function (input, co
|
|
|
642
491
|
"content-type": "application/json",
|
|
643
492
|
};
|
|
644
493
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/name";
|
|
645
|
-
|
|
646
|
-
labelValue = input.id;
|
|
647
|
-
if (labelValue.length <= 0) {
|
|
648
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
649
|
-
}
|
|
650
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
654
|
-
}
|
|
494
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
655
495
|
body = JSON.stringify(__assign({}, (input.name != null && { name: input.name })));
|
|
656
496
|
return [2, new __HttpRequest({
|
|
657
497
|
protocol: protocol,
|
|
@@ -666,7 +506,7 @@ export var serializeAws_restJson1UpdateCampaignNameCommand = function (input, co
|
|
|
666
506
|
});
|
|
667
507
|
}); };
|
|
668
508
|
export var serializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
669
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
509
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
670
510
|
return __generator(this, function (_c) {
|
|
671
511
|
switch (_c.label) {
|
|
672
512
|
case 0: return [4, context.endpoint()];
|
|
@@ -676,16 +516,7 @@ export var serializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = funct
|
|
|
676
516
|
"content-type": "application/json",
|
|
677
517
|
};
|
|
678
518
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/outbound-call-config";
|
|
679
|
-
|
|
680
|
-
labelValue = input.id;
|
|
681
|
-
if (labelValue.length <= 0) {
|
|
682
|
-
throw new Error("Empty value provided for input HTTP label: id.");
|
|
683
|
-
}
|
|
684
|
-
resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue));
|
|
685
|
-
}
|
|
686
|
-
else {
|
|
687
|
-
throw new Error("No value provided for input HTTP label: id.");
|
|
688
|
-
}
|
|
519
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
689
520
|
body = JSON.stringify(__assign(__assign(__assign({}, (input.answerMachineDetectionConfig != null && {
|
|
690
521
|
answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
|
|
691
522
|
})), (input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId })), (input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber })));
|
|
@@ -709,32 +540,29 @@ export var deserializeAws_restJson1CreateCampaignCommand = function (output, con
|
|
|
709
540
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
710
541
|
return [2, deserializeAws_restJson1CreateCampaignCommandError(output, context)];
|
|
711
542
|
}
|
|
712
|
-
contents = {
|
|
543
|
+
contents = map({
|
|
713
544
|
$metadata: deserializeMetadata(output),
|
|
714
|
-
|
|
715
|
-
id: undefined,
|
|
716
|
-
tags: undefined,
|
|
717
|
-
};
|
|
545
|
+
});
|
|
718
546
|
_a = __expectNonNull;
|
|
719
547
|
_b = __expectObject;
|
|
720
548
|
return [4, parseBody(output.body, context)];
|
|
721
549
|
case 1:
|
|
722
550
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
723
|
-
if (data.arn
|
|
551
|
+
if (data.arn != null) {
|
|
724
552
|
contents.arn = __expectString(data.arn);
|
|
725
553
|
}
|
|
726
|
-
if (data.id
|
|
554
|
+
if (data.id != null) {
|
|
727
555
|
contents.id = __expectString(data.id);
|
|
728
556
|
}
|
|
729
|
-
if (data.tags
|
|
557
|
+
if (data.tags != null) {
|
|
730
558
|
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
731
559
|
}
|
|
732
|
-
return [2,
|
|
560
|
+
return [2, contents];
|
|
733
561
|
}
|
|
734
562
|
});
|
|
735
563
|
}); };
|
|
736
564
|
var deserializeAws_restJson1CreateCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
737
|
-
var parsedOutput, _a,
|
|
565
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
738
566
|
var _c;
|
|
739
567
|
return __generator(this, function (_d) {
|
|
740
568
|
switch (_d.label) {
|
|
@@ -779,14 +607,14 @@ var deserializeAws_restJson1CreateCampaignCommandError = function (output, conte
|
|
|
779
607
|
case 15: throw _d.sent();
|
|
780
608
|
case 16:
|
|
781
609
|
parsedBody = parsedOutput.body;
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
$metadata: $metadata,
|
|
610
|
+
throwDefaultError({
|
|
611
|
+
output: output,
|
|
612
|
+
parsedBody: parsedBody,
|
|
613
|
+
exceptionCtor: __BaseException,
|
|
614
|
+
errorCode: errorCode,
|
|
788
615
|
});
|
|
789
|
-
|
|
616
|
+
_d.label = 17;
|
|
617
|
+
case 17: return [2];
|
|
790
618
|
}
|
|
791
619
|
});
|
|
792
620
|
}); };
|
|
@@ -798,18 +626,18 @@ export var deserializeAws_restJson1DeleteCampaignCommand = function (output, con
|
|
|
798
626
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
799
627
|
return [2, deserializeAws_restJson1DeleteCampaignCommandError(output, context)];
|
|
800
628
|
}
|
|
801
|
-
contents = {
|
|
629
|
+
contents = map({
|
|
802
630
|
$metadata: deserializeMetadata(output),
|
|
803
|
-
};
|
|
631
|
+
});
|
|
804
632
|
return [4, collectBody(output.body, context)];
|
|
805
633
|
case 1:
|
|
806
634
|
_a.sent();
|
|
807
|
-
return [2,
|
|
635
|
+
return [2, contents];
|
|
808
636
|
}
|
|
809
637
|
});
|
|
810
638
|
}); };
|
|
811
639
|
var deserializeAws_restJson1DeleteCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
812
|
-
var parsedOutput, _a,
|
|
640
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
813
641
|
var _c;
|
|
814
642
|
return __generator(this, function (_d) {
|
|
815
643
|
switch (_d.label) {
|
|
@@ -842,14 +670,14 @@ var deserializeAws_restJson1DeleteCampaignCommandError = function (output, conte
|
|
|
842
670
|
case 9: throw _d.sent();
|
|
843
671
|
case 10:
|
|
844
672
|
parsedBody = parsedOutput.body;
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
$metadata: $metadata,
|
|
673
|
+
throwDefaultError({
|
|
674
|
+
output: output,
|
|
675
|
+
parsedBody: parsedBody,
|
|
676
|
+
exceptionCtor: __BaseException,
|
|
677
|
+
errorCode: errorCode,
|
|
851
678
|
});
|
|
852
|
-
|
|
679
|
+
_d.label = 11;
|
|
680
|
+
case 11: return [2];
|
|
853
681
|
}
|
|
854
682
|
});
|
|
855
683
|
}); };
|
|
@@ -861,18 +689,18 @@ export var deserializeAws_restJson1DeleteConnectInstanceConfigCommand = function
|
|
|
861
689
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
862
690
|
return [2, deserializeAws_restJson1DeleteConnectInstanceConfigCommandError(output, context)];
|
|
863
691
|
}
|
|
864
|
-
contents = {
|
|
692
|
+
contents = map({
|
|
865
693
|
$metadata: deserializeMetadata(output),
|
|
866
|
-
};
|
|
694
|
+
});
|
|
867
695
|
return [4, collectBody(output.body, context)];
|
|
868
696
|
case 1:
|
|
869
697
|
_a.sent();
|
|
870
|
-
return [2,
|
|
698
|
+
return [2, contents];
|
|
871
699
|
}
|
|
872
700
|
});
|
|
873
701
|
}); };
|
|
874
702
|
var deserializeAws_restJson1DeleteConnectInstanceConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
875
|
-
var parsedOutput, _a,
|
|
703
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
876
704
|
var _c;
|
|
877
705
|
return __generator(this, function (_d) {
|
|
878
706
|
switch (_d.label) {
|
|
@@ -913,14 +741,14 @@ var deserializeAws_restJson1DeleteConnectInstanceConfigCommandError = function (
|
|
|
913
741
|
case 13: throw _d.sent();
|
|
914
742
|
case 14:
|
|
915
743
|
parsedBody = parsedOutput.body;
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
$metadata: $metadata,
|
|
744
|
+
throwDefaultError({
|
|
745
|
+
output: output,
|
|
746
|
+
parsedBody: parsedBody,
|
|
747
|
+
exceptionCtor: __BaseException,
|
|
748
|
+
errorCode: errorCode,
|
|
922
749
|
});
|
|
923
|
-
|
|
750
|
+
_d.label = 15;
|
|
751
|
+
case 15: return [2];
|
|
924
752
|
}
|
|
925
753
|
});
|
|
926
754
|
}); };
|
|
@@ -932,18 +760,18 @@ export var deserializeAws_restJson1DeleteInstanceOnboardingJobCommand = function
|
|
|
932
760
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
933
761
|
return [2, deserializeAws_restJson1DeleteInstanceOnboardingJobCommandError(output, context)];
|
|
934
762
|
}
|
|
935
|
-
contents = {
|
|
763
|
+
contents = map({
|
|
936
764
|
$metadata: deserializeMetadata(output),
|
|
937
|
-
};
|
|
765
|
+
});
|
|
938
766
|
return [4, collectBody(output.body, context)];
|
|
939
767
|
case 1:
|
|
940
768
|
_a.sent();
|
|
941
|
-
return [2,
|
|
769
|
+
return [2, contents];
|
|
942
770
|
}
|
|
943
771
|
});
|
|
944
772
|
}); };
|
|
945
773
|
var deserializeAws_restJson1DeleteInstanceOnboardingJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
946
|
-
var parsedOutput, _a,
|
|
774
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
947
775
|
var _c;
|
|
948
776
|
return __generator(this, function (_d) {
|
|
949
777
|
switch (_d.label) {
|
|
@@ -980,14 +808,14 @@ var deserializeAws_restJson1DeleteInstanceOnboardingJobCommandError = function (
|
|
|
980
808
|
case 11: throw _d.sent();
|
|
981
809
|
case 12:
|
|
982
810
|
parsedBody = parsedOutput.body;
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
$metadata: $metadata,
|
|
811
|
+
throwDefaultError({
|
|
812
|
+
output: output,
|
|
813
|
+
parsedBody: parsedBody,
|
|
814
|
+
exceptionCtor: __BaseException,
|
|
815
|
+
errorCode: errorCode,
|
|
989
816
|
});
|
|
990
|
-
|
|
817
|
+
_d.label = 13;
|
|
818
|
+
case 13: return [2];
|
|
991
819
|
}
|
|
992
820
|
});
|
|
993
821
|
}); };
|
|
@@ -999,24 +827,23 @@ export var deserializeAws_restJson1DescribeCampaignCommand = function (output, c
|
|
|
999
827
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1000
828
|
return [2, deserializeAws_restJson1DescribeCampaignCommandError(output, context)];
|
|
1001
829
|
}
|
|
1002
|
-
contents = {
|
|
830
|
+
contents = map({
|
|
1003
831
|
$metadata: deserializeMetadata(output),
|
|
1004
|
-
|
|
1005
|
-
};
|
|
832
|
+
});
|
|
1006
833
|
_a = __expectNonNull;
|
|
1007
834
|
_b = __expectObject;
|
|
1008
835
|
return [4, parseBody(output.body, context)];
|
|
1009
836
|
case 1:
|
|
1010
837
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1011
|
-
if (data.campaign
|
|
838
|
+
if (data.campaign != null) {
|
|
1012
839
|
contents.campaign = deserializeAws_restJson1Campaign(data.campaign, context);
|
|
1013
840
|
}
|
|
1014
|
-
return [2,
|
|
841
|
+
return [2, contents];
|
|
1015
842
|
}
|
|
1016
843
|
});
|
|
1017
844
|
}); };
|
|
1018
845
|
var deserializeAws_restJson1DescribeCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1019
|
-
var parsedOutput, _a,
|
|
846
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1020
847
|
var _c;
|
|
1021
848
|
return __generator(this, function (_d) {
|
|
1022
849
|
switch (_d.label) {
|
|
@@ -1049,14 +876,14 @@ var deserializeAws_restJson1DescribeCampaignCommandError = function (output, con
|
|
|
1049
876
|
case 9: throw _d.sent();
|
|
1050
877
|
case 10:
|
|
1051
878
|
parsedBody = parsedOutput.body;
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
$metadata: $metadata,
|
|
879
|
+
throwDefaultError({
|
|
880
|
+
output: output,
|
|
881
|
+
parsedBody: parsedBody,
|
|
882
|
+
exceptionCtor: __BaseException,
|
|
883
|
+
errorCode: errorCode,
|
|
1058
884
|
});
|
|
1059
|
-
|
|
885
|
+
_d.label = 11;
|
|
886
|
+
case 11: return [2];
|
|
1060
887
|
}
|
|
1061
888
|
});
|
|
1062
889
|
}); };
|
|
@@ -1068,24 +895,23 @@ export var deserializeAws_restJson1GetCampaignStateCommand = function (output, c
|
|
|
1068
895
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1069
896
|
return [2, deserializeAws_restJson1GetCampaignStateCommandError(output, context)];
|
|
1070
897
|
}
|
|
1071
|
-
contents = {
|
|
898
|
+
contents = map({
|
|
1072
899
|
$metadata: deserializeMetadata(output),
|
|
1073
|
-
|
|
1074
|
-
};
|
|
900
|
+
});
|
|
1075
901
|
_a = __expectNonNull;
|
|
1076
902
|
_b = __expectObject;
|
|
1077
903
|
return [4, parseBody(output.body, context)];
|
|
1078
904
|
case 1:
|
|
1079
905
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1080
|
-
if (data.state
|
|
906
|
+
if (data.state != null) {
|
|
1081
907
|
contents.state = __expectString(data.state);
|
|
1082
908
|
}
|
|
1083
|
-
return [2,
|
|
909
|
+
return [2, contents];
|
|
1084
910
|
}
|
|
1085
911
|
});
|
|
1086
912
|
}); };
|
|
1087
913
|
var deserializeAws_restJson1GetCampaignStateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1088
|
-
var parsedOutput, _a,
|
|
914
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1089
915
|
var _c;
|
|
1090
916
|
return __generator(this, function (_d) {
|
|
1091
917
|
switch (_d.label) {
|
|
@@ -1118,14 +944,14 @@ var deserializeAws_restJson1GetCampaignStateCommandError = function (output, con
|
|
|
1118
944
|
case 9: throw _d.sent();
|
|
1119
945
|
case 10:
|
|
1120
946
|
parsedBody = parsedOutput.body;
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
$metadata: $metadata,
|
|
947
|
+
throwDefaultError({
|
|
948
|
+
output: output,
|
|
949
|
+
parsedBody: parsedBody,
|
|
950
|
+
exceptionCtor: __BaseException,
|
|
951
|
+
errorCode: errorCode,
|
|
1127
952
|
});
|
|
1128
|
-
|
|
953
|
+
_d.label = 11;
|
|
954
|
+
case 11: return [2];
|
|
1129
955
|
}
|
|
1130
956
|
});
|
|
1131
957
|
}); };
|
|
@@ -1137,28 +963,26 @@ export var deserializeAws_restJson1GetCampaignStateBatchCommand = function (outp
|
|
|
1137
963
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1138
964
|
return [2, deserializeAws_restJson1GetCampaignStateBatchCommandError(output, context)];
|
|
1139
965
|
}
|
|
1140
|
-
contents = {
|
|
966
|
+
contents = map({
|
|
1141
967
|
$metadata: deserializeMetadata(output),
|
|
1142
|
-
|
|
1143
|
-
successfulRequests: undefined,
|
|
1144
|
-
};
|
|
968
|
+
});
|
|
1145
969
|
_a = __expectNonNull;
|
|
1146
970
|
_b = __expectObject;
|
|
1147
971
|
return [4, parseBody(output.body, context)];
|
|
1148
972
|
case 1:
|
|
1149
973
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1150
|
-
if (data.failedRequests
|
|
974
|
+
if (data.failedRequests != null) {
|
|
1151
975
|
contents.failedRequests = deserializeAws_restJson1FailedCampaignStateResponseList(data.failedRequests, context);
|
|
1152
976
|
}
|
|
1153
|
-
if (data.successfulRequests
|
|
977
|
+
if (data.successfulRequests != null) {
|
|
1154
978
|
contents.successfulRequests = deserializeAws_restJson1SuccessfulCampaignStateResponseList(data.successfulRequests, context);
|
|
1155
979
|
}
|
|
1156
|
-
return [2,
|
|
980
|
+
return [2, contents];
|
|
1157
981
|
}
|
|
1158
982
|
});
|
|
1159
983
|
}); };
|
|
1160
984
|
var deserializeAws_restJson1GetCampaignStateBatchCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1161
|
-
var parsedOutput, _a,
|
|
985
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1162
986
|
var _c;
|
|
1163
987
|
return __generator(this, function (_d) {
|
|
1164
988
|
switch (_d.label) {
|
|
@@ -1191,14 +1015,14 @@ var deserializeAws_restJson1GetCampaignStateBatchCommandError = function (output
|
|
|
1191
1015
|
case 9: throw _d.sent();
|
|
1192
1016
|
case 10:
|
|
1193
1017
|
parsedBody = parsedOutput.body;
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
$metadata: $metadata,
|
|
1018
|
+
throwDefaultError({
|
|
1019
|
+
output: output,
|
|
1020
|
+
parsedBody: parsedBody,
|
|
1021
|
+
exceptionCtor: __BaseException,
|
|
1022
|
+
errorCode: errorCode,
|
|
1200
1023
|
});
|
|
1201
|
-
|
|
1024
|
+
_d.label = 11;
|
|
1025
|
+
case 11: return [2];
|
|
1202
1026
|
}
|
|
1203
1027
|
});
|
|
1204
1028
|
}); };
|
|
@@ -1210,24 +1034,23 @@ export var deserializeAws_restJson1GetConnectInstanceConfigCommand = function (o
|
|
|
1210
1034
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1211
1035
|
return [2, deserializeAws_restJson1GetConnectInstanceConfigCommandError(output, context)];
|
|
1212
1036
|
}
|
|
1213
|
-
contents = {
|
|
1037
|
+
contents = map({
|
|
1214
1038
|
$metadata: deserializeMetadata(output),
|
|
1215
|
-
|
|
1216
|
-
};
|
|
1039
|
+
});
|
|
1217
1040
|
_a = __expectNonNull;
|
|
1218
1041
|
_b = __expectObject;
|
|
1219
1042
|
return [4, parseBody(output.body, context)];
|
|
1220
1043
|
case 1:
|
|
1221
1044
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1222
|
-
if (data.connectInstanceConfig
|
|
1045
|
+
if (data.connectInstanceConfig != null) {
|
|
1223
1046
|
contents.connectInstanceConfig = deserializeAws_restJson1InstanceConfig(data.connectInstanceConfig, context);
|
|
1224
1047
|
}
|
|
1225
|
-
return [2,
|
|
1048
|
+
return [2, contents];
|
|
1226
1049
|
}
|
|
1227
1050
|
});
|
|
1228
1051
|
}); };
|
|
1229
1052
|
var deserializeAws_restJson1GetConnectInstanceConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1230
|
-
var parsedOutput, _a,
|
|
1053
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1231
1054
|
var _c;
|
|
1232
1055
|
return __generator(this, function (_d) {
|
|
1233
1056
|
switch (_d.label) {
|
|
@@ -1260,14 +1083,14 @@ var deserializeAws_restJson1GetConnectInstanceConfigCommandError = function (out
|
|
|
1260
1083
|
case 9: throw _d.sent();
|
|
1261
1084
|
case 10:
|
|
1262
1085
|
parsedBody = parsedOutput.body;
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
$metadata: $metadata,
|
|
1086
|
+
throwDefaultError({
|
|
1087
|
+
output: output,
|
|
1088
|
+
parsedBody: parsedBody,
|
|
1089
|
+
exceptionCtor: __BaseException,
|
|
1090
|
+
errorCode: errorCode,
|
|
1269
1091
|
});
|
|
1270
|
-
|
|
1092
|
+
_d.label = 11;
|
|
1093
|
+
case 11: return [2];
|
|
1271
1094
|
}
|
|
1272
1095
|
});
|
|
1273
1096
|
}); };
|
|
@@ -1279,24 +1102,23 @@ export var deserializeAws_restJson1GetInstanceOnboardingJobStatusCommand = funct
|
|
|
1279
1102
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1280
1103
|
return [2, deserializeAws_restJson1GetInstanceOnboardingJobStatusCommandError(output, context)];
|
|
1281
1104
|
}
|
|
1282
|
-
contents = {
|
|
1105
|
+
contents = map({
|
|
1283
1106
|
$metadata: deserializeMetadata(output),
|
|
1284
|
-
|
|
1285
|
-
};
|
|
1107
|
+
});
|
|
1286
1108
|
_a = __expectNonNull;
|
|
1287
1109
|
_b = __expectObject;
|
|
1288
1110
|
return [4, parseBody(output.body, context)];
|
|
1289
1111
|
case 1:
|
|
1290
1112
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1291
|
-
if (data.connectInstanceOnboardingJobStatus
|
|
1113
|
+
if (data.connectInstanceOnboardingJobStatus != null) {
|
|
1292
1114
|
contents.connectInstanceOnboardingJobStatus = deserializeAws_restJson1InstanceOnboardingJobStatus(data.connectInstanceOnboardingJobStatus, context);
|
|
1293
1115
|
}
|
|
1294
|
-
return [2,
|
|
1116
|
+
return [2, contents];
|
|
1295
1117
|
}
|
|
1296
1118
|
});
|
|
1297
1119
|
}); };
|
|
1298
1120
|
var deserializeAws_restJson1GetInstanceOnboardingJobStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1299
|
-
var parsedOutput, _a,
|
|
1121
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1300
1122
|
var _c;
|
|
1301
1123
|
return __generator(this, function (_d) {
|
|
1302
1124
|
switch (_d.label) {
|
|
@@ -1329,14 +1151,14 @@ var deserializeAws_restJson1GetInstanceOnboardingJobStatusCommandError = functio
|
|
|
1329
1151
|
case 9: throw _d.sent();
|
|
1330
1152
|
case 10:
|
|
1331
1153
|
parsedBody = parsedOutput.body;
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
$metadata: $metadata,
|
|
1154
|
+
throwDefaultError({
|
|
1155
|
+
output: output,
|
|
1156
|
+
parsedBody: parsedBody,
|
|
1157
|
+
exceptionCtor: __BaseException,
|
|
1158
|
+
errorCode: errorCode,
|
|
1338
1159
|
});
|
|
1339
|
-
|
|
1160
|
+
_d.label = 11;
|
|
1161
|
+
case 11: return [2];
|
|
1340
1162
|
}
|
|
1341
1163
|
});
|
|
1342
1164
|
}); };
|
|
@@ -1348,28 +1170,26 @@ export var deserializeAws_restJson1ListCampaignsCommand = function (output, cont
|
|
|
1348
1170
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1349
1171
|
return [2, deserializeAws_restJson1ListCampaignsCommandError(output, context)];
|
|
1350
1172
|
}
|
|
1351
|
-
contents = {
|
|
1173
|
+
contents = map({
|
|
1352
1174
|
$metadata: deserializeMetadata(output),
|
|
1353
|
-
|
|
1354
|
-
nextToken: undefined,
|
|
1355
|
-
};
|
|
1175
|
+
});
|
|
1356
1176
|
_a = __expectNonNull;
|
|
1357
1177
|
_b = __expectObject;
|
|
1358
1178
|
return [4, parseBody(output.body, context)];
|
|
1359
1179
|
case 1:
|
|
1360
1180
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1361
|
-
if (data.campaignSummaryList
|
|
1181
|
+
if (data.campaignSummaryList != null) {
|
|
1362
1182
|
contents.campaignSummaryList = deserializeAws_restJson1CampaignSummaryList(data.campaignSummaryList, context);
|
|
1363
1183
|
}
|
|
1364
|
-
if (data.nextToken
|
|
1184
|
+
if (data.nextToken != null) {
|
|
1365
1185
|
contents.nextToken = __expectString(data.nextToken);
|
|
1366
1186
|
}
|
|
1367
|
-
return [2,
|
|
1187
|
+
return [2, contents];
|
|
1368
1188
|
}
|
|
1369
1189
|
});
|
|
1370
1190
|
}); };
|
|
1371
1191
|
var deserializeAws_restJson1ListCampaignsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1372
|
-
var parsedOutput, _a,
|
|
1192
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1373
1193
|
var _c;
|
|
1374
1194
|
return __generator(this, function (_d) {
|
|
1375
1195
|
switch (_d.label) {
|
|
@@ -1398,14 +1218,14 @@ var deserializeAws_restJson1ListCampaignsCommandError = function (output, contex
|
|
|
1398
1218
|
case 7: throw _d.sent();
|
|
1399
1219
|
case 8:
|
|
1400
1220
|
parsedBody = parsedOutput.body;
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
$metadata: $metadata,
|
|
1221
|
+
throwDefaultError({
|
|
1222
|
+
output: output,
|
|
1223
|
+
parsedBody: parsedBody,
|
|
1224
|
+
exceptionCtor: __BaseException,
|
|
1225
|
+
errorCode: errorCode,
|
|
1407
1226
|
});
|
|
1408
|
-
|
|
1227
|
+
_d.label = 9;
|
|
1228
|
+
case 9: return [2];
|
|
1409
1229
|
}
|
|
1410
1230
|
});
|
|
1411
1231
|
}); };
|
|
@@ -1417,24 +1237,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
|
|
|
1417
1237
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1418
1238
|
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
1419
1239
|
}
|
|
1420
|
-
contents = {
|
|
1240
|
+
contents = map({
|
|
1421
1241
|
$metadata: deserializeMetadata(output),
|
|
1422
|
-
|
|
1423
|
-
};
|
|
1242
|
+
});
|
|
1424
1243
|
_a = __expectNonNull;
|
|
1425
1244
|
_b = __expectObject;
|
|
1426
1245
|
return [4, parseBody(output.body, context)];
|
|
1427
1246
|
case 1:
|
|
1428
1247
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1429
|
-
if (data.tags
|
|
1248
|
+
if (data.tags != null) {
|
|
1430
1249
|
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
1431
1250
|
}
|
|
1432
|
-
return [2,
|
|
1251
|
+
return [2, contents];
|
|
1433
1252
|
}
|
|
1434
1253
|
});
|
|
1435
1254
|
}); };
|
|
1436
1255
|
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1437
|
-
var parsedOutput, _a,
|
|
1256
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1438
1257
|
var _c;
|
|
1439
1258
|
return __generator(this, function (_d) {
|
|
1440
1259
|
switch (_d.label) {
|
|
@@ -1471,14 +1290,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1471
1290
|
case 11: throw _d.sent();
|
|
1472
1291
|
case 12:
|
|
1473
1292
|
parsedBody = parsedOutput.body;
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
$metadata: $metadata,
|
|
1293
|
+
throwDefaultError({
|
|
1294
|
+
output: output,
|
|
1295
|
+
parsedBody: parsedBody,
|
|
1296
|
+
exceptionCtor: __BaseException,
|
|
1297
|
+
errorCode: errorCode,
|
|
1480
1298
|
});
|
|
1481
|
-
|
|
1299
|
+
_d.label = 13;
|
|
1300
|
+
case 13: return [2];
|
|
1482
1301
|
}
|
|
1483
1302
|
});
|
|
1484
1303
|
}); };
|
|
@@ -1490,18 +1309,18 @@ export var deserializeAws_restJson1PauseCampaignCommand = function (output, cont
|
|
|
1490
1309
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1491
1310
|
return [2, deserializeAws_restJson1PauseCampaignCommandError(output, context)];
|
|
1492
1311
|
}
|
|
1493
|
-
contents = {
|
|
1312
|
+
contents = map({
|
|
1494
1313
|
$metadata: deserializeMetadata(output),
|
|
1495
|
-
};
|
|
1314
|
+
});
|
|
1496
1315
|
return [4, collectBody(output.body, context)];
|
|
1497
1316
|
case 1:
|
|
1498
1317
|
_a.sent();
|
|
1499
|
-
return [2,
|
|
1318
|
+
return [2, contents];
|
|
1500
1319
|
}
|
|
1501
1320
|
});
|
|
1502
1321
|
}); };
|
|
1503
1322
|
var deserializeAws_restJson1PauseCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1504
|
-
var parsedOutput, _a,
|
|
1323
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1505
1324
|
var _c;
|
|
1506
1325
|
return __generator(this, function (_d) {
|
|
1507
1326
|
switch (_d.label) {
|
|
@@ -1542,14 +1361,14 @@ var deserializeAws_restJson1PauseCampaignCommandError = function (output, contex
|
|
|
1542
1361
|
case 13: throw _d.sent();
|
|
1543
1362
|
case 14:
|
|
1544
1363
|
parsedBody = parsedOutput.body;
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
$metadata: $metadata,
|
|
1364
|
+
throwDefaultError({
|
|
1365
|
+
output: output,
|
|
1366
|
+
parsedBody: parsedBody,
|
|
1367
|
+
exceptionCtor: __BaseException,
|
|
1368
|
+
errorCode: errorCode,
|
|
1551
1369
|
});
|
|
1552
|
-
|
|
1370
|
+
_d.label = 15;
|
|
1371
|
+
case 15: return [2];
|
|
1553
1372
|
}
|
|
1554
1373
|
});
|
|
1555
1374
|
}); };
|
|
@@ -1561,28 +1380,26 @@ export var deserializeAws_restJson1PutDialRequestBatchCommand = function (output
|
|
|
1561
1380
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1562
1381
|
return [2, deserializeAws_restJson1PutDialRequestBatchCommandError(output, context)];
|
|
1563
1382
|
}
|
|
1564
|
-
contents = {
|
|
1383
|
+
contents = map({
|
|
1565
1384
|
$metadata: deserializeMetadata(output),
|
|
1566
|
-
|
|
1567
|
-
successfulRequests: undefined,
|
|
1568
|
-
};
|
|
1385
|
+
});
|
|
1569
1386
|
_a = __expectNonNull;
|
|
1570
1387
|
_b = __expectObject;
|
|
1571
1388
|
return [4, parseBody(output.body, context)];
|
|
1572
1389
|
case 1:
|
|
1573
1390
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1574
|
-
if (data.failedRequests
|
|
1391
|
+
if (data.failedRequests != null) {
|
|
1575
1392
|
contents.failedRequests = deserializeAws_restJson1FailedRequestList(data.failedRequests, context);
|
|
1576
1393
|
}
|
|
1577
|
-
if (data.successfulRequests
|
|
1394
|
+
if (data.successfulRequests != null) {
|
|
1578
1395
|
contents.successfulRequests = deserializeAws_restJson1SuccessfulRequestList(data.successfulRequests, context);
|
|
1579
1396
|
}
|
|
1580
|
-
return [2,
|
|
1397
|
+
return [2, contents];
|
|
1581
1398
|
}
|
|
1582
1399
|
});
|
|
1583
1400
|
}); };
|
|
1584
1401
|
var deserializeAws_restJson1PutDialRequestBatchCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1585
|
-
var parsedOutput, _a,
|
|
1402
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1586
1403
|
var _c;
|
|
1587
1404
|
return __generator(this, function (_d) {
|
|
1588
1405
|
switch (_d.label) {
|
|
@@ -1627,14 +1444,14 @@ var deserializeAws_restJson1PutDialRequestBatchCommandError = function (output,
|
|
|
1627
1444
|
case 15: throw _d.sent();
|
|
1628
1445
|
case 16:
|
|
1629
1446
|
parsedBody = parsedOutput.body;
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
$metadata: $metadata,
|
|
1447
|
+
throwDefaultError({
|
|
1448
|
+
output: output,
|
|
1449
|
+
parsedBody: parsedBody,
|
|
1450
|
+
exceptionCtor: __BaseException,
|
|
1451
|
+
errorCode: errorCode,
|
|
1636
1452
|
});
|
|
1637
|
-
|
|
1453
|
+
_d.label = 17;
|
|
1454
|
+
case 17: return [2];
|
|
1638
1455
|
}
|
|
1639
1456
|
});
|
|
1640
1457
|
}); };
|
|
@@ -1646,18 +1463,18 @@ export var deserializeAws_restJson1ResumeCampaignCommand = function (output, con
|
|
|
1646
1463
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1647
1464
|
return [2, deserializeAws_restJson1ResumeCampaignCommandError(output, context)];
|
|
1648
1465
|
}
|
|
1649
|
-
contents = {
|
|
1466
|
+
contents = map({
|
|
1650
1467
|
$metadata: deserializeMetadata(output),
|
|
1651
|
-
};
|
|
1468
|
+
});
|
|
1652
1469
|
return [4, collectBody(output.body, context)];
|
|
1653
1470
|
case 1:
|
|
1654
1471
|
_a.sent();
|
|
1655
|
-
return [2,
|
|
1472
|
+
return [2, contents];
|
|
1656
1473
|
}
|
|
1657
1474
|
});
|
|
1658
1475
|
}); };
|
|
1659
1476
|
var deserializeAws_restJson1ResumeCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1660
|
-
var parsedOutput, _a,
|
|
1477
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1661
1478
|
var _c;
|
|
1662
1479
|
return __generator(this, function (_d) {
|
|
1663
1480
|
switch (_d.label) {
|
|
@@ -1698,14 +1515,14 @@ var deserializeAws_restJson1ResumeCampaignCommandError = function (output, conte
|
|
|
1698
1515
|
case 13: throw _d.sent();
|
|
1699
1516
|
case 14:
|
|
1700
1517
|
parsedBody = parsedOutput.body;
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
$metadata: $metadata,
|
|
1518
|
+
throwDefaultError({
|
|
1519
|
+
output: output,
|
|
1520
|
+
parsedBody: parsedBody,
|
|
1521
|
+
exceptionCtor: __BaseException,
|
|
1522
|
+
errorCode: errorCode,
|
|
1707
1523
|
});
|
|
1708
|
-
|
|
1524
|
+
_d.label = 15;
|
|
1525
|
+
case 15: return [2];
|
|
1709
1526
|
}
|
|
1710
1527
|
});
|
|
1711
1528
|
}); };
|
|
@@ -1717,18 +1534,18 @@ export var deserializeAws_restJson1StartCampaignCommand = function (output, cont
|
|
|
1717
1534
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1718
1535
|
return [2, deserializeAws_restJson1StartCampaignCommandError(output, context)];
|
|
1719
1536
|
}
|
|
1720
|
-
contents = {
|
|
1537
|
+
contents = map({
|
|
1721
1538
|
$metadata: deserializeMetadata(output),
|
|
1722
|
-
};
|
|
1539
|
+
});
|
|
1723
1540
|
return [4, collectBody(output.body, context)];
|
|
1724
1541
|
case 1:
|
|
1725
1542
|
_a.sent();
|
|
1726
|
-
return [2,
|
|
1543
|
+
return [2, contents];
|
|
1727
1544
|
}
|
|
1728
1545
|
});
|
|
1729
1546
|
}); };
|
|
1730
1547
|
var deserializeAws_restJson1StartCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1731
|
-
var parsedOutput, _a,
|
|
1548
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1732
1549
|
var _c;
|
|
1733
1550
|
return __generator(this, function (_d) {
|
|
1734
1551
|
switch (_d.label) {
|
|
@@ -1769,14 +1586,14 @@ var deserializeAws_restJson1StartCampaignCommandError = function (output, contex
|
|
|
1769
1586
|
case 13: throw _d.sent();
|
|
1770
1587
|
case 14:
|
|
1771
1588
|
parsedBody = parsedOutput.body;
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
$metadata: $metadata,
|
|
1589
|
+
throwDefaultError({
|
|
1590
|
+
output: output,
|
|
1591
|
+
parsedBody: parsedBody,
|
|
1592
|
+
exceptionCtor: __BaseException,
|
|
1593
|
+
errorCode: errorCode,
|
|
1778
1594
|
});
|
|
1779
|
-
|
|
1595
|
+
_d.label = 15;
|
|
1596
|
+
case 15: return [2];
|
|
1780
1597
|
}
|
|
1781
1598
|
});
|
|
1782
1599
|
}); };
|
|
@@ -1788,24 +1605,23 @@ export var deserializeAws_restJson1StartInstanceOnboardingJobCommand = function
|
|
|
1788
1605
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1789
1606
|
return [2, deserializeAws_restJson1StartInstanceOnboardingJobCommandError(output, context)];
|
|
1790
1607
|
}
|
|
1791
|
-
contents = {
|
|
1608
|
+
contents = map({
|
|
1792
1609
|
$metadata: deserializeMetadata(output),
|
|
1793
|
-
|
|
1794
|
-
};
|
|
1610
|
+
});
|
|
1795
1611
|
_a = __expectNonNull;
|
|
1796
1612
|
_b = __expectObject;
|
|
1797
1613
|
return [4, parseBody(output.body, context)];
|
|
1798
1614
|
case 1:
|
|
1799
1615
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1800
|
-
if (data.connectInstanceOnboardingJobStatus
|
|
1616
|
+
if (data.connectInstanceOnboardingJobStatus != null) {
|
|
1801
1617
|
contents.connectInstanceOnboardingJobStatus = deserializeAws_restJson1InstanceOnboardingJobStatus(data.connectInstanceOnboardingJobStatus, context);
|
|
1802
1618
|
}
|
|
1803
|
-
return [2,
|
|
1619
|
+
return [2, contents];
|
|
1804
1620
|
}
|
|
1805
1621
|
});
|
|
1806
1622
|
}); };
|
|
1807
1623
|
var deserializeAws_restJson1StartInstanceOnboardingJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1808
|
-
var parsedOutput, _a,
|
|
1624
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1809
1625
|
var _c;
|
|
1810
1626
|
return __generator(this, function (_d) {
|
|
1811
1627
|
switch (_d.label) {
|
|
@@ -1846,14 +1662,14 @@ var deserializeAws_restJson1StartInstanceOnboardingJobCommandError = function (o
|
|
|
1846
1662
|
case 13: throw _d.sent();
|
|
1847
1663
|
case 14:
|
|
1848
1664
|
parsedBody = parsedOutput.body;
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
$metadata: $metadata,
|
|
1665
|
+
throwDefaultError({
|
|
1666
|
+
output: output,
|
|
1667
|
+
parsedBody: parsedBody,
|
|
1668
|
+
exceptionCtor: __BaseException,
|
|
1669
|
+
errorCode: errorCode,
|
|
1855
1670
|
});
|
|
1856
|
-
|
|
1671
|
+
_d.label = 15;
|
|
1672
|
+
case 15: return [2];
|
|
1857
1673
|
}
|
|
1858
1674
|
});
|
|
1859
1675
|
}); };
|
|
@@ -1865,18 +1681,18 @@ export var deserializeAws_restJson1StopCampaignCommand = function (output, conte
|
|
|
1865
1681
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1866
1682
|
return [2, deserializeAws_restJson1StopCampaignCommandError(output, context)];
|
|
1867
1683
|
}
|
|
1868
|
-
contents = {
|
|
1684
|
+
contents = map({
|
|
1869
1685
|
$metadata: deserializeMetadata(output),
|
|
1870
|
-
};
|
|
1686
|
+
});
|
|
1871
1687
|
return [4, collectBody(output.body, context)];
|
|
1872
1688
|
case 1:
|
|
1873
1689
|
_a.sent();
|
|
1874
|
-
return [2,
|
|
1690
|
+
return [2, contents];
|
|
1875
1691
|
}
|
|
1876
1692
|
});
|
|
1877
1693
|
}); };
|
|
1878
1694
|
var deserializeAws_restJson1StopCampaignCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1879
|
-
var parsedOutput, _a,
|
|
1695
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1880
1696
|
var _c;
|
|
1881
1697
|
return __generator(this, function (_d) {
|
|
1882
1698
|
switch (_d.label) {
|
|
@@ -1917,14 +1733,14 @@ var deserializeAws_restJson1StopCampaignCommandError = function (output, context
|
|
|
1917
1733
|
case 13: throw _d.sent();
|
|
1918
1734
|
case 14:
|
|
1919
1735
|
parsedBody = parsedOutput.body;
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
$metadata: $metadata,
|
|
1736
|
+
throwDefaultError({
|
|
1737
|
+
output: output,
|
|
1738
|
+
parsedBody: parsedBody,
|
|
1739
|
+
exceptionCtor: __BaseException,
|
|
1740
|
+
errorCode: errorCode,
|
|
1926
1741
|
});
|
|
1927
|
-
|
|
1742
|
+
_d.label = 15;
|
|
1743
|
+
case 15: return [2];
|
|
1928
1744
|
}
|
|
1929
1745
|
});
|
|
1930
1746
|
}); };
|
|
@@ -1936,18 +1752,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
|
|
|
1936
1752
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1937
1753
|
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
1938
1754
|
}
|
|
1939
|
-
contents = {
|
|
1755
|
+
contents = map({
|
|
1940
1756
|
$metadata: deserializeMetadata(output),
|
|
1941
|
-
};
|
|
1757
|
+
});
|
|
1942
1758
|
return [4, collectBody(output.body, context)];
|
|
1943
1759
|
case 1:
|
|
1944
1760
|
_a.sent();
|
|
1945
|
-
return [2,
|
|
1761
|
+
return [2, contents];
|
|
1946
1762
|
}
|
|
1947
1763
|
});
|
|
1948
1764
|
}); };
|
|
1949
1765
|
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1950
|
-
var parsedOutput, _a,
|
|
1766
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1951
1767
|
var _c;
|
|
1952
1768
|
return __generator(this, function (_d) {
|
|
1953
1769
|
switch (_d.label) {
|
|
@@ -1984,14 +1800,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1984
1800
|
case 11: throw _d.sent();
|
|
1985
1801
|
case 12:
|
|
1986
1802
|
parsedBody = parsedOutput.body;
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
$metadata: $metadata,
|
|
1803
|
+
throwDefaultError({
|
|
1804
|
+
output: output,
|
|
1805
|
+
parsedBody: parsedBody,
|
|
1806
|
+
exceptionCtor: __BaseException,
|
|
1807
|
+
errorCode: errorCode,
|
|
1993
1808
|
});
|
|
1994
|
-
|
|
1809
|
+
_d.label = 13;
|
|
1810
|
+
case 13: return [2];
|
|
1995
1811
|
}
|
|
1996
1812
|
});
|
|
1997
1813
|
}); };
|
|
@@ -2003,18 +1819,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
|
|
|
2003
1819
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2004
1820
|
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
2005
1821
|
}
|
|
2006
|
-
contents = {
|
|
1822
|
+
contents = map({
|
|
2007
1823
|
$metadata: deserializeMetadata(output),
|
|
2008
|
-
};
|
|
1824
|
+
});
|
|
2009
1825
|
return [4, collectBody(output.body, context)];
|
|
2010
1826
|
case 1:
|
|
2011
1827
|
_a.sent();
|
|
2012
|
-
return [2,
|
|
1828
|
+
return [2, contents];
|
|
2013
1829
|
}
|
|
2014
1830
|
});
|
|
2015
1831
|
}); };
|
|
2016
1832
|
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2017
|
-
var parsedOutput, _a,
|
|
1833
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
2018
1834
|
var _c;
|
|
2019
1835
|
return __generator(this, function (_d) {
|
|
2020
1836
|
switch (_d.label) {
|
|
@@ -2051,14 +1867,14 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
2051
1867
|
case 11: throw _d.sent();
|
|
2052
1868
|
case 12:
|
|
2053
1869
|
parsedBody = parsedOutput.body;
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
$metadata: $metadata,
|
|
1870
|
+
throwDefaultError({
|
|
1871
|
+
output: output,
|
|
1872
|
+
parsedBody: parsedBody,
|
|
1873
|
+
exceptionCtor: __BaseException,
|
|
1874
|
+
errorCode: errorCode,
|
|
2060
1875
|
});
|
|
2061
|
-
|
|
1876
|
+
_d.label = 13;
|
|
1877
|
+
case 13: return [2];
|
|
2062
1878
|
}
|
|
2063
1879
|
});
|
|
2064
1880
|
}); };
|
|
@@ -2070,18 +1886,18 @@ export var deserializeAws_restJson1UpdateCampaignDialerConfigCommand = function
|
|
|
2070
1886
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2071
1887
|
return [2, deserializeAws_restJson1UpdateCampaignDialerConfigCommandError(output, context)];
|
|
2072
1888
|
}
|
|
2073
|
-
contents = {
|
|
1889
|
+
contents = map({
|
|
2074
1890
|
$metadata: deserializeMetadata(output),
|
|
2075
|
-
};
|
|
1891
|
+
});
|
|
2076
1892
|
return [4, collectBody(output.body, context)];
|
|
2077
1893
|
case 1:
|
|
2078
1894
|
_a.sent();
|
|
2079
|
-
return [2,
|
|
1895
|
+
return [2, contents];
|
|
2080
1896
|
}
|
|
2081
1897
|
});
|
|
2082
1898
|
}); };
|
|
2083
1899
|
var deserializeAws_restJson1UpdateCampaignDialerConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2084
|
-
var parsedOutput, _a,
|
|
1900
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
2085
1901
|
var _c;
|
|
2086
1902
|
return __generator(this, function (_d) {
|
|
2087
1903
|
switch (_d.label) {
|
|
@@ -2118,14 +1934,14 @@ var deserializeAws_restJson1UpdateCampaignDialerConfigCommandError = function (o
|
|
|
2118
1934
|
case 11: throw _d.sent();
|
|
2119
1935
|
case 12:
|
|
2120
1936
|
parsedBody = parsedOutput.body;
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
$metadata: $metadata,
|
|
1937
|
+
throwDefaultError({
|
|
1938
|
+
output: output,
|
|
1939
|
+
parsedBody: parsedBody,
|
|
1940
|
+
exceptionCtor: __BaseException,
|
|
1941
|
+
errorCode: errorCode,
|
|
2127
1942
|
});
|
|
2128
|
-
|
|
1943
|
+
_d.label = 13;
|
|
1944
|
+
case 13: return [2];
|
|
2129
1945
|
}
|
|
2130
1946
|
});
|
|
2131
1947
|
}); };
|
|
@@ -2137,18 +1953,18 @@ export var deserializeAws_restJson1UpdateCampaignNameCommand = function (output,
|
|
|
2137
1953
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2138
1954
|
return [2, deserializeAws_restJson1UpdateCampaignNameCommandError(output, context)];
|
|
2139
1955
|
}
|
|
2140
|
-
contents = {
|
|
1956
|
+
contents = map({
|
|
2141
1957
|
$metadata: deserializeMetadata(output),
|
|
2142
|
-
};
|
|
1958
|
+
});
|
|
2143
1959
|
return [4, collectBody(output.body, context)];
|
|
2144
1960
|
case 1:
|
|
2145
1961
|
_a.sent();
|
|
2146
|
-
return [2,
|
|
1962
|
+
return [2, contents];
|
|
2147
1963
|
}
|
|
2148
1964
|
});
|
|
2149
1965
|
}); };
|
|
2150
1966
|
var deserializeAws_restJson1UpdateCampaignNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2151
|
-
var parsedOutput, _a,
|
|
1967
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
2152
1968
|
var _c;
|
|
2153
1969
|
return __generator(this, function (_d) {
|
|
2154
1970
|
switch (_d.label) {
|
|
@@ -2185,14 +2001,14 @@ var deserializeAws_restJson1UpdateCampaignNameCommandError = function (output, c
|
|
|
2185
2001
|
case 11: throw _d.sent();
|
|
2186
2002
|
case 12:
|
|
2187
2003
|
parsedBody = parsedOutput.body;
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
$metadata: $metadata,
|
|
2004
|
+
throwDefaultError({
|
|
2005
|
+
output: output,
|
|
2006
|
+
parsedBody: parsedBody,
|
|
2007
|
+
exceptionCtor: __BaseException,
|
|
2008
|
+
errorCode: errorCode,
|
|
2194
2009
|
});
|
|
2195
|
-
|
|
2010
|
+
_d.label = 13;
|
|
2011
|
+
case 13: return [2];
|
|
2196
2012
|
}
|
|
2197
2013
|
});
|
|
2198
2014
|
}); };
|
|
@@ -2204,18 +2020,18 @@ export var deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = fun
|
|
|
2204
2020
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2205
2021
|
return [2, deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError(output, context)];
|
|
2206
2022
|
}
|
|
2207
|
-
contents = {
|
|
2023
|
+
contents = map({
|
|
2208
2024
|
$metadata: deserializeMetadata(output),
|
|
2209
|
-
};
|
|
2025
|
+
});
|
|
2210
2026
|
return [4, collectBody(output.body, context)];
|
|
2211
2027
|
case 1:
|
|
2212
2028
|
_a.sent();
|
|
2213
|
-
return [2,
|
|
2029
|
+
return [2, contents];
|
|
2214
2030
|
}
|
|
2215
2031
|
});
|
|
2216
2032
|
}); };
|
|
2217
2033
|
var deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2218
|
-
var parsedOutput, _a,
|
|
2034
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
2219
2035
|
var _c;
|
|
2220
2036
|
return __generator(this, function (_d) {
|
|
2221
2037
|
switch (_d.label) {
|
|
@@ -2256,26 +2072,26 @@ var deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError = funct
|
|
|
2256
2072
|
case 13: throw _d.sent();
|
|
2257
2073
|
case 14:
|
|
2258
2074
|
parsedBody = parsedOutput.body;
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
$metadata: $metadata,
|
|
2075
|
+
throwDefaultError({
|
|
2076
|
+
output: output,
|
|
2077
|
+
parsedBody: parsedBody,
|
|
2078
|
+
exceptionCtor: __BaseException,
|
|
2079
|
+
errorCode: errorCode,
|
|
2265
2080
|
});
|
|
2266
|
-
|
|
2081
|
+
_d.label = 15;
|
|
2082
|
+
case 15: return [2];
|
|
2267
2083
|
}
|
|
2268
2084
|
});
|
|
2269
2085
|
}); };
|
|
2086
|
+
var map = __map;
|
|
2270
2087
|
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2271
2088
|
var contents, data, exception;
|
|
2272
2089
|
return __generator(this, function (_a) {
|
|
2273
|
-
contents = {
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
}
|
|
2090
|
+
contents = map({
|
|
2091
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2092
|
+
});
|
|
2277
2093
|
data = parsedOutput.body;
|
|
2278
|
-
if (data.message
|
|
2094
|
+
if (data.message != null) {
|
|
2279
2095
|
contents.message = __expectString(data.message);
|
|
2280
2096
|
}
|
|
2281
2097
|
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2285,12 +2101,11 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
|
|
|
2285
2101
|
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2286
2102
|
var contents, data, exception;
|
|
2287
2103
|
return __generator(this, function (_a) {
|
|
2288
|
-
contents = {
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
}
|
|
2104
|
+
contents = map({
|
|
2105
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2106
|
+
});
|
|
2292
2107
|
data = parsedOutput.body;
|
|
2293
|
-
if (data.message
|
|
2108
|
+
if (data.message != null) {
|
|
2294
2109
|
contents.message = __expectString(data.message);
|
|
2295
2110
|
}
|
|
2296
2111
|
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2300,12 +2115,11 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
|
|
|
2300
2115
|
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2301
2116
|
var contents, data, exception;
|
|
2302
2117
|
return __generator(this, function (_a) {
|
|
2303
|
-
contents = {
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
}
|
|
2118
|
+
contents = map({
|
|
2119
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2120
|
+
});
|
|
2307
2121
|
data = parsedOutput.body;
|
|
2308
|
-
if (data.message
|
|
2122
|
+
if (data.message != null) {
|
|
2309
2123
|
contents.message = __expectString(data.message);
|
|
2310
2124
|
}
|
|
2311
2125
|
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2315,15 +2129,14 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
|
|
|
2315
2129
|
var deserializeAws_restJson1InvalidCampaignStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2316
2130
|
var contents, data, exception;
|
|
2317
2131
|
return __generator(this, function (_a) {
|
|
2318
|
-
contents = {
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
}
|
|
2132
|
+
contents = map({
|
|
2133
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2134
|
+
});
|
|
2322
2135
|
data = parsedOutput.body;
|
|
2323
|
-
if (data.message
|
|
2136
|
+
if (data.message != null) {
|
|
2324
2137
|
contents.message = __expectString(data.message);
|
|
2325
2138
|
}
|
|
2326
|
-
if (data.state
|
|
2139
|
+
if (data.state != null) {
|
|
2327
2140
|
contents.state = __expectString(data.state);
|
|
2328
2141
|
}
|
|
2329
2142
|
exception = new InvalidCampaignStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2333,12 +2146,11 @@ var deserializeAws_restJson1InvalidCampaignStateExceptionResponse = function (pa
|
|
|
2333
2146
|
var deserializeAws_restJson1InvalidStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2334
2147
|
var contents, data, exception;
|
|
2335
2148
|
return __generator(this, function (_a) {
|
|
2336
|
-
contents = {
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
}
|
|
2149
|
+
contents = map({
|
|
2150
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2151
|
+
});
|
|
2340
2152
|
data = parsedOutput.body;
|
|
2341
|
-
if (data.message
|
|
2153
|
+
if (data.message != null) {
|
|
2342
2154
|
contents.message = __expectString(data.message);
|
|
2343
2155
|
}
|
|
2344
2156
|
exception = new InvalidStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2348,12 +2160,11 @@ var deserializeAws_restJson1InvalidStateExceptionResponse = function (parsedOutp
|
|
|
2348
2160
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2349
2161
|
var contents, data, exception;
|
|
2350
2162
|
return __generator(this, function (_a) {
|
|
2351
|
-
contents = {
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
}
|
|
2163
|
+
contents = map({
|
|
2164
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2165
|
+
});
|
|
2355
2166
|
data = parsedOutput.body;
|
|
2356
|
-
if (data.message
|
|
2167
|
+
if (data.message != null) {
|
|
2357
2168
|
contents.message = __expectString(data.message);
|
|
2358
2169
|
}
|
|
2359
2170
|
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2363,12 +2174,11 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
|
|
|
2363
2174
|
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2364
2175
|
var contents, data, exception;
|
|
2365
2176
|
return __generator(this, function (_a) {
|
|
2366
|
-
contents = {
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
}
|
|
2177
|
+
contents = map({
|
|
2178
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2179
|
+
});
|
|
2370
2180
|
data = parsedOutput.body;
|
|
2371
|
-
if (data.message
|
|
2181
|
+
if (data.message != null) {
|
|
2372
2182
|
contents.message = __expectString(data.message);
|
|
2373
2183
|
}
|
|
2374
2184
|
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2378,12 +2188,11 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
|
|
|
2378
2188
|
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2379
2189
|
var contents, data, exception;
|
|
2380
2190
|
return __generator(this, function (_a) {
|
|
2381
|
-
contents = {
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
}
|
|
2191
|
+
contents = map({
|
|
2192
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2193
|
+
});
|
|
2385
2194
|
data = parsedOutput.body;
|
|
2386
|
-
if (data.message
|
|
2195
|
+
if (data.message != null) {
|
|
2387
2196
|
contents.message = __expectString(data.message);
|
|
2388
2197
|
}
|
|
2389
2198
|
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2393,12 +2202,11 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
|
|
|
2393
2202
|
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2394
2203
|
var contents, data, exception;
|
|
2395
2204
|
return __generator(this, function (_a) {
|
|
2396
|
-
contents = {
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
}
|
|
2205
|
+
contents = map({
|
|
2206
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2207
|
+
});
|
|
2400
2208
|
data = parsedOutput.body;
|
|
2401
|
-
if (data.message
|
|
2209
|
+
if (data.message != null) {
|
|
2402
2210
|
contents.message = __expectString(data.message);
|
|
2403
2211
|
}
|
|
2404
2212
|
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -2429,9 +2237,6 @@ var serializeAws_restJson1CampaignIdList = function (input, context) {
|
|
|
2429
2237
|
return input
|
|
2430
2238
|
.filter(function (e) { return e != null; })
|
|
2431
2239
|
.map(function (entry) {
|
|
2432
|
-
if (entry === null) {
|
|
2433
|
-
return null;
|
|
2434
|
-
}
|
|
2435
2240
|
return entry;
|
|
2436
2241
|
});
|
|
2437
2242
|
};
|
|
@@ -2453,9 +2258,6 @@ var serializeAws_restJson1DialRequestList = function (input, context) {
|
|
|
2453
2258
|
return input
|
|
2454
2259
|
.filter(function (e) { return e != null; })
|
|
2455
2260
|
.map(function (entry) {
|
|
2456
|
-
if (entry === null) {
|
|
2457
|
-
return null;
|
|
2458
|
-
}
|
|
2459
2261
|
return serializeAws_restJson1DialRequest(entry, context);
|
|
2460
2262
|
});
|
|
2461
2263
|
};
|
|
@@ -2526,12 +2328,12 @@ var deserializeAws_restJson1CampaignSummaryList = function (output, context) {
|
|
|
2526
2328
|
return retVal;
|
|
2527
2329
|
};
|
|
2528
2330
|
var deserializeAws_restJson1DialerConfig = function (output, context) {
|
|
2529
|
-
if (output.predictiveDialerConfig
|
|
2331
|
+
if (output.predictiveDialerConfig != null) {
|
|
2530
2332
|
return {
|
|
2531
2333
|
predictiveDialerConfig: deserializeAws_restJson1PredictiveDialerConfig(output.predictiveDialerConfig, context),
|
|
2532
2334
|
};
|
|
2533
2335
|
}
|
|
2534
|
-
if (output.progressiveDialerConfig
|
|
2336
|
+
if (output.progressiveDialerConfig != null) {
|
|
2535
2337
|
return {
|
|
2536
2338
|
progressiveDialerConfig: deserializeAws_restJson1ProgressiveDialerConfig(output.progressiveDialerConfig, context),
|
|
2537
2339
|
};
|