@aws-sdk/client-cognito-sync 3.183.0 → 3.185.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/CognitoSync.js +77 -70
- package/dist-es/CognitoSyncClient.js +28 -22
- package/dist-es/commands/BulkPublishCommand.js +28 -21
- package/dist-es/commands/DeleteDatasetCommand.js +28 -21
- package/dist-es/commands/DescribeDatasetCommand.js +28 -21
- package/dist-es/commands/DescribeIdentityPoolUsageCommand.js +28 -21
- package/dist-es/commands/DescribeIdentityUsageCommand.js +28 -21
- package/dist-es/commands/GetBulkPublishDetailsCommand.js +28 -21
- package/dist-es/commands/GetCognitoEventsCommand.js +28 -21
- package/dist-es/commands/GetIdentityPoolConfigurationCommand.js +28 -21
- package/dist-es/commands/ListDatasetsCommand.js +28 -21
- package/dist-es/commands/ListIdentityPoolUsageCommand.js +28 -21
- package/dist-es/commands/ListRecordsCommand.js +28 -21
- package/dist-es/commands/RegisterDeviceCommand.js +28 -21
- package/dist-es/commands/SetCognitoEventsCommand.js +29 -22
- package/dist-es/commands/SetIdentityPoolConfigurationCommand.js +28 -21
- package/dist-es/commands/SubscribeToDatasetCommand.js +28 -21
- package/dist-es/commands/UnsubscribeFromDatasetCommand.js +28 -21
- package/dist-es/commands/UpdateRecordsCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CognitoSyncServiceException.js +10 -5
- package/dist-es/models/models_0.js +184 -263
- package/dist-es/protocols/Aws_restJson1.js +1942 -1389
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +5 -5
|
@@ -1,1403 +1,1939 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { CognitoSyncServiceException as __BaseException } from "../models/CognitoSyncServiceException";
|
|
4
5
|
import { AlreadyStreamedException, ConcurrentModificationException, DuplicateRequestException, InternalErrorException, InvalidConfigurationException, InvalidLambdaFunctionOutputException, InvalidParameterException, LambdaThrottledException, LimitExceededException, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, TooManyRequestsException, } from "../models/models_0";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
export var serializeAws_restJson1BulkPublishCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {};
|
|
14
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
15
|
+
"/identitypools/{IdentityPoolId}/bulkpublish";
|
|
16
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
17
|
+
return [2, new __HttpRequest({
|
|
18
|
+
protocol: protocol,
|
|
19
|
+
hostname: hostname,
|
|
20
|
+
port: port,
|
|
21
|
+
method: "POST",
|
|
22
|
+
headers: headers,
|
|
23
|
+
path: resolvedPath,
|
|
24
|
+
body: body,
|
|
25
|
+
})];
|
|
26
|
+
}
|
|
20
27
|
});
|
|
21
|
-
};
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
}); };
|
|
29
|
+
export var serializeAws_restJson1DeleteDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
30
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
31
|
+
return __generator(this, function (_c) {
|
|
32
|
+
switch (_c.label) {
|
|
33
|
+
case 0: return [4, context.endpoint()];
|
|
34
|
+
case 1:
|
|
35
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
36
|
+
headers = {};
|
|
37
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
38
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
|
|
39
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
40
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
41
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", function () { return input.DatasetName; }, "{DatasetName}", false);
|
|
42
|
+
return [2, new __HttpRequest({
|
|
43
|
+
protocol: protocol,
|
|
44
|
+
hostname: hostname,
|
|
45
|
+
port: port,
|
|
46
|
+
method: "DELETE",
|
|
47
|
+
headers: headers,
|
|
48
|
+
path: resolvedPath,
|
|
49
|
+
body: body,
|
|
50
|
+
})];
|
|
51
|
+
}
|
|
39
52
|
});
|
|
40
|
-
};
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
}); };
|
|
54
|
+
export var serializeAws_restJson1DescribeDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
56
|
+
return __generator(this, function (_c) {
|
|
57
|
+
switch (_c.label) {
|
|
58
|
+
case 0: return [4, context.endpoint()];
|
|
59
|
+
case 1:
|
|
60
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
61
|
+
headers = {};
|
|
62
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
63
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
|
|
64
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
65
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
66
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", function () { return input.DatasetName; }, "{DatasetName}", false);
|
|
67
|
+
return [2, new __HttpRequest({
|
|
68
|
+
protocol: protocol,
|
|
69
|
+
hostname: hostname,
|
|
70
|
+
port: port,
|
|
71
|
+
method: "GET",
|
|
72
|
+
headers: headers,
|
|
73
|
+
path: resolvedPath,
|
|
74
|
+
body: body,
|
|
75
|
+
})];
|
|
76
|
+
}
|
|
58
77
|
});
|
|
59
|
-
};
|
|
60
|
-
export
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
}); };
|
|
79
|
+
export var serializeAws_restJson1DescribeIdentityPoolUsageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
80
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
81
|
+
return __generator(this, function (_c) {
|
|
82
|
+
switch (_c.label) {
|
|
83
|
+
case 0: return [4, context.endpoint()];
|
|
84
|
+
case 1:
|
|
85
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
86
|
+
headers = {};
|
|
87
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/identitypools/{IdentityPoolId}";
|
|
88
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
89
|
+
return [2, new __HttpRequest({
|
|
90
|
+
protocol: protocol,
|
|
91
|
+
hostname: hostname,
|
|
92
|
+
port: port,
|
|
93
|
+
method: "GET",
|
|
94
|
+
headers: headers,
|
|
95
|
+
path: resolvedPath,
|
|
96
|
+
body: body,
|
|
97
|
+
})];
|
|
98
|
+
}
|
|
74
99
|
});
|
|
75
|
-
};
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
}); };
|
|
101
|
+
export var serializeAws_restJson1DescribeIdentityUsageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
102
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
103
|
+
return __generator(this, function (_c) {
|
|
104
|
+
switch (_c.label) {
|
|
105
|
+
case 0: return [4, context.endpoint()];
|
|
106
|
+
case 1:
|
|
107
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
108
|
+
headers = {};
|
|
109
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
110
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}";
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
112
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
113
|
+
return [2, new __HttpRequest({
|
|
114
|
+
protocol: protocol,
|
|
115
|
+
hostname: hostname,
|
|
116
|
+
port: port,
|
|
117
|
+
method: "GET",
|
|
118
|
+
headers: headers,
|
|
119
|
+
path: resolvedPath,
|
|
120
|
+
body: body,
|
|
121
|
+
})];
|
|
122
|
+
}
|
|
92
123
|
});
|
|
93
|
-
};
|
|
94
|
-
export
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
124
|
+
}); };
|
|
125
|
+
export var serializeAws_restJson1GetBulkPublishDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
127
|
+
return __generator(this, function (_c) {
|
|
128
|
+
switch (_c.label) {
|
|
129
|
+
case 0: return [4, context.endpoint()];
|
|
130
|
+
case 1:
|
|
131
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
132
|
+
headers = {};
|
|
133
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
134
|
+
"/identitypools/{IdentityPoolId}/getBulkPublishDetails";
|
|
135
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
136
|
+
return [2, new __HttpRequest({
|
|
137
|
+
protocol: protocol,
|
|
138
|
+
hostname: hostname,
|
|
139
|
+
port: port,
|
|
140
|
+
method: "POST",
|
|
141
|
+
headers: headers,
|
|
142
|
+
path: resolvedPath,
|
|
143
|
+
body: body,
|
|
144
|
+
})];
|
|
145
|
+
}
|
|
109
146
|
});
|
|
110
|
-
};
|
|
111
|
-
export
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
147
|
+
}); };
|
|
148
|
+
export var serializeAws_restJson1GetCognitoEventsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
149
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
150
|
+
return __generator(this, function (_c) {
|
|
151
|
+
switch (_c.label) {
|
|
152
|
+
case 0: return [4, context.endpoint()];
|
|
153
|
+
case 1:
|
|
154
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
155
|
+
headers = {};
|
|
156
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/identitypools/{IdentityPoolId}/events";
|
|
157
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
158
|
+
return [2, new __HttpRequest({
|
|
159
|
+
protocol: protocol,
|
|
160
|
+
hostname: hostname,
|
|
161
|
+
port: port,
|
|
162
|
+
method: "GET",
|
|
163
|
+
headers: headers,
|
|
164
|
+
path: resolvedPath,
|
|
165
|
+
body: body,
|
|
166
|
+
})];
|
|
167
|
+
}
|
|
125
168
|
});
|
|
126
|
-
};
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
169
|
+
}); };
|
|
170
|
+
export var serializeAws_restJson1GetIdentityPoolConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
171
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
172
|
+
return __generator(this, function (_c) {
|
|
173
|
+
switch (_c.label) {
|
|
174
|
+
case 0: return [4, context.endpoint()];
|
|
175
|
+
case 1:
|
|
176
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
177
|
+
headers = {};
|
|
178
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
179
|
+
"/identitypools/{IdentityPoolId}/configuration";
|
|
180
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
181
|
+
return [2, new __HttpRequest({
|
|
182
|
+
protocol: protocol,
|
|
183
|
+
hostname: hostname,
|
|
184
|
+
port: port,
|
|
185
|
+
method: "GET",
|
|
186
|
+
headers: headers,
|
|
187
|
+
path: resolvedPath,
|
|
188
|
+
body: body,
|
|
189
|
+
})];
|
|
190
|
+
}
|
|
142
191
|
});
|
|
143
|
-
};
|
|
144
|
-
export
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
192
|
+
}); };
|
|
193
|
+
export var serializeAws_restJson1ListDatasetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
195
|
+
return __generator(this, function (_c) {
|
|
196
|
+
switch (_c.label) {
|
|
197
|
+
case 0: return [4, context.endpoint()];
|
|
198
|
+
case 1:
|
|
199
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
200
|
+
headers = {};
|
|
201
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
202
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets";
|
|
203
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
204
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
205
|
+
query = map({
|
|
206
|
+
nextToken: [, input.NextToken],
|
|
207
|
+
maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
208
|
+
});
|
|
209
|
+
return [2, new __HttpRequest({
|
|
210
|
+
protocol: protocol,
|
|
211
|
+
hostname: hostname,
|
|
212
|
+
port: port,
|
|
213
|
+
method: "GET",
|
|
214
|
+
headers: headers,
|
|
215
|
+
path: resolvedPath,
|
|
216
|
+
query: query,
|
|
217
|
+
body: body,
|
|
218
|
+
})];
|
|
219
|
+
}
|
|
165
220
|
});
|
|
166
|
-
};
|
|
167
|
-
export
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
221
|
+
}); };
|
|
222
|
+
export var serializeAws_restJson1ListIdentityPoolUsageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
223
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
224
|
+
return __generator(this, function (_c) {
|
|
225
|
+
switch (_c.label) {
|
|
226
|
+
case 0: return [4, context.endpoint()];
|
|
227
|
+
case 1:
|
|
228
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
229
|
+
headers = {};
|
|
230
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/identitypools";
|
|
231
|
+
query = map({
|
|
232
|
+
nextToken: [, input.NextToken],
|
|
233
|
+
maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
234
|
+
});
|
|
235
|
+
return [2, new __HttpRequest({
|
|
236
|
+
protocol: protocol,
|
|
237
|
+
hostname: hostname,
|
|
238
|
+
port: port,
|
|
239
|
+
method: "GET",
|
|
240
|
+
headers: headers,
|
|
241
|
+
path: resolvedPath,
|
|
242
|
+
query: query,
|
|
243
|
+
body: body,
|
|
244
|
+
})];
|
|
245
|
+
}
|
|
185
246
|
});
|
|
186
|
-
};
|
|
187
|
-
export
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
247
|
+
}); };
|
|
248
|
+
export var serializeAws_restJson1ListRecordsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
249
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
250
|
+
return __generator(this, function (_c) {
|
|
251
|
+
switch (_c.label) {
|
|
252
|
+
case 0: return [4, context.endpoint()];
|
|
253
|
+
case 1:
|
|
254
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
255
|
+
headers = {};
|
|
256
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
257
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records";
|
|
258
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
259
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
260
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", function () { return input.DatasetName; }, "{DatasetName}", false);
|
|
261
|
+
query = map({
|
|
262
|
+
lastSyncCount: [function () { return input.LastSyncCount !== void 0; }, function () { return input.LastSyncCount.toString(); }],
|
|
263
|
+
nextToken: [, input.NextToken],
|
|
264
|
+
maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
265
|
+
syncSessionToken: [, input.SyncSessionToken],
|
|
266
|
+
});
|
|
267
|
+
return [2, new __HttpRequest({
|
|
268
|
+
protocol: protocol,
|
|
269
|
+
hostname: hostname,
|
|
270
|
+
port: port,
|
|
271
|
+
method: "GET",
|
|
272
|
+
headers: headers,
|
|
273
|
+
path: resolvedPath,
|
|
274
|
+
query: query,
|
|
275
|
+
body: body,
|
|
276
|
+
})];
|
|
277
|
+
}
|
|
211
278
|
});
|
|
212
|
-
};
|
|
213
|
-
export
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
279
|
+
}); };
|
|
280
|
+
export var serializeAws_restJson1RegisterDeviceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
281
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
282
|
+
return __generator(this, function (_c) {
|
|
283
|
+
switch (_c.label) {
|
|
284
|
+
case 0: return [4, context.endpoint()];
|
|
285
|
+
case 1:
|
|
286
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
287
|
+
headers = {
|
|
288
|
+
"content-type": "application/json",
|
|
289
|
+
};
|
|
290
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
291
|
+
"/identitypools/{IdentityPoolId}/identity/{IdentityId}/device";
|
|
292
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
293
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
294
|
+
body = JSON.stringify(__assign(__assign({}, (input.Platform != null && { Platform: input.Platform })), (input.Token != null && { Token: input.Token })));
|
|
295
|
+
return [2, new __HttpRequest({
|
|
296
|
+
protocol: protocol,
|
|
297
|
+
hostname: hostname,
|
|
298
|
+
port: port,
|
|
299
|
+
method: "POST",
|
|
300
|
+
headers: headers,
|
|
301
|
+
path: resolvedPath,
|
|
302
|
+
body: body,
|
|
303
|
+
})];
|
|
304
|
+
}
|
|
235
305
|
});
|
|
236
|
-
};
|
|
237
|
-
export
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
306
|
+
}); };
|
|
307
|
+
export var serializeAws_restJson1SetCognitoEventsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
308
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
309
|
+
return __generator(this, function (_c) {
|
|
310
|
+
switch (_c.label) {
|
|
311
|
+
case 0: return [4, context.endpoint()];
|
|
312
|
+
case 1:
|
|
313
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
314
|
+
headers = {
|
|
315
|
+
"content-type": "application/json",
|
|
316
|
+
};
|
|
317
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/identitypools/{IdentityPoolId}/events";
|
|
318
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
319
|
+
body = JSON.stringify(__assign({}, (input.Events != null && { Events: serializeAws_restJson1Events(input.Events, context) })));
|
|
320
|
+
return [2, new __HttpRequest({
|
|
321
|
+
protocol: protocol,
|
|
322
|
+
hostname: hostname,
|
|
323
|
+
port: port,
|
|
324
|
+
method: "POST",
|
|
325
|
+
headers: headers,
|
|
326
|
+
path: resolvedPath,
|
|
327
|
+
body: body,
|
|
328
|
+
})];
|
|
329
|
+
}
|
|
256
330
|
});
|
|
257
|
-
};
|
|
258
|
-
export
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
331
|
+
}); };
|
|
332
|
+
export var serializeAws_restJson1SetIdentityPoolConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
333
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
334
|
+
return __generator(this, function (_c) {
|
|
335
|
+
switch (_c.label) {
|
|
336
|
+
case 0: return [4, context.endpoint()];
|
|
337
|
+
case 1:
|
|
338
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
339
|
+
headers = {
|
|
340
|
+
"content-type": "application/json",
|
|
341
|
+
};
|
|
342
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
343
|
+
"/identitypools/{IdentityPoolId}/configuration";
|
|
344
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
345
|
+
body = JSON.stringify(__assign(__assign({}, (input.CognitoStreams != null && {
|
|
346
|
+
CognitoStreams: serializeAws_restJson1CognitoStreams(input.CognitoStreams, context),
|
|
347
|
+
})), (input.PushSync != null && { PushSync: serializeAws_restJson1PushSync(input.PushSync, context) })));
|
|
348
|
+
return [2, new __HttpRequest({
|
|
349
|
+
protocol: protocol,
|
|
350
|
+
hostname: hostname,
|
|
351
|
+
port: port,
|
|
352
|
+
method: "POST",
|
|
353
|
+
headers: headers,
|
|
354
|
+
path: resolvedPath,
|
|
355
|
+
body: body,
|
|
356
|
+
})];
|
|
357
|
+
}
|
|
281
358
|
});
|
|
282
|
-
};
|
|
283
|
-
export
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
359
|
+
}); };
|
|
360
|
+
export var serializeAws_restJson1SubscribeToDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
361
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
362
|
+
return __generator(this, function (_c) {
|
|
363
|
+
switch (_c.label) {
|
|
364
|
+
case 0: return [4, context.endpoint()];
|
|
365
|
+
case 1:
|
|
366
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
367
|
+
headers = {};
|
|
368
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
369
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
|
|
370
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
371
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
372
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", function () { return input.DatasetName; }, "{DatasetName}", false);
|
|
373
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", function () { return input.DeviceId; }, "{DeviceId}", false);
|
|
374
|
+
return [2, new __HttpRequest({
|
|
375
|
+
protocol: protocol,
|
|
376
|
+
hostname: hostname,
|
|
377
|
+
port: port,
|
|
378
|
+
method: "POST",
|
|
379
|
+
headers: headers,
|
|
380
|
+
path: resolvedPath,
|
|
381
|
+
body: body,
|
|
382
|
+
})];
|
|
383
|
+
}
|
|
301
384
|
});
|
|
302
|
-
};
|
|
303
|
-
export
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
385
|
+
}); };
|
|
386
|
+
export var serializeAws_restJson1UnsubscribeFromDatasetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
387
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
388
|
+
return __generator(this, function (_c) {
|
|
389
|
+
switch (_c.label) {
|
|
390
|
+
case 0: return [4, context.endpoint()];
|
|
391
|
+
case 1:
|
|
392
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
393
|
+
headers = {};
|
|
394
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
395
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
|
|
396
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
397
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
398
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", function () { return input.DatasetName; }, "{DatasetName}", false);
|
|
399
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", function () { return input.DeviceId; }, "{DeviceId}", false);
|
|
400
|
+
return [2, new __HttpRequest({
|
|
401
|
+
protocol: protocol,
|
|
402
|
+
hostname: hostname,
|
|
403
|
+
port: port,
|
|
404
|
+
method: "DELETE",
|
|
405
|
+
headers: headers,
|
|
406
|
+
path: resolvedPath,
|
|
407
|
+
body: body,
|
|
408
|
+
})];
|
|
409
|
+
}
|
|
321
410
|
});
|
|
322
|
-
};
|
|
323
|
-
export
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
411
|
+
}); };
|
|
412
|
+
export var serializeAws_restJson1UpdateRecordsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
413
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
414
|
+
return __generator(this, function (_c) {
|
|
415
|
+
switch (_c.label) {
|
|
416
|
+
case 0: return [4, context.endpoint()];
|
|
417
|
+
case 1:
|
|
418
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
419
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
420
|
+
"content-type": "application/json",
|
|
421
|
+
"x-amz-client-context": input.ClientContext,
|
|
422
|
+
});
|
|
423
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
424
|
+
"/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
|
|
425
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", function () { return input.IdentityPoolId; }, "{IdentityPoolId}", false);
|
|
426
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", function () { return input.IdentityId; }, "{IdentityId}", false);
|
|
427
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", function () { return input.DatasetName; }, "{DatasetName}", false);
|
|
428
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.DeviceId != null && { DeviceId: input.DeviceId })), (input.RecordPatches != null && {
|
|
429
|
+
RecordPatches: serializeAws_restJson1RecordPatchList(input.RecordPatches, context),
|
|
430
|
+
})), (input.SyncSessionToken != null && { SyncSessionToken: input.SyncSessionToken })));
|
|
431
|
+
return [2, new __HttpRequest({
|
|
432
|
+
protocol: protocol,
|
|
433
|
+
hostname: hostname,
|
|
434
|
+
port: port,
|
|
435
|
+
method: "POST",
|
|
436
|
+
headers: headers,
|
|
437
|
+
path: resolvedPath,
|
|
438
|
+
body: body,
|
|
439
|
+
})];
|
|
440
|
+
}
|
|
350
441
|
});
|
|
351
|
-
};
|
|
352
|
-
export
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
442
|
+
}); };
|
|
443
|
+
export var deserializeAws_restJson1BulkPublishCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
444
|
+
var contents, data, _a, _b;
|
|
445
|
+
return __generator(this, function (_c) {
|
|
446
|
+
switch (_c.label) {
|
|
447
|
+
case 0:
|
|
448
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
449
|
+
return [2, deserializeAws_restJson1BulkPublishCommandError(output, context)];
|
|
450
|
+
}
|
|
451
|
+
contents = map({
|
|
452
|
+
$metadata: deserializeMetadata(output),
|
|
453
|
+
});
|
|
454
|
+
_a = __expectNonNull;
|
|
455
|
+
_b = __expectObject;
|
|
456
|
+
return [4, parseBody(output.body, context)];
|
|
457
|
+
case 1:
|
|
458
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
459
|
+
if (data.IdentityPoolId != null) {
|
|
460
|
+
contents.IdentityPoolId = __expectString(data.IdentityPoolId);
|
|
461
|
+
}
|
|
462
|
+
return [2, contents];
|
|
463
|
+
}
|
|
358
464
|
});
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
return
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
throw
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
465
|
+
}); };
|
|
466
|
+
var deserializeAws_restJson1BulkPublishCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
467
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
468
|
+
var _c;
|
|
469
|
+
return __generator(this, function (_d) {
|
|
470
|
+
switch (_d.label) {
|
|
471
|
+
case 0:
|
|
472
|
+
_a = [__assign({}, output)];
|
|
473
|
+
_c = {};
|
|
474
|
+
return [4, parseErrorBody(output.body, context)];
|
|
475
|
+
case 1:
|
|
476
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
477
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
478
|
+
_b = errorCode;
|
|
479
|
+
switch (_b) {
|
|
480
|
+
case "AlreadyStreamedException": return [3, 2];
|
|
481
|
+
case "com.amazonaws.cognitosync#AlreadyStreamedException": return [3, 2];
|
|
482
|
+
case "DuplicateRequestException": return [3, 4];
|
|
483
|
+
case "com.amazonaws.cognitosync#DuplicateRequestException": return [3, 4];
|
|
484
|
+
case "InternalErrorException": return [3, 6];
|
|
485
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 6];
|
|
486
|
+
case "InvalidParameterException": return [3, 8];
|
|
487
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 8];
|
|
488
|
+
case "NotAuthorizedException": return [3, 10];
|
|
489
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 10];
|
|
490
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
491
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 12];
|
|
492
|
+
}
|
|
493
|
+
return [3, 14];
|
|
494
|
+
case 2: return [4, deserializeAws_restJson1AlreadyStreamedExceptionResponse(parsedOutput, context)];
|
|
495
|
+
case 3: throw _d.sent();
|
|
496
|
+
case 4: return [4, deserializeAws_restJson1DuplicateRequestExceptionResponse(parsedOutput, context)];
|
|
497
|
+
case 5: throw _d.sent();
|
|
498
|
+
case 6: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
499
|
+
case 7: throw _d.sent();
|
|
500
|
+
case 8: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
501
|
+
case 9: throw _d.sent();
|
|
502
|
+
case 10: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
503
|
+
case 11: throw _d.sent();
|
|
504
|
+
case 12: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
505
|
+
case 13: throw _d.sent();
|
|
506
|
+
case 14:
|
|
507
|
+
parsedBody = parsedOutput.body;
|
|
508
|
+
throwDefaultError({
|
|
509
|
+
output: output,
|
|
510
|
+
parsedBody: parsedBody,
|
|
511
|
+
exceptionCtor: __BaseException,
|
|
512
|
+
errorCode: errorCode,
|
|
513
|
+
});
|
|
514
|
+
_d.label = 15;
|
|
515
|
+
case 15: return [2];
|
|
516
|
+
}
|
|
406
517
|
});
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
case "ResourceConflictException":
|
|
430
|
-
case "com.amazonaws.cognitosync#ResourceConflictException":
|
|
431
|
-
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
432
|
-
case "ResourceNotFoundException":
|
|
433
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
434
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
435
|
-
case "TooManyRequestsException":
|
|
436
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
437
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
438
|
-
default:
|
|
439
|
-
const parsedBody = parsedOutput.body;
|
|
440
|
-
throwDefaultError({
|
|
441
|
-
output,
|
|
442
|
-
parsedBody,
|
|
443
|
-
exceptionCtor: __BaseException,
|
|
444
|
-
errorCode,
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
export const deserializeAws_restJson1DescribeDatasetCommand = async (output, context) => {
|
|
449
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
450
|
-
return deserializeAws_restJson1DescribeDatasetCommandError(output, context);
|
|
451
|
-
}
|
|
452
|
-
const contents = map({
|
|
453
|
-
$metadata: deserializeMetadata(output),
|
|
518
|
+
}); };
|
|
519
|
+
export var deserializeAws_restJson1DeleteDatasetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
520
|
+
var contents, data, _a, _b;
|
|
521
|
+
return __generator(this, function (_c) {
|
|
522
|
+
switch (_c.label) {
|
|
523
|
+
case 0:
|
|
524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
525
|
+
return [2, deserializeAws_restJson1DeleteDatasetCommandError(output, context)];
|
|
526
|
+
}
|
|
527
|
+
contents = map({
|
|
528
|
+
$metadata: deserializeMetadata(output),
|
|
529
|
+
});
|
|
530
|
+
_a = __expectNonNull;
|
|
531
|
+
_b = __expectObject;
|
|
532
|
+
return [4, parseBody(output.body, context)];
|
|
533
|
+
case 1:
|
|
534
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
535
|
+
if (data.Dataset != null) {
|
|
536
|
+
contents.Dataset = deserializeAws_restJson1Dataset(data.Dataset, context);
|
|
537
|
+
}
|
|
538
|
+
return [2, contents];
|
|
539
|
+
}
|
|
454
540
|
});
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
return
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
541
|
+
}); };
|
|
542
|
+
var deserializeAws_restJson1DeleteDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
543
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
544
|
+
var _c;
|
|
545
|
+
return __generator(this, function (_d) {
|
|
546
|
+
switch (_d.label) {
|
|
547
|
+
case 0:
|
|
548
|
+
_a = [__assign({}, output)];
|
|
549
|
+
_c = {};
|
|
550
|
+
return [4, parseErrorBody(output.body, context)];
|
|
551
|
+
case 1:
|
|
552
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
553
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
554
|
+
_b = errorCode;
|
|
555
|
+
switch (_b) {
|
|
556
|
+
case "InternalErrorException": return [3, 2];
|
|
557
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
558
|
+
case "InvalidParameterException": return [3, 4];
|
|
559
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
560
|
+
case "NotAuthorizedException": return [3, 6];
|
|
561
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
562
|
+
case "ResourceConflictException": return [3, 8];
|
|
563
|
+
case "com.amazonaws.cognitosync#ResourceConflictException": return [3, 8];
|
|
564
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
565
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 10];
|
|
566
|
+
case "TooManyRequestsException": return [3, 12];
|
|
567
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 12];
|
|
568
|
+
}
|
|
569
|
+
return [3, 14];
|
|
570
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
571
|
+
case 3: throw _d.sent();
|
|
572
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
573
|
+
case 5: throw _d.sent();
|
|
574
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
575
|
+
case 7: throw _d.sent();
|
|
576
|
+
case 8: return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
577
|
+
case 9: throw _d.sent();
|
|
578
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
579
|
+
case 11: throw _d.sent();
|
|
580
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
581
|
+
case 13: throw _d.sent();
|
|
582
|
+
case 14:
|
|
583
|
+
parsedBody = parsedOutput.body;
|
|
584
|
+
throwDefaultError({
|
|
585
|
+
output: output,
|
|
586
|
+
parsedBody: parsedBody,
|
|
587
|
+
exceptionCtor: __BaseException,
|
|
588
|
+
errorCode: errorCode,
|
|
589
|
+
});
|
|
590
|
+
_d.label = 15;
|
|
591
|
+
case 15: return [2];
|
|
592
|
+
}
|
|
499
593
|
});
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
case "ResourceNotFoundException":
|
|
523
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
524
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
525
|
-
case "TooManyRequestsException":
|
|
526
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
527
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
528
|
-
default:
|
|
529
|
-
const parsedBody = parsedOutput.body;
|
|
530
|
-
throwDefaultError({
|
|
531
|
-
output,
|
|
532
|
-
parsedBody,
|
|
533
|
-
exceptionCtor: __BaseException,
|
|
534
|
-
errorCode,
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
export const deserializeAws_restJson1DescribeIdentityUsageCommand = async (output, context) => {
|
|
539
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
540
|
-
return deserializeAws_restJson1DescribeIdentityUsageCommandError(output, context);
|
|
541
|
-
}
|
|
542
|
-
const contents = map({
|
|
543
|
-
$metadata: deserializeMetadata(output),
|
|
594
|
+
}); };
|
|
595
|
+
export var deserializeAws_restJson1DescribeDatasetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
596
|
+
var contents, data, _a, _b;
|
|
597
|
+
return __generator(this, function (_c) {
|
|
598
|
+
switch (_c.label) {
|
|
599
|
+
case 0:
|
|
600
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
601
|
+
return [2, deserializeAws_restJson1DescribeDatasetCommandError(output, context)];
|
|
602
|
+
}
|
|
603
|
+
contents = map({
|
|
604
|
+
$metadata: deserializeMetadata(output),
|
|
605
|
+
});
|
|
606
|
+
_a = __expectNonNull;
|
|
607
|
+
_b = __expectObject;
|
|
608
|
+
return [4, parseBody(output.body, context)];
|
|
609
|
+
case 1:
|
|
610
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
611
|
+
if (data.Dataset != null) {
|
|
612
|
+
contents.Dataset = deserializeAws_restJson1Dataset(data.Dataset, context);
|
|
613
|
+
}
|
|
614
|
+
return [2, contents];
|
|
615
|
+
}
|
|
544
616
|
});
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
return
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
617
|
+
}); };
|
|
618
|
+
var deserializeAws_restJson1DescribeDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
619
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
620
|
+
var _c;
|
|
621
|
+
return __generator(this, function (_d) {
|
|
622
|
+
switch (_d.label) {
|
|
623
|
+
case 0:
|
|
624
|
+
_a = [__assign({}, output)];
|
|
625
|
+
_c = {};
|
|
626
|
+
return [4, parseErrorBody(output.body, context)];
|
|
627
|
+
case 1:
|
|
628
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
629
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
630
|
+
_b = errorCode;
|
|
631
|
+
switch (_b) {
|
|
632
|
+
case "InternalErrorException": return [3, 2];
|
|
633
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
634
|
+
case "InvalidParameterException": return [3, 4];
|
|
635
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
636
|
+
case "NotAuthorizedException": return [3, 6];
|
|
637
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
638
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
639
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
640
|
+
case "TooManyRequestsException": return [3, 10];
|
|
641
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 10];
|
|
642
|
+
}
|
|
643
|
+
return [3, 12];
|
|
644
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
645
|
+
case 3: throw _d.sent();
|
|
646
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
647
|
+
case 5: throw _d.sent();
|
|
648
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
649
|
+
case 7: throw _d.sent();
|
|
650
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
651
|
+
case 9: throw _d.sent();
|
|
652
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
653
|
+
case 11: throw _d.sent();
|
|
654
|
+
case 12:
|
|
655
|
+
parsedBody = parsedOutput.body;
|
|
656
|
+
throwDefaultError({
|
|
657
|
+
output: output,
|
|
658
|
+
parsedBody: parsedBody,
|
|
659
|
+
exceptionCtor: __BaseException,
|
|
660
|
+
errorCode: errorCode,
|
|
661
|
+
});
|
|
662
|
+
_d.label = 13;
|
|
663
|
+
case 13: return [2];
|
|
664
|
+
}
|
|
589
665
|
});
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
};
|
|
613
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
614
|
-
switch (errorCode) {
|
|
615
|
-
case "InternalErrorException":
|
|
616
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
617
|
-
throw await deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context);
|
|
618
|
-
case "InvalidParameterException":
|
|
619
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
620
|
-
throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
621
|
-
case "NotAuthorizedException":
|
|
622
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
623
|
-
throw await deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
624
|
-
case "ResourceNotFoundException":
|
|
625
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
626
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
627
|
-
default:
|
|
628
|
-
const parsedBody = parsedOutput.body;
|
|
629
|
-
throwDefaultError({
|
|
630
|
-
output,
|
|
631
|
-
parsedBody,
|
|
632
|
-
exceptionCtor: __BaseException,
|
|
633
|
-
errorCode,
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
export const deserializeAws_restJson1GetCognitoEventsCommand = async (output, context) => {
|
|
638
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
639
|
-
return deserializeAws_restJson1GetCognitoEventsCommandError(output, context);
|
|
640
|
-
}
|
|
641
|
-
const contents = map({
|
|
642
|
-
$metadata: deserializeMetadata(output),
|
|
666
|
+
}); };
|
|
667
|
+
export var deserializeAws_restJson1DescribeIdentityPoolUsageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
668
|
+
var contents, data, _a, _b;
|
|
669
|
+
return __generator(this, function (_c) {
|
|
670
|
+
switch (_c.label) {
|
|
671
|
+
case 0:
|
|
672
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
673
|
+
return [2, deserializeAws_restJson1DescribeIdentityPoolUsageCommandError(output, context)];
|
|
674
|
+
}
|
|
675
|
+
contents = map({
|
|
676
|
+
$metadata: deserializeMetadata(output),
|
|
677
|
+
});
|
|
678
|
+
_a = __expectNonNull;
|
|
679
|
+
_b = __expectObject;
|
|
680
|
+
return [4, parseBody(output.body, context)];
|
|
681
|
+
case 1:
|
|
682
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
683
|
+
if (data.IdentityPoolUsage != null) {
|
|
684
|
+
contents.IdentityPoolUsage = deserializeAws_restJson1IdentityPoolUsage(data.IdentityPoolUsage, context);
|
|
685
|
+
}
|
|
686
|
+
return [2, contents];
|
|
687
|
+
}
|
|
643
688
|
});
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
return
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
689
|
+
}); };
|
|
690
|
+
var deserializeAws_restJson1DescribeIdentityPoolUsageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
691
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
692
|
+
var _c;
|
|
693
|
+
return __generator(this, function (_d) {
|
|
694
|
+
switch (_d.label) {
|
|
695
|
+
case 0:
|
|
696
|
+
_a = [__assign({}, output)];
|
|
697
|
+
_c = {};
|
|
698
|
+
return [4, parseErrorBody(output.body, context)];
|
|
699
|
+
case 1:
|
|
700
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
701
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
702
|
+
_b = errorCode;
|
|
703
|
+
switch (_b) {
|
|
704
|
+
case "InternalErrorException": return [3, 2];
|
|
705
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
706
|
+
case "InvalidParameterException": return [3, 4];
|
|
707
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
708
|
+
case "NotAuthorizedException": return [3, 6];
|
|
709
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
710
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
711
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
712
|
+
case "TooManyRequestsException": return [3, 10];
|
|
713
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 10];
|
|
714
|
+
}
|
|
715
|
+
return [3, 12];
|
|
716
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
717
|
+
case 3: throw _d.sent();
|
|
718
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
719
|
+
case 5: throw _d.sent();
|
|
720
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
721
|
+
case 7: throw _d.sent();
|
|
722
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
723
|
+
case 9: throw _d.sent();
|
|
724
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
725
|
+
case 11: throw _d.sent();
|
|
726
|
+
case 12:
|
|
727
|
+
parsedBody = parsedOutput.body;
|
|
728
|
+
throwDefaultError({
|
|
729
|
+
output: output,
|
|
730
|
+
parsedBody: parsedBody,
|
|
731
|
+
exceptionCtor: __BaseException,
|
|
732
|
+
errorCode: errorCode,
|
|
733
|
+
});
|
|
734
|
+
_d.label = 13;
|
|
735
|
+
case 13: return [2];
|
|
736
|
+
}
|
|
688
737
|
});
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
case "InvalidParameterException":
|
|
712
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
713
|
-
throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
714
|
-
case "NotAuthorizedException":
|
|
715
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
716
|
-
throw await deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
717
|
-
case "ResourceNotFoundException":
|
|
718
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
719
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
720
|
-
case "TooManyRequestsException":
|
|
721
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
722
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
723
|
-
default:
|
|
724
|
-
const parsedBody = parsedOutput.body;
|
|
725
|
-
throwDefaultError({
|
|
726
|
-
output,
|
|
727
|
-
parsedBody,
|
|
728
|
-
exceptionCtor: __BaseException,
|
|
729
|
-
errorCode,
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
export const deserializeAws_restJson1ListDatasetsCommand = async (output, context) => {
|
|
734
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
735
|
-
return deserializeAws_restJson1ListDatasetsCommandError(output, context);
|
|
736
|
-
}
|
|
737
|
-
const contents = map({
|
|
738
|
-
$metadata: deserializeMetadata(output),
|
|
738
|
+
}); };
|
|
739
|
+
export var deserializeAws_restJson1DescribeIdentityUsageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
740
|
+
var contents, data, _a, _b;
|
|
741
|
+
return __generator(this, function (_c) {
|
|
742
|
+
switch (_c.label) {
|
|
743
|
+
case 0:
|
|
744
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
745
|
+
return [2, deserializeAws_restJson1DescribeIdentityUsageCommandError(output, context)];
|
|
746
|
+
}
|
|
747
|
+
contents = map({
|
|
748
|
+
$metadata: deserializeMetadata(output),
|
|
749
|
+
});
|
|
750
|
+
_a = __expectNonNull;
|
|
751
|
+
_b = __expectObject;
|
|
752
|
+
return [4, parseBody(output.body, context)];
|
|
753
|
+
case 1:
|
|
754
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
755
|
+
if (data.IdentityUsage != null) {
|
|
756
|
+
contents.IdentityUsage = deserializeAws_restJson1IdentityUsage(data.IdentityUsage, context);
|
|
757
|
+
}
|
|
758
|
+
return [2, contents];
|
|
759
|
+
}
|
|
739
760
|
});
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
throw
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
761
|
+
}); };
|
|
762
|
+
var deserializeAws_restJson1DescribeIdentityUsageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
763
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
764
|
+
var _c;
|
|
765
|
+
return __generator(this, function (_d) {
|
|
766
|
+
switch (_d.label) {
|
|
767
|
+
case 0:
|
|
768
|
+
_a = [__assign({}, output)];
|
|
769
|
+
_c = {};
|
|
770
|
+
return [4, parseErrorBody(output.body, context)];
|
|
771
|
+
case 1:
|
|
772
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
773
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
+
_b = errorCode;
|
|
775
|
+
switch (_b) {
|
|
776
|
+
case "InternalErrorException": return [3, 2];
|
|
777
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
778
|
+
case "InvalidParameterException": return [3, 4];
|
|
779
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
780
|
+
case "NotAuthorizedException": return [3, 6];
|
|
781
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
782
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
783
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
784
|
+
case "TooManyRequestsException": return [3, 10];
|
|
785
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 10];
|
|
786
|
+
}
|
|
787
|
+
return [3, 12];
|
|
788
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
789
|
+
case 3: throw _d.sent();
|
|
790
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
791
|
+
case 5: throw _d.sent();
|
|
792
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
793
|
+
case 7: throw _d.sent();
|
|
794
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
795
|
+
case 9: throw _d.sent();
|
|
796
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
797
|
+
case 11: throw _d.sent();
|
|
798
|
+
case 12:
|
|
799
|
+
parsedBody = parsedOutput.body;
|
|
800
|
+
throwDefaultError({
|
|
801
|
+
output: output,
|
|
802
|
+
parsedBody: parsedBody,
|
|
803
|
+
exceptionCtor: __BaseException,
|
|
804
|
+
errorCode: errorCode,
|
|
805
|
+
});
|
|
806
|
+
_d.label = 13;
|
|
807
|
+
case 13: return [2];
|
|
808
|
+
}
|
|
787
809
|
});
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
default:
|
|
823
|
-
const parsedBody = parsedOutput.body;
|
|
824
|
-
throwDefaultError({
|
|
825
|
-
output,
|
|
826
|
-
parsedBody,
|
|
827
|
-
exceptionCtor: __BaseException,
|
|
828
|
-
errorCode,
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
export const deserializeAws_restJson1ListRecordsCommand = async (output, context) => {
|
|
833
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
834
|
-
return deserializeAws_restJson1ListRecordsCommandError(output, context);
|
|
835
|
-
}
|
|
836
|
-
const contents = map({
|
|
837
|
-
$metadata: deserializeMetadata(output),
|
|
810
|
+
}); };
|
|
811
|
+
export var deserializeAws_restJson1GetBulkPublishDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
812
|
+
var contents, data, _a, _b;
|
|
813
|
+
return __generator(this, function (_c) {
|
|
814
|
+
switch (_c.label) {
|
|
815
|
+
case 0:
|
|
816
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
817
|
+
return [2, deserializeAws_restJson1GetBulkPublishDetailsCommandError(output, context)];
|
|
818
|
+
}
|
|
819
|
+
contents = map({
|
|
820
|
+
$metadata: deserializeMetadata(output),
|
|
821
|
+
});
|
|
822
|
+
_a = __expectNonNull;
|
|
823
|
+
_b = __expectObject;
|
|
824
|
+
return [4, parseBody(output.body, context)];
|
|
825
|
+
case 1:
|
|
826
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
827
|
+
if (data.BulkPublishCompleteTime != null) {
|
|
828
|
+
contents.BulkPublishCompleteTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.BulkPublishCompleteTime)));
|
|
829
|
+
}
|
|
830
|
+
if (data.BulkPublishStartTime != null) {
|
|
831
|
+
contents.BulkPublishStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.BulkPublishStartTime)));
|
|
832
|
+
}
|
|
833
|
+
if (data.BulkPublishStatus != null) {
|
|
834
|
+
contents.BulkPublishStatus = __expectString(data.BulkPublishStatus);
|
|
835
|
+
}
|
|
836
|
+
if (data.FailureMessage != null) {
|
|
837
|
+
contents.FailureMessage = __expectString(data.FailureMessage);
|
|
838
|
+
}
|
|
839
|
+
if (data.IdentityPoolId != null) {
|
|
840
|
+
contents.IdentityPoolId = __expectString(data.IdentityPoolId);
|
|
841
|
+
}
|
|
842
|
+
return [2, contents];
|
|
843
|
+
}
|
|
838
844
|
});
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
884
|
-
throw await deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
885
|
-
case "TooManyRequestsException":
|
|
886
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
887
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
888
|
-
default:
|
|
889
|
-
const parsedBody = parsedOutput.body;
|
|
890
|
-
throwDefaultError({
|
|
891
|
-
output,
|
|
892
|
-
parsedBody,
|
|
893
|
-
exceptionCtor: __BaseException,
|
|
894
|
-
errorCode,
|
|
895
|
-
});
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
export const deserializeAws_restJson1RegisterDeviceCommand = async (output, context) => {
|
|
899
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
900
|
-
return deserializeAws_restJson1RegisterDeviceCommandError(output, context);
|
|
901
|
-
}
|
|
902
|
-
const contents = map({
|
|
903
|
-
$metadata: deserializeMetadata(output),
|
|
845
|
+
}); };
|
|
846
|
+
var deserializeAws_restJson1GetBulkPublishDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
847
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
848
|
+
var _c;
|
|
849
|
+
return __generator(this, function (_d) {
|
|
850
|
+
switch (_d.label) {
|
|
851
|
+
case 0:
|
|
852
|
+
_a = [__assign({}, output)];
|
|
853
|
+
_c = {};
|
|
854
|
+
return [4, parseErrorBody(output.body, context)];
|
|
855
|
+
case 1:
|
|
856
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
857
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
858
|
+
_b = errorCode;
|
|
859
|
+
switch (_b) {
|
|
860
|
+
case "InternalErrorException": return [3, 2];
|
|
861
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
862
|
+
case "InvalidParameterException": return [3, 4];
|
|
863
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
864
|
+
case "NotAuthorizedException": return [3, 6];
|
|
865
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
866
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
867
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
868
|
+
}
|
|
869
|
+
return [3, 10];
|
|
870
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
871
|
+
case 3: throw _d.sent();
|
|
872
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
873
|
+
case 5: throw _d.sent();
|
|
874
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
875
|
+
case 7: throw _d.sent();
|
|
876
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
877
|
+
case 9: throw _d.sent();
|
|
878
|
+
case 10:
|
|
879
|
+
parsedBody = parsedOutput.body;
|
|
880
|
+
throwDefaultError({
|
|
881
|
+
output: output,
|
|
882
|
+
parsedBody: parsedBody,
|
|
883
|
+
exceptionCtor: __BaseException,
|
|
884
|
+
errorCode: errorCode,
|
|
885
|
+
});
|
|
886
|
+
_d.label = 11;
|
|
887
|
+
case 11: return [2];
|
|
888
|
+
}
|
|
904
889
|
});
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
case "NotAuthorizedException":
|
|
928
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
929
|
-
throw await deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
930
|
-
case "ResourceNotFoundException":
|
|
931
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
932
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
933
|
-
case "TooManyRequestsException":
|
|
934
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
935
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
936
|
-
default:
|
|
937
|
-
const parsedBody = parsedOutput.body;
|
|
938
|
-
throwDefaultError({
|
|
939
|
-
output,
|
|
940
|
-
parsedBody,
|
|
941
|
-
exceptionCtor: __BaseException,
|
|
942
|
-
errorCode,
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
|
-
export const deserializeAws_restJson1SetCognitoEventsCommand = async (output, context) => {
|
|
947
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
948
|
-
return deserializeAws_restJson1SetCognitoEventsCommandError(output, context);
|
|
949
|
-
}
|
|
950
|
-
const contents = map({
|
|
951
|
-
$metadata: deserializeMetadata(output),
|
|
890
|
+
}); };
|
|
891
|
+
export var deserializeAws_restJson1GetCognitoEventsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
892
|
+
var contents, data, _a, _b;
|
|
893
|
+
return __generator(this, function (_c) {
|
|
894
|
+
switch (_c.label) {
|
|
895
|
+
case 0:
|
|
896
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
897
|
+
return [2, deserializeAws_restJson1GetCognitoEventsCommandError(output, context)];
|
|
898
|
+
}
|
|
899
|
+
contents = map({
|
|
900
|
+
$metadata: deserializeMetadata(output),
|
|
901
|
+
});
|
|
902
|
+
_a = __expectNonNull;
|
|
903
|
+
_b = __expectObject;
|
|
904
|
+
return [4, parseBody(output.body, context)];
|
|
905
|
+
case 1:
|
|
906
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
907
|
+
if (data.Events != null) {
|
|
908
|
+
contents.Events = deserializeAws_restJson1Events(data.Events, context);
|
|
909
|
+
}
|
|
910
|
+
return [2, contents];
|
|
911
|
+
}
|
|
952
912
|
});
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
913
|
+
}); };
|
|
914
|
+
var deserializeAws_restJson1GetCognitoEventsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
915
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
916
|
+
var _c;
|
|
917
|
+
return __generator(this, function (_d) {
|
|
918
|
+
switch (_d.label) {
|
|
919
|
+
case 0:
|
|
920
|
+
_a = [__assign({}, output)];
|
|
921
|
+
_c = {};
|
|
922
|
+
return [4, parseErrorBody(output.body, context)];
|
|
923
|
+
case 1:
|
|
924
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
925
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
926
|
+
_b = errorCode;
|
|
927
|
+
switch (_b) {
|
|
928
|
+
case "InternalErrorException": return [3, 2];
|
|
929
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
930
|
+
case "InvalidParameterException": return [3, 4];
|
|
931
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
932
|
+
case "NotAuthorizedException": return [3, 6];
|
|
933
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
934
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
935
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
936
|
+
case "TooManyRequestsException": return [3, 10];
|
|
937
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 10];
|
|
938
|
+
}
|
|
939
|
+
return [3, 12];
|
|
940
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
941
|
+
case 3: throw _d.sent();
|
|
942
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
943
|
+
case 5: throw _d.sent();
|
|
944
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
945
|
+
case 7: throw _d.sent();
|
|
946
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
947
|
+
case 9: throw _d.sent();
|
|
948
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
949
|
+
case 11: throw _d.sent();
|
|
950
|
+
case 12:
|
|
951
|
+
parsedBody = parsedOutput.body;
|
|
952
|
+
throwDefaultError({
|
|
953
|
+
output: output,
|
|
954
|
+
parsedBody: parsedBody,
|
|
955
|
+
exceptionCtor: __BaseException,
|
|
956
|
+
errorCode: errorCode,
|
|
957
|
+
});
|
|
958
|
+
_d.label = 13;
|
|
959
|
+
case 13: return [2];
|
|
960
|
+
}
|
|
994
961
|
});
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
case "NotAuthorizedException":
|
|
1024
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
1025
|
-
throw await deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
1026
|
-
case "ResourceNotFoundException":
|
|
1027
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
1028
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1029
|
-
case "TooManyRequestsException":
|
|
1030
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
1031
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1032
|
-
default:
|
|
1033
|
-
const parsedBody = parsedOutput.body;
|
|
1034
|
-
throwDefaultError({
|
|
1035
|
-
output,
|
|
1036
|
-
parsedBody,
|
|
1037
|
-
exceptionCtor: __BaseException,
|
|
1038
|
-
errorCode,
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
};
|
|
1042
|
-
export const deserializeAws_restJson1SubscribeToDatasetCommand = async (output, context) => {
|
|
1043
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1044
|
-
return deserializeAws_restJson1SubscribeToDatasetCommandError(output, context);
|
|
1045
|
-
}
|
|
1046
|
-
const contents = map({
|
|
1047
|
-
$metadata: deserializeMetadata(output),
|
|
962
|
+
}); };
|
|
963
|
+
export var deserializeAws_restJson1GetIdentityPoolConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
964
|
+
var contents, data, _a, _b;
|
|
965
|
+
return __generator(this, function (_c) {
|
|
966
|
+
switch (_c.label) {
|
|
967
|
+
case 0:
|
|
968
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
969
|
+
return [2, deserializeAws_restJson1GetIdentityPoolConfigurationCommandError(output, context)];
|
|
970
|
+
}
|
|
971
|
+
contents = map({
|
|
972
|
+
$metadata: deserializeMetadata(output),
|
|
973
|
+
});
|
|
974
|
+
_a = __expectNonNull;
|
|
975
|
+
_b = __expectObject;
|
|
976
|
+
return [4, parseBody(output.body, context)];
|
|
977
|
+
case 1:
|
|
978
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
979
|
+
if (data.CognitoStreams != null) {
|
|
980
|
+
contents.CognitoStreams = deserializeAws_restJson1CognitoStreams(data.CognitoStreams, context);
|
|
981
|
+
}
|
|
982
|
+
if (data.IdentityPoolId != null) {
|
|
983
|
+
contents.IdentityPoolId = __expectString(data.IdentityPoolId);
|
|
984
|
+
}
|
|
985
|
+
if (data.PushSync != null) {
|
|
986
|
+
contents.PushSync = deserializeAws_restJson1PushSync(data.PushSync, context);
|
|
987
|
+
}
|
|
988
|
+
return [2, contents];
|
|
989
|
+
}
|
|
1048
990
|
});
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
991
|
+
}); };
|
|
992
|
+
var deserializeAws_restJson1GetIdentityPoolConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
993
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
994
|
+
var _c;
|
|
995
|
+
return __generator(this, function (_d) {
|
|
996
|
+
switch (_d.label) {
|
|
997
|
+
case 0:
|
|
998
|
+
_a = [__assign({}, output)];
|
|
999
|
+
_c = {};
|
|
1000
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1001
|
+
case 1:
|
|
1002
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1003
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1004
|
+
_b = errorCode;
|
|
1005
|
+
switch (_b) {
|
|
1006
|
+
case "InternalErrorException": return [3, 2];
|
|
1007
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1008
|
+
case "InvalidParameterException": return [3, 4];
|
|
1009
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
1010
|
+
case "NotAuthorizedException": return [3, 6];
|
|
1011
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
1012
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1013
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
1014
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1015
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 10];
|
|
1016
|
+
}
|
|
1017
|
+
return [3, 12];
|
|
1018
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1019
|
+
case 3: throw _d.sent();
|
|
1020
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1021
|
+
case 5: throw _d.sent();
|
|
1022
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1023
|
+
case 7: throw _d.sent();
|
|
1024
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1025
|
+
case 9: throw _d.sent();
|
|
1026
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1027
|
+
case 11: throw _d.sent();
|
|
1028
|
+
case 12:
|
|
1029
|
+
parsedBody = parsedOutput.body;
|
|
1030
|
+
throwDefaultError({
|
|
1031
|
+
output: output,
|
|
1032
|
+
parsedBody: parsedBody,
|
|
1033
|
+
exceptionCtor: __BaseException,
|
|
1034
|
+
errorCode: errorCode,
|
|
1035
|
+
});
|
|
1036
|
+
_d.label = 13;
|
|
1037
|
+
case 13: return [2];
|
|
1038
|
+
}
|
|
1093
1039
|
});
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
default:
|
|
1123
|
-
const parsedBody = parsedOutput.body;
|
|
1124
|
-
throwDefaultError({
|
|
1125
|
-
output,
|
|
1126
|
-
parsedBody,
|
|
1127
|
-
exceptionCtor: __BaseException,
|
|
1128
|
-
errorCode,
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
};
|
|
1132
|
-
export const deserializeAws_restJson1UpdateRecordsCommand = async (output, context) => {
|
|
1133
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1134
|
-
return deserializeAws_restJson1UpdateRecordsCommandError(output, context);
|
|
1135
|
-
}
|
|
1136
|
-
const contents = map({
|
|
1137
|
-
$metadata: deserializeMetadata(output),
|
|
1040
|
+
}); };
|
|
1041
|
+
export var deserializeAws_restJson1ListDatasetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1042
|
+
var contents, data, _a, _b;
|
|
1043
|
+
return __generator(this, function (_c) {
|
|
1044
|
+
switch (_c.label) {
|
|
1045
|
+
case 0:
|
|
1046
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1047
|
+
return [2, deserializeAws_restJson1ListDatasetsCommandError(output, context)];
|
|
1048
|
+
}
|
|
1049
|
+
contents = map({
|
|
1050
|
+
$metadata: deserializeMetadata(output),
|
|
1051
|
+
});
|
|
1052
|
+
_a = __expectNonNull;
|
|
1053
|
+
_b = __expectObject;
|
|
1054
|
+
return [4, parseBody(output.body, context)];
|
|
1055
|
+
case 1:
|
|
1056
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1057
|
+
if (data.Count != null) {
|
|
1058
|
+
contents.Count = __expectInt32(data.Count);
|
|
1059
|
+
}
|
|
1060
|
+
if (data.Datasets != null) {
|
|
1061
|
+
contents.Datasets = deserializeAws_restJson1DatasetList(data.Datasets, context);
|
|
1062
|
+
}
|
|
1063
|
+
if (data.NextToken != null) {
|
|
1064
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1065
|
+
}
|
|
1066
|
+
return [2, contents];
|
|
1067
|
+
}
|
|
1138
1068
|
});
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
return
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
throw
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
parsedBody,
|
|
1184
|
-
exceptionCtor: __BaseException,
|
|
1185
|
-
errorCode,
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
};
|
|
1189
|
-
const map = __map;
|
|
1190
|
-
const deserializeAws_restJson1AlreadyStreamedExceptionResponse = async (parsedOutput, context) => {
|
|
1191
|
-
const contents = map({});
|
|
1192
|
-
const data = parsedOutput.body;
|
|
1193
|
-
if (data.message != null) {
|
|
1194
|
-
contents.message = __expectString(data.message);
|
|
1195
|
-
}
|
|
1196
|
-
const exception = new AlreadyStreamedException({
|
|
1197
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1198
|
-
...contents,
|
|
1069
|
+
}); };
|
|
1070
|
+
var deserializeAws_restJson1ListDatasetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1071
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1072
|
+
var _c;
|
|
1073
|
+
return __generator(this, function (_d) {
|
|
1074
|
+
switch (_d.label) {
|
|
1075
|
+
case 0:
|
|
1076
|
+
_a = [__assign({}, output)];
|
|
1077
|
+
_c = {};
|
|
1078
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1079
|
+
case 1:
|
|
1080
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1081
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1082
|
+
_b = errorCode;
|
|
1083
|
+
switch (_b) {
|
|
1084
|
+
case "InternalErrorException": return [3, 2];
|
|
1085
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1086
|
+
case "InvalidParameterException": return [3, 4];
|
|
1087
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
1088
|
+
case "NotAuthorizedException": return [3, 6];
|
|
1089
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
1090
|
+
case "TooManyRequestsException": return [3, 8];
|
|
1091
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 8];
|
|
1092
|
+
}
|
|
1093
|
+
return [3, 10];
|
|
1094
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1095
|
+
case 3: throw _d.sent();
|
|
1096
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1097
|
+
case 5: throw _d.sent();
|
|
1098
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1099
|
+
case 7: throw _d.sent();
|
|
1100
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1101
|
+
case 9: throw _d.sent();
|
|
1102
|
+
case 10:
|
|
1103
|
+
parsedBody = parsedOutput.body;
|
|
1104
|
+
throwDefaultError({
|
|
1105
|
+
output: output,
|
|
1106
|
+
parsedBody: parsedBody,
|
|
1107
|
+
exceptionCtor: __BaseException,
|
|
1108
|
+
errorCode: errorCode,
|
|
1109
|
+
});
|
|
1110
|
+
_d.label = 11;
|
|
1111
|
+
case 11: return [2];
|
|
1112
|
+
}
|
|
1199
1113
|
});
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1114
|
+
}); };
|
|
1115
|
+
export var deserializeAws_restJson1ListIdentityPoolUsageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1116
|
+
var contents, data, _a, _b;
|
|
1117
|
+
return __generator(this, function (_c) {
|
|
1118
|
+
switch (_c.label) {
|
|
1119
|
+
case 0:
|
|
1120
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1121
|
+
return [2, deserializeAws_restJson1ListIdentityPoolUsageCommandError(output, context)];
|
|
1122
|
+
}
|
|
1123
|
+
contents = map({
|
|
1124
|
+
$metadata: deserializeMetadata(output),
|
|
1125
|
+
});
|
|
1126
|
+
_a = __expectNonNull;
|
|
1127
|
+
_b = __expectObject;
|
|
1128
|
+
return [4, parseBody(output.body, context)];
|
|
1129
|
+
case 1:
|
|
1130
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1131
|
+
if (data.Count != null) {
|
|
1132
|
+
contents.Count = __expectInt32(data.Count);
|
|
1133
|
+
}
|
|
1134
|
+
if (data.IdentityPoolUsages != null) {
|
|
1135
|
+
contents.IdentityPoolUsages = deserializeAws_restJson1IdentityPoolUsageList(data.IdentityPoolUsages, context);
|
|
1136
|
+
}
|
|
1137
|
+
if (data.MaxResults != null) {
|
|
1138
|
+
contents.MaxResults = __expectInt32(data.MaxResults);
|
|
1139
|
+
}
|
|
1140
|
+
if (data.NextToken != null) {
|
|
1141
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1142
|
+
}
|
|
1143
|
+
return [2, contents];
|
|
1144
|
+
}
|
|
1211
1145
|
});
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1146
|
+
}); };
|
|
1147
|
+
var deserializeAws_restJson1ListIdentityPoolUsageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1148
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1149
|
+
var _c;
|
|
1150
|
+
return __generator(this, function (_d) {
|
|
1151
|
+
switch (_d.label) {
|
|
1152
|
+
case 0:
|
|
1153
|
+
_a = [__assign({}, output)];
|
|
1154
|
+
_c = {};
|
|
1155
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1156
|
+
case 1:
|
|
1157
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1158
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1159
|
+
_b = errorCode;
|
|
1160
|
+
switch (_b) {
|
|
1161
|
+
case "InternalErrorException": return [3, 2];
|
|
1162
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1163
|
+
case "InvalidParameterException": return [3, 4];
|
|
1164
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
1165
|
+
case "NotAuthorizedException": return [3, 6];
|
|
1166
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
1167
|
+
case "TooManyRequestsException": return [3, 8];
|
|
1168
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 8];
|
|
1169
|
+
}
|
|
1170
|
+
return [3, 10];
|
|
1171
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1172
|
+
case 3: throw _d.sent();
|
|
1173
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1174
|
+
case 5: throw _d.sent();
|
|
1175
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1176
|
+
case 7: throw _d.sent();
|
|
1177
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1178
|
+
case 9: throw _d.sent();
|
|
1179
|
+
case 10:
|
|
1180
|
+
parsedBody = parsedOutput.body;
|
|
1181
|
+
throwDefaultError({
|
|
1182
|
+
output: output,
|
|
1183
|
+
parsedBody: parsedBody,
|
|
1184
|
+
exceptionCtor: __BaseException,
|
|
1185
|
+
errorCode: errorCode,
|
|
1186
|
+
});
|
|
1187
|
+
_d.label = 11;
|
|
1188
|
+
case 11: return [2];
|
|
1189
|
+
}
|
|
1223
1190
|
});
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1191
|
+
}); };
|
|
1192
|
+
export var deserializeAws_restJson1ListRecordsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1193
|
+
var contents, data, _a, _b;
|
|
1194
|
+
return __generator(this, function (_c) {
|
|
1195
|
+
switch (_c.label) {
|
|
1196
|
+
case 0:
|
|
1197
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1198
|
+
return [2, deserializeAws_restJson1ListRecordsCommandError(output, context)];
|
|
1199
|
+
}
|
|
1200
|
+
contents = map({
|
|
1201
|
+
$metadata: deserializeMetadata(output),
|
|
1202
|
+
});
|
|
1203
|
+
_a = __expectNonNull;
|
|
1204
|
+
_b = __expectObject;
|
|
1205
|
+
return [4, parseBody(output.body, context)];
|
|
1206
|
+
case 1:
|
|
1207
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1208
|
+
if (data.Count != null) {
|
|
1209
|
+
contents.Count = __expectInt32(data.Count);
|
|
1210
|
+
}
|
|
1211
|
+
if (data.DatasetDeletedAfterRequestedSyncCount != null) {
|
|
1212
|
+
contents.DatasetDeletedAfterRequestedSyncCount = __expectBoolean(data.DatasetDeletedAfterRequestedSyncCount);
|
|
1213
|
+
}
|
|
1214
|
+
if (data.DatasetExists != null) {
|
|
1215
|
+
contents.DatasetExists = __expectBoolean(data.DatasetExists);
|
|
1216
|
+
}
|
|
1217
|
+
if (data.DatasetSyncCount != null) {
|
|
1218
|
+
contents.DatasetSyncCount = __expectLong(data.DatasetSyncCount);
|
|
1219
|
+
}
|
|
1220
|
+
if (data.LastModifiedBy != null) {
|
|
1221
|
+
contents.LastModifiedBy = __expectString(data.LastModifiedBy);
|
|
1222
|
+
}
|
|
1223
|
+
if (data.MergedDatasetNames != null) {
|
|
1224
|
+
contents.MergedDatasetNames = deserializeAws_restJson1MergedDatasetNameList(data.MergedDatasetNames, context);
|
|
1225
|
+
}
|
|
1226
|
+
if (data.NextToken != null) {
|
|
1227
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1228
|
+
}
|
|
1229
|
+
if (data.Records != null) {
|
|
1230
|
+
contents.Records = deserializeAws_restJson1RecordList(data.Records, context);
|
|
1231
|
+
}
|
|
1232
|
+
if (data.SyncSessionToken != null) {
|
|
1233
|
+
contents.SyncSessionToken = __expectString(data.SyncSessionToken);
|
|
1234
|
+
}
|
|
1235
|
+
return [2, contents];
|
|
1236
|
+
}
|
|
1235
1237
|
});
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1238
|
+
}); };
|
|
1239
|
+
var deserializeAws_restJson1ListRecordsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1240
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1241
|
+
var _c;
|
|
1242
|
+
return __generator(this, function (_d) {
|
|
1243
|
+
switch (_d.label) {
|
|
1244
|
+
case 0:
|
|
1245
|
+
_a = [__assign({}, output)];
|
|
1246
|
+
_c = {};
|
|
1247
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1248
|
+
case 1:
|
|
1249
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1250
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1251
|
+
_b = errorCode;
|
|
1252
|
+
switch (_b) {
|
|
1253
|
+
case "InternalErrorException": return [3, 2];
|
|
1254
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1255
|
+
case "InvalidParameterException": return [3, 4];
|
|
1256
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
1257
|
+
case "NotAuthorizedException": return [3, 6];
|
|
1258
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
1259
|
+
case "TooManyRequestsException": return [3, 8];
|
|
1260
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 8];
|
|
1261
|
+
}
|
|
1262
|
+
return [3, 10];
|
|
1263
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1264
|
+
case 3: throw _d.sent();
|
|
1265
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1266
|
+
case 5: throw _d.sent();
|
|
1267
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1268
|
+
case 7: throw _d.sent();
|
|
1269
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1270
|
+
case 9: throw _d.sent();
|
|
1271
|
+
case 10:
|
|
1272
|
+
parsedBody = parsedOutput.body;
|
|
1273
|
+
throwDefaultError({
|
|
1274
|
+
output: output,
|
|
1275
|
+
parsedBody: parsedBody,
|
|
1276
|
+
exceptionCtor: __BaseException,
|
|
1277
|
+
errorCode: errorCode,
|
|
1278
|
+
});
|
|
1279
|
+
_d.label = 11;
|
|
1280
|
+
case 11: return [2];
|
|
1281
|
+
}
|
|
1247
1282
|
});
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1283
|
+
}); };
|
|
1284
|
+
export var deserializeAws_restJson1RegisterDeviceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1285
|
+
var contents, data, _a, _b;
|
|
1286
|
+
return __generator(this, function (_c) {
|
|
1287
|
+
switch (_c.label) {
|
|
1288
|
+
case 0:
|
|
1289
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1290
|
+
return [2, deserializeAws_restJson1RegisterDeviceCommandError(output, context)];
|
|
1291
|
+
}
|
|
1292
|
+
contents = map({
|
|
1293
|
+
$metadata: deserializeMetadata(output),
|
|
1294
|
+
});
|
|
1295
|
+
_a = __expectNonNull;
|
|
1296
|
+
_b = __expectObject;
|
|
1297
|
+
return [4, parseBody(output.body, context)];
|
|
1298
|
+
case 1:
|
|
1299
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1300
|
+
if (data.DeviceId != null) {
|
|
1301
|
+
contents.DeviceId = __expectString(data.DeviceId);
|
|
1302
|
+
}
|
|
1303
|
+
return [2, contents];
|
|
1304
|
+
}
|
|
1259
1305
|
});
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1306
|
+
}); };
|
|
1307
|
+
var deserializeAws_restJson1RegisterDeviceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1308
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1309
|
+
var _c;
|
|
1310
|
+
return __generator(this, function (_d) {
|
|
1311
|
+
switch (_d.label) {
|
|
1312
|
+
case 0:
|
|
1313
|
+
_a = [__assign({}, output)];
|
|
1314
|
+
_c = {};
|
|
1315
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1316
|
+
case 1:
|
|
1317
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1318
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1319
|
+
_b = errorCode;
|
|
1320
|
+
switch (_b) {
|
|
1321
|
+
case "InternalErrorException": return [3, 2];
|
|
1322
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1323
|
+
case "InvalidConfigurationException": return [3, 4];
|
|
1324
|
+
case "com.amazonaws.cognitosync#InvalidConfigurationException": return [3, 4];
|
|
1325
|
+
case "InvalidParameterException": return [3, 6];
|
|
1326
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 6];
|
|
1327
|
+
case "NotAuthorizedException": return [3, 8];
|
|
1328
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 8];
|
|
1329
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
1330
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 10];
|
|
1331
|
+
case "TooManyRequestsException": return [3, 12];
|
|
1332
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 12];
|
|
1333
|
+
}
|
|
1334
|
+
return [3, 14];
|
|
1335
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1336
|
+
case 3: throw _d.sent();
|
|
1337
|
+
case 4: return [4, deserializeAws_restJson1InvalidConfigurationExceptionResponse(parsedOutput, context)];
|
|
1338
|
+
case 5: throw _d.sent();
|
|
1339
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1340
|
+
case 7: throw _d.sent();
|
|
1341
|
+
case 8: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1342
|
+
case 9: throw _d.sent();
|
|
1343
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1344
|
+
case 11: throw _d.sent();
|
|
1345
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1346
|
+
case 13: throw _d.sent();
|
|
1347
|
+
case 14:
|
|
1348
|
+
parsedBody = parsedOutput.body;
|
|
1349
|
+
throwDefaultError({
|
|
1350
|
+
output: output,
|
|
1351
|
+
parsedBody: parsedBody,
|
|
1352
|
+
exceptionCtor: __BaseException,
|
|
1353
|
+
errorCode: errorCode,
|
|
1354
|
+
});
|
|
1355
|
+
_d.label = 15;
|
|
1356
|
+
case 15: return [2];
|
|
1357
|
+
}
|
|
1271
1358
|
});
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1359
|
+
}); };
|
|
1360
|
+
export var deserializeAws_restJson1SetCognitoEventsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1361
|
+
var contents;
|
|
1362
|
+
return __generator(this, function (_a) {
|
|
1363
|
+
switch (_a.label) {
|
|
1364
|
+
case 0:
|
|
1365
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1366
|
+
return [2, deserializeAws_restJson1SetCognitoEventsCommandError(output, context)];
|
|
1367
|
+
}
|
|
1368
|
+
contents = map({
|
|
1369
|
+
$metadata: deserializeMetadata(output),
|
|
1370
|
+
});
|
|
1371
|
+
return [4, collectBody(output.body, context)];
|
|
1372
|
+
case 1:
|
|
1373
|
+
_a.sent();
|
|
1374
|
+
return [2, contents];
|
|
1375
|
+
}
|
|
1283
1376
|
});
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1377
|
+
}); };
|
|
1378
|
+
var deserializeAws_restJson1SetCognitoEventsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1379
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1380
|
+
var _c;
|
|
1381
|
+
return __generator(this, function (_d) {
|
|
1382
|
+
switch (_d.label) {
|
|
1383
|
+
case 0:
|
|
1384
|
+
_a = [__assign({}, output)];
|
|
1385
|
+
_c = {};
|
|
1386
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1387
|
+
case 1:
|
|
1388
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1389
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1390
|
+
_b = errorCode;
|
|
1391
|
+
switch (_b) {
|
|
1392
|
+
case "InternalErrorException": return [3, 2];
|
|
1393
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1394
|
+
case "InvalidParameterException": return [3, 4];
|
|
1395
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 4];
|
|
1396
|
+
case "NotAuthorizedException": return [3, 6];
|
|
1397
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 6];
|
|
1398
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1399
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 8];
|
|
1400
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1401
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 10];
|
|
1402
|
+
}
|
|
1403
|
+
return [3, 12];
|
|
1404
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1405
|
+
case 3: throw _d.sent();
|
|
1406
|
+
case 4: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1407
|
+
case 5: throw _d.sent();
|
|
1408
|
+
case 6: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1409
|
+
case 7: throw _d.sent();
|
|
1410
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1411
|
+
case 9: throw _d.sent();
|
|
1412
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1413
|
+
case 11: throw _d.sent();
|
|
1414
|
+
case 12:
|
|
1415
|
+
parsedBody = parsedOutput.body;
|
|
1416
|
+
throwDefaultError({
|
|
1417
|
+
output: output,
|
|
1418
|
+
parsedBody: parsedBody,
|
|
1419
|
+
exceptionCtor: __BaseException,
|
|
1420
|
+
errorCode: errorCode,
|
|
1421
|
+
});
|
|
1422
|
+
_d.label = 13;
|
|
1423
|
+
case 13: return [2];
|
|
1424
|
+
}
|
|
1295
1425
|
});
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1426
|
+
}); };
|
|
1427
|
+
export var deserializeAws_restJson1SetIdentityPoolConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1428
|
+
var contents, data, _a, _b;
|
|
1429
|
+
return __generator(this, function (_c) {
|
|
1430
|
+
switch (_c.label) {
|
|
1431
|
+
case 0:
|
|
1432
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1433
|
+
return [2, deserializeAws_restJson1SetIdentityPoolConfigurationCommandError(output, context)];
|
|
1434
|
+
}
|
|
1435
|
+
contents = map({
|
|
1436
|
+
$metadata: deserializeMetadata(output),
|
|
1437
|
+
});
|
|
1438
|
+
_a = __expectNonNull;
|
|
1439
|
+
_b = __expectObject;
|
|
1440
|
+
return [4, parseBody(output.body, context)];
|
|
1441
|
+
case 1:
|
|
1442
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1443
|
+
if (data.CognitoStreams != null) {
|
|
1444
|
+
contents.CognitoStreams = deserializeAws_restJson1CognitoStreams(data.CognitoStreams, context);
|
|
1445
|
+
}
|
|
1446
|
+
if (data.IdentityPoolId != null) {
|
|
1447
|
+
contents.IdentityPoolId = __expectString(data.IdentityPoolId);
|
|
1448
|
+
}
|
|
1449
|
+
if (data.PushSync != null) {
|
|
1450
|
+
contents.PushSync = deserializeAws_restJson1PushSync(data.PushSync, context);
|
|
1451
|
+
}
|
|
1452
|
+
return [2, contents];
|
|
1453
|
+
}
|
|
1307
1454
|
});
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1455
|
+
}); };
|
|
1456
|
+
var deserializeAws_restJson1SetIdentityPoolConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1457
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1458
|
+
var _c;
|
|
1459
|
+
return __generator(this, function (_d) {
|
|
1460
|
+
switch (_d.label) {
|
|
1461
|
+
case 0:
|
|
1462
|
+
_a = [__assign({}, output)];
|
|
1463
|
+
_c = {};
|
|
1464
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1465
|
+
case 1:
|
|
1466
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1467
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1468
|
+
_b = errorCode;
|
|
1469
|
+
switch (_b) {
|
|
1470
|
+
case "ConcurrentModificationException": return [3, 2];
|
|
1471
|
+
case "com.amazonaws.cognitosync#ConcurrentModificationException": return [3, 2];
|
|
1472
|
+
case "InternalErrorException": return [3, 4];
|
|
1473
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 4];
|
|
1474
|
+
case "InvalidParameterException": return [3, 6];
|
|
1475
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 6];
|
|
1476
|
+
case "NotAuthorizedException": return [3, 8];
|
|
1477
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 8];
|
|
1478
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
1479
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 10];
|
|
1480
|
+
case "TooManyRequestsException": return [3, 12];
|
|
1481
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 12];
|
|
1482
|
+
}
|
|
1483
|
+
return [3, 14];
|
|
1484
|
+
case 2: return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
1485
|
+
case 3: throw _d.sent();
|
|
1486
|
+
case 4: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1487
|
+
case 5: throw _d.sent();
|
|
1488
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1489
|
+
case 7: throw _d.sent();
|
|
1490
|
+
case 8: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1491
|
+
case 9: throw _d.sent();
|
|
1492
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1493
|
+
case 11: throw _d.sent();
|
|
1494
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1495
|
+
case 13: throw _d.sent();
|
|
1496
|
+
case 14:
|
|
1497
|
+
parsedBody = parsedOutput.body;
|
|
1498
|
+
throwDefaultError({
|
|
1499
|
+
output: output,
|
|
1500
|
+
parsedBody: parsedBody,
|
|
1501
|
+
exceptionCtor: __BaseException,
|
|
1502
|
+
errorCode: errorCode,
|
|
1503
|
+
});
|
|
1504
|
+
_d.label = 15;
|
|
1505
|
+
case 15: return [2];
|
|
1506
|
+
}
|
|
1319
1507
|
});
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1508
|
+
}); };
|
|
1509
|
+
export var deserializeAws_restJson1SubscribeToDatasetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1510
|
+
var contents;
|
|
1511
|
+
return __generator(this, function (_a) {
|
|
1512
|
+
switch (_a.label) {
|
|
1513
|
+
case 0:
|
|
1514
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1515
|
+
return [2, deserializeAws_restJson1SubscribeToDatasetCommandError(output, context)];
|
|
1516
|
+
}
|
|
1517
|
+
contents = map({
|
|
1518
|
+
$metadata: deserializeMetadata(output),
|
|
1519
|
+
});
|
|
1520
|
+
return [4, collectBody(output.body, context)];
|
|
1521
|
+
case 1:
|
|
1522
|
+
_a.sent();
|
|
1523
|
+
return [2, contents];
|
|
1524
|
+
}
|
|
1331
1525
|
});
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1526
|
+
}); };
|
|
1527
|
+
var deserializeAws_restJson1SubscribeToDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1528
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1529
|
+
var _c;
|
|
1530
|
+
return __generator(this, function (_d) {
|
|
1531
|
+
switch (_d.label) {
|
|
1532
|
+
case 0:
|
|
1533
|
+
_a = [__assign({}, output)];
|
|
1534
|
+
_c = {};
|
|
1535
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1536
|
+
case 1:
|
|
1537
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1538
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1539
|
+
_b = errorCode;
|
|
1540
|
+
switch (_b) {
|
|
1541
|
+
case "InternalErrorException": return [3, 2];
|
|
1542
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1543
|
+
case "InvalidConfigurationException": return [3, 4];
|
|
1544
|
+
case "com.amazonaws.cognitosync#InvalidConfigurationException": return [3, 4];
|
|
1545
|
+
case "InvalidParameterException": return [3, 6];
|
|
1546
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 6];
|
|
1547
|
+
case "NotAuthorizedException": return [3, 8];
|
|
1548
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 8];
|
|
1549
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
1550
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 10];
|
|
1551
|
+
case "TooManyRequestsException": return [3, 12];
|
|
1552
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 12];
|
|
1553
|
+
}
|
|
1554
|
+
return [3, 14];
|
|
1555
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1556
|
+
case 3: throw _d.sent();
|
|
1557
|
+
case 4: return [4, deserializeAws_restJson1InvalidConfigurationExceptionResponse(parsedOutput, context)];
|
|
1558
|
+
case 5: throw _d.sent();
|
|
1559
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1560
|
+
case 7: throw _d.sent();
|
|
1561
|
+
case 8: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1562
|
+
case 9: throw _d.sent();
|
|
1563
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1564
|
+
case 11: throw _d.sent();
|
|
1565
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1566
|
+
case 13: throw _d.sent();
|
|
1567
|
+
case 14:
|
|
1568
|
+
parsedBody = parsedOutput.body;
|
|
1569
|
+
throwDefaultError({
|
|
1570
|
+
output: output,
|
|
1571
|
+
parsedBody: parsedBody,
|
|
1572
|
+
exceptionCtor: __BaseException,
|
|
1573
|
+
errorCode: errorCode,
|
|
1574
|
+
});
|
|
1575
|
+
_d.label = 15;
|
|
1576
|
+
case 15: return [2];
|
|
1577
|
+
}
|
|
1343
1578
|
});
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1579
|
+
}); };
|
|
1580
|
+
export var deserializeAws_restJson1UnsubscribeFromDatasetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1581
|
+
var contents;
|
|
1582
|
+
return __generator(this, function (_a) {
|
|
1583
|
+
switch (_a.label) {
|
|
1584
|
+
case 0:
|
|
1585
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1586
|
+
return [2, deserializeAws_restJson1UnsubscribeFromDatasetCommandError(output, context)];
|
|
1587
|
+
}
|
|
1588
|
+
contents = map({
|
|
1589
|
+
$metadata: deserializeMetadata(output),
|
|
1590
|
+
});
|
|
1591
|
+
return [4, collectBody(output.body, context)];
|
|
1592
|
+
case 1:
|
|
1593
|
+
_a.sent();
|
|
1594
|
+
return [2, contents];
|
|
1595
|
+
}
|
|
1596
|
+
});
|
|
1597
|
+
}); };
|
|
1598
|
+
var deserializeAws_restJson1UnsubscribeFromDatasetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1599
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1600
|
+
var _c;
|
|
1601
|
+
return __generator(this, function (_d) {
|
|
1602
|
+
switch (_d.label) {
|
|
1603
|
+
case 0:
|
|
1604
|
+
_a = [__assign({}, output)];
|
|
1605
|
+
_c = {};
|
|
1606
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1607
|
+
case 1:
|
|
1608
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1609
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1610
|
+
_b = errorCode;
|
|
1611
|
+
switch (_b) {
|
|
1612
|
+
case "InternalErrorException": return [3, 2];
|
|
1613
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1614
|
+
case "InvalidConfigurationException": return [3, 4];
|
|
1615
|
+
case "com.amazonaws.cognitosync#InvalidConfigurationException": return [3, 4];
|
|
1616
|
+
case "InvalidParameterException": return [3, 6];
|
|
1617
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 6];
|
|
1618
|
+
case "NotAuthorizedException": return [3, 8];
|
|
1619
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 8];
|
|
1620
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
1621
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 10];
|
|
1622
|
+
case "TooManyRequestsException": return [3, 12];
|
|
1623
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 12];
|
|
1624
|
+
}
|
|
1625
|
+
return [3, 14];
|
|
1626
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1627
|
+
case 3: throw _d.sent();
|
|
1628
|
+
case 4: return [4, deserializeAws_restJson1InvalidConfigurationExceptionResponse(parsedOutput, context)];
|
|
1629
|
+
case 5: throw _d.sent();
|
|
1630
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1631
|
+
case 7: throw _d.sent();
|
|
1632
|
+
case 8: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1633
|
+
case 9: throw _d.sent();
|
|
1634
|
+
case 10: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1635
|
+
case 11: throw _d.sent();
|
|
1636
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1637
|
+
case 13: throw _d.sent();
|
|
1638
|
+
case 14:
|
|
1639
|
+
parsedBody = parsedOutput.body;
|
|
1640
|
+
throwDefaultError({
|
|
1641
|
+
output: output,
|
|
1642
|
+
parsedBody: parsedBody,
|
|
1643
|
+
exceptionCtor: __BaseException,
|
|
1644
|
+
errorCode: errorCode,
|
|
1645
|
+
});
|
|
1646
|
+
_d.label = 15;
|
|
1647
|
+
case 15: return [2];
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
}); };
|
|
1651
|
+
export var deserializeAws_restJson1UpdateRecordsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1652
|
+
var contents, data, _a, _b;
|
|
1653
|
+
return __generator(this, function (_c) {
|
|
1654
|
+
switch (_c.label) {
|
|
1655
|
+
case 0:
|
|
1656
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1657
|
+
return [2, deserializeAws_restJson1UpdateRecordsCommandError(output, context)];
|
|
1658
|
+
}
|
|
1659
|
+
contents = map({
|
|
1660
|
+
$metadata: deserializeMetadata(output),
|
|
1661
|
+
});
|
|
1662
|
+
_a = __expectNonNull;
|
|
1663
|
+
_b = __expectObject;
|
|
1664
|
+
return [4, parseBody(output.body, context)];
|
|
1665
|
+
case 1:
|
|
1666
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1667
|
+
if (data.Records != null) {
|
|
1668
|
+
contents.Records = deserializeAws_restJson1RecordList(data.Records, context);
|
|
1669
|
+
}
|
|
1670
|
+
return [2, contents];
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
}); };
|
|
1674
|
+
var deserializeAws_restJson1UpdateRecordsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1675
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1676
|
+
var _c;
|
|
1677
|
+
return __generator(this, function (_d) {
|
|
1678
|
+
switch (_d.label) {
|
|
1679
|
+
case 0:
|
|
1680
|
+
_a = [__assign({}, output)];
|
|
1681
|
+
_c = {};
|
|
1682
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1683
|
+
case 1:
|
|
1684
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1685
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1686
|
+
_b = errorCode;
|
|
1687
|
+
switch (_b) {
|
|
1688
|
+
case "InternalErrorException": return [3, 2];
|
|
1689
|
+
case "com.amazonaws.cognitosync#InternalErrorException": return [3, 2];
|
|
1690
|
+
case "InvalidLambdaFunctionOutputException": return [3, 4];
|
|
1691
|
+
case "com.amazonaws.cognitosync#InvalidLambdaFunctionOutputException": return [3, 4];
|
|
1692
|
+
case "InvalidParameterException": return [3, 6];
|
|
1693
|
+
case "com.amazonaws.cognitosync#InvalidParameterException": return [3, 6];
|
|
1694
|
+
case "LambdaThrottledException": return [3, 8];
|
|
1695
|
+
case "com.amazonaws.cognitosync#LambdaThrottledException": return [3, 8];
|
|
1696
|
+
case "LimitExceededException": return [3, 10];
|
|
1697
|
+
case "com.amazonaws.cognitosync#LimitExceededException": return [3, 10];
|
|
1698
|
+
case "NotAuthorizedException": return [3, 12];
|
|
1699
|
+
case "com.amazonaws.cognitosync#NotAuthorizedException": return [3, 12];
|
|
1700
|
+
case "ResourceConflictException": return [3, 14];
|
|
1701
|
+
case "com.amazonaws.cognitosync#ResourceConflictException": return [3, 14];
|
|
1702
|
+
case "ResourceNotFoundException": return [3, 16];
|
|
1703
|
+
case "com.amazonaws.cognitosync#ResourceNotFoundException": return [3, 16];
|
|
1704
|
+
case "TooManyRequestsException": return [3, 18];
|
|
1705
|
+
case "com.amazonaws.cognitosync#TooManyRequestsException": return [3, 18];
|
|
1706
|
+
}
|
|
1707
|
+
return [3, 20];
|
|
1708
|
+
case 2: return [4, deserializeAws_restJson1InternalErrorExceptionResponse(parsedOutput, context)];
|
|
1709
|
+
case 3: throw _d.sent();
|
|
1710
|
+
case 4: return [4, deserializeAws_restJson1InvalidLambdaFunctionOutputExceptionResponse(parsedOutput, context)];
|
|
1711
|
+
case 5: throw _d.sent();
|
|
1712
|
+
case 6: return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1713
|
+
case 7: throw _d.sent();
|
|
1714
|
+
case 8: return [4, deserializeAws_restJson1LambdaThrottledExceptionResponse(parsedOutput, context)];
|
|
1715
|
+
case 9: throw _d.sent();
|
|
1716
|
+
case 10: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1717
|
+
case 11: throw _d.sent();
|
|
1718
|
+
case 12: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
1719
|
+
case 13: throw _d.sent();
|
|
1720
|
+
case 14: return [4, deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
1721
|
+
case 15: throw _d.sent();
|
|
1722
|
+
case 16: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1723
|
+
case 17: throw _d.sent();
|
|
1724
|
+
case 18: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1725
|
+
case 19: throw _d.sent();
|
|
1726
|
+
case 20:
|
|
1727
|
+
parsedBody = parsedOutput.body;
|
|
1728
|
+
throwDefaultError({
|
|
1729
|
+
output: output,
|
|
1730
|
+
parsedBody: parsedBody,
|
|
1731
|
+
exceptionCtor: __BaseException,
|
|
1732
|
+
errorCode: errorCode,
|
|
1733
|
+
});
|
|
1734
|
+
_d.label = 21;
|
|
1735
|
+
case 21: return [2];
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
}); };
|
|
1739
|
+
var map = __map;
|
|
1740
|
+
var deserializeAws_restJson1AlreadyStreamedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1741
|
+
var contents, data, exception;
|
|
1742
|
+
return __generator(this, function (_a) {
|
|
1743
|
+
contents = map({});
|
|
1744
|
+
data = parsedOutput.body;
|
|
1745
|
+
if (data.message != null) {
|
|
1746
|
+
contents.message = __expectString(data.message);
|
|
1747
|
+
}
|
|
1748
|
+
exception = new AlreadyStreamedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1749
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1750
|
+
});
|
|
1751
|
+
}); };
|
|
1752
|
+
var deserializeAws_restJson1ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1753
|
+
var contents, data, exception;
|
|
1754
|
+
return __generator(this, function (_a) {
|
|
1755
|
+
contents = map({});
|
|
1756
|
+
data = parsedOutput.body;
|
|
1757
|
+
if (data.message != null) {
|
|
1758
|
+
contents.message = __expectString(data.message);
|
|
1759
|
+
}
|
|
1760
|
+
exception = new ConcurrentModificationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1761
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1762
|
+
});
|
|
1763
|
+
}); };
|
|
1764
|
+
var deserializeAws_restJson1DuplicateRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1765
|
+
var contents, data, exception;
|
|
1766
|
+
return __generator(this, function (_a) {
|
|
1767
|
+
contents = map({});
|
|
1768
|
+
data = parsedOutput.body;
|
|
1769
|
+
if (data.message != null) {
|
|
1770
|
+
contents.message = __expectString(data.message);
|
|
1771
|
+
}
|
|
1772
|
+
exception = new DuplicateRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1773
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1774
|
+
});
|
|
1775
|
+
}); };
|
|
1776
|
+
var deserializeAws_restJson1InternalErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1777
|
+
var contents, data, exception;
|
|
1778
|
+
return __generator(this, function (_a) {
|
|
1779
|
+
contents = map({});
|
|
1780
|
+
data = parsedOutput.body;
|
|
1781
|
+
if (data.message != null) {
|
|
1782
|
+
contents.message = __expectString(data.message);
|
|
1783
|
+
}
|
|
1784
|
+
exception = new InternalErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1785
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1786
|
+
});
|
|
1787
|
+
}); };
|
|
1788
|
+
var deserializeAws_restJson1InvalidConfigurationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1789
|
+
var contents, data, exception;
|
|
1790
|
+
return __generator(this, function (_a) {
|
|
1791
|
+
contents = map({});
|
|
1792
|
+
data = parsedOutput.body;
|
|
1793
|
+
if (data.message != null) {
|
|
1794
|
+
contents.message = __expectString(data.message);
|
|
1795
|
+
}
|
|
1796
|
+
exception = new InvalidConfigurationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1797
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1798
|
+
});
|
|
1799
|
+
}); };
|
|
1800
|
+
var deserializeAws_restJson1InvalidLambdaFunctionOutputExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1801
|
+
var contents, data, exception;
|
|
1802
|
+
return __generator(this, function (_a) {
|
|
1803
|
+
contents = map({});
|
|
1804
|
+
data = parsedOutput.body;
|
|
1805
|
+
if (data.message != null) {
|
|
1806
|
+
contents.message = __expectString(data.message);
|
|
1807
|
+
}
|
|
1808
|
+
exception = new InvalidLambdaFunctionOutputException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1809
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1810
|
+
});
|
|
1811
|
+
}); };
|
|
1812
|
+
var deserializeAws_restJson1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1813
|
+
var contents, data, exception;
|
|
1814
|
+
return __generator(this, function (_a) {
|
|
1815
|
+
contents = map({});
|
|
1816
|
+
data = parsedOutput.body;
|
|
1817
|
+
if (data.message != null) {
|
|
1818
|
+
contents.message = __expectString(data.message);
|
|
1819
|
+
}
|
|
1820
|
+
exception = new InvalidParameterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1821
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1822
|
+
});
|
|
1823
|
+
}); };
|
|
1824
|
+
var deserializeAws_restJson1LambdaThrottledExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1825
|
+
var contents, data, exception;
|
|
1826
|
+
return __generator(this, function (_a) {
|
|
1827
|
+
contents = map({});
|
|
1828
|
+
data = parsedOutput.body;
|
|
1829
|
+
if (data.message != null) {
|
|
1830
|
+
contents.message = __expectString(data.message);
|
|
1831
|
+
}
|
|
1832
|
+
exception = new LambdaThrottledException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1833
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1834
|
+
});
|
|
1835
|
+
}); };
|
|
1836
|
+
var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1837
|
+
var contents, data, exception;
|
|
1838
|
+
return __generator(this, function (_a) {
|
|
1839
|
+
contents = map({});
|
|
1840
|
+
data = parsedOutput.body;
|
|
1841
|
+
if (data.message != null) {
|
|
1842
|
+
contents.message = __expectString(data.message);
|
|
1843
|
+
}
|
|
1844
|
+
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1845
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1846
|
+
});
|
|
1847
|
+
}); };
|
|
1848
|
+
var deserializeAws_restJson1NotAuthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1849
|
+
var contents, data, exception;
|
|
1850
|
+
return __generator(this, function (_a) {
|
|
1851
|
+
contents = map({});
|
|
1852
|
+
data = parsedOutput.body;
|
|
1853
|
+
if (data.message != null) {
|
|
1854
|
+
contents.message = __expectString(data.message);
|
|
1855
|
+
}
|
|
1856
|
+
exception = new NotAuthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1857
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1858
|
+
});
|
|
1859
|
+
}); };
|
|
1860
|
+
var deserializeAws_restJson1ResourceConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1861
|
+
var contents, data, exception;
|
|
1862
|
+
return __generator(this, function (_a) {
|
|
1863
|
+
contents = map({});
|
|
1864
|
+
data = parsedOutput.body;
|
|
1865
|
+
if (data.message != null) {
|
|
1866
|
+
contents.message = __expectString(data.message);
|
|
1867
|
+
}
|
|
1868
|
+
exception = new ResourceConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1869
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1870
|
+
});
|
|
1871
|
+
}); };
|
|
1872
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1873
|
+
var contents, data, exception;
|
|
1874
|
+
return __generator(this, function (_a) {
|
|
1875
|
+
contents = map({});
|
|
1876
|
+
data = parsedOutput.body;
|
|
1877
|
+
if (data.message != null) {
|
|
1878
|
+
contents.message = __expectString(data.message);
|
|
1879
|
+
}
|
|
1880
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1881
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1882
|
+
});
|
|
1883
|
+
}); };
|
|
1884
|
+
var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1885
|
+
var contents, data, exception;
|
|
1886
|
+
return __generator(this, function (_a) {
|
|
1887
|
+
contents = map({});
|
|
1888
|
+
data = parsedOutput.body;
|
|
1889
|
+
if (data.message != null) {
|
|
1890
|
+
contents.message = __expectString(data.message);
|
|
1891
|
+
}
|
|
1892
|
+
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1893
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1894
|
+
});
|
|
1895
|
+
}); };
|
|
1896
|
+
var serializeAws_restJson1ApplicationArnList = function (input, context) {
|
|
1347
1897
|
return input
|
|
1348
|
-
.filter((e)
|
|
1349
|
-
.map((entry)
|
|
1898
|
+
.filter(function (e) { return e != null; })
|
|
1899
|
+
.map(function (entry) {
|
|
1350
1900
|
return entry;
|
|
1351
1901
|
});
|
|
1352
1902
|
};
|
|
1353
|
-
|
|
1354
|
-
return {
|
|
1355
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
1356
|
-
...(input.StreamName != null && { StreamName: input.StreamName }),
|
|
1357
|
-
...(input.StreamingStatus != null && { StreamingStatus: input.StreamingStatus }),
|
|
1358
|
-
};
|
|
1903
|
+
var serializeAws_restJson1CognitoStreams = function (input, context) {
|
|
1904
|
+
return __assign(__assign(__assign({}, (input.RoleArn != null && { RoleArn: input.RoleArn })), (input.StreamName != null && { StreamName: input.StreamName })), (input.StreamingStatus != null && { StreamingStatus: input.StreamingStatus }));
|
|
1359
1905
|
};
|
|
1360
|
-
|
|
1361
|
-
return Object.entries(input).reduce((acc,
|
|
1906
|
+
var serializeAws_restJson1Events = function (input, context) {
|
|
1907
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
1908
|
+
var _b;
|
|
1909
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1362
1910
|
if (value === null) {
|
|
1363
1911
|
return acc;
|
|
1364
1912
|
}
|
|
1365
|
-
return {
|
|
1366
|
-
...acc,
|
|
1367
|
-
[key]: value,
|
|
1368
|
-
};
|
|
1913
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
1369
1914
|
}, {});
|
|
1370
1915
|
};
|
|
1371
|
-
|
|
1372
|
-
return {
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
}),
|
|
1376
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
1377
|
-
};
|
|
1916
|
+
var serializeAws_restJson1PushSync = function (input, context) {
|
|
1917
|
+
return __assign(__assign({}, (input.ApplicationArns != null && {
|
|
1918
|
+
ApplicationArns: serializeAws_restJson1ApplicationArnList(input.ApplicationArns, context),
|
|
1919
|
+
})), (input.RoleArn != null && { RoleArn: input.RoleArn }));
|
|
1378
1920
|
};
|
|
1379
|
-
|
|
1380
|
-
return {
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
}),
|
|
1384
|
-
...(input.Key != null && { Key: input.Key }),
|
|
1385
|
-
...(input.Op != null && { Op: input.Op }),
|
|
1386
|
-
...(input.SyncCount != null && { SyncCount: input.SyncCount }),
|
|
1387
|
-
...(input.Value != null && { Value: input.Value }),
|
|
1388
|
-
};
|
|
1921
|
+
var serializeAws_restJson1RecordPatch = function (input, context) {
|
|
1922
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.DeviceLastModifiedDate != null && {
|
|
1923
|
+
DeviceLastModifiedDate: Math.round(input.DeviceLastModifiedDate.getTime() / 1000),
|
|
1924
|
+
})), (input.Key != null && { Key: input.Key })), (input.Op != null && { Op: input.Op })), (input.SyncCount != null && { SyncCount: input.SyncCount })), (input.Value != null && { Value: input.Value }));
|
|
1389
1925
|
};
|
|
1390
|
-
|
|
1926
|
+
var serializeAws_restJson1RecordPatchList = function (input, context) {
|
|
1391
1927
|
return input
|
|
1392
|
-
.filter((e)
|
|
1393
|
-
.map((entry)
|
|
1928
|
+
.filter(function (e) { return e != null; })
|
|
1929
|
+
.map(function (entry) {
|
|
1394
1930
|
return serializeAws_restJson1RecordPatch(entry, context);
|
|
1395
1931
|
});
|
|
1396
1932
|
};
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
.filter((e)
|
|
1400
|
-
.map((entry)
|
|
1933
|
+
var deserializeAws_restJson1ApplicationArnList = function (output, context) {
|
|
1934
|
+
var retVal = (output || [])
|
|
1935
|
+
.filter(function (e) { return e != null; })
|
|
1936
|
+
.map(function (entry) {
|
|
1401
1937
|
if (entry === null) {
|
|
1402
1938
|
return null;
|
|
1403
1939
|
}
|
|
@@ -1405,14 +1941,14 @@ const deserializeAws_restJson1ApplicationArnList = (output, context) => {
|
|
|
1405
1941
|
});
|
|
1406
1942
|
return retVal;
|
|
1407
1943
|
};
|
|
1408
|
-
|
|
1944
|
+
var deserializeAws_restJson1CognitoStreams = function (output, context) {
|
|
1409
1945
|
return {
|
|
1410
1946
|
RoleArn: __expectString(output.RoleArn),
|
|
1411
1947
|
StreamName: __expectString(output.StreamName),
|
|
1412
1948
|
StreamingStatus: __expectString(output.StreamingStatus),
|
|
1413
1949
|
};
|
|
1414
1950
|
};
|
|
1415
|
-
|
|
1951
|
+
var deserializeAws_restJson1Dataset = function (output, context) {
|
|
1416
1952
|
return {
|
|
1417
1953
|
CreationDate: output.CreationDate != null
|
|
1418
1954
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
|
|
@@ -1427,10 +1963,10 @@ const deserializeAws_restJson1Dataset = (output, context) => {
|
|
|
1427
1963
|
NumRecords: __expectLong(output.NumRecords),
|
|
1428
1964
|
};
|
|
1429
1965
|
};
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
.filter((e)
|
|
1433
|
-
.map((entry)
|
|
1966
|
+
var deserializeAws_restJson1DatasetList = function (output, context) {
|
|
1967
|
+
var retVal = (output || [])
|
|
1968
|
+
.filter(function (e) { return e != null; })
|
|
1969
|
+
.map(function (entry) {
|
|
1434
1970
|
if (entry === null) {
|
|
1435
1971
|
return null;
|
|
1436
1972
|
}
|
|
@@ -1438,18 +1974,17 @@ const deserializeAws_restJson1DatasetList = (output, context) => {
|
|
|
1438
1974
|
});
|
|
1439
1975
|
return retVal;
|
|
1440
1976
|
};
|
|
1441
|
-
|
|
1442
|
-
return Object.entries(output).reduce((acc,
|
|
1977
|
+
var deserializeAws_restJson1Events = function (output, context) {
|
|
1978
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
1979
|
+
var _b;
|
|
1980
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1443
1981
|
if (value === null) {
|
|
1444
1982
|
return acc;
|
|
1445
1983
|
}
|
|
1446
|
-
return {
|
|
1447
|
-
...acc,
|
|
1448
|
-
[key]: __expectString(value),
|
|
1449
|
-
};
|
|
1984
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
1450
1985
|
}, {});
|
|
1451
1986
|
};
|
|
1452
|
-
|
|
1987
|
+
var deserializeAws_restJson1IdentityPoolUsage = function (output, context) {
|
|
1453
1988
|
return {
|
|
1454
1989
|
DataStorage: __expectLong(output.DataStorage),
|
|
1455
1990
|
IdentityPoolId: __expectString(output.IdentityPoolId),
|
|
@@ -1459,10 +1994,10 @@ const deserializeAws_restJson1IdentityPoolUsage = (output, context) => {
|
|
|
1459
1994
|
SyncSessionsCount: __expectLong(output.SyncSessionsCount),
|
|
1460
1995
|
};
|
|
1461
1996
|
};
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
.filter((e)
|
|
1465
|
-
.map((entry)
|
|
1997
|
+
var deserializeAws_restJson1IdentityPoolUsageList = function (output, context) {
|
|
1998
|
+
var retVal = (output || [])
|
|
1999
|
+
.filter(function (e) { return e != null; })
|
|
2000
|
+
.map(function (entry) {
|
|
1466
2001
|
if (entry === null) {
|
|
1467
2002
|
return null;
|
|
1468
2003
|
}
|
|
@@ -1470,7 +2005,7 @@ const deserializeAws_restJson1IdentityPoolUsageList = (output, context) => {
|
|
|
1470
2005
|
});
|
|
1471
2006
|
return retVal;
|
|
1472
2007
|
};
|
|
1473
|
-
|
|
2008
|
+
var deserializeAws_restJson1IdentityUsage = function (output, context) {
|
|
1474
2009
|
return {
|
|
1475
2010
|
DataStorage: __expectLong(output.DataStorage),
|
|
1476
2011
|
DatasetCount: __expectInt32(output.DatasetCount),
|
|
@@ -1481,10 +2016,10 @@ const deserializeAws_restJson1IdentityUsage = (output, context) => {
|
|
|
1481
2016
|
: undefined,
|
|
1482
2017
|
};
|
|
1483
2018
|
};
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
.filter((e)
|
|
1487
|
-
.map((entry)
|
|
2019
|
+
var deserializeAws_restJson1MergedDatasetNameList = function (output, context) {
|
|
2020
|
+
var retVal = (output || [])
|
|
2021
|
+
.filter(function (e) { return e != null; })
|
|
2022
|
+
.map(function (entry) {
|
|
1488
2023
|
if (entry === null) {
|
|
1489
2024
|
return null;
|
|
1490
2025
|
}
|
|
@@ -1492,7 +2027,7 @@ const deserializeAws_restJson1MergedDatasetNameList = (output, context) => {
|
|
|
1492
2027
|
});
|
|
1493
2028
|
return retVal;
|
|
1494
2029
|
};
|
|
1495
|
-
|
|
2030
|
+
var deserializeAws_restJson1PushSync = function (output, context) {
|
|
1496
2031
|
return {
|
|
1497
2032
|
ApplicationArns: output.ApplicationArns != null
|
|
1498
2033
|
? deserializeAws_restJson1ApplicationArnList(output.ApplicationArns, context)
|
|
@@ -1500,7 +2035,7 @@ const deserializeAws_restJson1PushSync = (output, context) => {
|
|
|
1500
2035
|
RoleArn: __expectString(output.RoleArn),
|
|
1501
2036
|
};
|
|
1502
2037
|
};
|
|
1503
|
-
|
|
2038
|
+
var deserializeAws_restJson1_Record = function (output, context) {
|
|
1504
2039
|
return {
|
|
1505
2040
|
DeviceLastModifiedDate: output.DeviceLastModifiedDate != null
|
|
1506
2041
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceLastModifiedDate)))
|
|
@@ -1514,10 +2049,10 @@ const deserializeAws_restJson1_Record = (output, context) => {
|
|
|
1514
2049
|
Value: __expectString(output.Value),
|
|
1515
2050
|
};
|
|
1516
2051
|
};
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
.filter((e)
|
|
1520
|
-
.map((entry)
|
|
2052
|
+
var deserializeAws_restJson1RecordList = function (output, context) {
|
|
2053
|
+
var retVal = (output || [])
|
|
2054
|
+
.filter(function (e) { return e != null; })
|
|
2055
|
+
.map(function (entry) {
|
|
1521
2056
|
if (entry === null) {
|
|
1522
2057
|
return null;
|
|
1523
2058
|
}
|
|
@@ -1525,39 +2060,57 @@ const deserializeAws_restJson1RecordList = (output, context) => {
|
|
|
1525
2060
|
});
|
|
1526
2061
|
return retVal;
|
|
1527
2062
|
};
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
2063
|
+
var deserializeMetadata = function (output) {
|
|
2064
|
+
var _a, _b;
|
|
2065
|
+
return ({
|
|
2066
|
+
httpStatusCode: output.statusCode,
|
|
2067
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
2068
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2069
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
2070
|
+
});
|
|
2071
|
+
};
|
|
2072
|
+
var collectBody = function (streamBody, context) {
|
|
2073
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1535
2074
|
if (streamBody instanceof Uint8Array) {
|
|
1536
2075
|
return Promise.resolve(streamBody);
|
|
1537
2076
|
}
|
|
1538
2077
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1539
2078
|
};
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
2079
|
+
var collectBodyString = function (streamBody, context) {
|
|
2080
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
2081
|
+
};
|
|
2082
|
+
var isSerializableHeaderValue = function (value) {
|
|
2083
|
+
return value !== undefined &&
|
|
2084
|
+
value !== null &&
|
|
2085
|
+
value !== "" &&
|
|
2086
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2087
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2088
|
+
};
|
|
2089
|
+
var parseBody = function (streamBody, context) {
|
|
2090
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
2091
|
+
if (encoded.length) {
|
|
2092
|
+
return JSON.parse(encoded);
|
|
2093
|
+
}
|
|
2094
|
+
return {};
|
|
2095
|
+
});
|
|
1556
2096
|
};
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
2097
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2098
|
+
var value;
|
|
2099
|
+
var _a;
|
|
2100
|
+
return __generator(this, function (_b) {
|
|
2101
|
+
switch (_b.label) {
|
|
2102
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
2103
|
+
case 1:
|
|
2104
|
+
value = _b.sent();
|
|
2105
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2106
|
+
return [2, value];
|
|
2107
|
+
}
|
|
2108
|
+
});
|
|
2109
|
+
}); };
|
|
2110
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
2111
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2112
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
2113
|
+
var cleanValue = rawValue;
|
|
1561
2114
|
if (typeof cleanValue === "number") {
|
|
1562
2115
|
cleanValue = cleanValue.toString();
|
|
1563
2116
|
}
|
|
@@ -1572,7 +2125,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1572
2125
|
}
|
|
1573
2126
|
return cleanValue;
|
|
1574
2127
|
};
|
|
1575
|
-
|
|
2128
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1576
2129
|
if (headerKey !== undefined) {
|
|
1577
2130
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1578
2131
|
}
|