@aws-sdk/client-rum 3.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/dist-cjs/RUM.js +157 -0
- package/dist-cjs/RUMClient.js +35 -0
- package/dist-cjs/commands/CreateAppMonitorCommand.js +36 -0
- package/dist-cjs/commands/DeleteAppMonitorCommand.js +36 -0
- package/dist-cjs/commands/GetAppMonitorCommand.js +36 -0
- package/dist-cjs/commands/GetAppMonitorDataCommand.js +36 -0
- package/dist-cjs/commands/ListAppMonitorsCommand.js +36 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
- package/dist-cjs/commands/PutRumEventsCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/UpdateAppMonitorCommand.js +36 -0
- package/dist-cjs/commands/index.js +13 -0
- package/dist-cjs/endpoints.js +130 -0
- package/dist-cjs/index.js +8 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +237 -0
- package/dist-cjs/pagination/GetAppMonitorDataPaginator.js +35 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListAppMonitorsPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1502 -0
- package/dist-cjs/runtimeConfig.browser.js +40 -0
- package/dist-cjs/runtimeConfig.js +44 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/RUM.js +160 -0
- package/dist-es/RUMClient.js +37 -0
- package/dist-es/commands/CreateAppMonitorCommand.js +39 -0
- package/dist-es/commands/DeleteAppMonitorCommand.js +39 -0
- package/dist-es/commands/GetAppMonitorCommand.js +39 -0
- package/dist-es/commands/GetAppMonitorDataCommand.js +39 -0
- package/dist-es/commands/ListAppMonitorsCommand.js +39 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +39 -0
- package/dist-es/commands/PutRumEventsCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +39 -0
- package/dist-es/commands/UntagResourceCommand.js +39 -0
- package/dist-es/commands/UpdateAppMonitorCommand.js +39 -0
- package/dist-es/commands/index.js +10 -0
- package/dist-es/endpoints.js +126 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +161 -0
- package/dist-es/pagination/GetAppMonitorDataPaginator.js +74 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAppMonitorsPaginator.js +74 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +1652 -0
- package/dist-es/runtimeConfig.browser.js +17 -0
- package/dist-es/runtimeConfig.js +21 -0
- package/dist-es/runtimeConfig.native.js +8 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/RUM.d.ts +120 -0
- package/dist-types/RUMClient.d.ts +158 -0
- package/dist-types/commands/CreateAppMonitorCommand.d.ts +43 -0
- package/dist-types/commands/DeleteAppMonitorCommand.d.ts +35 -0
- package/dist-types/commands/GetAppMonitorCommand.d.ts +35 -0
- package/dist-types/commands/GetAppMonitorDataCommand.d.ts +36 -0
- package/dist-types/commands/ListAppMonitorsCommand.d.ts +35 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
- package/dist-types/commands/PutRumEventsCommand.d.ts +38 -0
- package/dist-types/commands/TagResourceCommand.d.ts +48 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UpdateAppMonitorCommand.d.ts +45 -0
- package/dist-types/commands/index.d.ts +10 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +824 -0
- package/dist-types/pagination/GetAppMonitorDataPaginator.d.ts +4 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListAppMonitorsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +32 -0
- package/dist-types/runtimeConfig.browser.d.ts +39 -0
- package/dist-types/runtimeConfig.d.ts +39 -0
- package/dist-types/runtimeConfig.native.d.ts +38 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/RUM.d.ts +55 -0
- package/dist-types/ts3.4/RUMClient.d.ts +81 -0
- package/dist-types/ts3.4/commands/CreateAppMonitorCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteAppMonitorCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetAppMonitorCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetAppMonitorDataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListAppMonitorsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutRumEventsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateAppMonitorCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +10 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +5 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +455 -0
- package/dist-types/ts3.4/pagination/GetAppMonitorDataPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAppMonitorsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +32 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +36 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +94 -0
|
@@ -0,0 +1,1652 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
|
+
import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
|
|
3
|
+
import { expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
|
|
4
|
+
export var serializeAws_restJson1CreateAppMonitorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
6
|
+
return __generator(this, function (_c) {
|
|
7
|
+
switch (_c.label) {
|
|
8
|
+
case 0: return [4, context.endpoint()];
|
|
9
|
+
case 1:
|
|
10
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
11
|
+
headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor";
|
|
15
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.AppMonitorConfiguration !== undefined &&
|
|
16
|
+
input.AppMonitorConfiguration !== null && {
|
|
17
|
+
AppMonitorConfiguration: serializeAws_restJson1AppMonitorConfiguration(input.AppMonitorConfiguration, context),
|
|
18
|
+
})), (input.CwLogEnabled !== undefined && input.CwLogEnabled !== null && { CwLogEnabled: input.CwLogEnabled })), (input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
19
|
+
return [2, new __HttpRequest({
|
|
20
|
+
protocol: protocol,
|
|
21
|
+
hostname: hostname,
|
|
22
|
+
port: port,
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers: headers,
|
|
25
|
+
path: resolvedPath,
|
|
26
|
+
body: body,
|
|
27
|
+
})];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}); };
|
|
31
|
+
export var serializeAws_restJson1DeleteAppMonitorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
32
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
33
|
+
return __generator(this, function (_c) {
|
|
34
|
+
switch (_c.label) {
|
|
35
|
+
case 0: return [4, context.endpoint()];
|
|
36
|
+
case 1:
|
|
37
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
38
|
+
headers = {};
|
|
39
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor/{Name}";
|
|
40
|
+
if (input.Name !== undefined) {
|
|
41
|
+
labelValue = input.Name;
|
|
42
|
+
if (labelValue.length <= 0) {
|
|
43
|
+
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
44
|
+
}
|
|
45
|
+
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new Error("No value provided for input HTTP label: Name.");
|
|
49
|
+
}
|
|
50
|
+
return [2, new __HttpRequest({
|
|
51
|
+
protocol: protocol,
|
|
52
|
+
hostname: hostname,
|
|
53
|
+
port: port,
|
|
54
|
+
method: "DELETE",
|
|
55
|
+
headers: headers,
|
|
56
|
+
path: resolvedPath,
|
|
57
|
+
body: body,
|
|
58
|
+
})];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); };
|
|
62
|
+
export var serializeAws_restJson1GetAppMonitorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
64
|
+
return __generator(this, function (_c) {
|
|
65
|
+
switch (_c.label) {
|
|
66
|
+
case 0: return [4, context.endpoint()];
|
|
67
|
+
case 1:
|
|
68
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
69
|
+
headers = {};
|
|
70
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor/{Name}";
|
|
71
|
+
if (input.Name !== undefined) {
|
|
72
|
+
labelValue = input.Name;
|
|
73
|
+
if (labelValue.length <= 0) {
|
|
74
|
+
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
75
|
+
}
|
|
76
|
+
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
throw new Error("No value provided for input HTTP label: Name.");
|
|
80
|
+
}
|
|
81
|
+
return [2, new __HttpRequest({
|
|
82
|
+
protocol: protocol,
|
|
83
|
+
hostname: hostname,
|
|
84
|
+
port: port,
|
|
85
|
+
method: "GET",
|
|
86
|
+
headers: headers,
|
|
87
|
+
path: resolvedPath,
|
|
88
|
+
body: body,
|
|
89
|
+
})];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}); };
|
|
93
|
+
export var serializeAws_restJson1GetAppMonitorDataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
95
|
+
return __generator(this, function (_c) {
|
|
96
|
+
switch (_c.label) {
|
|
97
|
+
case 0: return [4, context.endpoint()];
|
|
98
|
+
case 1:
|
|
99
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
100
|
+
headers = {
|
|
101
|
+
"content-type": "application/json",
|
|
102
|
+
};
|
|
103
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor/{Name}/data";
|
|
104
|
+
if (input.Name !== undefined) {
|
|
105
|
+
labelValue = input.Name;
|
|
106
|
+
if (labelValue.length <= 0) {
|
|
107
|
+
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
108
|
+
}
|
|
109
|
+
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
throw new Error("No value provided for input HTTP label: Name.");
|
|
113
|
+
}
|
|
114
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Filters !== undefined &&
|
|
115
|
+
input.Filters !== null && { Filters: serializeAws_restJson1QueryFilters(input.Filters, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.TimeRange !== undefined &&
|
|
116
|
+
input.TimeRange !== null && { TimeRange: serializeAws_restJson1TimeRange(input.TimeRange, context) })));
|
|
117
|
+
return [2, new __HttpRequest({
|
|
118
|
+
protocol: protocol,
|
|
119
|
+
hostname: hostname,
|
|
120
|
+
port: port,
|
|
121
|
+
method: "POST",
|
|
122
|
+
headers: headers,
|
|
123
|
+
path: resolvedPath,
|
|
124
|
+
body: body,
|
|
125
|
+
})];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}); };
|
|
129
|
+
export var serializeAws_restJson1ListAppMonitorsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
130
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
131
|
+
return __generator(this, function (_c) {
|
|
132
|
+
switch (_c.label) {
|
|
133
|
+
case 0: return [4, context.endpoint()];
|
|
134
|
+
case 1:
|
|
135
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
136
|
+
headers = {};
|
|
137
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitors";
|
|
138
|
+
query = __assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
|
|
139
|
+
return [2, new __HttpRequest({
|
|
140
|
+
protocol: protocol,
|
|
141
|
+
hostname: hostname,
|
|
142
|
+
port: port,
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: headers,
|
|
145
|
+
path: resolvedPath,
|
|
146
|
+
query: query,
|
|
147
|
+
body: body,
|
|
148
|
+
})];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}); };
|
|
152
|
+
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
153
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
154
|
+
return __generator(this, function (_c) {
|
|
155
|
+
switch (_c.label) {
|
|
156
|
+
case 0: return [4, context.endpoint()];
|
|
157
|
+
case 1:
|
|
158
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
159
|
+
headers = {};
|
|
160
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
161
|
+
if (input.ResourceArn !== undefined) {
|
|
162
|
+
labelValue = input.ResourceArn;
|
|
163
|
+
if (labelValue.length <= 0) {
|
|
164
|
+
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
165
|
+
}
|
|
166
|
+
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
170
|
+
}
|
|
171
|
+
return [2, new __HttpRequest({
|
|
172
|
+
protocol: protocol,
|
|
173
|
+
hostname: hostname,
|
|
174
|
+
port: port,
|
|
175
|
+
method: "GET",
|
|
176
|
+
headers: headers,
|
|
177
|
+
path: resolvedPath,
|
|
178
|
+
body: body,
|
|
179
|
+
})];
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}); };
|
|
183
|
+
export var serializeAws_restJson1PutRumEventsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
184
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
|
|
185
|
+
return __generator(this, function (_c) {
|
|
186
|
+
switch (_c.label) {
|
|
187
|
+
case 0: return [4, context.endpoint()];
|
|
188
|
+
case 1:
|
|
189
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
190
|
+
headers = {
|
|
191
|
+
"content-type": "application/json",
|
|
192
|
+
};
|
|
193
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitors/{Id}";
|
|
194
|
+
if (input.Id !== undefined) {
|
|
195
|
+
labelValue = input.Id;
|
|
196
|
+
if (labelValue.length <= 0) {
|
|
197
|
+
throw new Error("Empty value provided for input HTTP label: Id.");
|
|
198
|
+
}
|
|
199
|
+
resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue));
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
throw new Error("No value provided for input HTTP label: Id.");
|
|
203
|
+
}
|
|
204
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.AppMonitorDetails !== undefined &&
|
|
205
|
+
input.AppMonitorDetails !== null && {
|
|
206
|
+
AppMonitorDetails: serializeAws_restJson1AppMonitorDetails(input.AppMonitorDetails, context),
|
|
207
|
+
})), (input.BatchId !== undefined && input.BatchId !== null && { BatchId: input.BatchId })), (input.RumEvents !== undefined &&
|
|
208
|
+
input.RumEvents !== null && { RumEvents: serializeAws_restJson1RumEventList(input.RumEvents, context) })), (input.UserDetails !== undefined &&
|
|
209
|
+
input.UserDetails !== null && { UserDetails: serializeAws_restJson1UserDetails(input.UserDetails, context) })));
|
|
210
|
+
return [4, context.endpoint()];
|
|
211
|
+
case 2:
|
|
212
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
213
|
+
if (context.disableHostPrefix !== true) {
|
|
214
|
+
resolvedHostname = "dataplane." + resolvedHostname;
|
|
215
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
216
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return [2, new __HttpRequest({
|
|
220
|
+
protocol: protocol,
|
|
221
|
+
hostname: resolvedHostname,
|
|
222
|
+
port: port,
|
|
223
|
+
method: "POST",
|
|
224
|
+
headers: headers,
|
|
225
|
+
path: resolvedPath,
|
|
226
|
+
body: body,
|
|
227
|
+
})];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}); };
|
|
231
|
+
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
232
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
233
|
+
return __generator(this, function (_c) {
|
|
234
|
+
switch (_c.label) {
|
|
235
|
+
case 0: return [4, context.endpoint()];
|
|
236
|
+
case 1:
|
|
237
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
238
|
+
headers = {
|
|
239
|
+
"content-type": "application/json",
|
|
240
|
+
};
|
|
241
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
242
|
+
if (input.ResourceArn !== undefined) {
|
|
243
|
+
labelValue = input.ResourceArn;
|
|
244
|
+
if (labelValue.length <= 0) {
|
|
245
|
+
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
246
|
+
}
|
|
247
|
+
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
251
|
+
}
|
|
252
|
+
body = JSON.stringify(__assign({}, (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
253
|
+
return [2, new __HttpRequest({
|
|
254
|
+
protocol: protocol,
|
|
255
|
+
hostname: hostname,
|
|
256
|
+
port: port,
|
|
257
|
+
method: "POST",
|
|
258
|
+
headers: headers,
|
|
259
|
+
path: resolvedPath,
|
|
260
|
+
body: body,
|
|
261
|
+
})];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}); };
|
|
265
|
+
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
266
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
267
|
+
return __generator(this, function (_c) {
|
|
268
|
+
switch (_c.label) {
|
|
269
|
+
case 0: return [4, context.endpoint()];
|
|
270
|
+
case 1:
|
|
271
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
272
|
+
headers = {};
|
|
273
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{ResourceArn}";
|
|
274
|
+
if (input.ResourceArn !== undefined) {
|
|
275
|
+
labelValue = input.ResourceArn;
|
|
276
|
+
if (labelValue.length <= 0) {
|
|
277
|
+
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
278
|
+
}
|
|
279
|
+
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
283
|
+
}
|
|
284
|
+
query = __assign({}, (input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map(function (_entry) { return _entry; }) }));
|
|
285
|
+
return [2, new __HttpRequest({
|
|
286
|
+
protocol: protocol,
|
|
287
|
+
hostname: hostname,
|
|
288
|
+
port: port,
|
|
289
|
+
method: "DELETE",
|
|
290
|
+
headers: headers,
|
|
291
|
+
path: resolvedPath,
|
|
292
|
+
query: query,
|
|
293
|
+
body: body,
|
|
294
|
+
})];
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}); };
|
|
298
|
+
export var serializeAws_restJson1UpdateAppMonitorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
299
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
300
|
+
return __generator(this, function (_c) {
|
|
301
|
+
switch (_c.label) {
|
|
302
|
+
case 0: return [4, context.endpoint()];
|
|
303
|
+
case 1:
|
|
304
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
305
|
+
headers = {
|
|
306
|
+
"content-type": "application/json",
|
|
307
|
+
};
|
|
308
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/appmonitor/{Name}";
|
|
309
|
+
if (input.Name !== undefined) {
|
|
310
|
+
labelValue = input.Name;
|
|
311
|
+
if (labelValue.length <= 0) {
|
|
312
|
+
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
313
|
+
}
|
|
314
|
+
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
throw new Error("No value provided for input HTTP label: Name.");
|
|
318
|
+
}
|
|
319
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.AppMonitorConfiguration !== undefined &&
|
|
320
|
+
input.AppMonitorConfiguration !== null && {
|
|
321
|
+
AppMonitorConfiguration: serializeAws_restJson1AppMonitorConfiguration(input.AppMonitorConfiguration, context),
|
|
322
|
+
})), (input.CwLogEnabled !== undefined && input.CwLogEnabled !== null && { CwLogEnabled: input.CwLogEnabled })), (input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain })));
|
|
323
|
+
return [2, new __HttpRequest({
|
|
324
|
+
protocol: protocol,
|
|
325
|
+
hostname: hostname,
|
|
326
|
+
port: port,
|
|
327
|
+
method: "PATCH",
|
|
328
|
+
headers: headers,
|
|
329
|
+
path: resolvedPath,
|
|
330
|
+
body: body,
|
|
331
|
+
})];
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}); };
|
|
335
|
+
export var deserializeAws_restJson1CreateAppMonitorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
336
|
+
var contents, data, _a, _b;
|
|
337
|
+
return __generator(this, function (_c) {
|
|
338
|
+
switch (_c.label) {
|
|
339
|
+
case 0:
|
|
340
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
341
|
+
return [2, deserializeAws_restJson1CreateAppMonitorCommandError(output, context)];
|
|
342
|
+
}
|
|
343
|
+
contents = {
|
|
344
|
+
$metadata: deserializeMetadata(output),
|
|
345
|
+
Id: undefined,
|
|
346
|
+
};
|
|
347
|
+
_a = __expectNonNull;
|
|
348
|
+
_b = __expectObject;
|
|
349
|
+
return [4, parseBody(output.body, context)];
|
|
350
|
+
case 1:
|
|
351
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
352
|
+
if (data.Id !== undefined && data.Id !== null) {
|
|
353
|
+
contents.Id = __expectString(data.Id);
|
|
354
|
+
}
|
|
355
|
+
return [2, Promise.resolve(contents)];
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
}); };
|
|
359
|
+
var deserializeAws_restJson1CreateAppMonitorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
360
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
361
|
+
var _j;
|
|
362
|
+
return __generator(this, function (_k) {
|
|
363
|
+
switch (_k.label) {
|
|
364
|
+
case 0:
|
|
365
|
+
_a = [__assign({}, output)];
|
|
366
|
+
_j = {};
|
|
367
|
+
return [4, parseBody(output.body, context)];
|
|
368
|
+
case 1:
|
|
369
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
370
|
+
errorCode = "UnknownError";
|
|
371
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
372
|
+
_b = errorCode;
|
|
373
|
+
switch (_b) {
|
|
374
|
+
case "AccessDeniedException": return [3, 2];
|
|
375
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
376
|
+
case "ConflictException": return [3, 4];
|
|
377
|
+
case "com.amazonaws.rum#ConflictException": return [3, 4];
|
|
378
|
+
case "InternalServerException": return [3, 6];
|
|
379
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 6];
|
|
380
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
381
|
+
case "com.amazonaws.rum#ServiceQuotaExceededException": return [3, 8];
|
|
382
|
+
case "ThrottlingException": return [3, 10];
|
|
383
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 10];
|
|
384
|
+
case "ValidationException": return [3, 12];
|
|
385
|
+
case "com.amazonaws.rum#ValidationException": return [3, 12];
|
|
386
|
+
}
|
|
387
|
+
return [3, 14];
|
|
388
|
+
case 2:
|
|
389
|
+
_c = [{}];
|
|
390
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
391
|
+
case 3:
|
|
392
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
393
|
+
return [3, 15];
|
|
394
|
+
case 4:
|
|
395
|
+
_d = [{}];
|
|
396
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
397
|
+
case 5:
|
|
398
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
399
|
+
return [3, 15];
|
|
400
|
+
case 6:
|
|
401
|
+
_e = [{}];
|
|
402
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
403
|
+
case 7:
|
|
404
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
405
|
+
return [3, 15];
|
|
406
|
+
case 8:
|
|
407
|
+
_f = [{}];
|
|
408
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
409
|
+
case 9:
|
|
410
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
411
|
+
return [3, 15];
|
|
412
|
+
case 10:
|
|
413
|
+
_g = [{}];
|
|
414
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
415
|
+
case 11:
|
|
416
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
417
|
+
return [3, 15];
|
|
418
|
+
case 12:
|
|
419
|
+
_h = [{}];
|
|
420
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
421
|
+
case 13:
|
|
422
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
423
|
+
return [3, 15];
|
|
424
|
+
case 14:
|
|
425
|
+
parsedBody = parsedOutput.body;
|
|
426
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
427
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
428
|
+
_k.label = 15;
|
|
429
|
+
case 15:
|
|
430
|
+
message = response.message || response.Message || errorCode;
|
|
431
|
+
response.message = message;
|
|
432
|
+
delete response.Message;
|
|
433
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
}); };
|
|
437
|
+
export var deserializeAws_restJson1DeleteAppMonitorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
438
|
+
var contents;
|
|
439
|
+
return __generator(this, function (_a) {
|
|
440
|
+
switch (_a.label) {
|
|
441
|
+
case 0:
|
|
442
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
443
|
+
return [2, deserializeAws_restJson1DeleteAppMonitorCommandError(output, context)];
|
|
444
|
+
}
|
|
445
|
+
contents = {
|
|
446
|
+
$metadata: deserializeMetadata(output),
|
|
447
|
+
};
|
|
448
|
+
return [4, collectBody(output.body, context)];
|
|
449
|
+
case 1:
|
|
450
|
+
_a.sent();
|
|
451
|
+
return [2, Promise.resolve(contents)];
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}); };
|
|
455
|
+
var deserializeAws_restJson1DeleteAppMonitorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
456
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
457
|
+
var _j;
|
|
458
|
+
return __generator(this, function (_k) {
|
|
459
|
+
switch (_k.label) {
|
|
460
|
+
case 0:
|
|
461
|
+
_a = [__assign({}, output)];
|
|
462
|
+
_j = {};
|
|
463
|
+
return [4, parseBody(output.body, context)];
|
|
464
|
+
case 1:
|
|
465
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
466
|
+
errorCode = "UnknownError";
|
|
467
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
468
|
+
_b = errorCode;
|
|
469
|
+
switch (_b) {
|
|
470
|
+
case "AccessDeniedException": return [3, 2];
|
|
471
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
472
|
+
case "ConflictException": return [3, 4];
|
|
473
|
+
case "com.amazonaws.rum#ConflictException": return [3, 4];
|
|
474
|
+
case "InternalServerException": return [3, 6];
|
|
475
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 6];
|
|
476
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
477
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 8];
|
|
478
|
+
case "ThrottlingException": return [3, 10];
|
|
479
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 10];
|
|
480
|
+
case "ValidationException": return [3, 12];
|
|
481
|
+
case "com.amazonaws.rum#ValidationException": return [3, 12];
|
|
482
|
+
}
|
|
483
|
+
return [3, 14];
|
|
484
|
+
case 2:
|
|
485
|
+
_c = [{}];
|
|
486
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
487
|
+
case 3:
|
|
488
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
489
|
+
return [3, 15];
|
|
490
|
+
case 4:
|
|
491
|
+
_d = [{}];
|
|
492
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
493
|
+
case 5:
|
|
494
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
495
|
+
return [3, 15];
|
|
496
|
+
case 6:
|
|
497
|
+
_e = [{}];
|
|
498
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
499
|
+
case 7:
|
|
500
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
501
|
+
return [3, 15];
|
|
502
|
+
case 8:
|
|
503
|
+
_f = [{}];
|
|
504
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
505
|
+
case 9:
|
|
506
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
507
|
+
return [3, 15];
|
|
508
|
+
case 10:
|
|
509
|
+
_g = [{}];
|
|
510
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
511
|
+
case 11:
|
|
512
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
513
|
+
return [3, 15];
|
|
514
|
+
case 12:
|
|
515
|
+
_h = [{}];
|
|
516
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
517
|
+
case 13:
|
|
518
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
519
|
+
return [3, 15];
|
|
520
|
+
case 14:
|
|
521
|
+
parsedBody = parsedOutput.body;
|
|
522
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
523
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
524
|
+
_k.label = 15;
|
|
525
|
+
case 15:
|
|
526
|
+
message = response.message || response.Message || errorCode;
|
|
527
|
+
response.message = message;
|
|
528
|
+
delete response.Message;
|
|
529
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
}); };
|
|
533
|
+
export var deserializeAws_restJson1GetAppMonitorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
534
|
+
var contents, data, _a, _b;
|
|
535
|
+
return __generator(this, function (_c) {
|
|
536
|
+
switch (_c.label) {
|
|
537
|
+
case 0:
|
|
538
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
539
|
+
return [2, deserializeAws_restJson1GetAppMonitorCommandError(output, context)];
|
|
540
|
+
}
|
|
541
|
+
contents = {
|
|
542
|
+
$metadata: deserializeMetadata(output),
|
|
543
|
+
AppMonitor: undefined,
|
|
544
|
+
};
|
|
545
|
+
_a = __expectNonNull;
|
|
546
|
+
_b = __expectObject;
|
|
547
|
+
return [4, parseBody(output.body, context)];
|
|
548
|
+
case 1:
|
|
549
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
550
|
+
if (data.AppMonitor !== undefined && data.AppMonitor !== null) {
|
|
551
|
+
contents.AppMonitor = deserializeAws_restJson1AppMonitor(data.AppMonitor, context);
|
|
552
|
+
}
|
|
553
|
+
return [2, Promise.resolve(contents)];
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}); };
|
|
557
|
+
var deserializeAws_restJson1GetAppMonitorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
558
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
559
|
+
var _h;
|
|
560
|
+
return __generator(this, function (_j) {
|
|
561
|
+
switch (_j.label) {
|
|
562
|
+
case 0:
|
|
563
|
+
_a = [__assign({}, output)];
|
|
564
|
+
_h = {};
|
|
565
|
+
return [4, parseBody(output.body, context)];
|
|
566
|
+
case 1:
|
|
567
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
568
|
+
errorCode = "UnknownError";
|
|
569
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
570
|
+
_b = errorCode;
|
|
571
|
+
switch (_b) {
|
|
572
|
+
case "AccessDeniedException": return [3, 2];
|
|
573
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
574
|
+
case "InternalServerException": return [3, 4];
|
|
575
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 4];
|
|
576
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
577
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 6];
|
|
578
|
+
case "ThrottlingException": return [3, 8];
|
|
579
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 8];
|
|
580
|
+
case "ValidationException": return [3, 10];
|
|
581
|
+
case "com.amazonaws.rum#ValidationException": return [3, 10];
|
|
582
|
+
}
|
|
583
|
+
return [3, 12];
|
|
584
|
+
case 2:
|
|
585
|
+
_c = [{}];
|
|
586
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
587
|
+
case 3:
|
|
588
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
589
|
+
return [3, 13];
|
|
590
|
+
case 4:
|
|
591
|
+
_d = [{}];
|
|
592
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
593
|
+
case 5:
|
|
594
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
595
|
+
return [3, 13];
|
|
596
|
+
case 6:
|
|
597
|
+
_e = [{}];
|
|
598
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
599
|
+
case 7:
|
|
600
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
601
|
+
return [3, 13];
|
|
602
|
+
case 8:
|
|
603
|
+
_f = [{}];
|
|
604
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
605
|
+
case 9:
|
|
606
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
607
|
+
return [3, 13];
|
|
608
|
+
case 10:
|
|
609
|
+
_g = [{}];
|
|
610
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
611
|
+
case 11:
|
|
612
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
613
|
+
return [3, 13];
|
|
614
|
+
case 12:
|
|
615
|
+
parsedBody = parsedOutput.body;
|
|
616
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
617
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
618
|
+
_j.label = 13;
|
|
619
|
+
case 13:
|
|
620
|
+
message = response.message || response.Message || errorCode;
|
|
621
|
+
response.message = message;
|
|
622
|
+
delete response.Message;
|
|
623
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}); };
|
|
627
|
+
export var deserializeAws_restJson1GetAppMonitorDataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
628
|
+
var contents, data, _a, _b;
|
|
629
|
+
return __generator(this, function (_c) {
|
|
630
|
+
switch (_c.label) {
|
|
631
|
+
case 0:
|
|
632
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
633
|
+
return [2, deserializeAws_restJson1GetAppMonitorDataCommandError(output, context)];
|
|
634
|
+
}
|
|
635
|
+
contents = {
|
|
636
|
+
$metadata: deserializeMetadata(output),
|
|
637
|
+
Events: undefined,
|
|
638
|
+
NextToken: undefined,
|
|
639
|
+
};
|
|
640
|
+
_a = __expectNonNull;
|
|
641
|
+
_b = __expectObject;
|
|
642
|
+
return [4, parseBody(output.body, context)];
|
|
643
|
+
case 1:
|
|
644
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
645
|
+
if (data.Events !== undefined && data.Events !== null) {
|
|
646
|
+
contents.Events = deserializeAws_restJson1EventDataList(data.Events, context);
|
|
647
|
+
}
|
|
648
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
649
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
650
|
+
}
|
|
651
|
+
return [2, Promise.resolve(contents)];
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
}); };
|
|
655
|
+
var deserializeAws_restJson1GetAppMonitorDataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
656
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
657
|
+
var _h;
|
|
658
|
+
return __generator(this, function (_j) {
|
|
659
|
+
switch (_j.label) {
|
|
660
|
+
case 0:
|
|
661
|
+
_a = [__assign({}, output)];
|
|
662
|
+
_h = {};
|
|
663
|
+
return [4, parseBody(output.body, context)];
|
|
664
|
+
case 1:
|
|
665
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
666
|
+
errorCode = "UnknownError";
|
|
667
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
668
|
+
_b = errorCode;
|
|
669
|
+
switch (_b) {
|
|
670
|
+
case "AccessDeniedException": return [3, 2];
|
|
671
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
672
|
+
case "InternalServerException": return [3, 4];
|
|
673
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 4];
|
|
674
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
675
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 6];
|
|
676
|
+
case "ThrottlingException": return [3, 8];
|
|
677
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 8];
|
|
678
|
+
case "ValidationException": return [3, 10];
|
|
679
|
+
case "com.amazonaws.rum#ValidationException": return [3, 10];
|
|
680
|
+
}
|
|
681
|
+
return [3, 12];
|
|
682
|
+
case 2:
|
|
683
|
+
_c = [{}];
|
|
684
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
685
|
+
case 3:
|
|
686
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
687
|
+
return [3, 13];
|
|
688
|
+
case 4:
|
|
689
|
+
_d = [{}];
|
|
690
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
691
|
+
case 5:
|
|
692
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
693
|
+
return [3, 13];
|
|
694
|
+
case 6:
|
|
695
|
+
_e = [{}];
|
|
696
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
697
|
+
case 7:
|
|
698
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
699
|
+
return [3, 13];
|
|
700
|
+
case 8:
|
|
701
|
+
_f = [{}];
|
|
702
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
703
|
+
case 9:
|
|
704
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
705
|
+
return [3, 13];
|
|
706
|
+
case 10:
|
|
707
|
+
_g = [{}];
|
|
708
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
709
|
+
case 11:
|
|
710
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
711
|
+
return [3, 13];
|
|
712
|
+
case 12:
|
|
713
|
+
parsedBody = parsedOutput.body;
|
|
714
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
715
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
716
|
+
_j.label = 13;
|
|
717
|
+
case 13:
|
|
718
|
+
message = response.message || response.Message || errorCode;
|
|
719
|
+
response.message = message;
|
|
720
|
+
delete response.Message;
|
|
721
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
}); };
|
|
725
|
+
export var deserializeAws_restJson1ListAppMonitorsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
726
|
+
var contents, data, _a, _b;
|
|
727
|
+
return __generator(this, function (_c) {
|
|
728
|
+
switch (_c.label) {
|
|
729
|
+
case 0:
|
|
730
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
731
|
+
return [2, deserializeAws_restJson1ListAppMonitorsCommandError(output, context)];
|
|
732
|
+
}
|
|
733
|
+
contents = {
|
|
734
|
+
$metadata: deserializeMetadata(output),
|
|
735
|
+
AppMonitorSummaries: undefined,
|
|
736
|
+
NextToken: undefined,
|
|
737
|
+
};
|
|
738
|
+
_a = __expectNonNull;
|
|
739
|
+
_b = __expectObject;
|
|
740
|
+
return [4, parseBody(output.body, context)];
|
|
741
|
+
case 1:
|
|
742
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
743
|
+
if (data.AppMonitorSummaries !== undefined && data.AppMonitorSummaries !== null) {
|
|
744
|
+
contents.AppMonitorSummaries = deserializeAws_restJson1AppMonitorSummaryList(data.AppMonitorSummaries, context);
|
|
745
|
+
}
|
|
746
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
747
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
748
|
+
}
|
|
749
|
+
return [2, Promise.resolve(contents)];
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
}); };
|
|
753
|
+
var deserializeAws_restJson1ListAppMonitorsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
754
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
755
|
+
var _g;
|
|
756
|
+
return __generator(this, function (_h) {
|
|
757
|
+
switch (_h.label) {
|
|
758
|
+
case 0:
|
|
759
|
+
_a = [__assign({}, output)];
|
|
760
|
+
_g = {};
|
|
761
|
+
return [4, parseBody(output.body, context)];
|
|
762
|
+
case 1:
|
|
763
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
764
|
+
errorCode = "UnknownError";
|
|
765
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
766
|
+
_b = errorCode;
|
|
767
|
+
switch (_b) {
|
|
768
|
+
case "AccessDeniedException": return [3, 2];
|
|
769
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
770
|
+
case "InternalServerException": return [3, 4];
|
|
771
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 4];
|
|
772
|
+
case "ThrottlingException": return [3, 6];
|
|
773
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 6];
|
|
774
|
+
case "ValidationException": return [3, 8];
|
|
775
|
+
case "com.amazonaws.rum#ValidationException": return [3, 8];
|
|
776
|
+
}
|
|
777
|
+
return [3, 10];
|
|
778
|
+
case 2:
|
|
779
|
+
_c = [{}];
|
|
780
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
781
|
+
case 3:
|
|
782
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
783
|
+
return [3, 11];
|
|
784
|
+
case 4:
|
|
785
|
+
_d = [{}];
|
|
786
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
787
|
+
case 5:
|
|
788
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
789
|
+
return [3, 11];
|
|
790
|
+
case 6:
|
|
791
|
+
_e = [{}];
|
|
792
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
793
|
+
case 7:
|
|
794
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
795
|
+
return [3, 11];
|
|
796
|
+
case 8:
|
|
797
|
+
_f = [{}];
|
|
798
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
799
|
+
case 9:
|
|
800
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
801
|
+
return [3, 11];
|
|
802
|
+
case 10:
|
|
803
|
+
parsedBody = parsedOutput.body;
|
|
804
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
805
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
806
|
+
_h.label = 11;
|
|
807
|
+
case 11:
|
|
808
|
+
message = response.message || response.Message || errorCode;
|
|
809
|
+
response.message = message;
|
|
810
|
+
delete response.Message;
|
|
811
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
}); };
|
|
815
|
+
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
816
|
+
var contents, data, _a, _b;
|
|
817
|
+
return __generator(this, function (_c) {
|
|
818
|
+
switch (_c.label) {
|
|
819
|
+
case 0:
|
|
820
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
821
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
822
|
+
}
|
|
823
|
+
contents = {
|
|
824
|
+
$metadata: deserializeMetadata(output),
|
|
825
|
+
ResourceArn: undefined,
|
|
826
|
+
Tags: undefined,
|
|
827
|
+
};
|
|
828
|
+
_a = __expectNonNull;
|
|
829
|
+
_b = __expectObject;
|
|
830
|
+
return [4, parseBody(output.body, context)];
|
|
831
|
+
case 1:
|
|
832
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
833
|
+
if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
|
|
834
|
+
contents.ResourceArn = __expectString(data.ResourceArn);
|
|
835
|
+
}
|
|
836
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
837
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
838
|
+
}
|
|
839
|
+
return [2, Promise.resolve(contents)];
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
}); };
|
|
843
|
+
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
844
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
845
|
+
var _f;
|
|
846
|
+
return __generator(this, function (_g) {
|
|
847
|
+
switch (_g.label) {
|
|
848
|
+
case 0:
|
|
849
|
+
_a = [__assign({}, output)];
|
|
850
|
+
_f = {};
|
|
851
|
+
return [4, parseBody(output.body, context)];
|
|
852
|
+
case 1:
|
|
853
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
854
|
+
errorCode = "UnknownError";
|
|
855
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
856
|
+
_b = errorCode;
|
|
857
|
+
switch (_b) {
|
|
858
|
+
case "InternalServerException": return [3, 2];
|
|
859
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 2];
|
|
860
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
861
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 4];
|
|
862
|
+
case "ValidationException": return [3, 6];
|
|
863
|
+
case "com.amazonaws.rum#ValidationException": return [3, 6];
|
|
864
|
+
}
|
|
865
|
+
return [3, 8];
|
|
866
|
+
case 2:
|
|
867
|
+
_c = [{}];
|
|
868
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
869
|
+
case 3:
|
|
870
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
871
|
+
return [3, 9];
|
|
872
|
+
case 4:
|
|
873
|
+
_d = [{}];
|
|
874
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
875
|
+
case 5:
|
|
876
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
877
|
+
return [3, 9];
|
|
878
|
+
case 6:
|
|
879
|
+
_e = [{}];
|
|
880
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
881
|
+
case 7:
|
|
882
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
883
|
+
return [3, 9];
|
|
884
|
+
case 8:
|
|
885
|
+
parsedBody = parsedOutput.body;
|
|
886
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
887
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
888
|
+
_g.label = 9;
|
|
889
|
+
case 9:
|
|
890
|
+
message = response.message || response.Message || errorCode;
|
|
891
|
+
response.message = message;
|
|
892
|
+
delete response.Message;
|
|
893
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
}); };
|
|
897
|
+
export var deserializeAws_restJson1PutRumEventsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
898
|
+
var contents;
|
|
899
|
+
return __generator(this, function (_a) {
|
|
900
|
+
switch (_a.label) {
|
|
901
|
+
case 0:
|
|
902
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
903
|
+
return [2, deserializeAws_restJson1PutRumEventsCommandError(output, context)];
|
|
904
|
+
}
|
|
905
|
+
contents = {
|
|
906
|
+
$metadata: deserializeMetadata(output),
|
|
907
|
+
};
|
|
908
|
+
return [4, collectBody(output.body, context)];
|
|
909
|
+
case 1:
|
|
910
|
+
_a.sent();
|
|
911
|
+
return [2, Promise.resolve(contents)];
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
}); };
|
|
915
|
+
var deserializeAws_restJson1PutRumEventsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
916
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
917
|
+
var _h;
|
|
918
|
+
return __generator(this, function (_j) {
|
|
919
|
+
switch (_j.label) {
|
|
920
|
+
case 0:
|
|
921
|
+
_a = [__assign({}, output)];
|
|
922
|
+
_h = {};
|
|
923
|
+
return [4, parseBody(output.body, context)];
|
|
924
|
+
case 1:
|
|
925
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
926
|
+
errorCode = "UnknownError";
|
|
927
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
928
|
+
_b = errorCode;
|
|
929
|
+
switch (_b) {
|
|
930
|
+
case "AccessDeniedException": return [3, 2];
|
|
931
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
932
|
+
case "InternalServerException": return [3, 4];
|
|
933
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 4];
|
|
934
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
935
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 6];
|
|
936
|
+
case "ThrottlingException": return [3, 8];
|
|
937
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 8];
|
|
938
|
+
case "ValidationException": return [3, 10];
|
|
939
|
+
case "com.amazonaws.rum#ValidationException": return [3, 10];
|
|
940
|
+
}
|
|
941
|
+
return [3, 12];
|
|
942
|
+
case 2:
|
|
943
|
+
_c = [{}];
|
|
944
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
945
|
+
case 3:
|
|
946
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
947
|
+
return [3, 13];
|
|
948
|
+
case 4:
|
|
949
|
+
_d = [{}];
|
|
950
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
951
|
+
case 5:
|
|
952
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
953
|
+
return [3, 13];
|
|
954
|
+
case 6:
|
|
955
|
+
_e = [{}];
|
|
956
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
957
|
+
case 7:
|
|
958
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
959
|
+
return [3, 13];
|
|
960
|
+
case 8:
|
|
961
|
+
_f = [{}];
|
|
962
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
963
|
+
case 9:
|
|
964
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
965
|
+
return [3, 13];
|
|
966
|
+
case 10:
|
|
967
|
+
_g = [{}];
|
|
968
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
969
|
+
case 11:
|
|
970
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
971
|
+
return [3, 13];
|
|
972
|
+
case 12:
|
|
973
|
+
parsedBody = parsedOutput.body;
|
|
974
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
975
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
976
|
+
_j.label = 13;
|
|
977
|
+
case 13:
|
|
978
|
+
message = response.message || response.Message || errorCode;
|
|
979
|
+
response.message = message;
|
|
980
|
+
delete response.Message;
|
|
981
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
}); };
|
|
985
|
+
export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
986
|
+
var contents;
|
|
987
|
+
return __generator(this, function (_a) {
|
|
988
|
+
switch (_a.label) {
|
|
989
|
+
case 0:
|
|
990
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
991
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
992
|
+
}
|
|
993
|
+
contents = {
|
|
994
|
+
$metadata: deserializeMetadata(output),
|
|
995
|
+
};
|
|
996
|
+
return [4, collectBody(output.body, context)];
|
|
997
|
+
case 1:
|
|
998
|
+
_a.sent();
|
|
999
|
+
return [2, Promise.resolve(contents)];
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
}); };
|
|
1003
|
+
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1004
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1005
|
+
var _f;
|
|
1006
|
+
return __generator(this, function (_g) {
|
|
1007
|
+
switch (_g.label) {
|
|
1008
|
+
case 0:
|
|
1009
|
+
_a = [__assign({}, output)];
|
|
1010
|
+
_f = {};
|
|
1011
|
+
return [4, parseBody(output.body, context)];
|
|
1012
|
+
case 1:
|
|
1013
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1014
|
+
errorCode = "UnknownError";
|
|
1015
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1016
|
+
_b = errorCode;
|
|
1017
|
+
switch (_b) {
|
|
1018
|
+
case "InternalServerException": return [3, 2];
|
|
1019
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 2];
|
|
1020
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
1021
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 4];
|
|
1022
|
+
case "ValidationException": return [3, 6];
|
|
1023
|
+
case "com.amazonaws.rum#ValidationException": return [3, 6];
|
|
1024
|
+
}
|
|
1025
|
+
return [3, 8];
|
|
1026
|
+
case 2:
|
|
1027
|
+
_c = [{}];
|
|
1028
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1029
|
+
case 3:
|
|
1030
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1031
|
+
return [3, 9];
|
|
1032
|
+
case 4:
|
|
1033
|
+
_d = [{}];
|
|
1034
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1035
|
+
case 5:
|
|
1036
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1037
|
+
return [3, 9];
|
|
1038
|
+
case 6:
|
|
1039
|
+
_e = [{}];
|
|
1040
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1041
|
+
case 7:
|
|
1042
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1043
|
+
return [3, 9];
|
|
1044
|
+
case 8:
|
|
1045
|
+
parsedBody = parsedOutput.body;
|
|
1046
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1047
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1048
|
+
_g.label = 9;
|
|
1049
|
+
case 9:
|
|
1050
|
+
message = response.message || response.Message || errorCode;
|
|
1051
|
+
response.message = message;
|
|
1052
|
+
delete response.Message;
|
|
1053
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
}); };
|
|
1057
|
+
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1058
|
+
var contents;
|
|
1059
|
+
return __generator(this, function (_a) {
|
|
1060
|
+
switch (_a.label) {
|
|
1061
|
+
case 0:
|
|
1062
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1063
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
1064
|
+
}
|
|
1065
|
+
contents = {
|
|
1066
|
+
$metadata: deserializeMetadata(output),
|
|
1067
|
+
};
|
|
1068
|
+
return [4, collectBody(output.body, context)];
|
|
1069
|
+
case 1:
|
|
1070
|
+
_a.sent();
|
|
1071
|
+
return [2, Promise.resolve(contents)];
|
|
1072
|
+
}
|
|
1073
|
+
});
|
|
1074
|
+
}); };
|
|
1075
|
+
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1076
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1077
|
+
var _f;
|
|
1078
|
+
return __generator(this, function (_g) {
|
|
1079
|
+
switch (_g.label) {
|
|
1080
|
+
case 0:
|
|
1081
|
+
_a = [__assign({}, output)];
|
|
1082
|
+
_f = {};
|
|
1083
|
+
return [4, parseBody(output.body, context)];
|
|
1084
|
+
case 1:
|
|
1085
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1086
|
+
errorCode = "UnknownError";
|
|
1087
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1088
|
+
_b = errorCode;
|
|
1089
|
+
switch (_b) {
|
|
1090
|
+
case "InternalServerException": return [3, 2];
|
|
1091
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 2];
|
|
1092
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
1093
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 4];
|
|
1094
|
+
case "ValidationException": return [3, 6];
|
|
1095
|
+
case "com.amazonaws.rum#ValidationException": return [3, 6];
|
|
1096
|
+
}
|
|
1097
|
+
return [3, 8];
|
|
1098
|
+
case 2:
|
|
1099
|
+
_c = [{}];
|
|
1100
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1101
|
+
case 3:
|
|
1102
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1103
|
+
return [3, 9];
|
|
1104
|
+
case 4:
|
|
1105
|
+
_d = [{}];
|
|
1106
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1107
|
+
case 5:
|
|
1108
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1109
|
+
return [3, 9];
|
|
1110
|
+
case 6:
|
|
1111
|
+
_e = [{}];
|
|
1112
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1113
|
+
case 7:
|
|
1114
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1115
|
+
return [3, 9];
|
|
1116
|
+
case 8:
|
|
1117
|
+
parsedBody = parsedOutput.body;
|
|
1118
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1119
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1120
|
+
_g.label = 9;
|
|
1121
|
+
case 9:
|
|
1122
|
+
message = response.message || response.Message || errorCode;
|
|
1123
|
+
response.message = message;
|
|
1124
|
+
delete response.Message;
|
|
1125
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1126
|
+
}
|
|
1127
|
+
});
|
|
1128
|
+
}); };
|
|
1129
|
+
export var deserializeAws_restJson1UpdateAppMonitorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1130
|
+
var contents;
|
|
1131
|
+
return __generator(this, function (_a) {
|
|
1132
|
+
switch (_a.label) {
|
|
1133
|
+
case 0:
|
|
1134
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1135
|
+
return [2, deserializeAws_restJson1UpdateAppMonitorCommandError(output, context)];
|
|
1136
|
+
}
|
|
1137
|
+
contents = {
|
|
1138
|
+
$metadata: deserializeMetadata(output),
|
|
1139
|
+
};
|
|
1140
|
+
return [4, collectBody(output.body, context)];
|
|
1141
|
+
case 1:
|
|
1142
|
+
_a.sent();
|
|
1143
|
+
return [2, Promise.resolve(contents)];
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
}); };
|
|
1147
|
+
var deserializeAws_restJson1UpdateAppMonitorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1148
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
1149
|
+
var _j;
|
|
1150
|
+
return __generator(this, function (_k) {
|
|
1151
|
+
switch (_k.label) {
|
|
1152
|
+
case 0:
|
|
1153
|
+
_a = [__assign({}, output)];
|
|
1154
|
+
_j = {};
|
|
1155
|
+
return [4, parseBody(output.body, context)];
|
|
1156
|
+
case 1:
|
|
1157
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
1158
|
+
errorCode = "UnknownError";
|
|
1159
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1160
|
+
_b = errorCode;
|
|
1161
|
+
switch (_b) {
|
|
1162
|
+
case "AccessDeniedException": return [3, 2];
|
|
1163
|
+
case "com.amazonaws.rum#AccessDeniedException": return [3, 2];
|
|
1164
|
+
case "ConflictException": return [3, 4];
|
|
1165
|
+
case "com.amazonaws.rum#ConflictException": return [3, 4];
|
|
1166
|
+
case "InternalServerException": return [3, 6];
|
|
1167
|
+
case "com.amazonaws.rum#InternalServerException": return [3, 6];
|
|
1168
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1169
|
+
case "com.amazonaws.rum#ResourceNotFoundException": return [3, 8];
|
|
1170
|
+
case "ThrottlingException": return [3, 10];
|
|
1171
|
+
case "com.amazonaws.rum#ThrottlingException": return [3, 10];
|
|
1172
|
+
case "ValidationException": return [3, 12];
|
|
1173
|
+
case "com.amazonaws.rum#ValidationException": return [3, 12];
|
|
1174
|
+
}
|
|
1175
|
+
return [3, 14];
|
|
1176
|
+
case 2:
|
|
1177
|
+
_c = [{}];
|
|
1178
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1179
|
+
case 3:
|
|
1180
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1181
|
+
return [3, 15];
|
|
1182
|
+
case 4:
|
|
1183
|
+
_d = [{}];
|
|
1184
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1185
|
+
case 5:
|
|
1186
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1187
|
+
return [3, 15];
|
|
1188
|
+
case 6:
|
|
1189
|
+
_e = [{}];
|
|
1190
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1191
|
+
case 7:
|
|
1192
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1193
|
+
return [3, 15];
|
|
1194
|
+
case 8:
|
|
1195
|
+
_f = [{}];
|
|
1196
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1197
|
+
case 9:
|
|
1198
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1199
|
+
return [3, 15];
|
|
1200
|
+
case 10:
|
|
1201
|
+
_g = [{}];
|
|
1202
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1203
|
+
case 11:
|
|
1204
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1205
|
+
return [3, 15];
|
|
1206
|
+
case 12:
|
|
1207
|
+
_h = [{}];
|
|
1208
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1209
|
+
case 13:
|
|
1210
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1211
|
+
return [3, 15];
|
|
1212
|
+
case 14:
|
|
1213
|
+
parsedBody = parsedOutput.body;
|
|
1214
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1215
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1216
|
+
_k.label = 15;
|
|
1217
|
+
case 15:
|
|
1218
|
+
message = response.message || response.Message || errorCode;
|
|
1219
|
+
response.message = message;
|
|
1220
|
+
delete response.Message;
|
|
1221
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
}); };
|
|
1225
|
+
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1226
|
+
var contents, data;
|
|
1227
|
+
return __generator(this, function (_a) {
|
|
1228
|
+
contents = {
|
|
1229
|
+
name: "AccessDeniedException",
|
|
1230
|
+
$fault: "client",
|
|
1231
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1232
|
+
message: undefined,
|
|
1233
|
+
};
|
|
1234
|
+
data = parsedOutput.body;
|
|
1235
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1236
|
+
contents.message = __expectString(data.message);
|
|
1237
|
+
}
|
|
1238
|
+
return [2, contents];
|
|
1239
|
+
});
|
|
1240
|
+
}); };
|
|
1241
|
+
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1242
|
+
var contents, data;
|
|
1243
|
+
return __generator(this, function (_a) {
|
|
1244
|
+
contents = {
|
|
1245
|
+
name: "ConflictException",
|
|
1246
|
+
$fault: "client",
|
|
1247
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1248
|
+
message: undefined,
|
|
1249
|
+
resourceName: undefined,
|
|
1250
|
+
resourceType: undefined,
|
|
1251
|
+
};
|
|
1252
|
+
data = parsedOutput.body;
|
|
1253
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1254
|
+
contents.message = __expectString(data.message);
|
|
1255
|
+
}
|
|
1256
|
+
if (data.resourceName !== undefined && data.resourceName !== null) {
|
|
1257
|
+
contents.resourceName = __expectString(data.resourceName);
|
|
1258
|
+
}
|
|
1259
|
+
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
1260
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1261
|
+
}
|
|
1262
|
+
return [2, contents];
|
|
1263
|
+
});
|
|
1264
|
+
}); };
|
|
1265
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1266
|
+
var contents, data;
|
|
1267
|
+
return __generator(this, function (_a) {
|
|
1268
|
+
contents = {
|
|
1269
|
+
name: "InternalServerException",
|
|
1270
|
+
$fault: "server",
|
|
1271
|
+
$retryable: {},
|
|
1272
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1273
|
+
message: undefined,
|
|
1274
|
+
retryAfterSeconds: undefined,
|
|
1275
|
+
};
|
|
1276
|
+
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
1277
|
+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
1278
|
+
}
|
|
1279
|
+
data = parsedOutput.body;
|
|
1280
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1281
|
+
contents.message = __expectString(data.message);
|
|
1282
|
+
}
|
|
1283
|
+
return [2, contents];
|
|
1284
|
+
});
|
|
1285
|
+
}); };
|
|
1286
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1287
|
+
var contents, data;
|
|
1288
|
+
return __generator(this, function (_a) {
|
|
1289
|
+
contents = {
|
|
1290
|
+
name: "ResourceNotFoundException",
|
|
1291
|
+
$fault: "client",
|
|
1292
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1293
|
+
message: undefined,
|
|
1294
|
+
resourceName: undefined,
|
|
1295
|
+
resourceType: undefined,
|
|
1296
|
+
};
|
|
1297
|
+
data = parsedOutput.body;
|
|
1298
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1299
|
+
contents.message = __expectString(data.message);
|
|
1300
|
+
}
|
|
1301
|
+
if (data.resourceName !== undefined && data.resourceName !== null) {
|
|
1302
|
+
contents.resourceName = __expectString(data.resourceName);
|
|
1303
|
+
}
|
|
1304
|
+
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
1305
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1306
|
+
}
|
|
1307
|
+
return [2, contents];
|
|
1308
|
+
});
|
|
1309
|
+
}); };
|
|
1310
|
+
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1311
|
+
var contents, data;
|
|
1312
|
+
return __generator(this, function (_a) {
|
|
1313
|
+
contents = {
|
|
1314
|
+
name: "ServiceQuotaExceededException",
|
|
1315
|
+
$fault: "client",
|
|
1316
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1317
|
+
message: undefined,
|
|
1318
|
+
};
|
|
1319
|
+
data = parsedOutput.body;
|
|
1320
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1321
|
+
contents.message = __expectString(data.message);
|
|
1322
|
+
}
|
|
1323
|
+
return [2, contents];
|
|
1324
|
+
});
|
|
1325
|
+
}); };
|
|
1326
|
+
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1327
|
+
var contents, data;
|
|
1328
|
+
return __generator(this, function (_a) {
|
|
1329
|
+
contents = {
|
|
1330
|
+
name: "ThrottlingException",
|
|
1331
|
+
$fault: "client",
|
|
1332
|
+
$retryable: {
|
|
1333
|
+
throttling: true,
|
|
1334
|
+
},
|
|
1335
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1336
|
+
message: undefined,
|
|
1337
|
+
quotaCode: undefined,
|
|
1338
|
+
retryAfterSeconds: undefined,
|
|
1339
|
+
serviceCode: undefined,
|
|
1340
|
+
};
|
|
1341
|
+
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
1342
|
+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
1343
|
+
}
|
|
1344
|
+
data = parsedOutput.body;
|
|
1345
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1346
|
+
contents.message = __expectString(data.message);
|
|
1347
|
+
}
|
|
1348
|
+
if (data.quotaCode !== undefined && data.quotaCode !== null) {
|
|
1349
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
1350
|
+
}
|
|
1351
|
+
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
1352
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
1353
|
+
}
|
|
1354
|
+
return [2, contents];
|
|
1355
|
+
});
|
|
1356
|
+
}); };
|
|
1357
|
+
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1358
|
+
var contents, data;
|
|
1359
|
+
return __generator(this, function (_a) {
|
|
1360
|
+
contents = {
|
|
1361
|
+
name: "ValidationException",
|
|
1362
|
+
$fault: "client",
|
|
1363
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1364
|
+
message: undefined,
|
|
1365
|
+
};
|
|
1366
|
+
data = parsedOutput.body;
|
|
1367
|
+
if (data.message !== undefined && data.message !== null) {
|
|
1368
|
+
contents.message = __expectString(data.message);
|
|
1369
|
+
}
|
|
1370
|
+
return [2, contents];
|
|
1371
|
+
});
|
|
1372
|
+
}); };
|
|
1373
|
+
var serializeAws_restJson1AppMonitorConfiguration = function (input, context) {
|
|
1374
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AllowCookies !== undefined && input.AllowCookies !== null && { AllowCookies: input.AllowCookies })), (input.EnableXRay !== undefined && input.EnableXRay !== null && { EnableXRay: input.EnableXRay })), (input.ExcludedPages !== undefined &&
|
|
1375
|
+
input.ExcludedPages !== null && { ExcludedPages: serializeAws_restJson1Pages(input.ExcludedPages, context) })), (input.FavoritePages !== undefined &&
|
|
1376
|
+
input.FavoritePages !== null && {
|
|
1377
|
+
FavoritePages: serializeAws_restJson1FavoritePages(input.FavoritePages, context),
|
|
1378
|
+
})), (input.GuestRoleArn !== undefined && input.GuestRoleArn !== null && { GuestRoleArn: input.GuestRoleArn })), (input.IdentityPoolId !== undefined &&
|
|
1379
|
+
input.IdentityPoolId !== null && { IdentityPoolId: input.IdentityPoolId })), (input.IncludedPages !== undefined &&
|
|
1380
|
+
input.IncludedPages !== null && { IncludedPages: serializeAws_restJson1Pages(input.IncludedPages, context) })), (input.SessionSampleRate !== undefined &&
|
|
1381
|
+
input.SessionSampleRate !== null && { SessionSampleRate: __serializeFloat(input.SessionSampleRate) })), (input.Telemetries !== undefined &&
|
|
1382
|
+
input.Telemetries !== null && { Telemetries: serializeAws_restJson1Telemetries(input.Telemetries, context) }));
|
|
1383
|
+
};
|
|
1384
|
+
var serializeAws_restJson1AppMonitorDetails = function (input, context) {
|
|
1385
|
+
return __assign(__assign(__assign({}, (input.id !== undefined && input.id !== null && { id: input.id })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.version !== undefined && input.version !== null && { version: input.version }));
|
|
1386
|
+
};
|
|
1387
|
+
var serializeAws_restJson1FavoritePages = function (input, context) {
|
|
1388
|
+
return input
|
|
1389
|
+
.filter(function (e) { return e != null; })
|
|
1390
|
+
.map(function (entry) {
|
|
1391
|
+
if (entry === null) {
|
|
1392
|
+
return null;
|
|
1393
|
+
}
|
|
1394
|
+
return entry;
|
|
1395
|
+
});
|
|
1396
|
+
};
|
|
1397
|
+
var serializeAws_restJson1Pages = function (input, context) {
|
|
1398
|
+
return input
|
|
1399
|
+
.filter(function (e) { return e != null; })
|
|
1400
|
+
.map(function (entry) {
|
|
1401
|
+
if (entry === null) {
|
|
1402
|
+
return null;
|
|
1403
|
+
}
|
|
1404
|
+
return entry;
|
|
1405
|
+
});
|
|
1406
|
+
};
|
|
1407
|
+
var serializeAws_restJson1QueryFilter = function (input, context) {
|
|
1408
|
+
return __assign(__assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Values !== undefined &&
|
|
1409
|
+
input.Values !== null && { Values: serializeAws_restJson1QueryFilterValueList(input.Values, context) }));
|
|
1410
|
+
};
|
|
1411
|
+
var serializeAws_restJson1QueryFilters = function (input, context) {
|
|
1412
|
+
return input
|
|
1413
|
+
.filter(function (e) { return e != null; })
|
|
1414
|
+
.map(function (entry) {
|
|
1415
|
+
if (entry === null) {
|
|
1416
|
+
return null;
|
|
1417
|
+
}
|
|
1418
|
+
return serializeAws_restJson1QueryFilter(entry, context);
|
|
1419
|
+
});
|
|
1420
|
+
};
|
|
1421
|
+
var serializeAws_restJson1QueryFilterValueList = function (input, context) {
|
|
1422
|
+
return input
|
|
1423
|
+
.filter(function (e) { return e != null; })
|
|
1424
|
+
.map(function (entry) {
|
|
1425
|
+
if (entry === null) {
|
|
1426
|
+
return null;
|
|
1427
|
+
}
|
|
1428
|
+
return entry;
|
|
1429
|
+
});
|
|
1430
|
+
};
|
|
1431
|
+
var serializeAws_restJson1RumEvent = function (input, context) {
|
|
1432
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.details !== undefined &&
|
|
1433
|
+
input.details !== null && { details: __LazyJsonString.fromObject(input.details) })), (input.id !== undefined && input.id !== null && { id: input.id })), (input.metadata !== undefined &&
|
|
1434
|
+
input.metadata !== null && { metadata: __LazyJsonString.fromObject(input.metadata) })), (input.timestamp !== undefined &&
|
|
1435
|
+
input.timestamp !== null && { timestamp: Math.round(input.timestamp.getTime() / 1000) })), (input.type !== undefined && input.type !== null && { type: input.type }));
|
|
1436
|
+
};
|
|
1437
|
+
var serializeAws_restJson1RumEventList = function (input, context) {
|
|
1438
|
+
return input
|
|
1439
|
+
.filter(function (e) { return e != null; })
|
|
1440
|
+
.map(function (entry) {
|
|
1441
|
+
if (entry === null) {
|
|
1442
|
+
return null;
|
|
1443
|
+
}
|
|
1444
|
+
return serializeAws_restJson1RumEvent(entry, context);
|
|
1445
|
+
});
|
|
1446
|
+
};
|
|
1447
|
+
var serializeAws_restJson1TagMap = function (input, context) {
|
|
1448
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1449
|
+
var _b;
|
|
1450
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1451
|
+
if (value === null) {
|
|
1452
|
+
return acc;
|
|
1453
|
+
}
|
|
1454
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
1455
|
+
}, {});
|
|
1456
|
+
};
|
|
1457
|
+
var serializeAws_restJson1Telemetries = function (input, context) {
|
|
1458
|
+
return input
|
|
1459
|
+
.filter(function (e) { return e != null; })
|
|
1460
|
+
.map(function (entry) {
|
|
1461
|
+
if (entry === null) {
|
|
1462
|
+
return null;
|
|
1463
|
+
}
|
|
1464
|
+
return entry;
|
|
1465
|
+
});
|
|
1466
|
+
};
|
|
1467
|
+
var serializeAws_restJson1TimeRange = function (input, context) {
|
|
1468
|
+
return __assign(__assign({}, (input.After !== undefined && input.After !== null && { After: input.After })), (input.Before !== undefined && input.Before !== null && { Before: input.Before }));
|
|
1469
|
+
};
|
|
1470
|
+
var serializeAws_restJson1UserDetails = function (input, context) {
|
|
1471
|
+
return __assign(__assign({}, (input.sessionId !== undefined && input.sessionId !== null && { sessionId: input.sessionId })), (input.userId !== undefined && input.userId !== null && { userId: input.userId }));
|
|
1472
|
+
};
|
|
1473
|
+
var deserializeAws_restJson1AppMonitor = function (output, context) {
|
|
1474
|
+
return {
|
|
1475
|
+
AppMonitorConfiguration: output.AppMonitorConfiguration !== undefined && output.AppMonitorConfiguration !== null
|
|
1476
|
+
? deserializeAws_restJson1AppMonitorConfiguration(output.AppMonitorConfiguration, context)
|
|
1477
|
+
: undefined,
|
|
1478
|
+
Created: __expectString(output.Created),
|
|
1479
|
+
DataStorage: output.DataStorage !== undefined && output.DataStorage !== null
|
|
1480
|
+
? deserializeAws_restJson1DataStorage(output.DataStorage, context)
|
|
1481
|
+
: undefined,
|
|
1482
|
+
Domain: __expectString(output.Domain),
|
|
1483
|
+
Id: __expectString(output.Id),
|
|
1484
|
+
LastModified: __expectString(output.LastModified),
|
|
1485
|
+
Name: __expectString(output.Name),
|
|
1486
|
+
State: __expectString(output.State),
|
|
1487
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
1488
|
+
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
1489
|
+
: undefined,
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
var deserializeAws_restJson1AppMonitorConfiguration = function (output, context) {
|
|
1493
|
+
return {
|
|
1494
|
+
AllowCookies: __expectBoolean(output.AllowCookies),
|
|
1495
|
+
EnableXRay: __expectBoolean(output.EnableXRay),
|
|
1496
|
+
ExcludedPages: output.ExcludedPages !== undefined && output.ExcludedPages !== null
|
|
1497
|
+
? deserializeAws_restJson1Pages(output.ExcludedPages, context)
|
|
1498
|
+
: undefined,
|
|
1499
|
+
FavoritePages: output.FavoritePages !== undefined && output.FavoritePages !== null
|
|
1500
|
+
? deserializeAws_restJson1FavoritePages(output.FavoritePages, context)
|
|
1501
|
+
: undefined,
|
|
1502
|
+
GuestRoleArn: __expectString(output.GuestRoleArn),
|
|
1503
|
+
IdentityPoolId: __expectString(output.IdentityPoolId),
|
|
1504
|
+
IncludedPages: output.IncludedPages !== undefined && output.IncludedPages !== null
|
|
1505
|
+
? deserializeAws_restJson1Pages(output.IncludedPages, context)
|
|
1506
|
+
: undefined,
|
|
1507
|
+
SessionSampleRate: __limitedParseDouble(output.SessionSampleRate),
|
|
1508
|
+
Telemetries: output.Telemetries !== undefined && output.Telemetries !== null
|
|
1509
|
+
? deserializeAws_restJson1Telemetries(output.Telemetries, context)
|
|
1510
|
+
: undefined,
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
var deserializeAws_restJson1AppMonitorSummary = function (output, context) {
|
|
1514
|
+
return {
|
|
1515
|
+
Created: __expectString(output.Created),
|
|
1516
|
+
Id: __expectString(output.Id),
|
|
1517
|
+
LastModified: __expectString(output.LastModified),
|
|
1518
|
+
Name: __expectString(output.Name),
|
|
1519
|
+
State: __expectString(output.State),
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
1522
|
+
var deserializeAws_restJson1AppMonitorSummaryList = function (output, context) {
|
|
1523
|
+
return (output || [])
|
|
1524
|
+
.filter(function (e) { return e != null; })
|
|
1525
|
+
.map(function (entry) {
|
|
1526
|
+
if (entry === null) {
|
|
1527
|
+
return null;
|
|
1528
|
+
}
|
|
1529
|
+
return deserializeAws_restJson1AppMonitorSummary(entry, context);
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1532
|
+
var deserializeAws_restJson1CwLog = function (output, context) {
|
|
1533
|
+
return {
|
|
1534
|
+
CwLogEnabled: __expectBoolean(output.CwLogEnabled),
|
|
1535
|
+
CwLogGroup: __expectString(output.CwLogGroup),
|
|
1536
|
+
};
|
|
1537
|
+
};
|
|
1538
|
+
var deserializeAws_restJson1DataStorage = function (output, context) {
|
|
1539
|
+
return {
|
|
1540
|
+
CwLog: output.CwLog !== undefined && output.CwLog !== null
|
|
1541
|
+
? deserializeAws_restJson1CwLog(output.CwLog, context)
|
|
1542
|
+
: undefined,
|
|
1543
|
+
};
|
|
1544
|
+
};
|
|
1545
|
+
var deserializeAws_restJson1EventDataList = function (output, context) {
|
|
1546
|
+
return (output || [])
|
|
1547
|
+
.filter(function (e) { return e != null; })
|
|
1548
|
+
.map(function (entry) {
|
|
1549
|
+
if (entry === null) {
|
|
1550
|
+
return null;
|
|
1551
|
+
}
|
|
1552
|
+
return __expectString(entry);
|
|
1553
|
+
});
|
|
1554
|
+
};
|
|
1555
|
+
var deserializeAws_restJson1FavoritePages = function (output, context) {
|
|
1556
|
+
return (output || [])
|
|
1557
|
+
.filter(function (e) { return e != null; })
|
|
1558
|
+
.map(function (entry) {
|
|
1559
|
+
if (entry === null) {
|
|
1560
|
+
return null;
|
|
1561
|
+
}
|
|
1562
|
+
return __expectString(entry);
|
|
1563
|
+
});
|
|
1564
|
+
};
|
|
1565
|
+
var deserializeAws_restJson1Pages = function (output, context) {
|
|
1566
|
+
return (output || [])
|
|
1567
|
+
.filter(function (e) { return e != null; })
|
|
1568
|
+
.map(function (entry) {
|
|
1569
|
+
if (entry === null) {
|
|
1570
|
+
return null;
|
|
1571
|
+
}
|
|
1572
|
+
return __expectString(entry);
|
|
1573
|
+
});
|
|
1574
|
+
};
|
|
1575
|
+
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
1576
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
1577
|
+
var _b;
|
|
1578
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1579
|
+
if (value === null) {
|
|
1580
|
+
return acc;
|
|
1581
|
+
}
|
|
1582
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
1583
|
+
}, {});
|
|
1584
|
+
};
|
|
1585
|
+
var deserializeAws_restJson1Telemetries = function (output, context) {
|
|
1586
|
+
return (output || [])
|
|
1587
|
+
.filter(function (e) { return e != null; })
|
|
1588
|
+
.map(function (entry) {
|
|
1589
|
+
if (entry === null) {
|
|
1590
|
+
return null;
|
|
1591
|
+
}
|
|
1592
|
+
return __expectString(entry);
|
|
1593
|
+
});
|
|
1594
|
+
};
|
|
1595
|
+
var deserializeMetadata = function (output) {
|
|
1596
|
+
var _a;
|
|
1597
|
+
return ({
|
|
1598
|
+
httpStatusCode: output.statusCode,
|
|
1599
|
+
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
|
|
1600
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1601
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1602
|
+
});
|
|
1603
|
+
};
|
|
1604
|
+
var collectBody = function (streamBody, context) {
|
|
1605
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1606
|
+
if (streamBody instanceof Uint8Array) {
|
|
1607
|
+
return Promise.resolve(streamBody);
|
|
1608
|
+
}
|
|
1609
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1610
|
+
};
|
|
1611
|
+
var collectBodyString = function (streamBody, context) {
|
|
1612
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1613
|
+
};
|
|
1614
|
+
var isSerializableHeaderValue = function (value) {
|
|
1615
|
+
return value !== undefined &&
|
|
1616
|
+
value !== null &&
|
|
1617
|
+
value !== "" &&
|
|
1618
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1619
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1620
|
+
};
|
|
1621
|
+
var parseBody = function (streamBody, context) {
|
|
1622
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1623
|
+
if (encoded.length) {
|
|
1624
|
+
return JSON.parse(encoded);
|
|
1625
|
+
}
|
|
1626
|
+
return {};
|
|
1627
|
+
});
|
|
1628
|
+
};
|
|
1629
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1630
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1631
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1632
|
+
var cleanValue = rawValue;
|
|
1633
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1634
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1635
|
+
}
|
|
1636
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1637
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1638
|
+
}
|
|
1639
|
+
return cleanValue;
|
|
1640
|
+
};
|
|
1641
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1642
|
+
if (headerKey !== undefined) {
|
|
1643
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1644
|
+
}
|
|
1645
|
+
if (data.code !== undefined) {
|
|
1646
|
+
return sanitizeErrorCode(data.code);
|
|
1647
|
+
}
|
|
1648
|
+
if (data["__type"] !== undefined) {
|
|
1649
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1650
|
+
}
|
|
1651
|
+
return "";
|
|
1652
|
+
};
|