@aws-sdk/client-workdocs 3.474.0 → 3.477.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.
@@ -1,79 +1,55 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { ConcurrentModificationException, ConflictingOperationException, CustomMetadataLimitExceededException, DeactivatingLastSystemUserException, DocumentLockedForCommentsException, DraftUploadOutOfSyncException, EntityAlreadyExistsException, EntityNotExistsException, FailedDependencyException, IllegalUserStateException, InvalidArgumentException, InvalidCommentOperationException, InvalidOperationException, InvalidPasswordException, LimitExceededException, ProhibitedStateException, RequestedEntityTooLargeException, ResourceAlreadyCheckedOutException, ServiceUnavailableException, StorageLimitExceededException, StorageLimitWillExceedException, TooManyLabelsException, TooManySubscriptionsException, UnauthorizedOperationException, UnauthorizedResourceAccessException, } from "../models/models_0";
4
4
  import { WorkDocsServiceException as __BaseException } from "../models/WorkDocsServiceException";
5
5
  export const se_AbortDocumentVersionUploadCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = map({}, isSerializableHeaderValue, {
8
- authentication: input.AuthenticationToken,
8
+ [_a]: input[_AT],
9
9
  });
10
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
11
- "/api/v1/documents/{DocumentId}/versions/{VersionId}";
12
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
13
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
10
+ b.bp("/api/v1/documents/{DocumentId}/versions/{VersionId}");
11
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
12
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
14
13
  let body;
15
- return new __HttpRequest({
16
- protocol,
17
- hostname,
18
- port,
19
- method: "DELETE",
20
- headers,
21
- path: resolvedPath,
22
- body,
23
- });
14
+ b.m("DELETE").h(headers).b(body);
15
+ return b.build();
24
16
  };
25
17
  export const se_ActivateUserCommand = async (input, context) => {
26
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
18
+ const b = rb(input, context);
27
19
  const headers = map({}, isSerializableHeaderValue, {
28
- authentication: input.AuthenticationToken,
20
+ [_a]: input[_AT],
29
21
  });
30
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users/{UserId}/activation";
31
- resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
22
+ b.bp("/api/v1/users/{UserId}/activation");
23
+ b.p("UserId", () => input.UserId, "{UserId}", false);
32
24
  let body;
33
- return new __HttpRequest({
34
- protocol,
35
- hostname,
36
- port,
37
- method: "POST",
38
- headers,
39
- path: resolvedPath,
40
- body,
41
- });
25
+ b.m("POST").h(headers).b(body);
26
+ return b.build();
42
27
  };
43
28
  export const se_AddResourcePermissionsCommand = async (input, context) => {
44
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = rb(input, context);
45
30
  const headers = map({}, isSerializableHeaderValue, {
46
31
  "content-type": "application/json",
47
- authentication: input.AuthenticationToken,
32
+ [_a]: input[_AT],
48
33
  });
49
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
50
- "/api/v1/resources/{ResourceId}/permissions";
51
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
34
+ b.bp("/api/v1/resources/{ResourceId}/permissions");
35
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
52
36
  let body;
53
37
  body = JSON.stringify(take(input, {
54
38
  NotificationOptions: (_) => _json(_),
55
39
  Principals: (_) => _json(_),
56
40
  }));
57
- return new __HttpRequest({
58
- protocol,
59
- hostname,
60
- port,
61
- method: "POST",
62
- headers,
63
- path: resolvedPath,
64
- body,
65
- });
41
+ b.m("POST").h(headers).b(body);
42
+ return b.build();
66
43
  };
