@aws-sdk/client-ram 3.312.0 → 3.316.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 (97) hide show
  1. package/README.md +76 -5
  2. package/dist-cjs/RAM.js +47 -350
  3. package/dist-cjs/commands/CreatePermissionCommand.js +45 -0
  4. package/dist-cjs/commands/CreatePermissionVersionCommand.js +45 -0
  5. package/dist-cjs/commands/DeletePermissionCommand.js +45 -0
  6. package/dist-cjs/commands/DeletePermissionVersionCommand.js +45 -0
  7. package/dist-cjs/commands/ListPermissionAssociationsCommand.js +45 -0
  8. package/dist-cjs/commands/ListReplacePermissionAssociationsWorkCommand.js +45 -0
  9. package/dist-cjs/commands/PromotePermissionCreatedFromPolicyCommand.js +45 -0
  10. package/dist-cjs/commands/ReplacePermissionAssociationsCommand.js +45 -0
  11. package/dist-cjs/commands/SetDefaultPermissionVersionCommand.js +45 -0
  12. package/dist-cjs/commands/index.js +9 -0
  13. package/dist-cjs/endpoint/ruleset.js +3 -3
  14. package/dist-cjs/models/models_0.js +104 -1
  15. package/dist-cjs/pagination/ListPermissionAssociationsPaginator.js +29 -0
  16. package/dist-cjs/pagination/ListReplacePermissionAssociationsWorkPaginator.js +29 -0
  17. package/dist-cjs/pagination/index.js +2 -0
  18. package/dist-cjs/protocols/Aws_restJson1.js +1404 -756
  19. package/dist-es/RAM.js +47 -350
  20. package/dist-es/commands/CreatePermissionCommand.js +41 -0
  21. package/dist-es/commands/CreatePermissionVersionCommand.js +41 -0
  22. package/dist-es/commands/DeletePermissionCommand.js +41 -0
  23. package/dist-es/commands/DeletePermissionVersionCommand.js +41 -0
  24. package/dist-es/commands/ListPermissionAssociationsCommand.js +41 -0
  25. package/dist-es/commands/ListReplacePermissionAssociationsWorkCommand.js +41 -0
  26. package/dist-es/commands/PromotePermissionCreatedFromPolicyCommand.js +41 -0
  27. package/dist-es/commands/ReplacePermissionAssociationsCommand.js +41 -0
  28. package/dist-es/commands/SetDefaultPermissionVersionCommand.js +41 -0
  29. package/dist-es/commands/index.js +9 -0
  30. package/dist-es/endpoint/ruleset.js +3 -3
  31. package/dist-es/models/models_0.js +97 -0
  32. package/dist-es/pagination/ListPermissionAssociationsPaginator.js +25 -0
  33. package/dist-es/pagination/ListReplacePermissionAssociationsWorkPaginator.js +25 -0
  34. package/dist-es/pagination/index.js +2 -0
  35. package/dist-es/protocols/Aws_restJson1.js +1327 -698
  36. package/dist-types/RAM.d.ts +114 -113
  37. package/dist-types/RAMClient.d.ts +15 -7
  38. package/dist-types/commands/AcceptResourceShareInvitationCommand.d.ts +16 -12
  39. package/dist-types/commands/AssociateResourceShareCommand.d.ts +19 -14
  40. package/dist-types/commands/AssociateResourceSharePermissionCommand.d.ts +9 -7
  41. package/dist-types/commands/CreatePermissionCommand.d.ts +109 -0
  42. package/dist-types/commands/CreatePermissionVersionCommand.d.ts +106 -0
  43. package/dist-types/commands/CreateResourceShareCommand.d.ts +19 -13
  44. package/dist-types/commands/DeletePermissionCommand.d.ts +91 -0
  45. package/dist-types/commands/DeletePermissionVersionCommand.d.ts +96 -0
  46. package/dist-types/commands/DeleteResourceShareCommand.d.ts +19 -14
  47. package/dist-types/commands/DisassociateResourceShareCommand.d.ts +19 -13
  48. package/dist-types/commands/DisassociateResourceSharePermissionCommand.d.ts +14 -11
  49. package/dist-types/commands/EnableSharingWithAwsOrganizationCommand.d.ts +14 -11
  50. package/dist-types/commands/GetPermissionCommand.d.ts +9 -7
  51. package/dist-types/commands/GetResourcePoliciesCommand.d.ts +10 -6
  52. package/dist-types/commands/GetResourceShareAssociationsCommand.d.ts +13 -8
  53. package/dist-types/commands/GetResourceShareInvitationsCommand.d.ts +14 -8
  54. package/dist-types/commands/GetResourceSharesCommand.d.ts +11 -6
  55. package/dist-types/commands/ListPendingInvitationResourcesCommand.d.ts +15 -9
  56. package/dist-types/commands/ListPermissionAssociationsCommand.d.ts +91 -0
  57. package/dist-types/commands/ListPermissionVersionsCommand.d.ts +11 -7
  58. package/dist-types/commands/ListPermissionsCommand.d.ts +9 -5
  59. package/dist-types/commands/ListPrincipalsCommand.d.ts +10 -6
  60. package/dist-types/commands/ListReplacePermissionAssociationsWorkCommand.d.ts +84 -0
  61. package/dist-types/commands/ListResourceSharePermissionsCommand.d.ts +11 -7
  62. package/dist-types/commands/ListResourceTypesCommand.d.ts +7 -4
  63. package/dist-types/commands/ListResourcesCommand.d.ts +11 -7
  64. package/dist-types/commands/PromotePermissionCreatedFromPolicyCommand.d.ts +119 -0
  65. package/dist-types/commands/PromoteResourceShareCreatedFromPolicyCommand.d.ts +34 -14
  66. package/dist-types/commands/RejectResourceShareInvitationCommand.d.ts +16 -12
  67. package/dist-types/commands/ReplacePermissionAssociationsCommand.d.ts +108 -0
  68. package/dist-types/commands/SetDefaultPermissionVersionCommand.d.ts +92 -0
  69. package/dist-types/commands/TagResourceCommand.d.ts +17 -11
  70. package/dist-types/commands/UntagResourceCommand.d.ts +14 -5
  71. package/dist-types/commands/UpdateResourceShareCommand.d.ts +13 -11
  72. package/dist-types/commands/index.d.ts +9 -0
  73. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  74. package/dist-types/models/models_0.d.ts +1286 -195
  75. package/dist-types/pagination/ListPermissionAssociationsPaginator.d.ts +7 -0
  76. package/dist-types/pagination/ListReplacePermissionAssociationsWorkPaginator.d.ts +7 -0
  77. package/dist-types/pagination/index.d.ts +2 -0
  78. package/dist-types/protocols/Aws_restJson1.d.ts +81 -0
  79. package/dist-types/ts3.4/RAM.d.ts +167 -1
  80. package/dist-types/ts3.4/RAMClient.d.ts +54 -0
  81. package/dist-types/ts3.4/commands/CreatePermissionCommand.d.ts +37 -0
  82. package/dist-types/ts3.4/commands/CreatePermissionVersionCommand.d.ts +41 -0
  83. package/dist-types/ts3.4/commands/DeletePermissionCommand.d.ts +37 -0
  84. package/dist-types/ts3.4/commands/DeletePermissionVersionCommand.d.ts +41 -0
  85. package/dist-types/ts3.4/commands/ListPermissionAssociationsCommand.d.ts +41 -0
  86. package/dist-types/ts3.4/commands/ListReplacePermissionAssociationsWorkCommand.d.ts +41 -0
  87. package/dist-types/ts3.4/commands/PromotePermissionCreatedFromPolicyCommand.d.ts +41 -0
  88. package/dist-types/ts3.4/commands/ReplacePermissionAssociationsCommand.d.ts +41 -0
  89. package/dist-types/ts3.4/commands/SetDefaultPermissionVersionCommand.d.ts +41 -0
  90. package/dist-types/ts3.4/commands/index.d.ts +9 -0
  91. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  92. package/dist-types/ts3.4/models/models_0.d.ts +234 -19
  93. package/dist-types/ts3.4/pagination/ListPermissionAssociationsPaginator.d.ts +11 -0
  94. package/dist-types/ts3.4/pagination/ListReplacePermissionAssociationsWorkPaginator.d.ts +11 -0
  95. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  96. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +108 -0
  97. package/package.json +6 -6
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateResourceShareCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RejectResourceShareInvitationCommand = exports.de_PromoteResourceShareCreatedFromPolicyCommand = exports.de_ListResourceTypesCommand = exports.de_ListResourceSharePermissionsCommand = exports.de_ListResourcesCommand = exports.de_ListPrincipalsCommand = exports.de_ListPermissionVersionsCommand = exports.de_ListPermissionsCommand = exports.de_ListPendingInvitationResourcesCommand = exports.de_GetResourceSharesCommand = exports.de_GetResourceShareInvitationsCommand = exports.de_GetResourceShareAssociationsCommand = exports.de_GetResourcePoliciesCommand = exports.de_GetPermissionCommand = exports.de_EnableSharingWithAwsOrganizationCommand = exports.de_DisassociateResourceSharePermissionCommand = exports.de_DisassociateResourceShareCommand = exports.de_DeleteResourceShareCommand = exports.de_CreateResourceShareCommand = exports.de_AssociateResourceSharePermissionCommand = exports.de_AssociateResourceShareCommand = exports.de_AcceptResourceShareInvitationCommand = exports.se_UpdateResourceShareCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RejectResourceShareInvitationCommand = exports.se_PromoteResourceShareCreatedFromPolicyCommand = exports.se_ListResourceTypesCommand = exports.se_ListResourceSharePermissionsCommand = exports.se_ListResourcesCommand = exports.se_ListPrincipalsCommand = exports.se_ListPermissionVersionsCommand = exports.se_ListPermissionsCommand = exports.se_ListPendingInvitationResourcesCommand = exports.se_GetResourceSharesCommand = exports.se_GetResourceShareInvitationsCommand = exports.se_GetResourceShareAssociationsCommand = exports.se_GetResourcePoliciesCommand = exports.se_GetPermissionCommand = exports.se_EnableSharingWithAwsOrganizationCommand = exports.se_DisassociateResourceSharePermissionCommand = exports.se_DisassociateResourceShareCommand = exports.se_DeleteResourceShareCommand = exports.se_CreateResourceShareCommand = exports.se_AssociateResourceSharePermissionCommand = exports.se_AssociateResourceShareCommand = exports.se_AcceptResourceShareInvitationCommand = void 0;
3
+ exports.de_GetResourceShareInvitationsCommand = exports.de_GetResourceShareAssociationsCommand = exports.de_GetResourcePoliciesCommand = exports.de_GetPermissionCommand = exports.de_EnableSharingWithAwsOrganizationCommand = exports.de_DisassociateResourceSharePermissionCommand = exports.de_DisassociateResourceShareCommand = exports.de_DeleteResourceShareCommand = exports.de_DeletePermissionVersionCommand = exports.de_DeletePermissionCommand = exports.de_CreateResourceShareCommand = exports.de_CreatePermissionVersionCommand = exports.de_CreatePermissionCommand = exports.de_AssociateResourceSharePermissionCommand = exports.de_AssociateResourceShareCommand = exports.de_AcceptResourceShareInvitationCommand = exports.se_UpdateResourceShareCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SetDefaultPermissionVersionCommand = exports.se_ReplacePermissionAssociationsCommand = exports.se_RejectResourceShareInvitationCommand = exports.se_PromoteResourceShareCreatedFromPolicyCommand = exports.se_PromotePermissionCreatedFromPolicyCommand = exports.se_ListResourceTypesCommand = exports.se_ListResourceSharePermissionsCommand = exports.se_ListResourcesCommand = exports.se_ListReplacePermissionAssociationsWorkCommand = exports.se_ListPrincipalsCommand = exports.se_ListPermissionVersionsCommand = exports.se_ListPermissionsCommand = exports.se_ListPermissionAssociationsCommand = exports.se_ListPendingInvitationResourcesCommand = exports.se_GetResourceSharesCommand = exports.se_GetResourceShareInvitationsCommand = exports.se_GetResourceShareAssociationsCommand = exports.se_GetResourcePoliciesCommand = exports.se_GetPermissionCommand = exports.se_EnableSharingWithAwsOrganizationCommand = exports.se_DisassociateResourceSharePermissionCommand = exports.se_DisassociateResourceShareCommand = exports.se_DeleteResourceShareCommand = exports.se_DeletePermissionVersionCommand = exports.se_DeletePermissionCommand = exports.se_CreateResourceShareCommand = exports.se_CreatePermissionVersionCommand = exports.se_CreatePermissionCommand = exports.se_AssociateResourceSharePermissionCommand = exports.se_AssociateResourceShareCommand = exports.se_AcceptResourceShareInvitationCommand = void 0;
4
+ exports.de_UpdateResourceShareCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SetDefaultPermissionVersionCommand = exports.de_ReplacePermissionAssociationsCommand = exports.de_RejectResourceShareInvitationCommand = exports.de_PromoteResourceShareCreatedFromPolicyCommand = exports.de_PromotePermissionCreatedFromPolicyCommand = exports.de_ListResourceTypesCommand = exports.de_ListResourceSharePermissionsCommand = exports.de_ListResourcesCommand = exports.de_ListReplacePermissionAssociationsWorkCommand = exports.de_ListPrincipalsCommand = exports.de_ListPermissionVersionsCommand = exports.de_ListPermissionsCommand = exports.de_ListPermissionAssociationsCommand = exports.de_ListPendingInvitationResourcesCommand = exports.de_GetResourceSharesCommand = void 0;
4
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
7
  const models_0_1 = require("../models/models_0");
@@ -12,10 +13,10 @@ const se_AcceptResourceShareInvitationCommand = async (input, context) => {
12
13
  };
13
14
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/acceptresourceshareinvitation";
14
15
  let body;
15
- body = JSON.stringify({
16
- ...(input.clientToken != null && { clientToken: input.clientToken }),
17
- ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
18
- });
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ clientToken: [],
18
+ resourceShareInvitationArn: [],
19
+ }));
19
20
  return new protocol_http_1.HttpRequest({
20
21
  protocol,
21
22
  hostname,
@@ -34,12 +35,12 @@ const se_AssociateResourceShareCommand = async (input, context) => {
34
35
  };
35
36
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourceshare";
36
37
  let body;
37
- body = JSON.stringify({
38
- ...(input.clientToken != null && { clientToken: input.clientToken }),
39
- ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }),
40
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
41
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
42
- });
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ clientToken: [],
40
+ principals: (_) => (0, smithy_client_1._json)(_),
41
+ resourceArns: (_) => (0, smithy_client_1._json)(_),
42
+ resourceShareArn: [],
43
+ }));
43
44
  return new protocol_http_1.HttpRequest({
44
45
  protocol,
45
46
  hostname,
@@ -58,13 +59,13 @@ const se_AssociateResourceSharePermissionCommand = async (input, context) => {
58
59
  };
59
60
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourcesharepermission";
60
61
  let body;
61
- body = JSON.stringify({
62
- ...(input.clientToken != null && { clientToken: input.clientToken }),
63
- ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
64
- ...(input.permissionVersion != null && { permissionVersion: input.permissionVersion }),
65
- ...(input.replace != null && { replace: input.replace }),
66
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
67
- });
62
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
63
+ clientToken: [],
64
+ permissionArn: [],
65
+ permissionVersion: [],
66
+ replace: [],
67
+ resourceShareArn: [],
68
+ }));
68
69
  return new protocol_http_1.HttpRequest({
69
70
  protocol,
70
71
  hostname,
@@ -76,6 +77,54 @@ const se_AssociateResourceSharePermissionCommand = async (input, context) => {
76
77
  });
77
78
  };
78
79
  exports.se_AssociateResourceSharePermissionCommand = se_AssociateResourceSharePermissionCommand;
80
+ const se_CreatePermissionCommand = async (input, context) => {
81
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const headers = {
83
+ "content-type": "application/json",
84
+ };
85
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createpermission";
86
+ let body;
87
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
88
+ clientToken: [],
89
+ name: [],
90
+ policyTemplate: [],
91
+ resourceType: [],
92
+ tags: (_) => (0, smithy_client_1._json)(_),
93
+ }));
94
+ return new protocol_http_1.HttpRequest({
95
+ protocol,
96
+ hostname,
97
+ port,
98
+ method: "POST",
99
+ headers,
100
+ path: resolvedPath,
101
+ body,
102
+ });
103
+ };
104
+ exports.se_CreatePermissionCommand = se_CreatePermissionCommand;
105
+ const se_CreatePermissionVersionCommand = async (input, context) => {
106
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const headers = {
108
+ "content-type": "application/json",
109
+ };
110
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createpermissionversion";
111
+ let body;
112
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
113
+ clientToken: [],
114
+ permissionArn: [],
115
+ policyTemplate: [],
116
+ }));
117
+ return new protocol_http_1.HttpRequest({
118
+ protocol,
119
+ hostname,
120
+ port,
121
+ method: "POST",
122
+ headers,
123
+ path: resolvedPath,
124
+ body,
125
+ });
126
+ };
127
+ exports.se_CreatePermissionVersionCommand = se_CreatePermissionVersionCommand;
79
128
  const se_CreateResourceShareCommand = async (input, context) => {
80
129
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
130
  const headers = {
@@ -83,15 +132,15 @@ const se_CreateResourceShareCommand = async (input, context) => {
83
132
  };
84
133
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createresourceshare";
85
134
  let body;
86
- body = JSON.stringify({
87
- ...(input.allowExternalPrincipals != null && { allowExternalPrincipals: input.allowExternalPrincipals }),
88
- ...(input.clientToken != null && { clientToken: input.clientToken }),
89
- ...(input.name != null && { name: input.name }),
90
- ...(input.permissionArns != null && { permissionArns: se_PermissionArnList(input.permissionArns, context) }),
91
- ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }),
92
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
93
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
94
- });
135
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
136
+ allowExternalPrincipals: [],
137
+ clientToken: [],
138
+ name: [],
139
+ permissionArns: (_) => (0, smithy_client_1._json)(_),
140
+ principals: (_) => (0, smithy_client_1._json)(_),
141
+ resourceArns: (_) => (0, smithy_client_1._json)(_),
142
+ tags: (_) => (0, smithy_client_1._json)(_),
143
+ }));
95
144
  return new protocol_http_1.HttpRequest({
96
145
  protocol,
97
146
  hostname,
@@ -103,11 +152,57 @@ const se_CreateResourceShareCommand = async (input, context) => {
103
152
  });
104
153
  };
105
154
  exports.se_CreateResourceShareCommand = se_CreateResourceShareCommand;
