@aws-sdk/client-connectcampaigns 3.186.0 → 3.188.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 +8 -0
- package/dist-es/ConnectCampaigns.js +90 -97
- package/dist-es/ConnectCampaignsClient.js +22 -28
- package/dist-es/commands/CreateCampaignCommand.js +21 -28
- package/dist-es/commands/DeleteCampaignCommand.js +22 -29
- package/dist-es/commands/DeleteConnectInstanceConfigCommand.js +22 -29
- package/dist-es/commands/DeleteInstanceOnboardingJobCommand.js +22 -29
- package/dist-es/commands/DescribeCampaignCommand.js +21 -28
- package/dist-es/commands/GetCampaignStateBatchCommand.js +21 -28
- package/dist-es/commands/GetCampaignStateCommand.js +21 -28
- package/dist-es/commands/GetConnectInstanceConfigCommand.js +21 -28
- package/dist-es/commands/GetInstanceOnboardingJobStatusCommand.js +21 -28
- package/dist-es/commands/ListCampaignsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/PauseCampaignCommand.js +22 -29
- package/dist-es/commands/PutDialRequestBatchCommand.js +21 -28
- package/dist-es/commands/ResumeCampaignCommand.js +22 -29
- package/dist-es/commands/StartCampaignCommand.js +22 -29
- package/dist-es/commands/StartInstanceOnboardingJobCommand.js +21 -28
- package/dist-es/commands/StopCampaignCommand.js +22 -29
- package/dist-es/commands/TagResourceCommand.js +22 -29
- package/dist-es/commands/UntagResourceCommand.js +22 -29
- package/dist-es/commands/UpdateCampaignDialerConfigCommand.js +22 -29
- package/dist-es/commands/UpdateCampaignNameCommand.js +22 -29
- package/dist-es/commands/UpdateCampaignOutboundCallConfigCommand.js +22 -29
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ConnectCampaignsServiceException.js +5 -10
- package/dist-es/models/models_0.js +265 -164
- package/dist-es/pagination/ListCampaignsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1625 -2300
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,2319 +1,1661 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
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
3
|
import { ConnectCampaignsServiceException as __BaseException } from "../models/ConnectCampaignsServiceException";
|
|
5
4
|
import { AccessDeniedException, ConflictException, DialerConfig, InternalServerException, InvalidCampaignStateException, InvalidStateException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
}); };
|
|
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, body;
|
|
36
|
-
return __generator(this, function (_c) {
|
|
37
|
-
switch (_c.label) {
|
|
38
|
-
case 0: return [4, context.endpoint()];
|
|
39
|
-
case 1:
|
|
40
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
41
|
-
headers = {};
|
|
42
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}";
|
|
43
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
44
|
-
return [2, new __HttpRequest({
|
|
45
|
-
protocol: protocol,
|
|
46
|
-
hostname: hostname,
|
|
47
|
-
port: port,
|
|
48
|
-
method: "DELETE",
|
|
49
|
-
headers: headers,
|
|
50
|
-
path: resolvedPath,
|
|
51
|
-
body: body,
|
|
52
|
-
})];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}); };
|
|
56
|
-
export var serializeAws_restJson1DeleteConnectInstanceConfigCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
58
|
-
return __generator(this, function (_c) {
|
|
59
|
-
switch (_c.label) {
|
|
60
|
-
case 0: return [4, context.endpoint()];
|
|
61
|
-
case 1:
|
|
62
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
63
|
-
headers = {};
|
|
64
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
65
|
-
"/connect-instance/{connectInstanceId}/config";
|
|
66
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
67
|
-
return [2, new __HttpRequest({
|
|
68
|
-
protocol: protocol,
|
|
69
|
-
hostname: hostname,
|
|
70
|
-
port: port,
|
|
71
|
-
method: "DELETE",
|
|
72
|
-
headers: headers,
|
|
73
|
-
path: resolvedPath,
|
|
74
|
-
body: body,
|
|
75
|
-
})];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}); };
|
|
79
|
-
export var serializeAws_restJson1DeleteInstanceOnboardingJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
80
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
81
|
-
return __generator(this, function (_c) {
|
|
82
|
-
switch (_c.label) {
|
|
83
|
-
case 0: return [4, context.endpoint()];
|
|
84
|
-
case 1:
|
|
85
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
86
|
-
headers = {};
|
|
87
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
88
|
-
"/connect-instance/{connectInstanceId}/onboarding";
|
|
89
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", function () { return input.connectInstanceId; }, "{connectInstanceId}", false);
|
|
90
|
-
return [2, new __HttpRequest({
|
|
91
|
-
protocol: protocol,
|
|
92
|
-
hostname: hostname,
|
|
93
|
-
port: port,
|
|
94
|
-
method: "DELETE",
|
|
95
|
-
headers: headers,
|
|
96
|
-
path: resolvedPath,
|
|
97
|
-
body: body,
|
|
98
|
-
})];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}); };
|
|
102
|
-
export var serializeAws_restJson1DescribeCampaignCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
103
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
104
|
-
return __generator(this, function (_c) {
|
|
105
|
-
switch (_c.label) {
|
|
106
|
-
case 0: return [4, context.endpoint()];
|
|
107
|
-
case 1:
|
|
108
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
109
|
-
headers = {};
|
|
110
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}";
|
|
111
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
112
|
-
return [2, new __HttpRequest({
|
|
113
|
-
protocol: protocol,
|
|
114
|
-
hostname: hostname,
|
|
115
|
-
port: port,
|
|
116
|
-
method: "GET",
|
|
117
|
-
headers: headers,
|
|
118
|
-
path: resolvedPath,
|
|
119
|
-
body: body,
|
|
120
|
-
})];
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
}); };
|
|
124
|
-
export var serializeAws_restJson1GetCampaignStateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
125
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
126
|
-
return __generator(this, function (_c) {
|
|
127
|
-
switch (_c.label) {
|
|
128
|
-
case 0: return [4, context.endpoint()];
|
|
129
|
-
case 1:
|
|
130
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
131
|
-
headers = {};
|
|
132
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns/{id}/state";
|
|
133
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
134
|
-
return [2, new __HttpRequest({
|
|
135
|
-
protocol: protocol,
|
|
136
|
-
hostname: hostname,
|
|
137
|
-
port: port,
|
|
138
|
-
method: "GET",
|
|
139
|
-
headers: headers,
|
|
140
|
-
path: resolvedPath,
|
|
141
|
-
body: body,
|
|
142
|
-
})];
|
|
143
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateCampaignCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.connectInstanceId != null && { connectInstanceId: input.connectInstanceId }),
|
|
14
|
+
...(input.dialerConfig != null && {
|
|
15
|
+
dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
|
|
16
|
+
}),
|
|
17
|
+
...(input.name != null && { name: input.name }),
|
|
18
|
+
...(input.outboundCallConfig != null && {
|
|
19
|
+
outboundCallConfig: serializeAws_restJson1OutboundCallConfig(input.outboundCallConfig, context),
|
|
20
|
+
}),
|
|
21
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
22
|
+
});
|
|
23
|
+
return new __HttpRequest({
|
|
24
|
+
protocol,
|
|
25
|
+
hostname,
|
|
26
|
+
port,
|
|
27
|
+
method: "PUT",
|
|
28
|
+
headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body,
|
|
144
31
|
});
|
|
145
|
-
}
|
|
146
|
-
export
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
hostname: hostname,
|
|
161
|
-
port: port,
|
|
162
|
-
method: "POST",
|
|
163
|
-
headers: headers,
|
|
164
|
-
path: resolvedPath,
|
|
165
|
-
body: body,
|
|
166
|
-
})];
|
|
167
|
-
}
|
|
32
|
+
};
|
|
33
|
+
export const serializeAws_restJson1DeleteCampaignCommand = async (input, context) => {
|
|
34
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
|
+
const headers = {};
|
|
36
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}";
|
|
37
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
38
|
+
let body;
|
|
39
|
+
return new __HttpRequest({
|
|
40
|
+
protocol,
|
|
41
|
+
hostname,
|
|
42
|
+
port,
|
|
43
|
+
method: "DELETE",
|
|
44
|
+
headers,
|
|
45
|
+
path: resolvedPath,
|
|
46
|
+
body,
|
|
168
47
|
});
|
|
169
|
-
}
|
|
170
|
-
export
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
method: "GET",
|
|
186
|
-
headers: headers,
|
|
187
|
-
path: resolvedPath,
|
|
188
|
-
body: body,
|
|
189
|
-
})];
|
|
190
|
-
}
|
|
48
|
+
};
|
|
49
|
+
export const serializeAws_restJson1DeleteConnectInstanceConfigCommand = async (input, context) => {
|
|
50
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
51
|
+
const headers = {};
|
|
52
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
53
|
+
"/connect-instance/{connectInstanceId}/config";
|
|
54
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
55
|
+
let body;
|
|
56
|
+
return new __HttpRequest({
|
|
57
|
+
protocol,
|
|
58
|
+
hostname,
|
|
59
|
+
port,
|
|
60
|
+
method: "DELETE",
|
|
61
|
+
headers,
|
|
62
|
+
path: resolvedPath,
|
|
63
|
+
body,
|
|
191
64
|
});
|
|
192
|
-
}
|
|
193
|
-
export
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
method: "GET",
|
|
209
|
-
headers: headers,
|
|
210
|
-
path: resolvedPath,
|
|
211
|
-
body: body,
|
|
212
|
-
})];
|
|
213
|
-
}
|
|
65
|
+
};
|
|
66
|
+
export const serializeAws_restJson1DeleteInstanceOnboardingJobCommand = async (input, context) => {
|
|
67
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
68
|
+
const headers = {};
|
|
69
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
70
|
+
"/connect-instance/{connectInstanceId}/onboarding";
|
|
71
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
72
|
+
let body;
|
|
73
|
+
return new __HttpRequest({
|
|
74
|
+
protocol,
|
|
75
|
+
hostname,
|
|
76
|
+
port,
|
|
77
|
+
method: "DELETE",
|
|
78
|
+
headers,
|
|
79
|
+
path: resolvedPath,
|
|
80
|
+
body,
|
|
214
81
|
});
|
|
215
|
-
}
|
|
216
|
-
export
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
hostname: hostname,
|
|
231
|
-
port: port,
|
|
232
|
-
method: "POST",
|
|
233
|
-
headers: headers,
|
|
234
|
-
path: resolvedPath,
|
|
235
|
-
body: body,
|
|
236
|
-
})];
|
|
237
|
-
}
|
|
82
|
+
};
|
|
83
|
+
export const serializeAws_restJson1DescribeCampaignCommand = async (input, context) => {
|
|
84
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
85
|
+
const headers = {};
|
|
86
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}";
|
|
87
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
88
|
+
let body;
|
|
89
|
+
return new __HttpRequest({
|
|
90
|
+
protocol,
|
|
91
|
+
hostname,
|
|
92
|
+
port,
|
|
93
|
+
method: "GET",
|
|
94
|
+
headers,
|
|
95
|
+
path: resolvedPath,
|
|
96
|
+
body,
|
|
238
97
|
});
|
|
239
|
-
}
|
|
240
|
-
export
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
method: "GET",
|
|
255
|
-
headers: headers,
|
|
256
|
-
path: resolvedPath,
|
|
257
|
-
body: body,
|
|
258
|
-
})];
|
|
259
|
-
}
|
|
98
|
+
};
|
|
99
|
+
export const serializeAws_restJson1GetCampaignStateCommand = async (input, context) => {
|
|
100
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
101
|
+
const headers = {};
|
|
102
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/state";
|
|
103
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
104
|
+
let body;
|
|
105
|
+
return new __HttpRequest({
|
|
106
|
+
protocol,
|
|
107
|
+
hostname,
|
|
108
|
+
port,
|
|
109
|
+
method: "GET",
|
|
110
|
+
headers,
|
|
111
|
+
path: resolvedPath,
|
|
112
|
+
body,
|
|
260
113
|
});
|
|
261
|
-
}
|
|
262
|
-
export
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
})];
|
|
281
|
-
}
|
|
114
|
+
};
|
|
115
|
+
export const serializeAws_restJson1GetCampaignStateBatchCommand = async (input, context) => {
|
|
116
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
117
|
+
const headers = {
|
|
118
|
+
"content-type": "application/json",
|
|
119
|
+
};
|
|
120
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-state";
|
|
121
|
+
let body;
|
|
122
|
+
body = JSON.stringify({
|
|
123
|
+
...(input.campaignIds != null && { campaignIds: serializeAws_restJson1CampaignIdList(input.campaignIds, context) }),
|
|
124
|
+
});
|
|
125
|
+
return new __HttpRequest({
|
|
126
|
+
protocol,
|
|
127
|
+
hostname,
|
|
128
|
+
port,
|
|
129
|
+
method: "POST",
|
|
130
|
+
headers,
|
|
131
|
+
path: resolvedPath,
|
|
132
|
+
body,
|
|
282
133
|
});
|
|
283
|
-
}
|
|
284
|
-
export
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return [2, new __HttpRequest({
|
|
300
|
-
protocol: protocol,
|
|
301
|
-
hostname: hostname,
|
|
302
|
-
port: port,
|
|
303
|
-
method: "PUT",
|
|
304
|
-
headers: headers,
|
|
305
|
-
path: resolvedPath,
|
|
306
|
-
body: body,
|
|
307
|
-
})];
|
|
308
|
-
}
|
|
134
|
+
};
|
|
135
|
+
export const serializeAws_restJson1GetConnectInstanceConfigCommand = async (input, context) => {
|
|
136
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
137
|
+
const headers = {};
|
|
138
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
139
|
+
"/connect-instance/{connectInstanceId}/config";
|
|
140
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
141
|
+
let body;
|
|
142
|
+
return new __HttpRequest({
|
|
143
|
+
protocol,
|
|
144
|
+
hostname,
|
|
145
|
+
port,
|
|
146
|
+
method: "GET",
|
|
147
|
+
headers,
|
|
148
|
+
path: resolvedPath,
|
|
149
|
+
body,
|
|
309
150
|
});
|
|
310
|
-
}
|
|
311
|
-
export
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
headers: headers,
|
|
327
|
-
path: resolvedPath,
|
|
328
|
-
body: body,
|
|
329
|
-
})];
|
|
330
|
-
}
|
|
151
|
+
};
|
|
152
|
+
export const serializeAws_restJson1GetInstanceOnboardingJobStatusCommand = async (input, context) => {
|
|
153
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
154
|
+
const headers = {};
|
|
155
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
156
|
+
"/connect-instance/{connectInstanceId}/onboarding";
|
|
157
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
158
|
+
let body;
|
|
159
|
+
return new __HttpRequest({
|
|
160
|
+
protocol,
|
|
161
|
+
hostname,
|
|
162
|
+
port,
|
|
163
|
+
method: "GET",
|
|
164
|
+
headers,
|
|
165
|
+
path: resolvedPath,
|
|
166
|
+
body,
|
|
331
167
|
});
|
|
332
|
-
}
|
|
333
|
-
export
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
168
|
+
};
|
|
169
|
+
export const serializeAws_restJson1ListCampaignsCommand = async (input, context) => {
|
|
170
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
171
|
+
const headers = {
|
|
172
|
+
"content-type": "application/json",
|
|
173
|
+
};
|
|
174
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-summary";
|
|
175
|
+
let body;
|
|
176
|
+
body = JSON.stringify({
|
|
177
|
+
...(input.filters != null && { filters: serializeAws_restJson1CampaignFilters(input.filters, context) }),
|
|
178
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
179
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
180
|
+
});
|
|
181
|
+
return new __HttpRequest({
|
|
182
|
+
protocol,
|
|
183
|
+
hostname,
|
|
184
|
+
port,
|
|
185
|
+
method: "POST",
|
|
186
|
+
headers,
|
|
187
|
+
path: resolvedPath,
|
|
188
|
+
body,
|
|
353
189
|
});
|
|
354
|
-
}
|
|
355
|
-
export
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
encryptionConfig: serializeAws_restJson1EncryptionConfig(input.encryptionConfig, context),
|
|
370
|
-
})));
|
|
371
|
-
return [2, new __HttpRequest({
|
|
372
|
-
protocol: protocol,
|
|
373
|
-
hostname: hostname,
|
|
374
|
-
port: port,
|
|
375
|
-
method: "PUT",
|
|
376
|
-
headers: headers,
|
|
377
|
-
path: resolvedPath,
|
|
378
|
-
body: body,
|
|
379
|
-
})];
|
|
380
|
-
}
|
|
190
|
+
};
|
|
191
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
192
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
193
|
+
const headers = {};
|
|
194
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
|
|
195
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
|
|
196
|
+
let body;
|
|
197
|
+
return new __HttpRequest({
|
|
198
|
+
protocol,
|
|
199
|
+
hostname,
|
|
200
|
+
port,
|
|
201
|
+
method: "GET",
|
|
202
|
+
headers,
|
|
203
|
+
path: resolvedPath,
|
|
204
|
+
body,
|
|
381
205
|
});
|
|
382
|
-
}
|
|
383
|
-
export
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
method: "POST",
|
|
398
|
-
headers: headers,
|
|
399
|
-
path: resolvedPath,
|
|
400
|
-
body: body,
|
|
401
|
-
})];
|
|
402
|
-
}
|
|
206
|
+
};
|
|
207
|
+
export const serializeAws_restJson1PauseCampaignCommand = async (input, context) => {
|
|
208
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
209
|
+
const headers = {};
|
|
210
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/pause";
|
|
211
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
212
|
+
let body;
|
|
213
|
+
return new __HttpRequest({
|
|
214
|
+
protocol,
|
|
215
|
+
hostname,
|
|
216
|
+
port,
|
|
217
|
+
method: "POST",
|
|
218
|
+
headers,
|
|
219
|
+
path: resolvedPath,
|
|
220
|
+
body,
|
|
403
221
|
});
|
|
404
|
-
}
|
|
405
|
-
export
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
})];
|
|
427
|
-
}
|
|
222
|
+
};
|
|
223
|
+
export const serializeAws_restJson1PutDialRequestBatchCommand = async (input, context) => {
|
|
224
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
225
|
+
const headers = {
|
|
226
|
+
"content-type": "application/json",
|
|
227
|
+
};
|
|
228
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dial-requests";
|
|
229
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
230
|
+
let body;
|
|
231
|
+
body = JSON.stringify({
|
|
232
|
+
...(input.dialRequests != null && {
|
|
233
|
+
dialRequests: serializeAws_restJson1DialRequestList(input.dialRequests, context),
|
|
234
|
+
}),
|
|
235
|
+
});
|
|
236
|
+
return new __HttpRequest({
|
|
237
|
+
protocol,
|
|
238
|
+
hostname,
|
|
239
|
+
port,
|
|
240
|
+
method: "PUT",
|
|
241
|
+
headers,
|
|
242
|
+
path: resolvedPath,
|
|
243
|
+
body,
|
|
428
244
|
});
|
|
429
|
-
}
|
|
430
|
-
export
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
protocol: protocol,
|
|
445
|
-
hostname: hostname,
|
|
446
|
-
port: port,
|
|
447
|
-
method: "DELETE",
|
|
448
|
-
headers: headers,
|
|
449
|
-
path: resolvedPath,
|
|
450
|
-
query: query,
|
|
451
|
-
body: body,
|
|
452
|
-
})];
|
|
453
|
-
}
|
|
245
|
+
};
|
|
246
|
+
export const serializeAws_restJson1ResumeCampaignCommand = async (input, context) => {
|
|
247
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
248
|
+
const headers = {};
|
|
249
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/resume";
|
|
250
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
251
|
+
let body;
|
|
252
|
+
return new __HttpRequest({
|
|
253
|
+
protocol,
|
|
254
|
+
hostname,
|
|
255
|
+
port,
|
|
256
|
+
method: "POST",
|
|
257
|
+
headers,
|
|
258
|
+
path: resolvedPath,
|
|
259
|
+
body,
|
|
454
260
|
});
|
|
455
|
-
}
|
|
456
|
-
export
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
})));
|
|
471
|
-
return [2, new __HttpRequest({
|
|
472
|
-
protocol: protocol,
|
|
473
|
-
hostname: hostname,
|
|
474
|
-
port: port,
|
|
475
|
-
method: "POST",
|
|
476
|
-
headers: headers,
|
|
477
|
-
path: resolvedPath,
|
|
478
|
-
body: body,
|
|
479
|
-
})];
|
|
480
|
-
}
|
|
261
|
+
};
|
|
262
|
+
export const serializeAws_restJson1StartCampaignCommand = async (input, context) => {
|
|
263
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
264
|
+
const headers = {};
|
|
265
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/start";
|
|
266
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
267
|
+
let body;
|
|
268
|
+
return new __HttpRequest({
|
|
269
|
+
protocol,
|
|
270
|
+
hostname,
|
|
271
|
+
port,
|
|
272
|
+
method: "POST",
|
|
273
|
+
headers,
|
|
274
|
+
path: resolvedPath,
|
|
275
|
+
body,
|
|
481
276
|
});
|
|
482
|
-
}
|
|
483
|
-
export
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
277
|
+
};
|
|
278
|
+
export const serializeAws_restJson1StartInstanceOnboardingJobCommand = async (input, context) => {
|
|
279
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
280
|
+
const headers = {
|
|
281
|
+
"content-type": "application/json",
|
|
282
|
+
};
|
|
283
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
284
|
+
"/connect-instance/{connectInstanceId}/onboarding";
|
|
285
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
286
|
+
let body;
|
|
287
|
+
body = JSON.stringify({
|
|
288
|
+
...(input.encryptionConfig != null && {
|
|
289
|
+
encryptionConfig: serializeAws_restJson1EncryptionConfig(input.encryptionConfig, context),
|
|
290
|
+
}),
|
|
291
|
+
});
|
|
292
|
+
return new __HttpRequest({
|
|
293
|
+
protocol,
|
|
294
|
+
hostname,
|
|
295
|
+
port,
|
|
296
|
+
method: "PUT",
|
|
297
|
+
headers,
|
|
298
|
+
path: resolvedPath,
|
|
299
|
+
body,
|
|
506
300
|
});
|
|
507
|
-
}
|
|
508
|
-
export
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
})), (input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId })), (input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber })));
|
|
523
|
-
return [2, new __HttpRequest({
|
|
524
|
-
protocol: protocol,
|
|
525
|
-
hostname: hostname,
|
|
526
|
-
port: port,
|
|
527
|
-
method: "POST",
|
|
528
|
-
headers: headers,
|
|
529
|
-
path: resolvedPath,
|
|
530
|
-
body: body,
|
|
531
|
-
})];
|
|
532
|
-
}
|
|
301
|
+
};
|
|
302
|
+
export const serializeAws_restJson1StopCampaignCommand = async (input, context) => {
|
|
303
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
304
|
+
const headers = {};
|
|
305
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/stop";
|
|
306
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
307
|
+
let body;
|
|
308
|
+
return new __HttpRequest({
|
|
309
|
+
protocol,
|
|
310
|
+
hostname,
|
|
311
|
+
port,
|
|
312
|
+
method: "POST",
|
|
313
|
+
headers,
|
|
314
|
+
path: resolvedPath,
|
|
315
|
+
body,
|
|
533
316
|
});
|
|
534
|
-
}
|
|
535
|
-
export
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
if (data.id != null) {
|
|
555
|
-
contents.id = __expectString(data.id);
|
|
556
|
-
}
|
|
557
|
-
if (data.tags != null) {
|
|
558
|
-
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
559
|
-
}
|
|
560
|
-
return [2, contents];
|
|
561
|
-
}
|
|
317
|
+
};
|
|
318
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
319
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
320
|
+
const headers = {
|
|
321
|
+
"content-type": "application/json",
|
|
322
|
+
};
|
|
323
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
|
|
324
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
|
|
325
|
+
let body;
|
|
326
|
+
body = JSON.stringify({
|
|
327
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
328
|
+
});
|
|
329
|
+
return new __HttpRequest({
|
|
330
|
+
protocol,
|
|
331
|
+
hostname,
|
|
332
|
+
port,
|
|
333
|
+
method: "POST",
|
|
334
|
+
headers,
|
|
335
|
+
path: resolvedPath,
|
|
336
|
+
body,
|
|
562
337
|
});
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
case "InternalServerException": return [3, 6];
|
|
583
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
584
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
585
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 8];
|
|
586
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
587
|
-
case "com.amazonaws.connectcampaigns#ServiceQuotaExceededException": return [3, 10];
|
|
588
|
-
case "ThrottlingException": return [3, 12];
|
|
589
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 12];
|
|
590
|
-
case "ValidationException": return [3, 14];
|
|
591
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 14];
|
|
592
|
-
}
|
|
593
|
-
return [3, 16];
|
|
594
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
595
|
-
case 3: throw _d.sent();
|
|
596
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
597
|
-
case 5: throw _d.sent();
|
|
598
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
599
|
-
case 7: throw _d.sent();
|
|
600
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
601
|
-
case 9: throw _d.sent();
|
|
602
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
603
|
-
case 11: throw _d.sent();
|
|
604
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
605
|
-
case 13: throw _d.sent();
|
|
606
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
607
|
-
case 15: throw _d.sent();
|
|
608
|
-
case 16:
|
|
609
|
-
parsedBody = parsedOutput.body;
|
|
610
|
-
throwDefaultError({
|
|
611
|
-
output: output,
|
|
612
|
-
parsedBody: parsedBody,
|
|
613
|
-
exceptionCtor: __BaseException,
|
|
614
|
-
errorCode: errorCode,
|
|
615
|
-
});
|
|
616
|
-
_d.label = 17;
|
|
617
|
-
case 17: return [2];
|
|
618
|
-
}
|
|
338
|
+
};
|
|
339
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
340
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
341
|
+
const headers = {};
|
|
342
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
|
|
343
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
|
|
344
|
+
const query = map({
|
|
345
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
346
|
+
});
|
|
347
|
+
let body;
|
|
348
|
+
return new __HttpRequest({
|
|
349
|
+
protocol,
|
|
350
|
+
hostname,
|
|
351
|
+
port,
|
|
352
|
+
method: "DELETE",
|
|
353
|
+
headers,
|
|
354
|
+
path: resolvedPath,
|
|
355
|
+
query,
|
|
356
|
+
body,
|
|
619
357
|
});
|
|
620
|
-
}
|
|
621
|
-
export
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
358
|
+
};
|
|
359
|
+
export const serializeAws_restJson1UpdateCampaignDialerConfigCommand = async (input, context) => {
|
|
360
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
361
|
+
const headers = {
|
|
362
|
+
"content-type": "application/json",
|
|
363
|
+
};
|
|
364
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dialer-config";
|
|
365
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
366
|
+
let body;
|
|
367
|
+
body = JSON.stringify({
|
|
368
|
+
...(input.dialerConfig != null && {
|
|
369
|
+
dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
|
|
370
|
+
}),
|
|
371
|
+
});
|
|
372
|
+
return new __HttpRequest({
|
|
373
|
+
protocol,
|
|
374
|
+
hostname,
|
|
375
|
+
port,
|
|
376
|
+
method: "POST",
|
|
377
|
+
headers,
|
|
378
|
+
path: resolvedPath,
|
|
379
|
+
body,
|
|
637
380
|
});
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 6];
|
|
659
|
-
case "ValidationException": return [3, 8];
|
|
660
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 8];
|
|
661
|
-
}
|
|
662
|
-
return [3, 10];
|
|
663
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
664
|
-
case 3: throw _d.sent();
|
|
665
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
666
|
-
case 5: throw _d.sent();
|
|
667
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
668
|
-
case 7: throw _d.sent();
|
|
669
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
670
|
-
case 9: throw _d.sent();
|
|
671
|
-
case 10:
|
|
672
|
-
parsedBody = parsedOutput.body;
|
|
673
|
-
throwDefaultError({
|
|
674
|
-
output: output,
|
|
675
|
-
parsedBody: parsedBody,
|
|
676
|
-
exceptionCtor: __BaseException,
|
|
677
|
-
errorCode: errorCode,
|
|
678
|
-
});
|
|
679
|
-
_d.label = 11;
|
|
680
|
-
case 11: return [2];
|
|
681
|
-
}
|
|
381
|
+
};
|
|
382
|
+
export const serializeAws_restJson1UpdateCampaignNameCommand = async (input, context) => {
|
|
383
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
384
|
+
const headers = {
|
|
385
|
+
"content-type": "application/json",
|
|
386
|
+
};
|
|
387
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/name";
|
|
388
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
389
|
+
let body;
|
|
390
|
+
body = JSON.stringify({
|
|
391
|
+
...(input.name != null && { name: input.name }),
|
|
392
|
+
});
|
|
393
|
+
return new __HttpRequest({
|
|
394
|
+
protocol,
|
|
395
|
+
hostname,
|
|
396
|
+
port,
|
|
397
|
+
method: "POST",
|
|
398
|
+
headers,
|
|
399
|
+
path: resolvedPath,
|
|
400
|
+
body,
|
|
682
401
|
});
|
|
683
|
-
}
|
|
684
|
-
export
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
402
|
+
};
|
|
403
|
+
export const serializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = async (input, context) => {
|
|
404
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
405
|
+
const headers = {
|
|
406
|
+
"content-type": "application/json",
|
|
407
|
+
};
|
|
408
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/outbound-call-config";
|
|
409
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
410
|
+
let body;
|
|
411
|
+
body = JSON.stringify({
|
|
412
|
+
...(input.answerMachineDetectionConfig != null && {
|
|
413
|
+
answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
|
|
414
|
+
}),
|
|
415
|
+
...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }),
|
|
416
|
+
...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
|
|
417
|
+
});
|
|
418
|
+
return new __HttpRequest({
|
|
419
|
+
protocol,
|
|
420
|
+
hostname,
|
|
421
|
+
port,
|
|
422
|
+
method: "POST",
|
|
423
|
+
headers,
|
|
424
|
+
path: resolvedPath,
|
|
425
|
+
body,
|
|
700
426
|
});
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
_a = [__assign({}, output)];
|
|
709
|
-
_c = {};
|
|
710
|
-
return [4, parseErrorBody(output.body, context)];
|
|
711
|
-
case 1:
|
|
712
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
713
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
714
|
-
_b = errorCode;
|
|
715
|
-
switch (_b) {
|
|
716
|
-
case "AccessDeniedException": return [3, 2];
|
|
717
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
718
|
-
case "InternalServerException": return [3, 4];
|
|
719
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 4];
|
|
720
|
-
case "InvalidStateException": return [3, 6];
|
|
721
|
-
case "com.amazonaws.connectcampaigns#InvalidStateException": return [3, 6];
|
|
722
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
723
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 8];
|
|
724
|
-
case "ThrottlingException": return [3, 10];
|
|
725
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 10];
|
|
726
|
-
case "ValidationException": return [3, 12];
|
|
727
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 12];
|
|
728
|
-
}
|
|
729
|
-
return [3, 14];
|
|
730
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
731
|
-
case 3: throw _d.sent();
|
|
732
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
733
|
-
case 5: throw _d.sent();
|
|
734
|
-
case 6: return [4, deserializeAws_restJson1InvalidStateExceptionResponse(parsedOutput, context)];
|
|
735
|
-
case 7: throw _d.sent();
|
|
736
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
737
|
-
case 9: throw _d.sent();
|
|
738
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
739
|
-
case 11: throw _d.sent();
|
|
740
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
741
|
-
case 13: throw _d.sent();
|
|
742
|
-
case 14:
|
|
743
|
-
parsedBody = parsedOutput.body;
|
|
744
|
-
throwDefaultError({
|
|
745
|
-
output: output,
|
|
746
|
-
parsedBody: parsedBody,
|
|
747
|
-
exceptionCtor: __BaseException,
|
|
748
|
-
errorCode: errorCode,
|
|
749
|
-
});
|
|
750
|
-
_d.label = 15;
|
|
751
|
-
case 15: return [2];
|
|
752
|
-
}
|
|
427
|
+
};
|
|
428
|
+
export const deserializeAws_restJson1CreateCampaignCommand = async (output, context) => {
|
|
429
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
430
|
+
return deserializeAws_restJson1CreateCampaignCommandError(output, context);
|
|
431
|
+
}
|
|
432
|
+
const contents = map({
|
|
433
|
+
$metadata: deserializeMetadata(output),
|
|
753
434
|
});
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
435
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
436
|
+
if (data.arn != null) {
|
|
437
|
+
contents.arn = __expectString(data.arn);
|
|
438
|
+
}
|
|
439
|
+
if (data.id != null) {
|
|
440
|
+
contents.id = __expectString(data.id);
|
|
441
|
+
}
|
|
442
|
+
if (data.tags != null) {
|
|
443
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
444
|
+
}
|
|
445
|
+
return contents;
|
|
446
|
+
};
|
|
447
|
+
const deserializeAws_restJson1CreateCampaignCommandError = async (output, context) => {
|
|
448
|
+
const parsedOutput = {
|
|
449
|
+
...output,
|
|
450
|
+
body: await parseErrorBody(output.body, context),
|
|
451
|
+
};
|
|
452
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
453
|
+
switch (errorCode) {
|
|
454
|
+
case "AccessDeniedException":
|
|
455
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
456
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
457
|
+
case "ConflictException":
|
|
458
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
459
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
460
|
+
case "InternalServerException":
|
|
461
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
462
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
463
|
+
case "ResourceNotFoundException":
|
|
464
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
465
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
466
|
+
case "ServiceQuotaExceededException":
|
|
467
|
+
case "com.amazonaws.connectcampaigns#ServiceQuotaExceededException":
|
|
468
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
469
|
+
case "ThrottlingException":
|
|
470
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
471
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
472
|
+
case "ValidationException":
|
|
473
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
474
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
475
|
+
default:
|
|
476
|
+
const parsedBody = parsedOutput.body;
|
|
477
|
+
throwDefaultError({
|
|
478
|
+
output,
|
|
479
|
+
parsedBody,
|
|
480
|
+
exceptionCtor: __BaseException,
|
|
481
|
+
errorCode,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
export const deserializeAws_restJson1DeleteCampaignCommand = async (output, context) => {
|
|
486
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
487
|
+
return deserializeAws_restJson1DeleteCampaignCommandError(output, context);
|
|
488
|
+
}
|
|
489
|
+
const contents = map({
|
|
490
|
+
$metadata: deserializeMetadata(output),
|
|
771
491
|
});
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
parsedBody = parsedOutput.body;
|
|
811
|
-
throwDefaultError({
|
|
812
|
-
output: output,
|
|
813
|
-
parsedBody: parsedBody,
|
|
814
|
-
exceptionCtor: __BaseException,
|
|
815
|
-
errorCode: errorCode,
|
|
816
|
-
});
|
|
817
|
-
_d.label = 13;
|
|
818
|
-
case 13: return [2];
|
|
819
|
-
}
|
|
492
|
+
await collectBody(output.body, context);
|
|
493
|
+
return contents;
|
|
494
|
+
};
|
|
495
|
+
const deserializeAws_restJson1DeleteCampaignCommandError = async (output, context) => {
|
|
496
|
+
const parsedOutput = {
|
|
497
|
+
...output,
|
|
498
|
+
body: await parseErrorBody(output.body, context),
|
|
499
|
+
};
|
|
500
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
501
|
+
switch (errorCode) {
|
|
502
|
+
case "AccessDeniedException":
|
|
503
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
504
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
505
|
+
case "InternalServerException":
|
|
506
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
507
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
508
|
+
case "ResourceNotFoundException":
|
|
509
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
510
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
511
|
+
case "ValidationException":
|
|
512
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
513
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
514
|
+
default:
|
|
515
|
+
const parsedBody = parsedOutput.body;
|
|
516
|
+
throwDefaultError({
|
|
517
|
+
output,
|
|
518
|
+
parsedBody,
|
|
519
|
+
exceptionCtor: __BaseException,
|
|
520
|
+
errorCode,
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
export const deserializeAws_restJson1DeleteConnectInstanceConfigCommand = async (output, context) => {
|
|
525
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
526
|
+
return deserializeAws_restJson1DeleteConnectInstanceConfigCommandError(output, context);
|
|
527
|
+
}
|
|
528
|
+
const contents = map({
|
|
529
|
+
$metadata: deserializeMetadata(output),
|
|
820
530
|
});
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
531
|
+
await collectBody(output.body, context);
|
|
532
|
+
return contents;
|
|
533
|
+
};
|
|
534
|
+
const deserializeAws_restJson1DeleteConnectInstanceConfigCommandError = async (output, context) => {
|
|
535
|
+
const parsedOutput = {
|
|
536
|
+
...output,
|
|
537
|
+
body: await parseErrorBody(output.body, context),
|
|
538
|
+
};
|
|
539
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
540
|
+
switch (errorCode) {
|
|
541
|
+
case "AccessDeniedException":
|
|
542
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
543
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
544
|
+
case "InternalServerException":
|
|
545
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
546
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
547
|
+
case "InvalidStateException":
|
|
548
|
+
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
549
|
+
throw await deserializeAws_restJson1InvalidStateExceptionResponse(parsedOutput, context);
|
|
550
|
+
case "ResourceNotFoundException":
|
|
551
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
552
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
553
|
+
case "ThrottlingException":
|
|
554
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
555
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
556
|
+
case "ValidationException":
|
|
557
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
558
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
559
|
+
default:
|
|
560
|
+
const parsedBody = parsedOutput.body;
|
|
561
|
+
throwDefaultError({
|
|
562
|
+
output,
|
|
563
|
+
parsedBody,
|
|
564
|
+
exceptionCtor: __BaseException,
|
|
565
|
+
errorCode,
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
export const deserializeAws_restJson1DeleteInstanceOnboardingJobCommand = async (output, context) => {
|
|
570
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
571
|
+
return deserializeAws_restJson1DeleteInstanceOnboardingJobCommandError(output, context);
|
|
572
|
+
}
|
|
573
|
+
const contents = map({
|
|
574
|
+
$metadata: deserializeMetadata(output),
|
|
843
575
|
});
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
_d.label = 11;
|
|
886
|
-
case 11: return [2];
|
|
887
|
-
}
|
|
576
|
+
await collectBody(output.body, context);
|
|
577
|
+
return contents;
|
|
578
|
+
};
|
|
579
|
+
const deserializeAws_restJson1DeleteInstanceOnboardingJobCommandError = async (output, context) => {
|
|
580
|
+
const parsedOutput = {
|
|
581
|
+
...output,
|
|
582
|
+
body: await parseErrorBody(output.body, context),
|
|
583
|
+
};
|
|
584
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
585
|
+
switch (errorCode) {
|
|
586
|
+
case "AccessDeniedException":
|
|
587
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
588
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
589
|
+
case "InternalServerException":
|
|
590
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
591
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
592
|
+
case "InvalidStateException":
|
|
593
|
+
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
594
|
+
throw await deserializeAws_restJson1InvalidStateExceptionResponse(parsedOutput, context);
|
|
595
|
+
case "ResourceNotFoundException":
|
|
596
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
597
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
598
|
+
case "ValidationException":
|
|
599
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
600
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
601
|
+
default:
|
|
602
|
+
const parsedBody = parsedOutput.body;
|
|
603
|
+
throwDefaultError({
|
|
604
|
+
output,
|
|
605
|
+
parsedBody,
|
|
606
|
+
exceptionCtor: __BaseException,
|
|
607
|
+
errorCode,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
export const deserializeAws_restJson1DescribeCampaignCommand = async (output, context) => {
|
|
612
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
613
|
+
return deserializeAws_restJson1DescribeCampaignCommandError(output, context);
|
|
614
|
+
}
|
|
615
|
+
const contents = map({
|
|
616
|
+
$metadata: deserializeMetadata(output),
|
|
888
617
|
});
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
618
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
619
|
+
if (data.campaign != null) {
|
|
620
|
+
contents.campaign = deserializeAws_restJson1Campaign(data.campaign, context);
|
|
621
|
+
}
|
|
622
|
+
return contents;
|
|
623
|
+
};
|
|
624
|
+
const deserializeAws_restJson1DescribeCampaignCommandError = async (output, context) => {
|
|
625
|
+
const parsedOutput = {
|
|
626
|
+
...output,
|
|
627
|
+
body: await parseErrorBody(output.body, context),
|
|
628
|
+
};
|
|
629
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
630
|
+
switch (errorCode) {
|
|
631
|
+
case "AccessDeniedException":
|
|
632
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
633
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
634
|
+
case "InternalServerException":
|
|
635
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
636
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
637
|
+
case "ResourceNotFoundException":
|
|
638
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
639
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
640
|
+
case "ValidationException":
|
|
641
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
642
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
643
|
+
default:
|
|
644
|
+
const parsedBody = parsedOutput.body;
|
|
645
|
+
throwDefaultError({
|
|
646
|
+
output,
|
|
647
|
+
parsedBody,
|
|
648
|
+
exceptionCtor: __BaseException,
|
|
649
|
+
errorCode,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
export const deserializeAws_restJson1GetCampaignStateCommand = async (output, context) => {
|
|
654
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
655
|
+
return deserializeAws_restJson1GetCampaignStateCommandError(output, context);
|
|
656
|
+
}
|
|
657
|
+
const contents = map({
|
|
658
|
+
$metadata: deserializeMetadata(output),
|
|
911
659
|
});
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
return
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
});
|
|
957
|
-
_d.label = 13;
|
|
958
|
-
case 13: return [2];
|
|
959
|
-
}
|
|
660
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
661
|
+
if (data.state != null) {
|
|
662
|
+
contents.state = __expectString(data.state);
|
|
663
|
+
}
|
|
664
|
+
return contents;
|
|
665
|
+
};
|
|
666
|
+
const deserializeAws_restJson1GetCampaignStateCommandError = async (output, context) => {
|
|
667
|
+
const parsedOutput = {
|
|
668
|
+
...output,
|
|
669
|
+
body: await parseErrorBody(output.body, context),
|
|
670
|
+
};
|
|
671
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
+
switch (errorCode) {
|
|
673
|
+
case "AccessDeniedException":
|
|
674
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
675
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
676
|
+
case "InternalServerException":
|
|
677
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
678
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
679
|
+
case "ResourceNotFoundException":
|
|
680
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
681
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
682
|
+
case "ThrottlingException":
|
|
683
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
684
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
685
|
+
case "ValidationException":
|
|
686
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
687
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
688
|
+
default:
|
|
689
|
+
const parsedBody = parsedOutput.body;
|
|
690
|
+
throwDefaultError({
|
|
691
|
+
output,
|
|
692
|
+
parsedBody,
|
|
693
|
+
exceptionCtor: __BaseException,
|
|
694
|
+
errorCode,
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
export const deserializeAws_restJson1GetCampaignStateBatchCommand = async (output, context) => {
|
|
699
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
700
|
+
return deserializeAws_restJson1GetCampaignStateBatchCommandError(output, context);
|
|
701
|
+
}
|
|
702
|
+
const contents = map({
|
|
703
|
+
$metadata: deserializeMetadata(output),
|
|
960
704
|
});
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
705
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
706
|
+
if (data.failedRequests != null) {
|
|
707
|
+
contents.failedRequests = deserializeAws_restJson1FailedCampaignStateResponseList(data.failedRequests, context);
|
|
708
|
+
}
|
|
709
|
+
if (data.successfulRequests != null) {
|
|
710
|
+
contents.successfulRequests = deserializeAws_restJson1SuccessfulCampaignStateResponseList(data.successfulRequests, context);
|
|
711
|
+
}
|
|
712
|
+
return contents;
|
|
713
|
+
};
|
|
714
|
+
const deserializeAws_restJson1GetCampaignStateBatchCommandError = async (output, context) => {
|
|
715
|
+
const parsedOutput = {
|
|
716
|
+
...output,
|
|
717
|
+
body: await parseErrorBody(output.body, context),
|
|
718
|
+
};
|
|
719
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
720
|
+
switch (errorCode) {
|
|
721
|
+
case "AccessDeniedException":
|
|
722
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
723
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
724
|
+
case "InternalServerException":
|
|
725
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
726
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
727
|
+
case "ThrottlingException":
|
|
728
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
729
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
730
|
+
case "ValidationException":
|
|
731
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
732
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
733
|
+
default:
|
|
734
|
+
const parsedBody = parsedOutput.body;
|
|
735
|
+
throwDefaultError({
|
|
736
|
+
output,
|
|
737
|
+
parsedBody,
|
|
738
|
+
exceptionCtor: __BaseException,
|
|
739
|
+
errorCode,
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
export const deserializeAws_restJson1GetConnectInstanceConfigCommand = async (output, context) => {
|
|
744
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
745
|
+
return deserializeAws_restJson1GetConnectInstanceConfigCommandError(output, context);
|
|
746
|
+
}
|
|
747
|
+
const contents = map({
|
|
748
|
+
$metadata: deserializeMetadata(output),
|
|
986
749
|
});
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
return
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
_d.label = 11;
|
|
1029
|
-
case 11: return [2];
|
|
1030
|
-
}
|
|
750
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
751
|
+
if (data.connectInstanceConfig != null) {
|
|
752
|
+
contents.connectInstanceConfig = deserializeAws_restJson1InstanceConfig(data.connectInstanceConfig, context);
|
|
753
|
+
}
|
|
754
|
+
return contents;
|
|
755
|
+
};
|
|
756
|
+
const deserializeAws_restJson1GetConnectInstanceConfigCommandError = async (output, context) => {
|
|
757
|
+
const parsedOutput = {
|
|
758
|
+
...output,
|
|
759
|
+
body: await parseErrorBody(output.body, context),
|
|
760
|
+
};
|
|
761
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
762
|
+
switch (errorCode) {
|
|
763
|
+
case "AccessDeniedException":
|
|
764
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
765
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
766
|
+
case "InternalServerException":
|
|
767
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
768
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
769
|
+
case "ResourceNotFoundException":
|
|
770
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
771
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
772
|
+
case "ValidationException":
|
|
773
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
774
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
775
|
+
default:
|
|
776
|
+
const parsedBody = parsedOutput.body;
|
|
777
|
+
throwDefaultError({
|
|
778
|
+
output,
|
|
779
|
+
parsedBody,
|
|
780
|
+
exceptionCtor: __BaseException,
|
|
781
|
+
errorCode,
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
export const deserializeAws_restJson1GetInstanceOnboardingJobStatusCommand = async (output, context) => {
|
|
786
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
787
|
+
return deserializeAws_restJson1GetInstanceOnboardingJobStatusCommandError(output, context);
|
|
788
|
+
}
|
|
789
|
+
const contents = map({
|
|
790
|
+
$metadata: deserializeMetadata(output),
|
|
1031
791
|
});
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
792
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
793
|
+
if (data.connectInstanceOnboardingJobStatus != null) {
|
|
794
|
+
contents.connectInstanceOnboardingJobStatus = deserializeAws_restJson1InstanceOnboardingJobStatus(data.connectInstanceOnboardingJobStatus, context);
|
|
795
|
+
}
|
|
796
|
+
return contents;
|
|
797
|
+
};
|
|
798
|
+
const deserializeAws_restJson1GetInstanceOnboardingJobStatusCommandError = async (output, context) => {
|
|
799
|
+
const parsedOutput = {
|
|
800
|
+
...output,
|
|
801
|
+
body: await parseErrorBody(output.body, context),
|
|
802
|
+
};
|
|
803
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
804
|
+
switch (errorCode) {
|
|
805
|
+
case "AccessDeniedException":
|
|
806
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
807
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
808
|
+
case "InternalServerException":
|
|
809
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
810
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
811
|
+
case "ResourceNotFoundException":
|
|
812
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
813
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
814
|
+
case "ValidationException":
|
|
815
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
816
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
817
|
+
default:
|
|
818
|
+
const parsedBody = parsedOutput.body;
|
|
819
|
+
throwDefaultError({
|
|
820
|
+
output,
|
|
821
|
+
parsedBody,
|
|
822
|
+
exceptionCtor: __BaseException,
|
|
823
|
+
errorCode,
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
export const deserializeAws_restJson1ListCampaignsCommand = async (output, context) => {
|
|
828
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
829
|
+
return deserializeAws_restJson1ListCampaignsCommandError(output, context);
|
|
830
|
+
}
|
|
831
|
+
const contents = map({
|
|
832
|
+
$metadata: deserializeMetadata(output),
|
|
1054
833
|
});
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
_d.label = 11;
|
|
1097
|
-
case 11: return [2];
|
|
1098
|
-
}
|
|
834
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
835
|
+
if (data.campaignSummaryList != null) {
|
|
836
|
+
contents.campaignSummaryList = deserializeAws_restJson1CampaignSummaryList(data.campaignSummaryList, context);
|
|
837
|
+
}
|
|
838
|
+
if (data.nextToken != null) {
|
|
839
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
840
|
+
}
|
|
841
|
+
return contents;
|
|
842
|
+
};
|
|
843
|
+
const deserializeAws_restJson1ListCampaignsCommandError = async (output, context) => {
|
|
844
|
+
const parsedOutput = {
|
|
845
|
+
...output,
|
|
846
|
+
body: await parseErrorBody(output.body, context),
|
|
847
|
+
};
|
|
848
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
849
|
+
switch (errorCode) {
|
|
850
|
+
case "AccessDeniedException":
|
|
851
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
852
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
853
|
+
case "InternalServerException":
|
|
854
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
855
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
856
|
+
case "ValidationException":
|
|
857
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
858
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
859
|
+
default:
|
|
860
|
+
const parsedBody = parsedOutput.body;
|
|
861
|
+
throwDefaultError({
|
|
862
|
+
output,
|
|
863
|
+
parsedBody,
|
|
864
|
+
exceptionCtor: __BaseException,
|
|
865
|
+
errorCode,
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
870
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
871
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
872
|
+
}
|
|
873
|
+
const contents = map({
|
|
874
|
+
$metadata: deserializeMetadata(output),
|
|
1099
875
|
});
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
876
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
877
|
+
if (data.tags != null) {
|
|
878
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
879
|
+
}
|
|
880
|
+
return contents;
|
|
881
|
+
};
|
|
882
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
883
|
+
const parsedOutput = {
|
|
884
|
+
...output,
|
|
885
|
+
body: await parseErrorBody(output.body, context),
|
|
886
|
+
};
|
|
887
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
888
|
+
switch (errorCode) {
|
|
889
|
+
case "AccessDeniedException":
|
|
890
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
891
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
892
|
+
case "InternalServerException":
|
|
893
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
894
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
895
|
+
case "ResourceNotFoundException":
|
|
896
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
897
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
898
|
+
case "ThrottlingException":
|
|
899
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
900
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
901
|
+
case "ValidationException":
|
|
902
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
903
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
904
|
+
default:
|
|
905
|
+
const parsedBody = parsedOutput.body;
|
|
906
|
+
throwDefaultError({
|
|
907
|
+
output,
|
|
908
|
+
parsedBody,
|
|
909
|
+
exceptionCtor: __BaseException,
|
|
910
|
+
errorCode,
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
export const deserializeAws_restJson1PauseCampaignCommand = async (output, context) => {
|
|
915
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
916
|
+
return deserializeAws_restJson1PauseCampaignCommandError(output, context);
|
|
917
|
+
}
|
|
918
|
+
const contents = map({
|
|
919
|
+
$metadata: deserializeMetadata(output),
|
|
1122
920
|
});
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
921
|
+
await collectBody(output.body, context);
|
|
922
|
+
return contents;
|
|
923
|
+
};
|
|
924
|
+
const deserializeAws_restJson1PauseCampaignCommandError = async (output, context) => {
|
|
925
|
+
const parsedOutput = {
|
|
926
|
+
...output,
|
|
927
|
+
body: await parseErrorBody(output.body, context),
|
|
928
|
+
};
|
|
929
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
930
|
+
switch (errorCode) {
|
|
931
|
+
case "AccessDeniedException":
|
|
932
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
933
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
934
|
+
case "ConflictException":
|
|
935
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
936
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
937
|
+
case "InternalServerException":
|
|
938
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
939
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
940
|
+
case "InvalidCampaignStateException":
|
|
941
|
+
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
942
|
+
throw await deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context);
|
|
943
|
+
case "ResourceNotFoundException":
|
|
944
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
945
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
946
|
+
case "ThrottlingException":
|
|
947
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
948
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
949
|
+
case "ValidationException":
|
|
950
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
951
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
952
|
+
default:
|
|
953
|
+
const parsedBody = parsedOutput.body;
|
|
954
|
+
throwDefaultError({
|
|
955
|
+
output,
|
|
956
|
+
parsedBody,
|
|
957
|
+
exceptionCtor: __BaseException,
|
|
958
|
+
errorCode,
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
export const deserializeAws_restJson1PutDialRequestBatchCommand = async (output, context) => {
|
|
963
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
964
|
+
return deserializeAws_restJson1PutDialRequestBatchCommandError(output, context);
|
|
965
|
+
}
|
|
966
|
+
const contents = map({
|
|
967
|
+
$metadata: deserializeMetadata(output),
|
|
1167
968
|
});
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
969
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
970
|
+
if (data.failedRequests != null) {
|
|
971
|
+
contents.failedRequests = deserializeAws_restJson1FailedRequestList(data.failedRequests, context);
|
|
972
|
+
}
|
|
973
|
+
if (data.successfulRequests != null) {
|
|
974
|
+
contents.successfulRequests = deserializeAws_restJson1SuccessfulRequestList(data.successfulRequests, context);
|
|
975
|
+
}
|
|
976
|
+
return contents;
|
|
977
|
+
};
|
|
978
|
+
const deserializeAws_restJson1PutDialRequestBatchCommandError = async (output, context) => {
|
|
979
|
+
const parsedOutput = {
|
|
980
|
+
...output,
|
|
981
|
+
body: await parseErrorBody(output.body, context),
|
|
982
|
+
};
|
|
983
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
984
|
+
switch (errorCode) {
|
|
985
|
+
case "AccessDeniedException":
|
|
986
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
987
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
988
|
+
case "ConflictException":
|
|
989
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
990
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
991
|
+
case "InternalServerException":
|
|
992
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
993
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
994
|
+
case "InvalidCampaignStateException":
|
|
995
|
+
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
996
|
+
throw await deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context);
|
|
997
|
+
case "ResourceNotFoundException":
|
|
998
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
999
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1000
|
+
case "ThrottlingException":
|
|
1001
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1002
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1003
|
+
case "ValidationException":
|
|
1004
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1005
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1006
|
+
default:
|
|
1007
|
+
const parsedBody = parsedOutput.body;
|
|
1008
|
+
throwDefaultError({
|
|
1009
|
+
output,
|
|
1010
|
+
parsedBody,
|
|
1011
|
+
exceptionCtor: __BaseException,
|
|
1012
|
+
errorCode,
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
export const deserializeAws_restJson1ResumeCampaignCommand = async (output, context) => {
|
|
1017
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1018
|
+
return deserializeAws_restJson1ResumeCampaignCommandError(output, context);
|
|
1019
|
+
}
|
|
1020
|
+
const contents = map({
|
|
1021
|
+
$metadata: deserializeMetadata(output),
|
|
1193
1022
|
});
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1023
|
+
await collectBody(output.body, context);
|
|
1024
|
+
return contents;
|
|
1025
|
+
};
|
|
1026
|
+
const deserializeAws_restJson1ResumeCampaignCommandError = async (output, context) => {
|
|
1027
|
+
const parsedOutput = {
|
|
1028
|
+
...output,
|
|
1029
|
+
body: await parseErrorBody(output.body, context),
|
|
1030
|
+
};
|
|
1031
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1032
|
+
switch (errorCode) {
|
|
1033
|
+
case "AccessDeniedException":
|
|
1034
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1035
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1036
|
+
case "ConflictException":
|
|
1037
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1038
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1039
|
+
case "InternalServerException":
|
|
1040
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1041
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1042
|
+
case "InvalidCampaignStateException":
|
|
1043
|
+
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
1044
|
+
throw await deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context);
|
|
1045
|
+
case "ResourceNotFoundException":
|
|
1046
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1047
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1048
|
+
case "ThrottlingException":
|
|
1049
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1050
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1051
|
+
case "ValidationException":
|
|
1052
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1053
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1054
|
+
default:
|
|
1055
|
+
const parsedBody = parsedOutput.body;
|
|
1056
|
+
throwDefaultError({
|
|
1057
|
+
output,
|
|
1058
|
+
parsedBody,
|
|
1059
|
+
exceptionCtor: __BaseException,
|
|
1060
|
+
errorCode,
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
export const deserializeAws_restJson1StartCampaignCommand = async (output, context) => {
|
|
1065
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1066
|
+
return deserializeAws_restJson1StartCampaignCommandError(output, context);
|
|
1067
|
+
}
|
|
1068
|
+
const contents = map({
|
|
1069
|
+
$metadata: deserializeMetadata(output),
|
|
1234
1070
|
});
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1071
|
+
await collectBody(output.body, context);
|
|
1072
|
+
return contents;
|
|
1073
|
+
};
|
|
1074
|
+
const deserializeAws_restJson1StartCampaignCommandError = async (output, context) => {
|
|
1075
|
+
const parsedOutput = {
|
|
1076
|
+
...output,
|
|
1077
|
+
body: await parseErrorBody(output.body, context),
|
|
1078
|
+
};
|
|
1079
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1080
|
+
switch (errorCode) {
|
|
1081
|
+
case "AccessDeniedException":
|
|
1082
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1083
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1084
|
+
case "ConflictException":
|
|
1085
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1086
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1087
|
+
case "InternalServerException":
|
|
1088
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1089
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1090
|
+
case "InvalidCampaignStateException":
|
|
1091
|
+
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
1092
|
+
throw await deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context);
|
|
1093
|
+
case "ResourceNotFoundException":
|
|
1094
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1095
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1096
|
+
case "ThrottlingException":
|
|
1097
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1098
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1099
|
+
case "ValidationException":
|
|
1100
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1101
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1102
|
+
default:
|
|
1103
|
+
const parsedBody = parsedOutput.body;
|
|
1104
|
+
throwDefaultError({
|
|
1105
|
+
output,
|
|
1106
|
+
parsedBody,
|
|
1107
|
+
exceptionCtor: __BaseException,
|
|
1108
|
+
errorCode,
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
export const deserializeAws_restJson1StartInstanceOnboardingJobCommand = async (output, context) => {
|
|
1113
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1114
|
+
return deserializeAws_restJson1StartInstanceOnboardingJobCommandError(output, context);
|
|
1115
|
+
}
|
|
1116
|
+
const contents = map({
|
|
1117
|
+
$metadata: deserializeMetadata(output),
|
|
1257
1118
|
});
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
return
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
}
|
|
1119
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1120
|
+
if (data.connectInstanceOnboardingJobStatus != null) {
|
|
1121
|
+
contents.connectInstanceOnboardingJobStatus = deserializeAws_restJson1InstanceOnboardingJobStatus(data.connectInstanceOnboardingJobStatus, context);
|
|
1122
|
+
}
|
|
1123
|
+
return contents;
|
|
1124
|
+
};
|
|
1125
|
+
const deserializeAws_restJson1StartInstanceOnboardingJobCommandError = async (output, context) => {
|
|
1126
|
+
const parsedOutput = {
|
|
1127
|
+
...output,
|
|
1128
|
+
body: await parseErrorBody(output.body, context),
|
|
1129
|
+
};
|
|
1130
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1131
|
+
switch (errorCode) {
|
|
1132
|
+
case "AccessDeniedException":
|
|
1133
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1134
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1135
|
+
case "ConflictException":
|
|
1136
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1137
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1138
|
+
case "InternalServerException":
|
|
1139
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1140
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1141
|
+
case "ResourceNotFoundException":
|
|
1142
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1143
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1144
|
+
case "ThrottlingException":
|
|
1145
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1146
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1147
|
+
case "ValidationException":
|
|
1148
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1149
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1150
|
+
default:
|
|
1151
|
+
const parsedBody = parsedOutput.body;
|
|
1152
|
+
throwDefaultError({
|
|
1153
|
+
output,
|
|
1154
|
+
parsedBody,
|
|
1155
|
+
exceptionCtor: __BaseException,
|
|
1156
|
+
errorCode,
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
};
|
|
1160
|
+
export const deserializeAws_restJson1StopCampaignCommand = async (output, context) => {
|
|
1161
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1162
|
+
return deserializeAws_restJson1StopCampaignCommandError(output, context);
|
|
1163
|
+
}
|
|
1164
|
+
const contents = map({
|
|
1165
|
+
$metadata: deserializeMetadata(output),
|
|
1306
1166
|
});
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1167
|
+
await collectBody(output.body, context);
|
|
1168
|
+
return contents;
|
|
1169
|
+
};
|
|
1170
|
+
const deserializeAws_restJson1StopCampaignCommandError = async (output, context) => {
|
|
1171
|
+
const parsedOutput = {
|
|
1172
|
+
...output,
|
|
1173
|
+
body: await parseErrorBody(output.body, context),
|
|
1174
|
+
};
|
|
1175
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1176
|
+
switch (errorCode) {
|
|
1177
|
+
case "AccessDeniedException":
|
|
1178
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1179
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1180
|
+
case "ConflictException":
|
|
1181
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1182
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1183
|
+
case "InternalServerException":
|
|
1184
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1185
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1186
|
+
case "InvalidCampaignStateException":
|
|
1187
|
+
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
1188
|
+
throw await deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context);
|
|
1189
|
+
case "ResourceNotFoundException":
|
|
1190
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1191
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1192
|
+
case "ThrottlingException":
|
|
1193
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1194
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1195
|
+
case "ValidationException":
|
|
1196
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1197
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1198
|
+
default:
|
|
1199
|
+
const parsedBody = parsedOutput.body;
|
|
1200
|
+
throwDefaultError({
|
|
1201
|
+
output,
|
|
1202
|
+
parsedBody,
|
|
1203
|
+
exceptionCtor: __BaseException,
|
|
1204
|
+
errorCode,
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1209
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1210
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1211
|
+
}
|
|
1212
|
+
const contents = map({
|
|
1213
|
+
$metadata: deserializeMetadata(output),
|
|
1324
1214
|
});
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1367
|
-
case 13: throw _d.sent();
|
|
1368
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1369
|
-
case 15: throw _d.sent();
|
|
1370
|
-
case 16:
|
|
1371
|
-
parsedBody = parsedOutput.body;
|
|
1372
|
-
throwDefaultError({
|
|
1373
|
-
output: output,
|
|
1374
|
-
parsedBody: parsedBody,
|
|
1375
|
-
exceptionCtor: __BaseException,
|
|
1376
|
-
errorCode: errorCode,
|
|
1377
|
-
});
|
|
1378
|
-
_d.label = 17;
|
|
1379
|
-
case 17: return [2];
|
|
1380
|
-
}
|
|
1215
|
+
await collectBody(output.body, context);
|
|
1216
|
+
return contents;
|
|
1217
|
+
};
|
|
1218
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1219
|
+
const parsedOutput = {
|
|
1220
|
+
...output,
|
|
1221
|
+
body: await parseErrorBody(output.body, context),
|
|
1222
|
+
};
|
|
1223
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1224
|
+
switch (errorCode) {
|
|
1225
|
+
case "AccessDeniedException":
|
|
1226
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1227
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1228
|
+
case "InternalServerException":
|
|
1229
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1230
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1231
|
+
case "ResourceNotFoundException":
|
|
1232
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1233
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1234
|
+
case "ThrottlingException":
|
|
1235
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1236
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1237
|
+
case "ValidationException":
|
|
1238
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1239
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1240
|
+
default:
|
|
1241
|
+
const parsedBody = parsedOutput.body;
|
|
1242
|
+
throwDefaultError({
|
|
1243
|
+
output,
|
|
1244
|
+
parsedBody,
|
|
1245
|
+
exceptionCtor: __BaseException,
|
|
1246
|
+
errorCode,
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
1250
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1251
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1252
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1253
|
+
}
|
|
1254
|
+
const contents = map({
|
|
1255
|
+
$metadata: deserializeMetadata(output),
|
|
1381
1256
|
});
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1257
|
+
await collectBody(output.body, context);
|
|
1258
|
+
return contents;
|
|
1259
|
+
};
|
|
1260
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1261
|
+
const parsedOutput = {
|
|
1262
|
+
...output,
|
|
1263
|
+
body: await parseErrorBody(output.body, context),
|
|
1264
|
+
};
|
|
1265
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1266
|
+
switch (errorCode) {
|
|
1267
|
+
case "AccessDeniedException":
|
|
1268
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1269
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1270
|
+
case "InternalServerException":
|
|
1271
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1272
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1273
|
+
case "ResourceNotFoundException":
|
|
1274
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1275
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1276
|
+
case "ThrottlingException":
|
|
1277
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1278
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1279
|
+
case "ValidationException":
|
|
1280
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1281
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1282
|
+
default:
|
|
1283
|
+
const parsedBody = parsedOutput.body;
|
|
1284
|
+
throwDefaultError({
|
|
1285
|
+
output,
|
|
1286
|
+
parsedBody,
|
|
1287
|
+
exceptionCtor: __BaseException,
|
|
1288
|
+
errorCode,
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
export const deserializeAws_restJson1UpdateCampaignDialerConfigCommand = async (output, context) => {
|
|
1293
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1294
|
+
return deserializeAws_restJson1UpdateCampaignDialerConfigCommandError(output, context);
|
|
1295
|
+
}
|
|
1296
|
+
const contents = map({
|
|
1297
|
+
$metadata: deserializeMetadata(output),
|
|
1407
1298
|
});
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1450
|
-
case 13: throw _d.sent();
|
|
1451
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1452
|
-
case 15: throw _d.sent();
|
|
1453
|
-
case 16:
|
|
1454
|
-
parsedBody = parsedOutput.body;
|
|
1455
|
-
throwDefaultError({
|
|
1456
|
-
output: output,
|
|
1457
|
-
parsedBody: parsedBody,
|
|
1458
|
-
exceptionCtor: __BaseException,
|
|
1459
|
-
errorCode: errorCode,
|
|
1460
|
-
});
|
|
1461
|
-
_d.label = 17;
|
|
1462
|
-
case 17: return [2];
|
|
1463
|
-
}
|
|
1299
|
+
await collectBody(output.body, context);
|
|
1300
|
+
return contents;
|
|
1301
|
+
};
|
|
1302
|
+
const deserializeAws_restJson1UpdateCampaignDialerConfigCommandError = async (output, context) => {
|
|
1303
|
+
const parsedOutput = {
|
|
1304
|
+
...output,
|
|
1305
|
+
body: await parseErrorBody(output.body, context),
|
|
1306
|
+
};
|
|
1307
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1308
|
+
switch (errorCode) {
|
|
1309
|
+
case "AccessDeniedException":
|
|
1310
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1311
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1312
|
+
case "ConflictException":
|
|
1313
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1314
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1315
|
+
case "InternalServerException":
|
|
1316
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1317
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1318
|
+
case "ResourceNotFoundException":
|
|
1319
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1320
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1321
|
+
case "ValidationException":
|
|
1322
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1323
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1324
|
+
default:
|
|
1325
|
+
const parsedBody = parsedOutput.body;
|
|
1326
|
+
throwDefaultError({
|
|
1327
|
+
output,
|
|
1328
|
+
parsedBody,
|
|
1329
|
+
exceptionCtor: __BaseException,
|
|
1330
|
+
errorCode,
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
export const deserializeAws_restJson1UpdateCampaignNameCommand = async (output, context) => {
|
|
1335
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1336
|
+
return deserializeAws_restJson1UpdateCampaignNameCommandError(output, context);
|
|
1337
|
+
}
|
|
1338
|
+
const contents = map({
|
|
1339
|
+
$metadata: deserializeMetadata(output),
|
|
1464
1340
|
});
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1341
|
+
await collectBody(output.body, context);
|
|
1342
|
+
return contents;
|
|
1343
|
+
};
|
|
1344
|
+
const deserializeAws_restJson1UpdateCampaignNameCommandError = async (output, context) => {
|
|
1345
|
+
const parsedOutput = {
|
|
1346
|
+
...output,
|
|
1347
|
+
body: await parseErrorBody(output.body, context),
|
|
1348
|
+
};
|
|
1349
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1350
|
+
switch (errorCode) {
|
|
1351
|
+
case "AccessDeniedException":
|
|
1352
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1353
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1354
|
+
case "ConflictException":
|
|
1355
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1356
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1357
|
+
case "InternalServerException":
|
|
1358
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1359
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1360
|
+
case "ResourceNotFoundException":
|
|
1361
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1362
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1363
|
+
case "ValidationException":
|
|
1364
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1365
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1366
|
+
default:
|
|
1367
|
+
const parsedBody = parsedOutput.body;
|
|
1368
|
+
throwDefaultError({
|
|
1369
|
+
output,
|
|
1370
|
+
parsedBody,
|
|
1371
|
+
exceptionCtor: __BaseException,
|
|
1372
|
+
errorCode,
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
export const deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = async (output, context) => {
|
|
1377
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1378
|
+
return deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError(output, context);
|
|
1379
|
+
}
|
|
1380
|
+
const contents = map({
|
|
1381
|
+
$metadata: deserializeMetadata(output),
|
|
1482
1382
|
});
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
exceptionCtor: __BaseException,
|
|
1534
|
-
errorCode: errorCode,
|
|
1535
|
-
});
|
|
1536
|
-
_d.label = 17;
|
|
1537
|
-
case 17: return [2];
|
|
1538
|
-
}
|
|
1383
|
+
await collectBody(output.body, context);
|
|
1384
|
+
return contents;
|
|
1385
|
+
};
|
|
1386
|
+
const deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError = async (output, context) => {
|
|
1387
|
+
const parsedOutput = {
|
|
1388
|
+
...output,
|
|
1389
|
+
body: await parseErrorBody(output.body, context),
|
|
1390
|
+
};
|
|
1391
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1392
|
+
switch (errorCode) {
|
|
1393
|
+
case "AccessDeniedException":
|
|
1394
|
+
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1395
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1396
|
+
case "ConflictException":
|
|
1397
|
+
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1398
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1399
|
+
case "InternalServerException":
|
|
1400
|
+
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1401
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1402
|
+
case "ResourceNotFoundException":
|
|
1403
|
+
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1404
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1405
|
+
case "ThrottlingException":
|
|
1406
|
+
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1407
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1408
|
+
case "ValidationException":
|
|
1409
|
+
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1410
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1411
|
+
default:
|
|
1412
|
+
const parsedBody = parsedOutput.body;
|
|
1413
|
+
throwDefaultError({
|
|
1414
|
+
output,
|
|
1415
|
+
parsedBody,
|
|
1416
|
+
exceptionCtor: __BaseException,
|
|
1417
|
+
errorCode,
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
const map = __map;
|
|
1422
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1423
|
+
const contents = map({
|
|
1424
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1425
|
+
});
|
|
1426
|
+
const data = parsedOutput.body;
|
|
1427
|
+
if (data.message != null) {
|
|
1428
|
+
contents.message = __expectString(data.message);
|
|
1429
|
+
}
|
|
1430
|
+
const exception = new AccessDeniedException({
|
|
1431
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1432
|
+
...contents,
|
|
1539
1433
|
});
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
case 0:
|
|
1546
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1547
|
-
return [2, deserializeAws_restJson1StartCampaignCommandError(output, context)];
|
|
1548
|
-
}
|
|
1549
|
-
contents = map({
|
|
1550
|
-
$metadata: deserializeMetadata(output),
|
|
1551
|
-
});
|
|
1552
|
-
return [4, collectBody(output.body, context)];
|
|
1553
|
-
case 1:
|
|
1554
|
-
_a.sent();
|
|
1555
|
-
return [2, contents];
|
|
1556
|
-
}
|
|
1434
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1435
|
+
};
|
|
1436
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1437
|
+
const contents = map({
|
|
1438
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1557
1439
|
});
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
_a = [__assign({}, output)];
|
|
1566
|
-
_c = {};
|
|
1567
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1568
|
-
case 1:
|
|
1569
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1570
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1571
|
-
_b = errorCode;
|
|
1572
|
-
switch (_b) {
|
|
1573
|
-
case "AccessDeniedException": return [3, 2];
|
|
1574
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
1575
|
-
case "ConflictException": return [3, 4];
|
|
1576
|
-
case "com.amazonaws.connectcampaigns#ConflictException": return [3, 4];
|
|
1577
|
-
case "InternalServerException": return [3, 6];
|
|
1578
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
1579
|
-
case "InvalidCampaignStateException": return [3, 8];
|
|
1580
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException": return [3, 8];
|
|
1581
|
-
case "ResourceNotFoundException": return [3, 10];
|
|
1582
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 10];
|
|
1583
|
-
case "ThrottlingException": return [3, 12];
|
|
1584
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 12];
|
|
1585
|
-
case "ValidationException": return [3, 14];
|
|
1586
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 14];
|
|
1587
|
-
}
|
|
1588
|
-
return [3, 16];
|
|
1589
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1590
|
-
case 3: throw _d.sent();
|
|
1591
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1592
|
-
case 5: throw _d.sent();
|
|
1593
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1594
|
-
case 7: throw _d.sent();
|
|
1595
|
-
case 8: return [4, deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context)];
|
|
1596
|
-
case 9: throw _d.sent();
|
|
1597
|
-
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1598
|
-
case 11: throw _d.sent();
|
|
1599
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1600
|
-
case 13: throw _d.sent();
|
|
1601
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1602
|
-
case 15: throw _d.sent();
|
|
1603
|
-
case 16:
|
|
1604
|
-
parsedBody = parsedOutput.body;
|
|
1605
|
-
throwDefaultError({
|
|
1606
|
-
output: output,
|
|
1607
|
-
parsedBody: parsedBody,
|
|
1608
|
-
exceptionCtor: __BaseException,
|
|
1609
|
-
errorCode: errorCode,
|
|
1610
|
-
});
|
|
1611
|
-
_d.label = 17;
|
|
1612
|
-
case 17: return [2];
|
|
1613
|
-
}
|
|
1440
|
+
const data = parsedOutput.body;
|
|
1441
|
+
if (data.message != null) {
|
|
1442
|
+
contents.message = __expectString(data.message);
|
|
1443
|
+
}
|
|
1444
|
+
const exception = new ConflictException({
|
|
1445
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1446
|
+
...contents,
|
|
1614
1447
|
});
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
case 0:
|
|
1621
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1622
|
-
return [2, deserializeAws_restJson1StartInstanceOnboardingJobCommandError(output, context)];
|
|
1623
|
-
}
|
|
1624
|
-
contents = map({
|
|
1625
|
-
$metadata: deserializeMetadata(output),
|
|
1626
|
-
});
|
|
1627
|
-
_a = __expectNonNull;
|
|
1628
|
-
_b = __expectObject;
|
|
1629
|
-
return [4, parseBody(output.body, context)];
|
|
1630
|
-
case 1:
|
|
1631
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1632
|
-
if (data.connectInstanceOnboardingJobStatus != null) {
|
|
1633
|
-
contents.connectInstanceOnboardingJobStatus = deserializeAws_restJson1InstanceOnboardingJobStatus(data.connectInstanceOnboardingJobStatus, context);
|
|
1634
|
-
}
|
|
1635
|
-
return [2, contents];
|
|
1636
|
-
}
|
|
1448
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1449
|
+
};
|
|
1450
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1451
|
+
const contents = map({
|
|
1452
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1637
1453
|
});
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
_a = [__assign({}, output)];
|
|
1646
|
-
_c = {};
|
|
1647
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1648
|
-
case 1:
|
|
1649
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1650
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1651
|
-
_b = errorCode;
|
|
1652
|
-
switch (_b) {
|
|
1653
|
-
case "AccessDeniedException": return [3, 2];
|
|
1654
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
1655
|
-
case "ConflictException": return [3, 4];
|
|
1656
|
-
case "com.amazonaws.connectcampaigns#ConflictException": return [3, 4];
|
|
1657
|
-
case "InternalServerException": return [3, 6];
|
|
1658
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
1659
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
1660
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 8];
|
|
1661
|
-
case "ThrottlingException": return [3, 10];
|
|
1662
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 10];
|
|
1663
|
-
case "ValidationException": return [3, 12];
|
|
1664
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 12];
|
|
1665
|
-
}
|
|
1666
|
-
return [3, 14];
|
|
1667
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1668
|
-
case 3: throw _d.sent();
|
|
1669
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1670
|
-
case 5: throw _d.sent();
|
|
1671
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1672
|
-
case 7: throw _d.sent();
|
|
1673
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1674
|
-
case 9: throw _d.sent();
|
|
1675
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1676
|
-
case 11: throw _d.sent();
|
|
1677
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1678
|
-
case 13: throw _d.sent();
|
|
1679
|
-
case 14:
|
|
1680
|
-
parsedBody = parsedOutput.body;
|
|
1681
|
-
throwDefaultError({
|
|
1682
|
-
output: output,
|
|
1683
|
-
parsedBody: parsedBody,
|
|
1684
|
-
exceptionCtor: __BaseException,
|
|
1685
|
-
errorCode: errorCode,
|
|
1686
|
-
});
|
|
1687
|
-
_d.label = 15;
|
|
1688
|
-
case 15: return [2];
|
|
1689
|
-
}
|
|
1454
|
+
const data = parsedOutput.body;
|
|
1455
|
+
if (data.message != null) {
|
|
1456
|
+
contents.message = __expectString(data.message);
|
|
1457
|
+
}
|
|
1458
|
+
const exception = new InternalServerException({
|
|
1459
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1460
|
+
...contents,
|
|
1690
1461
|
});
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
case 0:
|
|
1697
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1698
|
-
return [2, deserializeAws_restJson1StopCampaignCommandError(output, context)];
|
|
1699
|
-
}
|
|
1700
|
-
contents = map({
|
|
1701
|
-
$metadata: deserializeMetadata(output),
|
|
1702
|
-
});
|
|
1703
|
-
return [4, collectBody(output.body, context)];
|
|
1704
|
-
case 1:
|
|
1705
|
-
_a.sent();
|
|
1706
|
-
return [2, contents];
|
|
1707
|
-
}
|
|
1462
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1463
|
+
};
|
|
1464
|
+
const deserializeAws_restJson1InvalidCampaignStateExceptionResponse = async (parsedOutput, context) => {
|
|
1465
|
+
const contents = map({
|
|
1466
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1708
1467
|
});
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
case 1:
|
|
1720
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1721
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1722
|
-
_b = errorCode;
|
|
1723
|
-
switch (_b) {
|
|
1724
|
-
case "AccessDeniedException": return [3, 2];
|
|
1725
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
1726
|
-
case "ConflictException": return [3, 4];
|
|
1727
|
-
case "com.amazonaws.connectcampaigns#ConflictException": return [3, 4];
|
|
1728
|
-
case "InternalServerException": return [3, 6];
|
|
1729
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
1730
|
-
case "InvalidCampaignStateException": return [3, 8];
|
|
1731
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException": return [3, 8];
|
|
1732
|
-
case "ResourceNotFoundException": return [3, 10];
|
|
1733
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 10];
|
|
1734
|
-
case "ThrottlingException": return [3, 12];
|
|
1735
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 12];
|
|
1736
|
-
case "ValidationException": return [3, 14];
|
|
1737
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 14];
|
|
1738
|
-
}
|
|
1739
|
-
return [3, 16];
|
|
1740
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1741
|
-
case 3: throw _d.sent();
|
|
1742
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1743
|
-
case 5: throw _d.sent();
|
|
1744
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1745
|
-
case 7: throw _d.sent();
|
|
1746
|
-
case 8: return [4, deserializeAws_restJson1InvalidCampaignStateExceptionResponse(parsedOutput, context)];
|
|
1747
|
-
case 9: throw _d.sent();
|
|
1748
|
-
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1749
|
-
case 11: throw _d.sent();
|
|
1750
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1751
|
-
case 13: throw _d.sent();
|
|
1752
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1753
|
-
case 15: throw _d.sent();
|
|
1754
|
-
case 16:
|
|
1755
|
-
parsedBody = parsedOutput.body;
|
|
1756
|
-
throwDefaultError({
|
|
1757
|
-
output: output,
|
|
1758
|
-
parsedBody: parsedBody,
|
|
1759
|
-
exceptionCtor: __BaseException,
|
|
1760
|
-
errorCode: errorCode,
|
|
1761
|
-
});
|
|
1762
|
-
_d.label = 17;
|
|
1763
|
-
case 17: return [2];
|
|
1764
|
-
}
|
|
1468
|
+
const data = parsedOutput.body;
|
|
1469
|
+
if (data.message != null) {
|
|
1470
|
+
contents.message = __expectString(data.message);
|
|
1471
|
+
}
|
|
1472
|
+
if (data.state != null) {
|
|
1473
|
+
contents.state = __expectString(data.state);
|
|
1474
|
+
}
|
|
1475
|
+
const exception = new InvalidCampaignStateException({
|
|
1476
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1477
|
+
...contents,
|
|
1765
1478
|
});
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
case 0:
|
|
1772
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1773
|
-
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
1774
|
-
}
|
|
1775
|
-
contents = map({
|
|
1776
|
-
$metadata: deserializeMetadata(output),
|
|
1777
|
-
});
|
|
1778
|
-
return [4, collectBody(output.body, context)];
|
|
1779
|
-
case 1:
|
|
1780
|
-
_a.sent();
|
|
1781
|
-
return [2, contents];
|
|
1782
|
-
}
|
|
1479
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1480
|
+
};
|
|
1481
|
+
const deserializeAws_restJson1InvalidStateExceptionResponse = async (parsedOutput, context) => {
|
|
1482
|
+
const contents = map({
|
|
1483
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1783
1484
|
});
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
_a = [__assign({}, output)];
|
|
1792
|
-
_c = {};
|
|
1793
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1794
|
-
case 1:
|
|
1795
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1796
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1797
|
-
_b = errorCode;
|
|
1798
|
-
switch (_b) {
|
|
1799
|
-
case "AccessDeniedException": return [3, 2];
|
|
1800
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
1801
|
-
case "InternalServerException": return [3, 4];
|
|
1802
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 4];
|
|
1803
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
1804
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 6];
|
|
1805
|
-
case "ThrottlingException": return [3, 8];
|
|
1806
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 8];
|
|
1807
|
-
case "ValidationException": return [3, 10];
|
|
1808
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 10];
|
|
1809
|
-
}
|
|
1810
|
-
return [3, 12];
|
|
1811
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1812
|
-
case 3: throw _d.sent();
|
|
1813
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1814
|
-
case 5: throw _d.sent();
|
|
1815
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1816
|
-
case 7: throw _d.sent();
|
|
1817
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1818
|
-
case 9: throw _d.sent();
|
|
1819
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1820
|
-
case 11: throw _d.sent();
|
|
1821
|
-
case 12:
|
|
1822
|
-
parsedBody = parsedOutput.body;
|
|
1823
|
-
throwDefaultError({
|
|
1824
|
-
output: output,
|
|
1825
|
-
parsedBody: parsedBody,
|
|
1826
|
-
exceptionCtor: __BaseException,
|
|
1827
|
-
errorCode: errorCode,
|
|
1828
|
-
});
|
|
1829
|
-
_d.label = 13;
|
|
1830
|
-
case 13: return [2];
|
|
1831
|
-
}
|
|
1485
|
+
const data = parsedOutput.body;
|
|
1486
|
+
if (data.message != null) {
|
|
1487
|
+
contents.message = __expectString(data.message);
|
|
1488
|
+
}
|
|
1489
|
+
const exception = new InvalidStateException({
|
|
1490
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1491
|
+
...contents,
|
|
1832
1492
|
});
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
case 0:
|
|
1839
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1840
|
-
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
1841
|
-
}
|
|
1842
|
-
contents = map({
|
|
1843
|
-
$metadata: deserializeMetadata(output),
|
|
1844
|
-
});
|
|
1845
|
-
return [4, collectBody(output.body, context)];
|
|
1846
|
-
case 1:
|
|
1847
|
-
_a.sent();
|
|
1848
|
-
return [2, contents];
|
|
1849
|
-
}
|
|
1493
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1494
|
+
};
|
|
1495
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1496
|
+
const contents = map({
|
|
1497
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1850
1498
|
});
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
_a = [__assign({}, output)];
|
|
1859
|
-
_c = {};
|
|
1860
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1861
|
-
case 1:
|
|
1862
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1863
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1864
|
-
_b = errorCode;
|
|
1865
|
-
switch (_b) {
|
|
1866
|
-
case "AccessDeniedException": return [3, 2];
|
|
1867
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
1868
|
-
case "InternalServerException": return [3, 4];
|
|
1869
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 4];
|
|
1870
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
1871
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 6];
|
|
1872
|
-
case "ThrottlingException": return [3, 8];
|
|
1873
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 8];
|
|
1874
|
-
case "ValidationException": return [3, 10];
|
|
1875
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 10];
|
|
1876
|
-
}
|
|
1877
|
-
return [3, 12];
|
|
1878
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1879
|
-
case 3: throw _d.sent();
|
|
1880
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1881
|
-
case 5: throw _d.sent();
|
|
1882
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1883
|
-
case 7: throw _d.sent();
|
|
1884
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1885
|
-
case 9: throw _d.sent();
|
|
1886
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1887
|
-
case 11: throw _d.sent();
|
|
1888
|
-
case 12:
|
|
1889
|
-
parsedBody = parsedOutput.body;
|
|
1890
|
-
throwDefaultError({
|
|
1891
|
-
output: output,
|
|
1892
|
-
parsedBody: parsedBody,
|
|
1893
|
-
exceptionCtor: __BaseException,
|
|
1894
|
-
errorCode: errorCode,
|
|
1895
|
-
});
|
|
1896
|
-
_d.label = 13;
|
|
1897
|
-
case 13: return [2];
|
|
1898
|
-
}
|
|
1499
|
+
const data = parsedOutput.body;
|
|
1500
|
+
if (data.message != null) {
|
|
1501
|
+
contents.message = __expectString(data.message);
|
|
1502
|
+
}
|
|
1503
|
+
const exception = new ResourceNotFoundException({
|
|
1504
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1505
|
+
...contents,
|
|
1899
1506
|
});
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
case 0:
|
|
1906
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1907
|
-
return [2, deserializeAws_restJson1UpdateCampaignDialerConfigCommandError(output, context)];
|
|
1908
|
-
}
|
|
1909
|
-
contents = map({
|
|
1910
|
-
$metadata: deserializeMetadata(output),
|
|
1911
|
-
});
|
|
1912
|
-
return [4, collectBody(output.body, context)];
|
|
1913
|
-
case 1:
|
|
1914
|
-
_a.sent();
|
|
1915
|
-
return [2, contents];
|
|
1916
|
-
}
|
|
1507
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1508
|
+
};
|
|
1509
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1510
|
+
const contents = map({
|
|
1511
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1917
1512
|
});
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
_a = [__assign({}, output)];
|
|
1926
|
-
_c = {};
|
|
1927
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1928
|
-
case 1:
|
|
1929
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1930
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1931
|
-
_b = errorCode;
|
|
1932
|
-
switch (_b) {
|
|
1933
|
-
case "AccessDeniedException": return [3, 2];
|
|
1934
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
1935
|
-
case "ConflictException": return [3, 4];
|
|
1936
|
-
case "com.amazonaws.connectcampaigns#ConflictException": return [3, 4];
|
|
1937
|
-
case "InternalServerException": return [3, 6];
|
|
1938
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
1939
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
1940
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 8];
|
|
1941
|
-
case "ValidationException": return [3, 10];
|
|
1942
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 10];
|
|
1943
|
-
}
|
|
1944
|
-
return [3, 12];
|
|
1945
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1946
|
-
case 3: throw _d.sent();
|
|
1947
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1948
|
-
case 5: throw _d.sent();
|
|
1949
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1950
|
-
case 7: throw _d.sent();
|
|
1951
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1952
|
-
case 9: throw _d.sent();
|
|
1953
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1954
|
-
case 11: throw _d.sent();
|
|
1955
|
-
case 12:
|
|
1956
|
-
parsedBody = parsedOutput.body;
|
|
1957
|
-
throwDefaultError({
|
|
1958
|
-
output: output,
|
|
1959
|
-
parsedBody: parsedBody,
|
|
1960
|
-
exceptionCtor: __BaseException,
|
|
1961
|
-
errorCode: errorCode,
|
|
1962
|
-
});
|
|
1963
|
-
_d.label = 13;
|
|
1964
|
-
case 13: return [2];
|
|
1965
|
-
}
|
|
1513
|
+
const data = parsedOutput.body;
|
|
1514
|
+
if (data.message != null) {
|
|
1515
|
+
contents.message = __expectString(data.message);
|
|
1516
|
+
}
|
|
1517
|
+
const exception = new ServiceQuotaExceededException({
|
|
1518
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1519
|
+
...contents,
|
|
1966
1520
|
});
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
case 0:
|
|
1973
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1974
|
-
return [2, deserializeAws_restJson1UpdateCampaignNameCommandError(output, context)];
|
|
1975
|
-
}
|
|
1976
|
-
contents = map({
|
|
1977
|
-
$metadata: deserializeMetadata(output),
|
|
1978
|
-
});
|
|
1979
|
-
return [4, collectBody(output.body, context)];
|
|
1980
|
-
case 1:
|
|
1981
|
-
_a.sent();
|
|
1982
|
-
return [2, contents];
|
|
1983
|
-
}
|
|
1521
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1522
|
+
};
|
|
1523
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1524
|
+
const contents = map({
|
|
1525
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1984
1526
|
});
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
_a = [__assign({}, output)];
|
|
1993
|
-
_c = {};
|
|
1994
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1995
|
-
case 1:
|
|
1996
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1997
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1998
|
-
_b = errorCode;
|
|
1999
|
-
switch (_b) {
|
|
2000
|
-
case "AccessDeniedException": return [3, 2];
|
|
2001
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
2002
|
-
case "ConflictException": return [3, 4];
|
|
2003
|
-
case "com.amazonaws.connectcampaigns#ConflictException": return [3, 4];
|
|
2004
|
-
case "InternalServerException": return [3, 6];
|
|
2005
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
2006
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
2007
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 8];
|
|
2008
|
-
case "ValidationException": return [3, 10];
|
|
2009
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 10];
|
|
2010
|
-
}
|
|
2011
|
-
return [3, 12];
|
|
2012
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2013
|
-
case 3: throw _d.sent();
|
|
2014
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2015
|
-
case 5: throw _d.sent();
|
|
2016
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2017
|
-
case 7: throw _d.sent();
|
|
2018
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2019
|
-
case 9: throw _d.sent();
|
|
2020
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2021
|
-
case 11: throw _d.sent();
|
|
2022
|
-
case 12:
|
|
2023
|
-
parsedBody = parsedOutput.body;
|
|
2024
|
-
throwDefaultError({
|
|
2025
|
-
output: output,
|
|
2026
|
-
parsedBody: parsedBody,
|
|
2027
|
-
exceptionCtor: __BaseException,
|
|
2028
|
-
errorCode: errorCode,
|
|
2029
|
-
});
|
|
2030
|
-
_d.label = 13;
|
|
2031
|
-
case 13: return [2];
|
|
2032
|
-
}
|
|
1527
|
+
const data = parsedOutput.body;
|
|
1528
|
+
if (data.message != null) {
|
|
1529
|
+
contents.message = __expectString(data.message);
|
|
1530
|
+
}
|
|
1531
|
+
const exception = new ThrottlingException({
|
|
1532
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1533
|
+
...contents,
|
|
2033
1534
|
});
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
case 0:
|
|
2040
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2041
|
-
return [2, deserializeAws_restJson1UpdateCampaignOutboundCallConfigCommandError(output, context)];
|
|
2042
|
-
}
|
|
2043
|
-
contents = map({
|
|
2044
|
-
$metadata: deserializeMetadata(output),
|
|
2045
|
-
});
|
|
2046
|
-
return [4, collectBody(output.body, context)];
|
|
2047
|
-
case 1:
|
|
2048
|
-
_a.sent();
|
|
2049
|
-
return [2, contents];
|
|
2050
|
-
}
|
|
1535
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1536
|
+
};
|
|
1537
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1538
|
+
const contents = map({
|
|
1539
|
+
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2051
1540
|
});
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
_a = [__assign({}, output)];
|
|
2060
|
-
_c = {};
|
|
2061
|
-
return [4, parseErrorBody(output.body, context)];
|
|
2062
|
-
case 1:
|
|
2063
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2064
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2065
|
-
_b = errorCode;
|
|
2066
|
-
switch (_b) {
|
|
2067
|
-
case "AccessDeniedException": return [3, 2];
|
|
2068
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException": return [3, 2];
|
|
2069
|
-
case "ConflictException": return [3, 4];
|
|
2070
|
-
case "com.amazonaws.connectcampaigns#ConflictException": return [3, 4];
|
|
2071
|
-
case "InternalServerException": return [3, 6];
|
|
2072
|
-
case "com.amazonaws.connectcampaigns#InternalServerException": return [3, 6];
|
|
2073
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
2074
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException": return [3, 8];
|
|
2075
|
-
case "ThrottlingException": return [3, 10];
|
|
2076
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException": return [3, 10];
|
|
2077
|
-
case "ValidationException": return [3, 12];
|
|
2078
|
-
case "com.amazonaws.connectcampaigns#ValidationException": return [3, 12];
|
|
2079
|
-
}
|
|
2080
|
-
return [3, 14];
|
|
2081
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2082
|
-
case 3: throw _d.sent();
|
|
2083
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2084
|
-
case 5: throw _d.sent();
|
|
2085
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2086
|
-
case 7: throw _d.sent();
|
|
2087
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2088
|
-
case 9: throw _d.sent();
|
|
2089
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2090
|
-
case 11: throw _d.sent();
|
|
2091
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2092
|
-
case 13: throw _d.sent();
|
|
2093
|
-
case 14:
|
|
2094
|
-
parsedBody = parsedOutput.body;
|
|
2095
|
-
throwDefaultError({
|
|
2096
|
-
output: output,
|
|
2097
|
-
parsedBody: parsedBody,
|
|
2098
|
-
exceptionCtor: __BaseException,
|
|
2099
|
-
errorCode: errorCode,
|
|
2100
|
-
});
|
|
2101
|
-
_d.label = 15;
|
|
2102
|
-
case 15: return [2];
|
|
2103
|
-
}
|
|
1541
|
+
const data = parsedOutput.body;
|
|
1542
|
+
if (data.message != null) {
|
|
1543
|
+
contents.message = __expectString(data.message);
|
|
1544
|
+
}
|
|
1545
|
+
const exception = new ValidationException({
|
|
1546
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1547
|
+
...contents,
|
|
2104
1548
|
});
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
}
|
|
2117
|
-
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2118
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2119
|
-
});
|
|
2120
|
-
}); };
|
|
2121
|
-
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2122
|
-
var contents, data, exception;
|
|
2123
|
-
return __generator(this, function (_a) {
|
|
2124
|
-
contents = map({
|
|
2125
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2126
|
-
});
|
|
2127
|
-
data = parsedOutput.body;
|
|
2128
|
-
if (data.message != null) {
|
|
2129
|
-
contents.message = __expectString(data.message);
|
|
2130
|
-
}
|
|
2131
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2132
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2133
|
-
});
|
|
2134
|
-
}); };
|
|
2135
|
-
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2136
|
-
var contents, data, exception;
|
|
2137
|
-
return __generator(this, function (_a) {
|
|
2138
|
-
contents = map({
|
|
2139
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2140
|
-
});
|
|
2141
|
-
data = parsedOutput.body;
|
|
2142
|
-
if (data.message != null) {
|
|
2143
|
-
contents.message = __expectString(data.message);
|
|
2144
|
-
}
|
|
2145
|
-
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2146
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2147
|
-
});
|
|
2148
|
-
}); };
|
|
2149
|
-
var deserializeAws_restJson1InvalidCampaignStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2150
|
-
var contents, data, exception;
|
|
2151
|
-
return __generator(this, function (_a) {
|
|
2152
|
-
contents = map({
|
|
2153
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2154
|
-
});
|
|
2155
|
-
data = parsedOutput.body;
|
|
2156
|
-
if (data.message != null) {
|
|
2157
|
-
contents.message = __expectString(data.message);
|
|
2158
|
-
}
|
|
2159
|
-
if (data.state != null) {
|
|
2160
|
-
contents.state = __expectString(data.state);
|
|
2161
|
-
}
|
|
2162
|
-
exception = new InvalidCampaignStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2163
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2164
|
-
});
|
|
2165
|
-
}); };
|
|
2166
|
-
var deserializeAws_restJson1InvalidStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2167
|
-
var contents, data, exception;
|
|
2168
|
-
return __generator(this, function (_a) {
|
|
2169
|
-
contents = map({
|
|
2170
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2171
|
-
});
|
|
2172
|
-
data = parsedOutput.body;
|
|
2173
|
-
if (data.message != null) {
|
|
2174
|
-
contents.message = __expectString(data.message);
|
|
2175
|
-
}
|
|
2176
|
-
exception = new InvalidStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2177
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2178
|
-
});
|
|
2179
|
-
}); };
|
|
2180
|
-
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2181
|
-
var contents, data, exception;
|
|
2182
|
-
return __generator(this, function (_a) {
|
|
2183
|
-
contents = map({
|
|
2184
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2185
|
-
});
|
|
2186
|
-
data = parsedOutput.body;
|
|
2187
|
-
if (data.message != null) {
|
|
2188
|
-
contents.message = __expectString(data.message);
|
|
2189
|
-
}
|
|
2190
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2191
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2192
|
-
});
|
|
2193
|
-
}); };
|
|
2194
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2195
|
-
var contents, data, exception;
|
|
2196
|
-
return __generator(this, function (_a) {
|
|
2197
|
-
contents = map({
|
|
2198
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2199
|
-
});
|
|
2200
|
-
data = parsedOutput.body;
|
|
2201
|
-
if (data.message != null) {
|
|
2202
|
-
contents.message = __expectString(data.message);
|
|
2203
|
-
}
|
|
2204
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2205
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2206
|
-
});
|
|
2207
|
-
}); };
|
|
2208
|
-
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2209
|
-
var contents, data, exception;
|
|
2210
|
-
return __generator(this, function (_a) {
|
|
2211
|
-
contents = map({
|
|
2212
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2213
|
-
});
|
|
2214
|
-
data = parsedOutput.body;
|
|
2215
|
-
if (data.message != null) {
|
|
2216
|
-
contents.message = __expectString(data.message);
|
|
2217
|
-
}
|
|
2218
|
-
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2219
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2220
|
-
});
|
|
2221
|
-
}); };
|
|
2222
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2223
|
-
var contents, data, exception;
|
|
2224
|
-
return __generator(this, function (_a) {
|
|
2225
|
-
contents = map({
|
|
2226
|
-
xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
2227
|
-
});
|
|
2228
|
-
data = parsedOutput.body;
|
|
2229
|
-
if (data.message != null) {
|
|
2230
|
-
contents.message = __expectString(data.message);
|
|
2231
|
-
}
|
|
2232
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2233
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2234
|
-
});
|
|
2235
|
-
}); };
|
|
2236
|
-
var serializeAws_restJson1AnswerMachineDetectionConfig = function (input, context) {
|
|
2237
|
-
return __assign({}, (input.enableAnswerMachineDetection != null && {
|
|
2238
|
-
enableAnswerMachineDetection: input.enableAnswerMachineDetection,
|
|
2239
|
-
}));
|
|
2240
|
-
};
|
|
2241
|
-
var serializeAws_restJson1Attributes = function (input, context) {
|
|
2242
|
-
return Object.entries(input).reduce(function (acc, _a) {
|
|
2243
|
-
var _b;
|
|
2244
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1549
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1550
|
+
};
|
|
1551
|
+
const serializeAws_restJson1AnswerMachineDetectionConfig = (input, context) => {
|
|
1552
|
+
return {
|
|
1553
|
+
...(input.enableAnswerMachineDetection != null && {
|
|
1554
|
+
enableAnswerMachineDetection: input.enableAnswerMachineDetection,
|
|
1555
|
+
}),
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
const serializeAws_restJson1Attributes = (input, context) => {
|
|
1559
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2245
1560
|
if (value === null) {
|
|
2246
1561
|
return acc;
|
|
2247
1562
|
}
|
|
2248
|
-
return
|
|
1563
|
+
return {
|
|
1564
|
+
...acc,
|
|
1565
|
+
[key]: value,
|
|
1566
|
+
};
|
|
2249
1567
|
}, {});
|
|
2250
1568
|
};
|
|
2251
|
-
|
|
2252
|
-
return
|
|
2253
|
-
|
|
2254
|
-
|
|
1569
|
+
const serializeAws_restJson1CampaignFilters = (input, context) => {
|
|
1570
|
+
return {
|
|
1571
|
+
...(input.instanceIdFilter != null && {
|
|
1572
|
+
instanceIdFilter: serializeAws_restJson1InstanceIdFilter(input.instanceIdFilter, context),
|
|
1573
|
+
}),
|
|
1574
|
+
};
|
|
2255
1575
|
};
|
|
2256
|
-
|
|
1576
|
+
const serializeAws_restJson1CampaignIdList = (input, context) => {
|
|
2257
1577
|
return input
|
|
2258
|
-
.filter(
|
|
2259
|
-
.map(
|
|
1578
|
+
.filter((e) => e != null)
|
|
1579
|
+
.map((entry) => {
|
|
2260
1580
|
return entry;
|
|
2261
1581
|
});
|
|
2262
1582
|
};
|
|
2263
|
-
|
|
1583
|
+
const serializeAws_restJson1DialerConfig = (input, context) => {
|
|
2264
1584
|
return DialerConfig.visit(input, {
|
|
2265
|
-
predictiveDialerConfig:
|
|
1585
|
+
predictiveDialerConfig: (value) => ({
|
|
2266
1586
|
predictiveDialerConfig: serializeAws_restJson1PredictiveDialerConfig(value, context),
|
|
2267
|
-
})
|
|
2268
|
-
progressiveDialerConfig:
|
|
1587
|
+
}),
|
|
1588
|
+
progressiveDialerConfig: (value) => ({
|
|
2269
1589
|
progressiveDialerConfig: serializeAws_restJson1ProgressiveDialerConfig(value, context),
|
|
2270
|
-
})
|
|
2271
|
-
_:
|
|
1590
|
+
}),
|
|
1591
|
+
_: (name, value) => ({ name: value }),
|
|
2272
1592
|
});
|
|
2273
1593
|
};
|
|
2274
|
-
|
|
2275
|
-
return
|
|
1594
|
+
const serializeAws_restJson1DialRequest = (input, context) => {
|
|
1595
|
+
return {
|
|
1596
|
+
...(input.attributes != null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) }),
|
|
1597
|
+
...(input.clientToken != null && { clientToken: input.clientToken }),
|
|
1598
|
+
...(input.expirationTime != null && { expirationTime: input.expirationTime.toISOString().split(".")[0] + "Z" }),
|
|
1599
|
+
...(input.phoneNumber != null && { phoneNumber: input.phoneNumber }),
|
|
1600
|
+
};
|
|
2276
1601
|
};
|
|
2277
|
-
|
|
1602
|
+
const serializeAws_restJson1DialRequestList = (input, context) => {
|
|
2278
1603
|
return input
|
|
2279
|
-
.filter(
|
|
2280
|
-
.map(
|
|
1604
|
+
.filter((e) => e != null)
|
|
1605
|
+
.map((entry) => {
|
|
2281
1606
|
return serializeAws_restJson1DialRequest(entry, context);
|
|
2282
1607
|
});
|
|
2283
1608
|
};
|
|
2284
|
-
|
|
2285
|
-
return
|
|
1609
|
+
const serializeAws_restJson1EncryptionConfig = (input, context) => {
|
|
1610
|
+
return {
|
|
1611
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
1612
|
+
...(input.encryptionType != null && { encryptionType: input.encryptionType }),
|
|
1613
|
+
...(input.keyArn != null && { keyArn: input.keyArn }),
|
|
1614
|
+
};
|
|
2286
1615
|
};
|
|
2287
|
-
|
|
2288
|
-
return
|
|
1616
|
+
const serializeAws_restJson1InstanceIdFilter = (input, context) => {
|
|
1617
|
+
return {
|
|
1618
|
+
...(input.operator != null && { operator: input.operator }),
|
|
1619
|
+
...(input.value != null && { value: input.value }),
|
|
1620
|
+
};
|
|
2289
1621
|
};
|
|
2290
|
-
|
|
2291
|
-
return
|
|
2292
|
-
|
|
2293
|
-
|
|
1622
|
+
const serializeAws_restJson1OutboundCallConfig = (input, context) => {
|
|
1623
|
+
return {
|
|
1624
|
+
...(input.answerMachineDetectionConfig != null && {
|
|
1625
|
+
answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
|
|
1626
|
+
}),
|
|
1627
|
+
...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }),
|
|
1628
|
+
...(input.connectQueueId != null && { connectQueueId: input.connectQueueId }),
|
|
1629
|
+
...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
|
|
1630
|
+
};
|
|
2294
1631
|
};
|
|
2295
|
-
|
|
2296
|
-
return
|
|
1632
|
+
const serializeAws_restJson1PredictiveDialerConfig = (input, context) => {
|
|
1633
|
+
return {
|
|
1634
|
+
...(input.bandwidthAllocation != null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }),
|
|
1635
|
+
};
|
|
2297
1636
|
};
|
|
2298
|
-
|
|
2299
|
-
return
|
|
1637
|
+
const serializeAws_restJson1ProgressiveDialerConfig = (input, context) => {
|
|
1638
|
+
return {
|
|
1639
|
+
...(input.bandwidthAllocation != null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }),
|
|
1640
|
+
};
|
|
2300
1641
|
};
|
|
2301
|
-
|
|
2302
|
-
return Object.entries(input).reduce(
|
|
2303
|
-
var _b;
|
|
2304
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1642
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1643
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2305
1644
|
if (value === null) {
|
|
2306
1645
|
return acc;
|
|
2307
1646
|
}
|
|
2308
|
-
return
|
|
1647
|
+
return {
|
|
1648
|
+
...acc,
|
|
1649
|
+
[key]: value,
|
|
1650
|
+
};
|
|
2309
1651
|
}, {});
|
|
2310
1652
|
};
|
|
2311
|
-
|
|
1653
|
+
const deserializeAws_restJson1AnswerMachineDetectionConfig = (output, context) => {
|
|
2312
1654
|
return {
|
|
2313
1655
|
enableAnswerMachineDetection: __expectBoolean(output.enableAnswerMachineDetection),
|
|
2314
1656
|
};
|
|
2315
1657
|
};
|
|
2316
|
-
|
|
1658
|
+
const deserializeAws_restJson1Campaign = (output, context) => {
|
|
2317
1659
|
return {
|
|
2318
1660
|
arn: __expectString(output.arn),
|
|
2319
1661
|
connectInstanceId: __expectString(output.connectInstanceId),
|
|
@@ -2328,7 +1670,7 @@ var deserializeAws_restJson1Campaign = function (output, context) {
|
|
|
2328
1670
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
2329
1671
|
};
|
|
2330
1672
|
};
|
|
2331
|
-
|
|
1673
|
+
const deserializeAws_restJson1CampaignSummary = (output, context) => {
|
|
2332
1674
|
return {
|
|
2333
1675
|
arn: __expectString(output.arn),
|
|
2334
1676
|
connectInstanceId: __expectString(output.connectInstanceId),
|
|
@@ -2336,10 +1678,10 @@ var deserializeAws_restJson1CampaignSummary = function (output, context) {
|
|
|
2336
1678
|
name: __expectString(output.name),
|
|
2337
1679
|
};
|
|
2338
1680
|
};
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
.filter(
|
|
2342
|
-
.map(
|
|
1681
|
+
const deserializeAws_restJson1CampaignSummaryList = (output, context) => {
|
|
1682
|
+
const retVal = (output || [])
|
|
1683
|
+
.filter((e) => e != null)
|
|
1684
|
+
.map((entry) => {
|
|
2343
1685
|
if (entry === null) {
|
|
2344
1686
|
return null;
|
|
2345
1687
|
}
|
|
@@ -2347,7 +1689,7 @@ var deserializeAws_restJson1CampaignSummaryList = function (output, context) {
|
|
|
2347
1689
|
});
|
|
2348
1690
|
return retVal;
|
|
2349
1691
|
};
|
|
2350
|
-
|
|
1692
|
+
const deserializeAws_restJson1DialerConfig = (output, context) => {
|
|
2351
1693
|
if (output.predictiveDialerConfig != null) {
|
|
2352
1694
|
return {
|
|
2353
1695
|
predictiveDialerConfig: deserializeAws_restJson1PredictiveDialerConfig(output.predictiveDialerConfig, context),
|
|
@@ -2360,23 +1702,23 @@ var deserializeAws_restJson1DialerConfig = function (output, context) {
|
|
|
2360
1702
|
}
|
|
2361
1703
|
return { $unknown: Object.entries(output)[0] };
|
|
2362
1704
|
};
|
|
2363
|
-
|
|
1705
|
+
const deserializeAws_restJson1EncryptionConfig = (output, context) => {
|
|
2364
1706
|
return {
|
|
2365
1707
|
enabled: __expectBoolean(output.enabled),
|
|
2366
1708
|
encryptionType: __expectString(output.encryptionType),
|
|
2367
1709
|
keyArn: __expectString(output.keyArn),
|
|
2368
1710
|
};
|
|
2369
1711
|
};
|
|
2370
|
-
|
|
1712
|
+
const deserializeAws_restJson1FailedCampaignStateResponse = (output, context) => {
|
|
2371
1713
|
return {
|
|
2372
1714
|
campaignId: __expectString(output.campaignId),
|
|
2373
1715
|
failureCode: __expectString(output.failureCode),
|
|
2374
1716
|
};
|
|
2375
1717
|
};
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
.filter(
|
|
2379
|
-
.map(
|
|
1718
|
+
const deserializeAws_restJson1FailedCampaignStateResponseList = (output, context) => {
|
|
1719
|
+
const retVal = (output || [])
|
|
1720
|
+
.filter((e) => e != null)
|
|
1721
|
+
.map((entry) => {
|
|
2380
1722
|
if (entry === null) {
|
|
2381
1723
|
return null;
|
|
2382
1724
|
}
|
|
@@ -2384,17 +1726,17 @@ var deserializeAws_restJson1FailedCampaignStateResponseList = function (output,
|
|
|
2384
1726
|
});
|
|
2385
1727
|
return retVal;
|
|
2386
1728
|
};
|
|
2387
|
-
|
|
1729
|
+
const deserializeAws_restJson1FailedRequest = (output, context) => {
|
|
2388
1730
|
return {
|
|
2389
1731
|
clientToken: __expectString(output.clientToken),
|
|
2390
1732
|
failureCode: __expectString(output.failureCode),
|
|
2391
1733
|
id: __expectString(output.id),
|
|
2392
1734
|
};
|
|
2393
1735
|
};
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
.filter(
|
|
2397
|
-
.map(
|
|
1736
|
+
const deserializeAws_restJson1FailedRequestList = (output, context) => {
|
|
1737
|
+
const retVal = (output || [])
|
|
1738
|
+
.filter((e) => e != null)
|
|
1739
|
+
.map((entry) => {
|
|
2398
1740
|
if (entry === null) {
|
|
2399
1741
|
return null;
|
|
2400
1742
|
}
|
|
@@ -2402,7 +1744,7 @@ var deserializeAws_restJson1FailedRequestList = function (output, context) {
|
|
|
2402
1744
|
});
|
|
2403
1745
|
return retVal;
|
|
2404
1746
|
};
|
|
2405
|
-
|
|
1747
|
+
const deserializeAws_restJson1InstanceConfig = (output, context) => {
|
|
2406
1748
|
return {
|
|
2407
1749
|
connectInstanceId: __expectString(output.connectInstanceId),
|
|
2408
1750
|
encryptionConfig: output.encryptionConfig != null
|
|
@@ -2411,14 +1753,14 @@ var deserializeAws_restJson1InstanceConfig = function (output, context) {
|
|
|
2411
1753
|
serviceLinkedRoleArn: __expectString(output.serviceLinkedRoleArn),
|
|
2412
1754
|
};
|
|
2413
1755
|
};
|
|
2414
|
-
|
|
1756
|
+
const deserializeAws_restJson1InstanceOnboardingJobStatus = (output, context) => {
|
|
2415
1757
|
return {
|
|
2416
1758
|
connectInstanceId: __expectString(output.connectInstanceId),
|
|
2417
1759
|
failureCode: __expectString(output.failureCode),
|
|
2418
1760
|
status: __expectString(output.status),
|
|
2419
1761
|
};
|
|
2420
1762
|
};
|
|
2421
|
-
|
|
1763
|
+
const deserializeAws_restJson1OutboundCallConfig = (output, context) => {
|
|
2422
1764
|
return {
|
|
2423
1765
|
answerMachineDetectionConfig: output.answerMachineDetectionConfig != null
|
|
2424
1766
|
? deserializeAws_restJson1AnswerMachineDetectionConfig(output.answerMachineDetectionConfig, context)
|
|
@@ -2428,26 +1770,26 @@ var deserializeAws_restJson1OutboundCallConfig = function (output, context) {
|
|
|
2428
1770
|
connectSourcePhoneNumber: __expectString(output.connectSourcePhoneNumber),
|
|
2429
1771
|
};
|
|
2430
1772
|
};
|
|
2431
|
-
|
|
1773
|
+
const deserializeAws_restJson1PredictiveDialerConfig = (output, context) => {
|
|
2432
1774
|
return {
|
|
2433
1775
|
bandwidthAllocation: __limitedParseDouble(output.bandwidthAllocation),
|
|
2434
1776
|
};
|
|
2435
1777
|
};
|
|
2436
|
-
|
|
1778
|
+
const deserializeAws_restJson1ProgressiveDialerConfig = (output, context) => {
|
|
2437
1779
|
return {
|
|
2438
1780
|
bandwidthAllocation: __limitedParseDouble(output.bandwidthAllocation),
|
|
2439
1781
|
};
|
|
2440
1782
|
};
|
|
2441
|
-
|
|
1783
|
+
const deserializeAws_restJson1SuccessfulCampaignStateResponse = (output, context) => {
|
|
2442
1784
|
return {
|
|
2443
1785
|
campaignId: __expectString(output.campaignId),
|
|
2444
1786
|
state: __expectString(output.state),
|
|
2445
1787
|
};
|
|
2446
1788
|
};
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
.filter(
|
|
2450
|
-
.map(
|
|
1789
|
+
const deserializeAws_restJson1SuccessfulCampaignStateResponseList = (output, context) => {
|
|
1790
|
+
const retVal = (output || [])
|
|
1791
|
+
.filter((e) => e != null)
|
|
1792
|
+
.map((entry) => {
|
|
2451
1793
|
if (entry === null) {
|
|
2452
1794
|
return null;
|
|
2453
1795
|
}
|
|
@@ -2455,16 +1797,16 @@ var deserializeAws_restJson1SuccessfulCampaignStateResponseList = function (outp
|
|
|
2455
1797
|
});
|
|
2456
1798
|
return retVal;
|
|
2457
1799
|
};
|
|
2458
|
-
|
|
1800
|
+
const deserializeAws_restJson1SuccessfulRequest = (output, context) => {
|
|
2459
1801
|
return {
|
|
2460
1802
|
clientToken: __expectString(output.clientToken),
|
|
2461
1803
|
id: __expectString(output.id),
|
|
2462
1804
|
};
|
|
2463
1805
|
};
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
.filter(
|
|
2467
|
-
.map(
|
|
1806
|
+
const deserializeAws_restJson1SuccessfulRequestList = (output, context) => {
|
|
1807
|
+
const retVal = (output || [])
|
|
1808
|
+
.filter((e) => e != null)
|
|
1809
|
+
.map((entry) => {
|
|
2468
1810
|
if (entry === null) {
|
|
2469
1811
|
return null;
|
|
2470
1812
|
}
|
|
@@ -2472,67 +1814,50 @@ var deserializeAws_restJson1SuccessfulRequestList = function (output, context) {
|
|
|
2472
1814
|
});
|
|
2473
1815
|
return retVal;
|
|
2474
1816
|
};
|
|
2475
|
-
|
|
2476
|
-
return Object.entries(output).reduce(
|
|
2477
|
-
var _b;
|
|
2478
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1817
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1818
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2479
1819
|
if (value === null) {
|
|
2480
1820
|
return acc;
|
|
2481
1821
|
}
|
|
2482
|
-
return
|
|
1822
|
+
return {
|
|
1823
|
+
...acc,
|
|
1824
|
+
[key]: __expectString(value),
|
|
1825
|
+
};
|
|
2483
1826
|
}, {});
|
|
2484
1827
|
};
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
});
|
|
2493
|
-
};
|
|
2494
|
-
var collectBody = function (streamBody, context) {
|
|
2495
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1828
|
+
const deserializeMetadata = (output) => ({
|
|
1829
|
+
httpStatusCode: output.statusCode,
|
|
1830
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1831
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1832
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1833
|
+
});
|
|
1834
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2496
1835
|
if (streamBody instanceof Uint8Array) {
|
|
2497
1836
|
return Promise.resolve(streamBody);
|
|
2498
1837
|
}
|
|
2499
1838
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2500
1839
|
};
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
1840
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1841
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1842
|
+
value !== null &&
|
|
1843
|
+
value !== "" &&
|
|
1844
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1845
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1846
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1847
|
+
if (encoded.length) {
|
|
1848
|
+
return JSON.parse(encoded);
|
|
1849
|
+
}
|
|
1850
|
+
return {};
|
|
1851
|
+
});
|
|
1852
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1853
|
+
const value = await parseBody(errorBody, context);
|
|
1854
|
+
value.message = value.message ?? value.Message;
|
|
1855
|
+
return value;
|
|
2510
1856
|
};
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
}
|
|
2516
|
-
return {};
|
|
2517
|
-
});
|
|
2518
|
-
};
|
|
2519
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2520
|
-
var value;
|
|
2521
|
-
var _a;
|
|
2522
|
-
return __generator(this, function (_b) {
|
|
2523
|
-
switch (_b.label) {
|
|
2524
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
2525
|
-
case 1:
|
|
2526
|
-
value = _b.sent();
|
|
2527
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2528
|
-
return [2, value];
|
|
2529
|
-
}
|
|
2530
|
-
});
|
|
2531
|
-
}); };
|
|
2532
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
2533
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2534
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2535
|
-
var cleanValue = rawValue;
|
|
1857
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1858
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1859
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1860
|
+
let cleanValue = rawValue;
|
|
2536
1861
|
if (typeof cleanValue === "number") {
|
|
2537
1862
|
cleanValue = cleanValue.toString();
|
|
2538
1863
|
}
|
|
@@ -2547,7 +1872,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2547
1872
|
}
|
|
2548
1873
|
return cleanValue;
|
|
2549
1874
|
};
|
|
2550
|
-
|
|
1875
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2551
1876
|
if (headerKey !== undefined) {
|
|
2552
1877
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2553
1878
|
}
|