67
44
  export const se_CreateCommentCommand = async (input, context) => {
68
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = rb(input, context);
69
46
  const headers = map({}, isSerializableHeaderValue, {
70
47
  "content-type": "application/json",
71
- authentication: input.AuthenticationToken,
48
+ [_a]: input[_AT],
72
49
  });
73
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
74
- "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment";
75
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
76
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
50
+ b.bp("/api/v1/documents/{DocumentId}/versions/{VersionId}/comment");
51
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
52
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
77
53
  let body;
78
54
  body = JSON.stringify(take(input, {
79
55
  NotifyCollaborators: [],
@@ -82,118 +58,80 @@ export const se_CreateCommentCommand = async (input, context) => {
82
58
  ThreadId: [],
83
59
  Visibility: [],
84
60
  }));
85
- return new __HttpRequest({
86
- protocol,
87
- hostname,
88
- port,
89
- method: "POST",
90
- headers,
91
- path: resolvedPath,
92
- body,
93
- });
61
+ b.m("POST").h(headers).b(body);
62
+ return b.build();
94
63
  };
95
64
  export const se_CreateCustomMetadataCommand = async (input, context) => {
96
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
65
+ const b = rb(input, context);
97
66
  const headers = map({}, isSerializableHeaderValue, {
98
67
  "content-type": "application/json",
99
- authentication: input.AuthenticationToken,
68
+ [_a]: input[_AT],
100
69
  });
101
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
102
- "/api/v1/resources/{ResourceId}/customMetadata";
103
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
70
+ b.bp("/api/v1/resources/{ResourceId}/customMetadata");
71
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
104
72
  const query = map({
105
- versionid: [, input.VersionId],
73
+ [_v]: [, input[_VI]],
106
74
  });
107
75
  let body;
108
76
  body = JSON.stringify(take(input, {
109
77
  CustomMetadata: (_) => _json(_),
110
78
  }));
111
- return new __HttpRequest({
112
- protocol,
113
- hostname,
114
- port,
115
- method: "PUT",
116
- headers,
117
- path: resolvedPath,
118
- query,
119
- body,
120
- });
79
+ b.m("PUT").h(headers).q(query).b(body);
80
+ return b.build();
121
81
  };
122
82
  export const se_CreateFolderCommand = async (input, context) => {
123
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = rb(input, context);
124
84
  const headers = map({}, isSerializableHeaderValue, {
125
85
  "content-type": "application/json",
126
- authentication: input.AuthenticationToken,
86
+ [_a]: input[_AT],
127
87
  });
128
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders";
88
+ b.bp("/api/v1/folders");
129
89
  let body;
130
90
  body = JSON.stringify(take(input, {
131
91
  Name: [],
132
92
  ParentFolderId: [],
133
93
  }));
134
- return new __HttpRequest({
135
- protocol,
136
- hostname,
137
- port,
138
- method: "POST",
139
- headers,
140
- path: resolvedPath,
141
- body,
142
- });
94
+ b.m("POST").h(headers).b(body);
95
+ return b.build();
143
96
  };
144
97
  export const se_CreateLabelsCommand = async (input, context) => {
145
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
146
99
  const headers = map({}, isSerializableHeaderValue, {
147
100
  "content-type": "application/json",
148
- authentication: input.AuthenticationToken,
101
+ [_a]: input[_AT],
149
102
  });
150
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/resources/{ResourceId}/labels";
151
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
103
+ b.bp("/api/v1/resources/{ResourceId}/labels");
104
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
152
105
  let body;
153
106
  body = JSON.stringify(take(input, {
154
107
  Labels: (_) => _json(_),
155
108
  }));
156
- return new __HttpRequest({
157
- protocol,
158
- hostname,
159
- port,
160
- method: "PUT",
161
- headers,
162
- path: resolvedPath,
163
- body,
164
- });
109
+ b.m("PUT").h(headers).b(body);
110
+ return b.build();
165
111
  };
166
112
  export const se_CreateNotificationSubscriptionCommand = async (input, context) => {
167
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = rb(input, context);
168
114
  const headers = {
169
115
  "content-type": "application/json",
170
116
  };
171
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
172
- "/api/v1/organizations/{OrganizationId}/subscriptions";
173
- resolvedPath = __resolvedPath(resolvedPath, input, "OrganizationId", () => input.OrganizationId, "{OrganizationId}", false);
117
+ b.bp("/api/v1/organizations/{OrganizationId}/subscriptions");
118
+ b.p("OrganizationId", () => input.OrganizationId, "{OrganizationId}", false);
174
119
  let body;
175
120
  body = JSON.stringify(take(input, {
176
121
  Endpoint: [],
177
122
  Protocol: [],
178
123
  SubscriptionType: [],
179
124
  }));
180
- return new __HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "POST",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
125
+ b.m("POST").h(headers).b(body);
126
+ return b.build();
189
127
  };
190
128
  export const se_CreateUserCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
192
130
  const headers = map({}, isSerializableHeaderValue, {
193
131
  "content-type": "application/json",
194
- authentication: input.AuthenticationToken,
132
+ [_a]: input[_AT],
195
133
  });
196
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users";
134
+ b.bp("/api/v1/users");
197
135
  let body;
198
136
  body = JSON.stringify(take(input, {
199
137
  EmailAddress: [],
@@ -205,628 +143,395 @@ export const se_CreateUserCommand = async (input, context) => {
205
143
  TimeZoneId: [],
206
144
  Username: [],
207
145
  }));
208
- return new __HttpRequest({
209
- protocol,
210
- hostname,
211
- port,
212
- method: "POST",
213
- headers,
214
- path: resolvedPath,
215
- body,
216
- });
146
+ b.m("POST").h(headers).b(body);
147
+ return b.build();
217
148
  };
218
149
  export const se_DeactivateUserCommand = async (input, context) => {
219
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
150
+ const b = rb(input, context);
220
151
  const headers = map({}, isSerializableHeaderValue, {
221
- authentication: input.AuthenticationToken,
152
+ [_a]: input[_AT],
222
153
  });
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users/{UserId}/activation";
224
- resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
154
+ b.bp("/api/v1/users/{UserId}/activation");
155
+ b.p("UserId", () => input.UserId, "{UserId}", false);
225
156
  let body;
226
- return new __HttpRequest({
227
- protocol,
228
- hostname,
229
- port,
230
- method: "DELETE",
231
- headers,
232
- path: resolvedPath,
233
- body,
234
- });
157
+ b.m("DELETE").h(headers).b(body);
158
+ return b.build();
235
159
  };
236
160
  export const se_DeleteCommentCommand = async (input, context) => {
237
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = rb(input, context);
238
162
  const headers = map({}, isSerializableHeaderValue, {
239
- authentication: input.AuthenticationToken,
163
+ [_a]: input[_AT],
240
164
  });
241
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
242
- "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment/{CommentId}";
243
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
244
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
245
- resolvedPath = __resolvedPath(resolvedPath, input, "CommentId", () => input.CommentId, "{CommentId}", false);
165
+ b.bp("/api/v1/documents/{DocumentId}/versions/{VersionId}/comment/{CommentId}");
166
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
167
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
168
+ b.p("CommentId", () => input.CommentId, "{CommentId}", false);
246
169
  let body;
247
- return new __HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "DELETE",
252
- headers,
253
- path: resolvedPath,
254
- body,
255
- });
170
+ b.m("DELETE").h(headers).b(body);
171
+ return b.build();
256
172
  };
257
173
  export const se_DeleteCustomMetadataCommand = async (input, context) => {
258
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = rb(input, context);
259
175
  const headers = map({}, isSerializableHeaderValue, {
260
- authentication: input.AuthenticationToken,
176
+ [_a]: input[_AT],
261
177
  });
262
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
263
- "/api/v1/resources/{ResourceId}/customMetadata";
264
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
178
+ b.bp("/api/v1/resources/{ResourceId}/customMetadata");
179
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
265
180
  const query = map({
266
- versionId: [, input.VersionId],
267
- keys: [() => input.Keys !== void 0, () => (input.Keys || []).map((_entry) => _entry)],
268
- deleteAll: [() => input.DeleteAll !== void 0, () => input.DeleteAll.toString()],
181
+ [_vI]: [, input[_VI]],
182
+ [_k]: [() => input.Keys !== void 0, () => (input[_K] || []).map((_entry) => _entry)],
183
+ [_dA]: [() => input.DeleteAll !== void 0, () => input[_DA].toString()],
269
184
  });
270
185
  let body;
271
- return new __HttpRequest({
272
- protocol,
273
- hostname,
274
- port,
275
- method: "DELETE",
276
- headers,
277
- path: resolvedPath,
278
- query,
279
- body,
280
- });
186
+ b.m("DELETE").h(headers).q(query).b(body);
187
+ return b.build();
281
188
  };