155
+ const se_DeletePermissionCommand = async (input, context) => {
156
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const headers = {};
158
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deletepermission";
159
+ const query = (0, smithy_client_1.map)({
160
+ permissionArn: [, (0, smithy_client_1.expectNonNull)(input.permissionArn, `permissionArn`)],
161
+ clientToken: [, input.clientToken],
162
+ });
163
+ let body;
164
+ return new protocol_http_1.HttpRequest({
165
+ protocol,
166
+ hostname,
167
+ port,
168
+ method: "DELETE",
169
+ headers,
170
+ path: resolvedPath,
171
+ query,
172
+ body,
173
+ });
174
+ };
175
+ exports.se_DeletePermissionCommand = se_DeletePermissionCommand;
176
+ const se_DeletePermissionVersionCommand = async (input, context) => {
177
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
178
+ const headers = {};
179
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deletepermissionversion";
180
+ const query = (0, smithy_client_1.map)({
181
+ permissionArn: [, (0, smithy_client_1.expectNonNull)(input.permissionArn, `permissionArn`)],
182
+ permissionVersion: [
183
+ (0, smithy_client_1.expectNonNull)(input.permissionVersion, `permissionVersion`) != null,
184
+ () => input.permissionVersion.toString(),
185
+ ],
186
+ clientToken: [, input.clientToken],
187
+ });
188
+ let body;
189
+ return new protocol_http_1.HttpRequest({
190
+ protocol,
191
+ hostname,
192
+ port,
193
+ method: "DELETE",
194
+ headers,
195
+ path: resolvedPath,
196
+ query,
197
+ body,
198
+ });
199
+ };
200
+ exports.se_DeletePermissionVersionCommand = se_DeletePermissionVersionCommand;
106
201
  const se_DeleteResourceShareCommand = async (input, context) => {
107
202
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
203
  const headers = {};
109
204
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteresourceshare";
110
- const query = map({
205
+ const query = (0, smithy_client_1.map)({
111
206
  resourceShareArn: [, (0, smithy_client_1.expectNonNull)(input.resourceShareArn, `resourceShareArn`)],
112
207
  clientToken: [, input.clientToken],
113
208
  });
@@ -131,12 +226,12 @@ const se_DisassociateResourceShareCommand = async (input, context) => {
131
226
  };
132
227
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourceshare";
133
228
  let body;
134
- body = JSON.stringify({
135
- ...(input.clientToken != null && { clientToken: input.clientToken }),
136
- ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }),
137
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
138
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
139
- });
229
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
230
+ clientToken: [],
231
+ principals: (_) => (0, smithy_client_1._json)(_),
232
+ resourceArns: (_) => (0, smithy_client_1._json)(_),
233
+ resourceShareArn: [],
234
+ }));
140
235
  return new protocol_http_1.HttpRequest({
141
236
  protocol,
142
237
  hostname,
@@ -155,11 +250,11 @@ const se_DisassociateResourceSharePermissionCommand = async (input, context) =>
155
250
  };
156
251
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourcesharepermission";
157
252
  let body;
158
- body = JSON.stringify({
159
- ...(input.clientToken != null && { clientToken: input.clientToken }),
160
- ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
161
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
162
- });
253
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
254
+ clientToken: [],
255
+ permissionArn: [],
256
+ resourceShareArn: [],
257
+ }));
163
258
  return new protocol_http_1.HttpRequest({
164
259
  protocol,
165
260
  hostname,
@@ -197,10 +292,10 @@ const se_GetPermissionCommand = async (input, context) => {
197
292
  };
198
293
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getpermission";
199
294
  let body;
200
- body = JSON.stringify({
201
- ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
202
- ...(input.permissionVersion != null && { permissionVersion: input.permissionVersion }),
203
- });
295
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
296
+ permissionArn: [],
297
+ permissionVersion: [],
298
+ }));
204
299
  return new protocol_http_1.HttpRequest({
205
300
  protocol,
206
301
  hostname,
@@ -219,12 +314,12 @@ const se_GetResourcePoliciesCommand = async (input, context) => {
219
314
  };
220
315
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourcepolicies";
221
316
  let body;
222
- body = JSON.stringify({
223
- ...(input.maxResults != null && { maxResults: input.maxResults }),
224
- ...(input.nextToken != null && { nextToken: input.nextToken }),
225
- ...(input.principal != null && { principal: input.principal }),
226
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
227
- });
317
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
318
+ maxResults: [],
319
+ nextToken: [],
320
+ principal: [],
321
+ resourceArns: (_) => (0, smithy_client_1._json)(_),
322
+ }));
228
323
  return new protocol_http_1.HttpRequest({
229
324
  protocol,
230
325
  hostname,
@@ -243,17 +338,15 @@ const se_GetResourceShareAssociationsCommand = async (input, context) => {
243
338
  };
244
339
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareassociations";
245
340
  let body;
246
- body = JSON.stringify({
247
- ...(input.associationStatus != null && { associationStatus: input.associationStatus }),
248
- ...(input.associationType != null && { associationType: input.associationType }),
249
- ...(input.maxResults != null && { maxResults: input.maxResults }),
250
- ...(input.nextToken != null && { nextToken: input.nextToken }),
251
- ...(input.principal != null && { principal: input.principal }),
252
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
253
- ...(input.resourceShareArns != null && {
254
- resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context),
255
- }),
256
- });
341
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
342
+ associationStatus: [],
343
+ associationType: [],
344
+ maxResults: [],
345
+ nextToken: [],
346
+ principal: [],
347
+ resourceArn: [],
348
+ resourceShareArns: (_) => (0, smithy_client_1._json)(_),
349
+ }));
257
350
  return new protocol_http_1.HttpRequest({
258
351
  protocol,
259
352
  hostname,
@@ -272,16 +365,12 @@ const se_GetResourceShareInvitationsCommand = async (input, context) => {
272
365
  };
273
366
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareinvitations";
274
367
  let body;
275
- body = JSON.stringify({
276
- ...(input.maxResults != null && { maxResults: input.maxResults }),
277
- ...(input.nextToken != null && { nextToken: input.nextToken }),
278
- ...(input.resourceShareArns != null && {
279
- resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context),
280
- }),
281
- ...(input.resourceShareInvitationArns != null && {
282
- resourceShareInvitationArns: se_ResourceShareInvitationArnList(input.resourceShareInvitationArns, context),
283
- }),
284
- });
368
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
369
+ maxResults: [],
370
+ nextToken: [],
371
+ resourceShareArns: (_) => (0, smithy_client_1._json)(_),
372
+ resourceShareInvitationArns: (_) => (0, smithy_client_1._json)(_),
373
+ }));
285
374
  return new protocol_http_1.HttpRequest({
286
375
  protocol,
287
376
  hostname,
@@ -300,18 +389,17 @@ const se_GetResourceSharesCommand = async (input, context) => {
300
389
  };
301
390
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshares";
302
391
  let body;
303
- body = JSON.stringify({
304
- ...(input.maxResults != null && { maxResults: input.maxResults }),
305
- ...(input.name != null && { name: input.name }),
306
- ...(input.nextToken != null && { nextToken: input.nextToken }),
307
- ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
308
- ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }),
309
- ...(input.resourceShareArns != null && {
310
- resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context),
311
- }),
312
- ...(input.resourceShareStatus != null && { resourceShareStatus: input.resourceShareStatus }),
313
- ...(input.tagFilters != null && { tagFilters: se_TagFilters(input.tagFilters, context) }),
314
- });
392
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
393
+ maxResults: [],
394
+ name: [],
395
+ nextToken: [],
396
+ permissionArn: [],
397
+ permissionVersion: [],
398
+ resourceOwner: [],
399
+ resourceShareArns: (_) => (0, smithy_client_1._json)(_),
400
+ resourceShareStatus: [],
401
+ tagFilters: (_) => (0, smithy_client_1._json)(_),
402
+ }));
315
403
  return new protocol_http_1.HttpRequest({
316
404
  protocol,
317
405
  hostname,
@@ -330,12 +418,12 @@ const se_ListPendingInvitationResourcesCommand = async (input, context) => {
330
418
  };
331
419
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpendinginvitationresources";
332
420
  let body;
333
- body = JSON.stringify({
334
- ...(input.maxResults != null && { maxResults: input.maxResults }),
335
- ...(input.nextToken != null && { nextToken: input.nextToken }),
336
- ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }),
337
- ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
338
- });
421
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
422
+ maxResults: [],
423
+ nextToken: [],
424
+ resourceRegionScope: [],
425
+ resourceShareInvitationArn: [],
426
+ }));
339
427
  return new protocol_http_1.HttpRequest({
340
428
  protocol,
341
429
  hostname,
@@ -347,6 +435,34 @@ const se_ListPendingInvitationResourcesCommand = async (input, context) => {
347
435
  });
348
436
  };
349
437
  exports.se_ListPendingInvitationResourcesCommand = se_ListPendingInvitationResourcesCommand;
438
+ const se_ListPermissionAssociationsCommand = async (input, context) => {
439
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
440
+ const headers = {
441
+ "content-type": "application/json",
442
+ };
443
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionassociations";
444
+ let body;
445
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
446
+ associationStatus: [],
447
+ defaultVersion: [],
448
+ featureSet: [],
449
+ maxResults: [],
450
+ nextToken: [],
451
+ permissionArn: [],
452
+ permissionVersion: [],
453
+ resourceType: [],
454
+ }));
455
+ return new protocol_http_1.HttpRequest({
456
+ protocol,
457
+ hostname,
458
+ port,
459
+ method: "POST",
460
+ headers,
461
+ path: resolvedPath,
462
+ body,
463
+ });
464
+ };
465
+ exports.se_ListPermissionAssociationsCommand = se_ListPermissionAssociationsCommand;
350
466
  const se_ListPermissionsCommand = async (input, context) => {
351
467
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
352
468
  const headers = {
@@ -354,11 +470,12 @@ const se_ListPermissionsCommand = async (input, context) => {
354
470
  };
355
471
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissions";
356
472
  let body;
357
- body = JSON.stringify({
358
- ...(input.maxResults != null && { maxResults: input.maxResults }),
359
- ...(input.nextToken != null && { nextToken: input.nextToken }),
360
- ...(input.resourceType != null && { resourceType: input.resourceType }),
361
- });
473
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
474
+ maxResults: [],
475
+ nextToken: [],
476
+ permissionType: [],
477
+ resourceType: [],
478
+ }));
362
479
  return new protocol_http_1.HttpRequest({
363
480
  protocol,
364
481
  hostname,
@@ -377,11 +494,11 @@ const se_ListPermissionVersionsCommand = async (input, context) => {
377
494
  };
378
495
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionversions";
379
496
  let body;
380
- body = JSON.stringify({
381
- ...(input.maxResults != null && { maxResults: input.maxResults }),
382
- ...(input.nextToken != null && { nextToken: input.nextToken }),
383
- ...(input.permissionArn != null && { permissionArn: input.permissionArn }),
384
- });
497
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
498
+ maxResults: [],
499
+ nextToken: [],
500
+ permissionArn: [],
501
+ }));
385
502
  return new protocol_http_1.HttpRequest({
386
503
  protocol,
387
504
  hostname,
@@ -400,17 +517,15 @@ const se_ListPrincipalsCommand = async (input, context) => {
400
517
  };
401
518
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listprincipals";
402
519
  let body;
403
- body = JSON.stringify({
404
- ...(input.maxResults != null && { maxResults: input.maxResults }),
405
- ...(input.nextToken != null && { nextToken: input.nextToken }),
406
- ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }),
407
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
408
- ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }),
409
- ...(input.resourceShareArns != null && {
410
- resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context),
411
- }),
412
- ...(input.resourceType != null && { resourceType: input.resourceType }),
413
- });
520
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
521
+ maxResults: [],
522
+ nextToken: [],
523
+ principals: (_) => (0, smithy_client_1._json)(_),
524
+ resourceArn: [],
525
+ resourceOwner: [],
526
+ resourceShareArns: (_) => (0, smithy_client_1._json)(_),
527
+ resourceType: [],
528
+ }));
414
529
  return new protocol_http_1.HttpRequest({
415
530
  protocol,
416
531
  hostname,
@@ -422,6 +537,30 @@ const se_ListPrincipalsCommand = async (input, context) => {
422
537
  });
423
538
  };
424
539
  exports.se_ListPrincipalsCommand = se_ListPrincipalsCommand;
540
+ const se_ListReplacePermissionAssociationsWorkCommand = async (input, context) => {
541
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
542
+ const headers = {
543
+ "content-type": "application/json",
544
+ };
545
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listreplacepermissionassociationswork";
546
+ let body;
547
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
548
+ maxResults: [],
549
+ nextToken: [],
550
+ status: [],
551
+ workIds: (_) => (0, smithy_client_1._json)(_),
552
+ }));
553
+ return new protocol_http_1.HttpRequest({
554
+ protocol,
555
+ hostname,
556
+ port,
557
+ method: "POST",
558
+ headers,
559
+ path: resolvedPath,
560
+ body,
561
+ });
562
+ };
563
+ exports.se_ListReplacePermissionAssociationsWorkCommand = se_ListReplacePermissionAssociationsWorkCommand;
425
564
  const se_ListResourcesCommand = async (input, context) => {
426
565
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
427
566
  const headers = {
@@ -429,18 +568,16 @@ const se_ListResourcesCommand = async (input, context) => {
429
568
  };
430
569
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresources";
431
570
  let body;
432
- body = JSON.stringify({
433
- ...(input.maxResults != null && { maxResults: input.maxResults }),
434
- ...(input.nextToken != null && { nextToken: input.nextToken }),
435
- ...(input.principal != null && { principal: input.principal }),
436
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
437
- ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }),
438
- ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }),
439
- ...(input.resourceShareArns != null && {
440
- resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context),
441
- }),
442
- ...(input.resourceType != null && { resourceType: input.resourceType }),
443
- });
571
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
572
+ maxResults: [],
573
+ nextToken: [],
574
+ principal: [],
575
+ resourceArns: (_) => (0, smithy_client_1._json)(_),
576
+ resourceOwner: [],
577
+ resourceRegionScope: [],
578
+ resourceShareArns: (_) => (0, smithy_client_1._json)(_),
579
+ resourceType: [],
580
+ }));
444
581
  return new protocol_http_1.HttpRequest({
445
582
  protocol,
446
583
  hostname,
@@ -459,11 +596,11 @@ const se_ListResourceSharePermissionsCommand = async (input, context) => {
459
596
  };
460
597
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcesharepermissions";
461
598
  let body;
462
- body = JSON.stringify({
463
- ...(input.maxResults != null && { maxResults: input.maxResults }),
464
- ...(input.nextToken != null && { nextToken: input.nextToken }),
465
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
466
- });
599
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
600
+ maxResults: [],
601
+ nextToken: [],
602
+ resourceShareArn: [],
603
+ }));
467
604
  return new protocol_http_1.HttpRequest({
468
605
  protocol,
469
606
  hostname,
@@ -482,11 +619,11 @@ const se_ListResourceTypesCommand = async (input, context) => {
482
619
  };
483
620
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcetypes";
484
621
  let body;
485
- body = JSON.stringify({
486
- ...(input.maxResults != null && { maxResults: input.maxResults }),
487
- ...(input.nextToken != null && { nextToken: input.nextToken }),
488
- ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }),
489
- });
622
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
623
+ maxResults: [],
624
+ nextToken: [],
625
+ resourceRegionScope: [],
626
+ }));
490
627
  return new protocol_http_1.HttpRequest({
491
628
  protocol,
492
629
  hostname,
@@ -498,11 +635,34 @@ const se_ListResourceTypesCommand = async (input, context) => {
498
635
  });
499
636
  };
500
637
  exports.se_ListResourceTypesCommand = se_ListResourceTypesCommand;
638
+ const se_PromotePermissionCreatedFromPolicyCommand = async (input, context) => {
639
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
640
+ const headers = {
641
+ "content-type": "application/json",
642
+ };
643
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/promotepermissioncreatedfrompolicy";
644
+ let body;
645
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
646
+ clientToken: [],
647
+ name: [],
648
+ permissionArn: [],
649
+ }));
650
+ return new protocol_http_1.HttpRequest({
651
+ protocol,
652
+ hostname,
653
+ port,
654
+ method: "POST",
655
+ headers,
656
+ path: resolvedPath,
657
+ body,
658
+ });
659
+ };
660
+ exports.se_PromotePermissionCreatedFromPolicyCommand = se_PromotePermissionCreatedFromPolicyCommand;
501
661
  const se_PromoteResourceShareCreatedFromPolicyCommand = async (input, context) => {
502
662
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
503
663
  const headers = {};
504
664
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/promoteresourcesharecreatedfrompolicy";
505
- const query = map({
665
+ const query = (0, smithy_client_1.map)({
506
666
  resourceShareArn: [, (0, smithy_client_1.expectNonNull)(input.resourceShareArn, `resourceShareArn`)],
507
667
  });
508
668
  let body;
@@ -525,10 +685,10 @@ const se_RejectResourceShareInvitationCommand = async (input, context) => {
525
685
  };
526
686
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rejectresourceshareinvitation";
527
687
  let body;
528
- body = JSON.stringify({
529
- ...(input.clientToken != null && { clientToken: input.clientToken }),
530
- ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }),
531
- });
688
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
689
+ clientToken: [],
690
+ resourceShareInvitationArn: [],
691
+ }));
532
692
  return new protocol_http_1.HttpRequest({
533
693
  protocol,
534
694
  hostname,
@@ -540,6 +700,53 @@ const se_RejectResourceShareInvitationCommand = async (input, context) => {
540
700
  });
541
701
  };
542
702
  exports.se_RejectResourceShareInvitationCommand = se_RejectResourceShareInvitationCommand;
