@aws-sdk/client-workspaces-web 3.490.0 → 3.496.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.
Files changed (81) hide show
  1. package/dist-cjs/WorkSpacesWeb.js +1 -127
  2. package/dist-cjs/WorkSpacesWebClient.js +1 -43
  3. package/dist-cjs/commands/AssociateBrowserSettingsCommand.js +1 -28
  4. package/dist-cjs/commands/AssociateIpAccessSettingsCommand.js +1 -28
  5. package/dist-cjs/commands/AssociateNetworkSettingsCommand.js +1 -28
  6. package/dist-cjs/commands/AssociateTrustStoreCommand.js +1 -28
  7. package/dist-cjs/commands/AssociateUserAccessLoggingSettingsCommand.js +1 -28
  8. package/dist-cjs/commands/AssociateUserSettingsCommand.js +1 -28
  9. package/dist-cjs/commands/CreateBrowserSettingsCommand.js +1 -29
  10. package/dist-cjs/commands/CreateIdentityProviderCommand.js +1 -29
  11. package/dist-cjs/commands/CreateIpAccessSettingsCommand.js +1 -29
  12. package/dist-cjs/commands/CreateNetworkSettingsCommand.js +1 -29
  13. package/dist-cjs/commands/CreatePortalCommand.js +1 -29
  14. package/dist-cjs/commands/CreateTrustStoreCommand.js +1 -29
  15. package/dist-cjs/commands/CreateUserAccessLoggingSettingsCommand.js +1 -29
  16. package/dist-cjs/commands/CreateUserSettingsCommand.js +1 -29
  17. package/dist-cjs/commands/DeleteBrowserSettingsCommand.js +1 -28
  18. package/dist-cjs/commands/DeleteIdentityProviderCommand.js +1 -28
  19. package/dist-cjs/commands/DeleteIpAccessSettingsCommand.js +1 -28
  20. package/dist-cjs/commands/DeleteNetworkSettingsCommand.js +1 -28
  21. package/dist-cjs/commands/DeletePortalCommand.js +1 -28
  22. package/dist-cjs/commands/DeleteTrustStoreCommand.js +1 -28
  23. package/dist-cjs/commands/DeleteUserAccessLoggingSettingsCommand.js +1 -28
  24. package/dist-cjs/commands/DeleteUserSettingsCommand.js +1 -28
  25. package/dist-cjs/commands/DisassociateBrowserSettingsCommand.js +1 -28
  26. package/dist-cjs/commands/DisassociateIpAccessSettingsCommand.js +1 -28
  27. package/dist-cjs/commands/DisassociateNetworkSettingsCommand.js +1 -28
  28. package/dist-cjs/commands/DisassociateTrustStoreCommand.js +1 -28
  29. package/dist-cjs/commands/DisassociateUserAccessLoggingSettingsCommand.js +1 -28
  30. package/dist-cjs/commands/DisassociateUserSettingsCommand.js +1 -28
  31. package/dist-cjs/commands/GetBrowserSettingsCommand.js +1 -29
  32. package/dist-cjs/commands/GetIdentityProviderCommand.js +1 -29
  33. package/dist-cjs/commands/GetIpAccessSettingsCommand.js +1 -29
  34. package/dist-cjs/commands/GetNetworkSettingsCommand.js +1 -28
  35. package/dist-cjs/commands/GetPortalCommand.js +1 -29
  36. package/dist-cjs/commands/GetPortalServiceProviderMetadataCommand.js +1 -28
  37. package/dist-cjs/commands/GetTrustStoreCertificateCommand.js +1 -28
  38. package/dist-cjs/commands/GetTrustStoreCommand.js +1 -28
  39. package/dist-cjs/commands/GetUserAccessLoggingSettingsCommand.js +1 -28
  40. package/dist-cjs/commands/GetUserSettingsCommand.js +1 -29
  41. package/dist-cjs/commands/ListBrowserSettingsCommand.js +1 -28
  42. package/dist-cjs/commands/ListIdentityProvidersCommand.js +1 -29
  43. package/dist-cjs/commands/ListIpAccessSettingsCommand.js +1 -29
  44. package/dist-cjs/commands/ListNetworkSettingsCommand.js +1 -28
  45. package/dist-cjs/commands/ListPortalsCommand.js +1 -29
  46. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -29
  47. package/dist-cjs/commands/ListTrustStoreCertificatesCommand.js +1 -28
  48. package/dist-cjs/commands/ListTrustStoresCommand.js +1 -28
  49. package/dist-cjs/commands/ListUserAccessLoggingSettingsCommand.js +1 -28
  50. package/dist-cjs/commands/ListUserSettingsCommand.js +1 -29
  51. package/dist-cjs/commands/TagResourceCommand.js +1 -29
  52. package/dist-cjs/commands/UntagResourceCommand.js +1 -29
  53. package/dist-cjs/commands/UpdateBrowserSettingsCommand.js +1 -29
  54. package/dist-cjs/commands/UpdateIdentityProviderCommand.js +1 -29
  55. package/dist-cjs/commands/UpdateIpAccessSettingsCommand.js +1 -29
  56. package/dist-cjs/commands/UpdateNetworkSettingsCommand.js +1 -28
  57. package/dist-cjs/commands/UpdatePortalCommand.js +1 -29
  58. package/dist-cjs/commands/UpdateTrustStoreCommand.js +1 -28
  59. package/dist-cjs/commands/UpdateUserAccessLoggingSettingsCommand.js +1 -28
  60. package/dist-cjs/commands/UpdateUserSettingsCommand.js +1 -29
  61. package/dist-cjs/commands/index.js +1 -61
  62. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  63. package/dist-cjs/extensionConfiguration.js +1 -2
  64. package/dist-cjs/index.js +5507 -11
  65. package/dist-cjs/models/WorkSpacesWebServiceException.js +1 -12
  66. package/dist-cjs/models/index.js +1 -4
  67. package/dist-cjs/models/models_0.js +1 -389
  68. package/dist-cjs/pagination/Interfaces.js +1 -2
  69. package/dist-cjs/pagination/ListBrowserSettingsPaginator.js +1 -7
  70. package/dist-cjs/pagination/ListIdentityProvidersPaginator.js +1 -7
  71. package/dist-cjs/pagination/ListIpAccessSettingsPaginator.js +1 -7
  72. package/dist-cjs/pagination/ListNetworkSettingsPaginator.js +1 -7
  73. package/dist-cjs/pagination/ListPortalsPaginator.js +1 -7
  74. package/dist-cjs/pagination/ListTrustStoreCertificatesPaginator.js +1 -7
  75. package/dist-cjs/pagination/ListTrustStoresPaginator.js +1 -7
  76. package/dist-cjs/pagination/ListUserAccessLoggingSettingsPaginator.js +1 -7
  77. package/dist-cjs/pagination/ListUserSettingsPaginator.js +1 -7
  78. package/dist-cjs/pagination/index.js +1 -13
  79. package/dist-cjs/protocols/Aws_restJson1.js +1 -3731
  80. package/dist-cjs/runtimeExtensions.js +1 -22
  81. package/package.json +40 -40
