@aws-sdk/client-directory-service-data 3.654.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 (179) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +391 -0
  3. package/dist-cjs/DirectoryServiceData.js +45 -0
  4. package/dist-cjs/DirectoryServiceDataClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/AddGroupMemberCommand.js +26 -0
  8. package/dist-cjs/commands/CreateGroupCommand.js +27 -0
  9. package/dist-cjs/commands/CreateUserCommand.js +27 -0
  10. package/dist-cjs/commands/DeleteGroupCommand.js +26 -0
  11. package/dist-cjs/commands/DeleteUserCommand.js +26 -0
  12. package/dist-cjs/commands/DescribeGroupCommand.js +27 -0
  13. package/dist-cjs/commands/DescribeUserCommand.js +27 -0
  14. package/dist-cjs/commands/DisableUserCommand.js +26 -0
  15. package/dist-cjs/commands/ListGroupMembersCommand.js +27 -0
  16. package/dist-cjs/commands/ListGroupsCommand.js +27 -0
  17. package/dist-cjs/commands/ListGroupsForMemberCommand.js +27 -0
  18. package/dist-cjs/commands/ListUsersCommand.js +27 -0
  19. package/dist-cjs/commands/RemoveGroupMemberCommand.js +26 -0
  20. package/dist-cjs/commands/SearchGroupsCommand.js +27 -0
  21. package/dist-cjs/commands/SearchUsersCommand.js +27 -0
  22. package/dist-cjs/commands/UpdateGroupCommand.js +27 -0
  23. package/dist-cjs/commands/UpdateUserCommand.js +27 -0
  24. package/dist-cjs/commands/index.js +20 -0
  25. package/dist-cjs/endpoint/EndpointParameters.js +18 -0
  26. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  27. package/dist-cjs/endpoint/ruleset.js +7 -0
  28. package/dist-cjs/extensionConfiguration.js +2 -0
  29. package/dist-cjs/index.js +11 -0
  30. package/dist-cjs/models/DirectoryServiceDataServiceException.js +12 -0
  31. package/dist-cjs/models/index.js +4 -0
  32. package/dist-cjs/models/models_0.js +333 -0
  33. package/dist-cjs/pagination/Interfaces.js +2 -0
  34. package/dist-cjs/pagination/ListGroupMembersPaginator.js +7 -0
  35. package/dist-cjs/pagination/ListGroupsForMemberPaginator.js +7 -0
  36. package/dist-cjs/pagination/ListGroupsPaginator.js +7 -0
  37. package/dist-cjs/pagination/ListUsersPaginator.js +7 -0
  38. package/dist-cjs/pagination/SearchGroupsPaginator.js +7 -0
  39. package/dist-cjs/pagination/SearchUsersPaginator.js +7 -0
  40. package/dist-cjs/pagination/index.js +10 -0
  41. package/dist-cjs/protocols/Aws_restJson1.js +768 -0
  42. package/dist-cjs/runtimeConfig.browser.js +39 -0
  43. package/dist-cjs/runtimeConfig.js +49 -0
  44. package/dist-cjs/runtimeConfig.native.js +15 -0
  45. package/dist-cjs/runtimeConfig.shared.js +34 -0
  46. package/dist-cjs/runtimeExtensions.js +25 -0
  47. package/dist-es/DirectoryServiceData.js +41 -0
  48. package/dist-es/DirectoryServiceDataClient.js +46 -0
  49. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  50. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  51. package/dist-es/commands/AddGroupMemberCommand.js +22 -0
  52. package/dist-es/commands/CreateGroupCommand.js +23 -0
  53. package/dist-es/commands/CreateUserCommand.js +23 -0
  54. package/dist-es/commands/DeleteGroupCommand.js +22 -0
  55. package/dist-es/commands/DeleteUserCommand.js +22 -0
  56. package/dist-es/commands/DescribeGroupCommand.js +23 -0
  57. package/dist-es/commands/DescribeUserCommand.js +23 -0
  58. package/dist-es/commands/DisableUserCommand.js +22 -0
  59. package/dist-es/commands/ListGroupMembersCommand.js +23 -0
  60. package/dist-es/commands/ListGroupsCommand.js +23 -0
  61. package/dist-es/commands/ListGroupsForMemberCommand.js +23 -0
  62. package/dist-es/commands/ListUsersCommand.js +23 -0
  63. package/dist-es/commands/RemoveGroupMemberCommand.js +22 -0
  64. package/dist-es/commands/SearchGroupsCommand.js +23 -0
  65. package/dist-es/commands/SearchUsersCommand.js +23 -0
  66. package/dist-es/commands/UpdateGroupCommand.js +23 -0
  67. package/dist-es/commands/UpdateUserCommand.js +23 -0
  68. package/dist-es/commands/index.js +17 -0
  69. package/dist-es/endpoint/EndpointParameters.js +14 -0
  70. package/dist-es/endpoint/endpointResolver.js +14 -0
  71. package/dist-es/endpoint/ruleset.js +4 -0
  72. package/dist-es/extensionConfiguration.js +1 -0
  73. package/dist-es/index.js +6 -0
  74. package/dist-es/models/DirectoryServiceDataServiceException.js +8 -0
  75. package/dist-es/models/index.js +1 -0
  76. package/dist-es/models/models_0.js +301 -0
  77. package/dist-es/pagination/Interfaces.js +1 -0
  78. package/dist-es/pagination/ListGroupMembersPaginator.js +4 -0
  79. package/dist-es/pagination/ListGroupsForMemberPaginator.js +4 -0
  80. package/dist-es/pagination/ListGroupsPaginator.js +4 -0
  81. package/dist-es/pagination/ListUsersPaginator.js +4 -0
  82. package/dist-es/pagination/SearchGroupsPaginator.js +4 -0
  83. package/dist-es/pagination/SearchUsersPaginator.js +4 -0
  84. package/dist-es/pagination/index.js +7 -0
  85. package/dist-es/protocols/Aws_restJson1.js +731 -0
  86. package/dist-es/runtimeConfig.browser.js +34 -0
  87. package/dist-es/runtimeConfig.js +44 -0
  88. package/dist-es/runtimeConfig.native.js +11 -0
  89. package/dist-es/runtimeConfig.shared.js +30 -0
  90. package/dist-es/runtimeExtensions.js +21 -0
  91. package/dist-types/DirectoryServiceData.d.ts +179 -0
  92. package/dist-types/DirectoryServiceDataClient.d.ts +236 -0
  93. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  94. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  95. package/dist-types/commands/AddGroupMemberCommand.d.ts +107 -0
  96. package/dist-types/commands/CreateGroupCommand.d.ts +118 -0
  97. package/dist-types/commands/CreateUserCommand.d.ts +119 -0
  98. package/dist-types/commands/DeleteGroupCommand.d.ts +105 -0
  99. package/dist-types/commands/DeleteUserCommand.d.ts +105 -0
  100. package/dist-types/commands/DescribeGroupCommand.d.ts +117 -0
  101. package/dist-types/commands/DescribeUserCommand.d.ts +120 -0
  102. package/dist-types/commands/DisableUserCommand.d.ts +107 -0
  103. package/dist-types/commands/ListGroupMembersCommand.d.ts +117 -0
  104. package/dist-types/commands/ListGroupsCommand.d.ts +112 -0
  105. package/dist-types/commands/ListGroupsForMemberCommand.d.ts +118 -0
  106. package/dist-types/commands/ListUsersCommand.d.ts +113 -0
  107. package/dist-types/commands/RemoveGroupMemberCommand.d.ts +107 -0
  108. package/dist-types/commands/SearchGroupsCommand.d.ts +129 -0
  109. package/dist-types/commands/SearchUsersCommand.d.ts +132 -0
  110. package/dist-types/commands/UpdateGroupCommand.d.ts +118 -0
  111. package/dist-types/commands/UpdateUserCommand.d.ts +119 -0
  112. package/dist-types/commands/index.d.ts +17 -0
  113. package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  114. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  115. package/dist-types/endpoint/ruleset.d.ts +2 -0
  116. package/dist-types/extensionConfiguration.d.ts +9 -0
  117. package/dist-types/index.d.ts +64 -0
  118. package/dist-types/models/DirectoryServiceDataServiceException.d.ts +14 -0
  119. package/dist-types/models/index.d.ts +1 -0
  120. package/dist-types/models/models_0.d.ts +1639 -0
  121. package/dist-types/pagination/Interfaces.d.ts +8 -0
  122. package/dist-types/pagination/ListGroupMembersPaginator.d.ts +7 -0
  123. package/dist-types/pagination/ListGroupsForMemberPaginator.d.ts +7 -0
  124. package/dist-types/pagination/ListGroupsPaginator.d.ts +7 -0
  125. package/dist-types/pagination/ListUsersPaginator.d.ts +7 -0
  126. package/dist-types/pagination/SearchGroupsPaginator.d.ts +7 -0
  127. package/dist-types/pagination/SearchUsersPaginator.d.ts +7 -0
  128. package/dist-types/pagination/index.d.ts +7 -0
  129. package/dist-types/protocols/Aws_restJson1.d.ts +155 -0
  130. package/dist-types/runtimeConfig.browser.d.ts +47 -0
  131. package/dist-types/runtimeConfig.d.ts +47 -0
  132. package/dist-types/runtimeConfig.native.d.ts +46 -0
  133. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  134. package/dist-types/runtimeExtensions.d.ts +17 -0
  135. package/dist-types/ts3.4/DirectoryServiceData.d.ts +296 -0
  136. package/dist-types/ts3.4/DirectoryServiceDataClient.d.ts +223 -0
  137. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  138. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  139. package/dist-types/ts3.4/commands/AddGroupMemberCommand.d.ts +50 -0
  140. package/dist-types/ts3.4/commands/CreateGroupCommand.d.ts +47 -0
  141. package/dist-types/ts3.4/commands/CreateUserCommand.d.ts +47 -0
  142. package/dist-types/ts3.4/commands/DeleteGroupCommand.d.ts +47 -0
  143. package/dist-types/ts3.4/commands/DeleteUserCommand.d.ts +47 -0
  144. package/dist-types/ts3.4/commands/DescribeGroupCommand.d.ts +47 -0
  145. package/dist-types/ts3.4/commands/DescribeUserCommand.d.ts +47 -0
  146. package/dist-types/ts3.4/commands/DisableUserCommand.d.ts +47 -0
  147. package/dist-types/ts3.4/commands/ListGroupMembersCommand.d.ts +50 -0
  148. package/dist-types/ts3.4/commands/ListGroupsCommand.d.ts +47 -0
  149. package/dist-types/ts3.4/commands/ListGroupsForMemberCommand.d.ts +51 -0
  150. package/dist-types/ts3.4/commands/ListUsersCommand.d.ts +47 -0
  151. package/dist-types/ts3.4/commands/RemoveGroupMemberCommand.d.ts +51 -0
  152. package/dist-types/ts3.4/commands/SearchGroupsCommand.d.ts +47 -0
  153. package/dist-types/ts3.4/commands/SearchUsersCommand.d.ts +47 -0
  154. package/dist-types/ts3.4/commands/UpdateGroupCommand.d.ts +47 -0
  155. package/dist-types/ts3.4/commands/UpdateUserCommand.d.ts +47 -0
  156. package/dist-types/ts3.4/commands/index.d.ts +17 -0
  157. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  158. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  159. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  160. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  161. package/dist-types/ts3.4/index.d.ts +9 -0
  162. package/dist-types/ts3.4/models/DirectoryServiceDataServiceException.d.ts +9 -0
  163. package/dist-types/ts3.4/models/index.d.ts +1 -0
  164. package/dist-types/ts3.4/models/models_0.d.ts +471 -0
  165. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  166. package/dist-types/ts3.4/pagination/ListGroupMembersPaginator.d.ts +11 -0
  167. package/dist-types/ts3.4/pagination/ListGroupsForMemberPaginator.d.ts +11 -0
  168. package/dist-types/ts3.4/pagination/ListGroupsPaginator.d.ts +11 -0
  169. package/dist-types/ts3.4/pagination/ListUsersPaginator.d.ts +11 -0
  170. package/dist-types/ts3.4/pagination/SearchGroupsPaginator.d.ts +11 -0
  171. package/dist-types/ts3.4/pagination/SearchUsersPaginator.d.ts +11 -0
  172. package/dist-types/ts3.4/pagination/index.d.ts +7 -0
  173. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +209 -0
  174. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +89 -0
  175. package/dist-types/ts3.4/runtimeConfig.d.ts +93 -0
  176. package/dist-types/ts3.4/runtimeConfig.native.d.ts +83 -0
  177. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
  178. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  179. package/package.json +103 -0