282
189
  export const se_DeleteDocumentCommand = async (input, context) => {
283
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = rb(input, context);
284
191
  const headers = map({}, isSerializableHeaderValue, {
285
- authentication: input.AuthenticationToken,
192
+ [_a]: input[_AT],
286
193
  });
287
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents/{DocumentId}";
288
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
194
+ b.bp("/api/v1/documents/{DocumentId}");
195
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
289
196
  let body;
290
- return new __HttpRequest({
291
- protocol,
292
- hostname,
293
- port,
294
- method: "DELETE",
295
- headers,
296
- path: resolvedPath,
297
- body,
298
- });
197
+ b.m("DELETE").h(headers).b(body);
198
+ return b.build();
299
199
  };
300
200
  export const se_DeleteDocumentVersionCommand = async (input, context) => {
301
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
201
+ const b = rb(input, context);
302
202
  const headers = map({}, isSerializableHeaderValue, {
303
- authentication: input.AuthenticationToken,
203
+ [_a]: input[_AT],
304
204
  });
305
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
306
- "/api/v1/documentVersions/{DocumentId}/versions/{VersionId}";
307
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
308
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
205
+ b.bp("/api/v1/documentVersions/{DocumentId}/versions/{VersionId}");
206
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
207
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
309
208
  const query = map({
310
- deletePriorVersions: [
311
- __expectNonNull(input.DeletePriorVersions, `DeletePriorVersions`) != null,
312
- () => input.DeletePriorVersions.toString(),
313
- ],
209
+ [_dPV]: [__expectNonNull(input.DeletePriorVersions, `DeletePriorVersions`) != null, () => input[_DPV].toString()],
314
210
  });
315
211
  let body;
316
- return new __HttpRequest({
317
- protocol,
318
- hostname,
319
- port,
320
- method: "DELETE",
321
- headers,
322
- path: resolvedPath,
323
- query,
324
- body,
325
- });
212
+ b.m("DELETE").h(headers).q(query).b(body);
213
+ return b.build();
326
214
  };
327
215
  export const se_DeleteFolderCommand = async (input, context) => {
328
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
216
+ const b = rb(input, context);
329
217
  const headers = map({}, isSerializableHeaderValue, {
330
- authentication: input.AuthenticationToken,
218
+ [_a]: input[_AT],
331
219
  });
332
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}";
333
- resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId, "{FolderId}", false);
220
+ b.bp("/api/v1/folders/{FolderId}");
221
+ b.p("FolderId", () => input.FolderId, "{FolderId}", false);
334
222
  let body;
335
- return new __HttpRequest({
336
- protocol,
337
- hostname,
338
- port,
339
- method: "DELETE",
340
- headers,
341
- path: resolvedPath,
342
- body,
343
- });
223
+ b.m("DELETE").h(headers).b(body);
224
+ return b.build();
344
225
  };
345
226
  export const se_DeleteFolderContentsCommand = async (input, context) => {
346
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
227
+ const b = rb(input, context);
347
228
  const headers = map({}, isSerializableHeaderValue, {
348
- authentication: input.AuthenticationToken,
229
+ [_a]: input[_AT],
349
230
  });
350
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}/contents";
351
- resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId, "{FolderId}", false);
231
+ b.bp("/api/v1/folders/{FolderId}/contents");
232
+ b.p("FolderId", () => input.FolderId, "{FolderId}", false);
352
233
  let body;
353
- return new __HttpRequest({
354
- protocol,
355
- hostname,
356
- port,
357
- method: "DELETE",
358
- headers,
359
- path: resolvedPath,
360
- body,
361
- });
234
+ b.m("DELETE").h(headers).b(body);
235
+ return b.build();
362
236
  };
363
237
  export const se_DeleteLabelsCommand = async (input, context) => {
364
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
238
+ const b = rb(input, context);
365
239
  const headers = map({}, isSerializableHeaderValue, {
366
- authentication: input.AuthenticationToken,
240
+ [_a]: input[_AT],
367
241
  });
368
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/resources/{ResourceId}/labels";
369
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
242
+ b.bp("/api/v1/resources/{ResourceId}/labels");
243
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
370
244
  const query = map({
371
- labels: [() => input.Labels !== void 0, () => (input.Labels || []).map((_entry) => _entry)],
372
- deleteAll: [() => input.DeleteAll !== void 0, () => input.DeleteAll.toString()],
245
+ [_l]: [() => input.Labels !== void 0, () => (input[_L] || []).map((_entry) => _entry)],
246
+ [_dA]: [() => input.DeleteAll !== void 0, () => input[_DA].toString()],
373
247
  });
374
248
  let body;
375
- return new __HttpRequest({
376
- protocol,
377
- hostname,
378
- port,
379
- method: "DELETE",
380
- headers,
381
- path: resolvedPath,
382
- query,
383
- body,
384
- });
249
+ b.m("DELETE").h(headers).q(query).b(body);
250
+ return b.build();
385
251
  };
386
252
  export const se_DeleteNotificationSubscriptionCommand = async (input, context) => {
387
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
253
+ const b = rb(input, context);
388
254
  const headers = {};
389
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
390
- "/api/v1/organizations/{OrganizationId}/subscriptions/{SubscriptionId}";
391
- resolvedPath = __resolvedPath(resolvedPath, input, "SubscriptionId", () => input.SubscriptionId, "{SubscriptionId}", false);
392
- resolvedPath = __resolvedPath(resolvedPath, input, "OrganizationId", () => input.OrganizationId, "{OrganizationId}", false);
255
+ b.bp("/api/v1/organizations/{OrganizationId}/subscriptions/{SubscriptionId}");
256
+ b.p("SubscriptionId", () => input.SubscriptionId, "{SubscriptionId}", false);
257
+ b.p("OrganizationId", () => input.OrganizationId, "{OrganizationId}", false);
393
258
  let body;
394
- return new __HttpRequest({
395
- protocol,
396
- hostname,
397
- port,
398
- method: "DELETE",
399
- headers,
400
- path: resolvedPath,
401
- body,
402
- });
259
+ b.m("DELETE").h(headers).b(body);
260
+ return b.build();
403
261
  };
