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