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