@@ -1,3731 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListUserSettingsCommand = exports.se_ListUserAccessLoggingSettingsCommand = exports.se_ListTrustStoresCommand = exports.se_ListTrustStoreCertificatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPortalsCommand = exports.se_ListNetworkSettingsCommand = exports.se_ListIpAccessSettingsCommand = exports.se_ListIdentityProvidersCommand = exports.se_ListBrowserSettingsCommand = exports.se_GetUserSettingsCommand = exports.se_GetUserAccessLoggingSettingsCommand = exports.se_GetTrustStoreCertificateCommand = exports.se_GetTrustStoreCommand = exports.se_GetPortalServiceProviderMetadataCommand = exports.se_GetPortalCommand = exports.se_GetNetworkSettingsCommand = exports.se_GetIpAccessSettingsCommand = exports.se_GetIdentityProviderCommand = exports.se_GetBrowserSettingsCommand = exports.se_DisassociateUserSettingsCommand = exports.se_DisassociateUserAccessLoggingSettingsCommand = exports.se_DisassociateTrustStoreCommand = exports.se_DisassociateNetworkSettingsCommand = exports.se_DisassociateIpAccessSettingsCommand = exports.se_DisassociateBrowserSettingsCommand = exports.se_DeleteUserSettingsCommand = exports.se_DeleteUserAccessLoggingSettingsCommand = exports.se_DeleteTrustStoreCommand = exports.se_DeletePortalCommand = exports.se_DeleteNetworkSettingsCommand = exports.se_DeleteIpAccessSettingsCommand = exports.se_DeleteIdentityProviderCommand = exports.se_DeleteBrowserSettingsCommand = exports.se_CreateUserSettingsCommand = exports.se_CreateUserAccessLoggingSettingsCommand = exports.se_CreateTrustStoreCommand = exports.se_CreatePortalCommand = exports.se_CreateNetworkSettingsCommand = exports.se_CreateIpAccessSettingsCommand = exports.se_CreateIdentityProviderCommand = exports.se_CreateBrowserSettingsCommand = exports.se_AssociateUserSettingsCommand = exports.se_AssociateUserAccessLoggingSettingsCommand = exports.se_AssociateTrustStoreCommand = exports.se_AssociateNetworkSettingsCommand = exports.se_AssociateIpAccessSettingsCommand = exports.se_AssociateBrowserSettingsCommand = void 0;
4
- exports.de_ListNetworkSettingsCommand = exports.de_ListIpAccessSettingsCommand = exports.de_ListIdentityProvidersCommand = exports.de_ListBrowserSettingsCommand = exports.de_GetUserSettingsCommand = exports.de_GetUserAccessLoggingSettingsCommand = exports.de_GetTrustStoreCertificateCommand = exports.de_GetTrustStoreCommand = exports.de_GetPortalServiceProviderMetadataCommand = exports.de_GetPortalCommand = exports.de_GetNetworkSettingsCommand = exports.de_GetIpAccessSettingsCommand = exports.de_GetIdentityProviderCommand = exports.de_GetBrowserSettingsCommand = exports.de_DisassociateUserSettingsCommand = exports.de_DisassociateUserAccessLoggingSettingsCommand = exports.de_DisassociateTrustStoreCommand = exports.de_DisassociateNetworkSettingsCommand = exports.de_DisassociateIpAccessSettingsCommand = exports.de_DisassociateBrowserSettingsCommand = exports.de_DeleteUserSettingsCommand = exports.de_DeleteUserAccessLoggingSettingsCommand = exports.de_DeleteTrustStoreCommand = exports.de_DeletePortalCommand = exports.de_DeleteNetworkSettingsCommand = exports.de_DeleteIpAccessSettingsCommand = exports.de_DeleteIdentityProviderCommand = exports.de_DeleteBrowserSettingsCommand = exports.de_CreateUserSettingsCommand = exports.de_CreateUserAccessLoggingSettingsCommand = exports.de_CreateTrustStoreCommand = exports.de_CreatePortalCommand = exports.de_CreateNetworkSettingsCommand = exports.de_CreateIpAccessSettingsCommand = exports.de_CreateIdentityProviderCommand = exports.de_CreateBrowserSettingsCommand = exports.de_AssociateUserSettingsCommand = exports.de_AssociateUserAccessLoggingSettingsCommand = exports.de_AssociateTrustStoreCommand = exports.de_AssociateNetworkSettingsCommand = exports.de_AssociateIpAccessSettingsCommand = exports.de_AssociateBrowserSettingsCommand = exports.se_UpdateUserSettingsCommand = exports.se_UpdateUserAccessLoggingSettingsCommand = exports.se_UpdateTrustStoreCommand = exports.se_UpdatePortalCommand = exports.se_UpdateNetworkSettingsCommand = exports.se_UpdateIpAccessSettingsCommand = exports.se_UpdateIdentityProviderCommand = exports.se_UpdateBrowserSettingsCommand = void 0;
5
- exports.de_UpdateUserSettingsCommand = exports.de_UpdateUserAccessLoggingSettingsCommand = exports.de_UpdateTrustStoreCommand = exports.de_UpdatePortalCommand = exports.de_UpdateNetworkSettingsCommand = exports.de_UpdateIpAccessSettingsCommand = exports.de_UpdateIdentityProviderCommand = exports.de_UpdateBrowserSettingsCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListUserSettingsCommand = exports.de_ListUserAccessLoggingSettingsCommand = exports.de_ListTrustStoresCommand = exports.de_ListTrustStoreCertificatesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPortalsCommand = void 0;
6
- const core_1 = require("@smithy/core");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const uuid_1 = require("uuid");
9
- const models_0_1 = require("../models/models_0");
10
- const WorkSpacesWebServiceException_1 = require("../models/WorkSpacesWebServiceException");
11
- const se_AssociateBrowserSettingsCommand = async (input, context) => {
12
- const b = (0, core_1.requestBuilder)(input, context);
13
- const headers = {};
14
- b.bp("/portals/{portalArn+}/browserSettings");
15
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
16
- const query = (0, smithy_client_1.map)({
17
- [_bSA]: [, (0, smithy_client_1.expectNonNull)(input[_bSA], `browserSettingsArn`)],
18
- });
19
- let body;
20
- b.m("PUT").h(headers).q(query).b(body);
21
- return b.build();
22
- };
23
- exports.se_AssociateBrowserSettingsCommand = se_AssociateBrowserSettingsCommand;
24
- const se_AssociateIpAccessSettingsCommand = async (input, context) => {
25
- const b = (0, core_1.requestBuilder)(input, context);
26
- const headers = {};
27
- b.bp("/portals/{portalArn+}/ipAccessSettings");
28
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
29
- const query = (0, smithy_client_1.map)({
30
- [_iASA]: [, (0, smithy_client_1.expectNonNull)(input[_iASA], `ipAccessSettingsArn`)],
31
- });
32
- let body;
33
- b.m("PUT").h(headers).q(query).b(body);
34
- return b.build();
35
- };
36
- exports.se_AssociateIpAccessSettingsCommand = se_AssociateIpAccessSettingsCommand;
37
- const se_AssociateNetworkSettingsCommand = async (input, context) => {
38
- const b = (0, core_1.requestBuilder)(input, context);
39
- const headers = {};
40
- b.bp("/portals/{portalArn+}/networkSettings");
41
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
42
- const query = (0, smithy_client_1.map)({
43
- [_nSA]: [, (0, smithy_client_1.expectNonNull)(input[_nSA], `networkSettingsArn`)],
44
- });
45
- let body;
46
- b.m("PUT").h(headers).q(query).b(body);
47
- return b.build();
48
- };
49
- exports.se_AssociateNetworkSettingsCommand = se_AssociateNetworkSettingsCommand;
50
- const se_AssociateTrustStoreCommand = async (input, context) => {
51
- const b = (0, core_1.requestBuilder)(input, context);
52
- const headers = {};
53
- b.bp("/portals/{portalArn+}/trustStores");
54
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
55
- const query = (0, smithy_client_1.map)({
56
- [_tSA]: [, (0, smithy_client_1.expectNonNull)(input[_tSA], `trustStoreArn`)],
57
- });
58
- let body;
59
- b.m("PUT").h(headers).q(query).b(body);
60
- return b.build();
61
- };
62
- exports.se_AssociateTrustStoreCommand = se_AssociateTrustStoreCommand;
63
- const se_AssociateUserAccessLoggingSettingsCommand = async (input, context) => {
64
- const b = (0, core_1.requestBuilder)(input, context);
65
- const headers = {};
66
- b.bp("/portals/{portalArn+}/userAccessLoggingSettings");
67
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
68
- const query = (0, smithy_client_1.map)({
69
- [_uALSA]: [, (0, smithy_client_1.expectNonNull)(input[_uALSA], `userAccessLoggingSettingsArn`)],
70
- });
71
- let body;
72
- b.m("PUT").h(headers).q(query).b(body);
73
- return b.build();
74
- };
75
- exports.se_AssociateUserAccessLoggingSettingsCommand = se_AssociateUserAccessLoggingSettingsCommand;
76
- const se_AssociateUserSettingsCommand = async (input, context) => {
77
- const b = (0, core_1.requestBuilder)(input, context);
78
- const headers = {};
79
- b.bp("/portals/{portalArn+}/userSettings");
80
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
81
- const query = (0, smithy_client_1.map)({
82
- [_uSA]: [, (0, smithy_client_1.expectNonNull)(input[_uSA], `userSettingsArn`)],
83
- });
84
- let body;
85
- b.m("PUT").h(headers).q(query).b(body);
86
- return b.build();
87
- };
88
- exports.se_AssociateUserSettingsCommand = se_AssociateUserSettingsCommand;
89
- const se_CreateBrowserSettingsCommand = async (input, context) => {
90
- const b = (0, core_1.requestBuilder)(input, context);
91
- const headers = {
92
- "content-type": "application/json",
93
- };
94
- b.bp("/browserSettings");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1.take)(input, {
97
- additionalEncryptionContext: (_) => (0, smithy_client_1._json)(_),
98
- browserPolicy: [],
99
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
100
- customerManagedKey: [],
101
- tags: (_) => (0, smithy_client_1._json)(_),
102
- }));
103
- b.m("POST").h(headers).b(body);
104
- return b.build();
105
- };
106
- exports.se_CreateBrowserSettingsCommand = se_CreateBrowserSettingsCommand;
107
- const se_CreateIdentityProviderCommand = async (input, context) => {
108
- const b = (0, core_1.requestBuilder)(input, context);
109
- const headers = {
110
- "content-type": "application/json",
111
- };
112
- b.bp("/identityProviders");
113
- let body;
114
- body = JSON.stringify((0, smithy_client_1.take)(input, {
115
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
116
- identityProviderDetails: (_) => (0, smithy_client_1._json)(_),
117
- identityProviderName: [],
118
- identityProviderType: [],
119
- portalArn: [],
120
- }));
121
- b.m("POST").h(headers).b(body);
122
- return b.build();
123
- };
124
- exports.se_CreateIdentityProviderCommand = se_CreateIdentityProviderCommand;
125
- const se_CreateIpAccessSettingsCommand = async (input, context) => {
126
- const b = (0, core_1.requestBuilder)(input, context);
127
- const headers = {
128
- "content-type": "application/json",
129
- };
130
- b.bp("/ipAccessSettings");
131
- let body;
132
- body = JSON.stringify((0, smithy_client_1.take)(input, {
133
- additionalEncryptionContext: (_) => (0, smithy_client_1._json)(_),
134
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
135
- customerManagedKey: [],
136
- description: [],
137
- displayName: [],
138
- ipRules: (_) => (0, smithy_client_1._json)(_),
139
- tags: (_) => (0, smithy_client_1._json)(_),
140
- }));
141
- b.m("POST").h(headers).b(body);
142
- return b.build();
143
- };
144
- exports.se_CreateIpAccessSettingsCommand = se_CreateIpAccessSettingsCommand;
145
- const se_CreateNetworkSettingsCommand = async (input, context) => {
146
- const b = (0, core_1.requestBuilder)(input, context);
147
- const headers = {
148
- "content-type": "application/json",
149
- };
150
- b.bp("/networkSettings");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1.take)(input, {
153
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
154
- securityGroupIds: (_) => (0, smithy_client_1._json)(_),
155
- subnetIds: (_) => (0, smithy_client_1._json)(_),
156
- tags: (_) => (0, smithy_client_1._json)(_),
157
- vpcId: [],
158
- }));
159
- b.m("POST").h(headers).b(body);
160
- return b.build();
161
- };
162
- exports.se_CreateNetworkSettingsCommand = se_CreateNetworkSettingsCommand;
163
- const se_CreatePortalCommand = async (input, context) => {
164
- const b = (0, core_1.requestBuilder)(input, context);
165
- const headers = {
166
- "content-type": "application/json",
167
- };
168
- b.bp("/portals");
169
- let body;
170
- body = JSON.stringify((0, smithy_client_1.take)(input, {
171
- additionalEncryptionContext: (_) => (0, smithy_client_1._json)(_),
172
- authenticationType: [],
173
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
174
- customerManagedKey: [],
175
- displayName: [],
176
- tags: (_) => (0, smithy_client_1._json)(_),
177
- }));
178
- b.m("POST").h(headers).b(body);
179
- return b.build();
180
- };
181
- exports.se_CreatePortalCommand = se_CreatePortalCommand;
182
- const se_CreateTrustStoreCommand = async (input, context) => {
183
- const b = (0, core_1.requestBuilder)(input, context);
184
- const headers = {
185
- "content-type": "application/json",
186
- };
187
- b.bp("/trustStores");
188
- let body;
189
- body = JSON.stringify((0, smithy_client_1.take)(input, {
190
- certificateList: (_) => se_CertificateList(_, context),
191
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
192
- tags: (_) => (0, smithy_client_1._json)(_),
193
- }));
194
- b.m("POST").h(headers).b(body);
195
- return b.build();
196
- };
197
- exports.se_CreateTrustStoreCommand = se_CreateTrustStoreCommand;
198
- const se_CreateUserAccessLoggingSettingsCommand = async (input, context) => {
199
- const b = (0, core_1.requestBuilder)(input, context);
200
- const headers = {
201
- "content-type": "application/json",
202
- };
203
- b.bp("/userAccessLoggingSettings");
204
- let body;
205
- body = JSON.stringify((0, smithy_client_1.take)(input, {
206
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
207
- kinesisStreamArn: [],
208
- tags: (_) => (0, smithy_client_1._json)(_),
209
- }));
210
- b.m("POST").h(headers).b(body);
211
- return b.build();
212
- };
213
- exports.se_CreateUserAccessLoggingSettingsCommand = se_CreateUserAccessLoggingSettingsCommand;
214
- const se_CreateUserSettingsCommand = async (input, context) => {
215
- const b = (0, core_1.requestBuilder)(input, context);
216
- const headers = {
217
- "content-type": "application/json",
218
- };
219
- b.bp("/userSettings");
220
- let body;
221
- body = JSON.stringify((0, smithy_client_1.take)(input, {
222
- additionalEncryptionContext: (_) => (0, smithy_client_1._json)(_),
223
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
224
- cookieSynchronizationConfiguration: (_) => (0, smithy_client_1._json)(_),
225
- copyAllowed: [],
226
- customerManagedKey: [],
227
- disconnectTimeoutInMinutes: [],
228
- downloadAllowed: [],
229
- idleDisconnectTimeoutInMinutes: [],
230
- pasteAllowed: [],
231
- printAllowed: [],
232
- tags: (_) => (0, smithy_client_1._json)(_),
233
- uploadAllowed: [],
234
- }));
235
- b.m("POST").h(headers).b(body);
236
- return b.build();
237
- };
238
- exports.se_CreateUserSettingsCommand = se_CreateUserSettingsCommand;
239
- const se_DeleteBrowserSettingsCommand = async (input, context) => {
240
- const b = (0, core_1.requestBuilder)(input, context);
241
- const headers = {};
242
- b.bp("/browserSettings/{browserSettingsArn+}");
243
- b.p("browserSettingsArn", () => input.browserSettingsArn, "{browserSettingsArn+}", true);
244
- let body;
245
- b.m("DELETE").h(headers).b(body);
246
- return b.build();
247
- };
248
- exports.se_DeleteBrowserSettingsCommand = se_DeleteBrowserSettingsCommand;
249
- const se_DeleteIdentityProviderCommand = async (input, context) => {
250
- const b = (0, core_1.requestBuilder)(input, context);
251
- const headers = {};
252
- b.bp("/identityProviders/{identityProviderArn+}");
253
- b.p("identityProviderArn", () => input.identityProviderArn, "{identityProviderArn+}", true);
254
- let body;
255
- b.m("DELETE").h(headers).b(body);
256
- return b.build();
257
- };
258
- exports.se_DeleteIdentityProviderCommand = se_DeleteIdentityProviderCommand;
259
- const se_DeleteIpAccessSettingsCommand = async (input, context) => {
260
- const b = (0, core_1.requestBuilder)(input, context);
261
- const headers = {};
262
- b.bp("/ipAccessSettings/{ipAccessSettingsArn+}");
263
- b.p("ipAccessSettingsArn", () => input.ipAccessSettingsArn, "{ipAccessSettingsArn+}", true);
264
- let body;
265
- b.m("DELETE").h(headers).b(body);
266
- return b.build();
267
- };
268
- exports.se_DeleteIpAccessSettingsCommand = se_DeleteIpAccessSettingsCommand;
269
- const se_DeleteNetworkSettingsCommand = async (input, context) => {
270
- const b = (0, core_1.requestBuilder)(input, context);
271
- const headers = {};
272
- b.bp("/networkSettings/{networkSettingsArn+}");
273
- b.p("networkSettingsArn", () => input.networkSettingsArn, "{networkSettingsArn+}", true);
274
- let body;
275
- b.m("DELETE").h(headers).b(body);
276
- return b.build();
277
- };
278
- exports.se_DeleteNetworkSettingsCommand = se_DeleteNetworkSettingsCommand;
279
- const se_DeletePortalCommand = async (input, context) => {
280
- const b = (0, core_1.requestBuilder)(input, context);
281
- const headers = {};
282
- b.bp("/portals/{portalArn+}");
283
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
284
- let body;
285
- b.m("DELETE").h(headers).b(body);
286
- return b.build();
287
- };
288
- exports.se_DeletePortalCommand = se_DeletePortalCommand;
289
- const se_DeleteTrustStoreCommand = async (input, context) => {
290
- const b = (0, core_1.requestBuilder)(input, context);
291
- const headers = {};
292
- b.bp("/trustStores/{trustStoreArn+}");
293
- b.p("trustStoreArn", () => input.trustStoreArn, "{trustStoreArn+}", true);
294
- let body;
295
- b.m("DELETE").h(headers).b(body);
296
- return b.build();
297
- };
298
- exports.se_DeleteTrustStoreCommand = se_DeleteTrustStoreCommand;
299
- const se_DeleteUserAccessLoggingSettingsCommand = async (input, context) => {
300
- const b = (0, core_1.requestBuilder)(input, context);
301
- const headers = {};
302
- b.bp("/userAccessLoggingSettings/{userAccessLoggingSettingsArn+}");
303
- b.p("userAccessLoggingSettingsArn", () => input.userAccessLoggingSettingsArn, "{userAccessLoggingSettingsArn+}", true);
304
- let body;
305
- b.m("DELETE").h(headers).b(body);
306
- return b.build();
307
- };
308
- exports.se_DeleteUserAccessLoggingSettingsCommand = se_DeleteUserAccessLoggingSettingsCommand;
309
- const se_DeleteUserSettingsCommand = async (input, context) => {
310
- const b = (0, core_1.requestBuilder)(input, context);
311
- const headers = {};
312
- b.bp("/userSettings/{userSettingsArn+}");
313
- b.p("userSettingsArn", () => input.userSettingsArn, "{userSettingsArn+}", true);
314
- let body;
315
- b.m("DELETE").h(headers).b(body);
316
- return b.build();
317
- };
318
- exports.se_DeleteUserSettingsCommand = se_DeleteUserSettingsCommand;
319
- const se_DisassociateBrowserSettingsCommand = async (input, context) => {
320
- const b = (0, core_1.requestBuilder)(input, context);
321
- const headers = {};
322
- b.bp("/portals/{portalArn+}/browserSettings");
323
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
324
- let body;
325
- b.m("DELETE").h(headers).b(body);
326
- return b.build();
327
- };
328
- exports.se_DisassociateBrowserSettingsCommand = se_DisassociateBrowserSettingsCommand;
329
- const se_DisassociateIpAccessSettingsCommand = async (input, context) => {
330
- const b = (0, core_1.requestBuilder)(input, context);
331
- const headers = {};
332
- b.bp("/portals/{portalArn+}/ipAccessSettings");
333
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
334
- let body;
335
- b.m("DELETE").h(headers).b(body);
336
- return b.build();
337
- };
338
- exports.se_DisassociateIpAccessSettingsCommand = se_DisassociateIpAccessSettingsCommand;
339
- const se_DisassociateNetworkSettingsCommand = async (input, context) => {
340
- const b = (0, core_1.requestBuilder)(input, context);
341
- const headers = {};
342
- b.bp("/portals/{portalArn+}/networkSettings");
343
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
344
- let body;
345
- b.m("DELETE").h(headers).b(body);
346
- return b.build();
347
- };
348
- exports.se_DisassociateNetworkSettingsCommand = se_DisassociateNetworkSettingsCommand;
349
- const se_DisassociateTrustStoreCommand = async (input, context) => {
350
- const b = (0, core_1.requestBuilder)(input, context);
351
- const headers = {};
352
- b.bp("/portals/{portalArn+}/trustStores");
353
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
354
- let body;
355
- b.m("DELETE").h(headers).b(body);
356
- return b.build();
357
- };
358
- exports.se_DisassociateTrustStoreCommand = se_DisassociateTrustStoreCommand;
359
- const se_DisassociateUserAccessLoggingSettingsCommand = async (input, context) => {
360
- const b = (0, core_1.requestBuilder)(input, context);
361
- const headers = {};
362
- b.bp("/portals/{portalArn+}/userAccessLoggingSettings");
363
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
364
- let body;
365
- b.m("DELETE").h(headers).b(body);
366
- return b.build();
367
- };
368
- exports.se_DisassociateUserAccessLoggingSettingsCommand = se_DisassociateUserAccessLoggingSettingsCommand;
369
- const se_DisassociateUserSettingsCommand = async (input, context) => {
370
- const b = (0, core_1.requestBuilder)(input, context);
371
- const headers = {};
372
- b.bp("/portals/{portalArn+}/userSettings");
373
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
374
- let body;
375
- b.m("DELETE").h(headers).b(body);
376
- return b.build();
377
- };
378
- exports.se_DisassociateUserSettingsCommand = se_DisassociateUserSettingsCommand;
379
- const se_GetBrowserSettingsCommand = async (input, context) => {
380
- const b = (0, core_1.requestBuilder)(input, context);
381
- const headers = {};
382
- b.bp("/browserSettings/{browserSettingsArn+}");
383
- b.p("browserSettingsArn", () => input.browserSettingsArn, "{browserSettingsArn+}", true);
384
- let body;
385
- b.m("GET").h(headers).b(body);
386
- return b.build();
387
- };
388
- exports.se_GetBrowserSettingsCommand = se_GetBrowserSettingsCommand;
389
- const se_GetIdentityProviderCommand = async (input, context) => {
390
- const b = (0, core_1.requestBuilder)(input, context);
391
- const headers = {};
392
- b.bp("/identityProviders/{identityProviderArn+}");
393
- b.p("identityProviderArn", () => input.identityProviderArn, "{identityProviderArn+}", true);
394
- let body;
395
- b.m("GET").h(headers).b(body);
396
- return b.build();
397
- };
398
- exports.se_GetIdentityProviderCommand = se_GetIdentityProviderCommand;
399
- const se_GetIpAccessSettingsCommand = async (input, context) => {
400
- const b = (0, core_1.requestBuilder)(input, context);
401
- const headers = {};
402
- b.bp("/ipAccessSettings/{ipAccessSettingsArn+}");
403
- b.p("ipAccessSettingsArn", () => input.ipAccessSettingsArn, "{ipAccessSettingsArn+}", true);
404
- let body;
405
- b.m("GET").h(headers).b(body);
406
- return b.build();
407
- };
408
- exports.se_GetIpAccessSettingsCommand = se_GetIpAccessSettingsCommand;
409
- const se_GetNetworkSettingsCommand = async (input, context) => {
410
- const b = (0, core_1.requestBuilder)(input, context);
411
- const headers = {};
412
- b.bp("/networkSettings/{networkSettingsArn+}");
413
- b.p("networkSettingsArn", () => input.networkSettingsArn, "{networkSettingsArn+}", true);
414
- let body;
415
- b.m("GET").h(headers).b(body);
416
- return b.build();
417
- };
418
- exports.se_GetNetworkSettingsCommand = se_GetNetworkSettingsCommand;
419
- const se_GetPortalCommand = async (input, context) => {
420
- const b = (0, core_1.requestBuilder)(input, context);
421
- const headers = {};
422
- b.bp("/portals/{portalArn+}");
423
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
424
- let body;
425
- b.m("GET").h(headers).b(body);
426
- return b.build();
427
- };
428
- exports.se_GetPortalCommand = se_GetPortalCommand;
429
- const se_GetPortalServiceProviderMetadataCommand = async (input, context) => {
430
- const b = (0, core_1.requestBuilder)(input, context);
431
- const headers = {};
432
- b.bp("/portalIdp/{portalArn+}");
433
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
434
- let body;
435
- b.m("GET").h(headers).b(body);
436
- return b.build();
437
- };
438
- exports.se_GetPortalServiceProviderMetadataCommand = se_GetPortalServiceProviderMetadataCommand;
439
- const se_GetTrustStoreCommand = async (input, context) => {
440
- const b = (0, core_1.requestBuilder)(input, context);
441
- const headers = {};
442
- b.bp("/trustStores/{trustStoreArn+}");
443
- b.p("trustStoreArn", () => input.trustStoreArn, "{trustStoreArn+}", true);
444
- let body;
445
- b.m("GET").h(headers).b(body);
446
- return b.build();
447
- };
448
- exports.se_GetTrustStoreCommand = se_GetTrustStoreCommand;
449
- const se_GetTrustStoreCertificateCommand = async (input, context) => {
450
- const b = (0, core_1.requestBuilder)(input, context);
451
- const headers = {};
452
- b.bp("/trustStores/{trustStoreArn+}/certificate");
453
- b.p("trustStoreArn", () => input.trustStoreArn, "{trustStoreArn+}", true);
454
- const query = (0, smithy_client_1.map)({
455
- [_t]: [, (0, smithy_client_1.expectNonNull)(input[_t], `thumbprint`)],
456
- });
457
- let body;
458
- b.m("GET").h(headers).q(query).b(body);
459
- return b.build();
460
- };
461
- exports.se_GetTrustStoreCertificateCommand = se_GetTrustStoreCertificateCommand;
462
- const se_GetUserAccessLoggingSettingsCommand = async (input, context) => {
463
- const b = (0, core_1.requestBuilder)(input, context);
464
- const headers = {};
465
- b.bp("/userAccessLoggingSettings/{userAccessLoggingSettingsArn+}");
466
- b.p("userAccessLoggingSettingsArn", () => input.userAccessLoggingSettingsArn, "{userAccessLoggingSettingsArn+}", true);
467
- let body;
468
- b.m("GET").h(headers).b(body);
469
- return b.build();
470
- };
471
- exports.se_GetUserAccessLoggingSettingsCommand = se_GetUserAccessLoggingSettingsCommand;
472
- const se_GetUserSettingsCommand = async (input, context) => {
473
- const b = (0, core_1.requestBuilder)(input, context);
474
- const headers = {};
475
- b.bp("/userSettings/{userSettingsArn+}");
476
- b.p("userSettingsArn", () => input.userSettingsArn, "{userSettingsArn+}", true);
477
- let body;
478
- b.m("GET").h(headers).b(body);
479
- return b.build();
480
- };
481
- exports.se_GetUserSettingsCommand = se_GetUserSettingsCommand;
482
- const se_ListBrowserSettingsCommand = async (input, context) => {
483
- const b = (0, core_1.requestBuilder)(input, context);
484
- const headers = {};
485
- b.bp("/browserSettings");
486
- const query = (0, smithy_client_1.map)({
487
- [_nT]: [, input[_nT]],
488
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
489
- });
490
- let body;
491
- b.m("GET").h(headers).q(query).b(body);
492
- return b.build();
493
- };
494
- exports.se_ListBrowserSettingsCommand = se_ListBrowserSettingsCommand;
495
- const se_ListIdentityProvidersCommand = async (input, context) => {
496
- const b = (0, core_1.requestBuilder)(input, context);
497
- const headers = {};
498
- b.bp("/portals/{portalArn+}/identityProviders");
499
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
500
- const query = (0, smithy_client_1.map)({
501
- [_nT]: [, input[_nT]],
502
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
503
- });
504
- let body;
505
- b.m("GET").h(headers).q(query).b(body);
506
- return b.build();
507
- };
508
- exports.se_ListIdentityProvidersCommand = se_ListIdentityProvidersCommand;
509
- const se_ListIpAccessSettingsCommand = async (input, context) => {
510
- const b = (0, core_1.requestBuilder)(input, context);
511
- const headers = {};
512
- b.bp("/ipAccessSettings");
513
- const query = (0, smithy_client_1.map)({
514
- [_nT]: [, input[_nT]],
515
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
516
- });
517
- let body;
518
- b.m("GET").h(headers).q(query).b(body);
519
- return b.build();
520
- };
521
- exports.se_ListIpAccessSettingsCommand = se_ListIpAccessSettingsCommand;
522
- const se_ListNetworkSettingsCommand = async (input, context) => {
523
- const b = (0, core_1.requestBuilder)(input, context);
524
- const headers = {};
525
- b.bp("/networkSettings");
526
- const query = (0, smithy_client_1.map)({
527
- [_nT]: [, input[_nT]],
528
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
529
- });
530
- let body;
531
- b.m("GET").h(headers).q(query).b(body);
532
- return b.build();
533
- };
534
- exports.se_ListNetworkSettingsCommand = se_ListNetworkSettingsCommand;
535
- const se_ListPortalsCommand = async (input, context) => {
536
- const b = (0, core_1.requestBuilder)(input, context);
537
- const headers = {};
538
- b.bp("/portals");
539
- const query = (0, smithy_client_1.map)({
540
- [_nT]: [, input[_nT]],
541
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
542
- });
543
- let body;
544
- b.m("GET").h(headers).q(query).b(body);
545
- return b.build();
546
- };
547
- exports.se_ListPortalsCommand = se_ListPortalsCommand;
548
- const se_ListTagsForResourceCommand = async (input, context) => {
549
- const b = (0, core_1.requestBuilder)(input, context);
550
- const headers = {};
551
- b.bp("/tags/{resourceArn+}");
552
- b.p("resourceArn", () => input.resourceArn, "{resourceArn+}", true);
553
- let body;
554
- b.m("GET").h(headers).b(body);
555
- return b.build();
556
- };
557
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
558
- const se_ListTrustStoreCertificatesCommand = async (input, context) => {
559
- const b = (0, core_1.requestBuilder)(input, context);
560
- const headers = {};
561
- b.bp("/trustStores/{trustStoreArn+}/certificates");
562
- b.p("trustStoreArn", () => input.trustStoreArn, "{trustStoreArn+}", true);
563
- const query = (0, smithy_client_1.map)({
564
- [_nT]: [, input[_nT]],
565
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
566
- });
567
- let body;
568
- b.m("GET").h(headers).q(query).b(body);
569
- return b.build();
570
- };
571
- exports.se_ListTrustStoreCertificatesCommand = se_ListTrustStoreCertificatesCommand;
572
- const se_ListTrustStoresCommand = async (input, context) => {
573
- const b = (0, core_1.requestBuilder)(input, context);
574
- const headers = {};
575
- b.bp("/trustStores");
576
- const query = (0, smithy_client_1.map)({
577
- [_nT]: [, input[_nT]],
578
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
579
- });
580
- let body;
581
- b.m("GET").h(headers).q(query).b(body);
582
- return b.build();
583
- };
584
- exports.se_ListTrustStoresCommand = se_ListTrustStoresCommand;
585
- const se_ListUserAccessLoggingSettingsCommand = async (input, context) => {
586
- const b = (0, core_1.requestBuilder)(input, context);
587
- const headers = {};
588
- b.bp("/userAccessLoggingSettings");
589
- const query = (0, smithy_client_1.map)({
590
- [_nT]: [, input[_nT]],
591
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
592
- });
593
- let body;
594
- b.m("GET").h(headers).q(query).b(body);
595
- return b.build();
596
- };
597
- exports.se_ListUserAccessLoggingSettingsCommand = se_ListUserAccessLoggingSettingsCommand;
598
- const se_ListUserSettingsCommand = async (input, context) => {
599
- const b = (0, core_1.requestBuilder)(input, context);
600
- const headers = {};
601
- b.bp("/userSettings");
602
- const query = (0, smithy_client_1.map)({
603
- [_nT]: [, input[_nT]],
604
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
605
- });
606
- let body;
607
- b.m("GET").h(headers).q(query).b(body);
608
- return b.build();
609
- };
610
- exports.se_ListUserSettingsCommand = se_ListUserSettingsCommand;
611
- const se_TagResourceCommand = async (input, context) => {
612
- const b = (0, core_1.requestBuilder)(input, context);
613
- const headers = {
614
- "content-type": "application/json",
615
- };
616
- b.bp("/tags/{resourceArn+}");
617
- b.p("resourceArn", () => input.resourceArn, "{resourceArn+}", true);
618
- let body;
619
- body = JSON.stringify((0, smithy_client_1.take)(input, {
620
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
621
- tags: (_) => (0, smithy_client_1._json)(_),
622
- }));
623
- b.m("POST").h(headers).b(body);
624
- return b.build();
625
- };
626
- exports.se_TagResourceCommand = se_TagResourceCommand;
627
- const se_UntagResourceCommand = async (input, context) => {
628
- const b = (0, core_1.requestBuilder)(input, context);
629
- const headers = {};
630
- b.bp("/tags/{resourceArn+}");
631
- b.p("resourceArn", () => input.resourceArn, "{resourceArn+}", true);
632
- const query = (0, smithy_client_1.map)({
633
- [_tK]: [
634
- (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
635
- () => (input[_tK] || []).map((_entry) => _entry),
636
- ],
637
- });
638
- let body;
639
- b.m("DELETE").h(headers).q(query).b(body);
640
- return b.build();
641
- };
642
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
643
- const se_UpdateBrowserSettingsCommand = async (input, context) => {
644
- const b = (0, core_1.requestBuilder)(input, context);
645
- const headers = {
646
- "content-type": "application/json",
647
- };
648
- b.bp("/browserSettings/{browserSettingsArn+}");
649
- b.p("browserSettingsArn", () => input.browserSettingsArn, "{browserSettingsArn+}", true);
650
- let body;
651
- body = JSON.stringify((0, smithy_client_1.take)(input, {
652
- browserPolicy: [],
653
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
654
- }));
655
- b.m("PATCH").h(headers).b(body);
656
- return b.build();
657
- };
658
- exports.se_UpdateBrowserSettingsCommand = se_UpdateBrowserSettingsCommand;
659
- const se_UpdateIdentityProviderCommand = async (input, context) => {
660
- const b = (0, core_1.requestBuilder)(input, context);
661
- const headers = {
662
- "content-type": "application/json",
663
- };
664
- b.bp("/identityProviders/{identityProviderArn+}");
665
- b.p("identityProviderArn", () => input.identityProviderArn, "{identityProviderArn+}", true);
666
- let body;
667
- body = JSON.stringify((0, smithy_client_1.take)(input, {
668
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
669
- identityProviderDetails: (_) => (0, smithy_client_1._json)(_),
670
- identityProviderName: [],
671
- identityProviderType: [],
672
- }));
673
- b.m("PATCH").h(headers).b(body);
674
- return b.build();
675
- };
676
- exports.se_UpdateIdentityProviderCommand = se_UpdateIdentityProviderCommand;
677
- const se_UpdateIpAccessSettingsCommand = async (input, context) => {
678
- const b = (0, core_1.requestBuilder)(input, context);
679
- const headers = {
680
- "content-type": "application/json",
681
- };
682
- b.bp("/ipAccessSettings/{ipAccessSettingsArn+}");
683
- b.p("ipAccessSettingsArn", () => input.ipAccessSettingsArn, "{ipAccessSettingsArn+}", true);
684
- let body;
685
- body = JSON.stringify((0, smithy_client_1.take)(input, {
686
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
687
- description: [],
688
- displayName: [],
689
- ipRules: (_) => (0, smithy_client_1._json)(_),
690
- }));
691
- b.m("PATCH").h(headers).b(body);
692
- return b.build();
693
- };
694
- exports.se_UpdateIpAccessSettingsCommand = se_UpdateIpAccessSettingsCommand;
695
- const se_UpdateNetworkSettingsCommand = async (input, context) => {
696
- const b = (0, core_1.requestBuilder)(input, context);
697
- const headers = {
698
- "content-type": "application/json",
699
- };
700
- b.bp("/networkSettings/{networkSettingsArn+}");
701
- b.p("networkSettingsArn", () => input.networkSettingsArn, "{networkSettingsArn+}", true);
702
- let body;
703
- body = JSON.stringify((0, smithy_client_1.take)(input, {
704
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
705
- securityGroupIds: (_) => (0, smithy_client_1._json)(_),
706
- subnetIds: (_) => (0, smithy_client_1._json)(_),
707
- vpcId: [],
708
- }));
709
- b.m("PATCH").h(headers).b(body);
710
- return b.build();
711
- };
712
- exports.se_UpdateNetworkSettingsCommand = se_UpdateNetworkSettingsCommand;
713
- const se_UpdatePortalCommand = async (input, context) => {
714
- const b = (0, core_1.requestBuilder)(input, context);
715
- const headers = {
716
- "content-type": "application/json",
717
- };
718
- b.bp("/portals/{portalArn+}");
719
- b.p("portalArn", () => input.portalArn, "{portalArn+}", true);
720
- let body;
721
- body = JSON.stringify((0, smithy_client_1.take)(input, {
722
- authenticationType: [],
723
- displayName: [],
724
- }));
725
- b.m("PUT").h(headers).b(body);
726
- return b.build();
727
- };
728
- exports.se_UpdatePortalCommand = se_UpdatePortalCommand;
729
- const se_UpdateTrustStoreCommand = async (input, context) => {
730
- const b = (0, core_1.requestBuilder)(input, context);
731
- const headers = {
732
- "content-type": "application/json",
733
- };
734
- b.bp("/trustStores/{trustStoreArn+}");
735
- b.p("trustStoreArn", () => input.trustStoreArn, "{trustStoreArn+}", true);
736
- let body;
737
- body = JSON.stringify((0, smithy_client_1.take)(input, {
738
- certificatesToAdd: (_) => se_CertificateList(_, context),
739
- certificatesToDelete: (_) => (0, smithy_client_1._json)(_),
740
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
741
- }));
742
- b.m("PATCH").h(headers).b(body);
743
- return b.build();
744
- };
745
- exports.se_UpdateTrustStoreCommand = se_UpdateTrustStoreCommand;
746
- const se_UpdateUserAccessLoggingSettingsCommand = async (input, context) => {
747
- const b = (0, core_1.requestBuilder)(input, context);
748
- const headers = {
749
- "content-type": "application/json",
750
- };
751
- b.bp("/userAccessLoggingSettings/{userAccessLoggingSettingsArn+}");
752
- b.p("userAccessLoggingSettingsArn", () => input.userAccessLoggingSettingsArn, "{userAccessLoggingSettingsArn+}", true);
753
- let body;
754
- body = JSON.stringify((0, smithy_client_1.take)(input, {
755
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
756
- kinesisStreamArn: [],
757
- }));
758
- b.m("PATCH").h(headers).b(body);
759
- return b.build();
760
- };
761
- exports.se_UpdateUserAccessLoggingSettingsCommand = se_UpdateUserAccessLoggingSettingsCommand;
762
- const se_UpdateUserSettingsCommand = async (input, context) => {
763
- const b = (0, core_1.requestBuilder)(input, context);
764
- const headers = {
765
- "content-type": "application/json",
766
- };
767
- b.bp("/userSettings/{userSettingsArn+}");
768
- b.p("userSettingsArn", () => input.userSettingsArn, "{userSettingsArn+}", true);
769
- let body;
770
- body = JSON.stringify((0, smithy_client_1.take)(input, {
771
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
772
- cookieSynchronizationConfiguration: (_) => (0, smithy_client_1._json)(_),
773
- copyAllowed: [],
774
- disconnectTimeoutInMinutes: [],
775
- downloadAllowed: [],
776
- idleDisconnectTimeoutInMinutes: [],
777
- pasteAllowed: [],
778
- printAllowed: [],
779
- uploadAllowed: [],
780
- }));
781
- b.m("PATCH").h(headers).b(body);
782
- return b.build();
783
- };
784
- exports.se_UpdateUserSettingsCommand = se_UpdateUserSettingsCommand;
785
- const de_AssociateBrowserSettingsCommand = async (output, context) => {
786
- if (output.statusCode !== 200 && output.statusCode >= 300) {
787
- return de_AssociateBrowserSettingsCommandError(output, context);
788
- }
789
- const contents = (0, smithy_client_1.map)({
790
- $metadata: deserializeMetadata(output),
791
- });
792
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
793
- const doc = (0, smithy_client_1.take)(data, {
794
- browserSettingsArn: smithy_client_1.expectString,
795
- portalArn: smithy_client_1.expectString,
796
- });
797
- Object.assign(contents, doc);
798
- return contents;
799
- };
800
- exports.de_AssociateBrowserSettingsCommand = de_AssociateBrowserSettingsCommand;
801
- const de_AssociateBrowserSettingsCommandError = async (output, context) => {
802
- const parsedOutput = {
803
- ...output,
804
- body: await parseErrorBody(output.body, context),
805
- };
806
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
807
- switch (errorCode) {
808
- case "AccessDeniedException":
809
- case "com.amazonaws.workspacesweb#AccessDeniedException":
810
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
811
- case "ConflictException":
812
- case "com.amazonaws.workspacesweb#ConflictException":
813
- throw await de_ConflictExceptionRes(parsedOutput, context);
814
- case "InternalServerException":
815
- case "com.amazonaws.workspacesweb#InternalServerException":
816
- throw await de_InternalServerExceptionRes(parsedOutput, context);
817
- case "ResourceNotFoundException":
818
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
819
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
820
- case "ThrottlingException":
821
- case "com.amazonaws.workspacesweb#ThrottlingException":
822
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
823
- case "ValidationException":
824
- case "com.amazonaws.workspacesweb#ValidationException":
825
- throw await de_ValidationExceptionRes(parsedOutput, context);
826
- default:
827
- const parsedBody = parsedOutput.body;
828
- return throwDefaultError({
829
- output,
830
- parsedBody,
831
- errorCode,
832
- });
833
- }
834
- };
835
- const de_AssociateIpAccessSettingsCommand = async (output, context) => {
836
- if (output.statusCode !== 200 && output.statusCode >= 300) {
837
- return de_AssociateIpAccessSettingsCommandError(output, context);
838
- }
839
- const contents = (0, smithy_client_1.map)({
840
- $metadata: deserializeMetadata(output),
841
- });
842
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
843
- const doc = (0, smithy_client_1.take)(data, {
844
- ipAccessSettingsArn: smithy_client_1.expectString,
845
- portalArn: smithy_client_1.expectString,
846
- });
847
- Object.assign(contents, doc);
848
- return contents;
849
- };
850
- exports.de_AssociateIpAccessSettingsCommand = de_AssociateIpAccessSettingsCommand;
851
- const de_AssociateIpAccessSettingsCommandError = async (output, context) => {
852
- const parsedOutput = {
853
- ...output,
854
- body: await parseErrorBody(output.body, context),
855
- };
856
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
857
- switch (errorCode) {
858
- case "AccessDeniedException":
859
- case "com.amazonaws.workspacesweb#AccessDeniedException":
860
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
861
- case "ConflictException":
862
- case "com.amazonaws.workspacesweb#ConflictException":
863
- throw await de_ConflictExceptionRes(parsedOutput, context);
864
- case "InternalServerException":
865
- case "com.amazonaws.workspacesweb#InternalServerException":
866
- throw await de_InternalServerExceptionRes(parsedOutput, context);
867
- case "ResourceNotFoundException":
868
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
869
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
870
- case "ThrottlingException":
871
- case "com.amazonaws.workspacesweb#ThrottlingException":
872
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
873
- case "ValidationException":
874
- case "com.amazonaws.workspacesweb#ValidationException":
875
- throw await de_ValidationExceptionRes(parsedOutput, context);
876
- default:
877
- const parsedBody = parsedOutput.body;
878
- return throwDefaultError({
879
- output,
880
- parsedBody,
881
- errorCode,
882
- });
883
- }
884
- };
885
- const de_AssociateNetworkSettingsCommand = async (output, context) => {
886
- if (output.statusCode !== 200 && output.statusCode >= 300) {
887
- return de_AssociateNetworkSettingsCommandError(output, context);
888
- }
889
- const contents = (0, smithy_client_1.map)({
890
- $metadata: deserializeMetadata(output),
891
- });
892
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
893
- const doc = (0, smithy_client_1.take)(data, {
894
- networkSettingsArn: smithy_client_1.expectString,
895
- portalArn: smithy_client_1.expectString,
896
- });
897
- Object.assign(contents, doc);
898
- return contents;
899
- };
900
- exports.de_AssociateNetworkSettingsCommand = de_AssociateNetworkSettingsCommand;
901
- const de_AssociateNetworkSettingsCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "AccessDeniedException":
909
- case "com.amazonaws.workspacesweb#AccessDeniedException":
910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
- case "ConflictException":
912
- case "com.amazonaws.workspacesweb#ConflictException":
913
- throw await de_ConflictExceptionRes(parsedOutput, context);
914
- case "InternalServerException":
915
- case "com.amazonaws.workspacesweb#InternalServerException":
916
- throw await de_InternalServerExceptionRes(parsedOutput, context);
917
- case "ResourceNotFoundException":
918
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
919
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
920
- case "ThrottlingException":
921
- case "com.amazonaws.workspacesweb#ThrottlingException":
922
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
923
- case "ValidationException":
924
- case "com.amazonaws.workspacesweb#ValidationException":
925
- throw await de_ValidationExceptionRes(parsedOutput, context);
926
- default:
927
- const parsedBody = parsedOutput.body;
928
- return throwDefaultError({
929
- output,
930
- parsedBody,
931
- errorCode,
932
- });
933
- }
934
- };
935
- const de_AssociateTrustStoreCommand = async (output, context) => {
936
- if (output.statusCode !== 200 && output.statusCode >= 300) {
937
- return de_AssociateTrustStoreCommandError(output, context);
938
- }
939
- const contents = (0, smithy_client_1.map)({
940
- $metadata: deserializeMetadata(output),
941
- });
942
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
943
- const doc = (0, smithy_client_1.take)(data, {
944
- portalArn: smithy_client_1.expectString,
945
- trustStoreArn: smithy_client_1.expectString,
946
- });
947
- Object.assign(contents, doc);
948
- return contents;
949
- };
950
- exports.de_AssociateTrustStoreCommand = de_AssociateTrustStoreCommand;
951
- const de_AssociateTrustStoreCommandError = async (output, context) => {
952
- const parsedOutput = {
953
- ...output,
954
- body: await parseErrorBody(output.body, context),
955
- };
956
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
957
- switch (errorCode) {
958
- case "AccessDeniedException":
959
- case "com.amazonaws.workspacesweb#AccessDeniedException":
960
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
961
- case "InternalServerException":
962
- case "com.amazonaws.workspacesweb#InternalServerException":
963
- throw await de_InternalServerExceptionRes(parsedOutput, context);
964
- case "ResourceNotFoundException":
965
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
966
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
967
- case "ThrottlingException":
968
- case "com.amazonaws.workspacesweb#ThrottlingException":
969
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
970
- case "ValidationException":
971
- case "com.amazonaws.workspacesweb#ValidationException":
972
- throw await de_ValidationExceptionRes(parsedOutput, context);
973
- default:
974
- const parsedBody = parsedOutput.body;
975
- return throwDefaultError({
976
- output,
977
- parsedBody,
978
- errorCode,
979
- });
980
- }
981
- };
982
- const de_AssociateUserAccessLoggingSettingsCommand = async (output, context) => {
983
- if (output.statusCode !== 200 && output.statusCode >= 300) {
984
- return de_AssociateUserAccessLoggingSettingsCommandError(output, context);
985
- }
986
- const contents = (0, smithy_client_1.map)({
987
- $metadata: deserializeMetadata(output),
988
- });
989
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
990
- const doc = (0, smithy_client_1.take)(data, {
991
- portalArn: smithy_client_1.expectString,
992
- userAccessLoggingSettingsArn: smithy_client_1.expectString,
993
- });
994
- Object.assign(contents, doc);
995
- return contents;
996
- };
997
- exports.de_AssociateUserAccessLoggingSettingsCommand = de_AssociateUserAccessLoggingSettingsCommand;
998
- const de_AssociateUserAccessLoggingSettingsCommandError = async (output, context) => {
999
- const parsedOutput = {
1000
- ...output,
1001
- body: await parseErrorBody(output.body, context),
1002
- };
1003
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1004
- switch (errorCode) {
1005
- case "AccessDeniedException":
1006
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1007
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1008
- case "ConflictException":
1009
- case "com.amazonaws.workspacesweb#ConflictException":
1010
- throw await de_ConflictExceptionRes(parsedOutput, context);
1011
- case "InternalServerException":
1012
- case "com.amazonaws.workspacesweb#InternalServerException":
1013
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1014
- case "ResourceNotFoundException":
1015
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1016
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1017
- case "ThrottlingException":
1018
- case "com.amazonaws.workspacesweb#ThrottlingException":
1019
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1020
- case "ValidationException":
1021
- case "com.amazonaws.workspacesweb#ValidationException":
1022
- throw await de_ValidationExceptionRes(parsedOutput, context);
1023
- default:
1024
- const parsedBody = parsedOutput.body;
1025
- return throwDefaultError({
1026
- output,
1027
- parsedBody,
1028
- errorCode,
1029
- });
1030
- }
1031
- };
1032
- const de_AssociateUserSettingsCommand = async (output, context) => {
1033
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1034
- return de_AssociateUserSettingsCommandError(output, context);
1035
- }
1036
- const contents = (0, smithy_client_1.map)({
1037
- $metadata: deserializeMetadata(output),
1038
- });
1039
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1040
- const doc = (0, smithy_client_1.take)(data, {
1041
- portalArn: smithy_client_1.expectString,
1042
- userSettingsArn: smithy_client_1.expectString,
1043
- });
1044
- Object.assign(contents, doc);
1045
- return contents;
1046
- };
1047
- exports.de_AssociateUserSettingsCommand = de_AssociateUserSettingsCommand;
1048
- const de_AssociateUserSettingsCommandError = async (output, context) => {
1049
- const parsedOutput = {
1050
- ...output,
1051
- body: await parseErrorBody(output.body, context),
1052
- };
1053
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1054
- switch (errorCode) {
1055
- case "AccessDeniedException":
1056
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1057
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1058
- case "ConflictException":
1059
- case "com.amazonaws.workspacesweb#ConflictException":
1060
- throw await de_ConflictExceptionRes(parsedOutput, context);
1061
- case "InternalServerException":
1062
- case "com.amazonaws.workspacesweb#InternalServerException":
1063
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1064
- case "ResourceNotFoundException":
1065
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1066
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1067
- case "ThrottlingException":
1068
- case "com.amazonaws.workspacesweb#ThrottlingException":
1069
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1070
- case "ValidationException":
1071
- case "com.amazonaws.workspacesweb#ValidationException":
1072
- throw await de_ValidationExceptionRes(parsedOutput, context);
1073
- default:
1074
- const parsedBody = parsedOutput.body;
1075
- return throwDefaultError({
1076
- output,
1077
- parsedBody,
1078
- errorCode,
1079
- });
1080
- }
1081
- };
1082
- const de_CreateBrowserSettingsCommand = async (output, context) => {
1083
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1084
- return de_CreateBrowserSettingsCommandError(output, context);
1085
- }
1086
- const contents = (0, smithy_client_1.map)({
1087
- $metadata: deserializeMetadata(output),
1088
- });
1089
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1090
- const doc = (0, smithy_client_1.take)(data, {
1091
- browserSettingsArn: smithy_client_1.expectString,
1092
- });
1093
- Object.assign(contents, doc);
1094
- return contents;
1095
- };
1096
- exports.de_CreateBrowserSettingsCommand = de_CreateBrowserSettingsCommand;
1097
- const de_CreateBrowserSettingsCommandError = async (output, context) => {
1098
- const parsedOutput = {
1099
- ...output,
1100
- body: await parseErrorBody(output.body, context),
1101
- };
1102
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1103
- switch (errorCode) {
1104
- case "AccessDeniedException":
1105
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1106
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1107
- case "ConflictException":
1108
- case "com.amazonaws.workspacesweb#ConflictException":
1109
- throw await de_ConflictExceptionRes(parsedOutput, context);
1110
- case "InternalServerException":
1111
- case "com.amazonaws.workspacesweb#InternalServerException":
1112
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1113
- case "ResourceNotFoundException":
1114
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1115
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1116
- case "ServiceQuotaExceededException":
1117
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1118
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1119
- case "ThrottlingException":
1120
- case "com.amazonaws.workspacesweb#ThrottlingException":
1121
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1122
- case "ValidationException":
1123
- case "com.amazonaws.workspacesweb#ValidationException":
1124
- throw await de_ValidationExceptionRes(parsedOutput, context);
1125
- default:
1126
- const parsedBody = parsedOutput.body;
1127
- return throwDefaultError({
1128
- output,
1129
- parsedBody,
1130
- errorCode,
1131
- });
1132
- }
1133
- };
1134
- const de_CreateIdentityProviderCommand = async (output, context) => {
1135
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1136
- return de_CreateIdentityProviderCommandError(output, context);
1137
- }
1138
- const contents = (0, smithy_client_1.map)({
1139
- $metadata: deserializeMetadata(output),
1140
- });
1141
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1142
- const doc = (0, smithy_client_1.take)(data, {
1143
- identityProviderArn: smithy_client_1.expectString,
1144
- });
1145
- Object.assign(contents, doc);
1146
- return contents;
1147
- };
1148
- exports.de_CreateIdentityProviderCommand = de_CreateIdentityProviderCommand;
1149
- const de_CreateIdentityProviderCommandError = async (output, context) => {
1150
- const parsedOutput = {
1151
- ...output,
1152
- body: await parseErrorBody(output.body, context),
1153
- };
1154
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1155
- switch (errorCode) {
1156
- case "AccessDeniedException":
1157
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1158
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1159
- case "ConflictException":
1160
- case "com.amazonaws.workspacesweb#ConflictException":
1161
- throw await de_ConflictExceptionRes(parsedOutput, context);
1162
- case "InternalServerException":
1163
- case "com.amazonaws.workspacesweb#InternalServerException":
1164
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1165
- case "ResourceNotFoundException":
1166
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1167
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1168
- case "ServiceQuotaExceededException":
1169
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1170
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1171
- case "ThrottlingException":
1172
- case "com.amazonaws.workspacesweb#ThrottlingException":
1173
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1174
- case "ValidationException":
1175
- case "com.amazonaws.workspacesweb#ValidationException":
1176
- throw await de_ValidationExceptionRes(parsedOutput, context);
1177
- default:
1178
- const parsedBody = parsedOutput.body;
1179
- return throwDefaultError({
1180
- output,
1181
- parsedBody,
1182
- errorCode,
1183
- });
1184
- }
1185
- };
1186
- const de_CreateIpAccessSettingsCommand = async (output, context) => {
1187
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1188
- return de_CreateIpAccessSettingsCommandError(output, context);
1189
- }
1190
- const contents = (0, smithy_client_1.map)({
1191
- $metadata: deserializeMetadata(output),
1192
- });
1193
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1194
- const doc = (0, smithy_client_1.take)(data, {
1195
- ipAccessSettingsArn: smithy_client_1.expectString,
1196
- });
1197
- Object.assign(contents, doc);
1198
- return contents;
1199
- };
1200
- exports.de_CreateIpAccessSettingsCommand = de_CreateIpAccessSettingsCommand;
1201
- const de_CreateIpAccessSettingsCommandError = async (output, context) => {
1202
- const parsedOutput = {
1203
- ...output,
1204
- body: await parseErrorBody(output.body, context),
1205
- };
1206
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1207
- switch (errorCode) {
1208
- case "AccessDeniedException":
1209
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1210
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1211
- case "ConflictException":
1212
- case "com.amazonaws.workspacesweb#ConflictException":
1213
- throw await de_ConflictExceptionRes(parsedOutput, context);
1214
- case "InternalServerException":
1215
- case "com.amazonaws.workspacesweb#InternalServerException":
1216
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1217
- case "ServiceQuotaExceededException":
1218
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1219
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1220
- case "ThrottlingException":
1221
- case "com.amazonaws.workspacesweb#ThrottlingException":
1222
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1223
- case "ValidationException":
1224
- case "com.amazonaws.workspacesweb#ValidationException":
1225
- throw await de_ValidationExceptionRes(parsedOutput, context);
1226
- default:
1227
- const parsedBody = parsedOutput.body;
1228
- return throwDefaultError({
1229
- output,
1230
- parsedBody,
1231
- errorCode,
1232
- });
1233
- }
1234
- };
1235
- const de_CreateNetworkSettingsCommand = async (output, context) => {
1236
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1237
- return de_CreateNetworkSettingsCommandError(output, context);
1238
- }
1239
- const contents = (0, smithy_client_1.map)({
1240
- $metadata: deserializeMetadata(output),
1241
- });
1242
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1243
- const doc = (0, smithy_client_1.take)(data, {
1244
- networkSettingsArn: smithy_client_1.expectString,
1245
- });
1246
- Object.assign(contents, doc);
1247
- return contents;
1248
- };
1249
- exports.de_CreateNetworkSettingsCommand = de_CreateNetworkSettingsCommand;
1250
- const de_CreateNetworkSettingsCommandError = async (output, context) => {
1251
- const parsedOutput = {
1252
- ...output,
1253
- body: await parseErrorBody(output.body, context),
1254
- };
1255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
- switch (errorCode) {
1257
- case "AccessDeniedException":
1258
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1259
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1260
- case "ConflictException":
1261
- case "com.amazonaws.workspacesweb#ConflictException":
1262
- throw await de_ConflictExceptionRes(parsedOutput, context);
1263
- case "InternalServerException":
1264
- case "com.amazonaws.workspacesweb#InternalServerException":
1265
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1266
- case "ServiceQuotaExceededException":
1267
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1268
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1269
- case "ThrottlingException":
1270
- case "com.amazonaws.workspacesweb#ThrottlingException":
1271
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1272
- case "ValidationException":
1273
- case "com.amazonaws.workspacesweb#ValidationException":
1274
- throw await de_ValidationExceptionRes(parsedOutput, context);
1275
- default:
1276
- const parsedBody = parsedOutput.body;
1277
- return throwDefaultError({
1278
- output,
1279
- parsedBody,
1280
- errorCode,
1281
- });
1282
- }
1283
- };
1284
- const de_CreatePortalCommand = async (output, context) => {
1285
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1286
- return de_CreatePortalCommandError(output, context);
1287
- }
1288
- const contents = (0, smithy_client_1.map)({
1289
- $metadata: deserializeMetadata(output),
1290
- });
1291
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1292
- const doc = (0, smithy_client_1.take)(data, {
1293
- portalArn: smithy_client_1.expectString,
1294
- portalEndpoint: smithy_client_1.expectString,
1295
- });
1296
- Object.assign(contents, doc);
1297
- return contents;
1298
- };
1299
- exports.de_CreatePortalCommand = de_CreatePortalCommand;
1300
- const de_CreatePortalCommandError = async (output, context) => {
1301
- const parsedOutput = {
1302
- ...output,
1303
- body: await parseErrorBody(output.body, context),
1304
- };
1305
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1306
- switch (errorCode) {
1307
- case "AccessDeniedException":
1308
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1309
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1310
- case "ConflictException":
1311
- case "com.amazonaws.workspacesweb#ConflictException":
1312
- throw await de_ConflictExceptionRes(parsedOutput, context);
1313
- case "InternalServerException":
1314
- case "com.amazonaws.workspacesweb#InternalServerException":
1315
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1316
- case "ResourceNotFoundException":
1317
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1318
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1319
- case "ServiceQuotaExceededException":
1320
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1321
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1322
- case "ThrottlingException":
1323
- case "com.amazonaws.workspacesweb#ThrottlingException":
1324
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1325
- case "ValidationException":
1326
- case "com.amazonaws.workspacesweb#ValidationException":
1327
- throw await de_ValidationExceptionRes(parsedOutput, context);
1328
- default:
1329
- const parsedBody = parsedOutput.body;
1330
- return throwDefaultError({
1331
- output,
1332
- parsedBody,
1333
- errorCode,
1334
- });
1335
- }
1336
- };
1337
- const de_CreateTrustStoreCommand = async (output, context) => {
1338
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1339
- return de_CreateTrustStoreCommandError(output, context);
1340
- }
1341
- const contents = (0, smithy_client_1.map)({
1342
- $metadata: deserializeMetadata(output),
1343
- });
1344
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1345
- const doc = (0, smithy_client_1.take)(data, {
1346
- trustStoreArn: smithy_client_1.expectString,
1347
- });
1348
- Object.assign(contents, doc);
1349
- return contents;
1350
- };
1351
- exports.de_CreateTrustStoreCommand = de_CreateTrustStoreCommand;
1352
- const de_CreateTrustStoreCommandError = async (output, context) => {
1353
- const parsedOutput = {
1354
- ...output,
1355
- body: await parseErrorBody(output.body, context),
1356
- };
1357
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1358
- switch (errorCode) {
1359
- case "AccessDeniedException":
1360
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1361
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1362
- case "ConflictException":
1363
- case "com.amazonaws.workspacesweb#ConflictException":
1364
- throw await de_ConflictExceptionRes(parsedOutput, context);
1365
- case "InternalServerException":
1366
- case "com.amazonaws.workspacesweb#InternalServerException":
1367
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1368
- case "ServiceQuotaExceededException":
1369
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1370
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1371
- case "ThrottlingException":
1372
- case "com.amazonaws.workspacesweb#ThrottlingException":
1373
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1374
- case "ValidationException":
1375
- case "com.amazonaws.workspacesweb#ValidationException":
1376
- throw await de_ValidationExceptionRes(parsedOutput, context);
1377
- default:
1378
- const parsedBody = parsedOutput.body;
1379
- return throwDefaultError({
1380
- output,
1381
- parsedBody,
1382
- errorCode,
1383
- });
1384
- }
1385
- };
1386
- const de_CreateUserAccessLoggingSettingsCommand = async (output, context) => {
1387
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1388
- return de_CreateUserAccessLoggingSettingsCommandError(output, context);
1389
- }
1390
- const contents = (0, smithy_client_1.map)({
1391
- $metadata: deserializeMetadata(output),
1392
- });
1393
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1394
- const doc = (0, smithy_client_1.take)(data, {
1395
- userAccessLoggingSettingsArn: smithy_client_1.expectString,
1396
- });
1397
- Object.assign(contents, doc);
1398
- return contents;
1399
- };
1400
- exports.de_CreateUserAccessLoggingSettingsCommand = de_CreateUserAccessLoggingSettingsCommand;
1401
- const de_CreateUserAccessLoggingSettingsCommandError = async (output, context) => {
1402
- const parsedOutput = {
1403
- ...output,
1404
- body: await parseErrorBody(output.body, context),
1405
- };
1406
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1407
- switch (errorCode) {
1408
- case "AccessDeniedException":
1409
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1410
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1411
- case "ConflictException":
1412
- case "com.amazonaws.workspacesweb#ConflictException":
1413
- throw await de_ConflictExceptionRes(parsedOutput, context);
1414
- case "InternalServerException":
1415
- case "com.amazonaws.workspacesweb#InternalServerException":
1416
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1417
- case "ServiceQuotaExceededException":
1418
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1419
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1420
- case "ThrottlingException":
1421
- case "com.amazonaws.workspacesweb#ThrottlingException":
1422
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1423
- case "ValidationException":
1424
- case "com.amazonaws.workspacesweb#ValidationException":
1425
- throw await de_ValidationExceptionRes(parsedOutput, context);
1426
- default:
1427
- const parsedBody = parsedOutput.body;
1428
- return throwDefaultError({
1429
- output,
1430
- parsedBody,
1431
- errorCode,
1432
- });
1433
- }
1434
- };
1435
- const de_CreateUserSettingsCommand = async (output, context) => {
1436
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1437
- return de_CreateUserSettingsCommandError(output, context);
1438
- }
1439
- const contents = (0, smithy_client_1.map)({
1440
- $metadata: deserializeMetadata(output),
1441
- });
1442
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1443
- const doc = (0, smithy_client_1.take)(data, {
1444
- userSettingsArn: smithy_client_1.expectString,
1445
- });
1446
- Object.assign(contents, doc);
1447
- return contents;
1448
- };
1449
- exports.de_CreateUserSettingsCommand = de_CreateUserSettingsCommand;
1450
- const de_CreateUserSettingsCommandError = async (output, context) => {
1451
- const parsedOutput = {
1452
- ...output,
1453
- body: await parseErrorBody(output.body, context),
1454
- };
1455
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1456
- switch (errorCode) {
1457
- case "AccessDeniedException":
1458
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1459
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1460
- case "ConflictException":
1461
- case "com.amazonaws.workspacesweb#ConflictException":
1462
- throw await de_ConflictExceptionRes(parsedOutput, context);
1463
- case "InternalServerException":
1464
- case "com.amazonaws.workspacesweb#InternalServerException":
1465
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1466
- case "ServiceQuotaExceededException":
1467
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
1468
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1469
- case "ThrottlingException":
1470
- case "com.amazonaws.workspacesweb#ThrottlingException":
1471
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1472
- case "ValidationException":
1473
- case "com.amazonaws.workspacesweb#ValidationException":
1474
- throw await de_ValidationExceptionRes(parsedOutput, context);
1475
- default:
1476
- const parsedBody = parsedOutput.body;
1477
- return throwDefaultError({
1478
- output,
1479
- parsedBody,
1480
- errorCode,
1481
- });
1482
- }
1483
- };
1484
- const de_DeleteBrowserSettingsCommand = async (output, context) => {
1485
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1486
- return de_DeleteBrowserSettingsCommandError(output, context);
1487
- }
1488
- const contents = (0, smithy_client_1.map)({
1489
- $metadata: deserializeMetadata(output),
1490
- });
1491
- await (0, smithy_client_1.collectBody)(output.body, context);
1492
- return contents;
1493
- };
1494
- exports.de_DeleteBrowserSettingsCommand = de_DeleteBrowserSettingsCommand;
1495
- const de_DeleteBrowserSettingsCommandError = async (output, context) => {
1496
- const parsedOutput = {
1497
- ...output,
1498
- body: await parseErrorBody(output.body, context),
1499
- };
1500
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1501
- switch (errorCode) {
1502
- case "AccessDeniedException":
1503
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1504
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1505
- case "ConflictException":
1506
- case "com.amazonaws.workspacesweb#ConflictException":
1507
- throw await de_ConflictExceptionRes(parsedOutput, context);
1508
- case "InternalServerException":
1509
- case "com.amazonaws.workspacesweb#InternalServerException":
1510
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1511
- case "ThrottlingException":
1512
- case "com.amazonaws.workspacesweb#ThrottlingException":
1513
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1514
- case "ValidationException":
1515
- case "com.amazonaws.workspacesweb#ValidationException":
1516
- throw await de_ValidationExceptionRes(parsedOutput, context);
1517
- default:
1518
- const parsedBody = parsedOutput.body;
1519
- return throwDefaultError({
1520
- output,
1521
- parsedBody,
1522
- errorCode,
1523
- });
1524
- }
1525
- };
1526
- const de_DeleteIdentityProviderCommand = async (output, context) => {
1527
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1528
- return de_DeleteIdentityProviderCommandError(output, context);
1529
- }
1530
- const contents = (0, smithy_client_1.map)({
1531
- $metadata: deserializeMetadata(output),
1532
- });
1533
- await (0, smithy_client_1.collectBody)(output.body, context);
1534
- return contents;
1535
- };
1536
- exports.de_DeleteIdentityProviderCommand = de_DeleteIdentityProviderCommand;
1537
- const de_DeleteIdentityProviderCommandError = async (output, context) => {
1538
- const parsedOutput = {
1539
- ...output,
1540
- body: await parseErrorBody(output.body, context),
1541
- };
1542
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1543
- switch (errorCode) {
1544
- case "AccessDeniedException":
1545
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1546
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1547
- case "ConflictException":
1548
- case "com.amazonaws.workspacesweb#ConflictException":
1549
- throw await de_ConflictExceptionRes(parsedOutput, context);
1550
- case "InternalServerException":
1551
- case "com.amazonaws.workspacesweb#InternalServerException":
1552
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1553
- case "ThrottlingException":
1554
- case "com.amazonaws.workspacesweb#ThrottlingException":
1555
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1556
- case "ValidationException":
1557
- case "com.amazonaws.workspacesweb#ValidationException":
1558
- throw await de_ValidationExceptionRes(parsedOutput, context);
1559
- default:
1560
- const parsedBody = parsedOutput.body;
1561
- return throwDefaultError({
1562
- output,
1563
- parsedBody,
1564
- errorCode,
1565
- });
1566
- }
1567
- };
1568
- const de_DeleteIpAccessSettingsCommand = async (output, context) => {
1569
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1570
- return de_DeleteIpAccessSettingsCommandError(output, context);
1571
- }
1572
- const contents = (0, smithy_client_1.map)({
1573
- $metadata: deserializeMetadata(output),
1574
- });
1575
- await (0, smithy_client_1.collectBody)(output.body, context);
1576
- return contents;
1577
- };
1578
- exports.de_DeleteIpAccessSettingsCommand = de_DeleteIpAccessSettingsCommand;
1579
- const de_DeleteIpAccessSettingsCommandError = async (output, context) => {
1580
- const parsedOutput = {
1581
- ...output,
1582
- body: await parseErrorBody(output.body, context),
1583
- };
1584
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1585
- switch (errorCode) {
1586
- case "AccessDeniedException":
1587
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1588
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1589
- case "ConflictException":
1590
- case "com.amazonaws.workspacesweb#ConflictException":
1591
- throw await de_ConflictExceptionRes(parsedOutput, context);
1592
- case "InternalServerException":
1593
- case "com.amazonaws.workspacesweb#InternalServerException":
1594
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1595
- case "ThrottlingException":
1596
- case "com.amazonaws.workspacesweb#ThrottlingException":
1597
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1598
- case "ValidationException":
1599
- case "com.amazonaws.workspacesweb#ValidationException":
1600
- throw await de_ValidationExceptionRes(parsedOutput, context);
1601
- default:
1602
- const parsedBody = parsedOutput.body;
1603
- return throwDefaultError({
1604
- output,
1605
- parsedBody,
1606
- errorCode,
1607
- });
1608
- }
1609
- };
1610
- const de_DeleteNetworkSettingsCommand = async (output, context) => {
1611
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1612
- return de_DeleteNetworkSettingsCommandError(output, context);
1613
- }
1614
- const contents = (0, smithy_client_1.map)({
1615
- $metadata: deserializeMetadata(output),
1616
- });
1617
- await (0, smithy_client_1.collectBody)(output.body, context);
1618
- return contents;
1619
- };
1620
- exports.de_DeleteNetworkSettingsCommand = de_DeleteNetworkSettingsCommand;
1621
- const de_DeleteNetworkSettingsCommandError = async (output, context) => {
1622
- const parsedOutput = {
1623
- ...output,
1624
- body: await parseErrorBody(output.body, context),
1625
- };
1626
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1627
- switch (errorCode) {
1628
- case "AccessDeniedException":
1629
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1630
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1631
- case "ConflictException":
1632
- case "com.amazonaws.workspacesweb#ConflictException":
1633
- throw await de_ConflictExceptionRes(parsedOutput, context);
1634
- case "InternalServerException":
1635
- case "com.amazonaws.workspacesweb#InternalServerException":
1636
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1637
- case "ThrottlingException":
1638
- case "com.amazonaws.workspacesweb#ThrottlingException":
1639
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1640
- case "ValidationException":
1641
- case "com.amazonaws.workspacesweb#ValidationException":
1642
- throw await de_ValidationExceptionRes(parsedOutput, context);
1643
- default:
1644
- const parsedBody = parsedOutput.body;
1645
- return throwDefaultError({
1646
- output,
1647
- parsedBody,
1648
- errorCode,
1649
- });
1650
- }
1651
- };
1652
- const de_DeletePortalCommand = async (output, context) => {
1653
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1654
- return de_DeletePortalCommandError(output, context);
1655
- }
1656
- const contents = (0, smithy_client_1.map)({
1657
- $metadata: deserializeMetadata(output),
1658
- });
1659
- await (0, smithy_client_1.collectBody)(output.body, context);
1660
- return contents;
1661
- };
1662
- exports.de_DeletePortalCommand = de_DeletePortalCommand;
1663
- const de_DeletePortalCommandError = async (output, context) => {
1664
- const parsedOutput = {
1665
- ...output,
1666
- body: await parseErrorBody(output.body, context),
1667
- };
1668
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1669
- switch (errorCode) {
1670
- case "AccessDeniedException":
1671
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1672
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1673
- case "ConflictException":
1674
- case "com.amazonaws.workspacesweb#ConflictException":
1675
- throw await de_ConflictExceptionRes(parsedOutput, context);
1676
- case "InternalServerException":
1677
- case "com.amazonaws.workspacesweb#InternalServerException":
1678
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1679
- case "ThrottlingException":
1680
- case "com.amazonaws.workspacesweb#ThrottlingException":
1681
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1682
- case "ValidationException":
1683
- case "com.amazonaws.workspacesweb#ValidationException":
1684
- throw await de_ValidationExceptionRes(parsedOutput, context);
1685
- default:
1686
- const parsedBody = parsedOutput.body;
1687
- return throwDefaultError({
1688
- output,
1689
- parsedBody,
1690
- errorCode,
1691
- });
1692
- }
1693
- };
1694
- const de_DeleteTrustStoreCommand = async (output, context) => {
1695
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1696
- return de_DeleteTrustStoreCommandError(output, context);
1697
- }
1698
- const contents = (0, smithy_client_1.map)({
1699
- $metadata: deserializeMetadata(output),
1700
- });
1701
- await (0, smithy_client_1.collectBody)(output.body, context);
1702
- return contents;
1703
- };
1704
- exports.de_DeleteTrustStoreCommand = de_DeleteTrustStoreCommand;
1705
- const de_DeleteTrustStoreCommandError = async (output, context) => {
1706
- const parsedOutput = {
1707
- ...output,
1708
- body: await parseErrorBody(output.body, context),
1709
- };
1710
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1711
- switch (errorCode) {
1712
- case "AccessDeniedException":
1713
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1714
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1715
- case "ConflictException":
1716
- case "com.amazonaws.workspacesweb#ConflictException":
1717
- throw await de_ConflictExceptionRes(parsedOutput, context);
1718
- case "InternalServerException":
1719
- case "com.amazonaws.workspacesweb#InternalServerException":
1720
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1721
- case "ThrottlingException":
1722
- case "com.amazonaws.workspacesweb#ThrottlingException":
1723
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1724
- case "ValidationException":
1725
- case "com.amazonaws.workspacesweb#ValidationException":
1726
- throw await de_ValidationExceptionRes(parsedOutput, context);
1727
- default:
1728
- const parsedBody = parsedOutput.body;
1729
- return throwDefaultError({
1730
- output,
1731
- parsedBody,
1732
- errorCode,
1733
- });
1734
- }
1735
- };
1736
- const de_DeleteUserAccessLoggingSettingsCommand = async (output, context) => {
1737
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1738
- return de_DeleteUserAccessLoggingSettingsCommandError(output, context);
1739
- }
1740
- const contents = (0, smithy_client_1.map)({
1741
- $metadata: deserializeMetadata(output),
1742
- });
1743
- await (0, smithy_client_1.collectBody)(output.body, context);
1744
- return contents;
1745
- };
1746
- exports.de_DeleteUserAccessLoggingSettingsCommand = de_DeleteUserAccessLoggingSettingsCommand;
1747
- const de_DeleteUserAccessLoggingSettingsCommandError = async (output, context) => {
1748
- const parsedOutput = {
1749
- ...output,
1750
- body: await parseErrorBody(output.body, context),
1751
- };
1752
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1753
- switch (errorCode) {
1754
- case "AccessDeniedException":
1755
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1756
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1757
- case "ConflictException":
1758
- case "com.amazonaws.workspacesweb#ConflictException":
1759
- throw await de_ConflictExceptionRes(parsedOutput, context);
1760
- case "InternalServerException":
1761
- case "com.amazonaws.workspacesweb#InternalServerException":
1762
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1763
- case "ThrottlingException":
1764
- case "com.amazonaws.workspacesweb#ThrottlingException":
1765
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1766
- case "ValidationException":
1767
- case "com.amazonaws.workspacesweb#ValidationException":
1768
- throw await de_ValidationExceptionRes(parsedOutput, context);
1769
- default:
1770
- const parsedBody = parsedOutput.body;
1771
- return throwDefaultError({
1772
- output,
1773
- parsedBody,
1774
- errorCode,
1775
- });
1776
- }
1777
- };
1778
- const de_DeleteUserSettingsCommand = async (output, context) => {
1779
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1780
- return de_DeleteUserSettingsCommandError(output, context);
1781
- }
1782
- const contents = (0, smithy_client_1.map)({
1783
- $metadata: deserializeMetadata(output),
1784
- });
1785
- await (0, smithy_client_1.collectBody)(output.body, context);
1786
- return contents;
1787
- };
1788
- exports.de_DeleteUserSettingsCommand = de_DeleteUserSettingsCommand;
1789
- const de_DeleteUserSettingsCommandError = async (output, context) => {
1790
- const parsedOutput = {
1791
- ...output,
1792
- body: await parseErrorBody(output.body, context),
1793
- };
1794
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1795
- switch (errorCode) {
1796
- case "AccessDeniedException":
1797
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1798
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1799
- case "ConflictException":
1800
- case "com.amazonaws.workspacesweb#ConflictException":
1801
- throw await de_ConflictExceptionRes(parsedOutput, context);
1802
- case "InternalServerException":
1803
- case "com.amazonaws.workspacesweb#InternalServerException":
1804
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1805
- case "ThrottlingException":
1806
- case "com.amazonaws.workspacesweb#ThrottlingException":
1807
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1808
- case "ValidationException":
1809
- case "com.amazonaws.workspacesweb#ValidationException":
1810
- throw await de_ValidationExceptionRes(parsedOutput, context);
1811
- default:
1812
- const parsedBody = parsedOutput.body;
1813
- return throwDefaultError({
1814
- output,
1815
- parsedBody,
1816
- errorCode,
1817
- });
1818
- }
1819
- };
1820
- const de_DisassociateBrowserSettingsCommand = async (output, context) => {
1821
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1822
- return de_DisassociateBrowserSettingsCommandError(output, context);
1823
- }
1824
- const contents = (0, smithy_client_1.map)({
1825
- $metadata: deserializeMetadata(output),
1826
- });
1827
- await (0, smithy_client_1.collectBody)(output.body, context);
1828
- return contents;
1829
- };
1830
- exports.de_DisassociateBrowserSettingsCommand = de_DisassociateBrowserSettingsCommand;
1831
- const de_DisassociateBrowserSettingsCommandError = async (output, context) => {
1832
- const parsedOutput = {
1833
- ...output,
1834
- body: await parseErrorBody(output.body, context),
1835
- };
1836
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1837
- switch (errorCode) {
1838
- case "AccessDeniedException":
1839
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1840
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1841
- case "InternalServerException":
1842
- case "com.amazonaws.workspacesweb#InternalServerException":
1843
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1844
- case "ResourceNotFoundException":
1845
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1846
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1847
- case "ThrottlingException":
1848
- case "com.amazonaws.workspacesweb#ThrottlingException":
1849
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1850
- case "ValidationException":
1851
- case "com.amazonaws.workspacesweb#ValidationException":
1852
- throw await de_ValidationExceptionRes(parsedOutput, context);
1853
- default:
1854
- const parsedBody = parsedOutput.body;
1855
- return throwDefaultError({
1856
- output,
1857
- parsedBody,
1858
- errorCode,
1859
- });
1860
- }
1861
- };
1862
- const de_DisassociateIpAccessSettingsCommand = async (output, context) => {
1863
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1864
- return de_DisassociateIpAccessSettingsCommandError(output, context);
1865
- }
1866
- const contents = (0, smithy_client_1.map)({
1867
- $metadata: deserializeMetadata(output),
1868
- });
1869
- await (0, smithy_client_1.collectBody)(output.body, context);
1870
- return contents;
1871
- };
1872
- exports.de_DisassociateIpAccessSettingsCommand = de_DisassociateIpAccessSettingsCommand;
1873
- const de_DisassociateIpAccessSettingsCommandError = async (output, context) => {
1874
- const parsedOutput = {
1875
- ...output,
1876
- body: await parseErrorBody(output.body, context),
1877
- };
1878
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1879
- switch (errorCode) {
1880
- case "AccessDeniedException":
1881
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1882
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1883
- case "InternalServerException":
1884
- case "com.amazonaws.workspacesweb#InternalServerException":
1885
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1886
- case "ResourceNotFoundException":
1887
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1888
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1889
- case "ThrottlingException":
1890
- case "com.amazonaws.workspacesweb#ThrottlingException":
1891
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1892
- case "ValidationException":
1893
- case "com.amazonaws.workspacesweb#ValidationException":
1894
- throw await de_ValidationExceptionRes(parsedOutput, context);
1895
- default:
1896
- const parsedBody = parsedOutput.body;
1897
- return throwDefaultError({
1898
- output,
1899
- parsedBody,
1900
- errorCode,
1901
- });
1902
- }
1903
- };
1904
- const de_DisassociateNetworkSettingsCommand = async (output, context) => {
1905
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1906
- return de_DisassociateNetworkSettingsCommandError(output, context);
1907
- }
1908
- const contents = (0, smithy_client_1.map)({
1909
- $metadata: deserializeMetadata(output),
1910
- });
1911
- await (0, smithy_client_1.collectBody)(output.body, context);
1912
- return contents;
1913
- };
1914
- exports.de_DisassociateNetworkSettingsCommand = de_DisassociateNetworkSettingsCommand;
1915
- const de_DisassociateNetworkSettingsCommandError = async (output, context) => {
1916
- const parsedOutput = {
1917
- ...output,
1918
- body: await parseErrorBody(output.body, context),
1919
- };
1920
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1921
- switch (errorCode) {
1922
- case "AccessDeniedException":
1923
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1924
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1925
- case "InternalServerException":
1926
- case "com.amazonaws.workspacesweb#InternalServerException":
1927
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1928
- case "ResourceNotFoundException":
1929
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1930
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1931
- case "ThrottlingException":
1932
- case "com.amazonaws.workspacesweb#ThrottlingException":
1933
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1934
- case "ValidationException":
1935
- case "com.amazonaws.workspacesweb#ValidationException":
1936
- throw await de_ValidationExceptionRes(parsedOutput, context);
1937
- default:
1938
- const parsedBody = parsedOutput.body;
1939
- return throwDefaultError({
1940
- output,
1941
- parsedBody,
1942
- errorCode,
1943
- });
1944
- }
1945
- };
1946
- const de_DisassociateTrustStoreCommand = async (output, context) => {
1947
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1948
- return de_DisassociateTrustStoreCommandError(output, context);
1949
- }
1950
- const contents = (0, smithy_client_1.map)({
1951
- $metadata: deserializeMetadata(output),
1952
- });
1953
- await (0, smithy_client_1.collectBody)(output.body, context);
1954
- return contents;
1955
- };
1956
- exports.de_DisassociateTrustStoreCommand = de_DisassociateTrustStoreCommand;
1957
- const de_DisassociateTrustStoreCommandError = async (output, context) => {
1958
- const parsedOutput = {
1959
- ...output,
1960
- body: await parseErrorBody(output.body, context),
1961
- };
1962
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1963
- switch (errorCode) {
1964
- case "AccessDeniedException":
1965
- case "com.amazonaws.workspacesweb#AccessDeniedException":
1966
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1967
- case "InternalServerException":
1968
- case "com.amazonaws.workspacesweb#InternalServerException":
1969
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1970
- case "ResourceNotFoundException":
1971
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
1972
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1973
- case "ThrottlingException":
1974
- case "com.amazonaws.workspacesweb#ThrottlingException":
1975
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1976
- case "ValidationException":
1977
- case "com.amazonaws.workspacesweb#ValidationException":
1978
- throw await de_ValidationExceptionRes(parsedOutput, context);
1979
- default:
1980
- const parsedBody = parsedOutput.body;
1981
- return throwDefaultError({
1982
- output,
1983
- parsedBody,
1984
- errorCode,
1985
- });
1986
- }
1987
- };
1988
- const de_DisassociateUserAccessLoggingSettingsCommand = async (output, context) => {
1989
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1990
- return de_DisassociateUserAccessLoggingSettingsCommandError(output, context);
1991
- }
1992
- const contents = (0, smithy_client_1.map)({
1993
- $metadata: deserializeMetadata(output),
1994
- });
1995
- await (0, smithy_client_1.collectBody)(output.body, context);
1996
- return contents;
1997
- };
1998
- exports.de_DisassociateUserAccessLoggingSettingsCommand = de_DisassociateUserAccessLoggingSettingsCommand;
1999
- const de_DisassociateUserAccessLoggingSettingsCommandError = async (output, context) => {
2000
- const parsedOutput = {
2001
- ...output,
2002
- body: await parseErrorBody(output.body, context),
2003
- };
2004
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2005
- switch (errorCode) {
2006
- case "AccessDeniedException":
2007
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2008
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2009
- case "InternalServerException":
2010
- case "com.amazonaws.workspacesweb#InternalServerException":
2011
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2012
- case "ResourceNotFoundException":
2013
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2014
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2015
- case "ThrottlingException":
2016
- case "com.amazonaws.workspacesweb#ThrottlingException":
2017
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2018
- case "ValidationException":
2019
- case "com.amazonaws.workspacesweb#ValidationException":
2020
- throw await de_ValidationExceptionRes(parsedOutput, context);
2021
- default:
2022
- const parsedBody = parsedOutput.body;
2023
- return throwDefaultError({
2024
- output,
2025
- parsedBody,
2026
- errorCode,
2027
- });
2028
- }
2029
- };
2030
- const de_DisassociateUserSettingsCommand = async (output, context) => {
2031
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2032
- return de_DisassociateUserSettingsCommandError(output, context);
2033
- }
2034
- const contents = (0, smithy_client_1.map)({
2035
- $metadata: deserializeMetadata(output),
2036
- });
2037
- await (0, smithy_client_1.collectBody)(output.body, context);
2038
- return contents;
2039
- };
2040
- exports.de_DisassociateUserSettingsCommand = de_DisassociateUserSettingsCommand;
2041
- const de_DisassociateUserSettingsCommandError = async (output, context) => {
2042
- const parsedOutput = {
2043
- ...output,
2044
- body: await parseErrorBody(output.body, context),
2045
- };
2046
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2047
- switch (errorCode) {
2048
- case "AccessDeniedException":
2049
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2050
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2051
- case "InternalServerException":
2052
- case "com.amazonaws.workspacesweb#InternalServerException":
2053
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2054
- case "ResourceNotFoundException":
2055
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2056
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2057
- case "ThrottlingException":
2058
- case "com.amazonaws.workspacesweb#ThrottlingException":
2059
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2060
- case "ValidationException":
2061
- case "com.amazonaws.workspacesweb#ValidationException":
2062
- throw await de_ValidationExceptionRes(parsedOutput, context);
2063
- default:
2064
- const parsedBody = parsedOutput.body;
2065
- return throwDefaultError({
2066
- output,
2067
- parsedBody,
2068
- errorCode,
2069
- });
2070
- }
2071
- };
2072
- const de_GetBrowserSettingsCommand = async (output, context) => {
2073
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2074
- return de_GetBrowserSettingsCommandError(output, context);
2075
- }
2076
- const contents = (0, smithy_client_1.map)({
2077
- $metadata: deserializeMetadata(output),
2078
- });
2079
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2080
- const doc = (0, smithy_client_1.take)(data, {
2081
- browserSettings: smithy_client_1._json,
2082
- });
2083
- Object.assign(contents, doc);
2084
- return contents;
2085
- };
2086
- exports.de_GetBrowserSettingsCommand = de_GetBrowserSettingsCommand;
2087
- const de_GetBrowserSettingsCommandError = async (output, context) => {
2088
- const parsedOutput = {
2089
- ...output,
2090
- body: await parseErrorBody(output.body, context),
2091
- };
2092
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2093
- switch (errorCode) {
2094
- case "AccessDeniedException":
2095
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2096
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2097
- case "InternalServerException":
2098
- case "com.amazonaws.workspacesweb#InternalServerException":
2099
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2100
- case "ResourceNotFoundException":
2101
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2102
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2103
- case "ThrottlingException":
2104
- case "com.amazonaws.workspacesweb#ThrottlingException":
2105
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2106
- case "ValidationException":
2107
- case "com.amazonaws.workspacesweb#ValidationException":
2108
- throw await de_ValidationExceptionRes(parsedOutput, context);
2109
- default:
2110
- const parsedBody = parsedOutput.body;
2111
- return throwDefaultError({
2112
- output,
2113
- parsedBody,
2114
- errorCode,
2115
- });
2116
- }
2117
- };
2118
- const de_GetIdentityProviderCommand = async (output, context) => {
2119
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2120
- return de_GetIdentityProviderCommandError(output, context);
2121
- }
2122
- const contents = (0, smithy_client_1.map)({
2123
- $metadata: deserializeMetadata(output),
2124
- });
2125
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2126
- const doc = (0, smithy_client_1.take)(data, {
2127
- identityProvider: smithy_client_1._json,
2128
- });
2129
- Object.assign(contents, doc);
2130
- return contents;
2131
- };
2132
- exports.de_GetIdentityProviderCommand = de_GetIdentityProviderCommand;
2133
- const de_GetIdentityProviderCommandError = async (output, context) => {
2134
- const parsedOutput = {
2135
- ...output,
2136
- body: await parseErrorBody(output.body, context),
2137
- };
2138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2139
- switch (errorCode) {
2140
- case "AccessDeniedException":
2141
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2142
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2143
- case "InternalServerException":
2144
- case "com.amazonaws.workspacesweb#InternalServerException":
2145
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2146
- case "ResourceNotFoundException":
2147
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2148
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2149
- case "ThrottlingException":
2150
- case "com.amazonaws.workspacesweb#ThrottlingException":
2151
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2152
- case "ValidationException":
2153
- case "com.amazonaws.workspacesweb#ValidationException":
2154
- throw await de_ValidationExceptionRes(parsedOutput, context);
2155
- default:
2156
- const parsedBody = parsedOutput.body;
2157
- return throwDefaultError({
2158
- output,
2159
- parsedBody,
2160
- errorCode,
2161
- });
2162
- }
2163
- };
2164
- const de_GetIpAccessSettingsCommand = async (output, context) => {
2165
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2166
- return de_GetIpAccessSettingsCommandError(output, context);
2167
- }
2168
- const contents = (0, smithy_client_1.map)({
2169
- $metadata: deserializeMetadata(output),
2170
- });
2171
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2172
- const doc = (0, smithy_client_1.take)(data, {
2173
- ipAccessSettings: (_) => de_IpAccessSettings(_, context),
2174
- });
2175
- Object.assign(contents, doc);
2176
- return contents;
2177
- };
2178
- exports.de_GetIpAccessSettingsCommand = de_GetIpAccessSettingsCommand;
2179
- const de_GetIpAccessSettingsCommandError = async (output, context) => {
2180
- const parsedOutput = {
2181
- ...output,
2182
- body: await parseErrorBody(output.body, context),
2183
- };
2184
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2185
- switch (errorCode) {
2186
- case "AccessDeniedException":
2187
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2188
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2189
- case "InternalServerException":
2190
- case "com.amazonaws.workspacesweb#InternalServerException":
2191
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2192
- case "ResourceNotFoundException":
2193
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2194
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2195
- case "ThrottlingException":
2196
- case "com.amazonaws.workspacesweb#ThrottlingException":
2197
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2198
- case "ValidationException":
2199
- case "com.amazonaws.workspacesweb#ValidationException":
2200
- throw await de_ValidationExceptionRes(parsedOutput, context);
2201
- default:
2202
- const parsedBody = parsedOutput.body;
2203
- return throwDefaultError({
2204
- output,
2205
- parsedBody,
2206
- errorCode,
2207
- });
2208
- }
2209
- };
2210
- const de_GetNetworkSettingsCommand = async (output, context) => {
2211
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2212
- return de_GetNetworkSettingsCommandError(output, context);
2213
- }
2214
- const contents = (0, smithy_client_1.map)({
2215
- $metadata: deserializeMetadata(output),
2216
- });
2217
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2218
- const doc = (0, smithy_client_1.take)(data, {
2219
- networkSettings: smithy_client_1._json,
2220
- });
2221
- Object.assign(contents, doc);
2222
- return contents;
2223
- };
2224
- exports.de_GetNetworkSettingsCommand = de_GetNetworkSettingsCommand;
2225
- const de_GetNetworkSettingsCommandError = async (output, context) => {
2226
- const parsedOutput = {
2227
- ...output,
2228
- body: await parseErrorBody(output.body, context),
2229
- };
2230
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2231
- switch (errorCode) {
2232
- case "AccessDeniedException":
2233
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2234
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2235
- case "InternalServerException":
2236
- case "com.amazonaws.workspacesweb#InternalServerException":
2237
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2238
- case "ResourceNotFoundException":
2239
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2240
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2241
- case "ThrottlingException":
2242
- case "com.amazonaws.workspacesweb#ThrottlingException":
2243
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2244
- case "ValidationException":
2245
- case "com.amazonaws.workspacesweb#ValidationException":
2246
- throw await de_ValidationExceptionRes(parsedOutput, context);
2247
- default:
2248
- const parsedBody = parsedOutput.body;
2249
- return throwDefaultError({
2250
- output,
2251
- parsedBody,
2252
- errorCode,
2253
- });
2254
- }
2255
- };
2256
- const de_GetPortalCommand = async (output, context) => {
2257
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2258
- return de_GetPortalCommandError(output, context);
2259
- }
2260
- const contents = (0, smithy_client_1.map)({
2261
- $metadata: deserializeMetadata(output),
2262
- });
2263
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2264
- const doc = (0, smithy_client_1.take)(data, {
2265
- portal: (_) => de_Portal(_, context),
2266
- });
2267
- Object.assign(contents, doc);
2268
- return contents;
2269
- };
2270
- exports.de_GetPortalCommand = de_GetPortalCommand;
2271
- const de_GetPortalCommandError = async (output, context) => {
2272
- const parsedOutput = {
2273
- ...output,
2274
- body: await parseErrorBody(output.body, context),
2275
- };
2276
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2277
- switch (errorCode) {
2278
- case "AccessDeniedException":
2279
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2280
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2281
- case "InternalServerException":
2282
- case "com.amazonaws.workspacesweb#InternalServerException":
2283
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2284
- case "ResourceNotFoundException":
2285
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2286
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2287
- case "ThrottlingException":
2288
- case "com.amazonaws.workspacesweb#ThrottlingException":
2289
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2290
- case "ValidationException":
2291
- case "com.amazonaws.workspacesweb#ValidationException":
2292
- throw await de_ValidationExceptionRes(parsedOutput, context);
2293
- default:
2294
- const parsedBody = parsedOutput.body;
2295
- return throwDefaultError({
2296
- output,
2297
- parsedBody,
2298
- errorCode,
2299
- });
2300
- }
2301
- };
2302
- const de_GetPortalServiceProviderMetadataCommand = async (output, context) => {
2303
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2304
- return de_GetPortalServiceProviderMetadataCommandError(output, context);
2305
- }
2306
- const contents = (0, smithy_client_1.map)({
2307
- $metadata: deserializeMetadata(output),
2308
- });
2309
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2310
- const doc = (0, smithy_client_1.take)(data, {
2311
- portalArn: smithy_client_1.expectString,
2312
- serviceProviderSamlMetadata: smithy_client_1.expectString,
2313
- });
2314
- Object.assign(contents, doc);
2315
- return contents;
2316
- };
2317
- exports.de_GetPortalServiceProviderMetadataCommand = de_GetPortalServiceProviderMetadataCommand;
2318
- const de_GetPortalServiceProviderMetadataCommandError = async (output, context) => {
2319
- const parsedOutput = {
2320
- ...output,
2321
- body: await parseErrorBody(output.body, context),
2322
- };
2323
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2324
- switch (errorCode) {
2325
- case "AccessDeniedException":
2326
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2327
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2328
- case "InternalServerException":
2329
- case "com.amazonaws.workspacesweb#InternalServerException":
2330
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2331
- case "ResourceNotFoundException":
2332
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2333
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2334
- case "ThrottlingException":
2335
- case "com.amazonaws.workspacesweb#ThrottlingException":
2336
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2337
- case "ValidationException":
2338
- case "com.amazonaws.workspacesweb#ValidationException":
2339
- throw await de_ValidationExceptionRes(parsedOutput, context);
2340
- default:
2341
- const parsedBody = parsedOutput.body;
2342
- return throwDefaultError({
2343
- output,
2344
- parsedBody,
2345
- errorCode,
2346
- });
2347
- }
2348
- };
2349
- const de_GetTrustStoreCommand = async (output, context) => {
2350
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2351
- return de_GetTrustStoreCommandError(output, context);
2352
- }
2353
- const contents = (0, smithy_client_1.map)({
2354
- $metadata: deserializeMetadata(output),
2355
- });
2356
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2357
- const doc = (0, smithy_client_1.take)(data, {
2358
- trustStore: smithy_client_1._json,
2359
- });
2360
- Object.assign(contents, doc);
2361
- return contents;
2362
- };
2363
- exports.de_GetTrustStoreCommand = de_GetTrustStoreCommand;
2364
- const de_GetTrustStoreCommandError = async (output, context) => {
2365
- const parsedOutput = {
2366
- ...output,
2367
- body: await parseErrorBody(output.body, context),
2368
- };
2369
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2370
- switch (errorCode) {
2371
- case "AccessDeniedException":
2372
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2373
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2374
- case "InternalServerException":
2375
- case "com.amazonaws.workspacesweb#InternalServerException":
2376
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2377
- case "ResourceNotFoundException":
2378
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2379
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2380
- case "ThrottlingException":
2381
- case "com.amazonaws.workspacesweb#ThrottlingException":
2382
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2383
- case "ValidationException":
2384
- case "com.amazonaws.workspacesweb#ValidationException":
2385
- throw await de_ValidationExceptionRes(parsedOutput, context);
2386
- default:
2387
- const parsedBody = parsedOutput.body;
2388
- return throwDefaultError({
2389
- output,
2390
- parsedBody,
2391
- errorCode,
2392
- });
2393
- }
2394
- };
2395
- const de_GetTrustStoreCertificateCommand = async (output, context) => {
2396
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2397
- return de_GetTrustStoreCertificateCommandError(output, context);
2398
- }
2399
- const contents = (0, smithy_client_1.map)({
2400
- $metadata: deserializeMetadata(output),
2401
- });
2402
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2403
- const doc = (0, smithy_client_1.take)(data, {
2404
- certificate: (_) => de_Certificate(_, context),
2405
- trustStoreArn: smithy_client_1.expectString,
2406
- });
2407
- Object.assign(contents, doc);
2408
- return contents;
2409
- };
2410
- exports.de_GetTrustStoreCertificateCommand = de_GetTrustStoreCertificateCommand;
2411
- const de_GetTrustStoreCertificateCommandError = async (output, context) => {
2412
- const parsedOutput = {
2413
- ...output,
2414
- body: await parseErrorBody(output.body, context),
2415
- };
2416
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2417
- switch (errorCode) {
2418
- case "AccessDeniedException":
2419
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2420
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2421
- case "InternalServerException":
2422
- case "com.amazonaws.workspacesweb#InternalServerException":
2423
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2424
- case "ResourceNotFoundException":
2425
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2426
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2427
- case "ThrottlingException":
2428
- case "com.amazonaws.workspacesweb#ThrottlingException":
2429
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2430
- case "ValidationException":
2431
- case "com.amazonaws.workspacesweb#ValidationException":
2432
- throw await de_ValidationExceptionRes(parsedOutput, context);
2433
- default:
2434
- const parsedBody = parsedOutput.body;
2435
- return throwDefaultError({
2436
- output,
2437
- parsedBody,
2438
- errorCode,
2439
- });
2440
- }
2441
- };
2442
- const de_GetUserAccessLoggingSettingsCommand = async (output, context) => {
2443
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2444
- return de_GetUserAccessLoggingSettingsCommandError(output, context);
2445
- }
2446
- const contents = (0, smithy_client_1.map)({
2447
- $metadata: deserializeMetadata(output),
2448
- });
2449
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2450
- const doc = (0, smithy_client_1.take)(data, {
2451
- userAccessLoggingSettings: smithy_client_1._json,
2452
- });
2453
- Object.assign(contents, doc);
2454
- return contents;
2455
- };
2456
- exports.de_GetUserAccessLoggingSettingsCommand = de_GetUserAccessLoggingSettingsCommand;
2457
- const de_GetUserAccessLoggingSettingsCommandError = async (output, context) => {
2458
- const parsedOutput = {
2459
- ...output,
2460
- body: await parseErrorBody(output.body, context),
2461
- };
2462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2463
- switch (errorCode) {
2464
- case "AccessDeniedException":
2465
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2466
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2467
- case "InternalServerException":
2468
- case "com.amazonaws.workspacesweb#InternalServerException":
2469
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2470
- case "ResourceNotFoundException":
2471
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2472
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2473
- case "ThrottlingException":
2474
- case "com.amazonaws.workspacesweb#ThrottlingException":
2475
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2476
- case "ValidationException":
2477
- case "com.amazonaws.workspacesweb#ValidationException":
2478
- throw await de_ValidationExceptionRes(parsedOutput, context);
2479
- default:
2480
- const parsedBody = parsedOutput.body;
2481
- return throwDefaultError({
2482
- output,
2483
- parsedBody,
2484
- errorCode,
2485
- });
2486
- }
2487
- };
2488
- const de_GetUserSettingsCommand = async (output, context) => {
2489
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2490
- return de_GetUserSettingsCommandError(output, context);
2491
- }
2492
- const contents = (0, smithy_client_1.map)({
2493
- $metadata: deserializeMetadata(output),
2494
- });
2495
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2496
- const doc = (0, smithy_client_1.take)(data, {
2497
- userSettings: smithy_client_1._json,
2498
- });
2499
- Object.assign(contents, doc);
2500
- return contents;
2501
- };
2502
- exports.de_GetUserSettingsCommand = de_GetUserSettingsCommand;
2503
- const de_GetUserSettingsCommandError = async (output, context) => {
2504
- const parsedOutput = {
2505
- ...output,
2506
- body: await parseErrorBody(output.body, context),
2507
- };
2508
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2509
- switch (errorCode) {
2510
- case "AccessDeniedException":
2511
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2512
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2513
- case "InternalServerException":
2514
- case "com.amazonaws.workspacesweb#InternalServerException":
2515
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2516
- case "ResourceNotFoundException":
2517
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2518
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2519
- case "ThrottlingException":
2520
- case "com.amazonaws.workspacesweb#ThrottlingException":
2521
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2522
- case "ValidationException":
2523
- case "com.amazonaws.workspacesweb#ValidationException":
2524
- throw await de_ValidationExceptionRes(parsedOutput, context);
2525
- default:
2526
- const parsedBody = parsedOutput.body;
2527
- return throwDefaultError({
2528
- output,
2529
- parsedBody,
2530
- errorCode,
2531
- });
2532
- }
2533
- };
2534
- const de_ListBrowserSettingsCommand = async (output, context) => {
2535
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2536
- return de_ListBrowserSettingsCommandError(output, context);
2537
- }
2538
- const contents = (0, smithy_client_1.map)({
2539
- $metadata: deserializeMetadata(output),
2540
- });
2541
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2542
- const doc = (0, smithy_client_1.take)(data, {
2543
- browserSettings: smithy_client_1._json,
2544
- nextToken: smithy_client_1.expectString,
2545
- });
2546
- Object.assign(contents, doc);
2547
- return contents;
2548
- };
2549
- exports.de_ListBrowserSettingsCommand = de_ListBrowserSettingsCommand;
2550
- const de_ListBrowserSettingsCommandError = async (output, context) => {
2551
- const parsedOutput = {
2552
- ...output,
2553
- body: await parseErrorBody(output.body, context),
2554
- };
2555
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2556
- switch (errorCode) {
2557
- case "AccessDeniedException":
2558
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2559
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2560
- case "InternalServerException":
2561
- case "com.amazonaws.workspacesweb#InternalServerException":
2562
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2563
- case "ThrottlingException":
2564
- case "com.amazonaws.workspacesweb#ThrottlingException":
2565
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2566
- case "ValidationException":
2567
- case "com.amazonaws.workspacesweb#ValidationException":
2568
- throw await de_ValidationExceptionRes(parsedOutput, context);
2569
- default:
2570
- const parsedBody = parsedOutput.body;
2571
- return throwDefaultError({
2572
- output,
2573
- parsedBody,
2574
- errorCode,
2575
- });
2576
- }
2577
- };
2578
- const de_ListIdentityProvidersCommand = async (output, context) => {
2579
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2580
- return de_ListIdentityProvidersCommandError(output, context);
2581
- }
2582
- const contents = (0, smithy_client_1.map)({
2583
- $metadata: deserializeMetadata(output),
2584
- });
2585
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2586
- const doc = (0, smithy_client_1.take)(data, {
2587
- identityProviders: smithy_client_1._json,
2588
- nextToken: smithy_client_1.expectString,
2589
- });
2590
- Object.assign(contents, doc);
2591
- return contents;
2592
- };
2593
- exports.de_ListIdentityProvidersCommand = de_ListIdentityProvidersCommand;
2594
- const de_ListIdentityProvidersCommandError = async (output, context) => {
2595
- const parsedOutput = {
2596
- ...output,
2597
- body: await parseErrorBody(output.body, context),
2598
- };
2599
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2600
- switch (errorCode) {
2601
- case "AccessDeniedException":
2602
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2603
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2604
- case "InternalServerException":
2605
- case "com.amazonaws.workspacesweb#InternalServerException":
2606
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2607
- case "ThrottlingException":
2608
- case "com.amazonaws.workspacesweb#ThrottlingException":
2609
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2610
- case "ValidationException":
2611
- case "com.amazonaws.workspacesweb#ValidationException":
2612
- throw await de_ValidationExceptionRes(parsedOutput, context);
2613
- default:
2614
- const parsedBody = parsedOutput.body;
2615
- return throwDefaultError({
2616
- output,
2617
- parsedBody,
2618
- errorCode,
2619
- });
2620
- }
2621
- };
2622
- const de_ListIpAccessSettingsCommand = async (output, context) => {
2623
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2624
- return de_ListIpAccessSettingsCommandError(output, context);
2625
- }
2626
- const contents = (0, smithy_client_1.map)({
2627
- $metadata: deserializeMetadata(output),
2628
- });
2629
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2630
- const doc = (0, smithy_client_1.take)(data, {
2631
- ipAccessSettings: (_) => de_IpAccessSettingsList(_, context),
2632
- nextToken: smithy_client_1.expectString,
2633
- });
2634
- Object.assign(contents, doc);
2635
- return contents;
2636
- };
2637
- exports.de_ListIpAccessSettingsCommand = de_ListIpAccessSettingsCommand;
2638
- const de_ListIpAccessSettingsCommandError = async (output, context) => {
2639
- const parsedOutput = {
2640
- ...output,
2641
- body: await parseErrorBody(output.body, context),
2642
- };
2643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2644
- switch (errorCode) {
2645
- case "AccessDeniedException":
2646
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2647
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2648
- case "InternalServerException":
2649
- case "com.amazonaws.workspacesweb#InternalServerException":
2650
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2651
- case "ThrottlingException":
2652
- case "com.amazonaws.workspacesweb#ThrottlingException":
2653
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2654
- case "ValidationException":
2655
- case "com.amazonaws.workspacesweb#ValidationException":
2656
- throw await de_ValidationExceptionRes(parsedOutput, context);
2657
- default:
2658
- const parsedBody = parsedOutput.body;
2659
- return throwDefaultError({
2660
- output,
2661
- parsedBody,
2662
- errorCode,
2663
- });
2664
- }
2665
- };
2666
- const de_ListNetworkSettingsCommand = async (output, context) => {
2667
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2668
- return de_ListNetworkSettingsCommandError(output, context);
2669
- }
2670
- const contents = (0, smithy_client_1.map)({
2671
- $metadata: deserializeMetadata(output),
2672
- });
2673
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2674
- const doc = (0, smithy_client_1.take)(data, {
2675
- networkSettings: smithy_client_1._json,
2676
- nextToken: smithy_client_1.expectString,
2677
- });
2678
- Object.assign(contents, doc);
2679
- return contents;
2680
- };
2681
- exports.de_ListNetworkSettingsCommand = de_ListNetworkSettingsCommand;
2682
- const de_ListNetworkSettingsCommandError = async (output, context) => {
2683
- const parsedOutput = {
2684
- ...output,
2685
- body: await parseErrorBody(output.body, context),
2686
- };
2687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2688
- switch (errorCode) {
2689
- case "AccessDeniedException":
2690
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2691
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2692
- case "InternalServerException":
2693
- case "com.amazonaws.workspacesweb#InternalServerException":
2694
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2695
- case "ThrottlingException":
2696
- case "com.amazonaws.workspacesweb#ThrottlingException":
2697
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2698
- case "ValidationException":
2699
- case "com.amazonaws.workspacesweb#ValidationException":
2700
- throw await de_ValidationExceptionRes(parsedOutput, context);
2701
- default:
2702
- const parsedBody = parsedOutput.body;
2703
- return throwDefaultError({
2704
- output,
2705
- parsedBody,
2706
- errorCode,
2707
- });
2708
- }
2709
- };
2710
- const de_ListPortalsCommand = async (output, context) => {
2711
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2712
- return de_ListPortalsCommandError(output, context);
2713
- }
2714
- const contents = (0, smithy_client_1.map)({
2715
- $metadata: deserializeMetadata(output),
2716
- });
2717
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2718
- const doc = (0, smithy_client_1.take)(data, {
2719
- nextToken: smithy_client_1.expectString,
2720
- portals: (_) => de_PortalList(_, context),
2721
- });
2722
- Object.assign(contents, doc);
2723
- return contents;
2724
- };
2725
- exports.de_ListPortalsCommand = de_ListPortalsCommand;
2726
- const de_ListPortalsCommandError = async (output, context) => {
2727
- const parsedOutput = {
2728
- ...output,
2729
- body: await parseErrorBody(output.body, context),
2730
- };
2731
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2732
- switch (errorCode) {
2733
- case "AccessDeniedException":
2734
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2735
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2736
- case "InternalServerException":
2737
- case "com.amazonaws.workspacesweb#InternalServerException":
2738
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2739
- case "ThrottlingException":
2740
- case "com.amazonaws.workspacesweb#ThrottlingException":
2741
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2742
- case "ValidationException":
2743
- case "com.amazonaws.workspacesweb#ValidationException":
2744
- throw await de_ValidationExceptionRes(parsedOutput, context);
2745
- default:
2746
- const parsedBody = parsedOutput.body;
2747
- return throwDefaultError({
2748
- output,
2749
- parsedBody,
2750
- errorCode,
2751
- });
2752
- }
2753
- };
2754
- const de_ListTagsForResourceCommand = async (output, context) => {
2755
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2756
- return de_ListTagsForResourceCommandError(output, context);
2757
- }
2758
- const contents = (0, smithy_client_1.map)({
2759
- $metadata: deserializeMetadata(output),
2760
- });
2761
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2762
- const doc = (0, smithy_client_1.take)(data, {
2763
- tags: smithy_client_1._json,
2764
- });
2765
- Object.assign(contents, doc);
2766
- return contents;
2767
- };
2768
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
2769
- const de_ListTagsForResourceCommandError = async (output, context) => {
2770
- const parsedOutput = {
2771
- ...output,
2772
- body: await parseErrorBody(output.body, context),
2773
- };
2774
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2775
- switch (errorCode) {
2776
- case "AccessDeniedException":
2777
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2778
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2779
- case "InternalServerException":
2780
- case "com.amazonaws.workspacesweb#InternalServerException":
2781
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2782
- case "ResourceNotFoundException":
2783
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2784
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2785
- case "ThrottlingException":
2786
- case "com.amazonaws.workspacesweb#ThrottlingException":
2787
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2788
- case "ValidationException":
2789
- case "com.amazonaws.workspacesweb#ValidationException":
2790
- throw await de_ValidationExceptionRes(parsedOutput, context);
2791
- default:
2792
- const parsedBody = parsedOutput.body;
2793
- return throwDefaultError({
2794
- output,
2795
- parsedBody,
2796
- errorCode,
2797
- });
2798
- }
2799
- };
2800
- const de_ListTrustStoreCertificatesCommand = async (output, context) => {
2801
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2802
- return de_ListTrustStoreCertificatesCommandError(output, context);
2803
- }
2804
- const contents = (0, smithy_client_1.map)({
2805
- $metadata: deserializeMetadata(output),
2806
- });
2807
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2808
- const doc = (0, smithy_client_1.take)(data, {
2809
- certificateList: (_) => de_CertificateSummaryList(_, context),
2810
- nextToken: smithy_client_1.expectString,
2811
- trustStoreArn: smithy_client_1.expectString,
2812
- });
2813
- Object.assign(contents, doc);
2814
- return contents;
2815
- };
2816
- exports.de_ListTrustStoreCertificatesCommand = de_ListTrustStoreCertificatesCommand;
2817
- const de_ListTrustStoreCertificatesCommandError = async (output, context) => {
2818
- const parsedOutput = {
2819
- ...output,
2820
- body: await parseErrorBody(output.body, context),
2821
- };
2822
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2823
- switch (errorCode) {
2824
- case "AccessDeniedException":
2825
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2826
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2827
- case "InternalServerException":
2828
- case "com.amazonaws.workspacesweb#InternalServerException":
2829
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2830
- case "ResourceNotFoundException":
2831
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
2832
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2833
- case "ThrottlingException":
2834
- case "com.amazonaws.workspacesweb#ThrottlingException":
2835
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2836
- case "ValidationException":
2837
- case "com.amazonaws.workspacesweb#ValidationException":
2838
- throw await de_ValidationExceptionRes(parsedOutput, context);
2839
- default:
2840
- const parsedBody = parsedOutput.body;
2841
- return throwDefaultError({
2842
- output,
2843
- parsedBody,
2844
- errorCode,
2845
- });
2846
- }
2847
- };
2848
- const de_ListTrustStoresCommand = async (output, context) => {
2849
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2850
- return de_ListTrustStoresCommandError(output, context);
2851
- }
2852
- const contents = (0, smithy_client_1.map)({
2853
- $metadata: deserializeMetadata(output),
2854
- });
2855
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2856
- const doc = (0, smithy_client_1.take)(data, {
2857
- nextToken: smithy_client_1.expectString,
2858
- trustStores: smithy_client_1._json,
2859
- });
2860
- Object.assign(contents, doc);
2861
- return contents;
2862
- };
2863
- exports.de_ListTrustStoresCommand = de_ListTrustStoresCommand;
2864
- const de_ListTrustStoresCommandError = async (output, context) => {
2865
- const parsedOutput = {
2866
- ...output,
2867
- body: await parseErrorBody(output.body, context),
2868
- };
2869
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2870
- switch (errorCode) {
2871
- case "AccessDeniedException":
2872
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2873
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2874
- case "InternalServerException":
2875
- case "com.amazonaws.workspacesweb#InternalServerException":
2876
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2877
- case "ThrottlingException":
2878
- case "com.amazonaws.workspacesweb#ThrottlingException":
2879
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2880
- case "ValidationException":
2881
- case "com.amazonaws.workspacesweb#ValidationException":
2882
- throw await de_ValidationExceptionRes(parsedOutput, context);
2883
- default:
2884
- const parsedBody = parsedOutput.body;
2885
- return throwDefaultError({
2886
- output,
2887
- parsedBody,
2888
- errorCode,
2889
- });
2890
- }
2891
- };
2892
- const de_ListUserAccessLoggingSettingsCommand = async (output, context) => {
2893
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2894
- return de_ListUserAccessLoggingSettingsCommandError(output, context);
2895
- }
2896
- const contents = (0, smithy_client_1.map)({
2897
- $metadata: deserializeMetadata(output),
2898
- });
2899
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2900
- const doc = (0, smithy_client_1.take)(data, {
2901
- nextToken: smithy_client_1.expectString,
2902
- userAccessLoggingSettings: smithy_client_1._json,
2903
- });
2904
- Object.assign(contents, doc);
2905
- return contents;
2906
- };
2907
- exports.de_ListUserAccessLoggingSettingsCommand = de_ListUserAccessLoggingSettingsCommand;
2908
- const de_ListUserAccessLoggingSettingsCommandError = async (output, context) => {
2909
- const parsedOutput = {
2910
- ...output,
2911
- body: await parseErrorBody(output.body, context),
2912
- };
2913
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2914
- switch (errorCode) {
2915
- case "AccessDeniedException":
2916
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2917
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2918
- case "InternalServerException":
2919
- case "com.amazonaws.workspacesweb#InternalServerException":
2920
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2921
- case "ThrottlingException":
2922
- case "com.amazonaws.workspacesweb#ThrottlingException":
2923
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2924
- case "ValidationException":
2925
- case "com.amazonaws.workspacesweb#ValidationException":
2926
- throw await de_ValidationExceptionRes(parsedOutput, context);
2927
- default:
2928
- const parsedBody = parsedOutput.body;
2929
- return throwDefaultError({
2930
- output,
2931
- parsedBody,
2932
- errorCode,
2933
- });
2934
- }
2935
- };
2936
- const de_ListUserSettingsCommand = async (output, context) => {
2937
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2938
- return de_ListUserSettingsCommandError(output, context);
2939
- }
2940
- const contents = (0, smithy_client_1.map)({
2941
- $metadata: deserializeMetadata(output),
2942
- });
2943
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2944
- const doc = (0, smithy_client_1.take)(data, {
2945
- nextToken: smithy_client_1.expectString,
2946
- userSettings: smithy_client_1._json,
2947
- });
2948
- Object.assign(contents, doc);
2949
- return contents;
2950
- };
2951
- exports.de_ListUserSettingsCommand = de_ListUserSettingsCommand;
2952
- const de_ListUserSettingsCommandError = async (output, context) => {
2953
- const parsedOutput = {
2954
- ...output,
2955
- body: await parseErrorBody(output.body, context),
2956
- };
2957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2958
- switch (errorCode) {
2959
- case "AccessDeniedException":
2960
- case "com.amazonaws.workspacesweb#AccessDeniedException":
2961
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2962
- case "InternalServerException":
2963
- case "com.amazonaws.workspacesweb#InternalServerException":
2964
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2965
- case "ThrottlingException":
2966
- case "com.amazonaws.workspacesweb#ThrottlingException":
2967
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2968
- case "ValidationException":
2969
- case "com.amazonaws.workspacesweb#ValidationException":
2970
- throw await de_ValidationExceptionRes(parsedOutput, context);
2971
- default:
2972
- const parsedBody = parsedOutput.body;
2973
- return throwDefaultError({
2974
- output,
2975
- parsedBody,
2976
- errorCode,
2977
- });
2978
- }
2979
- };
2980
- const de_TagResourceCommand = async (output, context) => {
2981
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2982
- return de_TagResourceCommandError(output, context);
2983
- }
2984
- const contents = (0, smithy_client_1.map)({
2985
- $metadata: deserializeMetadata(output),
2986
- });
2987
- await (0, smithy_client_1.collectBody)(output.body, context);
2988
- return contents;
2989
- };
2990
- exports.de_TagResourceCommand = de_TagResourceCommand;
2991
- const de_TagResourceCommandError = async (output, context) => {
2992
- const parsedOutput = {
2993
- ...output,
2994
- body: await parseErrorBody(output.body, context),
2995
- };
2996
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2997
- switch (errorCode) {
2998
- case "AccessDeniedException":
2999
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3000
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3001
- case "InternalServerException":
3002
- case "com.amazonaws.workspacesweb#InternalServerException":
3003
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3004
- case "ResourceNotFoundException":
3005
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3006
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3007
- case "ThrottlingException":
3008
- case "com.amazonaws.workspacesweb#ThrottlingException":
3009
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3010
- case "TooManyTagsException":
3011
- case "com.amazonaws.workspacesweb#TooManyTagsException":
3012
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
3013
- case "ValidationException":
3014
- case "com.amazonaws.workspacesweb#ValidationException":
3015
- throw await de_ValidationExceptionRes(parsedOutput, context);
3016
- default:
3017
- const parsedBody = parsedOutput.body;
3018
- return throwDefaultError({
3019
- output,
3020
- parsedBody,
3021
- errorCode,
3022
- });
3023
- }
3024
- };
3025
- const de_UntagResourceCommand = async (output, context) => {
3026
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3027
- return de_UntagResourceCommandError(output, context);
3028
- }
3029
- const contents = (0, smithy_client_1.map)({
3030
- $metadata: deserializeMetadata(output),
3031
- });
3032
- await (0, smithy_client_1.collectBody)(output.body, context);
3033
- return contents;
3034
- };
3035
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
3036
- const de_UntagResourceCommandError = async (output, context) => {
3037
- const parsedOutput = {
3038
- ...output,
3039
- body: await parseErrorBody(output.body, context),
3040
- };
3041
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3042
- switch (errorCode) {
3043
- case "AccessDeniedException":
3044
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3045
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3046
- case "InternalServerException":
3047
- case "com.amazonaws.workspacesweb#InternalServerException":
3048
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3049
- case "ResourceNotFoundException":
3050
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3051
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3052
- case "ThrottlingException":
3053
- case "com.amazonaws.workspacesweb#ThrottlingException":
3054
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3055
- case "ValidationException":
3056
- case "com.amazonaws.workspacesweb#ValidationException":
3057
- throw await de_ValidationExceptionRes(parsedOutput, context);
3058
- default:
3059
- const parsedBody = parsedOutput.body;
3060
- return throwDefaultError({
3061
- output,
3062
- parsedBody,
3063
- errorCode,
3064
- });
3065
- }
3066
- };
3067
- const de_UpdateBrowserSettingsCommand = async (output, context) => {
3068
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3069
- return de_UpdateBrowserSettingsCommandError(output, context);
3070
- }
3071
- const contents = (0, smithy_client_1.map)({
3072
- $metadata: deserializeMetadata(output),
3073
- });
3074
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3075
- const doc = (0, smithy_client_1.take)(data, {
3076
- browserSettings: smithy_client_1._json,
3077
- });
3078
- Object.assign(contents, doc);
3079
- return contents;
3080
- };
3081
- exports.de_UpdateBrowserSettingsCommand = de_UpdateBrowserSettingsCommand;
3082
- const de_UpdateBrowserSettingsCommandError = async (output, context) => {
3083
- const parsedOutput = {
3084
- ...output,
3085
- body: await parseErrorBody(output.body, context),
3086
- };
3087
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3088
- switch (errorCode) {
3089
- case "AccessDeniedException":
3090
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3091
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3092
- case "InternalServerException":
3093
- case "com.amazonaws.workspacesweb#InternalServerException":
3094
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3095
- case "ResourceNotFoundException":
3096
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3097
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3098
- case "ThrottlingException":
3099
- case "com.amazonaws.workspacesweb#ThrottlingException":
3100
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3101
- case "ValidationException":
3102
- case "com.amazonaws.workspacesweb#ValidationException":
3103
- throw await de_ValidationExceptionRes(parsedOutput, context);
3104
- default:
3105
- const parsedBody = parsedOutput.body;
3106
- return throwDefaultError({
3107
- output,
3108
- parsedBody,
3109
- errorCode,
3110
- });
3111
- }
3112
- };
3113
- const de_UpdateIdentityProviderCommand = async (output, context) => {
3114
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3115
- return de_UpdateIdentityProviderCommandError(output, context);
3116
- }
3117
- const contents = (0, smithy_client_1.map)({
3118
- $metadata: deserializeMetadata(output),
3119
- });
3120
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3121
- const doc = (0, smithy_client_1.take)(data, {
3122
- identityProvider: smithy_client_1._json,
3123
- });
3124
- Object.assign(contents, doc);
3125
- return contents;
3126
- };
3127
- exports.de_UpdateIdentityProviderCommand = de_UpdateIdentityProviderCommand;
3128
- const de_UpdateIdentityProviderCommandError = async (output, context) => {
3129
- const parsedOutput = {
3130
- ...output,
3131
- body: await parseErrorBody(output.body, context),
3132
- };
3133
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3134
- switch (errorCode) {
3135
- case "AccessDeniedException":
3136
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3137
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3138
- case "InternalServerException":
3139
- case "com.amazonaws.workspacesweb#InternalServerException":
3140
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3141
- case "ResourceNotFoundException":
3142
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3143
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3144
- case "ThrottlingException":
3145
- case "com.amazonaws.workspacesweb#ThrottlingException":
3146
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3147
- case "ValidationException":
3148
- case "com.amazonaws.workspacesweb#ValidationException":
3149
- throw await de_ValidationExceptionRes(parsedOutput, context);
3150
- default:
3151
- const parsedBody = parsedOutput.body;
3152
- return throwDefaultError({
3153
- output,
3154
- parsedBody,
3155
- errorCode,
3156
- });
3157
- }
3158
- };
3159
- const de_UpdateIpAccessSettingsCommand = async (output, context) => {
3160
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3161
- return de_UpdateIpAccessSettingsCommandError(output, context);
3162
- }
3163
- const contents = (0, smithy_client_1.map)({
3164
- $metadata: deserializeMetadata(output),
3165
- });
3166
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3167
- const doc = (0, smithy_client_1.take)(data, {
3168
- ipAccessSettings: (_) => de_IpAccessSettings(_, context),
3169
- });
3170
- Object.assign(contents, doc);
3171
- return contents;
3172
- };
3173
- exports.de_UpdateIpAccessSettingsCommand = de_UpdateIpAccessSettingsCommand;
3174
- const de_UpdateIpAccessSettingsCommandError = async (output, context) => {
3175
- const parsedOutput = {
3176
- ...output,
3177
- body: await parseErrorBody(output.body, context),
3178
- };
3179
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3180
- switch (errorCode) {
3181
- case "AccessDeniedException":
3182
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3183
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3184
- case "InternalServerException":
3185
- case "com.amazonaws.workspacesweb#InternalServerException":
3186
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3187
- case "ResourceNotFoundException":
3188
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3189
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3190
- case "ThrottlingException":
3191
- case "com.amazonaws.workspacesweb#ThrottlingException":
3192
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3193
- case "ValidationException":
3194
- case "com.amazonaws.workspacesweb#ValidationException":
3195
- throw await de_ValidationExceptionRes(parsedOutput, context);
3196
- default:
3197
- const parsedBody = parsedOutput.body;
3198
- return throwDefaultError({
3199
- output,
3200
- parsedBody,
3201
- errorCode,
3202
- });
3203
- }
3204
- };
3205
- const de_UpdateNetworkSettingsCommand = async (output, context) => {
3206
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3207
- return de_UpdateNetworkSettingsCommandError(output, context);
3208
- }
3209
- const contents = (0, smithy_client_1.map)({
3210
- $metadata: deserializeMetadata(output),
3211
- });
3212
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3213
- const doc = (0, smithy_client_1.take)(data, {
3214
- networkSettings: smithy_client_1._json,
3215
- });
3216
- Object.assign(contents, doc);
3217
- return contents;
3218
- };
3219
- exports.de_UpdateNetworkSettingsCommand = de_UpdateNetworkSettingsCommand;
3220
- const de_UpdateNetworkSettingsCommandError = async (output, context) => {
3221
- const parsedOutput = {
3222
- ...output,
3223
- body: await parseErrorBody(output.body, context),
3224
- };
3225
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3226
- switch (errorCode) {
3227
- case "AccessDeniedException":
3228
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3229
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3230
- case "InternalServerException":
3231
- case "com.amazonaws.workspacesweb#InternalServerException":
3232
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3233
- case "ResourceNotFoundException":
3234
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3235
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3236
- case "ThrottlingException":
3237
- case "com.amazonaws.workspacesweb#ThrottlingException":
3238
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3239
- case "ValidationException":
3240
- case "com.amazonaws.workspacesweb#ValidationException":
3241
- throw await de_ValidationExceptionRes(parsedOutput, context);
3242
- default:
3243
- const parsedBody = parsedOutput.body;
3244
- return throwDefaultError({
3245
- output,
3246
- parsedBody,
3247
- errorCode,
3248
- });
3249
- }
3250
- };
3251
- const de_UpdatePortalCommand = async (output, context) => {
3252
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3253
- return de_UpdatePortalCommandError(output, context);
3254
- }
3255
- const contents = (0, smithy_client_1.map)({
3256
- $metadata: deserializeMetadata(output),
3257
- });
3258
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3259
- const doc = (0, smithy_client_1.take)(data, {
3260
- portal: (_) => de_Portal(_, context),
3261
- });
3262
- Object.assign(contents, doc);
3263
- return contents;
3264
- };
3265
- exports.de_UpdatePortalCommand = de_UpdatePortalCommand;
3266
- const de_UpdatePortalCommandError = async (output, context) => {
3267
- const parsedOutput = {
3268
- ...output,
3269
- body: await parseErrorBody(output.body, context),
3270
- };
3271
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3272
- switch (errorCode) {
3273
- case "AccessDeniedException":
3274
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3275
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3276
- case "ConflictException":
3277
- case "com.amazonaws.workspacesweb#ConflictException":
3278
- throw await de_ConflictExceptionRes(parsedOutput, context);
3279
- case "InternalServerException":
3280
- case "com.amazonaws.workspacesweb#InternalServerException":
3281
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3282
- case "ResourceNotFoundException":
3283
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3284
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3285
- case "ThrottlingException":
3286
- case "com.amazonaws.workspacesweb#ThrottlingException":
3287
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3288
- case "ValidationException":
3289
- case "com.amazonaws.workspacesweb#ValidationException":
3290
- throw await de_ValidationExceptionRes(parsedOutput, context);
3291
- default:
3292
- const parsedBody = parsedOutput.body;
3293
- return throwDefaultError({
3294
- output,
3295
- parsedBody,
3296
- errorCode,
3297
- });
3298
- }
3299
- };
3300
- const de_UpdateTrustStoreCommand = async (output, context) => {
3301
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3302
- return de_UpdateTrustStoreCommandError(output, context);
3303
- }
3304
- const contents = (0, smithy_client_1.map)({
3305
- $metadata: deserializeMetadata(output),
3306
- });
3307
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3308
- const doc = (0, smithy_client_1.take)(data, {
3309
- trustStoreArn: smithy_client_1.expectString,
3310
- });
3311
- Object.assign(contents, doc);
3312
- return contents;
3313
- };
3314
- exports.de_UpdateTrustStoreCommand = de_UpdateTrustStoreCommand;
3315
- const de_UpdateTrustStoreCommandError = async (output, context) => {
3316
- const parsedOutput = {
3317
- ...output,
3318
- body: await parseErrorBody(output.body, context),
3319
- };
3320
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3321
- switch (errorCode) {
3322
- case "AccessDeniedException":
3323
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3324
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3325
- case "InternalServerException":
3326
- case "com.amazonaws.workspacesweb#InternalServerException":
3327
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3328
- case "ResourceNotFoundException":
3329
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3330
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3331
- case "ServiceQuotaExceededException":
3332
- case "com.amazonaws.workspacesweb#ServiceQuotaExceededException":
3333
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3334
- case "ThrottlingException":
3335
- case "com.amazonaws.workspacesweb#ThrottlingException":
3336
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3337
- case "ValidationException":
3338
- case "com.amazonaws.workspacesweb#ValidationException":
3339
- throw await de_ValidationExceptionRes(parsedOutput, context);
3340
- default:
3341
- const parsedBody = parsedOutput.body;
3342
- return throwDefaultError({
3343
- output,
3344
- parsedBody,
3345
- errorCode,
3346
- });
3347
- }
3348
- };
3349
- const de_UpdateUserAccessLoggingSettingsCommand = async (output, context) => {
3350
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3351
- return de_UpdateUserAccessLoggingSettingsCommandError(output, context);
3352
- }
3353
- const contents = (0, smithy_client_1.map)({
3354
- $metadata: deserializeMetadata(output),
3355
- });
3356
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3357
- const doc = (0, smithy_client_1.take)(data, {
3358
- userAccessLoggingSettings: smithy_client_1._json,
3359
- });
3360
- Object.assign(contents, doc);
3361
- return contents;
3362
- };
3363
- exports.de_UpdateUserAccessLoggingSettingsCommand = de_UpdateUserAccessLoggingSettingsCommand;
3364
- const de_UpdateUserAccessLoggingSettingsCommandError = async (output, context) => {
3365
- const parsedOutput = {
3366
- ...output,
3367
- body: await parseErrorBody(output.body, context),
3368
- };
3369
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3370
- switch (errorCode) {
3371
- case "AccessDeniedException":
3372
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3373
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3374
- case "InternalServerException":
3375
- case "com.amazonaws.workspacesweb#InternalServerException":
3376
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3377
- case "ResourceNotFoundException":
3378
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3379
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3380
- case "ThrottlingException":
3381
- case "com.amazonaws.workspacesweb#ThrottlingException":
3382
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3383
- case "ValidationException":
3384
- case "com.amazonaws.workspacesweb#ValidationException":
3385
- throw await de_ValidationExceptionRes(parsedOutput, context);
3386
- default:
3387
- const parsedBody = parsedOutput.body;
3388
- return throwDefaultError({
3389
- output,
3390
- parsedBody,
3391
- errorCode,
3392
- });
3393
- }
3394
- };
3395
- const de_UpdateUserSettingsCommand = async (output, context) => {
3396
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3397
- return de_UpdateUserSettingsCommandError(output, context);
3398
- }
3399
- const contents = (0, smithy_client_1.map)({
3400
- $metadata: deserializeMetadata(output),
3401
- });
3402
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3403
- const doc = (0, smithy_client_1.take)(data, {
3404
- userSettings: smithy_client_1._json,
3405
- });
3406
- Object.assign(contents, doc);
3407
- return contents;
3408
- };
3409
- exports.de_UpdateUserSettingsCommand = de_UpdateUserSettingsCommand;
3410
- const de_UpdateUserSettingsCommandError = async (output, context) => {
3411
- const parsedOutput = {
3412
- ...output,
3413
- body: await parseErrorBody(output.body, context),
3414
- };
3415
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3416
- switch (errorCode) {
3417
- case "AccessDeniedException":
3418
- case "com.amazonaws.workspacesweb#AccessDeniedException":
3419
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3420
- case "InternalServerException":
3421
- case "com.amazonaws.workspacesweb#InternalServerException":
3422
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3423
- case "ResourceNotFoundException":
3424
- case "com.amazonaws.workspacesweb#ResourceNotFoundException":
3425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3426
- case "ThrottlingException":
3427
- case "com.amazonaws.workspacesweb#ThrottlingException":
3428
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3429
- case "ValidationException":
3430
- case "com.amazonaws.workspacesweb#ValidationException":
3431
- throw await de_ValidationExceptionRes(parsedOutput, context);
3432
- default:
3433
- const parsedBody = parsedOutput.body;
3434
- return throwDefaultError({
3435
- output,
3436
- parsedBody,
3437
- errorCode,
3438
- });
3439
- }
3440
- };
3441
- const throwDefaultError = (0, smithy_client_1.withBaseException)(WorkSpacesWebServiceException_1.WorkSpacesWebServiceException);
3442
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3443
- const contents = (0, smithy_client_1.map)({});
3444
- const data = parsedOutput.body;
3445
- const doc = (0, smithy_client_1.take)(data, {
3446
- message: smithy_client_1.expectString,
3447
- });
3448
- Object.assign(contents, doc);
3449
- const exception = new models_0_1.AccessDeniedException({
3450
- $metadata: deserializeMetadata(parsedOutput),
3451
- ...contents,
3452
- });
3453
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3454
- };
3455
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
3456
- const contents = (0, smithy_client_1.map)({});
3457
- const data = parsedOutput.body;
3458
- const doc = (0, smithy_client_1.take)(data, {
3459
- message: smithy_client_1.expectString,
3460
- resourceId: smithy_client_1.expectString,
3461
- resourceType: smithy_client_1.expectString,
3462
- });
3463
- Object.assign(contents, doc);
3464
- const exception = new models_0_1.ConflictException({
3465
- $metadata: deserializeMetadata(parsedOutput),
3466
- ...contents,
3467
- });
3468
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3469
- };
3470
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
3471
- const contents = (0, smithy_client_1.map)({
3472
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
3473
- });
3474
- const data = parsedOutput.body;
3475
- const doc = (0, smithy_client_1.take)(data, {
3476
- message: smithy_client_1.expectString,
3477
- });
3478
- Object.assign(contents, doc);
3479
- const exception = new models_0_1.InternalServerException({
3480
- $metadata: deserializeMetadata(parsedOutput),
3481
- ...contents,
3482
- });
3483
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3484
- };
3485
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3486
- const contents = (0, smithy_client_1.map)({});
3487
- const data = parsedOutput.body;
3488
- const doc = (0, smithy_client_1.take)(data, {
3489
- message: smithy_client_1.expectString,
3490
- resourceId: smithy_client_1.expectString,
3491
- resourceType: smithy_client_1.expectString,
3492
- });
3493
- Object.assign(contents, doc);
3494
- const exception = new models_0_1.ResourceNotFoundException({
3495
- $metadata: deserializeMetadata(parsedOutput),
3496
- ...contents,
3497
- });
3498
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3499
- };
3500
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
3501
- const contents = (0, smithy_client_1.map)({});
3502
- const data = parsedOutput.body;
3503
- const doc = (0, smithy_client_1.take)(data, {
3504
- message: smithy_client_1.expectString,
3505
- quotaCode: smithy_client_1.expectString,
3506
- resourceId: smithy_client_1.expectString,
3507
- resourceType: smithy_client_1.expectString,
3508
- serviceCode: smithy_client_1.expectString,
3509
- });
3510
- Object.assign(contents, doc);
3511
- const exception = new models_0_1.ServiceQuotaExceededException({
3512
- $metadata: deserializeMetadata(parsedOutput),
3513
- ...contents,
3514
- });
3515
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3516
- };
3517
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
3518
- const contents = (0, smithy_client_1.map)({
3519
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
3520
- });
3521
- const data = parsedOutput.body;
3522
- const doc = (0, smithy_client_1.take)(data, {
3523
- message: smithy_client_1.expectString,
3524
- quotaCode: smithy_client_1.expectString,
3525
- serviceCode: smithy_client_1.expectString,
3526
- });
3527
- Object.assign(contents, doc);
3528
- const exception = new models_0_1.ThrottlingException({
3529
- $metadata: deserializeMetadata(parsedOutput),
3530
- ...contents,
3531
- });
3532
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3533
- };
3534
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
3535
- const contents = (0, smithy_client_1.map)({});
3536
- const data = parsedOutput.body;
3537
- const doc = (0, smithy_client_1.take)(data, {
3538
- message: smithy_client_1.expectString,
3539
- resourceName: smithy_client_1.expectString,
3540
- });
3541
- Object.assign(contents, doc);
3542
- const exception = new models_0_1.TooManyTagsException({
3543
- $metadata: deserializeMetadata(parsedOutput),
3544
- ...contents,
3545
- });
3546
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3547
- };
3548
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
3549
- const contents = (0, smithy_client_1.map)({});
3550
- const data = parsedOutput.body;
3551
- const doc = (0, smithy_client_1.take)(data, {
3552
- fieldList: smithy_client_1._json,
3553
- message: smithy_client_1.expectString,
3554
- reason: smithy_client_1.expectString,
3555
- });
3556
- Object.assign(contents, doc);
3557
- const exception = new models_0_1.ValidationException({
3558
- $metadata: deserializeMetadata(parsedOutput),
3559
- ...contents,
3560
- });
3561
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3562
- };
3563
- const se_CertificateList = (input, context) => {
3564
- return input
3565
- .filter((e) => e != null)
3566
- .map((entry) => {
3567
- return context.base64Encoder(entry);
3568
- });
3569
- };
3570
- const de_Certificate = (output, context) => {
3571
- return (0, smithy_client_1.take)(output, {
3572
- body: context.base64Decoder,
3573
- issuer: smithy_client_1.expectString,
3574
- notValidAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3575
- notValidBefore: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3576
- subject: smithy_client_1.expectString,
3577
- thumbprint: smithy_client_1.expectString,
3578
- });
3579
- };
3580
- const de_CertificateSummary = (output, context) => {
3581
- return (0, smithy_client_1.take)(output, {
3582
- issuer: smithy_client_1.expectString,
3583
- notValidAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3584
- notValidBefore: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3585
- subject: smithy_client_1.expectString,
3586
- thumbprint: smithy_client_1.expectString,
3587
- });
3588
- };
3589
- const de_CertificateSummaryList = (output, context) => {
3590
- const retVal = (output || [])
3591
- .filter((e) => e != null)
3592
- .map((entry) => {
3593
- return de_CertificateSummary(entry, context);
3594
- });
3595
- return retVal;
3596
- };
3597
- const de_IpAccessSettings = (output, context) => {
3598
- return (0, smithy_client_1.take)(output, {
3599
- associatedPortalArns: smithy_client_1._json,
3600
- creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3601
- description: smithy_client_1.expectString,
3602
- displayName: smithy_client_1.expectString,
3603
- ipAccessSettingsArn: smithy_client_1.expectString,
3604
- ipRules: smithy_client_1._json,
3605
- });
3606
- };
3607
- const de_IpAccessSettingsList = (output, context) => {
3608
- const retVal = (output || [])
3609
- .filter((e) => e != null)
3610
- .map((entry) => {
3611
- return de_IpAccessSettingsSummary(entry, context);
3612
- });
3613
- return retVal;
3614
- };
3615
- const de_IpAccessSettingsSummary = (output, context) => {
3616
- return (0, smithy_client_1.take)(output, {
3617
- creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3618
- description: smithy_client_1.expectString,
3619
- displayName: smithy_client_1.expectString,
3620
- ipAccessSettingsArn: smithy_client_1.expectString,
3621
- });
3622
- };
3623
- const de_Portal = (output, context) => {
3624
- return (0, smithy_client_1.take)(output, {
3625
- authenticationType: smithy_client_1.expectString,
3626
- browserSettingsArn: smithy_client_1.expectString,
3627
- browserType: smithy_client_1.expectString,
3628
- creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3629
- displayName: smithy_client_1.expectString,
3630
- ipAccessSettingsArn: smithy_client_1.expectString,
3631
- networkSettingsArn: smithy_client_1.expectString,
3632
- portalArn: smithy_client_1.expectString,
3633
- portalEndpoint: smithy_client_1.expectString,
3634
- portalStatus: smithy_client_1.expectString,
3635
- rendererType: smithy_client_1.expectString,
3636
- statusReason: smithy_client_1.expectString,
3637
- trustStoreArn: smithy_client_1.expectString,
3638
- userAccessLoggingSettingsArn: smithy_client_1.expectString,
3639
- userSettingsArn: smithy_client_1.expectString,
3640
- });
3641
- };
3642
- const de_PortalList = (output, context) => {
3643
- const retVal = (output || [])
3644
- .filter((e) => e != null)
3645
- .map((entry) => {
3646
- return de_PortalSummary(entry, context);
3647
- });
3648
- return retVal;
3649
- };
3650
- const de_PortalSummary = (output, context) => {
3651
- return (0, smithy_client_1.take)(output, {
3652
- authenticationType: smithy_client_1.expectString,
3653
- browserSettingsArn: smithy_client_1.expectString,
3654
- browserType: smithy_client_1.expectString,
3655
- creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3656
- displayName: smithy_client_1.expectString,
3657
- ipAccessSettingsArn: smithy_client_1.expectString,
3658
- networkSettingsArn: smithy_client_1.expectString,
3659
- portalArn: smithy_client_1.expectString,
3660
- portalEndpoint: smithy_client_1.expectString,
3661
- portalStatus: smithy_client_1.expectString,
3662
- rendererType: smithy_client_1.expectString,
3663
- trustStoreArn: smithy_client_1.expectString,
3664
- userAccessLoggingSettingsArn: smithy_client_1.expectString,
3665
- userSettingsArn: smithy_client_1.expectString,
3666
- });
3667
- };
3668
- const deserializeMetadata = (output) => ({
3669
- httpStatusCode: output.statusCode,
3670
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3671
- extendedRequestId: output.headers["x-amz-id-2"],
3672
- cfId: output.headers["x-amz-cf-id"],
3673
- });
3674
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
3675
- const isSerializableHeaderValue = (value) => value !== undefined &&
3676
- value !== null &&
3677
- value !== "" &&
3678
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3679
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3680
- const _bSA = "browserSettingsArn";
3681
- const _iASA = "ipAccessSettingsArn";
3682
- const _mR = "maxResults";
3683
- const _nSA = "networkSettingsArn";
3684
- const _nT = "nextToken";
3685
- const _rAS = "retryAfterSeconds";
3686
- const _ra = "retry-after";
3687
- const _t = "thumbprint";
3688
- const _tK = "tagKeys";
3689
- const _tSA = "trustStoreArn";
3690
- const _uALSA = "userAccessLoggingSettingsArn";
3691
- const _uSA = "userSettingsArn";
3692
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3693
- if (encoded.length) {
3694
- return JSON.parse(encoded);
3695
- }
3696
- return {};
3697
- });
3698
- const parseErrorBody = async (errorBody, context) => {
3699
- const value = await parseBody(errorBody, context);
3700
- value.message = value.message ?? value.Message;
3701
- return value;
3702
- };
3703
- const loadRestJsonErrorCode = (output, data) => {
3704
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3705
- const sanitizeErrorCode = (rawValue) => {
3706
- let cleanValue = rawValue;
3707
- if (typeof cleanValue === "number") {
3708
- cleanValue = cleanValue.toString();
3709
- }
3710
- if (cleanValue.indexOf(",") >= 0) {
3711
- cleanValue = cleanValue.split(",")[0];
3712
- }
3713
- if (cleanValue.indexOf(":") >= 0) {
3714
- cleanValue = cleanValue.split(":")[0];
3715
- }
3716
- if (cleanValue.indexOf("#") >= 0) {
3717
- cleanValue = cleanValue.split("#")[1];
3718
- }
3719
- return cleanValue;
3720
- };
3721
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3722
- if (headerKey !== undefined) {
3723
- return sanitizeErrorCode(output.headers[headerKey]);
3724
- }
3725
- if (data.code !== undefined) {
3726
- return sanitizeErrorCode(data.code);
3727
- }
3728
- if (data["__type"] !== undefined) {
3729
- return sanitizeErrorCode(data["__type"]);
3730
- }
3731
- };
1
+ module.exports = require("../index.js");