404
262
  export const se_DeleteUserCommand = async (input, context) => {
405
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
+ const b = rb(input, context);
406
264
  const headers = map({}, isSerializableHeaderValue, {
407
- authentication: input.AuthenticationToken,
265
+ [_a]: input[_AT],
408
266
  });
409
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users/{UserId}";
410
- resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
267
+ b.bp("/api/v1/users/{UserId}");
268
+ b.p("UserId", () => input.UserId, "{UserId}", false);
411
269
  let body;
412
- return new __HttpRequest({
413
- protocol,
414
- hostname,
415
- port,
416
- method: "DELETE",
417
- headers,
418
- path: resolvedPath,
419
- body,
420
- });
270
+ b.m("DELETE").h(headers).b(body);
271
+ return b.build();
421
272
  };
422
273
  export const se_DescribeActivitiesCommand = async (input, context) => {
423
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = rb(input, context);
424
275
  const headers = map({}, isSerializableHeaderValue, {
425
- authentication: input.AuthenticationToken,
276
+ [_a]: input[_AT],
426
277
  });
427
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/activities";
278
+ b.bp("/api/v1/activities");
428
279
  const query = map({
429
- startTime: [
430
- () => input.StartTime !== void 0,
431
- () => (input.StartTime.toISOString().split(".")[0] + "Z").toString(),
432
- ],
433
- endTime: [() => input.EndTime !== void 0, () => (input.EndTime.toISOString().split(".")[0] + "Z").toString()],
434
- organizationId: [, input.OrganizationId],
435
- activityTypes: [, input.ActivityTypes],
436
- resourceId: [, input.ResourceId],
437
- userId: [, input.UserId],
438
- includeIndirectActivities: [
439
- () => input.IncludeIndirectActivities !== void 0,
440
- () => input.IncludeIndirectActivities.toString(),
441
- ],
442
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
443
- marker: [, input.Marker],
280
+ [_sT]: [() => input.StartTime !== void 0, () => (input[_ST].toISOString().split(".")[0] + "Z").toString()],
281
+ [_eT]: [() => input.EndTime !== void 0, () => (input[_ET].toISOString().split(".")[0] + "Z").toString()],
282
+ [_oI]: [, input[_OI]],
283
+ [_aT]: [, input[_ATc]],
284
+ [_rI]: [, input[_RI]],
285
+ [_uI]: [, input[_UI]],
286
+ [_iIA]: [() => input.IncludeIndirectActivities !== void 0, () => input[_IIA].toString()],
287
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
288
+ [_m]: [, input[_M]],
444
289
  });
445
290
  let body;
446
- return new __HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "GET",
451
- headers,
452
- path: resolvedPath,
453
- query,
454
- body,
455
- });
291
+ b.m("GET").h(headers).q(query).b(body);
292
+ return b.build();
456
293
  };
457
294
  export const se_DescribeCommentsCommand = async (input, context) => {
458
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
295
+ const b = rb(input, context);
459
296
  const headers = map({}, isSerializableHeaderValue, {
460
- authentication: input.AuthenticationToken,
297
+ [_a]: input[_AT],
461
298
  });
462
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
463
- "/api/v1/documents/{DocumentId}/versions/{VersionId}/comments";
464
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
465
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
299
+ b.bp("/api/v1/documents/{DocumentId}/versions/{VersionId}/comments");
300
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
301
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
466
302
  const query = map({
467
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
468
- marker: [, input.Marker],
303
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
304
+ [_m]: [, input[_M]],
469
305
  });
470
306
  let body;
471
- return new __HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "GET",
476
- headers,
477
- path: resolvedPath,
478
- query,
479
- body,
480
- });
307
+ b.m("GET").h(headers).q(query).b(body);
308
+ return b.build();
481
309
  };
482
310
  export const se_DescribeDocumentVersionsCommand = async (input, context) => {
483
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
+ const b = rb(input, context);
484
312
  const headers = map({}, isSerializableHeaderValue, {
485
- authentication: input.AuthenticationToken,
313
+ [_a]: input[_AT],
486
314
  });
487
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents/{DocumentId}/versions";
488
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
315
+ b.bp("/api/v1/documents/{DocumentId}/versions");
316
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
489
317
  const query = map({
490
- marker: [, input.Marker],
491
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
492
- include: [, input.Include],
493
- fields: [, input.Fields],
318
+ [_m]: [, input[_M]],
319
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
320
+ [_i]: [, input[_I]],
321
+ [_f]: [, input[_F]],
494
322
  });
495
323
  let body;
496
- return new __HttpRequest({
497
- protocol,
498
- hostname,
499
- port,
500
- method: "GET",
501
- headers,
502
- path: resolvedPath,
503
- query,
504
- body,
505
- });
324
+ b.m("GET").h(headers).q(query).b(body);
325
+ return b.build();
506
326
  };
507
327
  export const se_DescribeFolderContentsCommand = async (input, context) => {
508
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
328
+ const b = rb(input, context);
509
329
  const headers = map({}, isSerializableHeaderValue, {
510
- authentication: input.AuthenticationToken,
330
+ [_a]: input[_AT],
511
331
  });
512
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}/contents";
513
- resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId, "{FolderId}", false);
332
+ b.bp("/api/v1/folders/{FolderId}/contents");
333
+ b.p("FolderId", () => input.FolderId, "{FolderId}", false);
514
334
  const query = map({
515
- sort: [, input.Sort],
516
- order: [, input.Order],
517
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
518
- marker: [, input.Marker],
519
- type: [, input.Type],
520
- include: [, input.Include],
335
+ [_s]: [, input[_S]],
336
+ [_o]: [, input[_O]],
337
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
338
+ [_m]: [, input[_M]],
339
+ [_t]: [, input[_T]],
340
+ [_i]: [, input[_I]],
521
341
  });
522
342
  let body;
523
- return new __HttpRequest({
524
- protocol,
525
- hostname,
526
- port,
527
- method: "GET",
528
- headers,
529
- path: resolvedPath,
530
- query,
531
- body,
532
- });
343
+ b.m("GET").h(headers).q(query).b(body);
344
+ return b.build();
533
345
  };
