@aws-sdk/client-rbin 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/Rbin.js +41 -34
- package/dist-es/RbinClient.js +28 -22
- package/dist-es/commands/CreateRuleCommand.js +28 -21
- package/dist-es/commands/DeleteRuleCommand.js +28 -21
- package/dist-es/commands/GetRuleCommand.js +28 -21
- package/dist-es/commands/ListRulesCommand.js +28 -21
- package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
- package/dist-es/commands/TagResourceCommand.js +28 -21
- package/dist-es/commands/UntagResourceCommand.js +28 -21
- package/dist-es/commands/UpdateRuleCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/RbinServiceException.js +10 -5
- package/dist-es/models/models_0.js +72 -111
- package/dist-es/pagination/ListRulesPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +861 -627
- 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,631 +1,847 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
4
5
|
import { RbinServiceException as __BaseException } from "../models/RbinServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
export var serializeAws_restJson1CreateRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rules";
|
|
17
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ResourceTags != null && {
|
|
18
|
+
ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
|
|
19
|
+
})), (input.ResourceType != null && { ResourceType: input.ResourceType })), (input.RetentionPeriod != null && {
|
|
20
|
+
RetentionPeriod: serializeAws_restJson1RetentionPeriod(input.RetentionPeriod, context),
|
|
21
|
+
})), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, 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
|
+
}
|
|
31
32
|
});
|
|
32
|
-
};
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
}); };
|
|
34
|
+
export var serializeAws_restJson1DeleteRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
35
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
36
|
+
return __generator(this, function (_c) {
|
|
37
|
+
switch (_c.label) {
|
|
38
|
+
case 0: return [4, context.endpoint()];
|
|
39
|
+
case 1:
|
|
40
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
41
|
+
headers = {};
|
|
42
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rules/{Identifier}";
|
|
43
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", function () { return input.Identifier; }, "{Identifier}", false);
|
|
44
|
+
return [2, new __HttpRequest({
|
|
45
|
+
protocol: protocol,
|
|
46
|
+
hostname: hostname,
|
|
47
|
+
port: port,
|
|
48
|
+
method: "DELETE",
|
|
49
|
+
headers: headers,
|
|
50
|
+
path: resolvedPath,
|
|
51
|
+
body: body,
|
|
52
|
+
})];
|
|
53
|
+
}
|
|
47
54
|
});
|
|
48
|
-
};
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
}); };
|
|
56
|
+
export var serializeAws_restJson1GetRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
58
|
+
return __generator(this, function (_c) {
|
|
59
|
+
switch (_c.label) {
|
|
60
|
+
case 0: return [4, context.endpoint()];
|
|
61
|
+
case 1:
|
|
62
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
63
|
+
headers = {};
|
|
64
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rules/{Identifier}";
|
|
65
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", function () { return input.Identifier; }, "{Identifier}", false);
|
|
66
|
+
return [2, new __HttpRequest({
|
|
67
|
+
protocol: protocol,
|
|
68
|
+
hostname: hostname,
|
|
69
|
+
port: port,
|
|
70
|
+
method: "GET",
|
|
71
|
+
headers: headers,
|
|
72
|
+
path: resolvedPath,
|
|
73
|
+
body: body,
|
|
74
|
+
})];
|
|
75
|
+
}
|
|
63
76
|
});
|
|
64
|
-
};
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
}); };
|
|
78
|
+
export var serializeAws_restJson1ListRulesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
80
|
+
return __generator(this, function (_c) {
|
|
81
|
+
switch (_c.label) {
|
|
82
|
+
case 0: return [4, context.endpoint()];
|
|
83
|
+
case 1:
|
|
84
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
85
|
+
headers = {
|
|
86
|
+
"content-type": "application/json",
|
|
87
|
+
};
|
|
88
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-rules";
|
|
89
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceTags != null && {
|
|
90
|
+
ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
|
|
91
|
+
})), (input.ResourceType != null && { ResourceType: input.ResourceType })));
|
|
92
|
+
return [2, new __HttpRequest({
|
|
93
|
+
protocol: protocol,
|
|
94
|
+
hostname: hostname,
|
|
95
|
+
port: port,
|
|
96
|
+
method: "POST",
|
|
97
|
+
headers: headers,
|
|
98
|
+
path: resolvedPath,
|
|
99
|
+
body: body,
|
|
100
|
+
})];
|
|
101
|
+
}
|
|
88
102
|
});
|
|
89
|
-
};
|
|
90
|
-
export
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
}); };
|
|
104
|
+
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
105
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
106
|
+
return __generator(this, function (_c) {
|
|
107
|
+
switch (_c.label) {
|
|
108
|
+
case 0: return [4, context.endpoint()];
|
|
109
|
+
case 1:
|
|
110
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
111
|
+
headers = {};
|
|
112
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
113
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
114
|
+
return [2, new __HttpRequest({
|
|
115
|
+
protocol: protocol,
|
|
116
|
+
hostname: hostname,
|
|
117
|
+
port: port,
|
|
118
|
+
method: "GET",
|
|
119
|
+
headers: headers,
|
|
120
|
+
path: resolvedPath,
|
|
121
|
+
body: body,
|
|
122
|
+
})];
|
|
123
|
+
}
|
|
104
124
|
});
|
|
105
|
-
};
|
|
106
|
-
export
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
}); };
|
|
126
|
+
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
127
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
128
|
+
return __generator(this, function (_c) {
|
|
129
|
+
switch (_c.label) {
|
|
130
|
+
case 0: return [4, context.endpoint()];
|
|
131
|
+
case 1:
|
|
132
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
133
|
+
headers = {
|
|
134
|
+
"content-type": "application/json",
|
|
135
|
+
};
|
|
136
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
137
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
138
|
+
body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
|
|
139
|
+
return [2, new __HttpRequest({
|
|
140
|
+
protocol: protocol,
|
|
141
|
+
hostname: hostname,
|
|
142
|
+
port: port,
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: headers,
|
|
145
|
+
path: resolvedPath,
|
|
146
|
+
body: body,
|
|
147
|
+
})];
|
|
148
|
+
}
|
|
125
149
|
});
|
|
126
|
-
};
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
}); };
|
|
151
|
+
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
153
|
+
return __generator(this, function (_c) {
|
|
154
|
+
switch (_c.label) {
|
|
155
|
+
case 0: return [4, context.endpoint()];
|
|
156
|
+
case 1:
|
|
157
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
158
|
+
headers = {};
|
|
159
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
160
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
161
|
+
query = map({
|
|
162
|
+
tagKeys: [function () { return input.TagKeys !== void 0; }, function () { return (input.TagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
163
|
+
});
|
|
164
|
+
return [2, new __HttpRequest({
|
|
165
|
+
protocol: protocol,
|
|
166
|
+
hostname: hostname,
|
|
167
|
+
port: port,
|
|
168
|
+
method: "DELETE",
|
|
169
|
+
headers: headers,
|
|
170
|
+
path: resolvedPath,
|
|
171
|
+
query: query,
|
|
172
|
+
body: body,
|
|
173
|
+
})];
|
|
174
|
+
}
|
|
145
175
|
});
|
|
146
|
-
};
|
|
147
|
-
export
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
176
|
+
}); };
|
|
177
|
+
export var serializeAws_restJson1UpdateRuleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
179
|
+
return __generator(this, function (_c) {
|
|
180
|
+
switch (_c.label) {
|
|
181
|
+
case 0: return [4, context.endpoint()];
|
|
182
|
+
case 1:
|
|
183
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
184
|
+
headers = {
|
|
185
|
+
"content-type": "application/json",
|
|
186
|
+
};
|
|
187
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/rules/{Identifier}";
|
|
188
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", function () { return input.Identifier; }, "{Identifier}", false);
|
|
189
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ResourceTags != null && {
|
|
190
|
+
ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context),
|
|
191
|
+
})), (input.ResourceType != null && { ResourceType: input.ResourceType })), (input.RetentionPeriod != null && {
|
|
192
|
+
RetentionPeriod: serializeAws_restJson1RetentionPeriod(input.RetentionPeriod, context),
|
|
193
|
+
})));
|
|
194
|
+
return [2, new __HttpRequest({
|
|
195
|
+
protocol: protocol,
|
|
196
|
+
hostname: hostname,
|
|
197
|
+
port: port,
|
|
198
|
+
method: "PATCH",
|
|
199
|
+
headers: headers,
|
|
200
|
+
path: resolvedPath,
|
|
201
|
+
body: body,
|
|
202
|
+
})];
|
|
203
|
+
}
|
|
173
204
|
});
|
|
174
|
-
};
|
|
175
|
-
export
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
205
|
+
}); };
|
|
206
|
+
export var deserializeAws_restJson1CreateRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
207
|
+
var contents, data, _a, _b;
|
|
208
|
+
return __generator(this, function (_c) {
|
|
209
|
+
switch (_c.label) {
|
|
210
|
+
case 0:
|
|
211
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
212
|
+
return [2, deserializeAws_restJson1CreateRuleCommandError(output, context)];
|
|
213
|
+
}
|
|
214
|
+
contents = map({
|
|
215
|
+
$metadata: deserializeMetadata(output),
|
|
216
|
+
});
|
|
217
|
+
_a = __expectNonNull;
|
|
218
|
+
_b = __expectObject;
|
|
219
|
+
return [4, parseBody(output.body, context)];
|
|
220
|
+
case 1:
|
|
221
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
222
|
+
if (data.Description != null) {
|
|
223
|
+
contents.Description = __expectString(data.Description);
|
|
224
|
+
}
|
|
225
|
+
if (data.Identifier != null) {
|
|
226
|
+
contents.Identifier = __expectString(data.Identifier);
|
|
227
|
+
}
|
|
228
|
+
if (data.ResourceTags != null) {
|
|
229
|
+
contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context);
|
|
230
|
+
}
|
|
231
|
+
if (data.ResourceType != null) {
|
|
232
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
233
|
+
}
|
|
234
|
+
if (data.RetentionPeriod != null) {
|
|
235
|
+
contents.RetentionPeriod = deserializeAws_restJson1RetentionPeriod(data.RetentionPeriod, context);
|
|
236
|
+
}
|
|
237
|
+
if (data.Status != null) {
|
|
238
|
+
contents.Status = __expectString(data.Status);
|
|
239
|
+
}
|
|
240
|
+
if (data.Tags != null) {
|
|
241
|
+
contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
|
|
242
|
+
}
|
|
243
|
+
return [2, contents];
|
|
244
|
+
}
|
|
181
245
|
});
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
default:
|
|
223
|
-
const parsedBody = parsedOutput.body;
|
|
224
|
-
throwDefaultError({
|
|
225
|
-
output,
|
|
226
|
-
parsedBody,
|
|
227
|
-
exceptionCtor: __BaseException,
|
|
228
|
-
errorCode,
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
export const deserializeAws_restJson1DeleteRuleCommand = async (output, context) => {
|
|
233
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
234
|
-
return deserializeAws_restJson1DeleteRuleCommandError(output, context);
|
|
235
|
-
}
|
|
236
|
-
const contents = map({
|
|
237
|
-
$metadata: deserializeMetadata(output),
|
|
246
|
+
}); };
|
|
247
|
+
var deserializeAws_restJson1CreateRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
248
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
249
|
+
var _c;
|
|
250
|
+
return __generator(this, function (_d) {
|
|
251
|
+
switch (_d.label) {
|
|
252
|
+
case 0:
|
|
253
|
+
_a = [__assign({}, output)];
|
|
254
|
+
_c = {};
|
|
255
|
+
return [4, parseErrorBody(output.body, context)];
|
|
256
|
+
case 1:
|
|
257
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
258
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
259
|
+
_b = errorCode;
|
|
260
|
+
switch (_b) {
|
|
261
|
+
case "InternalServerException": return [3, 2];
|
|
262
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
263
|
+
case "ServiceQuotaExceededException": return [3, 4];
|
|
264
|
+
case "com.amazonaws.rbin#ServiceQuotaExceededException": return [3, 4];
|
|
265
|
+
case "ValidationException": return [3, 6];
|
|
266
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
267
|
+
}
|
|
268
|
+
return [3, 8];
|
|
269
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
270
|
+
case 3: throw _d.sent();
|
|
271
|
+
case 4: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
272
|
+
case 5: throw _d.sent();
|
|
273
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
274
|
+
case 7: throw _d.sent();
|
|
275
|
+
case 8:
|
|
276
|
+
parsedBody = parsedOutput.body;
|
|
277
|
+
throwDefaultError({
|
|
278
|
+
output: output,
|
|
279
|
+
parsedBody: parsedBody,
|
|
280
|
+
exceptionCtor: __BaseException,
|
|
281
|
+
errorCode: errorCode,
|
|
282
|
+
});
|
|
283
|
+
_d.label = 9;
|
|
284
|
+
case 9: return [2];
|
|
285
|
+
}
|
|
238
286
|
});
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
case "com.amazonaws.rbin#ValidationException":
|
|
257
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
258
|
-
default:
|
|
259
|
-
const parsedBody = parsedOutput.body;
|
|
260
|
-
throwDefaultError({
|
|
261
|
-
output,
|
|
262
|
-
parsedBody,
|
|
263
|
-
exceptionCtor: __BaseException,
|
|
264
|
-
errorCode,
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
export const deserializeAws_restJson1GetRuleCommand = async (output, context) => {
|
|
269
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
270
|
-
return deserializeAws_restJson1GetRuleCommandError(output, context);
|
|
271
|
-
}
|
|
272
|
-
const contents = map({
|
|
273
|
-
$metadata: deserializeMetadata(output),
|
|
287
|
+
}); };
|
|
288
|
+
export var deserializeAws_restJson1DeleteRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
289
|
+
var contents;
|
|
290
|
+
return __generator(this, function (_a) {
|
|
291
|
+
switch (_a.label) {
|
|
292
|
+
case 0:
|
|
293
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
294
|
+
return [2, deserializeAws_restJson1DeleteRuleCommandError(output, context)];
|
|
295
|
+
}
|
|
296
|
+
contents = map({
|
|
297
|
+
$metadata: deserializeMetadata(output),
|
|
298
|
+
});
|
|
299
|
+
return [4, collectBody(output.body, context)];
|
|
300
|
+
case 1:
|
|
301
|
+
_a.sent();
|
|
302
|
+
return [2, contents];
|
|
303
|
+
}
|
|
274
304
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
output,
|
|
316
|
-
parsedBody,
|
|
317
|
-
exceptionCtor: __BaseException,
|
|
318
|
-
errorCode,
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
export const deserializeAws_restJson1ListRulesCommand = async (output, context) => {
|
|
323
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
324
|
-
return deserializeAws_restJson1ListRulesCommandError(output, context);
|
|
325
|
-
}
|
|
326
|
-
const contents = map({
|
|
327
|
-
$metadata: deserializeMetadata(output),
|
|
305
|
+
}); };
|
|
306
|
+
var deserializeAws_restJson1DeleteRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
307
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
308
|
+
var _c;
|
|
309
|
+
return __generator(this, function (_d) {
|
|
310
|
+
switch (_d.label) {
|
|
311
|
+
case 0:
|
|
312
|
+
_a = [__assign({}, output)];
|
|
313
|
+
_c = {};
|
|
314
|
+
return [4, parseErrorBody(output.body, context)];
|
|
315
|
+
case 1:
|
|
316
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
317
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
318
|
+
_b = errorCode;
|
|
319
|
+
switch (_b) {
|
|
320
|
+
case "InternalServerException": return [3, 2];
|
|
321
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
322
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
323
|
+
case "com.amazonaws.rbin#ResourceNotFoundException": return [3, 4];
|
|
324
|
+
case "ValidationException": return [3, 6];
|
|
325
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
326
|
+
}
|
|
327
|
+
return [3, 8];
|
|
328
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
329
|
+
case 3: throw _d.sent();
|
|
330
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
331
|
+
case 5: throw _d.sent();
|
|
332
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
333
|
+
case 7: throw _d.sent();
|
|
334
|
+
case 8:
|
|
335
|
+
parsedBody = parsedOutput.body;
|
|
336
|
+
throwDefaultError({
|
|
337
|
+
output: output,
|
|
338
|
+
parsedBody: parsedBody,
|
|
339
|
+
exceptionCtor: __BaseException,
|
|
340
|
+
errorCode: errorCode,
|
|
341
|
+
});
|
|
342
|
+
_d.label = 9;
|
|
343
|
+
case 9: return [2];
|
|
344
|
+
}
|
|
328
345
|
});
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
$metadata: deserializeMetadata(output),
|
|
346
|
+
}); };
|
|
347
|
+
export var deserializeAws_restJson1GetRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
348
|
+
var contents, data, _a, _b;
|
|
349
|
+
return __generator(this, function (_c) {
|
|
350
|
+
switch (_c.label) {
|
|
351
|
+
case 0:
|
|
352
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
353
|
+
return [2, deserializeAws_restJson1GetRuleCommandError(output, context)];
|
|
354
|
+
}
|
|
355
|
+
contents = map({
|
|
356
|
+
$metadata: deserializeMetadata(output),
|
|
357
|
+
});
|
|
358
|
+
_a = __expectNonNull;
|
|
359
|
+
_b = __expectObject;
|
|
360
|
+
return [4, parseBody(output.body, context)];
|
|
361
|
+
case 1:
|
|
362
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
363
|
+
if (data.Description != null) {
|
|
364
|
+
contents.Description = __expectString(data.Description);
|
|
365
|
+
}
|
|
366
|
+
if (data.Identifier != null) {
|
|
367
|
+
contents.Identifier = __expectString(data.Identifier);
|
|
368
|
+
}
|
|
369
|
+
if (data.ResourceTags != null) {
|
|
370
|
+
contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context);
|
|
371
|
+
}
|
|
372
|
+
if (data.ResourceType != null) {
|
|
373
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
374
|
+
}
|
|
375
|
+
if (data.RetentionPeriod != null) {
|
|
376
|
+
contents.RetentionPeriod = deserializeAws_restJson1RetentionPeriod(data.RetentionPeriod, context);
|
|
377
|
+
}
|
|
378
|
+
if (data.Status != null) {
|
|
379
|
+
contents.Status = __expectString(data.Status);
|
|
380
|
+
}
|
|
381
|
+
return [2, contents];
|
|
382
|
+
}
|
|
367
383
|
});
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
384
|
+
}); };
|
|
385
|
+
var deserializeAws_restJson1GetRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
386
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
387
|
+
var _c;
|
|
388
|
+
return __generator(this, function (_d) {
|
|
389
|
+
switch (_d.label) {
|
|
390
|
+
case 0:
|
|
391
|
+
_a = [__assign({}, output)];
|
|
392
|
+
_c = {};
|
|
393
|
+
return [4, parseErrorBody(output.body, context)];
|
|
394
|
+
case 1:
|
|
395
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
396
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
397
|
+
_b = errorCode;
|
|
398
|
+
switch (_b) {
|
|
399
|
+
case "InternalServerException": return [3, 2];
|
|
400
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
401
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
402
|
+
case "com.amazonaws.rbin#ResourceNotFoundException": return [3, 4];
|
|
403
|
+
case "ValidationException": return [3, 6];
|
|
404
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
405
|
+
}
|
|
406
|
+
return [3, 8];
|
|
407
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
408
|
+
case 3: throw _d.sent();
|
|
409
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
410
|
+
case 5: throw _d.sent();
|
|
411
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
412
|
+
case 7: throw _d.sent();
|
|
413
|
+
case 8:
|
|
414
|
+
parsedBody = parsedOutput.body;
|
|
415
|
+
throwDefaultError({
|
|
416
|
+
output: output,
|
|
417
|
+
parsedBody: parsedBody,
|
|
418
|
+
exceptionCtor: __BaseException,
|
|
419
|
+
errorCode: errorCode,
|
|
420
|
+
});
|
|
421
|
+
_d.label = 9;
|
|
422
|
+
case 9: return [2];
|
|
423
|
+
}
|
|
406
424
|
});
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
output,
|
|
433
|
-
parsedBody,
|
|
434
|
-
exceptionCtor: __BaseException,
|
|
435
|
-
errorCode,
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
440
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
441
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
442
|
-
}
|
|
443
|
-
const contents = map({
|
|
444
|
-
$metadata: deserializeMetadata(output),
|
|
425
|
+
}); };
|
|
426
|
+
export var deserializeAws_restJson1ListRulesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
427
|
+
var contents, data, _a, _b;
|
|
428
|
+
return __generator(this, function (_c) {
|
|
429
|
+
switch (_c.label) {
|
|
430
|
+
case 0:
|
|
431
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
432
|
+
return [2, deserializeAws_restJson1ListRulesCommandError(output, context)];
|
|
433
|
+
}
|
|
434
|
+
contents = map({
|
|
435
|
+
$metadata: deserializeMetadata(output),
|
|
436
|
+
});
|
|
437
|
+
_a = __expectNonNull;
|
|
438
|
+
_b = __expectObject;
|
|
439
|
+
return [4, parseBody(output.body, context)];
|
|
440
|
+
case 1:
|
|
441
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
442
|
+
if (data.NextToken != null) {
|
|
443
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
444
|
+
}
|
|
445
|
+
if (data.Rules != null) {
|
|
446
|
+
contents.Rules = deserializeAws_restJson1RuleSummaryList(data.Rules, context);
|
|
447
|
+
}
|
|
448
|
+
return [2, contents];
|
|
449
|
+
}
|
|
445
450
|
});
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
451
|
+
}); };
|
|
452
|
+
var deserializeAws_restJson1ListRulesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
453
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
454
|
+
var _c;
|
|
455
|
+
return __generator(this, function (_d) {
|
|
456
|
+
switch (_d.label) {
|
|
457
|
+
case 0:
|
|
458
|
+
_a = [__assign({}, output)];
|
|
459
|
+
_c = {};
|
|
460
|
+
return [4, parseErrorBody(output.body, context)];
|
|
461
|
+
case 1:
|
|
462
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
463
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
464
|
+
_b = errorCode;
|
|
465
|
+
switch (_b) {
|
|
466
|
+
case "InternalServerException": return [3, 2];
|
|
467
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
468
|
+
case "ValidationException": return [3, 4];
|
|
469
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 4];
|
|
470
|
+
}
|
|
471
|
+
return [3, 6];
|
|
472
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
473
|
+
case 3: throw _d.sent();
|
|
474
|
+
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
475
|
+
case 5: throw _d.sent();
|
|
476
|
+
case 6:
|
|
477
|
+
parsedBody = parsedOutput.body;
|
|
478
|
+
throwDefaultError({
|
|
479
|
+
output: output,
|
|
480
|
+
parsedBody: parsedBody,
|
|
481
|
+
exceptionCtor: __BaseException,
|
|
482
|
+
errorCode: errorCode,
|
|
483
|
+
});
|
|
484
|
+
_d.label = 7;
|
|
485
|
+
case 7: return [2];
|
|
486
|
+
}
|
|
481
487
|
});
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
const parsedOutput = {
|
|
505
|
-
...output,
|
|
506
|
-
body: await parseErrorBody(output.body, context),
|
|
507
|
-
};
|
|
508
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
509
|
-
switch (errorCode) {
|
|
510
|
-
case "InternalServerException":
|
|
511
|
-
case "com.amazonaws.rbin#InternalServerException":
|
|
512
|
-
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
513
|
-
case "ResourceNotFoundException":
|
|
514
|
-
case "com.amazonaws.rbin#ResourceNotFoundException":
|
|
515
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
516
|
-
case "ValidationException":
|
|
517
|
-
case "com.amazonaws.rbin#ValidationException":
|
|
518
|
-
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
519
|
-
default:
|
|
520
|
-
const parsedBody = parsedOutput.body;
|
|
521
|
-
throwDefaultError({
|
|
522
|
-
output,
|
|
523
|
-
parsedBody,
|
|
524
|
-
exceptionCtor: __BaseException,
|
|
525
|
-
errorCode,
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
};
|
|
529
|
-
const map = __map;
|
|
530
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
531
|
-
const contents = map({});
|
|
532
|
-
const data = parsedOutput.body;
|
|
533
|
-
if (data.Message != null) {
|
|
534
|
-
contents.Message = __expectString(data.Message);
|
|
535
|
-
}
|
|
536
|
-
const exception = new InternalServerException({
|
|
537
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
538
|
-
...contents,
|
|
488
|
+
}); };
|
|
489
|
+
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
490
|
+
var contents, data, _a, _b;
|
|
491
|
+
return __generator(this, function (_c) {
|
|
492
|
+
switch (_c.label) {
|
|
493
|
+
case 0:
|
|
494
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
495
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
496
|
+
}
|
|
497
|
+
contents = map({
|
|
498
|
+
$metadata: deserializeMetadata(output),
|
|
499
|
+
});
|
|
500
|
+
_a = __expectNonNull;
|
|
501
|
+
_b = __expectObject;
|
|
502
|
+
return [4, parseBody(output.body, context)];
|
|
503
|
+
case 1:
|
|
504
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
505
|
+
if (data.Tags != null) {
|
|
506
|
+
contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
|
|
507
|
+
}
|
|
508
|
+
return [2, contents];
|
|
509
|
+
}
|
|
539
510
|
});
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
511
|
+
}); };
|
|
512
|
+
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
513
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
514
|
+
var _c;
|
|
515
|
+
return __generator(this, function (_d) {
|
|
516
|
+
switch (_d.label) {
|
|
517
|
+
case 0:
|
|
518
|
+
_a = [__assign({}, output)];
|
|
519
|
+
_c = {};
|
|
520
|
+
return [4, parseErrorBody(output.body, context)];
|
|
521
|
+
case 1:
|
|
522
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
523
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
524
|
+
_b = errorCode;
|
|
525
|
+
switch (_b) {
|
|
526
|
+
case "InternalServerException": return [3, 2];
|
|
527
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
528
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
529
|
+
case "com.amazonaws.rbin#ResourceNotFoundException": return [3, 4];
|
|
530
|
+
case "ValidationException": return [3, 6];
|
|
531
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
532
|
+
}
|
|
533
|
+
return [3, 8];
|
|
534
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
535
|
+
case 3: throw _d.sent();
|
|
536
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
537
|
+
case 5: throw _d.sent();
|
|
538
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
539
|
+
case 7: throw _d.sent();
|
|
540
|
+
case 8:
|
|
541
|
+
parsedBody = parsedOutput.body;
|
|
542
|
+
throwDefaultError({
|
|
543
|
+
output: output,
|
|
544
|
+
parsedBody: parsedBody,
|
|
545
|
+
exceptionCtor: __BaseException,
|
|
546
|
+
errorCode: errorCode,
|
|
547
|
+
});
|
|
548
|
+
_d.label = 9;
|
|
549
|
+
case 9: return [2];
|
|
550
|
+
}
|
|
554
551
|
});
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
552
|
+
}); };
|
|
553
|
+
export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
554
|
+
var contents;
|
|
555
|
+
return __generator(this, function (_a) {
|
|
556
|
+
switch (_a.label) {
|
|
557
|
+
case 0:
|
|
558
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
559
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
560
|
+
}
|
|
561
|
+
contents = map({
|
|
562
|
+
$metadata: deserializeMetadata(output),
|
|
563
|
+
});
|
|
564
|
+
return [4, collectBody(output.body, context)];
|
|
565
|
+
case 1:
|
|
566
|
+
_a.sent();
|
|
567
|
+
return [2, contents];
|
|
568
|
+
}
|
|
569
569
|
});
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
570
|
+
}); };
|
|
571
|
+
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
572
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
573
|
+
var _c;
|
|
574
|
+
return __generator(this, function (_d) {
|
|
575
|
+
switch (_d.label) {
|
|
576
|
+
case 0:
|
|
577
|
+
_a = [__assign({}, output)];
|
|
578
|
+
_c = {};
|
|
579
|
+
return [4, parseErrorBody(output.body, context)];
|
|
580
|
+
case 1:
|
|
581
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
582
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
583
|
+
_b = errorCode;
|
|
584
|
+
switch (_b) {
|
|
585
|
+
case "InternalServerException": return [3, 2];
|
|
586
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
587
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
588
|
+
case "com.amazonaws.rbin#ResourceNotFoundException": return [3, 4];
|
|
589
|
+
case "ServiceQuotaExceededException": return [3, 6];
|
|
590
|
+
case "com.amazonaws.rbin#ServiceQuotaExceededException": return [3, 6];
|
|
591
|
+
case "ValidationException": return [3, 8];
|
|
592
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 8];
|
|
593
|
+
}
|
|
594
|
+
return [3, 10];
|
|
595
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
596
|
+
case 3: throw _d.sent();
|
|
597
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
598
|
+
case 5: throw _d.sent();
|
|
599
|
+
case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
600
|
+
case 7: throw _d.sent();
|
|
601
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
602
|
+
case 9: throw _d.sent();
|
|
603
|
+
case 10:
|
|
604
|
+
parsedBody = parsedOutput.body;
|
|
605
|
+
throwDefaultError({
|
|
606
|
+
output: output,
|
|
607
|
+
parsedBody: parsedBody,
|
|
608
|
+
exceptionCtor: __BaseException,
|
|
609
|
+
errorCode: errorCode,
|
|
610
|
+
});
|
|
611
|
+
_d.label = 11;
|
|
612
|
+
case 11: return [2];
|
|
613
|
+
}
|
|
584
614
|
});
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
return {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
615
|
+
}); };
|
|
616
|
+
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
617
|
+
var contents;
|
|
618
|
+
return __generator(this, function (_a) {
|
|
619
|
+
switch (_a.label) {
|
|
620
|
+
case 0:
|
|
621
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
622
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
623
|
+
}
|
|
624
|
+
contents = map({
|
|
625
|
+
$metadata: deserializeMetadata(output),
|
|
626
|
+
});
|
|
627
|
+
return [4, collectBody(output.body, context)];
|
|
628
|
+
case 1:
|
|
629
|
+
_a.sent();
|
|
630
|
+
return [2, contents];
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
}); };
|
|
634
|
+
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
635
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
636
|
+
var _c;
|
|
637
|
+
return __generator(this, function (_d) {
|
|
638
|
+
switch (_d.label) {
|
|
639
|
+
case 0:
|
|
640
|
+
_a = [__assign({}, output)];
|
|
641
|
+
_c = {};
|
|
642
|
+
return [4, parseErrorBody(output.body, context)];
|
|
643
|
+
case 1:
|
|
644
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
645
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
646
|
+
_b = errorCode;
|
|
647
|
+
switch (_b) {
|
|
648
|
+
case "InternalServerException": return [3, 2];
|
|
649
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
650
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
651
|
+
case "com.amazonaws.rbin#ResourceNotFoundException": return [3, 4];
|
|
652
|
+
case "ValidationException": return [3, 6];
|
|
653
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
654
|
+
}
|
|
655
|
+
return [3, 8];
|
|
656
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
657
|
+
case 3: throw _d.sent();
|
|
658
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
659
|
+
case 5: throw _d.sent();
|
|
660
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
661
|
+
case 7: throw _d.sent();
|
|
662
|
+
case 8:
|
|
663
|
+
parsedBody = parsedOutput.body;
|
|
664
|
+
throwDefaultError({
|
|
665
|
+
output: output,
|
|
666
|
+
parsedBody: parsedBody,
|
|
667
|
+
exceptionCtor: __BaseException,
|
|
668
|
+
errorCode: errorCode,
|
|
669
|
+
});
|
|
670
|
+
_d.label = 9;
|
|
671
|
+
case 9: return [2];
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
}); };
|
|
675
|
+
export var deserializeAws_restJson1UpdateRuleCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
676
|
+
var contents, data, _a, _b;
|
|
677
|
+
return __generator(this, function (_c) {
|
|
678
|
+
switch (_c.label) {
|
|
679
|
+
case 0:
|
|
680
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
681
|
+
return [2, deserializeAws_restJson1UpdateRuleCommandError(output, context)];
|
|
682
|
+
}
|
|
683
|
+
contents = map({
|
|
684
|
+
$metadata: deserializeMetadata(output),
|
|
685
|
+
});
|
|
686
|
+
_a = __expectNonNull;
|
|
687
|
+
_b = __expectObject;
|
|
688
|
+
return [4, parseBody(output.body, context)];
|
|
689
|
+
case 1:
|
|
690
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
691
|
+
if (data.Description != null) {
|
|
692
|
+
contents.Description = __expectString(data.Description);
|
|
693
|
+
}
|
|
694
|
+
if (data.Identifier != null) {
|
|
695
|
+
contents.Identifier = __expectString(data.Identifier);
|
|
696
|
+
}
|
|
697
|
+
if (data.ResourceTags != null) {
|
|
698
|
+
contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context);
|
|
699
|
+
}
|
|
700
|
+
if (data.ResourceType != null) {
|
|
701
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
702
|
+
}
|
|
703
|
+
if (data.RetentionPeriod != null) {
|
|
704
|
+
contents.RetentionPeriod = deserializeAws_restJson1RetentionPeriod(data.RetentionPeriod, context);
|
|
705
|
+
}
|
|
706
|
+
if (data.Status != null) {
|
|
707
|
+
contents.Status = __expectString(data.Status);
|
|
708
|
+
}
|
|
709
|
+
return [2, contents];
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
}); };
|
|
713
|
+
var deserializeAws_restJson1UpdateRuleCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
714
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
715
|
+
var _c;
|
|
716
|
+
return __generator(this, function (_d) {
|
|
717
|
+
switch (_d.label) {
|
|
718
|
+
case 0:
|
|
719
|
+
_a = [__assign({}, output)];
|
|
720
|
+
_c = {};
|
|
721
|
+
return [4, parseErrorBody(output.body, context)];
|
|
722
|
+
case 1:
|
|
723
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
724
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
725
|
+
_b = errorCode;
|
|
726
|
+
switch (_b) {
|
|
727
|
+
case "InternalServerException": return [3, 2];
|
|
728
|
+
case "com.amazonaws.rbin#InternalServerException": return [3, 2];
|
|
729
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
730
|
+
case "com.amazonaws.rbin#ResourceNotFoundException": return [3, 4];
|
|
731
|
+
case "ValidationException": return [3, 6];
|
|
732
|
+
case "com.amazonaws.rbin#ValidationException": return [3, 6];
|
|
733
|
+
}
|
|
734
|
+
return [3, 8];
|
|
735
|
+
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
736
|
+
case 3: throw _d.sent();
|
|
737
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
738
|
+
case 5: throw _d.sent();
|
|
739
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
740
|
+
case 7: throw _d.sent();
|
|
741
|
+
case 8:
|
|
742
|
+
parsedBody = parsedOutput.body;
|
|
743
|
+
throwDefaultError({
|
|
744
|
+
output: output,
|
|
745
|
+
parsedBody: parsedBody,
|
|
746
|
+
exceptionCtor: __BaseException,
|
|
747
|
+
errorCode: errorCode,
|
|
748
|
+
});
|
|
749
|
+
_d.label = 9;
|
|
750
|
+
case 9: return [2];
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
}); };
|
|
754
|
+
var map = __map;
|
|
755
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
756
|
+
var contents, data, exception;
|
|
757
|
+
return __generator(this, function (_a) {
|
|
758
|
+
contents = map({});
|
|
759
|
+
data = parsedOutput.body;
|
|
760
|
+
if (data.Message != null) {
|
|
761
|
+
contents.Message = __expectString(data.Message);
|
|
762
|
+
}
|
|
763
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
764
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
765
|
+
});
|
|
766
|
+
}); };
|
|
767
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
768
|
+
var contents, data, exception;
|
|
769
|
+
return __generator(this, function (_a) {
|
|
770
|
+
contents = map({});
|
|
771
|
+
data = parsedOutput.body;
|
|
772
|
+
if (data.Message != null) {
|
|
773
|
+
contents.Message = __expectString(data.Message);
|
|
774
|
+
}
|
|
775
|
+
if (data.Reason != null) {
|
|
776
|
+
contents.Reason = __expectString(data.Reason);
|
|
777
|
+
}
|
|
778
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
779
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
780
|
+
});
|
|
781
|
+
}); };
|
|
782
|
+
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
783
|
+
var contents, data, exception;
|
|
784
|
+
return __generator(this, function (_a) {
|
|
785
|
+
contents = map({});
|
|
786
|
+
data = parsedOutput.body;
|
|
787
|
+
if (data.Message != null) {
|
|
788
|
+
contents.Message = __expectString(data.Message);
|
|
789
|
+
}
|
|
790
|
+
if (data.Reason != null) {
|
|
791
|
+
contents.Reason = __expectString(data.Reason);
|
|
792
|
+
}
|
|
793
|
+
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
794
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
795
|
+
});
|
|
796
|
+
}); };
|
|
797
|
+
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
798
|
+
var contents, data, exception;
|
|
799
|
+
return __generator(this, function (_a) {
|
|
800
|
+
contents = map({});
|
|
801
|
+
data = parsedOutput.body;
|
|
802
|
+
if (data.Message != null) {
|
|
803
|
+
contents.Message = __expectString(data.Message);
|
|
804
|
+
}
|
|
805
|
+
if (data.Reason != null) {
|
|
806
|
+
contents.Reason = __expectString(data.Reason);
|
|
807
|
+
}
|
|
808
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
809
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
810
|
+
});
|
|
811
|
+
}); };
|
|
812
|
+
var serializeAws_restJson1ResourceTag = function (input, context) {
|
|
813
|
+
return __assign(__assign({}, (input.ResourceTagKey != null && { ResourceTagKey: input.ResourceTagKey })), (input.ResourceTagValue != null && { ResourceTagValue: input.ResourceTagValue }));
|
|
592
814
|
};
|
|
593
|
-
|
|
815
|
+
var serializeAws_restJson1ResourceTags = function (input, context) {
|
|
594
816
|
return input
|
|
595
|
-
.filter((e)
|
|
596
|
-
.map((entry)
|
|
817
|
+
.filter(function (e) { return e != null; })
|
|
818
|
+
.map(function (entry) {
|
|
597
819
|
return serializeAws_restJson1ResourceTag(entry, context);
|
|
598
820
|
});
|
|
599
821
|
};
|
|
600
|
-
|
|
601
|
-
return {
|
|
602
|
-
...(input.RetentionPeriodUnit != null && { RetentionPeriodUnit: input.RetentionPeriodUnit }),
|
|
603
|
-
...(input.RetentionPeriodValue != null && { RetentionPeriodValue: input.RetentionPeriodValue }),
|
|
604
|
-
};
|
|
822
|
+
var serializeAws_restJson1RetentionPeriod = function (input, context) {
|
|
823
|
+
return __assign(__assign({}, (input.RetentionPeriodUnit != null && { RetentionPeriodUnit: input.RetentionPeriodUnit })), (input.RetentionPeriodValue != null && { RetentionPeriodValue: input.RetentionPeriodValue }));
|
|
605
824
|
};
|
|
606
|
-
|
|
607
|
-
return {
|
|
608
|
-
...(input.Key != null && { Key: input.Key }),
|
|
609
|
-
...(input.Value != null && { Value: input.Value }),
|
|
610
|
-
};
|
|
825
|
+
var serializeAws_restJson1Tag = function (input, context) {
|
|
826
|
+
return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
|
|
611
827
|
};
|
|
612
|
-
|
|
828
|
+
var serializeAws_restJson1TagList = function (input, context) {
|
|
613
829
|
return input
|
|
614
|
-
.filter((e)
|
|
615
|
-
.map((entry)
|
|
830
|
+
.filter(function (e) { return e != null; })
|
|
831
|
+
.map(function (entry) {
|
|
616
832
|
return serializeAws_restJson1Tag(entry, context);
|
|
617
833
|
});
|
|
618
834
|
};
|
|
619
|
-
|
|
835
|
+
var deserializeAws_restJson1ResourceTag = function (output, context) {
|
|
620
836
|
return {
|
|
621
837
|
ResourceTagKey: __expectString(output.ResourceTagKey),
|
|
622
838
|
ResourceTagValue: __expectString(output.ResourceTagValue),
|
|
623
839
|
};
|
|
624
840
|
};
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
.filter((e)
|
|
628
|
-
.map((entry)
|
|
841
|
+
var deserializeAws_restJson1ResourceTags = function (output, context) {
|
|
842
|
+
var retVal = (output || [])
|
|
843
|
+
.filter(function (e) { return e != null; })
|
|
844
|
+
.map(function (entry) {
|
|
629
845
|
if (entry === null) {
|
|
630
846
|
return null;
|
|
631
847
|
}
|
|
@@ -633,13 +849,13 @@ const deserializeAws_restJson1ResourceTags = (output, context) => {
|
|
|
633
849
|
});
|
|
634
850
|
return retVal;
|
|
635
851
|
};
|
|
636
|
-
|
|
852
|
+
var deserializeAws_restJson1RetentionPeriod = function (output, context) {
|
|
637
853
|
return {
|
|
638
854
|
RetentionPeriodUnit: __expectString(output.RetentionPeriodUnit),
|
|
639
855
|
RetentionPeriodValue: __expectInt32(output.RetentionPeriodValue),
|
|
640
856
|
};
|
|
641
857
|
};
|
|
642
|
-
|
|
858
|
+
var deserializeAws_restJson1RuleSummary = function (output, context) {
|
|
643
859
|
return {
|
|
644
860
|
Description: __expectString(output.Description),
|
|
645
861
|
Identifier: __expectString(output.Identifier),
|
|
@@ -648,10 +864,10 @@ const deserializeAws_restJson1RuleSummary = (output, context) => {
|
|
|
648
864
|
: undefined,
|
|
649
865
|
};
|
|
650
866
|
};
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
.filter((e)
|
|
654
|
-
.map((entry)
|
|
867
|
+
var deserializeAws_restJson1RuleSummaryList = function (output, context) {
|
|
868
|
+
var retVal = (output || [])
|
|
869
|
+
.filter(function (e) { return e != null; })
|
|
870
|
+
.map(function (entry) {
|
|
655
871
|
if (entry === null) {
|
|
656
872
|
return null;
|
|
657
873
|
}
|
|
@@ -659,16 +875,16 @@ const deserializeAws_restJson1RuleSummaryList = (output, context) => {
|
|
|
659
875
|
});
|
|
660
876
|
return retVal;
|
|
661
877
|
};
|
|
662
|
-
|
|
878
|
+
var deserializeAws_restJson1Tag = function (output, context) {
|
|
663
879
|
return {
|
|
664
880
|
Key: __expectString(output.Key),
|
|
665
881
|
Value: __expectString(output.Value),
|
|
666
882
|
};
|
|
667
883
|
};
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
.filter((e)
|
|
671
|
-
.map((entry)
|
|
884
|
+
var deserializeAws_restJson1TagList = function (output, context) {
|
|
885
|
+
var retVal = (output || [])
|
|
886
|
+
.filter(function (e) { return e != null; })
|
|
887
|
+
.map(function (entry) {
|
|
672
888
|
if (entry === null) {
|
|
673
889
|
return null;
|
|
674
890
|
}
|
|
@@ -676,39 +892,57 @@ const deserializeAws_restJson1TagList = (output, context) => {
|
|
|
676
892
|
});
|
|
677
893
|
return retVal;
|
|
678
894
|
};
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
895
|
+
var deserializeMetadata = function (output) {
|
|
896
|
+
var _a, _b;
|
|
897
|
+
return ({
|
|
898
|
+
httpStatusCode: output.statusCode,
|
|
899
|
+
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"],
|
|
900
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
901
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
902
|
+
});
|
|
903
|
+
};
|
|
904
|
+
var collectBody = function (streamBody, context) {
|
|
905
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
686
906
|
if (streamBody instanceof Uint8Array) {
|
|
687
907
|
return Promise.resolve(streamBody);
|
|
688
908
|
}
|
|
689
909
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
690
910
|
};
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
911
|
+
var collectBodyString = function (streamBody, context) {
|
|
912
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
913
|
+
};
|
|
914
|
+
var isSerializableHeaderValue = function (value) {
|
|
915
|
+
return value !== undefined &&
|
|
916
|
+
value !== null &&
|
|
917
|
+
value !== "" &&
|
|
918
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
919
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
920
|
+
};
|
|
921
|
+
var parseBody = function (streamBody, context) {
|
|
922
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
923
|
+
if (encoded.length) {
|
|
924
|
+
return JSON.parse(encoded);
|
|
925
|
+
}
|
|
926
|
+
return {};
|
|
927
|
+
});
|
|
707
928
|
};
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
929
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
930
|
+
var value;
|
|
931
|
+
var _a;
|
|
932
|
+
return __generator(this, function (_b) {
|
|
933
|
+
switch (_b.label) {
|
|
934
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
935
|
+
case 1:
|
|
936
|
+
value = _b.sent();
|
|
937
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
938
|
+
return [2, value];
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
}); };
|
|
942
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
943
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
944
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
945
|
+
var cleanValue = rawValue;
|
|
712
946
|
if (typeof cleanValue === "number") {
|
|
713
947
|
cleanValue = cleanValue.toString();
|
|
714
948
|
}
|
|
@@ -723,7 +957,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
723
957
|
}
|
|
724
958
|
return cleanValue;
|
|
725
959
|
};
|
|
726
|
-
|
|
960
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
727
961
|
if (headerKey !== undefined) {
|
|
728
962
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
729
963
|
}
|