@aws-sdk/client-license-manager-user-subscriptions 3.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/dist-cjs/LicenseManagerUserSubscriptions.js +157 -0
- package/dist-cjs/LicenseManagerUserSubscriptionsClient.js +37 -0
- package/dist-cjs/commands/AssociateUserCommand.js +36 -0
- package/dist-cjs/commands/DeregisterIdentityProviderCommand.js +36 -0
- package/dist-cjs/commands/DisassociateUserCommand.js +36 -0
- package/dist-cjs/commands/ListIdentityProvidersCommand.js +36 -0
- package/dist-cjs/commands/ListInstancesCommand.js +36 -0
- package/dist-cjs/commands/ListProductSubscriptionsCommand.js +36 -0
- package/dist-cjs/commands/ListUserAssociationsCommand.js +36 -0
- package/dist-cjs/commands/RegisterIdentityProviderCommand.js +36 -0
- package/dist-cjs/commands/StartProductSubscriptionCommand.js +36 -0
- package/dist-cjs/commands/StopProductSubscriptionCommand.js +36 -0
- package/dist-cjs/commands/index.js +13 -0
- package/dist-cjs/endpoints.js +168 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/LicenseManagerUserSubscriptionsServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +250 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListIdentityProvidersPaginator.js +36 -0
- package/dist-cjs/pagination/ListInstancesPaginator.js +36 -0
- package/dist-cjs/pagination/ListProductSubscriptionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListUserAssociationsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +8 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1072 -0
- package/dist-cjs/runtimeConfig.browser.js +45 -0
- package/dist-cjs/runtimeConfig.js +52 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/LicenseManagerUserSubscriptions.js +160 -0
- package/dist-es/LicenseManagerUserSubscriptionsClient.js +39 -0
- package/dist-es/commands/AssociateUserCommand.js +39 -0
- package/dist-es/commands/DeregisterIdentityProviderCommand.js +39 -0
- package/dist-es/commands/DisassociateUserCommand.js +39 -0
- package/dist-es/commands/ListIdentityProvidersCommand.js +39 -0
- package/dist-es/commands/ListInstancesCommand.js +39 -0
- package/dist-es/commands/ListProductSubscriptionsCommand.js +39 -0
- package/dist-es/commands/ListUserAssociationsCommand.js +39 -0
- package/dist-es/commands/RegisterIdentityProviderCommand.js +39 -0
- package/dist-es/commands/StartProductSubscriptionCommand.js +39 -0
- package/dist-es/commands/StopProductSubscriptionCommand.js +39 -0
- package/dist-es/commands/index.js +10 -0
- package/dist-es/endpoints.js +164 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/LicenseManagerUserSubscriptionsServiceException.js +12 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +145 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListIdentityProvidersPaginator.js +75 -0
- package/dist-es/pagination/ListInstancesPaginator.js +75 -0
- package/dist-es/pagination/ListProductSubscriptionsPaginator.js +75 -0
- package/dist-es/pagination/ListUserAssociationsPaginator.js +75 -0
- package/dist-es/pagination/index.js +5 -0
- package/dist-es/protocols/Aws_restJson1.js +1356 -0
- package/dist-es/runtimeConfig.browser.js +26 -0
- package/dist-es/runtimeConfig.js +30 -0
- package/dist-es/runtimeConfig.native.js +8 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/LicenseManagerUserSubscriptions.d.ts +77 -0
- package/dist-types/LicenseManagerUserSubscriptionsClient.d.ts +154 -0
- package/dist-types/commands/AssociateUserCommand.d.ts +35 -0
- package/dist-types/commands/DeregisterIdentityProviderCommand.d.ts +35 -0
- package/dist-types/commands/DisassociateUserCommand.d.ts +35 -0
- package/dist-types/commands/ListIdentityProvidersCommand.d.ts +35 -0
- package/dist-types/commands/ListInstancesCommand.d.ts +35 -0
- package/dist-types/commands/ListProductSubscriptionsCommand.d.ts +35 -0
- package/dist-types/commands/ListUserAssociationsCommand.d.ts +35 -0
- package/dist-types/commands/RegisterIdentityProviderCommand.d.ts +35 -0
- package/dist-types/commands/StartProductSubscriptionCommand.d.ts +35 -0
- package/dist-types/commands/StopProductSubscriptionCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +10 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/LicenseManagerUserSubscriptionsServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +596 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListIdentityProvidersPaginator.d.ts +4 -0
- package/dist-types/pagination/ListInstancesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListProductSubscriptionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListUserAssociationsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +5 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +32 -0
- package/dist-types/runtimeConfig.browser.d.ts +40 -0
- package/dist-types/runtimeConfig.d.ts +40 -0
- package/dist-types/runtimeConfig.native.d.ts +39 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/LicenseManagerUserSubscriptions.d.ts +55 -0
- package/dist-types/ts3.4/LicenseManagerUserSubscriptionsClient.d.ts +83 -0
- package/dist-types/ts3.4/commands/AssociateUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeregisterIdentityProviderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociateUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListIdentityProvidersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListInstancesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListProductSubscriptionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListUserAssociationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RegisterIdentityProviderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartProductSubscriptionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopProductSubscriptionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +10 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/LicenseManagerUserSubscriptionsServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +340 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListIdentityProvidersPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListInstancesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListProductSubscriptionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListUserAssociationsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +5 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +32 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +94 -0
|
@@ -0,0 +1,1072 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeAws_restJson1StopProductSubscriptionCommand = exports.deserializeAws_restJson1StartProductSubscriptionCommand = exports.deserializeAws_restJson1RegisterIdentityProviderCommand = exports.deserializeAws_restJson1ListUserAssociationsCommand = exports.deserializeAws_restJson1ListProductSubscriptionsCommand = exports.deserializeAws_restJson1ListInstancesCommand = exports.deserializeAws_restJson1ListIdentityProvidersCommand = exports.deserializeAws_restJson1DisassociateUserCommand = exports.deserializeAws_restJson1DeregisterIdentityProviderCommand = exports.deserializeAws_restJson1AssociateUserCommand = exports.serializeAws_restJson1StopProductSubscriptionCommand = exports.serializeAws_restJson1StartProductSubscriptionCommand = exports.serializeAws_restJson1RegisterIdentityProviderCommand = exports.serializeAws_restJson1ListUserAssociationsCommand = exports.serializeAws_restJson1ListProductSubscriptionsCommand = exports.serializeAws_restJson1ListInstancesCommand = exports.serializeAws_restJson1ListIdentityProvidersCommand = exports.serializeAws_restJson1DisassociateUserCommand = exports.serializeAws_restJson1DeregisterIdentityProviderCommand = exports.serializeAws_restJson1AssociateUserCommand = void 0;
|
|
4
|
+
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const LicenseManagerUserSubscriptionsServiceException_1 = require("../models/LicenseManagerUserSubscriptionsServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const serializeAws_restJson1AssociateUserCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
};
|
|
13
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/AssociateUser";
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify({
|
|
16
|
+
...(input.Domain != null && { Domain: input.Domain }),
|
|
17
|
+
...(input.IdentityProvider != null && {
|
|
18
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
19
|
+
}),
|
|
20
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
21
|
+
...(input.Username != null && { Username: input.Username }),
|
|
22
|
+
});
|
|
23
|
+
return new protocol_http_1.HttpRequest({
|
|
24
|
+
protocol,
|
|
25
|
+
hostname,
|
|
26
|
+
port,
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
exports.serializeAws_restJson1AssociateUserCommand = serializeAws_restJson1AssociateUserCommand;
|
|
34
|
+
const serializeAws_restJson1DeregisterIdentityProviderCommand = async (input, context) => {
|
|
35
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
36
|
+
const headers = {
|
|
37
|
+
"content-type": "application/json",
|
|
38
|
+
};
|
|
39
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
40
|
+
"/identity-provider/DeregisterIdentityProvider";
|
|
41
|
+
let body;
|
|
42
|
+
body = JSON.stringify({
|
|
43
|
+
...(input.IdentityProvider != null && {
|
|
44
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
45
|
+
}),
|
|
46
|
+
...(input.Product != null && { Product: input.Product }),
|
|
47
|
+
});
|
|
48
|
+
return new protocol_http_1.HttpRequest({
|
|
49
|
+
protocol,
|
|
50
|
+
hostname,
|
|
51
|
+
port,
|
|
52
|
+
method: "POST",
|
|
53
|
+
headers,
|
|
54
|
+
path: resolvedPath,
|
|
55
|
+
body,
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
exports.serializeAws_restJson1DeregisterIdentityProviderCommand = serializeAws_restJson1DeregisterIdentityProviderCommand;
|
|
59
|
+
const serializeAws_restJson1DisassociateUserCommand = async (input, context) => {
|
|
60
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
61
|
+
const headers = {
|
|
62
|
+
"content-type": "application/json",
|
|
63
|
+
};
|
|
64
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/DisassociateUser";
|
|
65
|
+
let body;
|
|
66
|
+
body = JSON.stringify({
|
|
67
|
+
...(input.Domain != null && { Domain: input.Domain }),
|
|
68
|
+
...(input.IdentityProvider != null && {
|
|
69
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
70
|
+
}),
|
|
71
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
72
|
+
...(input.Username != null && { Username: input.Username }),
|
|
73
|
+
});
|
|
74
|
+
return new protocol_http_1.HttpRequest({
|
|
75
|
+
protocol,
|
|
76
|
+
hostname,
|
|
77
|
+
port,
|
|
78
|
+
method: "POST",
|
|
79
|
+
headers,
|
|
80
|
+
path: resolvedPath,
|
|
81
|
+
body,
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
exports.serializeAws_restJson1DisassociateUserCommand = serializeAws_restJson1DisassociateUserCommand;
|
|
85
|
+
const serializeAws_restJson1ListIdentityProvidersCommand = async (input, context) => {
|
|
86
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
87
|
+
const headers = {
|
|
88
|
+
"content-type": "application/json",
|
|
89
|
+
};
|
|
90
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/identity-provider/ListIdentityProviders";
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify({
|
|
93
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
94
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
95
|
+
});
|
|
96
|
+
return new protocol_http_1.HttpRequest({
|
|
97
|
+
protocol,
|
|
98
|
+
hostname,
|
|
99
|
+
port,
|
|
100
|
+
method: "POST",
|
|
101
|
+
headers,
|
|
102
|
+
path: resolvedPath,
|
|
103
|
+
body,
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
exports.serializeAws_restJson1ListIdentityProvidersCommand = serializeAws_restJson1ListIdentityProvidersCommand;
|
|
107
|
+
const serializeAws_restJson1ListInstancesCommand = async (input, context) => {
|
|
108
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
109
|
+
const headers = {
|
|
110
|
+
"content-type": "application/json",
|
|
111
|
+
};
|
|
112
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/instance/ListInstances";
|
|
113
|
+
let body;
|
|
114
|
+
body = JSON.stringify({
|
|
115
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1FilterList(input.Filters, context) }),
|
|
116
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
117
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
118
|
+
});
|
|
119
|
+
return new protocol_http_1.HttpRequest({
|
|
120
|
+
protocol,
|
|
121
|
+
hostname,
|
|
122
|
+
port,
|
|
123
|
+
method: "POST",
|
|
124
|
+
headers,
|
|
125
|
+
path: resolvedPath,
|
|
126
|
+
body,
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
exports.serializeAws_restJson1ListInstancesCommand = serializeAws_restJson1ListInstancesCommand;
|
|
130
|
+
const serializeAws_restJson1ListProductSubscriptionsCommand = async (input, context) => {
|
|
131
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
132
|
+
const headers = {
|
|
133
|
+
"content-type": "application/json",
|
|
134
|
+
};
|
|
135
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/ListProductSubscriptions";
|
|
136
|
+
let body;
|
|
137
|
+
body = JSON.stringify({
|
|
138
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1FilterList(input.Filters, context) }),
|
|
139
|
+
...(input.IdentityProvider != null && {
|
|
140
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
141
|
+
}),
|
|
142
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
143
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
144
|
+
...(input.Product != null && { Product: input.Product }),
|
|
145
|
+
});
|
|
146
|
+
return new protocol_http_1.HttpRequest({
|
|
147
|
+
protocol,
|
|
148
|
+
hostname,
|
|
149
|
+
port,
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers,
|
|
152
|
+
path: resolvedPath,
|
|
153
|
+
body,
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
exports.serializeAws_restJson1ListProductSubscriptionsCommand = serializeAws_restJson1ListProductSubscriptionsCommand;
|
|
157
|
+
const serializeAws_restJson1ListUserAssociationsCommand = async (input, context) => {
|
|
158
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
159
|
+
const headers = {
|
|
160
|
+
"content-type": "application/json",
|
|
161
|
+
};
|
|
162
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/ListUserAssociations";
|
|
163
|
+
let body;
|
|
164
|
+
body = JSON.stringify({
|
|
165
|
+
...(input.Filters != null && { Filters: serializeAws_restJson1FilterList(input.Filters, context) }),
|
|
166
|
+
...(input.IdentityProvider != null && {
|
|
167
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
168
|
+
}),
|
|
169
|
+
...(input.InstanceId != null && { InstanceId: input.InstanceId }),
|
|
170
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
171
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
172
|
+
});
|
|
173
|
+
return new protocol_http_1.HttpRequest({
|
|
174
|
+
protocol,
|
|
175
|
+
hostname,
|
|
176
|
+
port,
|
|
177
|
+
method: "POST",
|
|
178
|
+
headers,
|
|
179
|
+
path: resolvedPath,
|
|
180
|
+
body,
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
exports.serializeAws_restJson1ListUserAssociationsCommand = serializeAws_restJson1ListUserAssociationsCommand;
|
|
184
|
+
const serializeAws_restJson1RegisterIdentityProviderCommand = async (input, context) => {
|
|
185
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
186
|
+
const headers = {
|
|
187
|
+
"content-type": "application/json",
|
|
188
|
+
};
|
|
189
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
190
|
+
"/identity-provider/RegisterIdentityProvider";
|
|
191
|
+
let body;
|
|
192
|
+
body = JSON.stringify({
|
|
193
|
+
...(input.IdentityProvider != null && {
|
|
194
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
195
|
+
}),
|
|
196
|
+
...(input.Product != null && { Product: input.Product }),
|
|
197
|
+
});
|
|
198
|
+
return new protocol_http_1.HttpRequest({
|
|
199
|
+
protocol,
|
|
200
|
+
hostname,
|
|
201
|
+
port,
|
|
202
|
+
method: "POST",
|
|
203
|
+
headers,
|
|
204
|
+
path: resolvedPath,
|
|
205
|
+
body,
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
exports.serializeAws_restJson1RegisterIdentityProviderCommand = serializeAws_restJson1RegisterIdentityProviderCommand;
|
|
209
|
+
const serializeAws_restJson1StartProductSubscriptionCommand = async (input, context) => {
|
|
210
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
211
|
+
const headers = {
|
|
212
|
+
"content-type": "application/json",
|
|
213
|
+
};
|
|
214
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/StartProductSubscription";
|
|
215
|
+
let body;
|
|
216
|
+
body = JSON.stringify({
|
|
217
|
+
...(input.Domain != null && { Domain: input.Domain }),
|
|
218
|
+
...(input.IdentityProvider != null && {
|
|
219
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
220
|
+
}),
|
|
221
|
+
...(input.Product != null && { Product: input.Product }),
|
|
222
|
+
...(input.Username != null && { Username: input.Username }),
|
|
223
|
+
});
|
|
224
|
+
return new protocol_http_1.HttpRequest({
|
|
225
|
+
protocol,
|
|
226
|
+
hostname,
|
|
227
|
+
port,
|
|
228
|
+
method: "POST",
|
|
229
|
+
headers,
|
|
230
|
+
path: resolvedPath,
|
|
231
|
+
body,
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
exports.serializeAws_restJson1StartProductSubscriptionCommand = serializeAws_restJson1StartProductSubscriptionCommand;
|
|
235
|
+
const serializeAws_restJson1StopProductSubscriptionCommand = async (input, context) => {
|
|
236
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
237
|
+
const headers = {
|
|
238
|
+
"content-type": "application/json",
|
|
239
|
+
};
|
|
240
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/user/StopProductSubscription";
|
|
241
|
+
let body;
|
|
242
|
+
body = JSON.stringify({
|
|
243
|
+
...(input.Domain != null && { Domain: input.Domain }),
|
|
244
|
+
...(input.IdentityProvider != null && {
|
|
245
|
+
IdentityProvider: serializeAws_restJson1IdentityProvider(input.IdentityProvider, context),
|
|
246
|
+
}),
|
|
247
|
+
...(input.Product != null && { Product: input.Product }),
|
|
248
|
+
...(input.Username != null && { Username: input.Username }),
|
|
249
|
+
});
|
|
250
|
+
return new protocol_http_1.HttpRequest({
|
|
251
|
+
protocol,
|
|
252
|
+
hostname,
|
|
253
|
+
port,
|
|
254
|
+
method: "POST",
|
|
255
|
+
headers,
|
|
256
|
+
path: resolvedPath,
|
|
257
|
+
body,
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
exports.serializeAws_restJson1StopProductSubscriptionCommand = serializeAws_restJson1StopProductSubscriptionCommand;
|
|
261
|
+
const deserializeAws_restJson1AssociateUserCommand = async (output, context) => {
|
|
262
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
263
|
+
return deserializeAws_restJson1AssociateUserCommandError(output, context);
|
|
264
|
+
}
|
|
265
|
+
const contents = map({
|
|
266
|
+
$metadata: deserializeMetadata(output),
|
|
267
|
+
});
|
|
268
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
269
|
+
if (data.InstanceUserSummary != null) {
|
|
270
|
+
contents.InstanceUserSummary = deserializeAws_restJson1InstanceUserSummary(data.InstanceUserSummary, context);
|
|
271
|
+
}
|
|
272
|
+
return contents;
|
|
273
|
+
};
|
|
274
|
+
exports.deserializeAws_restJson1AssociateUserCommand = deserializeAws_restJson1AssociateUserCommand;
|
|
275
|
+
const deserializeAws_restJson1AssociateUserCommandError = async (output, context) => {
|
|
276
|
+
const parsedOutput = {
|
|
277
|
+
...output,
|
|
278
|
+
body: await parseBody(output.body, context),
|
|
279
|
+
};
|
|
280
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
281
|
+
switch (errorCode) {
|
|
282
|
+
case "AccessDeniedException":
|
|
283
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
284
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
285
|
+
case "ConflictException":
|
|
286
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
287
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
288
|
+
case "InternalServerException":
|
|
289
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
290
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
291
|
+
case "ResourceNotFoundException":
|
|
292
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
293
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
294
|
+
case "ServiceQuotaExceededException":
|
|
295
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
296
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
297
|
+
case "ThrottlingException":
|
|
298
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
299
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
300
|
+
case "ValidationException":
|
|
301
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
302
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
303
|
+
default:
|
|
304
|
+
const parsedBody = parsedOutput.body;
|
|
305
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
306
|
+
output,
|
|
307
|
+
parsedBody,
|
|
308
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
309
|
+
errorCode,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const deserializeAws_restJson1DeregisterIdentityProviderCommand = async (output, context) => {
|
|
314
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
315
|
+
return deserializeAws_restJson1DeregisterIdentityProviderCommandError(output, context);
|
|
316
|
+
}
|
|
317
|
+
const contents = map({
|
|
318
|
+
$metadata: deserializeMetadata(output),
|
|
319
|
+
});
|
|
320
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
321
|
+
if (data.IdentityProviderSummary != null) {
|
|
322
|
+
contents.IdentityProviderSummary = deserializeAws_restJson1IdentityProviderSummary(data.IdentityProviderSummary, context);
|
|
323
|
+
}
|
|
324
|
+
return contents;
|
|
325
|
+
};
|
|
326
|
+
exports.deserializeAws_restJson1DeregisterIdentityProviderCommand = deserializeAws_restJson1DeregisterIdentityProviderCommand;
|
|
327
|
+
const deserializeAws_restJson1DeregisterIdentityProviderCommandError = async (output, context) => {
|
|
328
|
+
const parsedOutput = {
|
|
329
|
+
...output,
|
|
330
|
+
body: await parseBody(output.body, context),
|
|
331
|
+
};
|
|
332
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
333
|
+
switch (errorCode) {
|
|
334
|
+
case "AccessDeniedException":
|
|
335
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
336
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
337
|
+
case "ConflictException":
|
|
338
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
339
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
340
|
+
case "InternalServerException":
|
|
341
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
342
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
343
|
+
case "ResourceNotFoundException":
|
|
344
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
345
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
346
|
+
case "ServiceQuotaExceededException":
|
|
347
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
348
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
349
|
+
case "ThrottlingException":
|
|
350
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
351
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
352
|
+
case "ValidationException":
|
|
353
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
354
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
355
|
+
default:
|
|
356
|
+
const parsedBody = parsedOutput.body;
|
|
357
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
358
|
+
output,
|
|
359
|
+
parsedBody,
|
|
360
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
361
|
+
errorCode,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
const deserializeAws_restJson1DisassociateUserCommand = async (output, context) => {
|
|
366
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
367
|
+
return deserializeAws_restJson1DisassociateUserCommandError(output, context);
|
|
368
|
+
}
|
|
369
|
+
const contents = map({
|
|
370
|
+
$metadata: deserializeMetadata(output),
|
|
371
|
+
});
|
|
372
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
373
|
+
if (data.InstanceUserSummary != null) {
|
|
374
|
+
contents.InstanceUserSummary = deserializeAws_restJson1InstanceUserSummary(data.InstanceUserSummary, context);
|
|
375
|
+
}
|
|
376
|
+
return contents;
|
|
377
|
+
};
|
|
378
|
+
exports.deserializeAws_restJson1DisassociateUserCommand = deserializeAws_restJson1DisassociateUserCommand;
|
|
379
|
+
const deserializeAws_restJson1DisassociateUserCommandError = async (output, context) => {
|
|
380
|
+
const parsedOutput = {
|
|
381
|
+
...output,
|
|
382
|
+
body: await parseBody(output.body, context),
|
|
383
|
+
};
|
|
384
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
385
|
+
switch (errorCode) {
|
|
386
|
+
case "AccessDeniedException":
|
|
387
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
388
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
389
|
+
case "ConflictException":
|
|
390
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
391
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
392
|
+
case "InternalServerException":
|
|
393
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
394
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
395
|
+
case "ResourceNotFoundException":
|
|
396
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
397
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
398
|
+
case "ServiceQuotaExceededException":
|
|
399
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
400
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
401
|
+
case "ThrottlingException":
|
|
402
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
403
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
404
|
+
case "ValidationException":
|
|
405
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
406
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
407
|
+
default:
|
|
408
|
+
const parsedBody = parsedOutput.body;
|
|
409
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
410
|
+
output,
|
|
411
|
+
parsedBody,
|
|
412
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
413
|
+
errorCode,
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
const deserializeAws_restJson1ListIdentityProvidersCommand = async (output, context) => {
|
|
418
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
419
|
+
return deserializeAws_restJson1ListIdentityProvidersCommandError(output, context);
|
|
420
|
+
}
|
|
421
|
+
const contents = map({
|
|
422
|
+
$metadata: deserializeMetadata(output),
|
|
423
|
+
});
|
|
424
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
425
|
+
if (data.IdentityProviderSummaries != null) {
|
|
426
|
+
contents.IdentityProviderSummaries = deserializeAws_restJson1IdentityProviderSummaryList(data.IdentityProviderSummaries, context);
|
|
427
|
+
}
|
|
428
|
+
if (data.NextToken != null) {
|
|
429
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
430
|
+
}
|
|
431
|
+
return contents;
|
|
432
|
+
};
|
|
433
|
+
exports.deserializeAws_restJson1ListIdentityProvidersCommand = deserializeAws_restJson1ListIdentityProvidersCommand;
|
|
434
|
+
const deserializeAws_restJson1ListIdentityProvidersCommandError = async (output, context) => {
|
|
435
|
+
const parsedOutput = {
|
|
436
|
+
...output,
|
|
437
|
+
body: await parseBody(output.body, context),
|
|
438
|
+
};
|
|
439
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
440
|
+
switch (errorCode) {
|
|
441
|
+
case "AccessDeniedException":
|
|
442
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
443
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
444
|
+
case "ConflictException":
|
|
445
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
446
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
447
|
+
case "InternalServerException":
|
|
448
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
449
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
450
|
+
case "ResourceNotFoundException":
|
|
451
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
452
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
453
|
+
case "ServiceQuotaExceededException":
|
|
454
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
455
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
456
|
+
case "ThrottlingException":
|
|
457
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
458
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
459
|
+
case "ValidationException":
|
|
460
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
461
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
462
|
+
default:
|
|
463
|
+
const parsedBody = parsedOutput.body;
|
|
464
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
465
|
+
output,
|
|
466
|
+
parsedBody,
|
|
467
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
468
|
+
errorCode,
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
const deserializeAws_restJson1ListInstancesCommand = async (output, context) => {
|
|
473
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
474
|
+
return deserializeAws_restJson1ListInstancesCommandError(output, context);
|
|
475
|
+
}
|
|
476
|
+
const contents = map({
|
|
477
|
+
$metadata: deserializeMetadata(output),
|
|
478
|
+
});
|
|
479
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
480
|
+
if (data.InstanceSummaries != null) {
|
|
481
|
+
contents.InstanceSummaries = deserializeAws_restJson1InstanceSummaryList(data.InstanceSummaries, context);
|
|
482
|
+
}
|
|
483
|
+
if (data.NextToken != null) {
|
|
484
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
485
|
+
}
|
|
486
|
+
return contents;
|
|
487
|
+
};
|
|
488
|
+
exports.deserializeAws_restJson1ListInstancesCommand = deserializeAws_restJson1ListInstancesCommand;
|
|
489
|
+
const deserializeAws_restJson1ListInstancesCommandError = async (output, context) => {
|
|
490
|
+
const parsedOutput = {
|
|
491
|
+
...output,
|
|
492
|
+
body: await parseBody(output.body, context),
|
|
493
|
+
};
|
|
494
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
495
|
+
switch (errorCode) {
|
|
496
|
+
case "AccessDeniedException":
|
|
497
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
498
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
499
|
+
case "ConflictException":
|
|
500
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
501
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
502
|
+
case "InternalServerException":
|
|
503
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
504
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
505
|
+
case "ResourceNotFoundException":
|
|
506
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
507
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
508
|
+
case "ServiceQuotaExceededException":
|
|
509
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
510
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
511
|
+
case "ThrottlingException":
|
|
512
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
513
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
514
|
+
case "ValidationException":
|
|
515
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
516
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
517
|
+
default:
|
|
518
|
+
const parsedBody = parsedOutput.body;
|
|
519
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
520
|
+
output,
|
|
521
|
+
parsedBody,
|
|
522
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
523
|
+
errorCode,
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
const deserializeAws_restJson1ListProductSubscriptionsCommand = async (output, context) => {
|
|
528
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
529
|
+
return deserializeAws_restJson1ListProductSubscriptionsCommandError(output, context);
|
|
530
|
+
}
|
|
531
|
+
const contents = map({
|
|
532
|
+
$metadata: deserializeMetadata(output),
|
|
533
|
+
});
|
|
534
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
535
|
+
if (data.NextToken != null) {
|
|
536
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
537
|
+
}
|
|
538
|
+
if (data.ProductUserSummaries != null) {
|
|
539
|
+
contents.ProductUserSummaries = deserializeAws_restJson1ProductUserSummaryList(data.ProductUserSummaries, context);
|
|
540
|
+
}
|
|
541
|
+
return contents;
|
|
542
|
+
};
|
|
543
|
+
exports.deserializeAws_restJson1ListProductSubscriptionsCommand = deserializeAws_restJson1ListProductSubscriptionsCommand;
|
|
544
|
+
const deserializeAws_restJson1ListProductSubscriptionsCommandError = async (output, context) => {
|
|
545
|
+
const parsedOutput = {
|
|
546
|
+
...output,
|
|
547
|
+
body: await parseBody(output.body, context),
|
|
548
|
+
};
|
|
549
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
550
|
+
switch (errorCode) {
|
|
551
|
+
case "AccessDeniedException":
|
|
552
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
553
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
554
|
+
case "ConflictException":
|
|
555
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
556
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
557
|
+
case "InternalServerException":
|
|
558
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
559
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
560
|
+
case "ResourceNotFoundException":
|
|
561
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
562
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
563
|
+
case "ServiceQuotaExceededException":
|
|
564
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
565
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
566
|
+
case "ThrottlingException":
|
|
567
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
568
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
569
|
+
case "ValidationException":
|
|
570
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
571
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
572
|
+
default:
|
|
573
|
+
const parsedBody = parsedOutput.body;
|
|
574
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
575
|
+
output,
|
|
576
|
+
parsedBody,
|
|
577
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
578
|
+
errorCode,
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
const deserializeAws_restJson1ListUserAssociationsCommand = async (output, context) => {
|
|
583
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
584
|
+
return deserializeAws_restJson1ListUserAssociationsCommandError(output, context);
|
|
585
|
+
}
|
|
586
|
+
const contents = map({
|
|
587
|
+
$metadata: deserializeMetadata(output),
|
|
588
|
+
});
|
|
589
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
590
|
+
if (data.InstanceUserSummaries != null) {
|
|
591
|
+
contents.InstanceUserSummaries = deserializeAws_restJson1InstanceUserSummaryList(data.InstanceUserSummaries, context);
|
|
592
|
+
}
|
|
593
|
+
if (data.NextToken != null) {
|
|
594
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
595
|
+
}
|
|
596
|
+
return contents;
|
|
597
|
+
};
|
|
598
|
+
exports.deserializeAws_restJson1ListUserAssociationsCommand = deserializeAws_restJson1ListUserAssociationsCommand;
|
|
599
|
+
const deserializeAws_restJson1ListUserAssociationsCommandError = async (output, context) => {
|
|
600
|
+
const parsedOutput = {
|
|
601
|
+
...output,
|
|
602
|
+
body: await parseBody(output.body, context),
|
|
603
|
+
};
|
|
604
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
605
|
+
switch (errorCode) {
|
|
606
|
+
case "AccessDeniedException":
|
|
607
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
608
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
609
|
+
case "ConflictException":
|
|
610
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
611
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
612
|
+
case "InternalServerException":
|
|
613
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
614
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
615
|
+
case "ResourceNotFoundException":
|
|
616
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
617
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
618
|
+
case "ServiceQuotaExceededException":
|
|
619
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
620
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
621
|
+
case "ThrottlingException":
|
|
622
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
623
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
624
|
+
case "ValidationException":
|
|
625
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
626
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
627
|
+
default:
|
|
628
|
+
const parsedBody = parsedOutput.body;
|
|
629
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
630
|
+
output,
|
|
631
|
+
parsedBody,
|
|
632
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
633
|
+
errorCode,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
const deserializeAws_restJson1RegisterIdentityProviderCommand = async (output, context) => {
|
|
638
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
639
|
+
return deserializeAws_restJson1RegisterIdentityProviderCommandError(output, context);
|
|
640
|
+
}
|
|
641
|
+
const contents = map({
|
|
642
|
+
$metadata: deserializeMetadata(output),
|
|
643
|
+
});
|
|
644
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
645
|
+
if (data.IdentityProviderSummary != null) {
|
|
646
|
+
contents.IdentityProviderSummary = deserializeAws_restJson1IdentityProviderSummary(data.IdentityProviderSummary, context);
|
|
647
|
+
}
|
|
648
|
+
return contents;
|
|
649
|
+
};
|
|
650
|
+
exports.deserializeAws_restJson1RegisterIdentityProviderCommand = deserializeAws_restJson1RegisterIdentityProviderCommand;
|
|
651
|
+
const deserializeAws_restJson1RegisterIdentityProviderCommandError = async (output, context) => {
|
|
652
|
+
const parsedOutput = {
|
|
653
|
+
...output,
|
|
654
|
+
body: await parseBody(output.body, context),
|
|
655
|
+
};
|
|
656
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
657
|
+
switch (errorCode) {
|
|
658
|
+
case "AccessDeniedException":
|
|
659
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
660
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
661
|
+
case "ConflictException":
|
|
662
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
663
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
664
|
+
case "InternalServerException":
|
|
665
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
666
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
667
|
+
case "ResourceNotFoundException":
|
|
668
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
669
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
670
|
+
case "ServiceQuotaExceededException":
|
|
671
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
672
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
673
|
+
case "ThrottlingException":
|
|
674
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
675
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
676
|
+
case "ValidationException":
|
|
677
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
678
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
679
|
+
default:
|
|
680
|
+
const parsedBody = parsedOutput.body;
|
|
681
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
682
|
+
output,
|
|
683
|
+
parsedBody,
|
|
684
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
685
|
+
errorCode,
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
const deserializeAws_restJson1StartProductSubscriptionCommand = async (output, context) => {
|
|
690
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
691
|
+
return deserializeAws_restJson1StartProductSubscriptionCommandError(output, context);
|
|
692
|
+
}
|
|
693
|
+
const contents = map({
|
|
694
|
+
$metadata: deserializeMetadata(output),
|
|
695
|
+
});
|
|
696
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
697
|
+
if (data.ProductUserSummary != null) {
|
|
698
|
+
contents.ProductUserSummary = deserializeAws_restJson1ProductUserSummary(data.ProductUserSummary, context);
|
|
699
|
+
}
|
|
700
|
+
return contents;
|
|
701
|
+
};
|
|
702
|
+
exports.deserializeAws_restJson1StartProductSubscriptionCommand = deserializeAws_restJson1StartProductSubscriptionCommand;
|
|
703
|
+
const deserializeAws_restJson1StartProductSubscriptionCommandError = async (output, context) => {
|
|
704
|
+
const parsedOutput = {
|
|
705
|
+
...output,
|
|
706
|
+
body: await parseBody(output.body, context),
|
|
707
|
+
};
|
|
708
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
709
|
+
switch (errorCode) {
|
|
710
|
+
case "AccessDeniedException":
|
|
711
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
712
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
713
|
+
case "ConflictException":
|
|
714
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
715
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
716
|
+
case "InternalServerException":
|
|
717
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
718
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
719
|
+
case "ResourceNotFoundException":
|
|
720
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
721
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
722
|
+
case "ServiceQuotaExceededException":
|
|
723
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
724
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
725
|
+
case "ThrottlingException":
|
|
726
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
727
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
728
|
+
case "ValidationException":
|
|
729
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
730
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
731
|
+
default:
|
|
732
|
+
const parsedBody = parsedOutput.body;
|
|
733
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
734
|
+
output,
|
|
735
|
+
parsedBody,
|
|
736
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
737
|
+
errorCode,
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
const deserializeAws_restJson1StopProductSubscriptionCommand = async (output, context) => {
|
|
742
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
743
|
+
return deserializeAws_restJson1StopProductSubscriptionCommandError(output, context);
|
|
744
|
+
}
|
|
745
|
+
const contents = map({
|
|
746
|
+
$metadata: deserializeMetadata(output),
|
|
747
|
+
});
|
|
748
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
749
|
+
if (data.ProductUserSummary != null) {
|
|
750
|
+
contents.ProductUserSummary = deserializeAws_restJson1ProductUserSummary(data.ProductUserSummary, context);
|
|
751
|
+
}
|
|
752
|
+
return contents;
|
|
753
|
+
};
|
|
754
|
+
exports.deserializeAws_restJson1StopProductSubscriptionCommand = deserializeAws_restJson1StopProductSubscriptionCommand;
|
|
755
|
+
const deserializeAws_restJson1StopProductSubscriptionCommandError = async (output, context) => {
|
|
756
|
+
const parsedOutput = {
|
|
757
|
+
...output,
|
|
758
|
+
body: await parseBody(output.body, context),
|
|
759
|
+
};
|
|
760
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
761
|
+
switch (errorCode) {
|
|
762
|
+
case "AccessDeniedException":
|
|
763
|
+
case "com.amazonaws.licensemanagerusersubscriptions#AccessDeniedException":
|
|
764
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
765
|
+
case "ConflictException":
|
|
766
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ConflictException":
|
|
767
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
768
|
+
case "InternalServerException":
|
|
769
|
+
case "com.amazonaws.licensemanagerusersubscriptions#InternalServerException":
|
|
770
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
771
|
+
case "ResourceNotFoundException":
|
|
772
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ResourceNotFoundException":
|
|
773
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
774
|
+
case "ServiceQuotaExceededException":
|
|
775
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ServiceQuotaExceededException":
|
|
776
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
777
|
+
case "ThrottlingException":
|
|
778
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ThrottlingException":
|
|
779
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
780
|
+
case "ValidationException":
|
|
781
|
+
case "com.amazonaws.licensemanagerusersubscriptions#ValidationException":
|
|
782
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
783
|
+
default:
|
|
784
|
+
const parsedBody = parsedOutput.body;
|
|
785
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
786
|
+
output,
|
|
787
|
+
parsedBody,
|
|
788
|
+
exceptionCtor: LicenseManagerUserSubscriptionsServiceException_1.LicenseManagerUserSubscriptionsServiceException,
|
|
789
|
+
errorCode,
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
const map = smithy_client_1.map;
|
|
794
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
795
|
+
const contents = map({});
|
|
796
|
+
const data = parsedOutput.body;
|
|
797
|
+
if (data.message != null) {
|
|
798
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
799
|
+
}
|
|
800
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
801
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
802
|
+
...contents,
|
|
803
|
+
});
|
|
804
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
805
|
+
};
|
|
806
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
807
|
+
const contents = map({});
|
|
808
|
+
const data = parsedOutput.body;
|
|
809
|
+
if (data.message != null) {
|
|
810
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
811
|
+
}
|
|
812
|
+
const exception = new models_0_1.ConflictException({
|
|
813
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
814
|
+
...contents,
|
|
815
|
+
});
|
|
816
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
817
|
+
};
|
|
818
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
819
|
+
const contents = map({});
|
|
820
|
+
const data = parsedOutput.body;
|
|
821
|
+
if (data.message != null) {
|
|
822
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
823
|
+
}
|
|
824
|
+
const exception = new models_0_1.InternalServerException({
|
|
825
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
826
|
+
...contents,
|
|
827
|
+
});
|
|
828
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
829
|
+
};
|
|
830
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
831
|
+
const contents = map({});
|
|
832
|
+
const data = parsedOutput.body;
|
|
833
|
+
if (data.message != null) {
|
|
834
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
835
|
+
}
|
|
836
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
837
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
838
|
+
...contents,
|
|
839
|
+
});
|
|
840
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
841
|
+
};
|
|
842
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
843
|
+
const contents = map({});
|
|
844
|
+
const data = parsedOutput.body;
|
|
845
|
+
if (data.message != null) {
|
|
846
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
847
|
+
}
|
|
848
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
849
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
850
|
+
...contents,
|
|
851
|
+
});
|
|
852
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
853
|
+
};
|
|
854
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
855
|
+
const contents = map({});
|
|
856
|
+
const data = parsedOutput.body;
|
|
857
|
+
if (data.message != null) {
|
|
858
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
859
|
+
}
|
|
860
|
+
const exception = new models_0_1.ThrottlingException({
|
|
861
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
862
|
+
...contents,
|
|
863
|
+
});
|
|
864
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
865
|
+
};
|
|
866
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
867
|
+
const contents = map({});
|
|
868
|
+
const data = parsedOutput.body;
|
|
869
|
+
if (data.message != null) {
|
|
870
|
+
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
871
|
+
}
|
|
872
|
+
const exception = new models_0_1.ValidationException({
|
|
873
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
874
|
+
...contents,
|
|
875
|
+
});
|
|
876
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
877
|
+
};
|
|
878
|
+
const serializeAws_restJson1ActiveDirectoryIdentityProvider = (input, context) => {
|
|
879
|
+
return {
|
|
880
|
+
...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }),
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
const serializeAws_restJson1Filter = (input, context) => {
|
|
884
|
+
return {
|
|
885
|
+
...(input.Attribute != null && { Attribute: input.Attribute }),
|
|
886
|
+
...(input.Operation != null && { Operation: input.Operation }),
|
|
887
|
+
...(input.Value != null && { Value: input.Value }),
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
const serializeAws_restJson1FilterList = (input, context) => {
|
|
891
|
+
return input
|
|
892
|
+
.filter((e) => e != null)
|
|
893
|
+
.map((entry) => {
|
|
894
|
+
return serializeAws_restJson1Filter(entry, context);
|
|
895
|
+
});
|
|
896
|
+
};
|
|
897
|
+
const serializeAws_restJson1IdentityProvider = (input, context) => {
|
|
898
|
+
return models_0_1.IdentityProvider.visit(input, {
|
|
899
|
+
ActiveDirectoryIdentityProvider: (value) => ({
|
|
900
|
+
ActiveDirectoryIdentityProvider: serializeAws_restJson1ActiveDirectoryIdentityProvider(value, context),
|
|
901
|
+
}),
|
|
902
|
+
_: (name, value) => ({ name: value }),
|
|
903
|
+
});
|
|
904
|
+
};
|
|
905
|
+
const deserializeAws_restJson1ActiveDirectoryIdentityProvider = (output, context) => {
|
|
906
|
+
return {
|
|
907
|
+
DirectoryId: (0, smithy_client_1.expectString)(output.DirectoryId),
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
const deserializeAws_restJson1IdentityProvider = (output, context) => {
|
|
911
|
+
if (output.ActiveDirectoryIdentityProvider != null) {
|
|
912
|
+
return {
|
|
913
|
+
ActiveDirectoryIdentityProvider: deserializeAws_restJson1ActiveDirectoryIdentityProvider(output.ActiveDirectoryIdentityProvider, context),
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
return { $unknown: Object.entries(output)[0] };
|
|
917
|
+
};
|
|
918
|
+
const deserializeAws_restJson1IdentityProviderSummary = (output, context) => {
|
|
919
|
+
return {
|
|
920
|
+
FailureMessage: (0, smithy_client_1.expectString)(output.FailureMessage),
|
|
921
|
+
IdentityProvider: output.IdentityProvider != null
|
|
922
|
+
? deserializeAws_restJson1IdentityProvider((0, smithy_client_1.expectUnion)(output.IdentityProvider), context)
|
|
923
|
+
: undefined,
|
|
924
|
+
Product: (0, smithy_client_1.expectString)(output.Product),
|
|
925
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
const deserializeAws_restJson1IdentityProviderSummaryList = (output, context) => {
|
|
929
|
+
const retVal = (output || [])
|
|
930
|
+
.filter((e) => e != null)
|
|
931
|
+
.map((entry) => {
|
|
932
|
+
if (entry === null) {
|
|
933
|
+
return null;
|
|
934
|
+
}
|
|
935
|
+
return deserializeAws_restJson1IdentityProviderSummary(entry, context);
|
|
936
|
+
});
|
|
937
|
+
return retVal;
|
|
938
|
+
};
|
|
939
|
+
const deserializeAws_restJson1InstanceSummary = (output, context) => {
|
|
940
|
+
return {
|
|
941
|
+
InstanceId: (0, smithy_client_1.expectString)(output.InstanceId),
|
|
942
|
+
LastStatusCheckDate: (0, smithy_client_1.expectString)(output.LastStatusCheckDate),
|
|
943
|
+
Products: output.Products != null ? deserializeAws_restJson1StringList(output.Products, context) : undefined,
|
|
944
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
945
|
+
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
const deserializeAws_restJson1InstanceSummaryList = (output, context) => {
|
|
949
|
+
const retVal = (output || [])
|
|
950
|
+
.filter((e) => e != null)
|
|
951
|
+
.map((entry) => {
|
|
952
|
+
if (entry === null) {
|
|
953
|
+
return null;
|
|
954
|
+
}
|
|
955
|
+
return deserializeAws_restJson1InstanceSummary(entry, context);
|
|
956
|
+
});
|
|
957
|
+
return retVal;
|
|
958
|
+
};
|
|
959
|
+
const deserializeAws_restJson1InstanceUserSummary = (output, context) => {
|
|
960
|
+
return {
|
|
961
|
+
AssociationDate: (0, smithy_client_1.expectString)(output.AssociationDate),
|
|
962
|
+
DisassociationDate: (0, smithy_client_1.expectString)(output.DisassociationDate),
|
|
963
|
+
Domain: (0, smithy_client_1.expectString)(output.Domain),
|
|
964
|
+
IdentityProvider: output.IdentityProvider != null
|
|
965
|
+
? deserializeAws_restJson1IdentityProvider((0, smithy_client_1.expectUnion)(output.IdentityProvider), context)
|
|
966
|
+
: undefined,
|
|
967
|
+
InstanceId: (0, smithy_client_1.expectString)(output.InstanceId),
|
|
968
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
969
|
+
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
970
|
+
Username: (0, smithy_client_1.expectString)(output.Username),
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
const deserializeAws_restJson1InstanceUserSummaryList = (output, context) => {
|
|
974
|
+
const retVal = (output || [])
|
|
975
|
+
.filter((e) => e != null)
|
|
976
|
+
.map((entry) => {
|
|
977
|
+
if (entry === null) {
|
|
978
|
+
return null;
|
|
979
|
+
}
|
|
980
|
+
return deserializeAws_restJson1InstanceUserSummary(entry, context);
|
|
981
|
+
});
|
|
982
|
+
return retVal;
|
|
983
|
+
};
|
|
984
|
+
const deserializeAws_restJson1ProductUserSummary = (output, context) => {
|
|
985
|
+
return {
|
|
986
|
+
Domain: (0, smithy_client_1.expectString)(output.Domain),
|
|
987
|
+
IdentityProvider: output.IdentityProvider != null
|
|
988
|
+
? deserializeAws_restJson1IdentityProvider((0, smithy_client_1.expectUnion)(output.IdentityProvider), context)
|
|
989
|
+
: undefined,
|
|
990
|
+
Product: (0, smithy_client_1.expectString)(output.Product),
|
|
991
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
992
|
+
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
993
|
+
SubscriptionEndDate: (0, smithy_client_1.expectString)(output.SubscriptionEndDate),
|
|
994
|
+
SubscriptionStartDate: (0, smithy_client_1.expectString)(output.SubscriptionStartDate),
|
|
995
|
+
Username: (0, smithy_client_1.expectString)(output.Username),
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
const deserializeAws_restJson1ProductUserSummaryList = (output, context) => {
|
|
999
|
+
const retVal = (output || [])
|
|
1000
|
+
.filter((e) => e != null)
|
|
1001
|
+
.map((entry) => {
|
|
1002
|
+
if (entry === null) {
|
|
1003
|
+
return null;
|
|
1004
|
+
}
|
|
1005
|
+
return deserializeAws_restJson1ProductUserSummary(entry, context);
|
|
1006
|
+
});
|
|
1007
|
+
return retVal;
|
|
1008
|
+
};
|
|
1009
|
+
const deserializeAws_restJson1StringList = (output, context) => {
|
|
1010
|
+
const retVal = (output || [])
|
|
1011
|
+
.filter((e) => e != null)
|
|
1012
|
+
.map((entry) => {
|
|
1013
|
+
if (entry === null) {
|
|
1014
|
+
return null;
|
|
1015
|
+
}
|
|
1016
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
1017
|
+
});
|
|
1018
|
+
return retVal;
|
|
1019
|
+
};
|
|
1020
|
+
const deserializeMetadata = (output) => {
|
|
1021
|
+
var _a;
|
|
1022
|
+
return ({
|
|
1023
|
+
httpStatusCode: output.statusCode,
|
|
1024
|
+
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
|
|
1025
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1026
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1027
|
+
});
|
|
1028
|
+
};
|
|
1029
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1030
|
+
if (streamBody instanceof Uint8Array) {
|
|
1031
|
+
return Promise.resolve(streamBody);
|
|
1032
|
+
}
|
|
1033
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1034
|
+
};
|
|
1035
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1036
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1037
|
+
value !== null &&
|
|
1038
|
+
value !== "" &&
|
|
1039
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1040
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1041
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1042
|
+
if (encoded.length) {
|
|
1043
|
+
return JSON.parse(encoded);
|
|
1044
|
+
}
|
|
1045
|
+
return {};
|
|
1046
|
+
});
|
|
1047
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1048
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1049
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1050
|
+
let cleanValue = rawValue;
|
|
1051
|
+
if (typeof cleanValue === "number") {
|
|
1052
|
+
cleanValue = cleanValue.toString();
|
|
1053
|
+
}
|
|
1054
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1055
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1056
|
+
}
|
|
1057
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1058
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1059
|
+
}
|
|
1060
|
+
return cleanValue;
|
|
1061
|
+
};
|
|
1062
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1063
|
+
if (headerKey !== undefined) {
|
|
1064
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1065
|
+
}
|
|
1066
|
+
if (data.code !== undefined) {
|
|
1067
|
+
return sanitizeErrorCode(data.code);
|
|
1068
|
+
}
|
|
1069
|
+
if (data["__type"] !== undefined) {
|
|
1070
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1071
|
+
}
|
|
1072
|
+
};
|