534
346
  export const se_DescribeGroupsCommand = async (input, context) => {
535
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
347
+ const b = rb(input, context);
536
348
  const headers = map({}, isSerializableHeaderValue, {
537
- authentication: input.AuthenticationToken,
349
+ [_a]: input[_AT],
538
350
  });
539
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/groups";
351
+ b.bp("/api/v1/groups");
540
352
  const query = map({
541
- searchQuery: [, __expectNonNull(input.SearchQuery, `SearchQuery`)],
542
- organizationId: [, input.OrganizationId],
543
- marker: [, input.Marker],
544
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
353
+ [_sQ]: [, __expectNonNull(input[_SQ], `SearchQuery`)],
354
+ [_oI]: [, input[_OI]],
355
+ [_m]: [, input[_M]],
356
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
545
357
  });
546
358
  let body;
547
- return new __HttpRequest({
548
- protocol,
549
- hostname,
550
- port,
551
- method: "GET",
552
- headers,
553
- path: resolvedPath,
554
- query,
555
- body,
556
- });
359
+ b.m("GET").h(headers).q(query).b(body);
360
+ return b.build();
557
361
  };
558
362
  export const se_DescribeNotificationSubscriptionsCommand = async (input, context) => {
559
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
363
+ const b = rb(input, context);
560
364
  const headers = {};
561
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
562
- "/api/v1/organizations/{OrganizationId}/subscriptions";
563
- resolvedPath = __resolvedPath(resolvedPath, input, "OrganizationId", () => input.OrganizationId, "{OrganizationId}", false);
365
+ b.bp("/api/v1/organizations/{OrganizationId}/subscriptions");
366
+ b.p("OrganizationId", () => input.OrganizationId, "{OrganizationId}", false);
564
367
  const query = map({
565
- marker: [, input.Marker],
566
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
368
+ [_m]: [, input[_M]],
369
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
567
370
  });
568
371
  let body;
569
- return new __HttpRequest({
570
- protocol,
571
- hostname,
572
- port,
573
- method: "GET",
574
- headers,
575
- path: resolvedPath,
576
- query,
577
- body,
578
- });
372
+ b.m("GET").h(headers).q(query).b(body);
373
+ return b.build();
579
374
  };
580
375
  export const se_DescribeResourcePermissionsCommand = async (input, context) => {
581
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
376
+ const b = rb(input, context);
582
377
  const headers = map({}, isSerializableHeaderValue, {
583
- authentication: input.AuthenticationToken,
378
+ [_a]: input[_AT],
584
379
  });
585
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
586
- "/api/v1/resources/{ResourceId}/permissions";
587
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
380
+ b.bp("/api/v1/resources/{ResourceId}/permissions");
381
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
588
382
  const query = map({
589
- principalId: [, input.PrincipalId],
590
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
591
- marker: [, input.Marker],
383
+ [_pI]: [, input[_PI]],
384
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
385
+ [_m]: [, input[_M]],
592
386
  });
593
387
  let body;
594
- return new __HttpRequest({
595
- protocol,
596
- hostname,
597
- port,
598
- method: "GET",
599
- headers,
600
- path: resolvedPath,
601
- query,
602
- body,
603
- });
388
+ b.m("GET").h(headers).q(query).b(body);
389
+ return b.build();
604
390
  };
605
391
  export const se_DescribeRootFoldersCommand = async (input, context) => {
606
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
392
+ const b = rb(input, context);
607
393
  const headers = map({}, isSerializableHeaderValue, {
608
- authentication: input.AuthenticationToken,
394
+ [_a]: input[_AT],
609
395
  });
610
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/me/root";
396
+ b.bp("/api/v1/me/root");
611
397
  const query = map({
612
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
613
- marker: [, input.Marker],
398
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
399
+ [_m]: [, input[_M]],
614
400
  });
615
401
  let body;
616
- return new __HttpRequest({
617
- protocol,
618
- hostname,
619
- port,
620
- method: "GET",
621
- headers,
622
- path: resolvedPath,
623
- query,
624
- body,
625
- });
402
+ b.m("GET").h(headers).q(query).b(body);
403
+ return b.build();
626
404
  };
627
405
  export const se_DescribeUsersCommand = async (input, context) => {
628
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
406
+ const b = rb(input, context);
629
407
  const headers = map({}, isSerializableHeaderValue, {
630
- authentication: input.AuthenticationToken,
408
+ [_a]: input[_AT],
631
409
  });
632
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users";
410
+ b.bp("/api/v1/users");
633
411
  const query = map({
634
- organizationId: [, input.OrganizationId],
635
- userIds: [, input.UserIds],
636
- query: [, input.Query],
637
- include: [, input.Include],
638
- order: [, input.Order],
639
- sort: [, input.Sort],
640
- marker: [, input.Marker],
641
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
642
- fields: [, input.Fields],
412
+ [_oI]: [, input[_OI]],
413
+ [_uIs]: [, input[_UIs]],
414
+ [_q]: [, input[_Q]],
415
+ [_i]: [, input[_I]],
416
+ [_o]: [, input[_O]],
417
+ [_s]: [, input[_S]],
418
+ [_m]: [, input[_M]],
419
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
420
+ [_f]: [, input[_F]],
643
421
  });
644
422
  let body;
645
- return new __HttpRequest({
646
- protocol,
647
- hostname,
648
- port,
649
- method: "GET",
650
- headers,
651
- path: resolvedPath,
652
- query,
653
- body,
654
- });
423
+ b.m("GET").h(headers).q(query).b(body);
424
+ return b.build();
655
425
  };
656
426
  export const se_GetCurrentUserCommand = async (input, context) => {
657
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
427
+ const b = rb(input, context);
658
428
  const headers = map({}, isSerializableHeaderValue, {
659
- authentication: input.AuthenticationToken,
429
+ [_a]: input[_AT],
660
430
  });
661
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/me";
431
+ b.bp("/api/v1/me");
662
432
  let body;
663
- return new __HttpRequest({
664
- protocol,
665
- hostname,
666
- port,
667
- method: "GET",
668
- headers,
669
- path: resolvedPath,
670
- body,
671
- });
433
+ b.m("GET").h(headers).b(body);
434
+ return b.build();
672
435
  };