@@ -0,0 +1,768 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_UpdateUserCommand = exports.de_UpdateGroupCommand = exports.de_SearchUsersCommand = exports.de_SearchGroupsCommand = exports.de_RemoveGroupMemberCommand = exports.de_ListUsersCommand = exports.de_ListGroupsForMemberCommand = exports.de_ListGroupsCommand = exports.de_ListGroupMembersCommand = exports.de_DisableUserCommand = exports.de_DescribeUserCommand = exports.de_DescribeGroupCommand = exports.de_DeleteUserCommand = exports.de_DeleteGroupCommand = exports.de_CreateUserCommand = exports.de_CreateGroupCommand = exports.de_AddGroupMemberCommand = exports.se_UpdateUserCommand = exports.se_UpdateGroupCommand = exports.se_SearchUsersCommand = exports.se_SearchGroupsCommand = exports.se_RemoveGroupMemberCommand = exports.se_ListUsersCommand = exports.se_ListGroupsForMemberCommand = exports.se_ListGroupsCommand = exports.se_ListGroupMembersCommand = exports.se_DisableUserCommand = exports.se_DescribeUserCommand = exports.se_DescribeGroupCommand = exports.se_DeleteUserCommand = exports.se_DeleteGroupCommand = exports.se_CreateUserCommand = exports.se_CreateGroupCommand = exports.se_AddGroupMemberCommand = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const core_2 = require("@smithy/core");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const uuid_1 = require("uuid");
8
+ const DirectoryServiceDataServiceException_1 = require("../models/DirectoryServiceDataServiceException");
9
+ const models_0_1 = require("../models/models_0");
10
+ const se_AddGroupMemberCommand = async (input, context) => {
11
+ const b = (0, core_2.requestBuilder)(input, context);
12
+ const headers = {
13
+ "content-type": "application/json",
14
+ };
15
+ b.bp("/GroupMemberships/AddGroupMember");
16
+ const query = (0, smithy_client_1.map)({
17
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
18
+ });
19
+ let body;
20
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
21
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
22
+ GroupName: [],
23
+ MemberName: [],
24
+ MemberRealm: [],
25
+ }));
26
+ b.m("POST").h(headers).q(query).b(body);
27
+ return b.build();
28
+ };
29
+ exports.se_AddGroupMemberCommand = se_AddGroupMemberCommand;
30
+ const se_CreateGroupCommand = async (input, context) => {
31
+ const b = (0, core_2.requestBuilder)(input, context);
32
+ const headers = {
33
+ "content-type": "application/json",
34
+ };
35
+ b.bp("/Groups/CreateGroup");
36
+ const query = (0, smithy_client_1.map)({
37
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
38
+ });
39
+ let body;
40
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
41
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
42
+ GroupScope: [],
43
+ GroupType: [],
44
+ OtherAttributes: (_) => (0, smithy_client_1._json)(_),
45
+ SAMAccountName: [],
46
+ }));
47
+ b.m("POST").h(headers).q(query).b(body);
48
+ return b.build();
49
+ };
50
+ exports.se_CreateGroupCommand = se_CreateGroupCommand;
51
+ const se_CreateUserCommand = async (input, context) => {
52
+ const b = (0, core_2.requestBuilder)(input, context);
53
+ const headers = {
54
+ "content-type": "application/json",
55
+ };
56
+ b.bp("/Users/CreateUser");
57
+ const query = (0, smithy_client_1.map)({
58
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
59
+ });
60
+ let body;
61
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
62
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
63
+ EmailAddress: [],
64
+ GivenName: [],
65
+ OtherAttributes: (_) => (0, smithy_client_1._json)(_),
66
+ SAMAccountName: [],
67
+ Surname: [],
68
+ }));
69
+ b.m("POST").h(headers).q(query).b(body);
70
+ return b.build();
71
+ };
72
+ exports.se_CreateUserCommand = se_CreateUserCommand;
73
+ const se_DeleteGroupCommand = async (input, context) => {
74
+ const b = (0, core_2.requestBuilder)(input, context);
75
+ const headers = {
76
+ "content-type": "application/json",
77
+ };
78
+ b.bp("/Groups/DeleteGroup");
79
+ const query = (0, smithy_client_1.map)({
80
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
81
+ });
82
+ let body;
83
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
84
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
85
+ SAMAccountName: [],
86
+ }));
87
+ b.m("POST").h(headers).q(query).b(body);
88
+ return b.build();
89
+ };
90
+ exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
91
+ const se_DeleteUserCommand = async (input, context) => {
92
+ const b = (0, core_2.requestBuilder)(input, context);
93
+ const headers = {
94
+ "content-type": "application/json",
95
+ };
96
+ b.bp("/Users/DeleteUser");
97
+ const query = (0, smithy_client_1.map)({
98
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
99
+ });
100
+ let body;
101
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
102
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
103
+ SAMAccountName: [],
104
+ }));
105
+ b.m("POST").h(headers).q(query).b(body);
106
+ return b.build();
107
+ };
108
+ exports.se_DeleteUserCommand = se_DeleteUserCommand;
109
+ const se_DescribeGroupCommand = async (input, context) => {
110
+ const b = (0, core_2.requestBuilder)(input, context);
111
+ const headers = {
112
+ "content-type": "application/json",
113
+ };
114
+ b.bp("/Groups/DescribeGroup");
115
+ const query = (0, smithy_client_1.map)({
116
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
117
+ });
118
+ let body;
119
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
120
+ OtherAttributes: (_) => (0, smithy_client_1._json)(_),
121
+ Realm: [],
122
+ SAMAccountName: [],
123
+ }));
124
+ b.m("POST").h(headers).q(query).b(body);
125
+ return b.build();
126
+ };
127
+ exports.se_DescribeGroupCommand = se_DescribeGroupCommand;
128
+ const se_DescribeUserCommand = async (input, context) => {
129
+ const b = (0, core_2.requestBuilder)(input, context);
130
+ const headers = {
131
+ "content-type": "application/json",
132
+ };
133
+ b.bp("/Users/DescribeUser");
134
+ const query = (0, smithy_client_1.map)({
135
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
136
+ });
137
+ let body;
138
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
139
+ OtherAttributes: (_) => (0, smithy_client_1._json)(_),
140
+ Realm: [],
141
+ SAMAccountName: [],
142
+ }));
143
+ b.m("POST").h(headers).q(query).b(body);
144
+ return b.build();
145
+ };
146
+ exports.se_DescribeUserCommand = se_DescribeUserCommand;
147
+ const se_DisableUserCommand = async (input, context) => {
148
+ const b = (0, core_2.requestBuilder)(input, context);
149
+ const headers = {
150
+ "content-type": "application/json",
151
+ };
152
+ b.bp("/Users/DisableUser");
153
+ const query = (0, smithy_client_1.map)({
154
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
155
+ });
156
+ let body;
157
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
158
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
159
+ SAMAccountName: [],
160
+ }));
161
+ b.m("POST").h(headers).q(query).b(body);
162
+ return b.build();
163
+ };
164
+ exports.se_DisableUserCommand = se_DisableUserCommand;
165
+ const se_ListGroupMembersCommand = async (input, context) => {
166
+ const b = (0, core_2.requestBuilder)(input, context);
167
+ const headers = {
168
+ "content-type": "application/json",
169
+ };
170
+ b.bp("/GroupMemberships/ListGroupMembers");
171
+ const query = (0, smithy_client_1.map)({
172
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
173
+ });
174
+ let body;
175
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
176
+ MaxResults: [],
177
+ MemberRealm: [],
178
+ NextToken: [],
179
+ Realm: [],
180
+ SAMAccountName: [],
181
+ }));
182
+ b.m("POST").h(headers).q(query).b(body);
183
+ return b.build();
184
+ };
185
+ exports.se_ListGroupMembersCommand = se_ListGroupMembersCommand;
186
+ const se_ListGroupsCommand = async (input, context) => {
187
+ const b = (0, core_2.requestBuilder)(input, context);
188
+ const headers = {
189
+ "content-type": "application/json",
190
+ };
191
+ b.bp("/Groups/ListGroups");
192
+ const query = (0, smithy_client_1.map)({
193
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
194
+ });
195
+ let body;
196
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
197
+ MaxResults: [],
198
+ NextToken: [],
199
+ Realm: [],
200
+ }));
201
+ b.m("POST").h(headers).q(query).b(body);
202
+ return b.build();
203
+ };
204
+ exports.se_ListGroupsCommand = se_ListGroupsCommand;
205
+ const se_ListGroupsForMemberCommand = async (input, context) => {
206
+ const b = (0, core_2.requestBuilder)(input, context);
207
+ const headers = {
208
+ "content-type": "application/json",
209
+ };
210
+ b.bp("/GroupMemberships/ListGroupsForMember");
211
+ const query = (0, smithy_client_1.map)({
212
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
213
+ });
214
+ let body;
215
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
216
+ MaxResults: [],
217
+ MemberRealm: [],
218
+ NextToken: [],
219
+ Realm: [],
220
+ SAMAccountName: [],
221
+ }));
222
+ b.m("POST").h(headers).q(query).b(body);
223
+ return b.build();
224
+ };
225
+ exports.se_ListGroupsForMemberCommand = se_ListGroupsForMemberCommand;
226
+ const se_ListUsersCommand = async (input, context) => {
227
+ const b = (0, core_2.requestBuilder)(input, context);
228
+ const headers = {
229
+ "content-type": "application/json",
230
+ };
231
+ b.bp("/Users/ListUsers");
232
+ const query = (0, smithy_client_1.map)({
233
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
234
+ });
235
+ let body;
236
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
237
+ MaxResults: [],
238
+ NextToken: [],
239
+ Realm: [],
240
+ }));
241
+ b.m("POST").h(headers).q(query).b(body);
242
+ return b.build();
243
+ };
244
+ exports.se_ListUsersCommand = se_ListUsersCommand;
245
+ const se_RemoveGroupMemberCommand = async (input, context) => {
246
+ const b = (0, core_2.requestBuilder)(input, context);
247
+ const headers = {
248
+ "content-type": "application/json",
249
+ };
250
+ b.bp("/GroupMemberships/RemoveGroupMember");
251
+ const query = (0, smithy_client_1.map)({
252
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
253
+ });
254
+ let body;
255
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
256
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
257
+ GroupName: [],
258
+ MemberName: [],
259
+ MemberRealm: [],
260
+ }));
261
+ b.m("POST").h(headers).q(query).b(body);
262
+ return b.build();
263
+ };
264
+ exports.se_RemoveGroupMemberCommand = se_RemoveGroupMemberCommand;
265
+ const se_SearchGroupsCommand = async (input, context) => {
266
+ const b = (0, core_2.requestBuilder)(input, context);
267
+ const headers = {
268
+ "content-type": "application/json",
269
+ };
270
+ b.bp("/Groups/SearchGroups");
271
+ const query = (0, smithy_client_1.map)({
272
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
273
+ });
274
+ let body;
275
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
276
+ MaxResults: [],
277
+ NextToken: [],
278
+ Realm: [],
279
+ SearchAttributes: (_) => (0, smithy_client_1._json)(_),
280
+ SearchString: [],
281
+ }));
282
+ b.m("POST").h(headers).q(query).b(body);
283
+ return b.build();
284
+ };
285
+ exports.se_SearchGroupsCommand = se_SearchGroupsCommand;
286
+ const se_SearchUsersCommand = async (input, context) => {
287
+ const b = (0, core_2.requestBuilder)(input, context);
288
+ const headers = {
289
+ "content-type": "application/json",
290
+ };
291
+ b.bp("/Users/SearchUsers");
292
+ const query = (0, smithy_client_1.map)({
293
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
294
+ });
295
+ let body;
296
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
297
+ MaxResults: [],
298
+ NextToken: [],
299
+ Realm: [],
300
+ SearchAttributes: (_) => (0, smithy_client_1._json)(_),
301
+ SearchString: [],
302
+ }));
303
+ b.m("POST").h(headers).q(query).b(body);
304
+ return b.build();
305
+ };
306
+ exports.se_SearchUsersCommand = se_SearchUsersCommand;
307
+ const se_UpdateGroupCommand = async (input, context) => {
308
+ const b = (0, core_2.requestBuilder)(input, context);
309
+ const headers = {
310
+ "content-type": "application/json",
311
+ };
312
+ b.bp("/Groups/UpdateGroup");
313
+ const query = (0, smithy_client_1.map)({
314
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
315
+ });
316
+ let body;
317
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
318
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
319
+ GroupScope: [],
320
+ GroupType: [],
321
+ OtherAttributes: (_) => (0, smithy_client_1._json)(_),
322
+ SAMAccountName: [],
323
+ UpdateType: [],
324
+ }));
325
+ b.m("POST").h(headers).q(query).b(body);
326
+ return b.build();
327
+ };
328
+ exports.se_UpdateGroupCommand = se_UpdateGroupCommand;
329
+ const se_UpdateUserCommand = async (input, context) => {
330
+ const b = (0, core_2.requestBuilder)(input, context);
331
+ const headers = {
332
+ "content-type": "application/json",
333
+ };
334
+ b.bp("/Users/UpdateUser");
335
+ const query = (0, smithy_client_1.map)({
336
+ [_DI]: [, (0, smithy_client_1.expectNonNull)(input[_DI], `DirectoryId`)],
337
+ });
338
+ let body;
339
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
340
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
341
+ EmailAddress: [],
342
+ GivenName: [],
343
+ OtherAttributes: (_) => (0, smithy_client_1._json)(_),
344
+ SAMAccountName: [],
345
+ Surname: [],
346
+ UpdateType: [],
347
+ }));
348
+ b.m("POST").h(headers).q(query).b(body);
349
+ return b.build();
350
+ };
351
+ exports.se_UpdateUserCommand = se_UpdateUserCommand;
352
+ const de_AddGroupMemberCommand = async (output, context) => {
353
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
354
+ return de_CommandError(output, context);
355
+ }
356
+ const contents = (0, smithy_client_1.map)({
357
+ $metadata: deserializeMetadata(output),
358
+ });
359
+ await (0, smithy_client_1.collectBody)(output.body, context);
360
+ return contents;
361
+ };
362
+ exports.de_AddGroupMemberCommand = de_AddGroupMemberCommand;
363
+ const de_CreateGroupCommand = async (output, context) => {
364
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
365
+ return de_CommandError(output, context);
366
+ }
367
+ const contents = (0, smithy_client_1.map)({
368
+ $metadata: deserializeMetadata(output),
369
+ });
370
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
371
+ const doc = (0, smithy_client_1.take)(data, {
372
+ DirectoryId: smithy_client_1.expectString,
373
+ SAMAccountName: smithy_client_1.expectString,
374
+ SID: smithy_client_1.expectString,
375
+ });
376
+ Object.assign(contents, doc);
377
+ return contents;
378
+ };
379
+ exports.de_CreateGroupCommand = de_CreateGroupCommand;
380
+ const de_CreateUserCommand = async (output, context) => {
381
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
382
+ return de_CommandError(output, context);
383
+ }
384
+ const contents = (0, smithy_client_1.map)({
385
+ $metadata: deserializeMetadata(output),
386
+ });
387
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
388
+ const doc = (0, smithy_client_1.take)(data, {
389
+ DirectoryId: smithy_client_1.expectString,
390
+ SAMAccountName: smithy_client_1.expectString,
391
+ SID: smithy_client_1.expectString,
392
+ });
393
+ Object.assign(contents, doc);
394
+ return contents;
395
+ };
396
+ exports.de_CreateUserCommand = de_CreateUserCommand;
397
+ const de_DeleteGroupCommand = async (output, context) => {
398
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
399
+ return de_CommandError(output, context);
400
+ }
401
+ const contents = (0, smithy_client_1.map)({
402
+ $metadata: deserializeMetadata(output),
403
+ });
404
+ await (0, smithy_client_1.collectBody)(output.body, context);
405
+ return contents;
406
+ };
407
+ exports.de_DeleteGroupCommand = de_DeleteGroupCommand;
408
+ const de_DeleteUserCommand = async (output, context) => {
409
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
410
+ return de_CommandError(output, context);
411
+ }
412
+ const contents = (0, smithy_client_1.map)({
413
+ $metadata: deserializeMetadata(output),
414
+ });
415
+ await (0, smithy_client_1.collectBody)(output.body, context);
416
+ return contents;
417
+ };
418
+ exports.de_DeleteUserCommand = de_DeleteUserCommand;
419
+ const de_DescribeGroupCommand = async (output, context) => {
420
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
421
+ return de_CommandError(output, context);
422
+ }
423
+ const contents = (0, smithy_client_1.map)({
424
+ $metadata: deserializeMetadata(output),
425
+ });
426
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
427
+ const doc = (0, smithy_client_1.take)(data, {
428
+ DirectoryId: smithy_client_1.expectString,
429
+ DistinguishedName: smithy_client_1.expectString,
430
+ GroupScope: smithy_client_1.expectString,
431
+ GroupType: smithy_client_1.expectString,
432
+ OtherAttributes: smithy_client_1._json,
433
+ Realm: smithy_client_1.expectString,
434
+ SAMAccountName: smithy_client_1.expectString,
435
+ SID: smithy_client_1.expectString,
436
+ });
437
+ Object.assign(contents, doc);
438
+ return contents;
439
+ };
440
+ exports.de_DescribeGroupCommand = de_DescribeGroupCommand;
441
+ const de_DescribeUserCommand = async (output, context) => {
442
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
443
+ return de_CommandError(output, context);
444
+ }
445
+ const contents = (0, smithy_client_1.map)({
446
+ $metadata: deserializeMetadata(output),
447
+ });
448
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
449
+ const doc = (0, smithy_client_1.take)(data, {
450
+ DirectoryId: smithy_client_1.expectString,
451
+ DistinguishedName: smithy_client_1.expectString,
452
+ EmailAddress: smithy_client_1.expectString,
453
+ Enabled: smithy_client_1.expectBoolean,
454
+ GivenName: smithy_client_1.expectString,
455
+ OtherAttributes: smithy_client_1._json,
456
+ Realm: smithy_client_1.expectString,
457
+ SAMAccountName: smithy_client_1.expectString,
458
+ SID: smithy_client_1.expectString,
459
+ Surname: smithy_client_1.expectString,
460
+ UserPrincipalName: smithy_client_1.expectString,
461
+ });
462
+ Object.assign(contents, doc);
463
+ return contents;
464
+ };
465
+ exports.de_DescribeUserCommand = de_DescribeUserCommand;
466
+ const de_DisableUserCommand = async (output, context) => {
467
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
468
+ return de_CommandError(output, context);
469
+ }
470
+ const contents = (0, smithy_client_1.map)({
471
+ $metadata: deserializeMetadata(output),
472
+ });
473
+ await (0, smithy_client_1.collectBody)(output.body, context);
474
+ return contents;
475
+ };
476
+ exports.de_DisableUserCommand = de_DisableUserCommand;
477
+ const de_ListGroupMembersCommand = async (output, context) => {
478
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
479
+ return de_CommandError(output, context);
480
+ }
481
+ const contents = (0, smithy_client_1.map)({
482
+ $metadata: deserializeMetadata(output),
483
+ });
484
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
485
+ const doc = (0, smithy_client_1.take)(data, {
486
+ DirectoryId: smithy_client_1.expectString,
487
+ MemberRealm: smithy_client_1.expectString,
488
+ Members: smithy_client_1._json,
489
+ NextToken: smithy_client_1.expectString,
490
+ Realm: smithy_client_1.expectString,
491
+ });
492
+ Object.assign(contents, doc);
493
+ return contents;
494
+ };
495
+ exports.de_ListGroupMembersCommand = de_ListGroupMembersCommand;
496
+ const de_ListGroupsCommand = async (output, context) => {
497
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
498
+ return de_CommandError(output, context);
499
+ }
500
+ const contents = (0, smithy_client_1.map)({
501
+ $metadata: deserializeMetadata(output),
502
+ });
503
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
504
+ const doc = (0, smithy_client_1.take)(data, {
505
+ DirectoryId: smithy_client_1.expectString,
506
+ Groups: smithy_client_1._json,
507
+ NextToken: smithy_client_1.expectString,
508
+ Realm: smithy_client_1.expectString,
509
+ });
510
+ Object.assign(contents, doc);
511
+ return contents;
512
+ };
513
+ exports.de_ListGroupsCommand = de_ListGroupsCommand;
514
+ const de_ListGroupsForMemberCommand = async (output, context) => {
515
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
516
+ return de_CommandError(output, context);
517
+ }
518
+ const contents = (0, smithy_client_1.map)({
519
+ $metadata: deserializeMetadata(output),
520
+ });
521
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
522
+ const doc = (0, smithy_client_1.take)(data, {
523
+ DirectoryId: smithy_client_1.expectString,
524
+ Groups: smithy_client_1._json,
525
+ MemberRealm: smithy_client_1.expectString,
526
+ NextToken: smithy_client_1.expectString,
527
+ Realm: smithy_client_1.expectString,
528
+ });
529
+ Object.assign(contents, doc);
530
+ return contents;
531
+ };
532
+ exports.de_ListGroupsForMemberCommand = de_ListGroupsForMemberCommand;
533
+ const de_ListUsersCommand = async (output, context) => {
534
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
535
+ return de_CommandError(output, context);
536
+ }
537
+ const contents = (0, smithy_client_1.map)({
538
+ $metadata: deserializeMetadata(output),
539
+ });
540
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
541
+ const doc = (0, smithy_client_1.take)(data, {
542
+ DirectoryId: smithy_client_1.expectString,
543
+ NextToken: smithy_client_1.expectString,
544
+ Realm: smithy_client_1.expectString,
545
+ Users: smithy_client_1._json,
546
+ });
547
+ Object.assign(contents, doc);
548
+ return contents;
549
+ };
550
+ exports.de_ListUsersCommand = de_ListUsersCommand;
551
+ const de_RemoveGroupMemberCommand = async (output, context) => {
552
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
553
+ return de_CommandError(output, context);
554
+ }
555
+ const contents = (0, smithy_client_1.map)({
556
+ $metadata: deserializeMetadata(output),
557
+ });
558
+ await (0, smithy_client_1.collectBody)(output.body, context);
559
+ return contents;
560
+ };
561
+ exports.de_RemoveGroupMemberCommand = de_RemoveGroupMemberCommand;
562
+ const de_SearchGroupsCommand = async (output, context) => {
563
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
564
+ return de_CommandError(output, context);
565
+ }
566
+ const contents = (0, smithy_client_1.map)({
567
+ $metadata: deserializeMetadata(output),
568
+ });
569
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
570
+ const doc = (0, smithy_client_1.take)(data, {
571
+ DirectoryId: smithy_client_1.expectString,
572
+ Groups: smithy_client_1._json,
573
+ NextToken: smithy_client_1.expectString,
574
+ Realm: smithy_client_1.expectString,
575
+ });
576
+ Object.assign(contents, doc);
577
+ return contents;
578
+ };
579
+ exports.de_SearchGroupsCommand = de_SearchGroupsCommand;
580
+ const de_SearchUsersCommand = async (output, context) => {
581
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
582
+ return de_CommandError(output, context);
583
+ }
584
+ const contents = (0, smithy_client_1.map)({
585
+ $metadata: deserializeMetadata(output),
586
+ });
587
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
588
+ const doc = (0, smithy_client_1.take)(data, {
589
+ DirectoryId: smithy_client_1.expectString,
590
+ NextToken: smithy_client_1.expectString,
591
+ Realm: smithy_client_1.expectString,
592
+ Users: smithy_client_1._json,
593
+ });
594
+ Object.assign(contents, doc);
595
+ return contents;
596
+ };
597
+ exports.de_SearchUsersCommand = de_SearchUsersCommand;
598
+ const de_UpdateGroupCommand = async (output, context) => {
599
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
600
+ return de_CommandError(output, context);
601
+ }
602
+ const contents = (0, smithy_client_1.map)({
603
+ $metadata: deserializeMetadata(output),
604
+ });
605
+ await (0, smithy_client_1.collectBody)(output.body, context);
606
+ return contents;
607
+ };
608
+ exports.de_UpdateGroupCommand = de_UpdateGroupCommand;
609
+ const de_UpdateUserCommand = async (output, context) => {
610
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
611
+ return de_CommandError(output, context);
612
+ }
613
+ const contents = (0, smithy_client_1.map)({
614
+ $metadata: deserializeMetadata(output),
615
+ });
616
+ await (0, smithy_client_1.collectBody)(output.body, context);
617
+ return contents;
618
+ };
619
+ exports.de_UpdateUserCommand = de_UpdateUserCommand;
620
+ const de_CommandError = async (output, context) => {
621
+ const parsedOutput = {
622
+ ...output,
623
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context),
624
+ };
625
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
626
+ switch (errorCode) {
627
+ case "AccessDeniedException":
628
+ case "com.amazonaws.directoryservicedata#AccessDeniedException":
629
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
630
+ case "ConflictException":
631
+ case "com.amazonaws.directoryservicedata#ConflictException":
632
+ throw await de_ConflictExceptionRes(parsedOutput, context);
633
+ case "DirectoryUnavailableException":
634
+ case "com.amazonaws.directoryservicedata#DirectoryUnavailableException":
635
+ throw await de_DirectoryUnavailableExceptionRes(parsedOutput, context);
636
+ case "InternalServerException":
637
+ case "com.amazonaws.directoryservicedata#InternalServerException":
638
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
639
+ case "ResourceNotFoundException":
640
+ case "com.amazonaws.directoryservicedata#ResourceNotFoundException":
641
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
642
+ case "ThrottlingException":
643
+ case "com.amazonaws.directoryservicedata#ThrottlingException":
644
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
645
+ case "ValidationException":
646
+ case "com.amazonaws.directoryservicedata#ValidationException":
647
+ throw await de_ValidationExceptionRes(parsedOutput, context);
648
+ default:
649
+ const parsedBody = parsedOutput.body;
650
+ return throwDefaultError({
651
+ output,
652
+ parsedBody,
653
+ errorCode,
654
+ });
655
+ }
656
+ };
657
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(DirectoryServiceDataServiceException_1.DirectoryServiceDataServiceException);
658
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
659
+ const contents = (0, smithy_client_1.map)({});
660
+ const data = parsedOutput.body;
661
+ const doc = (0, smithy_client_1.take)(data, {
662
+ Message: smithy_client_1.expectString,
663
+ Reason: smithy_client_1.expectString,
664
+ });
665
+ Object.assign(contents, doc);
666
+ const exception = new models_0_1.AccessDeniedException({
667
+ $metadata: deserializeMetadata(parsedOutput),
668
+ ...contents,
669
+ });
670
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
671
+ };
672
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
673
+ const contents = (0, smithy_client_1.map)({});
674
+ const data = parsedOutput.body;
675
+ const doc = (0, smithy_client_1.take)(data, {
676
+ Message: smithy_client_1.expectString,
677
+ });
678
+ Object.assign(contents, doc);
679
+ const exception = new models_0_1.ConflictException({
680
+ $metadata: deserializeMetadata(parsedOutput),
681
+ ...contents,
682
+ });
683
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
684
+ };
685
+ const de_DirectoryUnavailableExceptionRes = async (parsedOutput, context) => {
686
+ const contents = (0, smithy_client_1.map)({});
687
+ const data = parsedOutput.body;
688
+ const doc = (0, smithy_client_1.take)(data, {
689
+ Message: smithy_client_1.expectString,
690
+ Reason: smithy_client_1.expectString,
691
+ });
692
+ Object.assign(contents, doc);
693
+ const exception = new models_0_1.DirectoryUnavailableException({
694
+ $metadata: deserializeMetadata(parsedOutput),
695
+ ...contents,
696
+ });
697
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
698
+ };
699
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
700
+ const contents = (0, smithy_client_1.map)({});
701
+ const data = parsedOutput.body;
702
+ const doc = (0, smithy_client_1.take)(data, {
703
+ Message: smithy_client_1.expectString,
704
+ });
705
+ Object.assign(contents, doc);
706
+ const exception = new models_0_1.InternalServerException({
707
+ $metadata: deserializeMetadata(parsedOutput),
708
+ ...contents,
709
+ });
710
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
711
+ };
712
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
713
+ const contents = (0, smithy_client_1.map)({});
714
+ const data = parsedOutput.body;
715
+ const doc = (0, smithy_client_1.take)(data, {
716
+ Message: smithy_client_1.expectString,
717
+ });
718
+ Object.assign(contents, doc);
719
+ const exception = new models_0_1.ResourceNotFoundException({
720
+ $metadata: deserializeMetadata(parsedOutput),
721
+ ...contents,
722
+ });
723
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
724
+ };
725
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
726
+ const contents = (0, smithy_client_1.map)({
727
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
728
+ });
729
+ const data = parsedOutput.body;
730
+ const doc = (0, smithy_client_1.take)(data, {
731
+ Message: smithy_client_1.expectString,
732
+ });
733
+ Object.assign(contents, doc);
734
+ const exception = new models_0_1.ThrottlingException({
735
+ $metadata: deserializeMetadata(parsedOutput),
736
+ ...contents,
737
+ });
738
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
739
+ };
740
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
741
+ const contents = (0, smithy_client_1.map)({});
742
+ const data = parsedOutput.body;
743
+ const doc = (0, smithy_client_1.take)(data, {
744
+ Message: smithy_client_1.expectString,
745
+ Reason: smithy_client_1.expectString,
746
+ });
747
+ Object.assign(contents, doc);
748
+ const exception = new models_0_1.ValidationException({
749
+ $metadata: deserializeMetadata(parsedOutput),
750
+ ...contents,
751
+ });
752
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
753
+ };
754
+ const deserializeMetadata = (output) => ({
755
+ httpStatusCode: output.statusCode,
756
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
757
+ extendedRequestId: output.headers["x-amz-id-2"],
758
+ cfId: output.headers["x-amz-cf-id"],
759
+ });
760
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
761
+ const isSerializableHeaderValue = (value) => value !== undefined &&
762
+ value !== null &&
763
+ value !== "" &&
764
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
765
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
766
+ const _DI = "DirectoryId";
767
+ const _RAS = "RetryAfterSeconds";
768
+ const _ra = "retry-after";