703
+ const se_ReplacePermissionAssociationsCommand = async (input, context) => {
704
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
705
+ const headers = {
706
+ "content-type": "application/json",
707
+ };
708
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/replacepermissionassociations";
709
+ let body;
710
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
711
+ clientToken: [],
712
+ fromPermissionArn: [],
713
+ fromPermissionVersion: [],
714
+ toPermissionArn: [],
715
+ }));
716
+ return new protocol_http_1.HttpRequest({
717
+ protocol,
718
+ hostname,
719
+ port,
720
+ method: "POST",
721
+ headers,
722
+ path: resolvedPath,
723
+ body,
724
+ });
725
+ };
726
+ exports.se_ReplacePermissionAssociationsCommand = se_ReplacePermissionAssociationsCommand;
727
+ const se_SetDefaultPermissionVersionCommand = async (input, context) => {
728
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
729
+ const headers = {
730
+ "content-type": "application/json",
731
+ };
732
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/setdefaultpermissionversion";
733
+ let body;
734
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
735
+ clientToken: [],
736
+ permissionArn: [],
737
+ permissionVersion: [],
738
+ }));
739
+ return new protocol_http_1.HttpRequest({
740
+ protocol,
741
+ hostname,
742
+ port,
743
+ method: "POST",
744
+ headers,
745
+ path: resolvedPath,
746
+ body,
747
+ });
748
+ };
749
+ exports.se_SetDefaultPermissionVersionCommand = se_SetDefaultPermissionVersionCommand;
543
750
  const se_TagResourceCommand = async (input, context) => {
544
751
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
545
752
  const headers = {
@@ -547,10 +754,11 @@ const se_TagResourceCommand = async (input, context) => {
547
754
  };
548
755
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagresource";
549
756
  let body;
550
- body = JSON.stringify({
551
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
552
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
553
- });
757
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
758
+ resourceArn: [],
759
+ resourceShareArn: [],
760
+ tags: (_) => (0, smithy_client_1._json)(_),
761
+ }));
554
762
  return new protocol_http_1.HttpRequest({
555
763
  protocol,
556
764
  hostname,
@@ -569,10 +777,11 @@ const se_UntagResourceCommand = async (input, context) => {
569
777
  };
570
778
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untagresource";
571
779
  let body;
572
- body = JSON.stringify({
573
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
574
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
575
- });
780
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
781
+ resourceArn: [],
782
+ resourceShareArn: [],
783
+ tagKeys: (_) => (0, smithy_client_1._json)(_),
784
+ }));
576
785
  return new protocol_http_1.HttpRequest({
577
786
  protocol,
578
787
  hostname,
@@ -591,12 +800,12 @@ const se_UpdateResourceShareCommand = async (input, context) => {
591
800
  };
592
801
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateresourceshare";
593
802
  let body;
594
- body = JSON.stringify({
595
- ...(input.allowExternalPrincipals != null && { allowExternalPrincipals: input.allowExternalPrincipals }),
596
- ...(input.clientToken != null && { clientToken: input.clientToken }),
597
- ...(input.name != null && { name: input.name }),
598
- ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }),
599
- });
803
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
804
+ allowExternalPrincipals: [],
805
+ clientToken: [],
806
+ name: [],
807
+ resourceShareArn: [],
808
+ }));
600
809
  return new protocol_http_1.HttpRequest({
601
810
  protocol,
602
811
  hostname,
@@ -612,16 +821,15 @@ const de_AcceptResourceShareInvitationCommand = async (output, context) => {
612
821
  if (output.statusCode !== 200 && output.statusCode >= 300) {
613
822
  return de_AcceptResourceShareInvitationCommandError(output, context);
614
823
  }
615
- const contents = map({
824
+ const contents = (0, smithy_client_1.map)({
616
825
  $metadata: deserializeMetadata(output),
617
826
  });
618
827
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
619
- if (data.clientToken != null) {
620
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
621
- }
622
- if (data.resourceShareInvitation != null) {
623
- contents.resourceShareInvitation = de_ResourceShareInvitation(data.resourceShareInvitation, context);
624
- }
828
+ const doc = (0, smithy_client_1.take)(data, {
829
+ clientToken: smithy_client_1.expectString,
830
+ resourceShareInvitation: (_) => de_ResourceShareInvitation(_, context),
831
+ });
832
+ Object.assign(contents, doc);
625
833
  return contents;
626
834
  };
627
835
  exports.de_AcceptResourceShareInvitationCommand = de_AcceptResourceShareInvitationCommand;
@@ -664,10 +872,9 @@ const de_AcceptResourceShareInvitationCommandError = async (output, context) =>
664
872
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
665
873
  default:
666
874
  const parsedBody = parsedOutput.body;
667
- (0, smithy_client_1.throwDefaultError)({
875
+ return throwDefaultError({
668
876
  output,
669
877
  parsedBody,
670
- exceptionCtor: RAMServiceException_1.RAMServiceException,
671
878
  errorCode,
672
879
  });
673
880
  }
@@ -676,16 +883,15 @@ const de_AssociateResourceShareCommand = async (output, context) => {
676
883
  if (output.statusCode !== 200 && output.statusCode >= 300) {
677
884
  return de_AssociateResourceShareCommandError(output, context);
678
885
  }
679
- const contents = map({
886
+ const contents = (0, smithy_client_1.map)({
680
887
  $metadata: deserializeMetadata(output),
681
888
  });
682
889
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
683
- if (data.clientToken != null) {
684
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
685
- }
686
- if (data.resourceShareAssociations != null) {
687
- contents.resourceShareAssociations = de_ResourceShareAssociationList(data.resourceShareAssociations, context);
688
- }
890
+ const doc = (0, smithy_client_1.take)(data, {
891
+ clientToken: smithy_client_1.expectString,
892
+ resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
893
+ });
894
+ Object.assign(contents, doc);
689
895
  return contents;
690
896
  };
691
897
  exports.de_AssociateResourceShareCommand = de_AssociateResourceShareCommand;
@@ -731,10 +937,9 @@ const de_AssociateResourceShareCommandError = async (output, context) => {
731
937
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
732
938
  default:
733
939
  const parsedBody = parsedOutput.body;
734
- (0, smithy_client_1.throwDefaultError)({
940
+ return throwDefaultError({
735
941
  output,
736
942
  parsedBody,
737
- exceptionCtor: RAMServiceException_1.RAMServiceException,
738
943
  errorCode,
739
944
  });
740
945
  }
@@ -743,16 +948,15 @@ const de_AssociateResourceSharePermissionCommand = async (output, context) => {
743
948
  if (output.statusCode !== 200 && output.statusCode >= 300) {
744
949
  return de_AssociateResourceSharePermissionCommandError(output, context);
745
950
  }
746
- const contents = map({
951
+ const contents = (0, smithy_client_1.map)({
747
952
  $metadata: deserializeMetadata(output),
748
953
  });
749
954
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
750
- if (data.clientToken != null) {
751
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
752
- }
753
- if (data.returnValue != null) {
754
- contents.returnValue = (0, smithy_client_1.expectBoolean)(data.returnValue);
755
- }
955
+ const doc = (0, smithy_client_1.take)(data, {
956
+ clientToken: smithy_client_1.expectString,
957
+ returnValue: smithy_client_1.expectBoolean,
958
+ });
959
+ Object.assign(contents, doc);
756
960
  return contents;
757
961
  };
758
962
  exports.de_AssociateResourceSharePermissionCommand = de_AssociateResourceSharePermissionCommand;
@@ -786,32 +990,30 @@ const de_AssociateResourceSharePermissionCommandError = async (output, context)
786
990
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
787
991
  default:
788
992
  const parsedBody = parsedOutput.body;
789
- (0, smithy_client_1.throwDefaultError)({
993
+ return throwDefaultError({
790
994
  output,
791
995
  parsedBody,
792
- exceptionCtor: RAMServiceException_1.RAMServiceException,
793
996
  errorCode,
794
997
  });
795
998
  }
796
999
  };
797
- const de_CreateResourceShareCommand = async (output, context) => {
1000
+ const de_CreatePermissionCommand = async (output, context) => {
798
1001
  if (output.statusCode !== 200 && output.statusCode >= 300) {
799
- return de_CreateResourceShareCommandError(output, context);
1002
+ return de_CreatePermissionCommandError(output, context);
800
1003
  }
801
- const contents = map({
1004
+ const contents = (0, smithy_client_1.map)({
802
1005
  $metadata: deserializeMetadata(output),
803
1006
  });
804
1007
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
805
- if (data.clientToken != null) {
806
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
807
- }
808
- if (data.resourceShare != null) {
809
- contents.resourceShare = de_ResourceShare(data.resourceShare, context);
810
- }
1008
+ const doc = (0, smithy_client_1.take)(data, {
1009
+ clientToken: smithy_client_1.expectString,
1010
+ permission: (_) => de_ResourceSharePermissionSummary(_, context),
1011
+ });
1012
+ Object.assign(contents, doc);
811
1013
  return contents;
812
1014
  };
813
- exports.de_CreateResourceShareCommand = de_CreateResourceShareCommand;
814
- const de_CreateResourceShareCommandError = async (output, context) => {
1015
+ exports.de_CreatePermissionCommand = de_CreatePermissionCommand;
1016
+ const de_CreatePermissionCommandError = async (output, context) => {
815
1017
  const parsedOutput = {
816
1018
  ...output,
817
1019
  body: await parseErrorBody(output.body, context),
@@ -827,58 +1029,53 @@ const de_CreateResourceShareCommandError = async (output, context) => {
827
1029
  case "InvalidParameterException":
828
1030
  case "com.amazonaws.ram#InvalidParameterException":
829
1031
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
830
- case "InvalidStateTransitionException":
831
- case "com.amazonaws.ram#InvalidStateTransitionException":
832
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
833
- case "MalformedArnException":
834
- case "com.amazonaws.ram#MalformedArnException":
835
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1032
+ case "InvalidPolicyException":
1033
+ case "com.amazonaws.ram#InvalidPolicyException":
1034
+ throw await de_InvalidPolicyExceptionRes(parsedOutput, context);
1035
+ case "MalformedPolicyTemplateException":
1036
+ case "com.amazonaws.ram#MalformedPolicyTemplateException":
1037
+ throw await de_MalformedPolicyTemplateExceptionRes(parsedOutput, context);
836
1038
  case "OperationNotPermittedException":
837
1039
  case "com.amazonaws.ram#OperationNotPermittedException":
838
1040
  throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
839
- case "ResourceShareLimitExceededException":
840
- case "com.amazonaws.ram#ResourceShareLimitExceededException":
841
- throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
1041
+ case "PermissionAlreadyExistsException":
1042
+ case "com.amazonaws.ram#PermissionAlreadyExistsException":
1043
+ throw await de_PermissionAlreadyExistsExceptionRes(parsedOutput, context);
1044
+ case "PermissionLimitExceededException":
1045
+ case "com.amazonaws.ram#PermissionLimitExceededException":
1046
+ throw await de_PermissionLimitExceededExceptionRes(parsedOutput, context);
842
1047
  case "ServerInternalException":
843
1048
  case "com.amazonaws.ram#ServerInternalException":
844
1049
  throw await de_ServerInternalExceptionRes(parsedOutput, context);
845
1050
  case "ServiceUnavailableException":
846
1051
  case "com.amazonaws.ram#ServiceUnavailableException":
847
1052
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
848
- case "TagPolicyViolationException":
849
- case "com.amazonaws.ram#TagPolicyViolationException":
850
- throw await de_TagPolicyViolationExceptionRes(parsedOutput, context);
851
- case "UnknownResourceException":
852
- case "com.amazonaws.ram#UnknownResourceException":
853
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
854
1053
  default:
855
1054
  const parsedBody = parsedOutput.body;
856
- (0, smithy_client_1.throwDefaultError)({
1055
+ return throwDefaultError({
857
1056
  output,
858
1057
  parsedBody,
859
- exceptionCtor: RAMServiceException_1.RAMServiceException,
860
1058
  errorCode,
861
1059
  });
862
1060
  }
863
1061
  };
864
- const de_DeleteResourceShareCommand = async (output, context) => {
1062
+ const de_CreatePermissionVersionCommand = async (output, context) => {
865
1063
  if (output.statusCode !== 200 && output.statusCode >= 300) {
866
- return de_DeleteResourceShareCommandError(output, context);
1064
+ return de_CreatePermissionVersionCommandError(output, context);
867
1065
  }
868
- const contents = map({
1066
+ const contents = (0, smithy_client_1.map)({
869
1067
  $metadata: deserializeMetadata(output),
870
1068
  });
871
1069
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
872
- if (data.clientToken != null) {
873
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
874
- }
875
- if (data.returnValue != null) {
876
- contents.returnValue = (0, smithy_client_1.expectBoolean)(data.returnValue);
877
- }
1070
+ const doc = (0, smithy_client_1.take)(data, {
1071
+ clientToken: smithy_client_1.expectString,
1072
+ permission: (_) => de_ResourceSharePermissionDetail(_, context),
1073
+ });
1074
+ Object.assign(contents, doc);
878
1075
  return contents;
879
1076
  };
880
- exports.de_DeleteResourceShareCommand = de_DeleteResourceShareCommand;
881
- const de_DeleteResourceShareCommandError = async (output, context) => {
1077
+ exports.de_CreatePermissionVersionCommand = de_CreatePermissionVersionCommand;
1078
+ const de_CreatePermissionVersionCommandError = async (output, context) => {
882
1079
  const parsedOutput = {
883
1080
  ...output,
884
1081
  body: await parseErrorBody(output.body, context),
@@ -894,15 +1091,18 @@ const de_DeleteResourceShareCommandError = async (output, context) => {
894
1091
  case "InvalidParameterException":
895
1092
  case "com.amazonaws.ram#InvalidParameterException":
896
1093
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
897
- case "InvalidStateTransitionException":
898
- case "com.amazonaws.ram#InvalidStateTransitionException":
899
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1094
+ case "InvalidPolicyException":
1095
+ case "com.amazonaws.ram#InvalidPolicyException":
1096
+ throw await de_InvalidPolicyExceptionRes(parsedOutput, context);
900
1097
  case "MalformedArnException":
901
1098
  case "com.amazonaws.ram#MalformedArnException":
902
1099
  throw await de_MalformedArnExceptionRes(parsedOutput, context);
903
- case "OperationNotPermittedException":
904
- case "com.amazonaws.ram#OperationNotPermittedException":
905
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1100
+ case "MalformedPolicyTemplateException":
1101
+ case "com.amazonaws.ram#MalformedPolicyTemplateException":
1102
+ throw await de_MalformedPolicyTemplateExceptionRes(parsedOutput, context);
1103
+ case "PermissionVersionsLimitExceededException":
1104
+ case "com.amazonaws.ram#PermissionVersionsLimitExceededException":
1105
+ throw await de_PermissionVersionsLimitExceededExceptionRes(parsedOutput, context);
906
1106
  case "ServerInternalException":
907
1107
  case "com.amazonaws.ram#ServerInternalException":
908
1108
  throw await de_ServerInternalExceptionRes(parsedOutput, context);
@@ -914,32 +1114,30 @@ const de_DeleteResourceShareCommandError = async (output, context) => {
914
1114
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
915
1115
  default:
916
1116
  const parsedBody = parsedOutput.body;
917
- (0, smithy_client_1.throwDefaultError)({
1117
+ return throwDefaultError({
918
1118
  output,
919
1119
  parsedBody,
920
- exceptionCtor: RAMServiceException_1.RAMServiceException,
921
1120
  errorCode,
922
1121
  });
923
1122
  }
924
1123
  };
925
- const de_DisassociateResourceShareCommand = async (output, context) => {
1124
+ const de_CreateResourceShareCommand = async (output, context) => {
926
1125
  if (output.statusCode !== 200 && output.statusCode >= 300) {
927
- return de_DisassociateResourceShareCommandError(output, context);
1126
+ return de_CreateResourceShareCommandError(output, context);
928
1127
  }
929
- const contents = map({
1128
+ const contents = (0, smithy_client_1.map)({
930
1129
  $metadata: deserializeMetadata(output),
931
1130
  });
932
1131
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
933
- if (data.clientToken != null) {
934
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
935
- }
936
- if (data.resourceShareAssociations != null) {
937
- contents.resourceShareAssociations = de_ResourceShareAssociationList(data.resourceShareAssociations, context);
938
- }
1132
+ const doc = (0, smithy_client_1.take)(data, {
1133
+ clientToken: smithy_client_1.expectString,
1134
+ resourceShare: (_) => de_ResourceShare(_, context),
1135
+ });
1136
+ Object.assign(contents, doc);
939
1137
  return contents;
940
1138
  };
941
- exports.de_DisassociateResourceShareCommand = de_DisassociateResourceShareCommand;
942
- const de_DisassociateResourceShareCommandError = async (output, context) => {
1139
+ exports.de_CreateResourceShareCommand = de_CreateResourceShareCommand;
1140
+ const de_CreateResourceShareCommandError = async (output, context) => {
943
1141
  const parsedOutput = {
944
1142
  ...output,
945
1143
  body: await parseErrorBody(output.body, context),
@@ -973,52 +1171,51 @@ const de_DisassociateResourceShareCommandError = async (output, context) => {
973
1171
  case "ServiceUnavailableException":
974
1172
  case "com.amazonaws.ram#ServiceUnavailableException":
975
1173
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1174
+ case "TagPolicyViolationException":
1175
+ case "com.amazonaws.ram#TagPolicyViolationException":
1176
+ throw await de_TagPolicyViolationExceptionRes(parsedOutput, context);
976
1177
  case "UnknownResourceException":
977
1178
  case "com.amazonaws.ram#UnknownResourceException":
978
1179
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
979
1180
  default:
980
1181
  const parsedBody = parsedOutput.body;
981
- (0, smithy_client_1.throwDefaultError)({
1182
+ return throwDefaultError({
982
1183
  output,
983
1184
  parsedBody,
984
- exceptionCtor: RAMServiceException_1.RAMServiceException,
985
1185
  errorCode,
986
1186
  });
987
1187
  }
988
1188
  };
989
- const de_DisassociateResourceSharePermissionCommand = async (output, context) => {
1189
+ const de_DeletePermissionCommand = async (output, context) => {
990
1190
  if (output.statusCode !== 200 && output.statusCode >= 300) {
991
- return de_DisassociateResourceSharePermissionCommandError(output, context);
1191
+ return de_DeletePermissionCommandError(output, context);
992
1192
  }
993
- const contents = map({
1193
+ const contents = (0, smithy_client_1.map)({
994
1194
  $metadata: deserializeMetadata(output),
995
1195
  });
996
1196
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
997
- if (data.clientToken != null) {
998
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
999
- }
1000
- if (data.returnValue != null) {
1001
- contents.returnValue = (0, smithy_client_1.expectBoolean)(data.returnValue);
1002
- }
1197
+ const doc = (0, smithy_client_1.take)(data, {
1198
+ clientToken: smithy_client_1.expectString,
1199
+ permissionStatus: smithy_client_1.expectString,
1200
+ returnValue: smithy_client_1.expectBoolean,
1201
+ });
1202
+ Object.assign(contents, doc);
1003
1203
  return contents;
1004
1204
  };
1005
- exports.de_DisassociateResourceSharePermissionCommand = de_DisassociateResourceSharePermissionCommand;
1006
- const de_DisassociateResourceSharePermissionCommandError = async (output, context) => {
1205
+ exports.de_DeletePermissionCommand = de_DeletePermissionCommand;
1206
+ const de_DeletePermissionCommandError = async (output, context) => {
1007
1207
  const parsedOutput = {
1008
1208
  ...output,
1009
1209
  body: await parseErrorBody(output.body, context),
1010
1210
  };
1011
1211
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1012
1212
  switch (errorCode) {
1213
+ case "IdempotentParameterMismatchException":
1214
+ case "com.amazonaws.ram#IdempotentParameterMismatchException":
1215
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1013
1216
  case "InvalidClientTokenException":
1014
1217
  case "com.amazonaws.ram#InvalidClientTokenException":
1015
1218
  throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1016
- case "InvalidParameterException":
1017
- case "com.amazonaws.ram#InvalidParameterException":
1018
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1019
- case "InvalidStateTransitionException":
1020
- case "com.amazonaws.ram#InvalidStateTransitionException":
1021
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1022
1219
  case "MalformedArnException":
1023
1220
  case "com.amazonaws.ram#MalformedArnException":
1024
1221
  throw await de_MalformedArnExceptionRes(parsedOutput, context);
@@ -1036,35 +1233,49 @@ const de_DisassociateResourceSharePermissionCommandError = async (output, contex
1036
1233
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1037
1234
  default:
1038
1235
  const parsedBody = parsedOutput.body;
1039
- (0, smithy_client_1.throwDefaultError)({
1236
+ return throwDefaultError({
1040
1237
  output,
1041
1238
  parsedBody,
1042
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1043
1239
  errorCode,
1044
1240
  });
1045
1241
  }
1046
1242
  };
1047
- const de_EnableSharingWithAwsOrganizationCommand = async (output, context) => {
1243
+ const de_DeletePermissionVersionCommand = async (output, context) => {
1048
1244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
- return de_EnableSharingWithAwsOrganizationCommandError(output, context);
1245
+ return de_DeletePermissionVersionCommandError(output, context);
1050
1246
  }
1051
- const contents = map({
1247
+ const contents = (0, smithy_client_1.map)({
1052
1248
  $metadata: deserializeMetadata(output),
1053
1249
  });
1054
1250
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1055
- if (data.returnValue != null) {
1056
- contents.returnValue = (0, smithy_client_1.expectBoolean)(data.returnValue);
1057
- }
1251
+ const doc = (0, smithy_client_1.take)(data, {
1252
+ clientToken: smithy_client_1.expectString,
1253
+ permissionStatus: smithy_client_1.expectString,
1254
+ returnValue: smithy_client_1.expectBoolean,
1255
+ });
1256
+ Object.assign(contents, doc);
1058
1257
  return contents;
1059
1258
  };
1060
- exports.de_EnableSharingWithAwsOrganizationCommand = de_EnableSharingWithAwsOrganizationCommand;
1061
- const de_EnableSharingWithAwsOrganizationCommandError = async (output, context) => {
1259
+ exports.de_DeletePermissionVersionCommand = de_DeletePermissionVersionCommand;
1260
+ const de_DeletePermissionVersionCommandError = async (output, context) => {
1062
1261
  const parsedOutput = {
1063
1262
  ...output,
1064
1263
  body: await parseErrorBody(output.body, context),
1065
1264
  };
1066
1265
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1067
1266
  switch (errorCode) {
1267
+ case "IdempotentParameterMismatchException":
1268
+ case "com.amazonaws.ram#IdempotentParameterMismatchException":
1269
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1270
+ case "InvalidClientTokenException":
1271
+ case "com.amazonaws.ram#InvalidClientTokenException":
1272
+ throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1273
+ case "InvalidParameterException":
1274
+ case "com.amazonaws.ram#InvalidParameterException":
1275
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1276
+ case "MalformedArnException":
1277
+ case "com.amazonaws.ram#MalformedArnException":
1278
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
1068
1279
  case "OperationNotPermittedException":
1069
1280
  case "com.amazonaws.ram#OperationNotPermittedException":
1070
1281
  throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
@@ -1074,27 +1285,247 @@ const de_EnableSharingWithAwsOrganizationCommandError = async (output, context)
1074
1285
  case "ServiceUnavailableException":
1075
1286
  case "com.amazonaws.ram#ServiceUnavailableException":
1076
1287
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1288
+ case "UnknownResourceException":
1289
+ case "com.amazonaws.ram#UnknownResourceException":
1290
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1077
1291
  default:
1078
1292
  const parsedBody = parsedOutput.body;
1079
- (0, smithy_client_1.throwDefaultError)({
1293
+ return throwDefaultError({
1080
1294
  output,
1081
1295
  parsedBody,
1082
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1083
1296
  errorCode,
1084
1297
  });
1085
1298
  }
1086
1299
  };
1087
- const de_GetPermissionCommand = async (output, context) => {
1300
+ const de_DeleteResourceShareCommand = async (output, context) => {
1088
1301
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1089
- return de_GetPermissionCommandError(output, context);
1302
+ return de_DeleteResourceShareCommandError(output, context);
1303
+ }
1304
+ const contents = (0, smithy_client_1.map)({
1305
+ $metadata: deserializeMetadata(output),
1306
+ });
1307
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1308
+ const doc = (0, smithy_client_1.take)(data, {
1309
+ clientToken: smithy_client_1.expectString,
1310
+ returnValue: smithy_client_1.expectBoolean,
1311
+ });
1312
+ Object.assign(contents, doc);
1313
+ return contents;
1314
+ };
1315
+ exports.de_DeleteResourceShareCommand = de_DeleteResourceShareCommand;
1316
+ const de_DeleteResourceShareCommandError = async (output, context) => {
1317
+ const parsedOutput = {
1318
+ ...output,
1319
+ body: await parseErrorBody(output.body, context),
1320
+ };
1321
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1322
+ switch (errorCode) {
1323
+ case "IdempotentParameterMismatchException":
1324
+ case "com.amazonaws.ram#IdempotentParameterMismatchException":
1325
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1326
+ case "InvalidClientTokenException":
1327
+ case "com.amazonaws.ram#InvalidClientTokenException":
1328
+ throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1329
+ case "InvalidParameterException":
1330
+ case "com.amazonaws.ram#InvalidParameterException":
1331
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1332
+ case "InvalidStateTransitionException":
1333
+ case "com.amazonaws.ram#InvalidStateTransitionException":
1334
+ throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1335
+ case "MalformedArnException":
1336
+ case "com.amazonaws.ram#MalformedArnException":
1337
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
1338
+ case "OperationNotPermittedException":
1339
+ case "com.amazonaws.ram#OperationNotPermittedException":
1340
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1341
+ case "ServerInternalException":
1342
+ case "com.amazonaws.ram#ServerInternalException":
1343
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
1344
+ case "ServiceUnavailableException":
1345
+ case "com.amazonaws.ram#ServiceUnavailableException":
1346
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1347
+ case "UnknownResourceException":
1348
+ case "com.amazonaws.ram#UnknownResourceException":
1349
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1350
+ default:
1351
+ const parsedBody = parsedOutput.body;
1352
+ return throwDefaultError({
1353
+ output,
1354
+ parsedBody,
1355
+ errorCode,
1356
+ });
1357
+ }
1358
+ };
1359
+ const de_DisassociateResourceShareCommand = async (output, context) => {
1360
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1361
+ return de_DisassociateResourceShareCommandError(output, context);
1362
+ }
1363
+ const contents = (0, smithy_client_1.map)({
1364
+ $metadata: deserializeMetadata(output),
1365
+ });
1366
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1367
+ const doc = (0, smithy_client_1.take)(data, {
1368
+ clientToken: smithy_client_1.expectString,
1369
+ resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
1370
+ });
1371
+ Object.assign(contents, doc);
1372
+ return contents;
1373
+ };
1374
+ exports.de_DisassociateResourceShareCommand = de_DisassociateResourceShareCommand;
1375
+ const de_DisassociateResourceShareCommandError = async (output, context) => {
1376
+ const parsedOutput = {
1377
+ ...output,
1378
+ body: await parseErrorBody(output.body, context),
1379
+ };
1380
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1381
+ switch (errorCode) {
1382
+ case "IdempotentParameterMismatchException":
1383
+ case "com.amazonaws.ram#IdempotentParameterMismatchException":
1384
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1385
+ case "InvalidClientTokenException":
1386
+ case "com.amazonaws.ram#InvalidClientTokenException":
1387
+ throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1388
+ case "InvalidParameterException":
1389
+ case "com.amazonaws.ram#InvalidParameterException":
1390
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1391
+ case "InvalidStateTransitionException":
1392
+ case "com.amazonaws.ram#InvalidStateTransitionException":
1393
+ throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1394
+ case "MalformedArnException":
1395
+ case "com.amazonaws.ram#MalformedArnException":
1396
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
1397
+ case "OperationNotPermittedException":
1398
+ case "com.amazonaws.ram#OperationNotPermittedException":
1399
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1400
+ case "ResourceShareLimitExceededException":
1401
+ case "com.amazonaws.ram#ResourceShareLimitExceededException":
1402
+ throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
1403
+ case "ServerInternalException":
1404
+ case "com.amazonaws.ram#ServerInternalException":
1405
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
1406
+ case "ServiceUnavailableException":
1407
+ case "com.amazonaws.ram#ServiceUnavailableException":
1408
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1409
+ case "UnknownResourceException":
1410
+ case "com.amazonaws.ram#UnknownResourceException":
1411
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1412
+ default:
1413
+ const parsedBody = parsedOutput.body;
1414
+ return throwDefaultError({
1415
+ output,
1416
+ parsedBody,
1417
+ errorCode,
1418
+ });
1090
1419
  }
1091
- const contents = map({
1420
+ };
1421
+ const de_DisassociateResourceSharePermissionCommand = async (output, context) => {
1422
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1423
+ return de_DisassociateResourceSharePermissionCommandError(output, context);
1424
+ }
1425
+ const contents = (0, smithy_client_1.map)({
1426
+ $metadata: deserializeMetadata(output),
1427
+ });
1428
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1429
+ const doc = (0, smithy_client_1.take)(data, {
1430
+ clientToken: smithy_client_1.expectString,
1431
+ returnValue: smithy_client_1.expectBoolean,
1432
+ });
1433
+ Object.assign(contents, doc);
1434
+ return contents;
1435
+ };
1436
+ exports.de_DisassociateResourceSharePermissionCommand = de_DisassociateResourceSharePermissionCommand;
1437
+ const de_DisassociateResourceSharePermissionCommandError = async (output, context) => {
1438
+ const parsedOutput = {
1439
+ ...output,
1440
+ body: await parseErrorBody(output.body, context),
1441
+ };
1442
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1443
+ switch (errorCode) {
1444
+ case "InvalidClientTokenException":
1445
+ case "com.amazonaws.ram#InvalidClientTokenException":
1446
+ throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1447
+ case "InvalidParameterException":
1448
+ case "com.amazonaws.ram#InvalidParameterException":
1449
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1450
+ case "InvalidStateTransitionException":
1451
+ case "com.amazonaws.ram#InvalidStateTransitionException":
1452
+ throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1453
+ case "MalformedArnException":
1454
+ case "com.amazonaws.ram#MalformedArnException":
1455
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
1456
+ case "OperationNotPermittedException":
1457
+ case "com.amazonaws.ram#OperationNotPermittedException":
1458
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1459
+ case "ServerInternalException":
1460
+ case "com.amazonaws.ram#ServerInternalException":
1461
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
1462
+ case "ServiceUnavailableException":
1463
+ case "com.amazonaws.ram#ServiceUnavailableException":
1464
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1465
+ case "UnknownResourceException":
1466
+ case "com.amazonaws.ram#UnknownResourceException":
1467
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1468
+ default:
1469
+ const parsedBody = parsedOutput.body;
1470
+ return throwDefaultError({
1471
+ output,
1472
+ parsedBody,
1473
+ errorCode,
1474
+ });
1475
+ }
1476
+ };
1477
+ const de_EnableSharingWithAwsOrganizationCommand = async (output, context) => {
1478
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1479
+ return de_EnableSharingWithAwsOrganizationCommandError(output, context);
1480
+ }
1481
+ const contents = (0, smithy_client_1.map)({
1092
1482
  $metadata: deserializeMetadata(output),
1093
1483
  });
1094
1484
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1095
- if (data.permission != null) {
1096
- contents.permission = de_ResourceSharePermissionDetail(data.permission, context);
1485
+ const doc = (0, smithy_client_1.take)(data, {
1486
+ returnValue: smithy_client_1.expectBoolean,
1487
+ });
1488
+ Object.assign(contents, doc);
1489
+ return contents;
1490
+ };
1491
+ exports.de_EnableSharingWithAwsOrganizationCommand = de_EnableSharingWithAwsOrganizationCommand;
1492
+ const de_EnableSharingWithAwsOrganizationCommandError = async (output, context) => {
1493
+ const parsedOutput = {
1494
+ ...output,
1495
+ body: await parseErrorBody(output.body, context),
1496
+ };
1497
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1498
+ switch (errorCode) {
1499
+ case "OperationNotPermittedException":
1500
+ case "com.amazonaws.ram#OperationNotPermittedException":
1501
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1502
+ case "ServerInternalException":
1503
+ case "com.amazonaws.ram#ServerInternalException":
1504
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
1505
+ case "ServiceUnavailableException":
1506
+ case "com.amazonaws.ram#ServiceUnavailableException":
1507
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1508
+ default:
1509
+ const parsedBody = parsedOutput.body;
1510
+ return throwDefaultError({
1511
+ output,
1512
+ parsedBody,
1513
+ errorCode,
1514
+ });
1097
1515
  }
1516
+ };
1517
+ const de_GetPermissionCommand = async (output, context) => {
1518
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1519
+ return de_GetPermissionCommandError(output, context);
1520
+ }
1521
+ const contents = (0, smithy_client_1.map)({
1522
+ $metadata: deserializeMetadata(output),
1523
+ });
1524
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1525
+ const doc = (0, smithy_client_1.take)(data, {
1526
+ permission: (_) => de_ResourceSharePermissionDetail(_, context),
1527
+ });
1528
+ Object.assign(contents, doc);
1098
1529
  return contents;
1099
1530
  };
1100
1531
  exports.de_GetPermissionCommand = de_GetPermissionCommand;
@@ -1125,10 +1556,9 @@ const de_GetPermissionCommandError = async (output, context) => {
1125
1556
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1126
1557
  default:
1127
1558
  const parsedBody = parsedOutput.body;
1128
- (0, smithy_client_1.throwDefaultError)({
1559
+ return throwDefaultError({
1129
1560
  output,
1130
1561
  parsedBody,
1131
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1132
1562
  errorCode,
1133
1563
  });
1134
1564
  }
@@ -1137,16 +1567,15 @@ const de_GetResourcePoliciesCommand = async (output, context) => {
1137
1567
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1138
1568
  return de_GetResourcePoliciesCommandError(output, context);
1139
1569
  }
1140
- const contents = map({
1570
+ const contents = (0, smithy_client_1.map)({
1141
1571
  $metadata: deserializeMetadata(output),
1142
1572
  });
1143
1573
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1144
- if (data.nextToken != null) {
1145
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1146
- }
1147
- if (data.policies != null) {
1148
- contents.policies = de_PolicyList(data.policies, context);
1149
- }
1574
+ const doc = (0, smithy_client_1.take)(data, {
1575
+ nextToken: smithy_client_1.expectString,
1576
+ policies: smithy_client_1._json,
1577
+ });
1578
+ Object.assign(contents, doc);
1150
1579
  return contents;
1151
1580
  };
1152
1581
  exports.de_GetResourcePoliciesCommand = de_GetResourcePoliciesCommand;
@@ -1177,10 +1606,9 @@ const de_GetResourcePoliciesCommandError = async (output, context) => {
1177
1606
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1178
1607
  default:
1179
1608
  const parsedBody = parsedOutput.body;
1180
- (0, smithy_client_1.throwDefaultError)({
1609
+ return throwDefaultError({
1181
1610
  output,
1182
1611
  parsedBody,
1183
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1184
1612
  errorCode,
1185
1613
  });
1186
1614
  }
@@ -1189,16 +1617,15 @@ const de_GetResourceShareAssociationsCommand = async (output, context) => {
1189
1617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1190
1618
  return de_GetResourceShareAssociationsCommandError(output, context);
1191
1619
  }
1192
- const contents = map({
1620
+ const contents = (0, smithy_client_1.map)({
1193
1621
  $metadata: deserializeMetadata(output),
1194
1622
  });
1195
1623
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1196
- if (data.nextToken != null) {
1197
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1198
- }
1199
- if (data.resourceShareAssociations != null) {
1200
- contents.resourceShareAssociations = de_ResourceShareAssociationList(data.resourceShareAssociations, context);
1201
- }
1624
+ const doc = (0, smithy_client_1.take)(data, {
1625
+ nextToken: smithy_client_1.expectString,
1626
+ resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
1627
+ });
1628
+ Object.assign(contents, doc);
1202
1629
  return contents;
1203
1630
  };
1204
1631
  exports.de_GetResourceShareAssociationsCommand = de_GetResourceShareAssociationsCommand;
@@ -1232,10 +1659,9 @@ const de_GetResourceShareAssociationsCommandError = async (output, context) => {
1232
1659
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1233
1660
  default:
1234
1661
  const parsedBody = parsedOutput.body;
1235
- (0, smithy_client_1.throwDefaultError)({
1662
+ return throwDefaultError({
1236
1663
  output,
1237
1664
  parsedBody,
1238
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1239
1665
  errorCode,
1240
1666
  });
1241
1667
  }
@@ -1244,16 +1670,15 @@ const de_GetResourceShareInvitationsCommand = async (output, context) => {
1244
1670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1245
1671
  return de_GetResourceShareInvitationsCommandError(output, context);
1246
1672
  }
1247
- const contents = map({
1673
+ const contents = (0, smithy_client_1.map)({
1248
1674
  $metadata: deserializeMetadata(output),
1249
1675
  });
1250
1676
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1251
- if (data.nextToken != null) {
1252
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1253
- }
1254
- if (data.resourceShareInvitations != null) {
1255
- contents.resourceShareInvitations = de_ResourceShareInvitationList(data.resourceShareInvitations, context);
1256
- }
1677
+ const doc = (0, smithy_client_1.take)(data, {
1678
+ nextToken: smithy_client_1.expectString,
1679
+ resourceShareInvitations: (_) => de_ResourceShareInvitationList(_, context),
1680
+ });
1681
+ Object.assign(contents, doc);
1257
1682
  return contents;
1258
1683
  };
1259
1684
  exports.de_GetResourceShareInvitationsCommand = de_GetResourceShareInvitationsCommand;
@@ -1290,10 +1715,9 @@ const de_GetResourceShareInvitationsCommandError = async (output, context) => {
1290
1715
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1291
1716
  default:
1292
1717
  const parsedBody = parsedOutput.body;
1293
- (0, smithy_client_1.throwDefaultError)({
1718
+ return throwDefaultError({
1294
1719
  output,
1295
1720
  parsedBody,
1296
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1297
1721
  errorCode,
1298
1722
  });
1299
1723
  }
@@ -1302,16 +1726,15 @@ const de_GetResourceSharesCommand = async (output, context) => {
1302
1726
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1303
1727
  return de_GetResourceSharesCommandError(output, context);
1304
1728
  }
1305
- const contents = map({
1729
+ const contents = (0, smithy_client_1.map)({
1306
1730
  $metadata: deserializeMetadata(output),
1307
1731
  });
1308
1732
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1309
- if (data.nextToken != null) {
1310
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1311
- }
1312
- if (data.resourceShares != null) {
1313
- contents.resourceShares = de_ResourceShareList(data.resourceShares, context);
1314
- }
1733
+ const doc = (0, smithy_client_1.take)(data, {
1734
+ nextToken: smithy_client_1.expectString,
1735
+ resourceShares: (_) => de_ResourceShareList(_, context),
1736
+ });
1737
+ Object.assign(contents, doc);
1315
1738
  return contents;
1316
1739
  };
1317
1740
  exports.de_GetResourceSharesCommand = de_GetResourceSharesCommand;
@@ -1342,10 +1765,9 @@ const de_GetResourceSharesCommandError = async (output, context) => {
1342
1765
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1343
1766
  default:
1344
1767
  const parsedBody = parsedOutput.body;
1345
- (0, smithy_client_1.throwDefaultError)({
1768
+ return throwDefaultError({
1346
1769
  output,
1347
1770
  parsedBody,
1348
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1349
1771
  errorCode,
1350
1772
  });
1351
1773
  }
@@ -1354,16 +1776,15 @@ const de_ListPendingInvitationResourcesCommand = async (output, context) => {
1354
1776
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1355
1777
  return de_ListPendingInvitationResourcesCommandError(output, context);
1356
1778
  }
1357
- const contents = map({
1779
+ const contents = (0, smithy_client_1.map)({
1358
1780
  $metadata: deserializeMetadata(output),
1359
1781
  });
1360
1782
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1361
- if (data.nextToken != null) {
1362
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1363
- }
1364
- if (data.resources != null) {
1365
- contents.resources = de_ResourceList(data.resources, context);
1366
- }
1783
+ const doc = (0, smithy_client_1.take)(data, {
1784
+ nextToken: smithy_client_1.expectString,
1785
+ resources: (_) => de_ResourceList(_, context),
1786
+ });
1787
+ Object.assign(contents, doc);
1367
1788
  return contents;
1368
1789
  };
1369
1790
  exports.de_ListPendingInvitationResourcesCommand = de_ListPendingInvitationResourcesCommand;
@@ -1403,28 +1824,73 @@ const de_ListPendingInvitationResourcesCommandError = async (output, context) =>
1403
1824
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1404
1825
  default:
1405
1826
  const parsedBody = parsedOutput.body;
1406
- (0, smithy_client_1.throwDefaultError)({
1827
+ return throwDefaultError({
1407
1828
  output,
1408
1829
  parsedBody,
1409
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1410
1830
  errorCode,
1411
1831
  });
1412
1832
  }
1413
1833
  };
1414
- const de_ListPermissionsCommand = async (output, context) => {
1834
+ const de_ListPermissionAssociationsCommand = async (output, context) => {
1415
1835
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1416
- return de_ListPermissionsCommandError(output, context);
1836
+ return de_ListPermissionAssociationsCommandError(output, context);
1417
1837
  }
1418
- const contents = map({
1838
+ const contents = (0, smithy_client_1.map)({
1419
1839
  $metadata: deserializeMetadata(output),
1420
1840
  });
1421
1841
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1422
- if (data.nextToken != null) {
1423
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1842
+ const doc = (0, smithy_client_1.take)(data, {
1843
+ nextToken: smithy_client_1.expectString,
1844
+ permissions: (_) => de_AssociatedPermissionList(_, context),
1845
+ });
1846
+ Object.assign(contents, doc);
1847
+ return contents;
1848
+ };
1849
+ exports.de_ListPermissionAssociationsCommand = de_ListPermissionAssociationsCommand;
1850
+ const de_ListPermissionAssociationsCommandError = async (output, context) => {
1851
+ const parsedOutput = {
1852
+ ...output,
1853
+ body: await parseErrorBody(output.body, context),
1854
+ };
1855
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1856
+ switch (errorCode) {
1857
+ case "InvalidNextTokenException":
1858
+ case "com.amazonaws.ram#InvalidNextTokenException":
1859
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1860
+ case "InvalidParameterException":
1861
+ case "com.amazonaws.ram#InvalidParameterException":
1862
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1863
+ case "MalformedArnException":
1864
+ case "com.amazonaws.ram#MalformedArnException":
1865
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
1866
+ case "ServerInternalException":
1867
+ case "com.amazonaws.ram#ServerInternalException":
1868
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
1869
+ case "ServiceUnavailableException":
1870
+ case "com.amazonaws.ram#ServiceUnavailableException":
1871
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1872
+ default:
1873
+ const parsedBody = parsedOutput.body;
1874
+ return throwDefaultError({
1875
+ output,
1876
+ parsedBody,
1877
+ errorCode,
1878
+ });
1424
1879
  }
1425
- if (data.permissions != null) {
1426
- contents.permissions = de_ResourceSharePermissionList(data.permissions, context);
1880
+ };
1881
+ const de_ListPermissionsCommand = async (output, context) => {
1882
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1883
+ return de_ListPermissionsCommandError(output, context);
1427
1884
  }
1885
+ const contents = (0, smithy_client_1.map)({
1886
+ $metadata: deserializeMetadata(output),
1887
+ });
1888
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1889
+ const doc = (0, smithy_client_1.take)(data, {
1890
+ nextToken: smithy_client_1.expectString,
1891
+ permissions: (_) => de_ResourceSharePermissionList(_, context),
1892
+ });
1893
+ Object.assign(contents, doc);
1428
1894
  return contents;
1429
1895
  };
1430
1896
  exports.de_ListPermissionsCommand = de_ListPermissionsCommand;
@@ -1452,10 +1918,9 @@ const de_ListPermissionsCommandError = async (output, context) => {
1452
1918
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1453
1919
  default:
1454
1920
  const parsedBody = parsedOutput.body;
1455
- (0, smithy_client_1.throwDefaultError)({
1921
+ return throwDefaultError({
1456
1922
  output,
1457
1923
  parsedBody,
1458
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1459
1924
  errorCode,
1460
1925
  });
1461
1926
  }
@@ -1464,16 +1929,15 @@ const de_ListPermissionVersionsCommand = async (output, context) => {
1464
1929
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1465
1930
  return de_ListPermissionVersionsCommandError(output, context);
1466
1931
  }
1467
- const contents = map({
1932
+ const contents = (0, smithy_client_1.map)({
1468
1933
  $metadata: deserializeMetadata(output),
1469
1934
  });
1470
1935
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1471
- if (data.nextToken != null) {
1472
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1473
- }
1474
- if (data.permissions != null) {
1475
- contents.permissions = de_ResourceSharePermissionList(data.permissions, context);
1476
- }
1936
+ const doc = (0, smithy_client_1.take)(data, {
1937
+ nextToken: smithy_client_1.expectString,
1938
+ permissions: (_) => de_ResourceSharePermissionList(_, context),
1939
+ });
1940
+ Object.assign(contents, doc);
1477
1941
  return contents;
1478
1942
  };
1479
1943
  exports.de_ListPermissionVersionsCommand = de_ListPermissionVersionsCommand;
@@ -1507,10 +1971,9 @@ const de_ListPermissionVersionsCommandError = async (output, context) => {
1507
1971
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1508
1972
  default:
1509
1973
  const parsedBody = parsedOutput.body;
1510
- (0, smithy_client_1.throwDefaultError)({
1974
+ return throwDefaultError({
1511
1975
  output,
1512
1976
  parsedBody,
1513
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1514
1977
  errorCode,
1515
1978
  });
1516
1979
  }
@@ -1519,16 +1982,15 @@ const de_ListPrincipalsCommand = async (output, context) => {
1519
1982
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1520
1983
  return de_ListPrincipalsCommandError(output, context);
1521
1984
  }
1522
- const contents = map({
1985
+ const contents = (0, smithy_client_1.map)({
1523
1986
  $metadata: deserializeMetadata(output),
1524
1987
  });
1525
1988
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1526
- if (data.nextToken != null) {
1527
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1528
- }
1529
- if (data.principals != null) {
1530
- contents.principals = de_PrincipalList(data.principals, context);
1531
- }
1989
+ const doc = (0, smithy_client_1.take)(data, {
1990
+ nextToken: smithy_client_1.expectString,
1991
+ principals: (_) => de_PrincipalList(_, context),
1992
+ });
1993
+ Object.assign(contents, doc);
1532
1994
  return contents;
1533
1995
  };
1534
1996
  exports.de_ListPrincipalsCommand = de_ListPrincipalsCommand;
@@ -1559,28 +2021,70 @@ const de_ListPrincipalsCommandError = async (output, context) => {
1559
2021
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1560
2022
  default:
1561
2023
  const parsedBody = parsedOutput.body;
1562
- (0, smithy_client_1.throwDefaultError)({
2024
+ return throwDefaultError({
1563
2025
  output,
1564
2026
  parsedBody,
1565
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1566
2027
  errorCode,
1567
2028
  });
1568
2029
  }
1569
2030
  };
1570
- const de_ListResourcesCommand = async (output, context) => {
2031
+ const de_ListReplacePermissionAssociationsWorkCommand = async (output, context) => {
1571
2032
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1572
- return de_ListResourcesCommandError(output, context);
2033
+ return de_ListReplacePermissionAssociationsWorkCommandError(output, context);
1573
2034
  }
1574
- const contents = map({
2035
+ const contents = (0, smithy_client_1.map)({
1575
2036
  $metadata: deserializeMetadata(output),
1576
2037
  });
1577
2038
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1578
- if (data.nextToken != null) {
1579
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
2039
+ const doc = (0, smithy_client_1.take)(data, {
2040
+ nextToken: smithy_client_1.expectString,
2041
+ replacePermissionAssociationsWorks: (_) => de_ReplacePermissionAssociationsWorkList(_, context),
2042
+ });
2043
+ Object.assign(contents, doc);
2044
+ return contents;
2045
+ };
2046
+ exports.de_ListReplacePermissionAssociationsWorkCommand = de_ListReplacePermissionAssociationsWorkCommand;
2047
+ const de_ListReplacePermissionAssociationsWorkCommandError = async (output, context) => {
2048
+ const parsedOutput = {
2049
+ ...output,
2050
+ body: await parseErrorBody(output.body, context),
2051
+ };
2052
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2053
+ switch (errorCode) {
2054
+ case "InvalidNextTokenException":
2055
+ case "com.amazonaws.ram#InvalidNextTokenException":
2056
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2057
+ case "InvalidParameterException":
2058
+ case "com.amazonaws.ram#InvalidParameterException":
2059
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2060
+ case "ServerInternalException":
2061
+ case "com.amazonaws.ram#ServerInternalException":
2062
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
2063
+ case "ServiceUnavailableException":
2064
+ case "com.amazonaws.ram#ServiceUnavailableException":
2065
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2066
+ default:
2067
+ const parsedBody = parsedOutput.body;
2068
+ return throwDefaultError({
2069
+ output,
2070
+ parsedBody,
2071
+ errorCode,
2072
+ });
1580
2073
  }
1581
- if (data.resources != null) {
1582
- contents.resources = de_ResourceList(data.resources, context);
2074
+ };
2075
+ const de_ListResourcesCommand = async (output, context) => {
2076
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2077
+ return de_ListResourcesCommandError(output, context);
1583
2078
  }
2079
+ const contents = (0, smithy_client_1.map)({
2080
+ $metadata: deserializeMetadata(output),
2081
+ });
2082
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2083
+ const doc = (0, smithy_client_1.take)(data, {
2084
+ nextToken: smithy_client_1.expectString,
2085
+ resources: (_) => de_ResourceList(_, context),
2086
+ });
2087
+ Object.assign(contents, doc);
1584
2088
  return contents;
1585
2089
  };
1586
2090
  exports.de_ListResourcesCommand = de_ListResourcesCommand;
@@ -1614,10 +2118,9 @@ const de_ListResourcesCommandError = async (output, context) => {
1614
2118
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1615
2119
  default:
1616
2120
  const parsedBody = parsedOutput.body;
1617
- (0, smithy_client_1.throwDefaultError)({
2121
+ return throwDefaultError({
1618
2122
  output,
1619
2123
  parsedBody,
1620
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1621
2124
  errorCode,
1622
2125
  });
1623
2126
  }
@@ -1626,16 +2129,15 @@ const de_ListResourceSharePermissionsCommand = async (output, context) => {
1626
2129
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1627
2130
  return de_ListResourceSharePermissionsCommandError(output, context);
1628
2131
  }
1629
- const contents = map({
2132
+ const contents = (0, smithy_client_1.map)({
1630
2133
  $metadata: deserializeMetadata(output),
1631
2134
  });
1632
2135
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1633
- if (data.nextToken != null) {
1634
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1635
- }
1636
- if (data.permissions != null) {
1637
- contents.permissions = de_ResourceSharePermissionList(data.permissions, context);
1638
- }
2136
+ const doc = (0, smithy_client_1.take)(data, {
2137
+ nextToken: smithy_client_1.expectString,
2138
+ permissions: (_) => de_ResourceSharePermissionList(_, context),
2139
+ });
2140
+ Object.assign(contents, doc);
1639
2141
  return contents;
1640
2142
  };
1641
2143
  exports.de_ListResourceSharePermissionsCommand = de_ListResourceSharePermissionsCommand;
@@ -1669,44 +2171,218 @@ const de_ListResourceSharePermissionsCommandError = async (output, context) => {
1669
2171
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1670
2172
  default:
1671
2173
  const parsedBody = parsedOutput.body;
1672
- (0, smithy_client_1.throwDefaultError)({
2174
+ return throwDefaultError({
2175
+ output,
2176
+ parsedBody,
2177
+ errorCode,
2178
+ });
2179
+ }
2180
+ };
2181
+ const de_ListResourceTypesCommand = async (output, context) => {
2182
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2183
+ return de_ListResourceTypesCommandError(output, context);
2184
+ }
2185
+ const contents = (0, smithy_client_1.map)({
2186
+ $metadata: deserializeMetadata(output),
2187
+ });
2188
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2189
+ const doc = (0, smithy_client_1.take)(data, {
2190
+ nextToken: smithy_client_1.expectString,
2191
+ resourceTypes: smithy_client_1._json,
2192
+ });
2193
+ Object.assign(contents, doc);
2194
+ return contents;
2195
+ };
2196
+ exports.de_ListResourceTypesCommand = de_ListResourceTypesCommand;
2197
+ const de_ListResourceTypesCommandError = async (output, context) => {
2198
+ const parsedOutput = {
2199
+ ...output,
2200
+ body: await parseErrorBody(output.body, context),
2201
+ };
2202
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2203
+ switch (errorCode) {
2204
+ case "InvalidNextTokenException":
2205
+ case "com.amazonaws.ram#InvalidNextTokenException":
2206
+ throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
2207
+ case "InvalidParameterException":
2208
+ case "com.amazonaws.ram#InvalidParameterException":
2209
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2210
+ case "ServerInternalException":
2211
+ case "com.amazonaws.ram#ServerInternalException":
2212
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
2213
+ case "ServiceUnavailableException":
2214
+ case "com.amazonaws.ram#ServiceUnavailableException":
2215
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2216
+ default:
2217
+ const parsedBody = parsedOutput.body;
2218
+ return throwDefaultError({
2219
+ output,
2220
+ parsedBody,
2221
+ errorCode,
2222
+ });
2223
+ }
2224
+ };
2225
+ const de_PromotePermissionCreatedFromPolicyCommand = async (output, context) => {
2226
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2227
+ return de_PromotePermissionCreatedFromPolicyCommandError(output, context);
2228
+ }
2229
+ const contents = (0, smithy_client_1.map)({
2230
+ $metadata: deserializeMetadata(output),
2231
+ });
2232
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2233
+ const doc = (0, smithy_client_1.take)(data, {
2234
+ clientToken: smithy_client_1.expectString,
2235
+ permission: (_) => de_ResourceSharePermissionSummary(_, context),
2236
+ });
2237
+ Object.assign(contents, doc);
2238
+ return contents;
2239
+ };
2240
+ exports.de_PromotePermissionCreatedFromPolicyCommand = de_PromotePermissionCreatedFromPolicyCommand;
2241
+ const de_PromotePermissionCreatedFromPolicyCommandError = async (output, context) => {
2242
+ const parsedOutput = {
2243
+ ...output,
2244
+ body: await parseErrorBody(output.body, context),
2245
+ };
2246
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2247
+ switch (errorCode) {
2248
+ case "InvalidParameterException":
2249
+ case "com.amazonaws.ram#InvalidParameterException":
2250
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2251
+ case "MalformedArnException":
2252
+ case "com.amazonaws.ram#MalformedArnException":
2253
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
2254
+ case "MissingRequiredParameterException":
2255
+ case "com.amazonaws.ram#MissingRequiredParameterException":
2256
+ throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
2257
+ case "OperationNotPermittedException":
2258
+ case "com.amazonaws.ram#OperationNotPermittedException":
2259
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2260
+ case "ServerInternalException":
2261
+ case "com.amazonaws.ram#ServerInternalException":
2262
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
2263
+ case "ServiceUnavailableException":
2264
+ case "com.amazonaws.ram#ServiceUnavailableException":
2265
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2266
+ case "UnknownResourceException":
2267
+ case "com.amazonaws.ram#UnknownResourceException":
2268
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2269
+ default:
2270
+ const parsedBody = parsedOutput.body;
2271
+ return throwDefaultError({
2272
+ output,
2273
+ parsedBody,
2274
+ errorCode,
2275
+ });
2276
+ }
2277
+ };
2278
+ const de_PromoteResourceShareCreatedFromPolicyCommand = async (output, context) => {
2279
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2280
+ return de_PromoteResourceShareCreatedFromPolicyCommandError(output, context);
2281
+ }
2282
+ const contents = (0, smithy_client_1.map)({
2283
+ $metadata: deserializeMetadata(output),
2284
+ });
2285
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2286
+ const doc = (0, smithy_client_1.take)(data, {
2287
+ returnValue: smithy_client_1.expectBoolean,
2288
+ });
2289
+ Object.assign(contents, doc);
2290
+ return contents;
2291
+ };
2292
+ exports.de_PromoteResourceShareCreatedFromPolicyCommand = de_PromoteResourceShareCreatedFromPolicyCommand;
2293
+ const de_PromoteResourceShareCreatedFromPolicyCommandError = async (output, context) => {
2294
+ const parsedOutput = {
2295
+ ...output,
2296
+ body: await parseErrorBody(output.body, context),
2297
+ };
2298
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2299
+ switch (errorCode) {
2300
+ case "InvalidParameterException":
2301
+ case "com.amazonaws.ram#InvalidParameterException":
2302
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2303
+ case "InvalidStateTransitionException":
2304
+ case "com.amazonaws.ram#InvalidStateTransitionException":
2305
+ throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
2306
+ case "MalformedArnException":
2307
+ case "com.amazonaws.ram#MalformedArnException":
2308
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
2309
+ case "MissingRequiredParameterException":
2310
+ case "com.amazonaws.ram#MissingRequiredParameterException":
2311
+ throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
2312
+ case "OperationNotPermittedException":
2313
+ case "com.amazonaws.ram#OperationNotPermittedException":
2314
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2315
+ case "ResourceShareLimitExceededException":
2316
+ case "com.amazonaws.ram#ResourceShareLimitExceededException":
2317
+ throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
2318
+ case "ServerInternalException":
2319
+ case "com.amazonaws.ram#ServerInternalException":
2320
+ throw await de_ServerInternalExceptionRes(parsedOutput, context);
2321
+ case "ServiceUnavailableException":
2322
+ case "com.amazonaws.ram#ServiceUnavailableException":
2323
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2324
+ case "UnknownResourceException":
2325
+ case "com.amazonaws.ram#UnknownResourceException":
2326
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2327
+ case "UnmatchedPolicyPermissionException":
2328
+ case "com.amazonaws.ram#UnmatchedPolicyPermissionException":
2329
+ throw await de_UnmatchedPolicyPermissionExceptionRes(parsedOutput, context);
2330
+ default:
2331
+ const parsedBody = parsedOutput.body;
2332
+ return throwDefaultError({
1673
2333
  output,
1674
2334
  parsedBody,
1675
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1676
2335
  errorCode,
1677
2336
  });
1678
2337
  }
1679
2338
  };
1680
- const de_ListResourceTypesCommand = async (output, context) => {
2339
+ const de_RejectResourceShareInvitationCommand = async (output, context) => {
1681
2340
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1682
- return de_ListResourceTypesCommandError(output, context);
2341
+ return de_RejectResourceShareInvitationCommandError(output, context);
1683
2342
  }
1684
- const contents = map({
2343
+ const contents = (0, smithy_client_1.map)({
1685
2344
  $metadata: deserializeMetadata(output),
1686
2345
  });
1687
2346
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1688
- if (data.nextToken != null) {
1689
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1690
- }
1691
- if (data.resourceTypes != null) {
1692
- contents.resourceTypes = de_ServiceNameAndResourceTypeList(data.resourceTypes, context);
1693
- }
2347
+ const doc = (0, smithy_client_1.take)(data, {
2348
+ clientToken: smithy_client_1.expectString,
2349
+ resourceShareInvitation: (_) => de_ResourceShareInvitation(_, context),
2350
+ });
2351
+ Object.assign(contents, doc);
1694
2352
  return contents;
1695
2353
  };
1696
- exports.de_ListResourceTypesCommand = de_ListResourceTypesCommand;
1697
- const de_ListResourceTypesCommandError = async (output, context) => {
2354
+ exports.de_RejectResourceShareInvitationCommand = de_RejectResourceShareInvitationCommand;
2355
+ const de_RejectResourceShareInvitationCommandError = async (output, context) => {
1698
2356
  const parsedOutput = {
1699
2357
  ...output,
1700
2358
  body: await parseErrorBody(output.body, context),
1701
2359
  };
1702
2360
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1703
2361
  switch (errorCode) {
1704
- case "InvalidNextTokenException":
1705
- case "com.amazonaws.ram#InvalidNextTokenException":
1706
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1707
- case "InvalidParameterException":
1708
- case "com.amazonaws.ram#InvalidParameterException":
1709
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2362
+ case "IdempotentParameterMismatchException":
2363
+ case "com.amazonaws.ram#IdempotentParameterMismatchException":
2364
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2365
+ case "InvalidClientTokenException":
2366
+ case "com.amazonaws.ram#InvalidClientTokenException":
2367
+ throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
2368
+ case "MalformedArnException":
2369
+ case "com.amazonaws.ram#MalformedArnException":
2370
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
2371
+ case "OperationNotPermittedException":
2372
+ case "com.amazonaws.ram#OperationNotPermittedException":
2373
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2374
+ case "ResourceShareInvitationAlreadyAcceptedException":
2375
+ case "com.amazonaws.ram#ResourceShareInvitationAlreadyAcceptedException":
2376
+ throw await de_ResourceShareInvitationAlreadyAcceptedExceptionRes(parsedOutput, context);
2377
+ case "ResourceShareInvitationAlreadyRejectedException":
2378
+ case "com.amazonaws.ram#ResourceShareInvitationAlreadyRejectedException":
2379
+ throw await de_ResourceShareInvitationAlreadyRejectedExceptionRes(parsedOutput, context);
2380
+ case "ResourceShareInvitationArnNotFoundException":
2381
+ case "com.amazonaws.ram#ResourceShareInvitationArnNotFoundException":
2382
+ throw await de_ResourceShareInvitationArnNotFoundExceptionRes(parsedOutput, context);
2383
+ case "ResourceShareInvitationExpiredException":
2384
+ case "com.amazonaws.ram#ResourceShareInvitationExpiredException":
2385
+ throw await de_ResourceShareInvitationExpiredExceptionRes(parsedOutput, context);
1710
2386
  case "ServerInternalException":
1711
2387
  case "com.amazonaws.ram#ServerInternalException":
1712
2388
  throw await de_ServerInternalExceptionRes(parsedOutput, context);
@@ -1715,50 +2391,51 @@ const de_ListResourceTypesCommandError = async (output, context) => {
1715
2391
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1716
2392
  default:
1717
2393
  const parsedBody = parsedOutput.body;
1718
- (0, smithy_client_1.throwDefaultError)({
2394
+ return throwDefaultError({
1719
2395
  output,
1720
2396
  parsedBody,
1721
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1722
2397
  errorCode,
1723
2398
  });
1724
2399
  }
1725
2400
  };
1726
- const de_PromoteResourceShareCreatedFromPolicyCommand = async (output, context) => {
2401
+ const de_ReplacePermissionAssociationsCommand = async (output, context) => {
1727
2402
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1728
- return de_PromoteResourceShareCreatedFromPolicyCommandError(output, context);
2403
+ return de_ReplacePermissionAssociationsCommandError(output, context);
1729
2404
  }
1730
- const contents = map({
2405
+ const contents = (0, smithy_client_1.map)({
1731
2406
  $metadata: deserializeMetadata(output),
1732
2407
  });
1733
2408
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1734
- if (data.returnValue != null) {
1735
- contents.returnValue = (0, smithy_client_1.expectBoolean)(data.returnValue);
1736
- }
2409
+ const doc = (0, smithy_client_1.take)(data, {
2410
+ clientToken: smithy_client_1.expectString,
2411
+ replacePermissionAssociationsWork: (_) => de_ReplacePermissionAssociationsWork(_, context),
2412
+ });
2413
+ Object.assign(contents, doc);
1737
2414
  return contents;
1738
2415
  };
1739
- exports.de_PromoteResourceShareCreatedFromPolicyCommand = de_PromoteResourceShareCreatedFromPolicyCommand;
1740
- const de_PromoteResourceShareCreatedFromPolicyCommandError = async (output, context) => {
2416
+ exports.de_ReplacePermissionAssociationsCommand = de_ReplacePermissionAssociationsCommand;
2417
+ const de_ReplacePermissionAssociationsCommandError = async (output, context) => {
1741
2418
  const parsedOutput = {
1742
2419
  ...output,
1743
2420
  body: await parseErrorBody(output.body, context),
1744
2421
  };
1745
2422
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1746
2423
  switch (errorCode) {
2424
+ case "IdempotentParameterMismatchException":
2425
+ case "com.amazonaws.ram#IdempotentParameterMismatchException":
2426
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2427
+ case "InvalidClientTokenException":
2428
+ case "com.amazonaws.ram#InvalidClientTokenException":
2429
+ throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1747
2430
  case "InvalidParameterException":
1748
2431
  case "com.amazonaws.ram#InvalidParameterException":
1749
2432
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1750
2433
  case "MalformedArnException":
1751
2434
  case "com.amazonaws.ram#MalformedArnException":
1752
2435
  throw await de_MalformedArnExceptionRes(parsedOutput, context);
1753
- case "MissingRequiredParameterException":
1754
- case "com.amazonaws.ram#MissingRequiredParameterException":
1755
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1756
2436
  case "OperationNotPermittedException":
1757
2437
  case "com.amazonaws.ram#OperationNotPermittedException":
1758
2438
  throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1759
- case "ResourceShareLimitExceededException":
1760
- case "com.amazonaws.ram#ResourceShareLimitExceededException":
1761
- throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
1762
2439
  case "ServerInternalException":
1763
2440
  case "com.amazonaws.ram#ServerInternalException":
1764
2441
  throw await de_ServerInternalExceptionRes(parsedOutput, context);
@@ -1770,32 +2447,30 @@ const de_PromoteResourceShareCreatedFromPolicyCommandError = async (output, cont
1770
2447
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1771
2448
  default:
1772
2449
  const parsedBody = parsedOutput.body;
1773
- (0, smithy_client_1.throwDefaultError)({
2450
+ return throwDefaultError({
1774
2451
  output,
1775
2452
  parsedBody,
1776
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1777
2453
  errorCode,
1778
2454
  });
1779
2455
  }
1780
2456
  };
1781
- const de_RejectResourceShareInvitationCommand = async (output, context) => {
2457
+ const de_SetDefaultPermissionVersionCommand = async (output, context) => {
1782
2458
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1783
- return de_RejectResourceShareInvitationCommandError(output, context);
2459
+ return de_SetDefaultPermissionVersionCommandError(output, context);
1784
2460
  }
1785
- const contents = map({
2461
+ const contents = (0, smithy_client_1.map)({
1786
2462
  $metadata: deserializeMetadata(output),
1787
2463
  });
1788
2464
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1789
- if (data.clientToken != null) {
1790
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
1791
- }
1792
- if (data.resourceShareInvitation != null) {
1793
- contents.resourceShareInvitation = de_ResourceShareInvitation(data.resourceShareInvitation, context);
1794
- }
2465
+ const doc = (0, smithy_client_1.take)(data, {
2466
+ clientToken: smithy_client_1.expectString,
2467
+ returnValue: smithy_client_1.expectBoolean,
2468
+ });
2469
+ Object.assign(contents, doc);
1795
2470
  return contents;
1796
2471
  };
1797
- exports.de_RejectResourceShareInvitationCommand = de_RejectResourceShareInvitationCommand;
1798
- const de_RejectResourceShareInvitationCommandError = async (output, context) => {
2472
+ exports.de_SetDefaultPermissionVersionCommand = de_SetDefaultPermissionVersionCommand;
2473
+ const de_SetDefaultPermissionVersionCommandError = async (output, context) => {
1799
2474
  const parsedOutput = {
1800
2475
  ...output,
1801
2476
  body: await parseErrorBody(output.body, context),
@@ -1808,36 +2483,26 @@ const de_RejectResourceShareInvitationCommandError = async (output, context) =>
1808
2483
  case "InvalidClientTokenException":
1809
2484
  case "com.amazonaws.ram#InvalidClientTokenException":
1810
2485
  throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
2486
+ case "InvalidParameterException":
2487
+ case "com.amazonaws.ram#InvalidParameterException":
2488
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1811
2489
  case "MalformedArnException":
1812
2490
  case "com.amazonaws.ram#MalformedArnException":
1813
2491
  throw await de_MalformedArnExceptionRes(parsedOutput, context);
1814
- case "OperationNotPermittedException":
1815
- case "com.amazonaws.ram#OperationNotPermittedException":
1816
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1817
- case "ResourceShareInvitationAlreadyAcceptedException":
1818
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyAcceptedException":
1819
- throw await de_ResourceShareInvitationAlreadyAcceptedExceptionRes(parsedOutput, context);
1820
- case "ResourceShareInvitationAlreadyRejectedException":
1821
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyRejectedException":
1822
- throw await de_ResourceShareInvitationAlreadyRejectedExceptionRes(parsedOutput, context);
1823
- case "ResourceShareInvitationArnNotFoundException":
1824
- case "com.amazonaws.ram#ResourceShareInvitationArnNotFoundException":
1825
- throw await de_ResourceShareInvitationArnNotFoundExceptionRes(parsedOutput, context);
1826
- case "ResourceShareInvitationExpiredException":
1827
- case "com.amazonaws.ram#ResourceShareInvitationExpiredException":
1828
- throw await de_ResourceShareInvitationExpiredExceptionRes(parsedOutput, context);
1829
2492
  case "ServerInternalException":
1830
2493
  case "com.amazonaws.ram#ServerInternalException":
1831
2494
  throw await de_ServerInternalExceptionRes(parsedOutput, context);
1832
2495
  case "ServiceUnavailableException":
1833
2496
  case "com.amazonaws.ram#ServiceUnavailableException":
1834
2497
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2498
+ case "UnknownResourceException":
2499
+ case "com.amazonaws.ram#UnknownResourceException":
2500
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1835
2501
  default:
1836
2502
  const parsedBody = parsedOutput.body;
1837
- (0, smithy_client_1.throwDefaultError)({
2503
+ return throwDefaultError({
1838
2504
  output,
1839
2505
  parsedBody,
1840
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1841
2506
  errorCode,
1842
2507
  });
1843
2508
  }
@@ -1846,7 +2511,7 @@ const de_TagResourceCommand = async (output, context) => {
1846
2511
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1847
2512
  return de_TagResourceCommandError(output, context);
1848
2513
  }
1849
- const contents = map({
2514
+ const contents = (0, smithy_client_1.map)({
1850
2515
  $metadata: deserializeMetadata(output),
1851
2516
  });
1852
2517
  await collectBody(output.body, context);
@@ -1886,10 +2551,9 @@ const de_TagResourceCommandError = async (output, context) => {
1886
2551
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1887
2552
  default:
1888
2553
  const parsedBody = parsedOutput.body;
1889
- (0, smithy_client_1.throwDefaultError)({
2554
+ return throwDefaultError({
1890
2555
  output,
1891
2556
  parsedBody,
1892
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1893
2557
  errorCode,
1894
2558
  });
1895
2559
  }
@@ -1898,7 +2562,7 @@ const de_UntagResourceCommand = async (output, context) => {
1898
2562
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1899
2563
  return de_UntagResourceCommandError(output, context);
1900
2564
  }
1901
- const contents = map({
2565
+ const contents = (0, smithy_client_1.map)({
1902
2566
  $metadata: deserializeMetadata(output),
1903
2567
  });
1904
2568
  await collectBody(output.body, context);
@@ -1915,18 +2579,23 @@ const de_UntagResourceCommandError = async (output, context) => {
1915
2579
  case "InvalidParameterException":
1916
2580
  case "com.amazonaws.ram#InvalidParameterException":
1917
2581
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2582
+ case "MalformedArnException":
2583
+ case "com.amazonaws.ram#MalformedArnException":
2584
+ throw await de_MalformedArnExceptionRes(parsedOutput, context);
1918
2585
  case "ServerInternalException":
1919
2586
  case "com.amazonaws.ram#ServerInternalException":
1920
2587
  throw await de_ServerInternalExceptionRes(parsedOutput, context);
1921
2588
  case "ServiceUnavailableException":
1922
2589
  case "com.amazonaws.ram#ServiceUnavailableException":
1923
2590
  throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2591
+ case "UnknownResourceException":
2592
+ case "com.amazonaws.ram#UnknownResourceException":
2593
+ throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1924
2594
  default:
1925
2595
  const parsedBody = parsedOutput.body;
1926
- (0, smithy_client_1.throwDefaultError)({
2596
+ return throwDefaultError({
1927
2597
  output,
1928
2598
  parsedBody,
1929
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1930
2599
  errorCode,
1931
2600
  });
1932
2601
  }
@@ -1935,16 +2604,15 @@ const de_UpdateResourceShareCommand = async (output, context) => {
1935
2604
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1936
2605
  return de_UpdateResourceShareCommandError(output, context);
1937
2606
  }
1938
- const contents = map({
2607
+ const contents = (0, smithy_client_1.map)({
1939
2608
  $metadata: deserializeMetadata(output),
1940
2609
  });
1941
2610
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1942
- if (data.clientToken != null) {
1943
- contents.clientToken = (0, smithy_client_1.expectString)(data.clientToken);
1944
- }
1945
- if (data.resourceShare != null) {
1946
- contents.resourceShare = de_ResourceShare(data.resourceShare, context);
1947
- }
2611
+ const doc = (0, smithy_client_1.take)(data, {
2612
+ clientToken: smithy_client_1.expectString,
2613
+ resourceShare: (_) => de_ResourceShare(_, context),
2614
+ });
2615
+ Object.assign(contents, doc);
1948
2616
  return contents;
1949
2617
  };
1950
2618
  exports.de_UpdateResourceShareCommand = de_UpdateResourceShareCommand;
@@ -1984,21 +2652,21 @@ const de_UpdateResourceShareCommandError = async (output, context) => {
1984
2652
  throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1985
2653
  default:
1986
2654
  const parsedBody = parsedOutput.body;
1987
- (0, smithy_client_1.throwDefaultError)({
2655
+ return throwDefaultError({
1988
2656
  output,
1989
2657
  parsedBody,
1990
- exceptionCtor: RAMServiceException_1.RAMServiceException,
1991
2658
  errorCode,
1992
2659
  });
1993
2660
  }
1994
2661
  };
1995
- const map = smithy_client_1.map;
2662
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(RAMServiceException_1.RAMServiceException);
1996
2663
  const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
1997
- const contents = map({});
2664
+ const contents = (0, smithy_client_1.map)({});
1998
2665
  const data = parsedOutput.body;
1999
- if (data.message != null) {
2000
- contents.message = (0, smithy_client_1.expectString)(data.message);
2001
- }
2666
+ const doc = (0, smithy_client_1.take)(data, {
2667
+ message: smithy_client_1.expectString,
2668
+ });
2669
+ Object.assign(contents, doc);
2002
2670
  const exception = new models_0_1.IdempotentParameterMismatchException({
2003
2671
  $metadata: deserializeMetadata(parsedOutput),
2004
2672
  ...contents,
@@ -2006,11 +2674,12 @@ const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context)
2006
2674
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2007
2675
  };
2008
2676
  const de_InvalidClientTokenExceptionRes = async (parsedOutput, context) => {
2009
- const contents = map({});
2677
+ const contents = (0, smithy_client_1.map)({});
2010
2678
  const data = parsedOutput.body;
2011
- if (data.message != null) {
2012
- contents.message = (0, smithy_client_1.expectString)(data.message);
2013
- }
2679
+ const doc = (0, smithy_client_1.take)(data, {
2680
+ message: smithy_client_1.expectString,
2681
+ });
2682
+ Object.assign(contents, doc);
2014
2683
  const exception = new models_0_1.InvalidClientTokenException({
2015
2684
  $metadata: deserializeMetadata(parsedOutput),
2016
2685
  ...contents,
@@ -2018,11 +2687,12 @@ const de_InvalidClientTokenExceptionRes = async (parsedOutput, context) => {
2018
2687
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2019
2688
  };
2020
2689
  const de_InvalidMaxResultsExceptionRes = async (parsedOutput, context) => {
2021
- const contents = map({});
2690
+ const contents = (0, smithy_client_1.map)({});
2022
2691
  const data = parsedOutput.body;
2023
- if (data.message != null) {
2024
- contents.message = (0, smithy_client_1.expectString)(data.message);
2025
- }
2692
+ const doc = (0, smithy_client_1.take)(data, {
2693
+ message: smithy_client_1.expectString,
2694
+ });
2695
+ Object.assign(contents, doc);
2026
2696
  const exception = new models_0_1.InvalidMaxResultsException({
2027
2697
  $metadata: deserializeMetadata(parsedOutput),
2028
2698
  ...contents,
@@ -2030,11 +2700,12 @@ const de_InvalidMaxResultsExceptionRes = async (parsedOutput, context) => {
2030
2700
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2031
2701
  };
2032
2702
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
2033
- const contents = map({});
2703
+ const contents = (0, smithy_client_1.map)({});
2034
2704
  const data = parsedOutput.body;
2035
- if (data.message != null) {
2036
- contents.message = (0, smithy_client_1.expectString)(data.message);
2037
- }
2705
+ const doc = (0, smithy_client_1.take)(data, {
2706
+ message: smithy_client_1.expectString,
2707
+ });
2708
+ Object.assign(contents, doc);
2038
2709
  const exception = new models_0_1.InvalidNextTokenException({
2039
2710
  $metadata: deserializeMetadata(parsedOutput),
2040
2711
  ...contents,
@@ -2042,23 +2713,38 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
2042
2713
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2043
2714
  };
2044
2715
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2045
- const contents = map({});
2716
+ const contents = (0, smithy_client_1.map)({});
2046
2717
  const data = parsedOutput.body;
2047
- if (data.message != null) {
2048
- contents.message = (0, smithy_client_1.expectString)(data.message);
2049
- }
2718
+ const doc = (0, smithy_client_1.take)(data, {
2719
+ message: smithy_client_1.expectString,
2720
+ });
2721
+ Object.assign(contents, doc);
2050
2722
  const exception = new models_0_1.InvalidParameterException({
2051
2723
  $metadata: deserializeMetadata(parsedOutput),
2052
2724
  ...contents,
2053
2725
  });
2054
2726
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2055
2727
  };
2728
+ const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
2729
+ const contents = (0, smithy_client_1.map)({});
2730
+ const data = parsedOutput.body;
2731
+ const doc = (0, smithy_client_1.take)(data, {
2732
+ message: smithy_client_1.expectString,
2733
+ });
2734
+ Object.assign(contents, doc);
2735
+ const exception = new models_0_1.InvalidPolicyException({
2736
+ $metadata: deserializeMetadata(parsedOutput),
2737
+ ...contents,
2738
+ });
2739
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2740
+ };
2056
2741
  const de_InvalidResourceTypeExceptionRes = async (parsedOutput, context) => {
2057
- const contents = map({});
2742
+ const contents = (0, smithy_client_1.map)({});
2058
2743
  const data = parsedOutput.body;
2059
- if (data.message != null) {
2060
- contents.message = (0, smithy_client_1.expectString)(data.message);
2061
- }
2744
+ const doc = (0, smithy_client_1.take)(data, {
2745
+ message: smithy_client_1.expectString,
2746
+ });
2747
+ Object.assign(contents, doc);
2062
2748
  const exception = new models_0_1.InvalidResourceTypeException({
2063
2749
  $metadata: deserializeMetadata(parsedOutput),
2064
2750
  ...contents,
@@ -2066,11 +2752,12 @@ const de_InvalidResourceTypeExceptionRes = async (parsedOutput, context) => {
2066
2752
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2067
2753
  };
2068
2754
  const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
2069
- const contents = map({});
2755
+ const contents = (0, smithy_client_1.map)({});
2070
2756
  const data = parsedOutput.body;
2071
- if (data.message != null) {
2072
- contents.message = (0, smithy_client_1.expectString)(data.message);
2073
- }
2757
+ const doc = (0, smithy_client_1.take)(data, {
2758
+ message: smithy_client_1.expectString,
2759
+ });
2760
+ Object.assign(contents, doc);
2074
2761
  const exception = new models_0_1.InvalidStateTransitionException({
2075
2762
  $metadata: deserializeMetadata(parsedOutput),
2076
2763
  ...contents,
@@ -2078,23 +2765,38 @@ const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
2078
2765
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2079
2766
  };
2080
2767
  const de_MalformedArnExceptionRes = async (parsedOutput, context) => {
2081
- const contents = map({});
2768
+ const contents = (0, smithy_client_1.map)({});
2082
2769
  const data = parsedOutput.body;
2083
- if (data.message != null) {
2084
- contents.message = (0, smithy_client_1.expectString)(data.message);
2085
- }
2770
+ const doc = (0, smithy_client_1.take)(data, {
2771
+ message: smithy_client_1.expectString,
2772
+ });
2773
+ Object.assign(contents, doc);
2086
2774
  const exception = new models_0_1.MalformedArnException({
2087
2775
  $metadata: deserializeMetadata(parsedOutput),
2088
2776
  ...contents,
2089
2777
  });
2090
2778
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2091
2779
  };
2780
+ const de_MalformedPolicyTemplateExceptionRes = async (parsedOutput, context) => {
2781
+ const contents = (0, smithy_client_1.map)({});
2782
+ const data = parsedOutput.body;
2783
+ const doc = (0, smithy_client_1.take)(data, {
2784
+ message: smithy_client_1.expectString,
2785
+ });
2786
+ Object.assign(contents, doc);
2787
+ const exception = new models_0_1.MalformedPolicyTemplateException({
2788
+ $metadata: deserializeMetadata(parsedOutput),
2789
+ ...contents,
2790
+ });
2791
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2792
+ };
2092
2793
  const de_MissingRequiredParameterExceptionRes = async (parsedOutput, context) => {
2093
- const contents = map({});
2794
+ const contents = (0, smithy_client_1.map)({});
2094
2795
  const data = parsedOutput.body;
2095
- if (data.message != null) {
2096
- contents.message = (0, smithy_client_1.expectString)(data.message);
2097
- }
2796
+ const doc = (0, smithy_client_1.take)(data, {
2797
+ message: smithy_client_1.expectString,
2798
+ });
2799
+ Object.assign(contents, doc);
2098
2800
  const exception = new models_0_1.MissingRequiredParameterException({
2099
2801
  $metadata: deserializeMetadata(parsedOutput),
2100
2802
  ...contents,
@@ -2102,23 +2804,64 @@ const de_MissingRequiredParameterExceptionRes = async (parsedOutput, context) =>
2102
2804
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2103
2805
  };
2104
2806
  const de_OperationNotPermittedExceptionRes = async (parsedOutput, context) => {
2105
- const contents = map({});
2807
+ const contents = (0, smithy_client_1.map)({});
2106
2808
  const data = parsedOutput.body;
2107
- if (data.message != null) {
2108
- contents.message = (0, smithy_client_1.expectString)(data.message);
2109
- }
2809
+ const doc = (0, smithy_client_1.take)(data, {
2810
+ message: smithy_client_1.expectString,
2811
+ });
2812
+ Object.assign(contents, doc);
2110
2813
  const exception = new models_0_1.OperationNotPermittedException({
2111
2814
  $metadata: deserializeMetadata(parsedOutput),
2112
2815
  ...contents,
2113
2816
  });
2114
2817
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2115
2818
  };
2819
+ const de_PermissionAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2820
+ const contents = (0, smithy_client_1.map)({});
2821
+ const data = parsedOutput.body;
2822
+ const doc = (0, smithy_client_1.take)(data, {
2823
+ message: smithy_client_1.expectString,
2824
+ });
2825
+ Object.assign(contents, doc);
2826
+ const exception = new models_0_1.PermissionAlreadyExistsException({
2827
+ $metadata: deserializeMetadata(parsedOutput),
2828
+ ...contents,
2829
+ });
2830
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2831
+ };
2832
+ const de_PermissionLimitExceededExceptionRes = async (parsedOutput, context) => {
2833
+ const contents = (0, smithy_client_1.map)({});
2834
+ const data = parsedOutput.body;
2835
+ const doc = (0, smithy_client_1.take)(data, {
2836
+ message: smithy_client_1.expectString,
2837
+ });
2838
+ Object.assign(contents, doc);
2839
+ const exception = new models_0_1.PermissionLimitExceededException({
2840
+ $metadata: deserializeMetadata(parsedOutput),
2841
+ ...contents,
2842
+ });
2843
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2844
+ };
2845
+ const de_PermissionVersionsLimitExceededExceptionRes = async (parsedOutput, context) => {
2846
+ const contents = (0, smithy_client_1.map)({});
2847
+ const data = parsedOutput.body;
2848
+ const doc = (0, smithy_client_1.take)(data, {
2849
+ message: smithy_client_1.expectString,
2850
+ });
2851
+ Object.assign(contents, doc);
2852
+ const exception = new models_0_1.PermissionVersionsLimitExceededException({
2853
+ $metadata: deserializeMetadata(parsedOutput),
2854
+ ...contents,
2855
+ });
2856
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2857
+ };
2116
2858
  const de_ResourceArnNotFoundExceptionRes = async (parsedOutput, context) => {
2117
- const contents = map({});
2859
+ const contents = (0, smithy_client_1.map)({});
2118
2860
  const data = parsedOutput.body;
2119
- if (data.message != null) {
2120
- contents.message = (0, smithy_client_1.expectString)(data.message);
2121
- }
2861
+ const doc = (0, smithy_client_1.take)(data, {
2862
+ message: smithy_client_1.expectString,
2863
+ });
2864
+ Object.assign(contents, doc);
2122
2865
  const exception = new models_0_1.ResourceArnNotFoundException({
2123
2866
  $metadata: deserializeMetadata(parsedOutput),
2124
2867
  ...contents,
@@ -2126,11 +2869,12 @@ const de_ResourceArnNotFoundExceptionRes = async (parsedOutput, context) => {
2126
2869
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2127
2870
  };
2128
2871
  const de_ResourceShareInvitationAlreadyAcceptedExceptionRes = async (parsedOutput, context) => {
2129
- const contents = map({});
2872
+ const contents = (0, smithy_client_1.map)({});
2130
2873
  const data = parsedOutput.body;
2131
- if (data.message != null) {
2132
- contents.message = (0, smithy_client_1.expectString)(data.message);
2133
- }
2874
+ const doc = (0, smithy_client_1.take)(data, {
2875
+ message: smithy_client_1.expectString,
2876
+ });
2877
+ Object.assign(contents, doc);
2134
2878
  const exception = new models_0_1.ResourceShareInvitationAlreadyAcceptedException({
2135
2879
  $metadata: deserializeMetadata(parsedOutput),
2136
2880
  ...contents,
@@ -2138,11 +2882,12 @@ const de_ResourceShareInvitationAlreadyAcceptedExceptionRes = async (parsedOutpu
2138
2882
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2139
2883
  };
2140
2884
  const de_ResourceShareInvitationAlreadyRejectedExceptionRes = async (parsedOutput, context) => {
2141
- const contents = map({});
2885
+ const contents = (0, smithy_client_1.map)({});
2142
2886
  const data = parsedOutput.body;
2143
- if (data.message != null) {
2144
- contents.message = (0, smithy_client_1.expectString)(data.message);
2145
- }
2887
+ const doc = (0, smithy_client_1.take)(data, {
2888
+ message: smithy_client_1.expectString,
2889
+ });
2890
+ Object.assign(contents, doc);
2146
2891
  const exception = new models_0_1.ResourceShareInvitationAlreadyRejectedException({
2147
2892
  $metadata: deserializeMetadata(parsedOutput),
2148
2893
  ...contents,
@@ -2150,11 +2895,12 @@ const de_ResourceShareInvitationAlreadyRejectedExceptionRes = async (parsedOutpu
2150
2895
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2151
2896
  };
2152
2897
  const de_ResourceShareInvitationArnNotFoundExceptionRes = async (parsedOutput, context) => {
2153
- const contents = map({});
2898
+ const contents = (0, smithy_client_1.map)({});
2154
2899
  const data = parsedOutput.body;
2155
- if (data.message != null) {
2156
- contents.message = (0, smithy_client_1.expectString)(data.message);
2157
- }
2900
+ const doc = (0, smithy_client_1.take)(data, {
2901
+ message: smithy_client_1.expectString,
2902
+ });
2903
+ Object.assign(contents, doc);
2158
2904
  const exception = new models_0_1.ResourceShareInvitationArnNotFoundException({
2159
2905
  $metadata: deserializeMetadata(parsedOutput),
2160
2906
  ...contents,
@@ -2162,11 +2908,12 @@ const de_ResourceShareInvitationArnNotFoundExceptionRes = async (parsedOutput, c
2162
2908
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2163
2909
  };
2164
2910
  const de_ResourceShareInvitationExpiredExceptionRes = async (parsedOutput, context) => {
2165
- const contents = map({});
2911
+ const contents = (0, smithy_client_1.map)({});
2166
2912
  const data = parsedOutput.body;
2167
- if (data.message != null) {
2168
- contents.message = (0, smithy_client_1.expectString)(data.message);
2169
- }
2913
+ const doc = (0, smithy_client_1.take)(data, {
2914
+ message: smithy_client_1.expectString,
2915
+ });
2916
+ Object.assign(contents, doc);
2170
2917
  const exception = new models_0_1.ResourceShareInvitationExpiredException({
2171
2918
  $metadata: deserializeMetadata(parsedOutput),
2172
2919
  ...contents,
@@ -2174,11 +2921,12 @@ const de_ResourceShareInvitationExpiredExceptionRes = async (parsedOutput, conte
2174
2921
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2175
2922
  };
2176
2923
  const de_ResourceShareLimitExceededExceptionRes = async (parsedOutput, context) => {
2177
- const contents = map({});
2924
+ const contents = (0, smithy_client_1.map)({});
2178
2925
  const data = parsedOutput.body;
2179
- if (data.message != null) {
2180
- contents.message = (0, smithy_client_1.expectString)(data.message);
2181
- }
2926
+ const doc = (0, smithy_client_1.take)(data, {
2927
+ message: smithy_client_1.expectString,
2928
+ });
2929
+ Object.assign(contents, doc);
2182
2930
  const exception = new models_0_1.ResourceShareLimitExceededException({
2183
2931
  $metadata: deserializeMetadata(parsedOutput),
2184
2932
  ...contents,
@@ -2186,11 +2934,12 @@ const de_ResourceShareLimitExceededExceptionRes = async (parsedOutput, context)
2186
2934
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2187
2935
  };
2188
2936
  const de_ServerInternalExceptionRes = async (parsedOutput, context) => {
2189
- const contents = map({});
2937
+ const contents = (0, smithy_client_1.map)({});
2190
2938
  const data = parsedOutput.body;
2191
- if (data.message != null) {
2192
- contents.message = (0, smithy_client_1.expectString)(data.message);
2193
- }
2939
+ const doc = (0, smithy_client_1.take)(data, {
2940
+ message: smithy_client_1.expectString,
2941
+ });
2942
+ Object.assign(contents, doc);
2194
2943
  const exception = new models_0_1.ServerInternalException({
2195
2944
  $metadata: deserializeMetadata(parsedOutput),
2196
2945
  ...contents,
@@ -2198,11 +2947,12 @@ const de_ServerInternalExceptionRes = async (parsedOutput, context) => {
2198
2947
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2199
2948
  };
2200
2949
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2201
- const contents = map({});
2950
+ const contents = (0, smithy_client_1.map)({});
2202
2951
  const data = parsedOutput.body;
2203
- if (data.message != null) {
2204
- contents.message = (0, smithy_client_1.expectString)(data.message);
2205
- }
2952
+ const doc = (0, smithy_client_1.take)(data, {
2953
+ message: smithy_client_1.expectString,
2954
+ });
2955
+ Object.assign(contents, doc);
2206
2956
  const exception = new models_0_1.ServiceUnavailableException({
2207
2957
  $metadata: deserializeMetadata(parsedOutput),
2208
2958
  ...contents,
@@ -2210,11 +2960,12 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2210
2960
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2211
2961
  };
2212
2962
  const de_TagLimitExceededExceptionRes = async (parsedOutput, context) => {
2213
- const contents = map({});
2963
+ const contents = (0, smithy_client_1.map)({});
2214
2964
  const data = parsedOutput.body;
2215
- if (data.message != null) {
2216
- contents.message = (0, smithy_client_1.expectString)(data.message);
2217
- }
2965
+ const doc = (0, smithy_client_1.take)(data, {
2966
+ message: smithy_client_1.expectString,
2967
+ });
2968
+ Object.assign(contents, doc);
2218
2969
  const exception = new models_0_1.TagLimitExceededException({
2219
2970
  $metadata: deserializeMetadata(parsedOutput),
2220
2971
  ...contents,
@@ -2222,11 +2973,12 @@ const de_TagLimitExceededExceptionRes = async (parsedOutput, context) => {
2222
2973
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2223
2974
  };
2224
2975
  const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
2225
- const contents = map({});
2976
+ const contents = (0, smithy_client_1.map)({});
2226
2977
  const data = parsedOutput.body;
2227
- if (data.message != null) {
2228
- contents.message = (0, smithy_client_1.expectString)(data.message);
2229
- }
2978
+ const doc = (0, smithy_client_1.take)(data, {
2979
+ message: smithy_client_1.expectString,
2980
+ });
2981
+ Object.assign(contents, doc);
2230
2982
  const exception = new models_0_1.TagPolicyViolationException({
2231
2983
  $metadata: deserializeMetadata(parsedOutput),
2232
2984
  ...contents,
@@ -2234,11 +2986,12 @@ const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
2234
2986
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2235
2987
  };
2236
2988
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2237
- const contents = map({});
2989
+ const contents = (0, smithy_client_1.map)({});
2238
2990
  const data = parsedOutput.body;
2239
- if (data.message != null) {
2240
- contents.message = (0, smithy_client_1.expectString)(data.message);
2241
- }
2991
+ const doc = (0, smithy_client_1.take)(data, {
2992
+ message: smithy_client_1.expectString,
2993
+ });
2994
+ Object.assign(contents, doc);
2242
2995
  const exception = new models_0_1.ThrottlingException({
2243
2996
  $metadata: deserializeMetadata(parsedOutput),
2244
2997
  ...contents,
@@ -2246,225 +2999,162 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2246
2999
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2247
3000
  };
2248
3001
  const de_UnknownResourceExceptionRes = async (parsedOutput, context) => {
2249
- const contents = map({});
3002
+ const contents = (0, smithy_client_1.map)({});
2250
3003
  const data = parsedOutput.body;
2251
- if (data.message != null) {
2252
- contents.message = (0, smithy_client_1.expectString)(data.message);
2253
- }
3004
+ const doc = (0, smithy_client_1.take)(data, {
3005
+ message: smithy_client_1.expectString,
3006
+ });
3007
+ Object.assign(contents, doc);
2254
3008
  const exception = new models_0_1.UnknownResourceException({
2255
3009
  $metadata: deserializeMetadata(parsedOutput),
2256
3010
  ...contents,
2257
3011
  });
2258
3012
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2259
3013
  };
2260
- const se_PermissionArnList = (input, context) => {
2261
- return input
2262
- .filter((e) => e != null)
2263
- .map((entry) => {
2264
- return entry;
2265
- });
2266
- };
2267
- const se_PrincipalArnOrIdList = (input, context) => {
2268
- return input
2269
- .filter((e) => e != null)
2270
- .map((entry) => {
2271
- return entry;
2272
- });
2273
- };
2274
- const se_ResourceArnList = (input, context) => {
2275
- return input
2276
- .filter((e) => e != null)
2277
- .map((entry) => {
2278
- return entry;
2279
- });
2280
- };
2281
- const se_ResourceShareArnList = (input, context) => {
2282
- return input
2283
- .filter((e) => e != null)
2284
- .map((entry) => {
2285
- return entry;
2286
- });
2287
- };
2288
- const se_ResourceShareInvitationArnList = (input, context) => {
2289
- return input
2290
- .filter((e) => e != null)
2291
- .map((entry) => {
2292
- return entry;
3014
+ const de_UnmatchedPolicyPermissionExceptionRes = async (parsedOutput, context) => {
3015
+ const contents = (0, smithy_client_1.map)({});
3016
+ const data = parsedOutput.body;
3017
+ const doc = (0, smithy_client_1.take)(data, {
3018
+ message: smithy_client_1.expectString,
2293
3019
  });
2294
- };
2295
- const se_Tag = (input, context) => {
2296
- return {
2297
- ...(input.key != null && { key: input.key }),
2298
- ...(input.value != null && { value: input.value }),
2299
- };
2300
- };
2301
- const se_TagFilter = (input, context) => {
2302
- return {
2303
- ...(input.tagKey != null && { tagKey: input.tagKey }),
2304
- ...(input.tagValues != null && { tagValues: se_TagValueList(input.tagValues, context) }),
2305
- };
2306
- };
2307
- const se_TagFilters = (input, context) => {
2308
- return input
2309
- .filter((e) => e != null)
2310
- .map((entry) => {
2311
- return se_TagFilter(entry, context);
3020
+ Object.assign(contents, doc);
3021
+ const exception = new models_0_1.UnmatchedPolicyPermissionException({
3022
+ $metadata: deserializeMetadata(parsedOutput),
3023
+ ...contents,
2312
3024
  });
3025
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2313
3026
  };
2314
- const se_TagKeyList = (input, context) => {
2315
- return input
2316
- .filter((e) => e != null)
2317
- .map((entry) => {
2318
- return entry;
3027
+ const de_AssociatedPermission = (output, context) => {
3028
+ return (0, smithy_client_1.take)(output, {
3029
+ arn: smithy_client_1.expectString,
3030
+ defaultVersion: smithy_client_1.expectBoolean,
3031
+ featureSet: smithy_client_1.expectString,
3032
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3033
+ permissionVersion: smithy_client_1.expectString,
3034
+ resourceShareArn: smithy_client_1.expectString,
3035
+ resourceType: smithy_client_1.expectString,
3036
+ status: smithy_client_1.expectString,
2319
3037
  });
2320
3038
  };
2321
- const se_TagList = (input, context) => {
2322
- return input
3039
+ const de_AssociatedPermissionList = (output, context) => {
3040
+ const retVal = (output || [])
2323
3041
  .filter((e) => e != null)
2324
3042
  .map((entry) => {
2325
- return se_Tag(entry, context);
3043
+ return de_AssociatedPermission(entry, context);
2326
3044
  });
3045
+ return retVal;
2327
3046
  };
2328
- const se_TagValueList = (input, context) => {
2329
- return input
2330
- .filter((e) => e != null)
2331
- .map((entry) => {
2332
- return entry;
3047
+ const de_Principal = (output, context) => {
3048
+ return (0, smithy_client_1.take)(output, {
3049
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3050
+ external: smithy_client_1.expectBoolean,
3051
+ id: smithy_client_1.expectString,
3052
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3053
+ resourceShareArn: smithy_client_1.expectString,
2333
3054
  });
2334
3055
  };
2335
- const de_PolicyList = (output, context) => {
3056
+ const de_PrincipalList = (output, context) => {
2336
3057
  const retVal = (output || [])
2337
3058
  .filter((e) => e != null)
2338
3059
  .map((entry) => {
2339
- if (entry === null) {
2340
- return null;
2341
- }
2342
- return (0, smithy_client_1.expectString)(entry);
3060
+ return de_Principal(entry, context);
2343
3061
  });
2344
3062
  return retVal;
2345
3063
  };
2346
- const de_Principal = (output, context) => {
2347
- return {
2348
- creationTime: output.creationTime != null
2349
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2350
- : undefined,
2351
- external: (0, smithy_client_1.expectBoolean)(output.external),
2352
- id: (0, smithy_client_1.expectString)(output.id),
2353
- lastUpdatedTime: output.lastUpdatedTime != null
2354
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2355
- : undefined,
2356
- resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2357
- };
3064
+ const de_ReplacePermissionAssociationsWork = (output, context) => {
3065
+ return (0, smithy_client_1.take)(output, {
3066
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3067
+ fromPermissionArn: smithy_client_1.expectString,
3068
+ fromPermissionVersion: smithy_client_1.expectString,
3069
+ id: smithy_client_1.expectString,
3070
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3071
+ status: smithy_client_1.expectString,
3072
+ statusMessage: smithy_client_1.expectString,
3073
+ toPermissionArn: smithy_client_1.expectString,
3074
+ toPermissionVersion: smithy_client_1.expectString,
3075
+ });
2358
3076
  };
2359
- const de_PrincipalList = (output, context) => {
3077
+ const de_ReplacePermissionAssociationsWorkList = (output, context) => {
2360
3078
  const retVal = (output || [])
2361
3079
  .filter((e) => e != null)
2362
3080
  .map((entry) => {
2363
- if (entry === null) {
2364
- return null;
2365
- }
2366
- return de_Principal(entry, context);
3081
+ return de_ReplacePermissionAssociationsWork(entry, context);
2367
3082
  });
2368
3083
  return retVal;
2369
3084
  };
2370
3085
  const de_Resource = (output, context) => {
2371
- return {
2372
- arn: (0, smithy_client_1.expectString)(output.arn),
2373
- creationTime: output.creationTime != null
2374
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2375
- : undefined,
2376
- lastUpdatedTime: output.lastUpdatedTime != null
2377
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2378
- : undefined,
2379
- resourceGroupArn: (0, smithy_client_1.expectString)(output.resourceGroupArn),
2380
- resourceRegionScope: (0, smithy_client_1.expectString)(output.resourceRegionScope),
2381
- resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2382
- status: (0, smithy_client_1.expectString)(output.status),
2383
- statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2384
- type: (0, smithy_client_1.expectString)(output.type),
2385
- };
3086
+ return (0, smithy_client_1.take)(output, {
3087
+ arn: smithy_client_1.expectString,
3088
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3089
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3090
+ resourceGroupArn: smithy_client_1.expectString,
3091
+ resourceRegionScope: smithy_client_1.expectString,
3092
+ resourceShareArn: smithy_client_1.expectString,
3093
+ status: smithy_client_1.expectString,
3094
+ statusMessage: smithy_client_1.expectString,
3095
+ type: smithy_client_1.expectString,
3096
+ });
2386
3097
  };
2387
3098
  const de_ResourceList = (output, context) => {
2388
3099
  const retVal = (output || [])
2389
3100
  .filter((e) => e != null)
2390
3101
  .map((entry) => {
2391
- if (entry === null) {
2392
- return null;
2393
- }
2394
3102
  return de_Resource(entry, context);
2395
3103
  });
2396
3104
  return retVal;
2397
3105
  };
2398
3106
  const de_ResourceShare = (output, context) => {
2399
- return {
2400
- allowExternalPrincipals: (0, smithy_client_1.expectBoolean)(output.allowExternalPrincipals),
2401
- creationTime: output.creationTime != null
2402
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2403
- : undefined,
2404
- featureSet: (0, smithy_client_1.expectString)(output.featureSet),
2405
- lastUpdatedTime: output.lastUpdatedTime != null
2406
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2407
- : undefined,
2408
- name: (0, smithy_client_1.expectString)(output.name),
2409
- owningAccountId: (0, smithy_client_1.expectString)(output.owningAccountId),
2410
- resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2411
- status: (0, smithy_client_1.expectString)(output.status),
2412
- statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2413
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
2414
- };
3107
+ return (0, smithy_client_1.take)(output, {
3108
+ allowExternalPrincipals: smithy_client_1.expectBoolean,
3109
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3110
+ featureSet: smithy_client_1.expectString,
3111
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3112
+ name: smithy_client_1.expectString,
3113
+ owningAccountId: smithy_client_1.expectString,
3114
+ resourceShareArn: smithy_client_1.expectString,
3115
+ status: smithy_client_1.expectString,
3116
+ statusMessage: smithy_client_1.expectString,
3117
+ tags: smithy_client_1._json,
3118
+ });
2415
3119
  };
2416
3120
  const de_ResourceShareAssociation = (output, context) => {
2417
- return {
2418
- associatedEntity: (0, smithy_client_1.expectString)(output.associatedEntity),
2419
- associationType: (0, smithy_client_1.expectString)(output.associationType),
2420
- creationTime: output.creationTime != null
2421
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2422
- : undefined,
2423
- external: (0, smithy_client_1.expectBoolean)(output.external),
2424
- lastUpdatedTime: output.lastUpdatedTime != null
2425
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2426
- : undefined,
2427
- resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2428
- resourceShareName: (0, smithy_client_1.expectString)(output.resourceShareName),
2429
- status: (0, smithy_client_1.expectString)(output.status),
2430
- statusMessage: (0, smithy_client_1.expectString)(output.statusMessage),
2431
- };
3121
+ return (0, smithy_client_1.take)(output, {
3122
+ associatedEntity: smithy_client_1.expectString,
3123
+ associationType: smithy_client_1.expectString,
3124
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3125
+ external: smithy_client_1.expectBoolean,
3126
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3127
+ resourceShareArn: smithy_client_1.expectString,
3128
+ resourceShareName: smithy_client_1.expectString,
3129
+ status: smithy_client_1.expectString,
3130
+ statusMessage: smithy_client_1.expectString,
3131
+ });
2432
3132
  };
2433
3133
  const de_ResourceShareAssociationList = (output, context) => {
2434
3134
  const retVal = (output || [])
2435
3135
  .filter((e) => e != null)
2436
3136
  .map((entry) => {
2437
- if (entry === null) {
2438
- return null;
2439
- }
2440
3137
  return de_ResourceShareAssociation(entry, context);
2441
3138
  });
2442
3139
  return retVal;
2443
3140
  };
2444
3141
  const de_ResourceShareInvitation = (output, context) => {
2445
- return {
2446
- invitationTimestamp: output.invitationTimestamp != null
2447
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.invitationTimestamp)))
2448
- : undefined,
2449
- receiverAccountId: (0, smithy_client_1.expectString)(output.receiverAccountId),
2450
- receiverArn: (0, smithy_client_1.expectString)(output.receiverArn),
2451
- resourceShareArn: (0, smithy_client_1.expectString)(output.resourceShareArn),
2452
- resourceShareAssociations: output.resourceShareAssociations != null
2453
- ? de_ResourceShareAssociationList(output.resourceShareAssociations, context)
2454
- : undefined,
2455
- resourceShareInvitationArn: (0, smithy_client_1.expectString)(output.resourceShareInvitationArn),
2456
- resourceShareName: (0, smithy_client_1.expectString)(output.resourceShareName),
2457
- senderAccountId: (0, smithy_client_1.expectString)(output.senderAccountId),
2458
- status: (0, smithy_client_1.expectString)(output.status),
2459
- };
3142
+ return (0, smithy_client_1.take)(output, {
3143
+ invitationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3144
+ receiverAccountId: smithy_client_1.expectString,
3145
+ receiverArn: smithy_client_1.expectString,
3146
+ resourceShareArn: smithy_client_1.expectString,
3147
+ resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
3148
+ resourceShareInvitationArn: smithy_client_1.expectString,
3149
+ resourceShareName: smithy_client_1.expectString,
3150
+ senderAccountId: smithy_client_1.expectString,
3151
+ status: smithy_client_1.expectString,
3152
+ });
2460
3153
  };
2461
3154
  const de_ResourceShareInvitationList = (output, context) => {
2462
3155
  const retVal = (output || [])
2463
3156
  .filter((e) => e != null)
2464
3157
  .map((entry) => {
2465
- if (entry === null) {
2466
- return null;
2467
- }
2468
3158
  return de_ResourceShareInvitation(entry, context);
2469
3159
  });
2470
3160
  return retVal;
@@ -2473,92 +3163,50 @@ const de_ResourceShareList = (output, context) => {
2473
3163
  const retVal = (output || [])
2474
3164
  .filter((e) => e != null)
2475
3165
  .map((entry) => {
2476
- if (entry === null) {
2477
- return null;
2478
- }
2479
3166
  return de_ResourceShare(entry, context);
2480
3167
  });
2481
3168
  return retVal;
2482
3169
  };
2483
3170
  const de_ResourceSharePermissionDetail = (output, context) => {
2484
- return {
2485
- arn: (0, smithy_client_1.expectString)(output.arn),
2486
- creationTime: output.creationTime != null
2487
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2488
- : undefined,
2489
- defaultVersion: (0, smithy_client_1.expectBoolean)(output.defaultVersion),
2490
- isResourceTypeDefault: (0, smithy_client_1.expectBoolean)(output.isResourceTypeDefault),
2491
- lastUpdatedTime: output.lastUpdatedTime != null
2492
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2493
- : undefined,
2494
- name: (0, smithy_client_1.expectString)(output.name),
2495
- permission: (0, smithy_client_1.expectString)(output.permission),
2496
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2497
- version: (0, smithy_client_1.expectString)(output.version),
2498
- };
3171
+ return (0, smithy_client_1.take)(output, {
3172
+ arn: smithy_client_1.expectString,
3173
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3174
+ defaultVersion: smithy_client_1.expectBoolean,
3175
+ featureSet: smithy_client_1.expectString,
3176
+ isResourceTypeDefault: smithy_client_1.expectBoolean,
3177
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3178
+ name: smithy_client_1.expectString,
3179
+ permission: smithy_client_1.expectString,
3180
+ permissionType: smithy_client_1.expectString,
3181
+ resourceType: smithy_client_1.expectString,
3182
+ status: smithy_client_1.expectString,
3183
+ tags: smithy_client_1._json,
3184
+ version: smithy_client_1.expectString,
3185
+ });
2499
3186
  };
2500
3187
  const de_ResourceSharePermissionList = (output, context) => {
2501
3188
  const retVal = (output || [])
2502
3189
  .filter((e) => e != null)
2503
3190
  .map((entry) => {
2504
- if (entry === null) {
2505
- return null;
2506
- }
2507
3191
  return de_ResourceSharePermissionSummary(entry, context);
2508
3192
  });
2509
3193
  return retVal;
2510
3194
  };
2511
3195
  const de_ResourceSharePermissionSummary = (output, context) => {
2512
- return {
2513
- arn: (0, smithy_client_1.expectString)(output.arn),
2514
- creationTime: output.creationTime != null
2515
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2516
- : undefined,
2517
- defaultVersion: (0, smithy_client_1.expectBoolean)(output.defaultVersion),
2518
- isResourceTypeDefault: (0, smithy_client_1.expectBoolean)(output.isResourceTypeDefault),
2519
- lastUpdatedTime: output.lastUpdatedTime != null
2520
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
2521
- : undefined,
2522
- name: (0, smithy_client_1.expectString)(output.name),
2523
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2524
- status: (0, smithy_client_1.expectString)(output.status),
2525
- version: (0, smithy_client_1.expectString)(output.version),
2526
- };
2527
- };
2528
- const de_ServiceNameAndResourceType = (output, context) => {
2529
- return {
2530
- resourceRegionScope: (0, smithy_client_1.expectString)(output.resourceRegionScope),
2531
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2532
- serviceName: (0, smithy_client_1.expectString)(output.serviceName),
2533
- };
2534
- };
2535
- const de_ServiceNameAndResourceTypeList = (output, context) => {
2536
- const retVal = (output || [])
2537
- .filter((e) => e != null)
2538
- .map((entry) => {
2539
- if (entry === null) {
2540
- return null;
2541
- }
2542
- return de_ServiceNameAndResourceType(entry, context);
2543
- });
2544
- return retVal;
2545
- };
2546
- const de_Tag = (output, context) => {
2547
- return {
2548
- key: (0, smithy_client_1.expectString)(output.key),
2549
- value: (0, smithy_client_1.expectString)(output.value),
2550
- };
2551
- };
2552
- const de_TagList = (output, context) => {
2553
- const retVal = (output || [])
2554
- .filter((e) => e != null)
2555
- .map((entry) => {
2556
- if (entry === null) {
2557
- return null;
2558
- }
2559
- return de_Tag(entry, context);
3196
+ return (0, smithy_client_1.take)(output, {
3197
+ arn: smithy_client_1.expectString,
3198
+ creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3199
+ defaultVersion: smithy_client_1.expectBoolean,
3200
+ featureSet: smithy_client_1.expectString,
3201
+ isResourceTypeDefault: smithy_client_1.expectBoolean,
3202
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3203
+ name: smithy_client_1.expectString,
3204
+ permissionType: smithy_client_1.expectString,
3205
+ resourceType: smithy_client_1.expectString,
3206
+ status: smithy_client_1.expectString,
3207
+ tags: smithy_client_1._json,
3208
+ version: smithy_client_1.expectString,
2560
3209
  });
2561
- return retVal;
2562
3210
  };
2563
3211
  const deserializeMetadata = (output) => ({
2564
3212
  httpStatusCode: output.statusCode,