673
436
  export const se_GetDocumentCommand = async (input, context) => {
674
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
437
+ const b = rb(input, context);
675
438
  const headers = map({}, isSerializableHeaderValue, {
676
- authentication: input.AuthenticationToken,
439
+ [_a]: input[_AT],
677
440
  });
678
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents/{DocumentId}";
679
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
441
+ b.bp("/api/v1/documents/{DocumentId}");
442
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
680
443
  const query = map({
681
- includeCustomMetadata: [
682
- () => input.IncludeCustomMetadata !== void 0,
683
- () => input.IncludeCustomMetadata.toString(),
684
- ],
444
+ [_iCM]: [() => input.IncludeCustomMetadata !== void 0, () => input[_ICM].toString()],
685
445
  });
686
446
  let body;
687
- return new __HttpRequest({
688
- protocol,
689
- hostname,
690
- port,
691
- method: "GET",
692
- headers,
693
- path: resolvedPath,
694
- query,
695
- body,
696
- });
447
+ b.m("GET").h(headers).q(query).b(body);
448
+ return b.build();
697
449
  };
698
450
  export const se_GetDocumentPathCommand = async (input, context) => {
699
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
451
+ const b = rb(input, context);
700
452
  const headers = map({}, isSerializableHeaderValue, {
701
- authentication: input.AuthenticationToken,
453
+ [_a]: input[_AT],
702
454
  });
703
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents/{DocumentId}/path";
704
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
455
+ b.bp("/api/v1/documents/{DocumentId}/path");
456
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
705
457
  const query = map({
706
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
707
- fields: [, input.Fields],
708
- marker: [, input.Marker],
458
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
459
+ [_f]: [, input[_F]],
460
+ [_m]: [, input[_M]],
709
461
  });
710
462
  let body;
711
- return new __HttpRequest({
712
- protocol,
713
- hostname,
714
- port,
715
- method: "GET",
716
- headers,
717
- path: resolvedPath,
718
- query,
719
- body,
720
- });
463
+ b.m("GET").h(headers).q(query).b(body);
464
+ return b.build();
721
465
  };
722
466
  export const se_GetDocumentVersionCommand = async (input, context) => {
723
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
467
+ const b = rb(input, context);
724
468
  const headers = map({}, isSerializableHeaderValue, {
725
- authentication: input.AuthenticationToken,
469
+ [_a]: input[_AT],
726
470
  });
727
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
728
- "/api/v1/documents/{DocumentId}/versions/{VersionId}";
729
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
730
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
471
+ b.bp("/api/v1/documents/{DocumentId}/versions/{VersionId}");
472
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
473
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
731
474
  const query = map({
732
- fields: [, input.Fields],
733
- includeCustomMetadata: [
734
- () => input.IncludeCustomMetadata !== void 0,
735
- () => input.IncludeCustomMetadata.toString(),
736
- ],
475
+ [_f]: [, input[_F]],
476
+ [_iCM]: [() => input.IncludeCustomMetadata !== void 0, () => input[_ICM].toString()],
737
477
  });
738
478
  let body;
739
- return new __HttpRequest({
740
- protocol,
741
- hostname,
742
- port,
743
- method: "GET",
744
- headers,
745
- path: resolvedPath,
746
- query,
747
- body,
748
- });
479
+ b.m("GET").h(headers).q(query).b(body);
480
+ return b.build();
749
481
  };
750
482
  export const se_GetFolderCommand = async (input, context) => {
751
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
483
+ const b = rb(input, context);
752
484
  const headers = map({}, isSerializableHeaderValue, {
753
- authentication: input.AuthenticationToken,
485
+ [_a]: input[_AT],
754
486
  });
755
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}";
756
- resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId, "{FolderId}", false);
487
+ b.bp("/api/v1/folders/{FolderId}");
488
+ b.p("FolderId", () => input.FolderId, "{FolderId}", false);
757
489
  const query = map({
758
- includeCustomMetadata: [
759
- () => input.IncludeCustomMetadata !== void 0,
760
- () => input.IncludeCustomMetadata.toString(),
761
- ],
490
+ [_iCM]: [() => input.IncludeCustomMetadata !== void 0, () => input[_ICM].toString()],
762
491
  });
763
492
  let body;
764
- return new __HttpRequest({
765
- protocol,
766
- hostname,
767
- port,
768
- method: "GET",
769
- headers,
770
- path: resolvedPath,
771
- query,
772
- body,
773
- });
493
+ b.m("GET").h(headers).q(query).b(body);
494
+ return b.build();
774
495
  };
775
496
  export const se_GetFolderPathCommand = async (input, context) => {
776
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
497
+ const b = rb(input, context);
777
498
  const headers = map({}, isSerializableHeaderValue, {
778
- authentication: input.AuthenticationToken,
499
+ [_a]: input[_AT],
779
500
  });
780
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}/path";
781
- resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId, "{FolderId}", false);
501
+ b.bp("/api/v1/folders/{FolderId}/path");
502
+ b.p("FolderId", () => input.FolderId, "{FolderId}", false);
782
503
  const query = map({
783
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
784
- fields: [, input.Fields],
785
- marker: [, input.Marker],
504
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
505
+ [_f]: [, input[_F]],
506
+ [_m]: [, input[_M]],
786
507
  });
787
508
  let body;
788
- return new __HttpRequest({
789
- protocol,
790
- hostname,
791
- port,
792
- method: "GET",
793
- headers,
794
- path: resolvedPath,
795
- query,
796
- body,
797
- });
509
+ b.m("GET").h(headers).q(query).b(body);
510
+ return b.build();
798
511
  };
799
512
  export const se_GetResourcesCommand = async (input, context) => {
800
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
513
+ const b = rb(input, context);
801
514
  const headers = map({}, isSerializableHeaderValue, {
802
- authentication: input.AuthenticationToken,
515
+ [_a]: input[_AT],
803
516
  });
804
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/resources";
517
+ b.bp("/api/v1/resources");
805
518
  const query = map({
806
- userId: [, input.UserId],
807
- collectionType: [, input.CollectionType],
808
- limit: [() => input.Limit !== void 0, () => input.Limit.toString()],
809
- marker: [, input.Marker],
519
+ [_uI]: [, input[_UI]],
520
+ [_cT]: [, input[_CT]],
521
+ [_li]: [() => input.Limit !== void 0, () => input[_Li].toString()],
522
+ [_m]: [, input[_M]],
810
523
  });
811
524
  let body;
812
- return new __HttpRequest({
813
- protocol,
814
- hostname,
815
- port,
816
- method: "GET",
817
- headers,
818
- path: resolvedPath,
819
- query,
820
- body,
821
- });
525
+ b.m("GET").h(headers).q(query).b(body);
526
+ return b.build();
822
527
  };
