@aws-sdk/client-codestar-notifications 3.183.0 → 3.186.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 +19 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/CodestarNotifications.js +61 -54
- package/dist-es/CodestarNotificationsClient.js +28 -22
- package/dist-es/commands/CreateNotificationRuleCommand.js +28 -21
- package/dist-es/commands/DeleteNotificationRuleCommand.js +28 -21
- package/dist-es/commands/DeleteTargetCommand.js +28 -21
- package/dist-es/commands/DescribeNotificationRuleCommand.js +28 -21
- package/dist-es/commands/ListEventTypesCommand.js +28 -21
- package/dist-es/commands/ListNotificationRulesCommand.js +28 -21
- package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
- package/dist-es/commands/ListTargetsCommand.js +28 -21
- package/dist-es/commands/SubscribeCommand.js +28 -21
- package/dist-es/commands/TagResourceCommand.js +28 -21
- package/dist-es/commands/UnsubscribeCommand.js +28 -21
- package/dist-es/commands/UntagResourceCommand.js +28 -21
- package/dist-es/commands/UpdateNotificationRuleCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CodestarNotificationsServiceException.js +10 -5
- package/dist-es/models/models_0.js +130 -207
- package/dist-es/pagination/ListEventTypesPaginator.js +68 -25
- package/dist-es/pagination/ListNotificationRulesPaginator.js +68 -25
- package/dist-es/pagination/ListTargetsPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +1306 -954
- 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 +33 -33
|
@@ -1,993 +1,1328 @@
|
|
|
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, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
5
|
import { CodestarNotificationsServiceException as __BaseException } from "../models/CodestarNotificationsServiceException";
|
|
5
6
|
import { AccessDeniedException, ConcurrentModificationException, ConfigurationException, InvalidNextTokenException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
export var serializeAws_restJson1CreateNotificationRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
9
|
+
var _c;
|
|
10
|
+
return __generator(this, function (_d) {
|
|
11
|
+
switch (_d.label) {
|
|
12
|
+
case 0: return [4, context.endpoint()];
|
|
13
|
+
case 1:
|
|
14
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
15
|
+
headers = {
|
|
16
|
+
"content-type": "application/json",
|
|
17
|
+
};
|
|
18
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/createNotificationRule";
|
|
19
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.DetailType != null && { DetailType: input.DetailType })), (input.EventTypeIds != null && {
|
|
20
|
+
EventTypeIds: serializeAws_restJson1EventTypeIds(input.EventTypeIds, context),
|
|
21
|
+
})), (input.Name != null && { Name: input.Name })), (input.Resource != null && { Resource: input.Resource })), (input.Status != null && { Status: input.Status })), (input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) })), (input.Targets != null && { Targets: serializeAws_restJson1Targets(input.Targets, context) })));
|
|
22
|
+
return [2, new __HttpRequest({
|
|
23
|
+
protocol: protocol,
|
|
24
|
+
hostname: hostname,
|
|
25
|
+
port: port,
|
|
26
|
+
method: "POST",
|
|
27
|
+
headers: headers,
|
|
28
|
+
path: resolvedPath,
|
|
29
|
+
body: body,
|
|
30
|
+
})];
|
|
31
|
+
}
|
|
24
32
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
}); };
|
|
34
|
+
export var serializeAws_restJson1DeleteNotificationRuleCommand = 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
|
+
"content-type": "application/json",
|
|
43
|
+
};
|
|
44
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/deleteNotificationRule";
|
|
45
|
+
body = JSON.stringify(__assign({}, (input.Arn != null && { Arn: input.Arn })));
|
|
46
|
+
return [2, new __HttpRequest({
|
|
47
|
+
protocol: protocol,
|
|
48
|
+
hostname: hostname,
|
|
49
|
+
port: port,
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers: headers,
|
|
52
|
+
path: resolvedPath,
|
|
53
|
+
body: body,
|
|
54
|
+
})];
|
|
55
|
+
}
|
|
33
56
|
});
|
|
34
|
-
};
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
57
|
+
}); };
|
|
58
|
+
export var serializeAws_restJson1DeleteTargetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
60
|
+
return __generator(this, function (_c) {
|
|
61
|
+
switch (_c.label) {
|
|
62
|
+
case 0: return [4, context.endpoint()];
|
|
63
|
+
case 1:
|
|
64
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
65
|
+
headers = {
|
|
66
|
+
"content-type": "application/json",
|
|
67
|
+
};
|
|
68
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/deleteTarget";
|
|
69
|
+
body = JSON.stringify(__assign(__assign({}, (input.ForceUnsubscribeAll != null && { ForceUnsubscribeAll: input.ForceUnsubscribeAll })), (input.TargetAddress != null && { TargetAddress: input.TargetAddress })));
|
|
70
|
+
return [2, new __HttpRequest({
|
|
71
|
+
protocol: protocol,
|
|
72
|
+
hostname: hostname,
|
|
73
|
+
port: port,
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: headers,
|
|
76
|
+
path: resolvedPath,
|
|
77
|
+
body: body,
|
|
78
|
+
})];
|
|
79
|
+
}
|
|
44
80
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
81
|
+
}); };
|
|
82
|
+
export var serializeAws_restJson1DescribeNotificationRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
84
|
+
return __generator(this, function (_c) {
|
|
85
|
+
switch (_c.label) {
|
|
86
|
+
case 0: return [4, context.endpoint()];
|
|
87
|
+
case 1:
|
|
88
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
89
|
+
headers = {
|
|
90
|
+
"content-type": "application/json",
|
|
91
|
+
};
|
|
92
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/describeNotificationRule";
|
|
93
|
+
body = JSON.stringify(__assign({}, (input.Arn != null && { Arn: input.Arn })));
|
|
94
|
+
return [2, new __HttpRequest({
|
|
95
|
+
protocol: protocol,
|
|
96
|
+
hostname: hostname,
|
|
97
|
+
port: port,
|
|
98
|
+
method: "POST",
|
|
99
|
+
headers: headers,
|
|
100
|
+
path: resolvedPath,
|
|
101
|
+
body: body,
|
|
102
|
+
})];
|
|
103
|
+
}
|
|
53
104
|
});
|
|
54
|
-
};
|
|
55
|
-
export
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
105
|
+
}); };
|
|
106
|
+
export var serializeAws_restJson1ListEventTypesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
108
|
+
return __generator(this, function (_c) {
|
|
109
|
+
switch (_c.label) {
|
|
110
|
+
case 0: return [4, context.endpoint()];
|
|
111
|
+
case 1:
|
|
112
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
113
|
+
headers = {
|
|
114
|
+
"content-type": "application/json",
|
|
115
|
+
};
|
|
116
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/listEventTypes";
|
|
117
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Filters != null && { Filters: serializeAws_restJson1ListEventTypesFilters(input.Filters, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })));
|
|
118
|
+
return [2, new __HttpRequest({
|
|
119
|
+
protocol: protocol,
|
|
120
|
+
hostname: hostname,
|
|
121
|
+
port: port,
|
|
122
|
+
method: "POST",
|
|
123
|
+
headers: headers,
|
|
124
|
+
path: resolvedPath,
|
|
125
|
+
body: body,
|
|
126
|
+
})];
|
|
127
|
+
}
|
|
65
128
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
129
|
+
}); };
|
|
130
|
+
export var serializeAws_restJson1ListNotificationRulesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
132
|
+
return __generator(this, function (_c) {
|
|
133
|
+
switch (_c.label) {
|
|
134
|
+
case 0: return [4, context.endpoint()];
|
|
135
|
+
case 1:
|
|
136
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
137
|
+
headers = {
|
|
138
|
+
"content-type": "application/json",
|
|
139
|
+
};
|
|
140
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/listNotificationRules";
|
|
141
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Filters != null && {
|
|
142
|
+
Filters: serializeAws_restJson1ListNotificationRulesFilters(input.Filters, context),
|
|
143
|
+
})), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })));
|
|
144
|
+
return [2, new __HttpRequest({
|
|
145
|
+
protocol: protocol,
|
|
146
|
+
hostname: hostname,
|
|
147
|
+
port: port,
|
|
148
|
+
method: "POST",
|
|
149
|
+
headers: headers,
|
|
150
|
+
path: resolvedPath,
|
|
151
|
+
body: body,
|
|
152
|
+
})];
|
|
153
|
+
}
|
|
74
154
|
});
|
|
75
|
-
};
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
155
|
+
}); };
|
|
156
|
+
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
157
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
158
|
+
return __generator(this, function (_c) {
|
|
159
|
+
switch (_c.label) {
|
|
160
|
+
case 0: return [4, context.endpoint()];
|
|
161
|
+
case 1:
|
|
162
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
163
|
+
headers = {
|
|
164
|
+
"content-type": "application/json",
|
|
165
|
+
};
|
|
166
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/listTagsForResource";
|
|
167
|
+
body = JSON.stringify(__assign({}, (input.Arn != null && { Arn: input.Arn })));
|
|
168
|
+
return [2, new __HttpRequest({
|
|
169
|
+
protocol: protocol,
|
|
170
|
+
hostname: hostname,
|
|
171
|
+
port: port,
|
|
172
|
+
method: "POST",
|
|
173
|
+
headers: headers,
|
|
174
|
+
path: resolvedPath,
|
|
175
|
+
body: body,
|
|
176
|
+
})];
|
|
177
|
+
}
|
|
85
178
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
179
|
+
}); };
|
|
180
|
+
export var serializeAws_restJson1ListTargetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
181
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
182
|
+
return __generator(this, function (_c) {
|
|
183
|
+
switch (_c.label) {
|
|
184
|
+
case 0: return [4, context.endpoint()];
|
|
185
|
+
case 1:
|
|
186
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
187
|
+
headers = {
|
|
188
|
+
"content-type": "application/json",
|
|
189
|
+
};
|
|
190
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/listTargets";
|
|
191
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Filters != null && { Filters: serializeAws_restJson1ListTargetsFilters(input.Filters, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })));
|
|
192
|
+
return [2, new __HttpRequest({
|
|
193
|
+
protocol: protocol,
|
|
194
|
+
hostname: hostname,
|
|
195
|
+
port: port,
|
|
196
|
+
method: "POST",
|
|
197
|
+
headers: headers,
|
|
198
|
+
path: resolvedPath,
|
|
199
|
+
body: body,
|
|
200
|
+
})];
|
|
201
|
+
}
|
|
94
202
|
});
|
|
95
|
-
};
|
|
96
|
-
export
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
203
|
+
}); };
|
|
204
|
+
export var serializeAws_restJson1SubscribeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
205
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
206
|
+
return __generator(this, function (_c) {
|
|
207
|
+
switch (_c.label) {
|
|
208
|
+
case 0: return [4, context.endpoint()];
|
|
209
|
+
case 1:
|
|
210
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
211
|
+
headers = {
|
|
212
|
+
"content-type": "application/json",
|
|
213
|
+
};
|
|
214
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/subscribe";
|
|
215
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Arn != null && { Arn: input.Arn })), (input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken })), (input.Target != null && { Target: serializeAws_restJson1Target(input.Target, context) })));
|
|
216
|
+
return [2, new __HttpRequest({
|
|
217
|
+
protocol: protocol,
|
|
218
|
+
hostname: hostname,
|
|
219
|
+
port: port,
|
|
220
|
+
method: "POST",
|
|
221
|
+
headers: headers,
|
|
222
|
+
path: resolvedPath,
|
|
223
|
+
body: body,
|
|
224
|
+
})];
|
|
225
|
+
}
|
|
107
226
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
227
|
+
}); };
|
|
228
|
+
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
229
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
230
|
+
return __generator(this, function (_c) {
|
|
231
|
+
switch (_c.label) {
|
|
232
|
+
case 0: return [4, context.endpoint()];
|
|
233
|
+
case 1:
|
|
234
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
235
|
+
headers = {
|
|
236
|
+
"content-type": "application/json",
|
|
237
|
+
};
|
|
238
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tagResource";
|
|
239
|
+
body = JSON.stringify(__assign(__assign({}, (input.Arn != null && { Arn: input.Arn })), (input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) })));
|
|
240
|
+
return [2, new __HttpRequest({
|
|
241
|
+
protocol: protocol,
|
|
242
|
+
hostname: hostname,
|
|
243
|
+
port: port,
|
|
244
|
+
method: "POST",
|
|
245
|
+
headers: headers,
|
|
246
|
+
path: resolvedPath,
|
|
247
|
+
body: body,
|
|
248
|
+
})];
|
|
249
|
+
}
|
|
116
250
|
});
|
|
117
|
-
};
|
|
118
|
-
export
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
251
|
+
}); };
|
|
252
|
+
export var serializeAws_restJson1UnsubscribeCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
253
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
254
|
+
return __generator(this, function (_c) {
|
|
255
|
+
switch (_c.label) {
|
|
256
|
+
case 0: return [4, context.endpoint()];
|
|
257
|
+
case 1:
|
|
258
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
259
|
+
headers = {
|
|
260
|
+
"content-type": "application/json",
|
|
261
|
+
};
|
|
262
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/unsubscribe";
|
|
263
|
+
body = JSON.stringify(__assign(__assign({}, (input.Arn != null && { Arn: input.Arn })), (input.TargetAddress != null && { TargetAddress: input.TargetAddress })));
|
|
264
|
+
return [2, new __HttpRequest({
|
|
265
|
+
protocol: protocol,
|
|
266
|
+
hostname: hostname,
|
|
267
|
+
port: port,
|
|
268
|
+
method: "POST",
|
|
269
|
+
headers: headers,
|
|
270
|
+
path: resolvedPath,
|
|
271
|
+
body: body,
|
|
272
|
+
})];
|
|
273
|
+
}
|
|
131
274
|
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
275
|
+
}); };
|
|
276
|
+
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
277
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
278
|
+
return __generator(this, function (_c) {
|
|
279
|
+
switch (_c.label) {
|
|
280
|
+
case 0: return [4, context.endpoint()];
|
|
281
|
+
case 1:
|
|
282
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
283
|
+
headers = {};
|
|
284
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/untagResource/{Arn}";
|
|
285
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Arn", function () { return input.Arn; }, "{Arn}", false);
|
|
286
|
+
query = map({
|
|
287
|
+
tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
288
|
+
});
|
|
289
|
+
return [2, new __HttpRequest({
|
|
290
|
+
protocol: protocol,
|
|
291
|
+
hostname: hostname,
|
|
292
|
+
port: port,
|
|
293
|
+
method: "POST",
|
|
294
|
+
headers: headers,
|
|
295
|
+
path: resolvedPath,
|
|
296
|
+
query: query,
|
|
297
|
+
body: body,
|
|
298
|
+
})];
|
|
299
|
+
}
|
|
140
300
|
});
|
|
141
|
-
};
|
|
142
|
-
export
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
301
|
+
}); };
|
|
302
|
+
export var serializeAws_restJson1UpdateNotificationRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
303
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
304
|
+
return __generator(this, function (_c) {
|
|
305
|
+
switch (_c.label) {
|
|
306
|
+
case 0: return [4, context.endpoint()];
|
|
307
|
+
case 1:
|
|
308
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
309
|
+
headers = {
|
|
310
|
+
"content-type": "application/json",
|
|
311
|
+
};
|
|
312
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/updateNotificationRule";
|
|
313
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Arn != null && { Arn: input.Arn })), (input.DetailType != null && { DetailType: input.DetailType })), (input.EventTypeIds != null && {
|
|
314
|
+
EventTypeIds: serializeAws_restJson1EventTypeIds(input.EventTypeIds, context),
|
|
315
|
+
})), (input.Name != null && { Name: input.Name })), (input.Status != null && { Status: input.Status })), (input.Targets != null && { Targets: serializeAws_restJson1Targets(input.Targets, context) })));
|
|
316
|
+
return [2, new __HttpRequest({
|
|
317
|
+
protocol: protocol,
|
|
318
|
+
hostname: hostname,
|
|
319
|
+
port: port,
|
|
320
|
+
method: "POST",
|
|
321
|
+
headers: headers,
|
|
322
|
+
path: resolvedPath,
|
|
323
|
+
body: body,
|
|
324
|
+
})];
|
|
325
|
+
}
|
|
151
326
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
327
|
+
}); };
|
|
328
|
+
export var deserializeAws_restJson1CreateNotificationRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
329
|
+
var contents, data, _a, _b;
|
|
330
|
+
return __generator(this, function (_c) {
|
|
331
|
+
switch (_c.label) {
|
|
332
|
+
case 0:
|
|
333
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
334
|
+
return [2, deserializeAws_restJson1CreateNotificationRuleCommandError(output, context)];
|
|
335
|
+
}
|
|
336
|
+
contents = map({
|
|
337
|
+
$metadata: deserializeMetadata(output),
|
|
338
|
+
});
|
|
339
|
+
_a = __expectNonNull;
|
|
340
|
+
_b = __expectObject;
|
|
341
|
+
return [4, parseBody(output.body, context)];
|
|
342
|
+
case 1:
|
|
343
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
344
|
+
if (data.Arn != null) {
|
|
345
|
+
contents.Arn = __expectString(data.Arn);
|
|
346
|
+
}
|
|
347
|
+
return [2, contents];
|
|
348
|
+
}
|
|
160
349
|
});
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
350
|
+
}); };
|
|
351
|
+
var deserializeAws_restJson1CreateNotificationRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
352
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
353
|
+
var _c;
|
|
354
|
+
return __generator(this, function (_d) {
|
|
355
|
+
switch (_d.label) {
|
|
356
|
+
case 0:
|
|
357
|
+
_a = [__assign({}, output)];
|
|
358
|
+
_c = {};
|
|
359
|
+
return [4, parseErrorBody(output.body, context)];
|
|
360
|
+
case 1:
|
|
361
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
362
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
363
|
+
_b = errorCode;
|
|
364
|
+
switch (_b) {
|
|
365
|
+
case "AccessDeniedException": return [3, 2];
|
|
366
|
+
case "com.amazonaws.codestarnotifications#AccessDeniedException": return [3, 2];
|
|
367
|
+
case "ConcurrentModificationException": return [3, 4];
|
|
368
|
+
case "com.amazonaws.codestarnotifications#ConcurrentModificationException": return [3, 4];
|
|
369
|
+
case "ConfigurationException": return [3, 6];
|
|
370
|
+
case "com.amazonaws.codestarnotifications#ConfigurationException": return [3, 6];
|
|
371
|
+
case "LimitExceededException": return [3, 8];
|
|
372
|
+
case "com.amazonaws.codestarnotifications#LimitExceededException": return [3, 8];
|
|
373
|
+
case "ResourceAlreadyExistsException": return [3, 10];
|
|
374
|
+
case "com.amazonaws.codestarnotifications#ResourceAlreadyExistsException": return [3, 10];
|
|
375
|
+
case "ValidationException": return [3, 12];
|
|
376
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 12];
|
|
377
|
+
}
|
|
378
|
+
return [3, 14];
|
|
379
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
380
|
+
case 3: throw _d.sent();
|
|
381
|
+
case 4: return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
382
|
+
case 5: throw _d.sent();
|
|
383
|
+
case 6: return [4, deserializeAws_restJson1ConfigurationExceptionResponse(parsedOutput, context)];
|
|
384
|
+
case 7: throw _d.sent();
|
|
385
|
+
case 8: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
386
|
+
case 9: throw _d.sent();
|
|
387
|
+
case 10: return [4, deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)];
|
|
388
|
+
case 11: throw _d.sent();
|
|
389
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
390
|
+
case 13: throw _d.sent();
|
|
391
|
+
case 14:
|
|
392
|
+
parsedBody = parsedOutput.body;
|
|
393
|
+
throwDefaultError({
|
|
394
|
+
output: output,
|
|
395
|
+
parsedBody: parsedBody,
|
|
396
|
+
exceptionCtor: __BaseException,
|
|
397
|
+
errorCode: errorCode,
|
|
398
|
+
});
|
|
399
|
+
_d.label = 15;
|
|
400
|
+
case 15: return [2];
|
|
401
|
+
}
|
|
173
402
|
});
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
403
|
+
}); };
|
|
404
|
+
export var deserializeAws_restJson1DeleteNotificationRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
405
|
+
var contents, data, _a, _b;
|
|
406
|
+
return __generator(this, function (_c) {
|
|
407
|
+
switch (_c.label) {
|
|
408
|
+
case 0:
|
|
409
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
|
+
return [2, deserializeAws_restJson1DeleteNotificationRuleCommandError(output, context)];
|
|
411
|
+
}
|
|
412
|
+
contents = map({
|
|
413
|
+
$metadata: deserializeMetadata(output),
|
|
414
|
+
});
|
|
415
|
+
_a = __expectNonNull;
|
|
416
|
+
_b = __expectObject;
|
|
417
|
+
return [4, parseBody(output.body, context)];
|
|
418
|
+
case 1:
|
|
419
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
420
|
+
if (data.Arn != null) {
|
|
421
|
+
contents.Arn = __expectString(data.Arn);
|
|
422
|
+
}
|
|
423
|
+
return [2, contents];
|
|
424
|
+
}
|
|
182
425
|
});
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
426
|
+
}); };
|
|
427
|
+
var deserializeAws_restJson1DeleteNotificationRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
428
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
429
|
+
var _c;
|
|
430
|
+
return __generator(this, function (_d) {
|
|
431
|
+
switch (_d.label) {
|
|
432
|
+
case 0:
|
|
433
|
+
_a = [__assign({}, output)];
|
|
434
|
+
_c = {};
|
|
435
|
+
return [4, parseErrorBody(output.body, context)];
|
|
436
|
+
case 1:
|
|
437
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
438
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
439
|
+
_b = errorCode;
|
|
440
|
+
switch (_b) {
|
|
441
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
442
|
+
case "com.amazonaws.codestarnotifications#ConcurrentModificationException": return [3, 2];
|
|
443
|
+
case "LimitExceededException": return [3, 4];
|
|
444
|
+
case "com.amazonaws.codestarnotifications#LimitExceededException": return [3, 4];
|
|
445
|
+
case "ValidationException": return [3, 6];
|
|
446
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 6];
|
|
447
|
+
}
|
|
448
|
+
return [3, 8];
|
|
449
|
+
case 2: return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
450
|
+
case 3: throw _d.sent();
|
|
451
|
+
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
452
|
+
case 5: throw _d.sent();
|
|
453
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
454
|
+
case 7: throw _d.sent();
|
|
455
|
+
case 8:
|
|
456
|
+
parsedBody = parsedOutput.body;
|
|
457
|
+
throwDefaultError({
|
|
458
|
+
output: output,
|
|
459
|
+
parsedBody: parsedBody,
|
|
460
|
+
exceptionCtor: __BaseException,
|
|
461
|
+
errorCode: errorCode,
|
|
462
|
+
});
|
|
463
|
+
_d.label = 9;
|
|
464
|
+
case 9: return [2];
|
|
465
|
+
}
|
|
195
466
|
});
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
467
|
+
}); };
|
|
468
|
+
export var deserializeAws_restJson1DeleteTargetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
469
|
+
var contents;
|
|
470
|
+
return __generator(this, function (_a) {
|
|
471
|
+
switch (_a.label) {
|
|
472
|
+
case 0:
|
|
473
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
474
|
+
return [2, deserializeAws_restJson1DeleteTargetCommandError(output, context)];
|
|
475
|
+
}
|
|
476
|
+
contents = map({
|
|
477
|
+
$metadata: deserializeMetadata(output),
|
|
478
|
+
});
|
|
479
|
+
return [4, collectBody(output.body, context)];
|
|
480
|
+
case 1:
|
|
481
|
+
_a.sent();
|
|
482
|
+
return [2, contents];
|
|
483
|
+
}
|
|
204
484
|
});
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
485
|
+
}); };
|
|
486
|
+
var deserializeAws_restJson1DeleteTargetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
487
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
488
|
+
var _c;
|
|
489
|
+
return __generator(this, function (_d) {
|
|
490
|
+
switch (_d.label) {
|
|
491
|
+
case 0:
|
|
492
|
+
_a = [__assign({}, output)];
|
|
493
|
+
_c = {};
|
|
494
|
+
return [4, parseErrorBody(output.body, context)];
|
|
495
|
+
case 1:
|
|
496
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
497
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
498
|
+
_b = errorCode;
|
|
499
|
+
switch (_b) {
|
|
500
|
+
case "ValidationException": return [3, 2];
|
|
501
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 2];
|
|
502
|
+
}
|
|
503
|
+
return [3, 4];
|
|
504
|
+
case 2: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
505
|
+
case 3: throw _d.sent();
|
|
506
|
+
case 4:
|
|
507
|
+
parsedBody = parsedOutput.body;
|
|
508
|
+
throwDefaultError({
|
|
509
|
+
output: output,
|
|
510
|
+
parsedBody: parsedBody,
|
|
511
|
+
exceptionCtor: __BaseException,
|
|
512
|
+
errorCode: errorCode,
|
|
513
|
+
});
|
|
514
|
+
_d.label = 5;
|
|
515
|
+
case 5: return [2];
|
|
516
|
+
}
|
|
216
517
|
});
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
518
|
+
}); };
|
|
519
|
+
export var deserializeAws_restJson1DescribeNotificationRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
520
|
+
var contents, data, _a, _b;
|
|
521
|
+
return __generator(this, function (_c) {
|
|
522
|
+
switch (_c.label) {
|
|
523
|
+
case 0:
|
|
524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
525
|
+
return [2, deserializeAws_restJson1DescribeNotificationRuleCommandError(output, context)];
|
|
526
|
+
}
|
|
527
|
+
contents = map({
|
|
528
|
+
$metadata: deserializeMetadata(output),
|
|
529
|
+
});
|
|
530
|
+
_a = __expectNonNull;
|
|
531
|
+
_b = __expectObject;
|
|
532
|
+
return [4, parseBody(output.body, context)];
|
|
533
|
+
case 1:
|
|
534
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
535
|
+
if (data.Arn != null) {
|
|
536
|
+
contents.Arn = __expectString(data.Arn);
|
|
537
|
+
}
|
|
538
|
+
if (data.CreatedBy != null) {
|
|
539
|
+
contents.CreatedBy = __expectString(data.CreatedBy);
|
|
540
|
+
}
|
|
541
|
+
if (data.CreatedTimestamp != null) {
|
|
542
|
+
contents.CreatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTimestamp)));
|
|
543
|
+
}
|
|
544
|
+
if (data.DetailType != null) {
|
|
545
|
+
contents.DetailType = __expectString(data.DetailType);
|
|
546
|
+
}
|
|
547
|
+
if (data.EventTypes != null) {
|
|
548
|
+
contents.EventTypes = deserializeAws_restJson1EventTypeBatch(data.EventTypes, context);
|
|
549
|
+
}
|
|
550
|
+
if (data.LastModifiedTimestamp != null) {
|
|
551
|
+
contents.LastModifiedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTimestamp)));
|
|
552
|
+
}
|
|
553
|
+
if (data.Name != null) {
|
|
554
|
+
contents.Name = __expectString(data.Name);
|
|
555
|
+
}
|
|
556
|
+
if (data.Resource != null) {
|
|
557
|
+
contents.Resource = __expectString(data.Resource);
|
|
558
|
+
}
|
|
559
|
+
if (data.Status != null) {
|
|
560
|
+
contents.Status = __expectString(data.Status);
|
|
561
|
+
}
|
|
562
|
+
if (data.Tags != null) {
|
|
563
|
+
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
564
|
+
}
|
|
565
|
+
if (data.Targets != null) {
|
|
566
|
+
contents.Targets = deserializeAws_restJson1TargetsBatch(data.Targets, context);
|
|
567
|
+
}
|
|
568
|
+
return [2, contents];
|
|
569
|
+
}
|
|
225
570
|
});
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
571
|
+
}); };
|
|
572
|
+
var deserializeAws_restJson1DescribeNotificationRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
573
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
574
|
+
var _c;
|
|
575
|
+
return __generator(this, function (_d) {
|
|
576
|
+
switch (_d.label) {
|
|
577
|
+
case 0:
|
|
578
|
+
_a = [__assign({}, output)];
|
|
579
|
+
_c = {};
|
|
580
|
+
return [4, parseErrorBody(output.body, context)];
|
|
581
|
+
case 1:
|
|
582
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
583
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
584
|
+
_b = errorCode;
|
|
585
|
+
switch (_b) {
|
|
586
|
+
case "ResourceNotFoundException": return [3, 2];
|
|
587
|
+
case "com.amazonaws.codestarnotifications#ResourceNotFoundException": return [3, 2];
|
|
588
|
+
case "ValidationException": return [3, 4];
|
|
589
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 4];
|
|
590
|
+
}
|
|
591
|
+
return [3, 6];
|
|
592
|
+
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
593
|
+
case 3: throw _d.sent();
|
|
594
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
595
|
+
case 5: throw _d.sent();
|
|
596
|
+
case 6:
|
|
597
|
+
parsedBody = parsedOutput.body;
|
|
598
|
+
throwDefaultError({
|
|
599
|
+
output: output,
|
|
600
|
+
parsedBody: parsedBody,
|
|
601
|
+
exceptionCtor: __BaseException,
|
|
602
|
+
errorCode: errorCode,
|
|
603
|
+
});
|
|
604
|
+
_d.label = 7;
|
|
605
|
+
case 7: return [2];
|
|
606
|
+
}
|
|
237
607
|
});
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
608
|
+
}); };
|
|
609
|
+
export var deserializeAws_restJson1ListEventTypesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
610
|
+
var contents, data, _a, _b;
|
|
611
|
+
return __generator(this, function (_c) {
|
|
612
|
+
switch (_c.label) {
|
|
613
|
+
case 0:
|
|
614
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
615
|
+
return [2, deserializeAws_restJson1ListEventTypesCommandError(output, context)];
|
|
616
|
+
}
|
|
617
|
+
contents = map({
|
|
618
|
+
$metadata: deserializeMetadata(output),
|
|
619
|
+
});
|
|
620
|
+
_a = __expectNonNull;
|
|
621
|
+
_b = __expectObject;
|
|
622
|
+
return [4, parseBody(output.body, context)];
|
|
623
|
+
case 1:
|
|
624
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
625
|
+
if (data.EventTypes != null) {
|
|
626
|
+
contents.EventTypes = deserializeAws_restJson1EventTypeBatch(data.EventTypes, context);
|
|
627
|
+
}
|
|
628
|
+
if (data.NextToken != null) {
|
|
629
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
630
|
+
}
|
|
631
|
+
return [2, contents];
|
|
632
|
+
}
|
|
246
633
|
});
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
634
|
+
}); };
|
|
635
|
+
var deserializeAws_restJson1ListEventTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
636
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
637
|
+
var _c;
|
|
638
|
+
return __generator(this, function (_d) {
|
|
639
|
+
switch (_d.label) {
|
|
640
|
+
case 0:
|
|
641
|
+
_a = [__assign({}, output)];
|
|
642
|
+
_c = {};
|
|
643
|
+
return [4, parseErrorBody(output.body, context)];
|
|
644
|
+
case 1:
|
|
645
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
646
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
647
|
+
_b = errorCode;
|
|
648
|
+
switch (_b) {
|
|
649
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
650
|
+
case "com.amazonaws.codestarnotifications#InvalidNextTokenException": return [3, 2];
|
|
651
|
+
case "ValidationException": return [3, 4];
|
|
652
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 4];
|
|
653
|
+
}
|
|
654
|
+
return [3, 6];
|
|
655
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
656
|
+
case 3: throw _d.sent();
|
|
657
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
658
|
+
case 5: throw _d.sent();
|
|
659
|
+
case 6:
|
|
660
|
+
parsedBody = parsedOutput.body;
|
|
661
|
+
throwDefaultError({
|
|
662
|
+
output: output,
|
|
663
|
+
parsedBody: parsedBody,
|
|
664
|
+
exceptionCtor: __BaseException,
|
|
665
|
+
errorCode: errorCode,
|
|
666
|
+
});
|
|
667
|
+
_d.label = 7;
|
|
668
|
+
case 7: return [2];
|
|
669
|
+
}
|
|
255
670
|
});
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
671
|
+
}); };
|
|
672
|
+
export var deserializeAws_restJson1ListNotificationRulesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
673
|
+
var contents, data, _a, _b;
|
|
674
|
+
return __generator(this, function (_c) {
|
|
675
|
+
switch (_c.label) {
|
|
676
|
+
case 0:
|
|
677
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
678
|
+
return [2, deserializeAws_restJson1ListNotificationRulesCommandError(output, context)];
|
|
679
|
+
}
|
|
680
|
+
contents = map({
|
|
681
|
+
$metadata: deserializeMetadata(output),
|
|
682
|
+
});
|
|
683
|
+
_a = __expectNonNull;
|
|
684
|
+
_b = __expectObject;
|
|
685
|
+
return [4, parseBody(output.body, context)];
|
|
686
|
+
case 1:
|
|
687
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
688
|
+
if (data.NextToken != null) {
|
|
689
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
690
|
+
}
|
|
691
|
+
if (data.NotificationRules != null) {
|
|
692
|
+
contents.NotificationRules = deserializeAws_restJson1NotificationRuleBatch(data.NotificationRules, context);
|
|
693
|
+
}
|
|
694
|
+
return [2, contents];
|
|
695
|
+
}
|
|
266
696
|
});
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
697
|
+
}); };
|
|
698
|
+
var deserializeAws_restJson1ListNotificationRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
699
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
700
|
+
var _c;
|
|
701
|
+
return __generator(this, function (_d) {
|
|
702
|
+
switch (_d.label) {
|
|
703
|
+
case 0:
|
|
704
|
+
_a = [__assign({}, output)];
|
|
705
|
+
_c = {};
|
|
706
|
+
return [4, parseErrorBody(output.body, context)];
|
|
707
|
+
case 1:
|
|
708
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
709
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
710
|
+
_b = errorCode;
|
|
711
|
+
switch (_b) {
|
|
712
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
713
|
+
case "com.amazonaws.codestarnotifications#InvalidNextTokenException": return [3, 2];
|
|
714
|
+
case "ValidationException": return [3, 4];
|
|
715
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 4];
|
|
716
|
+
}
|
|
717
|
+
return [3, 6];
|
|
718
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
719
|
+
case 3: throw _d.sent();
|
|
720
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
721
|
+
case 5: throw _d.sent();
|
|
722
|
+
case 6:
|
|
723
|
+
parsedBody = parsedOutput.body;
|
|
724
|
+
throwDefaultError({
|
|
725
|
+
output: output,
|
|
726
|
+
parsedBody: parsedBody,
|
|
727
|
+
exceptionCtor: __BaseException,
|
|
728
|
+
errorCode: errorCode,
|
|
729
|
+
});
|
|
730
|
+
_d.label = 7;
|
|
731
|
+
case 7: return [2];
|
|
732
|
+
}
|
|
284
733
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
734
|
+
}); };
|
|
735
|
+
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
736
|
+
var contents, data, _a, _b;
|
|
737
|
+
return __generator(this, function (_c) {
|
|
738
|
+
switch (_c.label) {
|
|
739
|
+
case 0:
|
|
740
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
741
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
742
|
+
}
|
|
743
|
+
contents = map({
|
|
744
|
+
$metadata: deserializeMetadata(output),
|
|
745
|
+
});
|
|
746
|
+
_a = __expectNonNull;
|
|
747
|
+
_b = __expectObject;
|
|
748
|
+
return [4, parseBody(output.body, context)];
|
|
749
|
+
case 1:
|
|
750
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
751
|
+
if (data.Tags != null) {
|
|
752
|
+
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
753
|
+
}
|
|
754
|
+
return [2, contents];
|
|
755
|
+
}
|
|
293
756
|
});
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
757
|
+
}); };
|
|
758
|
+
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
759
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
760
|
+
var _c;
|
|
761
|
+
return __generator(this, function (_d) {
|
|
762
|
+
switch (_d.label) {
|
|
763
|
+
case 0:
|
|
764
|
+
_a = [__assign({}, output)];
|
|
765
|
+
_c = {};
|
|
766
|
+
return [4, parseErrorBody(output.body, context)];
|
|
767
|
+
case 1:
|
|
768
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
769
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
770
|
+
_b = errorCode;
|
|
771
|
+
switch (_b) {
|
|
772
|
+
case "ResourceNotFoundException": return [3, 2];
|
|
773
|
+
case "com.amazonaws.codestarnotifications#ResourceNotFoundException": return [3, 2];
|
|
774
|
+
case "ValidationException": return [3, 4];
|
|
775
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 4];
|
|
776
|
+
}
|
|
777
|
+
return [3, 6];
|
|
778
|
+
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
779
|
+
case 3: throw _d.sent();
|
|
780
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
781
|
+
case 5: throw _d.sent();
|
|
782
|
+
case 6:
|
|
783
|
+
parsedBody = parsedOutput.body;
|
|
784
|
+
throwDefaultError({
|
|
785
|
+
output: output,
|
|
786
|
+
parsedBody: parsedBody,
|
|
787
|
+
exceptionCtor: __BaseException,
|
|
788
|
+
errorCode: errorCode,
|
|
789
|
+
});
|
|
790
|
+
_d.label = 7;
|
|
791
|
+
case 7: return [2];
|
|
792
|
+
}
|
|
301
793
|
});
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
case "ResourceAlreadyExistsException":
|
|
328
|
-
case "com.amazonaws.codestarnotifications#ResourceAlreadyExistsException":
|
|
329
|
-
throw await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
330
|
-
case "ValidationException":
|
|
331
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
332
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
333
|
-
default:
|
|
334
|
-
const parsedBody = parsedOutput.body;
|
|
335
|
-
throwDefaultError({
|
|
336
|
-
output,
|
|
337
|
-
parsedBody,
|
|
338
|
-
exceptionCtor: __BaseException,
|
|
339
|
-
errorCode,
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
export const deserializeAws_restJson1DeleteNotificationRuleCommand = async (output, context) => {
|
|
344
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
345
|
-
return deserializeAws_restJson1DeleteNotificationRuleCommandError(output, context);
|
|
346
|
-
}
|
|
347
|
-
const contents = map({
|
|
348
|
-
$metadata: deserializeMetadata(output),
|
|
794
|
+
}); };
|
|
795
|
+
export var deserializeAws_restJson1ListTargetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
796
|
+
var contents, data, _a, _b;
|
|
797
|
+
return __generator(this, function (_c) {
|
|
798
|
+
switch (_c.label) {
|
|
799
|
+
case 0:
|
|
800
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
801
|
+
return [2, deserializeAws_restJson1ListTargetsCommandError(output, context)];
|
|
802
|
+
}
|
|
803
|
+
contents = map({
|
|
804
|
+
$metadata: deserializeMetadata(output),
|
|
805
|
+
});
|
|
806
|
+
_a = __expectNonNull;
|
|
807
|
+
_b = __expectObject;
|
|
808
|
+
return [4, parseBody(output.body, context)];
|
|
809
|
+
case 1:
|
|
810
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
811
|
+
if (data.NextToken != null) {
|
|
812
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
813
|
+
}
|
|
814
|
+
if (data.Targets != null) {
|
|
815
|
+
contents.Targets = deserializeAws_restJson1TargetsBatch(data.Targets, context);
|
|
816
|
+
}
|
|
817
|
+
return [2, contents];
|
|
818
|
+
}
|
|
349
819
|
});
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
parsedBody
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
const contents = map({
|
|
387
|
-
$metadata: deserializeMetadata(output),
|
|
820
|
+
}); };
|
|
821
|
+
var deserializeAws_restJson1ListTargetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
822
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
823
|
+
var _c;
|
|
824
|
+
return __generator(this, function (_d) {
|
|
825
|
+
switch (_d.label) {
|
|
826
|
+
case 0:
|
|
827
|
+
_a = [__assign({}, output)];
|
|
828
|
+
_c = {};
|
|
829
|
+
return [4, parseErrorBody(output.body, context)];
|
|
830
|
+
case 1:
|
|
831
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
832
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
833
|
+
_b = errorCode;
|
|
834
|
+
switch (_b) {
|
|
835
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
836
|
+
case "com.amazonaws.codestarnotifications#InvalidNextTokenException": return [3, 2];
|
|
837
|
+
case "ValidationException": return [3, 4];
|
|
838
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 4];
|
|
839
|
+
}
|
|
840
|
+
return [3, 6];
|
|
841
|
+
case 2: return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
842
|
+
case 3: throw _d.sent();
|
|
843
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
844
|
+
case 5: throw _d.sent();
|
|
845
|
+
case 6:
|
|
846
|
+
parsedBody = parsedOutput.body;
|
|
847
|
+
throwDefaultError({
|
|
848
|
+
output: output,
|
|
849
|
+
parsedBody: parsedBody,
|
|
850
|
+
exceptionCtor: __BaseException,
|
|
851
|
+
errorCode: errorCode,
|
|
852
|
+
});
|
|
853
|
+
_d.label = 7;
|
|
854
|
+
case 7: return [2];
|
|
855
|
+
}
|
|
388
856
|
});
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
};
|
|
412
|
-
export const deserializeAws_restJson1DescribeNotificationRuleCommand = async (output, context) => {
|
|
413
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
414
|
-
return deserializeAws_restJson1DescribeNotificationRuleCommandError(output, context);
|
|
415
|
-
}
|
|
416
|
-
const contents = map({
|
|
417
|
-
$metadata: deserializeMetadata(output),
|
|
857
|
+
}); };
|
|
858
|
+
export var deserializeAws_restJson1SubscribeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
859
|
+
var contents, data, _a, _b;
|
|
860
|
+
return __generator(this, function (_c) {
|
|
861
|
+
switch (_c.label) {
|
|
862
|
+
case 0:
|
|
863
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
864
|
+
return [2, deserializeAws_restJson1SubscribeCommandError(output, context)];
|
|
865
|
+
}
|
|
866
|
+
contents = map({
|
|
867
|
+
$metadata: deserializeMetadata(output),
|
|
868
|
+
});
|
|
869
|
+
_a = __expectNonNull;
|
|
870
|
+
_b = __expectObject;
|
|
871
|
+
return [4, parseBody(output.body, context)];
|
|
872
|
+
case 1:
|
|
873
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
874
|
+
if (data.Arn != null) {
|
|
875
|
+
contents.Arn = __expectString(data.Arn);
|
|
876
|
+
}
|
|
877
|
+
return [2, contents];
|
|
878
|
+
}
|
|
418
879
|
});
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
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
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
461
|
-
switch (errorCode) {
|
|
462
|
-
case "ResourceNotFoundException":
|
|
463
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
464
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
465
|
-
case "ValidationException":
|
|
466
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
467
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
468
|
-
default:
|
|
469
|
-
const parsedBody = parsedOutput.body;
|
|
470
|
-
throwDefaultError({
|
|
471
|
-
output,
|
|
472
|
-
parsedBody,
|
|
473
|
-
exceptionCtor: __BaseException,
|
|
474
|
-
errorCode,
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
export const deserializeAws_restJson1ListEventTypesCommand = async (output, context) => {
|
|
479
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
480
|
-
return deserializeAws_restJson1ListEventTypesCommandError(output, context);
|
|
481
|
-
}
|
|
482
|
-
const contents = map({
|
|
483
|
-
$metadata: deserializeMetadata(output),
|
|
880
|
+
}); };
|
|
881
|
+
var deserializeAws_restJson1SubscribeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
882
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
883
|
+
var _c;
|
|
884
|
+
return __generator(this, function (_d) {
|
|
885
|
+
switch (_d.label) {
|
|
886
|
+
case 0:
|
|
887
|
+
_a = [__assign({}, output)];
|
|
888
|
+
_c = {};
|
|
889
|
+
return [4, parseErrorBody(output.body, context)];
|
|
890
|
+
case 1:
|
|
891
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
892
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
893
|
+
_b = errorCode;
|
|
894
|
+
switch (_b) {
|
|
895
|
+
case "ConfigurationException": return [3, 2];
|
|
896
|
+
case "com.amazonaws.codestarnotifications#ConfigurationException": return [3, 2];
|
|
897
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
898
|
+
case "com.amazonaws.codestarnotifications#ResourceNotFoundException": return [3, 4];
|
|
899
|
+
case "ValidationException": return [3, 6];
|
|
900
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 6];
|
|
901
|
+
}
|
|
902
|
+
return [3, 8];
|
|
903
|
+
case 2: return [4, deserializeAws_restJson1ConfigurationExceptionResponse(parsedOutput, context)];
|
|
904
|
+
case 3: throw _d.sent();
|
|
905
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
906
|
+
case 5: throw _d.sent();
|
|
907
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
908
|
+
case 7: throw _d.sent();
|
|
909
|
+
case 8:
|
|
910
|
+
parsedBody = parsedOutput.body;
|
|
911
|
+
throwDefaultError({
|
|
912
|
+
output: output,
|
|
913
|
+
parsedBody: parsedBody,
|
|
914
|
+
exceptionCtor: __BaseException,
|
|
915
|
+
errorCode: errorCode,
|
|
916
|
+
});
|
|
917
|
+
_d.label = 9;
|
|
918
|
+
case 9: return [2];
|
|
919
|
+
}
|
|
484
920
|
});
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
default:
|
|
508
|
-
const parsedBody = parsedOutput.body;
|
|
509
|
-
throwDefaultError({
|
|
510
|
-
output,
|
|
511
|
-
parsedBody,
|
|
512
|
-
exceptionCtor: __BaseException,
|
|
513
|
-
errorCode,
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
};
|
|
517
|
-
export const deserializeAws_restJson1ListNotificationRulesCommand = async (output, context) => {
|
|
518
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
519
|
-
return deserializeAws_restJson1ListNotificationRulesCommandError(output, context);
|
|
520
|
-
}
|
|
521
|
-
const contents = map({
|
|
522
|
-
$metadata: deserializeMetadata(output),
|
|
921
|
+
}); };
|
|
922
|
+
export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
923
|
+
var contents, data, _a, _b;
|
|
924
|
+
return __generator(this, function (_c) {
|
|
925
|
+
switch (_c.label) {
|
|
926
|
+
case 0:
|
|
927
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
928
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
929
|
+
}
|
|
930
|
+
contents = map({
|
|
931
|
+
$metadata: deserializeMetadata(output),
|
|
932
|
+
});
|
|
933
|
+
_a = __expectNonNull;
|
|
934
|
+
_b = __expectObject;
|
|
935
|
+
return [4, parseBody(output.body, context)];
|
|
936
|
+
case 1:
|
|
937
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
938
|
+
if (data.Tags != null) {
|
|
939
|
+
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
940
|
+
}
|
|
941
|
+
return [2, contents];
|
|
942
|
+
}
|
|
523
943
|
});
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
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
|
-
|
|
944
|
+
}); };
|
|
945
|
+
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
946
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
947
|
+
var _c;
|
|
948
|
+
return __generator(this, function (_d) {
|
|
949
|
+
switch (_d.label) {
|
|
950
|
+
case 0:
|
|
951
|
+
_a = [__assign({}, output)];
|
|
952
|
+
_c = {};
|
|
953
|
+
return [4, parseErrorBody(output.body, context)];
|
|
954
|
+
case 1:
|
|
955
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
956
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
957
|
+
_b = errorCode;
|
|
958
|
+
switch (_b) {
|
|
959
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
960
|
+
case "com.amazonaws.codestarnotifications#ConcurrentModificationException": return [3, 2];
|
|
961
|
+
case "LimitExceededException": return [3, 4];
|
|
962
|
+
case "com.amazonaws.codestarnotifications#LimitExceededException": return [3, 4];
|
|
963
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
964
|
+
case "com.amazonaws.codestarnotifications#ResourceNotFoundException": return [3, 6];
|
|
965
|
+
case "ValidationException": return [3, 8];
|
|
966
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 8];
|
|
967
|
+
}
|
|
968
|
+
return [3, 10];
|
|
969
|
+
case 2: return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
970
|
+
case 3: throw _d.sent();
|
|
971
|
+
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
972
|
+
case 5: throw _d.sent();
|
|
973
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
974
|
+
case 7: throw _d.sent();
|
|
975
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
976
|
+
case 9: throw _d.sent();
|
|
977
|
+
case 10:
|
|
978
|
+
parsedBody = parsedOutput.body;
|
|
979
|
+
throwDefaultError({
|
|
980
|
+
output: output,
|
|
981
|
+
parsedBody: parsedBody,
|
|
982
|
+
exceptionCtor: __BaseException,
|
|
983
|
+
errorCode: errorCode,
|
|
984
|
+
});
|
|
985
|
+
_d.label = 11;
|
|
986
|
+
case 11: return [2];
|
|
987
|
+
}
|
|
562
988
|
});
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
output,
|
|
586
|
-
parsedBody,
|
|
587
|
-
exceptionCtor: __BaseException,
|
|
588
|
-
errorCode,
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
export const deserializeAws_restJson1ListTargetsCommand = async (output, context) => {
|
|
593
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
594
|
-
return deserializeAws_restJson1ListTargetsCommandError(output, context);
|
|
595
|
-
}
|
|
596
|
-
const contents = map({
|
|
597
|
-
$metadata: deserializeMetadata(output),
|
|
989
|
+
}); };
|
|
990
|
+
export var deserializeAws_restJson1UnsubscribeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
991
|
+
var contents, data, _a, _b;
|
|
992
|
+
return __generator(this, function (_c) {
|
|
993
|
+
switch (_c.label) {
|
|
994
|
+
case 0:
|
|
995
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
996
|
+
return [2, deserializeAws_restJson1UnsubscribeCommandError(output, context)];
|
|
997
|
+
}
|
|
998
|
+
contents = map({
|
|
999
|
+
$metadata: deserializeMetadata(output),
|
|
1000
|
+
});
|
|
1001
|
+
_a = __expectNonNull;
|
|
1002
|
+
_b = __expectObject;
|
|
1003
|
+
return [4, parseBody(output.body, context)];
|
|
1004
|
+
case 1:
|
|
1005
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1006
|
+
if (data.Arn != null) {
|
|
1007
|
+
contents.Arn = __expectString(data.Arn);
|
|
1008
|
+
}
|
|
1009
|
+
return [2, contents];
|
|
1010
|
+
}
|
|
598
1011
|
});
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
};
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
631
|
-
export const deserializeAws_restJson1SubscribeCommand = async (output, context) => {
|
|
632
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
633
|
-
return deserializeAws_restJson1SubscribeCommandError(output, context);
|
|
634
|
-
}
|
|
635
|
-
const contents = map({
|
|
636
|
-
$metadata: deserializeMetadata(output),
|
|
1012
|
+
}); };
|
|
1013
|
+
var deserializeAws_restJson1UnsubscribeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1014
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1015
|
+
var _c;
|
|
1016
|
+
return __generator(this, function (_d) {
|
|
1017
|
+
switch (_d.label) {
|
|
1018
|
+
case 0:
|
|
1019
|
+
_a = [__assign({}, output)];
|
|
1020
|
+
_c = {};
|
|
1021
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1022
|
+
case 1:
|
|
1023
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1024
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1025
|
+
_b = errorCode;
|
|
1026
|
+
switch (_b) {
|
|
1027
|
+
case "ValidationException": return [3, 2];
|
|
1028
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 2];
|
|
1029
|
+
}
|
|
1030
|
+
return [3, 4];
|
|
1031
|
+
case 2: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1032
|
+
case 3: throw _d.sent();
|
|
1033
|
+
case 4:
|
|
1034
|
+
parsedBody = parsedOutput.body;
|
|
1035
|
+
throwDefaultError({
|
|
1036
|
+
output: output,
|
|
1037
|
+
parsedBody: parsedBody,
|
|
1038
|
+
exceptionCtor: __BaseException,
|
|
1039
|
+
errorCode: errorCode,
|
|
1040
|
+
});
|
|
1041
|
+
_d.label = 5;
|
|
1042
|
+
case 5: return [2];
|
|
1043
|
+
}
|
|
637
1044
|
});
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
656
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
657
|
-
case "ValidationException":
|
|
658
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
659
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
660
|
-
default:
|
|
661
|
-
const parsedBody = parsedOutput.body;
|
|
662
|
-
throwDefaultError({
|
|
663
|
-
output,
|
|
664
|
-
parsedBody,
|
|
665
|
-
exceptionCtor: __BaseException,
|
|
666
|
-
errorCode,
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
671
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
672
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
673
|
-
}
|
|
674
|
-
const contents = map({
|
|
675
|
-
$metadata: deserializeMetadata(output),
|
|
1045
|
+
}); };
|
|
1046
|
+
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1047
|
+
var contents;
|
|
1048
|
+
return __generator(this, function (_a) {
|
|
1049
|
+
switch (_a.label) {
|
|
1050
|
+
case 0:
|
|
1051
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1052
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
1053
|
+
}
|
|
1054
|
+
contents = map({
|
|
1055
|
+
$metadata: deserializeMetadata(output),
|
|
1056
|
+
});
|
|
1057
|
+
return [4, collectBody(output.body, context)];
|
|
1058
|
+
case 1:
|
|
1059
|
+
_a.sent();
|
|
1060
|
+
return [2, contents];
|
|
1061
|
+
}
|
|
676
1062
|
});
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
return
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
1063
|
+
}); };
|
|
1064
|
+
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1065
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1066
|
+
var _c;
|
|
1067
|
+
return __generator(this, function (_d) {
|
|
1068
|
+
switch (_d.label) {
|
|
1069
|
+
case 0:
|
|
1070
|
+
_a = [__assign({}, output)];
|
|
1071
|
+
_c = {};
|
|
1072
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1073
|
+
case 1:
|
|
1074
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1075
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1076
|
+
_b = errorCode;
|
|
1077
|
+
switch (_b) {
|
|
1078
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
1079
|
+
case "com.amazonaws.codestarnotifications#ConcurrentModificationException": return [3, 2];
|
|
1080
|
+
case "LimitExceededException": return [3, 4];
|
|
1081
|
+
case "com.amazonaws.codestarnotifications#LimitExceededException": return [3, 4];
|
|
1082
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1083
|
+
case "com.amazonaws.codestarnotifications#ResourceNotFoundException": return [3, 6];
|
|
1084
|
+
case "ValidationException": return [3, 8];
|
|
1085
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 8];
|
|
1086
|
+
}
|
|
1087
|
+
return [3, 10];
|
|
1088
|
+
case 2: return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
1089
|
+
case 3: throw _d.sent();
|
|
1090
|
+
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1091
|
+
case 5: throw _d.sent();
|
|
1092
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1093
|
+
case 7: throw _d.sent();
|
|
1094
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1095
|
+
case 9: throw _d.sent();
|
|
1096
|
+
case 10:
|
|
1097
|
+
parsedBody = parsedOutput.body;
|
|
1098
|
+
throwDefaultError({
|
|
1099
|
+
output: output,
|
|
1100
|
+
parsedBody: parsedBody,
|
|
1101
|
+
exceptionCtor: __BaseException,
|
|
1102
|
+
errorCode: errorCode,
|
|
1103
|
+
});
|
|
1104
|
+
_d.label = 11;
|
|
1105
|
+
case 11: return [2];
|
|
1106
|
+
}
|
|
718
1107
|
});
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
const parsedBody = parsedOutput.body;
|
|
737
|
-
throwDefaultError({
|
|
738
|
-
output,
|
|
739
|
-
parsedBody,
|
|
740
|
-
exceptionCtor: __BaseException,
|
|
741
|
-
errorCode,
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
};
|
|
745
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
746
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
747
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
748
|
-
}
|
|
749
|
-
const contents = map({
|
|
750
|
-
$metadata: deserializeMetadata(output),
|
|
1108
|
+
}); };
|
|
1109
|
+
export var deserializeAws_restJson1UpdateNotificationRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1110
|
+
var contents;
|
|
1111
|
+
return __generator(this, function (_a) {
|
|
1112
|
+
switch (_a.label) {
|
|
1113
|
+
case 0:
|
|
1114
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1115
|
+
return [2, deserializeAws_restJson1UpdateNotificationRuleCommandError(output, context)];
|
|
1116
|
+
}
|
|
1117
|
+
contents = map({
|
|
1118
|
+
$metadata: deserializeMetadata(output),
|
|
1119
|
+
});
|
|
1120
|
+
return [4, collectBody(output.body, context)];
|
|
1121
|
+
case 1:
|
|
1122
|
+
_a.sent();
|
|
1123
|
+
return [2, contents];
|
|
1124
|
+
}
|
|
751
1125
|
});
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
1126
|
+
}); };
|
|
1127
|
+
var deserializeAws_restJson1UpdateNotificationRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1128
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1129
|
+
var _c;
|
|
1130
|
+
return __generator(this, function (_d) {
|
|
1131
|
+
switch (_d.label) {
|
|
1132
|
+
case 0:
|
|
1133
|
+
_a = [__assign({}, output)];
|
|
1134
|
+
_c = {};
|
|
1135
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1136
|
+
case 1:
|
|
1137
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1138
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1139
|
+
_b = errorCode;
|
|
1140
|
+
switch (_b) {
|
|
1141
|
+
case "ConfigurationException": return [3, 2];
|
|
1142
|
+
case "com.amazonaws.codestarnotifications#ConfigurationException": return [3, 2];
|
|
1143
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
1144
|
+
case "com.amazonaws.codestarnotifications#ResourceNotFoundException": return [3, 4];
|
|
1145
|
+
case "ValidationException": return [3, 6];
|
|
1146
|
+
case "com.amazonaws.codestarnotifications#ValidationException": return [3, 6];
|
|
1147
|
+
}
|
|
1148
|
+
return [3, 8];
|
|
1149
|
+
case 2: return [4, deserializeAws_restJson1ConfigurationExceptionResponse(parsedOutput, context)];
|
|
1150
|
+
case 3: throw _d.sent();
|
|
1151
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1152
|
+
case 5: throw _d.sent();
|
|
1153
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1154
|
+
case 7: throw _d.sent();
|
|
1155
|
+
case 8:
|
|
1156
|
+
parsedBody = parsedOutput.body;
|
|
1157
|
+
throwDefaultError({
|
|
1158
|
+
output: output,
|
|
1159
|
+
parsedBody: parsedBody,
|
|
1160
|
+
exceptionCtor: __BaseException,
|
|
1161
|
+
errorCode: errorCode,
|
|
1162
|
+
});
|
|
1163
|
+
_d.label = 9;
|
|
1164
|
+
case 9: return [2];
|
|
1165
|
+
}
|
|
790
1166
|
});
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
throw await deserializeAws_restJson1ConfigurationExceptionResponse(parsedOutput, context);
|
|
804
|
-
case "ResourceNotFoundException":
|
|
805
|
-
case "com.amazonaws.codestarnotifications#ResourceNotFoundException":
|
|
806
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
807
|
-
case "ValidationException":
|
|
808
|
-
case "com.amazonaws.codestarnotifications#ValidationException":
|
|
809
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
810
|
-
default:
|
|
811
|
-
const parsedBody = parsedOutput.body;
|
|
812
|
-
throwDefaultError({
|
|
813
|
-
output,
|
|
814
|
-
parsedBody,
|
|
815
|
-
exceptionCtor: __BaseException,
|
|
816
|
-
errorCode,
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
const map = __map;
|
|
821
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
822
|
-
const contents = map({});
|
|
823
|
-
const data = parsedOutput.body;
|
|
824
|
-
if (data.Message != null) {
|
|
825
|
-
contents.Message = __expectString(data.Message);
|
|
826
|
-
}
|
|
827
|
-
const exception = new AccessDeniedException({
|
|
828
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
829
|
-
...contents,
|
|
1167
|
+
}); };
|
|
1168
|
+
var map = __map;
|
|
1169
|
+
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1170
|
+
var contents, data, exception;
|
|
1171
|
+
return __generator(this, function (_a) {
|
|
1172
|
+
contents = map({});
|
|
1173
|
+
data = parsedOutput.body;
|
|
1174
|
+
if (data.Message != null) {
|
|
1175
|
+
contents.Message = __expectString(data.Message);
|
|
1176
|
+
}
|
|
1177
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1178
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
830
1179
|
});
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
841
|
-
|
|
1180
|
+
}); };
|
|
1181
|
+
var deserializeAws_restJson1ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1182
|
+
var contents, data, exception;
|
|
1183
|
+
return __generator(this, function (_a) {
|
|
1184
|
+
contents = map({});
|
|
1185
|
+
data = parsedOutput.body;
|
|
1186
|
+
if (data.Message != null) {
|
|
1187
|
+
contents.Message = __expectString(data.Message);
|
|
1188
|
+
}
|
|
1189
|
+
exception = new ConcurrentModificationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1190
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
842
1191
|
});
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
853
|
-
|
|
1192
|
+
}); };
|
|
1193
|
+
var deserializeAws_restJson1ConfigurationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1194
|
+
var contents, data, exception;
|
|
1195
|
+
return __generator(this, function (_a) {
|
|
1196
|
+
contents = map({});
|
|
1197
|
+
data = parsedOutput.body;
|
|
1198
|
+
if (data.Message != null) {
|
|
1199
|
+
contents.Message = __expectString(data.Message);
|
|
1200
|
+
}
|
|
1201
|
+
exception = new ConfigurationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1202
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
854
1203
|
});
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
865
|
-
|
|
1204
|
+
}); };
|
|
1205
|
+
var deserializeAws_restJson1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1206
|
+
var contents, data, exception;
|
|
1207
|
+
return __generator(this, function (_a) {
|
|
1208
|
+
contents = map({});
|
|
1209
|
+
data = parsedOutput.body;
|
|
1210
|
+
if (data.Message != null) {
|
|
1211
|
+
contents.Message = __expectString(data.Message);
|
|
1212
|
+
}
|
|
1213
|
+
exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1214
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
866
1215
|
});
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
877
|
-
|
|
1216
|
+
}); };
|
|
1217
|
+
var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1218
|
+
var contents, data, exception;
|
|
1219
|
+
return __generator(this, function (_a) {
|
|
1220
|
+
contents = map({});
|
|
1221
|
+
data = parsedOutput.body;
|
|
1222
|
+
if (data.Message != null) {
|
|
1223
|
+
contents.Message = __expectString(data.Message);
|
|
1224
|
+
}
|
|
1225
|
+
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1226
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
878
1227
|
});
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
889
|
-
|
|
1228
|
+
}); };
|
|
1229
|
+
var deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1230
|
+
var contents, data, exception;
|
|
1231
|
+
return __generator(this, function (_a) {
|
|
1232
|
+
contents = map({});
|
|
1233
|
+
data = parsedOutput.body;
|
|
1234
|
+
if (data.Message != null) {
|
|
1235
|
+
contents.Message = __expectString(data.Message);
|
|
1236
|
+
}
|
|
1237
|
+
exception = new ResourceAlreadyExistsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1238
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
890
1239
|
});
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
901
|
-
|
|
1240
|
+
}); };
|
|
1241
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1242
|
+
var contents, data, exception;
|
|
1243
|
+
return __generator(this, function (_a) {
|
|
1244
|
+
contents = map({});
|
|
1245
|
+
data = parsedOutput.body;
|
|
1246
|
+
if (data.Message != null) {
|
|
1247
|
+
contents.Message = __expectString(data.Message);
|
|
1248
|
+
}
|
|
1249
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1250
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
902
1251
|
});
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
913
|
-
|
|
1252
|
+
}); };
|
|
1253
|
+
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1254
|
+
var contents, data, exception;
|
|
1255
|
+
return __generator(this, function (_a) {
|
|
1256
|
+
contents = map({});
|
|
1257
|
+
data = parsedOutput.body;
|
|
1258
|
+
if (data.Message != null) {
|
|
1259
|
+
contents.Message = __expectString(data.Message);
|
|
1260
|
+
}
|
|
1261
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1262
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
914
1263
|
});
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
const serializeAws_restJson1EventTypeIds = (input, context) => {
|
|
1264
|
+
}); };
|
|
1265
|
+
var serializeAws_restJson1EventTypeIds = function (input, context) {
|
|
918
1266
|
return input
|
|
919
|
-
.filter((e)
|
|
920
|
-
.map((entry)
|
|
1267
|
+
.filter(function (e) { return e != null; })
|
|
1268
|
+
.map(function (entry) {
|
|
921
1269
|
return entry;
|
|
922
1270
|
});
|
|
923
1271
|
};
|
|
924
|
-
|
|
925
|
-
return {
|
|
926
|
-
...(input.Name != null && { Name: input.Name }),
|
|
927
|
-
...(input.Value != null && { Value: input.Value }),
|
|
928
|
-
};
|
|
1272
|
+
var serializeAws_restJson1ListEventTypesFilter = function (input, context) {
|
|
1273
|
+
return __assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.Value != null && { Value: input.Value }));
|
|
929
1274
|
};
|
|
930
|
-
|
|
1275
|
+
var serializeAws_restJson1ListEventTypesFilters = function (input, context) {
|
|
931
1276
|
return input
|
|
932
|
-
.filter((e)
|
|
933
|
-
.map((entry)
|
|
1277
|
+
.filter(function (e) { return e != null; })
|
|
1278
|
+
.map(function (entry) {
|
|
934
1279
|
return serializeAws_restJson1ListEventTypesFilter(entry, context);
|
|
935
1280
|
});
|
|
936
1281
|
};
|
|
937
|
-
|
|
938
|
-
return {
|
|
939
|
-
...(input.Name != null && { Name: input.Name }),
|
|
940
|
-
...(input.Value != null && { Value: input.Value }),
|
|
941
|
-
};
|
|
1282
|
+
var serializeAws_restJson1ListNotificationRulesFilter = function (input, context) {
|
|
1283
|
+
return __assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.Value != null && { Value: input.Value }));
|
|
942
1284
|
};
|
|
943
|
-
|
|
1285
|
+
var serializeAws_restJson1ListNotificationRulesFilters = function (input, context) {
|
|
944
1286
|
return input
|
|
945
|
-
.filter((e)
|
|
946
|
-
.map((entry)
|
|
1287
|
+
.filter(function (e) { return e != null; })
|
|
1288
|
+
.map(function (entry) {
|
|
947
1289
|
return serializeAws_restJson1ListNotificationRulesFilter(entry, context);
|
|
948
1290
|
});
|
|
949
1291
|
};
|
|
950
|
-
|
|
951
|
-
return {
|
|
952
|
-
...(input.Name != null && { Name: input.Name }),
|
|
953
|
-
...(input.Value != null && { Value: input.Value }),
|
|
954
|
-
};
|
|
1292
|
+
var serializeAws_restJson1ListTargetsFilter = function (input, context) {
|
|
1293
|
+
return __assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.Value != null && { Value: input.Value }));
|
|
955
1294
|
};
|
|
956
|
-
|
|
1295
|
+
var serializeAws_restJson1ListTargetsFilters = function (input, context) {
|
|
957
1296
|
return input
|
|
958
|
-
.filter((e)
|
|
959
|
-
.map((entry)
|
|
1297
|
+
.filter(function (e) { return e != null; })
|
|
1298
|
+
.map(function (entry) {
|
|
960
1299
|
return serializeAws_restJson1ListTargetsFilter(entry, context);
|
|
961
1300
|
});
|
|
962
1301
|
};
|
|
963
|
-
|
|
964
|
-
return Object.entries(input).reduce((acc,
|
|
1302
|
+
var serializeAws_restJson1Tags = function (input, context) {
|
|
1303
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1304
|
+
var _b;
|
|
1305
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
965
1306
|
if (value === null) {
|
|
966
1307
|
return acc;
|
|
967
1308
|
}
|
|
968
|
-
return {
|
|
969
|
-
...acc,
|
|
970
|
-
[key]: value,
|
|
971
|
-
};
|
|
1309
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
972
1310
|
}, {});
|
|
973
1311
|
};
|
|
974
|
-
|
|
975
|
-
return {
|
|
976
|
-
...(input.TargetAddress != null && { TargetAddress: input.TargetAddress }),
|
|
977
|
-
...(input.TargetType != null && { TargetType: input.TargetType }),
|
|
978
|
-
};
|
|
1312
|
+
var serializeAws_restJson1Target = function (input, context) {
|
|
1313
|
+
return __assign(__assign({}, (input.TargetAddress != null && { TargetAddress: input.TargetAddress })), (input.TargetType != null && { TargetType: input.TargetType }));
|
|
979
1314
|
};
|
|
980
|
-
|
|
1315
|
+
var serializeAws_restJson1Targets = function (input, context) {
|
|
981
1316
|
return input
|
|
982
|
-
.filter((e)
|
|
983
|
-
.map((entry)
|
|
1317
|
+
.filter(function (e) { return e != null; })
|
|
1318
|
+
.map(function (entry) {
|
|
984
1319
|
return serializeAws_restJson1Target(entry, context);
|
|
985
1320
|
});
|
|
986
1321
|
};
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
.filter((e)
|
|
990
|
-
.map((entry)
|
|
1322
|
+
var deserializeAws_restJson1EventTypeBatch = function (output, context) {
|
|
1323
|
+
var retVal = (output || [])
|
|
1324
|
+
.filter(function (e) { return e != null; })
|
|
1325
|
+
.map(function (entry) {
|
|
991
1326
|
if (entry === null) {
|
|
992
1327
|
return null;
|
|
993
1328
|
}
|
|
@@ -995,7 +1330,7 @@ const deserializeAws_restJson1EventTypeBatch = (output, context) => {
|
|
|
995
1330
|
});
|
|
996
1331
|
return retVal;
|
|
997
1332
|
};
|
|
998
|
-
|
|
1333
|
+
var deserializeAws_restJson1EventTypeSummary = function (output, context) {
|
|
999
1334
|
return {
|
|
1000
1335
|
EventTypeId: __expectString(output.EventTypeId),
|
|
1001
1336
|
EventTypeName: __expectString(output.EventTypeName),
|
|
@@ -1003,10 +1338,10 @@ const deserializeAws_restJson1EventTypeSummary = (output, context) => {
|
|
|
1003
1338
|
ServiceName: __expectString(output.ServiceName),
|
|
1004
1339
|
};
|
|
1005
1340
|
};
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
.filter((e)
|
|
1009
|
-
.map((entry)
|
|
1341
|
+
var deserializeAws_restJson1NotificationRuleBatch = function (output, context) {
|
|
1342
|
+
var retVal = (output || [])
|
|
1343
|
+
.filter(function (e) { return e != null; })
|
|
1344
|
+
.map(function (entry) {
|
|
1010
1345
|
if (entry === null) {
|
|
1011
1346
|
return null;
|
|
1012
1347
|
}
|
|
@@ -1014,27 +1349,26 @@ const deserializeAws_restJson1NotificationRuleBatch = (output, context) => {
|
|
|
1014
1349
|
});
|
|
1015
1350
|
return retVal;
|
|
1016
1351
|
};
|
|
1017
|
-
|
|
1352
|
+
var deserializeAws_restJson1NotificationRuleSummary = function (output, context) {
|
|
1018
1353
|
return {
|
|
1019
1354
|
Arn: __expectString(output.Arn),
|
|
1020
1355
|
Id: __expectString(output.Id),
|
|
1021
1356
|
};
|
|
1022
1357
|
};
|
|
1023
|
-
|
|
1024
|
-
return Object.entries(output).reduce((acc,
|
|
1358
|
+
var deserializeAws_restJson1Tags = function (output, context) {
|
|
1359
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
1360
|
+
var _b;
|
|
1361
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1025
1362
|
if (value === null) {
|
|
1026
1363
|
return acc;
|
|
1027
1364
|
}
|
|
1028
|
-
return {
|
|
1029
|
-
...acc,
|
|
1030
|
-
[key]: __expectString(value),
|
|
1031
|
-
};
|
|
1365
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
1032
1366
|
}, {});
|
|
1033
1367
|
};
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
.filter((e)
|
|
1037
|
-
.map((entry)
|
|
1368
|
+
var deserializeAws_restJson1TargetsBatch = function (output, context) {
|
|
1369
|
+
var retVal = (output || [])
|
|
1370
|
+
.filter(function (e) { return e != null; })
|
|
1371
|
+
.map(function (entry) {
|
|
1038
1372
|
if (entry === null) {
|
|
1039
1373
|
return null;
|
|
1040
1374
|
}
|
|
@@ -1042,46 +1376,64 @@ const deserializeAws_restJson1TargetsBatch = (output, context) => {
|
|
|
1042
1376
|
});
|
|
1043
1377
|
return retVal;
|
|
1044
1378
|
};
|
|
1045
|
-
|
|
1379
|
+
var deserializeAws_restJson1TargetSummary = function (output, context) {
|
|
1046
1380
|
return {
|
|
1047
1381
|
TargetAddress: __expectString(output.TargetAddress),
|
|
1048
1382
|
TargetStatus: __expectString(output.TargetStatus),
|
|
1049
1383
|
TargetType: __expectString(output.TargetType),
|
|
1050
1384
|
};
|
|
1051
1385
|
};
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1386
|
+
var deserializeMetadata = function (output) {
|
|
1387
|
+
var _a, _b;
|
|
1388
|
+
return ({
|
|
1389
|
+
httpStatusCode: output.statusCode,
|
|
1390
|
+
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"],
|
|
1391
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1392
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1393
|
+
});
|
|
1394
|
+
};
|
|
1395
|
+
var collectBody = function (streamBody, context) {
|
|
1396
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1059
1397
|
if (streamBody instanceof Uint8Array) {
|
|
1060
1398
|
return Promise.resolve(streamBody);
|
|
1061
1399
|
}
|
|
1062
1400
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1063
1401
|
};
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
value !== null &&
|
|
1067
|
-
value !== "" &&
|
|
1068
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1069
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1070
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1071
|
-
if (encoded.length) {
|
|
1072
|
-
return JSON.parse(encoded);
|
|
1073
|
-
}
|
|
1074
|
-
return {};
|
|
1075
|
-
});
|
|
1076
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1077
|
-
const value = await parseBody(errorBody, context);
|
|
1078
|
-
value.message = value.message ?? value.Message;
|
|
1079
|
-
return value;
|
|
1402
|
+
var collectBodyString = function (streamBody, context) {
|
|
1403
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1080
1404
|
};
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1405
|
+
var isSerializableHeaderValue = function (value) {
|
|
1406
|
+
return value !== undefined &&
|
|
1407
|
+
value !== null &&
|
|
1408
|
+
value !== "" &&
|
|
1409
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1410
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1411
|
+
};
|
|
1412
|
+
var parseBody = function (streamBody, context) {
|
|
1413
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1414
|
+
if (encoded.length) {
|
|
1415
|
+
return JSON.parse(encoded);
|
|
1416
|
+
}
|
|
1417
|
+
return {};
|
|
1418
|
+
});
|
|
1419
|
+
};
|
|
1420
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1421
|
+
var value;
|
|
1422
|
+
var _a;
|
|
1423
|
+
return __generator(this, function (_b) {
|
|
1424
|
+
switch (_b.label) {
|
|
1425
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1426
|
+
case 1:
|
|
1427
|
+
value = _b.sent();
|
|
1428
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1429
|
+
return [2, value];
|
|
1430
|
+
}
|
|
1431
|
+
});
|
|
1432
|
+
}); };
|
|
1433
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1434
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1435
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1436
|
+
var cleanValue = rawValue;
|
|
1085
1437
|
if (typeof cleanValue === "number") {
|
|
1086
1438
|
cleanValue = cleanValue.toString();
|
|
1087
1439
|
}
|
|
@@ -1096,7 +1448,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1096
1448
|
}
|
|
1097
1449
|
return cleanValue;
|
|
1098
1450
|
};
|
|
1099
|
-
|
|
1451
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1100
1452
|
if (headerKey !== undefined) {
|
|
1101
1453
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1102
1454
|
}
|