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