823
528
  export const se_InitiateDocumentVersionUploadCommand = async (input, context) => {
824
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
529
+ const b = rb(input, context);
825
530
  const headers = map({}, isSerializableHeaderValue, {
826
531
  "content-type": "application/json",
827
- authentication: input.AuthenticationToken,
532
+ [_a]: input[_AT],
828
533
  });
829
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents";
534
+ b.bp("/api/v1/documents");
830
535
  let body;
831
536
  body = JSON.stringify(take(input, {
832
537
  ContentCreatedTimestamp: (_) => Math.round(_.getTime() / 1000),
@@ -837,85 +542,53 @@ export const se_InitiateDocumentVersionUploadCommand = async (input, context) =>
837
542
  Name: [],
838
543
  ParentFolderId: [],
839
544
  }));
840
- return new __HttpRequest({
841
- protocol,
842
- hostname,
843
- port,
844
- method: "POST",
845
- headers,
846
- path: resolvedPath,
847
- body,
848
- });
545
+ b.m("POST").h(headers).b(body);
546
+ return b.build();
849
547
  };
850
548
  export const se_RemoveAllResourcePermissionsCommand = async (input, context) => {
851
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
549
+ const b = rb(input, context);
852
550
  const headers = map({}, isSerializableHeaderValue, {
853
- authentication: input.AuthenticationToken,
551
+ [_a]: input[_AT],
854
552
  });
855
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
856
- "/api/v1/resources/{ResourceId}/permissions";
857
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
553
+ b.bp("/api/v1/resources/{ResourceId}/permissions");
554
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
858
555
  let body;
859
- return new __HttpRequest({
860
- protocol,
861
- hostname,
862
- port,
863
- method: "DELETE",
864
- headers,
865
- path: resolvedPath,
866
- body,
867
- });
556
+ b.m("DELETE").h(headers).b(body);
557
+ return b.build();
868
558
  };
869
559
  export const se_RemoveResourcePermissionCommand = async (input, context) => {
870
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
560
+ const b = rb(input, context);
871
561
  const headers = map({}, isSerializableHeaderValue, {
872
- authentication: input.AuthenticationToken,
562
+ [_a]: input[_AT],
873
563
  });
874
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
875
- "/api/v1/resources/{ResourceId}/permissions/{PrincipalId}";
876
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId, "{ResourceId}", false);
877
- resolvedPath = __resolvedPath(resolvedPath, input, "PrincipalId", () => input.PrincipalId, "{PrincipalId}", false);
564
+ b.bp("/api/v1/resources/{ResourceId}/permissions/{PrincipalId}");
565
+ b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false);
566
+ b.p("PrincipalId", () => input.PrincipalId, "{PrincipalId}", false);
878
567
  const query = map({
879
- type: [, input.PrincipalType],
568
+ [_t]: [, input[_PT]],
880
569
  });
881
570
  let body;
882
- return new __HttpRequest({
883
- protocol,
884
- hostname,
885
- port,
886
- method: "DELETE",
887
- headers,
888
- path: resolvedPath,
889
- query,
890
- body,
891
- });
571
+ b.m("DELETE").h(headers).q(query).b(body);
572
+ return b.build();
892
573
  };
893
574
  export const se_RestoreDocumentVersionsCommand = async (input, context) => {
894
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
575
+ const b = rb(input, context);
895
576
  const headers = map({}, isSerializableHeaderValue, {
896
- authentication: input.AuthenticationToken,
577
+ [_a]: input[_AT],
897
578
  });
898
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
899
- "/api/v1/documentVersions/restore/{DocumentId}";
900
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
579
+ b.bp("/api/v1/documentVersions/restore/{DocumentId}");
580
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
901
581
  let body;
902
- return new __HttpRequest({
903
- protocol,
904
- hostname,
905
- port,
906
- method: "POST",
907
- headers,
908
- path: resolvedPath,
909
- body,
910
- });
582
+ b.m("POST").h(headers).b(body);
583
+ return b.build();
911
584
  };
912
585
  export const se_SearchResourcesCommand = async (input, context) => {
913
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
586
+ const b = rb(input, context);
914
587
  const headers = map({}, isSerializableHeaderValue, {
915
588
  "content-type": "application/json",
916
- authentication: input.AuthenticationToken,
589
+ [_a]: input[_AT],
917
590
  });
918
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/search";
591
+ b.bp("/api/v1/search");
919
592
  let body;
920
593
  body = JSON.stringify(take(input, {
921
594
  AdditionalResponseFields: (_) => _json(_),
@@ -927,96 +600,67 @@ export const se_SearchResourcesCommand = async (input, context) => {
927
600
  QueryScopes: (_) => _json(_),
928
601
  QueryText: [],
929
602
  }));
930
- return new __HttpRequest({
931
- protocol,
932
- hostname,
933
- port,
934
- method: "POST",
935
- headers,
936
- path: resolvedPath,
937
- body,
938
- });
603
+ b.m("POST").h(headers).b(body);
604
+ return b.build();
939
605
  };
940
606
  export const se_UpdateDocumentCommand = async (input, context) => {
941
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
607
+ const b = rb(input, context);
942
608
  const headers = map({}, isSerializableHeaderValue, {
943
609
  "content-type": "application/json",
944
- authentication: input.AuthenticationToken,
610
+ [_a]: input[_AT],
945
611
  });
946
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents/{DocumentId}";
947
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
612
+ b.bp("/api/v1/documents/{DocumentId}");
613
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
948
614
  let body;
949
615
  body = JSON.stringify(take(input, {
950
616
  Name: [],
951
617
  ParentFolderId: [],
952
618
  ResourceState: [],
953
619
  }));
954
- return new __HttpRequest({
955
- protocol,
956
- hostname,
957
- port,
958
- method: "PATCH",
959
- headers,
960
- path: resolvedPath,
961
- body,
962
- });
620
+ b.m("PATCH").h(headers).b(body);
621
+ return b.build();
963
622
  };
964
623
  export const se_UpdateDocumentVersionCommand = async (input, context) => {
965
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
624
+ const b = rb(input, context);
966
625
  const headers = map({}, isSerializableHeaderValue, {
967
626
  "content-type": "application/json",
968
- authentication: input.AuthenticationToken,
627
+ [_a]: input[_AT],
969
628
  });
970
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
971
- "/api/v1/documents/{DocumentId}/versions/{VersionId}";
972
- resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId, "{DocumentId}", false);
973
- resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId, "{VersionId}", false);
629
+ b.bp("/api/v1/documents/{DocumentId}/versions/{VersionId}");
630
+ b.p("DocumentId", () => input.DocumentId, "{DocumentId}", false);
631
+ b.p("VersionId", () => input.VersionId, "{VersionId}", false);
974
632
  let body;
975
633
  body = JSON.stringify(take(input, {
976
634
  VersionStatus: [],
977
635
  }));
978
- return new __HttpRequest({
979
- protocol,
980
- hostname,
981
- port,
982
- method: "PATCH",
983
- headers,
984
- path: resolvedPath,
985
- body,
986
- });
636
+ b.m("PATCH").h(headers).b(body);
637
+ return b.build();
987
638
  };
988
639
  export const se_UpdateFolderCommand = async (input, context) => {
989
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
640
+ const b = rb(input, context);
990
641
  const headers = map({}, isSerializableHeaderValue, {
991
642
  "content-type": "application/json",
992
- authentication: input.AuthenticationToken,
643
+ [_a]: input[_AT],
993
644
  });
994
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}";
995
- resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId, "{FolderId}", false);
645
+ b.bp("/api/v1/folders/{FolderId}");
646
+ b.p("FolderId", () => input.FolderId, "{FolderId}", false);
996
647
  let body;
997
648
  body = JSON.stringify(take(input, {
998
649
  Name: [],
999
650
  ParentFolderId: [],
1000
651
  ResourceState: [],
1001
652
  }));
1002
- return new __HttpRequest({
1003
- protocol,
1004
- hostname,
1005
- port,
1006
- method: "PATCH",
1007
- headers,
1008
- path: resolvedPath,
1009
- body,
1010
- });
653
+ b.m("PATCH").h(headers).b(body);
654
+ return b.build();
1011
655
  };
1012
656
  export const se_UpdateUserCommand = async (input, context) => {
1013
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
657
+ const b = rb(input, context);
1014
658
  const headers = map({}, isSerializableHeaderValue, {
1015
659
  "content-type": "application/json",
1016
- authentication: input.AuthenticationToken,
660
+ [_a]: input[_AT],
1017
661
  });
1018
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users/{UserId}";
1019
- resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId, "{UserId}", false);
662
+ b.bp("/api/v1/users/{UserId}");
663
+ b.p("UserId", () => input.UserId, "{UserId}", false);
1020
664
  let body;
1021
665
  body = JSON.stringify(take(input, {
1022
666
  GivenName: [],
@@ -1027,15 +671,8 @@ export const se_UpdateUserCommand = async (input, context) => {
1027
671
  TimeZoneId: [],
1028
672
  Type: [],
1029
673
  }));
1030
- return new __HttpRequest({
1031
- protocol,
1032
- hostname,
1033
- port,
1034
- method: "PATCH",
1035
- headers,
1036
- path: resolvedPath,
1037
- body,
1038
- });
674
+ b.m("PATCH").h(headers).b(body);
675
+ return b.build();
1039
676
  };
1040
677
  export const de_AbortDocumentVersionUploadCommand = async (output, context) => {
1041
678
  if (output.statusCode !== 204 && output.statusCode >= 300) {
@@ -3677,6 +3314,60 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
3677
3314
  value !== "" &&
3678
3315
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
3679
3316
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
3317
+ const _AT = "AuthenticationToken";
3318
+ const _ATc = "ActivityTypes";
3319
+ const _CT = "CollectionType";
3320
+ const _DA = "DeleteAll";
3321
+ const _DPV = "DeletePriorVersions";
3322
+ const _ET = "EndTime";
3323
+ const _F = "Fields";
3324
+ const _I = "Include";
3325
+ const _ICM = "IncludeCustomMetadata";
3326
+ const _IIA = "IncludeIndirectActivities";
3327
+ const _K = "Keys";
3328
+ const _L = "Labels";
3329
+ const _Li = "Limit";
3330
+ const _M = "Marker";
3331
+ const _O = "Order";
3332
+ const _OI = "OrganizationId";
3333
+ const _PI = "PrincipalId";
3334
+ const _PT = "PrincipalType";
3335
+ const _Q = "Query";
3336
+ const _RI = "ResourceId";
3337
+ const _S = "Sort";
3338
+ const _SQ = "SearchQuery";
3339
+ const _ST = "StartTime";
3340
+ const _T = "Type";
3341
+ const _UI = "UserId";
3342
+ const _UIs = "UserIds";
3343
+ const _VI = "VersionId";
3344
+ const _a = "authentication";
3345
+ const _aT = "activityTypes";
3346
+ const _cT = "collectionType";
3347
+ const _dA = "deleteAll";
3348
+ const _dPV = "deletePriorVersions";
3349
+ const _eT = "endTime";
3350
+ const _f = "fields";
3351
+ const _i = "include";
3352
+ const _iCM = "includeCustomMetadata";
3353
+ const _iIA = "includeIndirectActivities";
3354
+ const _k = "keys";
3355
+ const _l = "labels";
3356
+ const _li = "limit";
3357
+ const _m = "marker";
3358
+ const _o = "order";
3359
+ const _oI = "organizationId";
3360
+ const _pI = "principalId";
3361
+ const _q = "query";
3362
+ const _rI = "resourceId";
3363
+ const _s = "sort";
3364
+ const _sQ = "searchQuery";
3365
+ const _sT = "startTime";
3366
+ const _t = "type";
3367
+ const _uI = "userId";
3368
+ const _uIs = "userIds";
3369
+ const _v = "versionid";
3370
+ const _vI = "versionId";
3680
3371
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3681
3372
  if (encoded.length) {
3682
3373
  return JSON.parse(encoded);