@aws-sdk/client-clouddirectory 3.476.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,132 +1,91 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { CloudDirectoryServiceException as __BaseException } from "../models/CloudDirectoryServiceException";
5
5
  import { AccessDeniedException, BatchWriteException, CannotListParentOfRootException, DirectoryAlreadyExistsException, DirectoryDeletedException, DirectoryNotDisabledException, DirectoryNotEnabledException, FacetAlreadyExistsException, FacetInUseException, FacetNotFoundException, FacetValidationException, IncompatibleSchemaException, IndexedAttributeMissingException, InternalServiceException, InvalidArnException, InvalidAttachmentException, InvalidFacetUpdateException, InvalidNextTokenException, InvalidRuleException, InvalidSchemaDocException, InvalidTaggingRequestException, LimitExceededException, LinkNameAlreadyInUseException, NotIndexException, NotNodeException, NotPolicyException, ObjectAlreadyDetachedException, ObjectNotDetachedException, ResourceNotFoundException, RetryableConflictException, SchemaAlreadyExistsException, SchemaAlreadyPublishedException, StillContainsLinksException, TypedAttributeValue, UnsupportedIndexTypeException, ValidationException, } from "../models/models_0";
6
6
  export const se_AddFacetToObjectCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = map({}, isSerializableHeaderValue, {
9
9
  "content-type": "application/json",
10
- "x-amz-data-partition": input.DirectoryArn,
10
+ [_xadp]: input[_DA],
11
11
  });
12
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
13
- "/amazonclouddirectory/2017-01-11/object/facets";
12
+ b.bp("/amazonclouddirectory/2017-01-11/object/facets");
14
13
  let body;
15
14
  body = JSON.stringify(take(input, {
16
15
  ObjectAttributeList: (_) => se_AttributeKeyAndValueList(_, context),
17
16
  ObjectReference: (_) => _json(_),
18
17
  SchemaFacet: (_) => _json(_),
19
18
  }));
20
- return new __HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "PUT",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
19
+ b.m("PUT").h(headers).b(body);
20
+ return b.build();
29
21
  };
30
22
  export const se_ApplySchemaCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
32
24
  const headers = map({}, isSerializableHeaderValue, {
33
25
  "content-type": "application/json",
34
- "x-amz-data-partition": input.DirectoryArn,
26
+ [_xadp]: input[_DA],
35
27
  });
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
37
- "/amazonclouddirectory/2017-01-11/schema/apply";
28
+ b.bp("/amazonclouddirectory/2017-01-11/schema/apply");
38
29
  let body;
39
30
  body = JSON.stringify(take(input, {
40
31
  PublishedSchemaArn: [],
41
32
  }));
42
- return new __HttpRequest({
43
- protocol,
44
- hostname,
45
- port,
46
- method: "PUT",
47
- headers,
48
- path: resolvedPath,
49
- body,
50
- });
33
+ b.m("PUT").h(headers).b(body);
34
+ return b.build();
51
35
  };
52
36
  export const se_AttachObjectCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
54
38
  const headers = map({}, isSerializableHeaderValue, {
55
39
  "content-type": "application/json",
56
- "x-amz-data-partition": input.DirectoryArn,
40
+ [_xadp]: input[_DA],
57
41
  });
58
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
59
- "/amazonclouddirectory/2017-01-11/object/attach";
42
+ b.bp("/amazonclouddirectory/2017-01-11/object/attach");
60
43
  let body;
61
44
  body = JSON.stringify(take(input, {
62
45
  ChildReference: (_) => _json(_),
63
46
  LinkName: [],
64
47
  ParentReference: (_) => _json(_),
65
48
  }));
66
- return new __HttpRequest({
67
- protocol,
68
- hostname,
69
- port,
70
- method: "PUT",
71
- headers,
72
- path: resolvedPath,
73
- body,
74
- });
49
+ b.m("PUT").h(headers).b(body);
50
+ return b.build();
75
51
  };
76
52
  export const se_AttachPolicyCommand = async (input, context) => {
77
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
53
+ const b = rb(input, context);
78
54
  const headers = map({}, isSerializableHeaderValue, {
79
55
  "content-type": "application/json",
80
- "x-amz-data-partition": input.DirectoryArn,
56
+ [_xadp]: input[_DA],
81
57
  });
82
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
83
- "/amazonclouddirectory/2017-01-11/policy/attach";
58
+ b.bp("/amazonclouddirectory/2017-01-11/policy/attach");
84
59
  let body;
85
60
  body = JSON.stringify(take(input, {
86
61
  ObjectReference: (_) => _json(_),
87
62
  PolicyReference: (_) => _json(_),
88
63
  }));
89
- return new __HttpRequest({
90
- protocol,
91
- hostname,
92
- port,
93
- method: "PUT",
94
- headers,
95
- path: resolvedPath,
96
- body,
97
- });
64
+ b.m("PUT").h(headers).b(body);
65
+ return b.build();
98
66
  };
99
67
  export const se_AttachToIndexCommand = async (input, context) => {
100
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const b = rb(input, context);
101
69
  const headers = map({}, isSerializableHeaderValue, {
102
70
  "content-type": "application/json",
103
- "x-amz-data-partition": input.DirectoryArn,
71
+ [_xadp]: input[_DA],
104
72
  });
105
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
106
- "/amazonclouddirectory/2017-01-11/index/attach";
73
+ b.bp("/amazonclouddirectory/2017-01-11/index/attach");
107
74
  let body;
108
75
  body = JSON.stringify(take(input, {
109
76
  IndexReference: (_) => _json(_),
110
77
  TargetReference: (_) => _json(_),
111
78
  }));
112
- return new __HttpRequest({
113
- protocol,
114
- hostname,
115
- port,
116
- method: "PUT",
117
- headers,
118
- path: resolvedPath,
119
- body,
120
- });
79
+ b.m("PUT").h(headers).b(body);
80
+ return b.build();
121
81
  };
122
82
  export const se_AttachTypedLinkCommand = 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
- "x-amz-data-partition": input.DirectoryArn,
86
+ [_xadp]: input[_DA],
127
87
  });
128
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
129
- "/amazonclouddirectory/2017-01-11/typedlink/attach";
88
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/attach");
130
89
  let body;
131
90
  body = JSON.stringify(take(input, {
132
91
  Attributes: (_) => se_AttributeNameAndValueList(_, context),
@@ -134,91 +93,59 @@ export const se_AttachTypedLinkCommand = async (input, context) => {
134
93
  TargetObjectReference: (_) => _json(_),
135
94
  TypedLinkFacet: (_) => _json(_),
136
95
  }));
137
- return new __HttpRequest({
138
- protocol,
139
- hostname,
140
- port,
141
- method: "PUT",
142
- headers,
143
- path: resolvedPath,
144
- body,
145
- });
96
+ b.m("PUT").h(headers).b(body);
97
+ return b.build();
146
98
  };
147
99
  export const se_BatchReadCommand = async (input, context) => {
148
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = rb(input, context);
149
101
  const headers = map({}, isSerializableHeaderValue, {
150
102
  "content-type": "application/json",
151
- "x-amz-data-partition": input.DirectoryArn,
152
- "x-amz-consistency-level": input.ConsistencyLevel,
103
+ [_xadp]: input[_DA],
104
+ [_xacl]: input[_CL],
153
105
  });
154
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
155
- "/amazonclouddirectory/2017-01-11/batchread";
106
+ b.bp("/amazonclouddirectory/2017-01-11/batchread");
156
107
  let body;
157
108
  body = JSON.stringify(take(input, {
158
109
  Operations: (_) => se_BatchReadOperationList(_, context),
159
110
  }));
160
- return new __HttpRequest({
161
- protocol,
162
- hostname,
163
- port,
164
- method: "POST",
165
- headers,
166
- path: resolvedPath,
167
- body,
168
- });
111
+ b.m("POST").h(headers).b(body);
112
+ return b.build();
169
113
  };
170
114
  export const se_BatchWriteCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const b = rb(input, context);
172
116
  const headers = map({}, isSerializableHeaderValue, {
173
117
  "content-type": "application/json",
174
- "x-amz-data-partition": input.DirectoryArn,
118
+ [_xadp]: input[_DA],
175
119
  });
176
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
177
- "/amazonclouddirectory/2017-01-11/batchwrite";
120
+ b.bp("/amazonclouddirectory/2017-01-11/batchwrite");
178
121
  let body;
179
122
  body = JSON.stringify(take(input, {
180
123
  Operations: (_) => se_BatchWriteOperationList(_, context),
181
124
  }));
182
- return new __HttpRequest({
183
- protocol,
184
- hostname,
185
- port,
186
- method: "PUT",
187
- headers,
188
- path: resolvedPath,
189
- body,
190
- });
125
+ b.m("PUT").h(headers).b(body);
126
+ return b.build();
191
127
  };
192
128
  export const se_CreateDirectoryCommand = async (input, context) => {
193
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
194
130
  const headers = map({}, isSerializableHeaderValue, {
195
131
  "content-type": "application/json",
196
- "x-amz-data-partition": input.SchemaArn,
132
+ [_xadp]: input[_SA],
197
133
  });
198
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
199
- "/amazonclouddirectory/2017-01-11/directory/create";
134
+ b.bp("/amazonclouddirectory/2017-01-11/directory/create");
200
135
  let body;
201
136
  body = JSON.stringify(take(input, {
202
137
  Name: [],
203
138
  }));
204
- return new __HttpRequest({
205
- protocol,
206
- hostname,
207
- port,
208
- method: "PUT",
209
- headers,
210
- path: resolvedPath,
211
- body,
212
- });
139
+ b.m("PUT").h(headers).b(body);
140
+ return b.build();
213
141
  };
214
142
  export const se_CreateFacetCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = rb(input, context);
216
144
  const headers = map({}, isSerializableHeaderValue, {
217
145
  "content-type": "application/json",
218
- "x-amz-data-partition": input.SchemaArn,
146
+ [_xadp]: input[_SA],
219
147
  });
220
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
221
- "/amazonclouddirectory/2017-01-11/facet/create";
148
+ b.bp("/amazonclouddirectory/2017-01-11/facet/create");
222
149
  let body;
223
150
  body = JSON.stringify(take(input, {
224
151
  Attributes: (_) => se_FacetAttributeList(_, context),
@@ -226,23 +153,16 @@ export const se_CreateFacetCommand = async (input, context) => {
226
153
  Name: [],
227
154
  ObjectType: [],
228
155
  }));
229
- return new __HttpRequest({
230
- protocol,
231
- hostname,
232
- port,
233
- method: "PUT",
234
- headers,
235
- path: resolvedPath,
236
- body,
237
- });
156
+ b.m("PUT").h(headers).b(body);
157
+ return b.build();
238
158
  };
239
159
  export const se_CreateIndexCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
160
+ const b = rb(input, context);
241
161
  const headers = map({}, isSerializableHeaderValue, {
242
162
  "content-type": "application/json",
243
- "x-amz-data-partition": input.DirectoryArn,
163
+ [_xadp]: input[_DA],
244
164
  });
245
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/index";
165
+ b.bp("/amazonclouddirectory/2017-01-11/index");
246
166
  let body;
247
167
  body = JSON.stringify(take(input, {
248
168
  IsUnique: [],
@@ -250,23 +170,16 @@ export const se_CreateIndexCommand = async (input, context) => {
250
170
  OrderedIndexedAttributeList: (_) => _json(_),
251
171
  ParentReference: (_) => _json(_),
252
172
  }));
253
- return new __HttpRequest({
254
- protocol,
255
- hostname,
256
- port,
257
- method: "PUT",
258
- headers,
259
- path: resolvedPath,
260
- body,
261
- });
173
+ b.m("PUT").h(headers).b(body);
174
+ return b.build();
262
175
  };
263
176
  export const se_CreateObjectCommand = async (input, context) => {
264
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = rb(input, context);
265
178
  const headers = map({}, isSerializableHeaderValue, {
266
179
  "content-type": "application/json",
267
- "x-amz-data-partition": input.DirectoryArn,
180
+ [_xadp]: input[_DA],
268
181
  });
269
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object";
182
+ b.bp("/amazonclouddirectory/2017-01-11/object");
270
183
  let body;
271
184
  body = JSON.stringify(take(input, {
272
185
  LinkName: [],
@@ -274,466 +187,292 @@ export const se_CreateObjectCommand = async (input, context) => {
274
187
  ParentReference: (_) => _json(_),
275
188
  SchemaFacets: (_) => _json(_),
276
189
  }));
277
- return new __HttpRequest({
278
- protocol,
279
- hostname,
280
- port,
281
- method: "PUT",
282
- headers,
283
- path: resolvedPath,
284
- body,
285
- });
190
+ b.m("PUT").h(headers).b(body);
191
+ return b.build();
286
192
  };
287
193
  export const se_CreateSchemaCommand = async (input, context) => {
288
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
194
+ const b = rb(input, context);
289
195
  const headers = {
290
196
  "content-type": "application/json",
291
197
  };
292
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
293
- "/amazonclouddirectory/2017-01-11/schema/create";
198
+ b.bp("/amazonclouddirectory/2017-01-11/schema/create");
294
199
  let body;
295
200
  body = JSON.stringify(take(input, {
296
201
  Name: [],
297
202
  }));
298
- return new __HttpRequest({
299
- protocol,
300
- hostname,
301
- port,
302
- method: "PUT",
303
- headers,
304
- path: resolvedPath,
305
- body,
306
- });
203
+ b.m("PUT").h(headers).b(body);
204
+ return b.build();
307
205
  };
308
206
  export const se_CreateTypedLinkFacetCommand = async (input, context) => {
309
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
207
+ const b = rb(input, context);
310
208
  const headers = map({}, isSerializableHeaderValue, {
311
209
  "content-type": "application/json",
312
- "x-amz-data-partition": input.SchemaArn,
210
+ [_xadp]: input[_SA],
313
211
  });
314
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
315
- "/amazonclouddirectory/2017-01-11/typedlink/facet/create";
212
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/facet/create");
316
213
  let body;
317
214
  body = JSON.stringify(take(input, {
318
215
  Facet: (_) => se_TypedLinkFacet(_, context),
319
216
  }));
320
- return new __HttpRequest({
321
- protocol,
322
- hostname,
323
- port,
324
- method: "PUT",
325
- headers,
326
- path: resolvedPath,
327
- body,
328
- });
217
+ b.m("PUT").h(headers).b(body);
218
+ return b.build();
329
219
  };
330
220
  export const se_DeleteDirectoryCommand = async (input, context) => {
331
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
221
+ const b = rb(input, context);
332
222
  const headers = map({}, isSerializableHeaderValue, {
333
- "x-amz-data-partition": input.DirectoryArn,
223
+ [_xadp]: input[_DA],
334
224
  });
335
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
336
- "/amazonclouddirectory/2017-01-11/directory";
225
+ b.bp("/amazonclouddirectory/2017-01-11/directory");
337
226
  let body;
338
- return new __HttpRequest({
339
- protocol,
340
- hostname,
341
- port,
342
- method: "PUT",
343
- headers,
344
- path: resolvedPath,
345
- body,
346
- });
227
+ b.m("PUT").h(headers).b(body);
228
+ return b.build();
347
229
  };
348
230
  export const se_DeleteFacetCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
231
+ const b = rb(input, context);
350
232
  const headers = map({}, isSerializableHeaderValue, {
351
233
  "content-type": "application/json",
352
- "x-amz-data-partition": input.SchemaArn,
234
+ [_xadp]: input[_SA],
353
235
  });
354
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
355
- "/amazonclouddirectory/2017-01-11/facet/delete";
236
+ b.bp("/amazonclouddirectory/2017-01-11/facet/delete");
356
237
  let body;
357
238
  body = JSON.stringify(take(input, {
358
239
  Name: [],
359
240
  }));
360
- return new __HttpRequest({
361
- protocol,
362
- hostname,
363
- port,
364
- method: "PUT",
365
- headers,
366
- path: resolvedPath,
367
- body,
368
- });
241
+ b.m("PUT").h(headers).b(body);
242
+ return b.build();
369
243
  };
370
244
  export const se_DeleteObjectCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const b = rb(input, context);
372
246
  const headers = map({}, isSerializableHeaderValue, {
373
247
  "content-type": "application/json",
374
- "x-amz-data-partition": input.DirectoryArn,
248
+ [_xadp]: input[_DA],
375
249
  });
376
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
377
- "/amazonclouddirectory/2017-01-11/object/delete";
250
+ b.bp("/amazonclouddirectory/2017-01-11/object/delete");
378
251
  let body;
379
252
  body = JSON.stringify(take(input, {
380
253
  ObjectReference: (_) => _json(_),
381
254
  }));
382
- return new __HttpRequest({
383
- protocol,
384
- hostname,
385
- port,
386
- method: "PUT",
387
- headers,
388
- path: resolvedPath,
389
- body,
390
- });
255
+ b.m("PUT").h(headers).b(body);
256
+ return b.build();
391
257
  };
392
258
  export const se_DeleteSchemaCommand = async (input, context) => {
393
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
259
+ const b = rb(input, context);
394
260
  const headers = map({}, isSerializableHeaderValue, {
395
- "x-amz-data-partition": input.SchemaArn,
261
+ [_xadp]: input[_SA],
396
262
  });
397
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema";
263
+ b.bp("/amazonclouddirectory/2017-01-11/schema");
398
264
  let body;
399
- return new __HttpRequest({
400
- protocol,
401
- hostname,
402
- port,
403
- method: "PUT",
404
- headers,
405
- path: resolvedPath,
406
- body,
407
- });
265
+ b.m("PUT").h(headers).b(body);
266
+ return b.build();
408
267
  };
409
268
  export const se_DeleteTypedLinkFacetCommand = async (input, context) => {
410
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
269
+ const b = rb(input, context);
411
270
  const headers = map({}, isSerializableHeaderValue, {
412
271
  "content-type": "application/json",
413
- "x-amz-data-partition": input.SchemaArn,
272
+ [_xadp]: input[_SA],
414
273
  });
415
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
416
- "/amazonclouddirectory/2017-01-11/typedlink/facet/delete";
274
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/facet/delete");
417
275
  let body;
418
276
  body = JSON.stringify(take(input, {
419
277
  Name: [],
420
278
  }));
421
- return new __HttpRequest({
422
- protocol,
423
- hostname,
424
- port,
425
- method: "PUT",
426
- headers,
427
- path: resolvedPath,
428
- body,
429
- });
279
+ b.m("PUT").h(headers).b(body);
280
+ return b.build();
430
281
  };
431
282
  export const se_DetachFromIndexCommand = async (input, context) => {
432
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
283
+ const b = rb(input, context);
433
284
  const headers = map({}, isSerializableHeaderValue, {
434
285
  "content-type": "application/json",
435
- "x-amz-data-partition": input.DirectoryArn,
286
+ [_xadp]: input[_DA],
436
287
  });
437
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
438
- "/amazonclouddirectory/2017-01-11/index/detach";
288
+ b.bp("/amazonclouddirectory/2017-01-11/index/detach");
439
289
  let body;
440
290
  body = JSON.stringify(take(input, {
441
291
  IndexReference: (_) => _json(_),
442
292
  TargetReference: (_) => _json(_),
443
293
  }));
444
- return new __HttpRequest({
445
- protocol,
446
- hostname,
447
- port,
448
- method: "PUT",
449
- headers,
450
- path: resolvedPath,
451
- body,
452
- });
294
+ b.m("PUT").h(headers).b(body);
295
+ return b.build();
453
296
  };
454
297
  export const se_DetachObjectCommand = async (input, context) => {
455
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
298
+ const b = rb(input, context);
456
299
  const headers = map({}, isSerializableHeaderValue, {
457
300
  "content-type": "application/json",
458
- "x-amz-data-partition": input.DirectoryArn,
301
+ [_xadp]: input[_DA],
459
302
  });
460
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
461
- "/amazonclouddirectory/2017-01-11/object/detach";
303
+ b.bp("/amazonclouddirectory/2017-01-11/object/detach");
462
304
  let body;
463
305
  body = JSON.stringify(take(input, {
464
306
  LinkName: [],
465
307
  ParentReference: (_) => _json(_),
466
308
  }));
467
- return new __HttpRequest({
468
- protocol,
469
- hostname,
470
- port,
471
- method: "PUT",
472
- headers,
473
- path: resolvedPath,
474
- body,
475
- });
309
+ b.m("PUT").h(headers).b(body);
310
+ return b.build();
476
311
  };
477
312
  export const se_DetachPolicyCommand = async (input, context) => {
478
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
313
+ const b = rb(input, context);
479
314
  const headers = map({}, isSerializableHeaderValue, {
480
315
  "content-type": "application/json",
481
- "x-amz-data-partition": input.DirectoryArn,
316
+ [_xadp]: input[_DA],
482
317
  });
483
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
484
- "/amazonclouddirectory/2017-01-11/policy/detach";
318
+ b.bp("/amazonclouddirectory/2017-01-11/policy/detach");
485
319
  let body;
486
320
  body = JSON.stringify(take(input, {
487
321
  ObjectReference: (_) => _json(_),
488
322
  PolicyReference: (_) => _json(_),
489
323
  }));
490
- return new __HttpRequest({
491
- protocol,
492
- hostname,
493
- port,
494
- method: "PUT",
495
- headers,
496
- path: resolvedPath,
497
- body,
498
- });
324
+ b.m("PUT").h(headers).b(body);
325
+ return b.build();
499
326
  };
500
327
  export const se_DetachTypedLinkCommand = async (input, context) => {
501
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
328
+ const b = rb(input, context);
502
329
  const headers = map({}, isSerializableHeaderValue, {
503
330
  "content-type": "application/json",
504
- "x-amz-data-partition": input.DirectoryArn,
331
+ [_xadp]: input[_DA],
505
332
  });
506
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
507
- "/amazonclouddirectory/2017-01-11/typedlink/detach";
333
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/detach");
508
334
  let body;
509
335
  body = JSON.stringify(take(input, {
510
336
  TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context),
511
337
  }));
512
- return new __HttpRequest({
513
- protocol,
514
- hostname,
515
- port,
516
- method: "PUT",
517
- headers,
518
- path: resolvedPath,
519
- body,
520
- });
338
+ b.m("PUT").h(headers).b(body);
339
+ return b.build();
521
340
  };
522
341
  export const se_DisableDirectoryCommand = async (input, context) => {
523
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = rb(input, context);
524
343
  const headers = map({}, isSerializableHeaderValue, {
525
- "x-amz-data-partition": input.DirectoryArn,
344
+ [_xadp]: input[_DA],
526
345
  });
527
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
528
- "/amazonclouddirectory/2017-01-11/directory/disable";
346
+ b.bp("/amazonclouddirectory/2017-01-11/directory/disable");
529
347
  let body;
530
- return new __HttpRequest({
531
- protocol,
532
- hostname,
533
- port,
534
- method: "PUT",
535
- headers,
536
- path: resolvedPath,
537
- body,
538
- });
348
+ b.m("PUT").h(headers).b(body);
349
+ return b.build();
539
350
  };
540
351
  export const se_EnableDirectoryCommand = async (input, context) => {
541
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
352
+ const b = rb(input, context);
542
353
  const headers = map({}, isSerializableHeaderValue, {
543
- "x-amz-data-partition": input.DirectoryArn,
354
+ [_xadp]: input[_DA],
544
355
  });
545
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
546
- "/amazonclouddirectory/2017-01-11/directory/enable";
356
+ b.bp("/amazonclouddirectory/2017-01-11/directory/enable");
547
357
  let body;
548
- return new __HttpRequest({
549
- protocol,
550
- hostname,
551
- port,
552
- method: "PUT",
553
- headers,
554
- path: resolvedPath,
555
- body,
556
- });
358
+ b.m("PUT").h(headers).b(body);
359
+ return b.build();
557
360
  };
558
361
  export const se_GetAppliedSchemaVersionCommand = async (input, context) => {
559
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
362
+ const b = rb(input, context);
560
363
  const headers = {
561
364
  "content-type": "application/json",
562
365
  };
563
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
564
- "/amazonclouddirectory/2017-01-11/schema/getappliedschema";
366
+ b.bp("/amazonclouddirectory/2017-01-11/schema/getappliedschema");
565
367
  let body;
566
368
  body = JSON.stringify(take(input, {
567
369
  SchemaArn: [],
568
370
  }));
569
- return new __HttpRequest({
570
- protocol,
571
- hostname,
572
- port,
573
- method: "POST",
574
- headers,
575
- path: resolvedPath,
576
- body,
577
- });
371
+ b.m("POST").h(headers).b(body);
372
+ return b.build();
578
373
  };
579
374
  export const se_GetDirectoryCommand = async (input, context) => {
580
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
375
+ const b = rb(input, context);
581
376
  const headers = map({}, isSerializableHeaderValue, {
582
- "x-amz-data-partition": input.DirectoryArn,
377
+ [_xadp]: input[_DA],
583
378
  });
584
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
585
- "/amazonclouddirectory/2017-01-11/directory/get";
379
+ b.bp("/amazonclouddirectory/2017-01-11/directory/get");
586
380
  let body;
587
- return new __HttpRequest({
588
- protocol,
589
- hostname,
590
- port,
591
- method: "POST",
592
- headers,
593
- path: resolvedPath,
594
- body,
595
- });
381
+ b.m("POST").h(headers).b(body);
382
+ return b.build();
596
383
  };
597
384
  export const se_GetFacetCommand = async (input, context) => {
598
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
385
+ const b = rb(input, context);
599
386
  const headers = map({}, isSerializableHeaderValue, {
600
387
  "content-type": "application/json",
601
- "x-amz-data-partition": input.SchemaArn,
388
+ [_xadp]: input[_SA],
602
389
  });
603
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet";
390
+ b.bp("/amazonclouddirectory/2017-01-11/facet");
604
391
  let body;
605
392
  body = JSON.stringify(take(input, {
606
393
  Name: [],
607
394
  }));
608
- return new __HttpRequest({
609
- protocol,
610
- hostname,
611
- port,
612
- method: "POST",
613
- headers,
614
- path: resolvedPath,
615
- body,
616
- });
395
+ b.m("POST").h(headers).b(body);
396
+ return b.build();
617
397
  };
618
398
  export const se_GetLinkAttributesCommand = async (input, context) => {
619
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
399
+ const b = rb(input, context);
620
400
  const headers = map({}, isSerializableHeaderValue, {
621
401
  "content-type": "application/json",
622
- "x-amz-data-partition": input.DirectoryArn,
402
+ [_xadp]: input[_DA],
623
403
  });
624
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
625
- "/amazonclouddirectory/2017-01-11/typedlink/attributes/get";
404
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/attributes/get");
626
405
  let body;
627
406
  body = JSON.stringify(take(input, {
628
407
  AttributeNames: (_) => _json(_),
629
408
  ConsistencyLevel: [],
630
409
  TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context),
631
410
  }));
632
- return new __HttpRequest({
633
- protocol,
634
- hostname,
635
- port,
636
- method: "POST",
637
- headers,
638
- path: resolvedPath,
639
- body,
640
- });
411
+ b.m("POST").h(headers).b(body);
412
+ return b.build();
641
413
  };
642
414
  export const se_GetObjectAttributesCommand = async (input, context) => {
643
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
415
+ const b = rb(input, context);
644
416
  const headers = map({}, isSerializableHeaderValue, {
645
417
  "content-type": "application/json",
646
- "x-amz-data-partition": input.DirectoryArn,
647
- "x-amz-consistency-level": input.ConsistencyLevel,
418
+ [_xadp]: input[_DA],
419
+ [_xacl]: input[_CL],
648
420
  });
649
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
650
- "/amazonclouddirectory/2017-01-11/object/attributes/get";
421
+ b.bp("/amazonclouddirectory/2017-01-11/object/attributes/get");
651
422
  let body;
652
423
  body = JSON.stringify(take(input, {
653
424
  AttributeNames: (_) => _json(_),
654
425
  ObjectReference: (_) => _json(_),
655
426
  SchemaFacet: (_) => _json(_),
656
427
  }));
657
- return new __HttpRequest({
658
- protocol,
659
- hostname,
660
- port,
661
- method: "POST",
662
- headers,
663
- path: resolvedPath,
664
- body,
665
- });
428
+ b.m("POST").h(headers).b(body);
429
+ return b.build();
666
430
  };
667
431
  export const se_GetObjectInformationCommand = async (input, context) => {
668
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
432
+ const b = rb(input, context);
669
433
  const headers = map({}, isSerializableHeaderValue, {
670
434
  "content-type": "application/json",
671
- "x-amz-data-partition": input.DirectoryArn,
672
- "x-amz-consistency-level": input.ConsistencyLevel,
435
+ [_xadp]: input[_DA],
436
+ [_xacl]: input[_CL],
673
437
  });
674
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
675
- "/amazonclouddirectory/2017-01-11/object/information";
438
+ b.bp("/amazonclouddirectory/2017-01-11/object/information");
676
439
  let body;
677
440
  body = JSON.stringify(take(input, {
678
441
  ObjectReference: (_) => _json(_),
679
442
  }));
680
- return new __HttpRequest({
681
- protocol,
682
- hostname,
683
- port,
684
- method: "POST",
685
- headers,
686
- path: resolvedPath,
687
- body,
688
- });
443
+ b.m("POST").h(headers).b(body);
444
+ return b.build();
689
445
  };
690
446
  export const se_GetSchemaAsJsonCommand = async (input, context) => {
691
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
447
+ const b = rb(input, context);
692
448
  const headers = map({}, isSerializableHeaderValue, {
693
- "x-amz-data-partition": input.SchemaArn,
449
+ [_xadp]: input[_SA],
694
450
  });
695
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
696
- "/amazonclouddirectory/2017-01-11/schema/json";
451
+ b.bp("/amazonclouddirectory/2017-01-11/schema/json");
697
452
  let body;
698
- return new __HttpRequest({
699
- protocol,
700
- hostname,
701
- port,
702
- method: "POST",
703
- headers,
704
- path: resolvedPath,
705
- body,
706
- });
453
+ b.m("POST").h(headers).b(body);
454
+ return b.build();
707
455
  };
708
456
  export const se_GetTypedLinkFacetInformationCommand = async (input, context) => {
709
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
457
+ const b = rb(input, context);
710
458
  const headers = map({}, isSerializableHeaderValue, {
711
459
  "content-type": "application/json",
712
- "x-amz-data-partition": input.SchemaArn,
460
+ [_xadp]: input[_SA],
713
461
  });
714
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
715
- "/amazonclouddirectory/2017-01-11/typedlink/facet/get";
462
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/facet/get");
716
463
  let body;
717
464
  body = JSON.stringify(take(input, {
718
465
  Name: [],
719
466
  }));
720
- return new __HttpRequest({
721
- protocol,
722
- hostname,
723
- port,
724
- method: "POST",
725
- headers,
726
- path: resolvedPath,
727
- body,
728
- });
467
+ b.m("POST").h(headers).b(body);
468
+ return b.build();
729
469
  };
730
470
  export const se_ListAppliedSchemaArnsCommand = async (input, context) => {
731
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
471
+ const b = rb(input, context);
732
472
  const headers = {
733
473
  "content-type": "application/json",
734
474
  };
735
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
736
- "/amazonclouddirectory/2017-01-11/schema/applied";
475
+ b.bp("/amazonclouddirectory/2017-01-11/schema/applied");
737
476
  let body;
738
477
  body = JSON.stringify(take(input, {
739
478
  DirectoryArn: [],
@@ -741,141 +480,93 @@ export const se_ListAppliedSchemaArnsCommand = async (input, context) => {
741
480
  NextToken: [],
742
481
  SchemaArn: [],
743
482
  }));
744
- return new __HttpRequest({
745
- protocol,
746
- hostname,
747
- port,
748
- method: "POST",
749
- headers,
750
- path: resolvedPath,
751
- body,
752
- });
483
+ b.m("POST").h(headers).b(body);
484
+ return b.build();
753
485
  };
754
486
  export const se_ListAttachedIndicesCommand = async (input, context) => {
755
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
487
+ const b = rb(input, context);
756
488
  const headers = map({}, isSerializableHeaderValue, {
757
489
  "content-type": "application/json",
758
- "x-amz-data-partition": input.DirectoryArn,
759
- "x-amz-consistency-level": input.ConsistencyLevel,
490
+ [_xadp]: input[_DA],
491
+ [_xacl]: input[_CL],
760
492
  });
761
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
762
- "/amazonclouddirectory/2017-01-11/object/indices";
493
+ b.bp("/amazonclouddirectory/2017-01-11/object/indices");
763
494
  let body;
764
495
  body = JSON.stringify(take(input, {
765
496
  MaxResults: [],
766
497
  NextToken: [],
767
498
  TargetReference: (_) => _json(_),
768
499
  }));
769
- return new __HttpRequest({
770
- protocol,
771
- hostname,
772
- port,
773
- method: "POST",
774
- headers,
775
- path: resolvedPath,
776
- body,
777
- });
500
+ b.m("POST").h(headers).b(body);
501
+ return b.build();
778
502
  };
779
503
  export const se_ListDevelopmentSchemaArnsCommand = async (input, context) => {
780
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
504
+ const b = rb(input, context);
781
505
  const headers = {
782
506
  "content-type": "application/json",
783
507
  };
784
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
785
- "/amazonclouddirectory/2017-01-11/schema/development";
508
+ b.bp("/amazonclouddirectory/2017-01-11/schema/development");
786
509
  let body;
787
510
  body = JSON.stringify(take(input, {
788
511
  MaxResults: [],
789
512
  NextToken: [],
790
513
  }));
791
- return new __HttpRequest({
792
- protocol,
793
- hostname,
794
- port,
795
- method: "POST",
796
- headers,
797
- path: resolvedPath,
798
- body,
799
- });
514
+ b.m("POST").h(headers).b(body);
515
+ return b.build();
800
516
  };
801
517
  export const se_ListDirectoriesCommand = async (input, context) => {
802
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
518
+ const b = rb(input, context);
803
519
  const headers = {
804
520
  "content-type": "application/json",
805
521
  };
806
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
807
- "/amazonclouddirectory/2017-01-11/directory/list";
522
+ b.bp("/amazonclouddirectory/2017-01-11/directory/list");
808
523
  let body;
809
524
  body = JSON.stringify(take(input, {
810
525
  MaxResults: [],
811
526
  NextToken: [],
812
527
  state: [],
813
528
  }));
814
- return new __HttpRequest({
815
- protocol,
816
- hostname,
817
- port,
818
- method: "POST",
819
- headers,
820
- path: resolvedPath,
821
- body,
822
- });
529
+ b.m("POST").h(headers).b(body);
530
+ return b.build();
823
531
  };
824
532
  export const se_ListFacetAttributesCommand = async (input, context) => {
825
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
533
+ const b = rb(input, context);
826
534
  const headers = map({}, isSerializableHeaderValue, {
827
535
  "content-type": "application/json",
828
- "x-amz-data-partition": input.SchemaArn,
536
+ [_xadp]: input[_SA],
829
537
  });
830
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
831
- "/amazonclouddirectory/2017-01-11/facet/attributes";
538
+ b.bp("/amazonclouddirectory/2017-01-11/facet/attributes");
832
539
  let body;
833
540
  body = JSON.stringify(take(input, {
834
541
  MaxResults: [],
835
542
  Name: [],
836
543
  NextToken: [],
837
544
  }));
838
- return new __HttpRequest({
839
- protocol,
840
- hostname,
841
- port,
842
- method: "POST",
843
- headers,
844
- path: resolvedPath,
845
- body,
846
- });
545
+ b.m("POST").h(headers).b(body);
546
+ return b.build();
847
547
  };
848
548
  export const se_ListFacetNamesCommand = async (input, context) => {
849
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
549
+ const b = rb(input, context);
850
550
  const headers = map({}, isSerializableHeaderValue, {
851
551
  "content-type": "application/json",
852
- "x-amz-data-partition": input.SchemaArn,
552
+ [_xadp]: input[_SA],
853
553
  });
854
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
855
- "/amazonclouddirectory/2017-01-11/facet/list";
554
+ b.bp("/amazonclouddirectory/2017-01-11/facet/list");
856
555
  let body;
857
556
  body = JSON.stringify(take(input, {
858
557
  MaxResults: [],
859
558
  NextToken: [],
860
559
  }));
861
- return new __HttpRequest({
862
- protocol,
863
- hostname,
864
- port,
865
- method: "POST",
866
- headers,
867
- path: resolvedPath,
868
- body,
869
- });
560
+ b.m("POST").h(headers).b(body);
561
+ return b.build();
870
562
  };
871
563
  export const se_ListIncomingTypedLinksCommand = async (input, context) => {
872
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
564
+ const b = rb(input, context);
873
565
  const headers = map({}, isSerializableHeaderValue, {
874
566
  "content-type": "application/json",
875
- "x-amz-data-partition": input.DirectoryArn,
567
+ [_xadp]: input[_DA],
876
568
  });
877
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
878
- "/amazonclouddirectory/2017-01-11/typedlink/incoming";
569
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/incoming");
879
570
  let body;
880
571
  body = JSON.stringify(take(input, {
881
572
  ConsistencyLevel: [],
@@ -885,25 +576,17 @@ export const se_ListIncomingTypedLinksCommand = async (input, context) => {
885
576
  NextToken: [],
886
577
  ObjectReference: (_) => _json(_),
887
578
  }));
888
- return new __HttpRequest({
889
- protocol,
890
- hostname,
891
- port,
892
- method: "POST",
893
- headers,
894
- path: resolvedPath,
895
- body,
896
- });
579
+ b.m("POST").h(headers).b(body);
580
+ return b.build();
897
581
  };
898
582
  export const se_ListIndexCommand = async (input, context) => {
899
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
583
+ const b = rb(input, context);
900
584
  const headers = map({}, isSerializableHeaderValue, {
901
585
  "content-type": "application/json",
902
- "x-amz-data-partition": input.DirectoryArn,
903
- "x-amz-consistency-level": input.ConsistencyLevel,
586
+ [_xadp]: input[_DA],
587
+ [_xacl]: input[_CL],
904
588
  });
905
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
906
- "/amazonclouddirectory/2017-01-11/index/targets";
589
+ b.bp("/amazonclouddirectory/2017-01-11/index/targets");
907
590
  let body;
908
591
  body = JSON.stringify(take(input, {
909
592
  IndexReference: (_) => _json(_),
@@ -911,48 +594,32 @@ export const se_ListIndexCommand = async (input, context) => {
911
594
  NextToken: [],
912
595
  RangesOnIndexedValues: (_) => se_ObjectAttributeRangeList(_, context),
913
596
  }));
914
- return new __HttpRequest({
915
- protocol,
916
- hostname,
917
- port,
918
- method: "POST",
919
- headers,
920
- path: resolvedPath,
921
- body,
922
- });
597
+ b.m("POST").h(headers).b(body);
598
+ return b.build();
923
599
  };
924
600
  export const se_ListManagedSchemaArnsCommand = async (input, context) => {
925
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
601
+ const b = rb(input, context);
926
602
  const headers = {
927
603
  "content-type": "application/json",
928
604
  };
929
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
930
- "/amazonclouddirectory/2017-01-11/schema/managed";
605
+ b.bp("/amazonclouddirectory/2017-01-11/schema/managed");
931
606
  let body;
932
607
  body = JSON.stringify(take(input, {
933
608
  MaxResults: [],
934
609
  NextToken: [],
935
610
  SchemaArn: [],
936
611
  }));
937
- return new __HttpRequest({
938
- protocol,
939
- hostname,
940
- port,
941
- method: "POST",
942
- headers,
943
- path: resolvedPath,
944
- body,
945
- });
612
+ b.m("POST").h(headers).b(body);
613
+ return b.build();
946
614
  };
947
615
  export const se_ListObjectAttributesCommand = async (input, context) => {
948
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
616
+ const b = rb(input, context);
949
617
  const headers = map({}, isSerializableHeaderValue, {
950
618
  "content-type": "application/json",
951
- "x-amz-data-partition": input.DirectoryArn,
952
- "x-amz-consistency-level": input.ConsistencyLevel,
619
+ [_xadp]: input[_DA],
620
+ [_xacl]: input[_CL],
953
621
  });
954
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
955
- "/amazonclouddirectory/2017-01-11/object/attributes";
622
+ b.bp("/amazonclouddirectory/2017-01-11/object/attributes");
956
623
  let body;
957
624
  body = JSON.stringify(take(input, {
958
625
  FacetFilter: (_) => _json(_),
@@ -960,74 +627,50 @@ export const se_ListObjectAttributesCommand = async (input, context) => {
960
627
  NextToken: [],
961
628
  ObjectReference: (_) => _json(_),
962
629
  }));
963
- return new __HttpRequest({
964
- protocol,
965
- hostname,
966
- port,
967
- method: "POST",
968
- headers,
969
- path: resolvedPath,
970
- body,
971
- });
630
+ b.m("POST").h(headers).b(body);
631
+ return b.build();
972
632
  };
973
633
  export const se_ListObjectChildrenCommand = async (input, context) => {
974
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
634
+ const b = rb(input, context);
975
635
  const headers = map({}, isSerializableHeaderValue, {
976
636
  "content-type": "application/json",
977
- "x-amz-data-partition": input.DirectoryArn,
978
- "x-amz-consistency-level": input.ConsistencyLevel,
637
+ [_xadp]: input[_DA],
638
+ [_xacl]: input[_CL],
979
639
  });
980
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
981
- "/amazonclouddirectory/2017-01-11/object/children";
640
+ b.bp("/amazonclouddirectory/2017-01-11/object/children");
982
641
  let body;
983
642
  body = JSON.stringify(take(input, {
984
643
  MaxResults: [],
985
644
  NextToken: [],
986
645
  ObjectReference: (_) => _json(_),
987
646
  }));
988
- return new __HttpRequest({
989
- protocol,
990
- hostname,
991
- port,
992
- method: "POST",
993
- headers,
994
- path: resolvedPath,
995
- body,
996
- });
647
+ b.m("POST").h(headers).b(body);
648
+ return b.build();
997
649
  };
998
650
  export const se_ListObjectParentPathsCommand = async (input, context) => {
999
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
651
+ const b = rb(input, context);
1000
652
  const headers = map({}, isSerializableHeaderValue, {
1001
653
  "content-type": "application/json",
1002
- "x-amz-data-partition": input.DirectoryArn,
654
+ [_xadp]: input[_DA],
1003
655
  });
1004
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1005
- "/amazonclouddirectory/2017-01-11/object/parentpaths";
656
+ b.bp("/amazonclouddirectory/2017-01-11/object/parentpaths");
1006
657
  let body;
1007
658
  body = JSON.stringify(take(input, {
1008
659
  MaxResults: [],
1009
660
  NextToken: [],
1010
661
  ObjectReference: (_) => _json(_),
1011
662
  }));
1012
- return new __HttpRequest({
1013
- protocol,
1014
- hostname,
1015
- port,
1016
- method: "POST",
1017
- headers,
1018
- path: resolvedPath,
1019
- body,
1020
- });
663
+ b.m("POST").h(headers).b(body);
664
+ return b.build();
1021
665
  };
1022
666
  export const se_ListObjectParentsCommand = async (input, context) => {
1023
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
667
+ const b = rb(input, context);
1024
668
  const headers = map({}, isSerializableHeaderValue, {
1025
669
  "content-type": "application/json",
1026
- "x-amz-data-partition": input.DirectoryArn,
1027
- "x-amz-consistency-level": input.ConsistencyLevel,
670
+ [_xadp]: input[_DA],
671
+ [_xacl]: input[_CL],
1028
672
  });
1029
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1030
- "/amazonclouddirectory/2017-01-11/object/parent";
673
+ b.bp("/amazonclouddirectory/2017-01-11/object/parent");
1031
674
  let body;
1032
675
  body = JSON.stringify(take(input, {
1033
676
  IncludeAllLinksToEachParent: [],
@@ -1035,49 +678,33 @@ export const se_ListObjectParentsCommand = async (input, context) => {
1035
678
  NextToken: [],
1036
679
  ObjectReference: (_) => _json(_),
1037
680
  }));
1038
- return new __HttpRequest({
1039
- protocol,
1040
- hostname,
1041
- port,
1042
- method: "POST",
1043
- headers,
1044
- path: resolvedPath,
1045
- body,
1046
- });
681
+ b.m("POST").h(headers).b(body);
682
+ return b.build();
1047
683
  };
1048
684
  export const se_ListObjectPoliciesCommand = async (input, context) => {
1049
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
685
+ const b = rb(input, context);
1050
686
  const headers = map({}, isSerializableHeaderValue, {
1051
687
  "content-type": "application/json",
1052
- "x-amz-data-partition": input.DirectoryArn,
1053
- "x-amz-consistency-level": input.ConsistencyLevel,
688
+ [_xadp]: input[_DA],
689
+ [_xacl]: input[_CL],
1054
690
  });
1055
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1056
- "/amazonclouddirectory/2017-01-11/object/policy";
691
+ b.bp("/amazonclouddirectory/2017-01-11/object/policy");
1057
692
  let body;
1058
693
  body = JSON.stringify(take(input, {
1059
694
  MaxResults: [],
1060
695
  NextToken: [],
1061
696
  ObjectReference: (_) => _json(_),
1062
697
  }));
1063
- return new __HttpRequest({
1064
- protocol,
1065
- hostname,
1066
- port,
1067
- method: "POST",
1068
- headers,
1069
- path: resolvedPath,
1070
- body,
1071
- });
698
+ b.m("POST").h(headers).b(body);
699
+ return b.build();
1072
700
  };
1073
701
  export const se_ListOutgoingTypedLinksCommand = async (input, context) => {
1074
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
702
+ const b = rb(input, context);
1075
703
  const headers = map({}, isSerializableHeaderValue, {
1076
704
  "content-type": "application/json",
1077
- "x-amz-data-partition": input.DirectoryArn,
705
+ [_xadp]: input[_DA],
1078
706
  });
1079
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1080
- "/amazonclouddirectory/2017-01-11/typedlink/outgoing";
707
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/outgoing");
1081
708
  let body;
1082
709
  body = JSON.stringify(take(input, {
1083
710
  ConsistencyLevel: [],
@@ -1087,414 +714,273 @@ export const se_ListOutgoingTypedLinksCommand = async (input, context) => {
1087
714
  NextToken: [],
1088
715
  ObjectReference: (_) => _json(_),
1089
716
  }));
1090
- return new __HttpRequest({
1091
- protocol,
1092
- hostname,
1093
- port,
1094
- method: "POST",
1095
- headers,
1096
- path: resolvedPath,
1097
- body,
1098
- });
717
+ b.m("POST").h(headers).b(body);
718
+ return b.build();
1099
719
  };
1100
720
  export const se_ListPolicyAttachmentsCommand = async (input, context) => {
1101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
721
+ const b = rb(input, context);
1102
722
  const headers = map({}, isSerializableHeaderValue, {
1103
723
  "content-type": "application/json",
1104
- "x-amz-data-partition": input.DirectoryArn,
1105
- "x-amz-consistency-level": input.ConsistencyLevel,
724
+ [_xadp]: input[_DA],
725
+ [_xacl]: input[_CL],
1106
726
  });
1107
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1108
- "/amazonclouddirectory/2017-01-11/policy/attachment";
727
+ b.bp("/amazonclouddirectory/2017-01-11/policy/attachment");
1109
728
  let body;
1110
729
  body = JSON.stringify(take(input, {
1111
730
  MaxResults: [],
1112
731
  NextToken: [],
1113
732
  PolicyReference: (_) => _json(_),
1114
733
  }));
1115
- return new __HttpRequest({
1116
- protocol,
1117
- hostname,
1118
- port,
1119
- method: "POST",
1120
- headers,
1121
- path: resolvedPath,
1122
- body,
1123
- });
734
+ b.m("POST").h(headers).b(body);
735
+ return b.build();
1124
736
  };
1125
737
  export const se_ListPublishedSchemaArnsCommand = async (input, context) => {
1126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
738
+ const b = rb(input, context);
1127
739
  const headers = {
1128
740
  "content-type": "application/json",
1129
741
  };
1130
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1131
- "/amazonclouddirectory/2017-01-11/schema/published";
742
+ b.bp("/amazonclouddirectory/2017-01-11/schema/published");
1132
743
  let body;
1133
744
  body = JSON.stringify(take(input, {
1134
745
  MaxResults: [],
1135
746
  NextToken: [],
1136
747
  SchemaArn: [],
1137
748
  }));
1138
- return new __HttpRequest({
1139
- protocol,
1140
- hostname,
1141
- port,
1142
- method: "POST",
1143
- headers,
1144
- path: resolvedPath,
1145
- body,
1146
- });
749
+ b.m("POST").h(headers).b(body);
750
+ return b.build();
1147
751
  };
1148
752
  export const se_ListTagsForResourceCommand = async (input, context) => {
1149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
753
+ const b = rb(input, context);
1150
754
  const headers = {
1151
755
  "content-type": "application/json",
1152
756
  };
1153
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags";
757
+ b.bp("/amazonclouddirectory/2017-01-11/tags");
1154
758
  let body;
1155
759
  body = JSON.stringify(take(input, {
1156
760
  MaxResults: [],
1157
761
  NextToken: [],
1158
762
  ResourceArn: [],
1159
763
  }));
1160
- return new __HttpRequest({
1161
- protocol,
1162
- hostname,
1163
- port,
1164
- method: "POST",
1165
- headers,
1166
- path: resolvedPath,
1167
- body,
1168
- });
764
+ b.m("POST").h(headers).b(body);
765
+ return b.build();
1169
766
  };
1170
767
  export const se_ListTypedLinkFacetAttributesCommand = async (input, context) => {
1171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
768
+ const b = rb(input, context);
1172
769
  const headers = map({}, isSerializableHeaderValue, {
1173
770
  "content-type": "application/json",
1174
- "x-amz-data-partition": input.SchemaArn,
771
+ [_xadp]: input[_SA],
1175
772
  });
1176
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1177
- "/amazonclouddirectory/2017-01-11/typedlink/facet/attributes";
773
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/facet/attributes");
1178
774
  let body;
1179
775
  body = JSON.stringify(take(input, {
1180
776
  MaxResults: [],
1181
777
  Name: [],
1182
778
  NextToken: [],
1183
779
  }));
1184
- return new __HttpRequest({
1185
- protocol,
1186
- hostname,
1187
- port,
1188
- method: "POST",
1189
- headers,
1190
- path: resolvedPath,
1191
- body,
1192
- });
780
+ b.m("POST").h(headers).b(body);
781
+ return b.build();
1193
782
  };
1194
783
  export const se_ListTypedLinkFacetNamesCommand = async (input, context) => {
1195
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
784
+ const b = rb(input, context);
1196
785
  const headers = map({}, isSerializableHeaderValue, {
1197
786
  "content-type": "application/json",
1198
- "x-amz-data-partition": input.SchemaArn,
787
+ [_xadp]: input[_SA],
1199
788
  });
1200
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1201
- "/amazonclouddirectory/2017-01-11/typedlink/facet/list";
789
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/facet/list");
1202
790
  let body;
1203
791
  body = JSON.stringify(take(input, {
1204
792
  MaxResults: [],
1205
793
  NextToken: [],
1206
794
  }));
1207
- return new __HttpRequest({
1208
- protocol,
1209
- hostname,
1210
- port,
1211
- method: "POST",
1212
- headers,
1213
- path: resolvedPath,
1214
- body,
1215
- });
795
+ b.m("POST").h(headers).b(body);
796
+ return b.build();
1216
797
  };
1217
798
  export const se_LookupPolicyCommand = async (input, context) => {
1218
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
799
+ const b = rb(input, context);
1219
800
  const headers = map({}, isSerializableHeaderValue, {
1220
801
  "content-type": "application/json",
1221
- "x-amz-data-partition": input.DirectoryArn,
802
+ [_xadp]: input[_DA],
1222
803
  });
1223
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1224
- "/amazonclouddirectory/2017-01-11/policy/lookup";
804
+ b.bp("/amazonclouddirectory/2017-01-11/policy/lookup");
1225
805
  let body;
1226
806
  body = JSON.stringify(take(input, {
1227
807
  MaxResults: [],
1228
808
  NextToken: [],
1229
809
  ObjectReference: (_) => _json(_),
1230
810
  }));
1231
- return new __HttpRequest({
1232
- protocol,
1233
- hostname,
1234
- port,
1235
- method: "POST",
1236
- headers,
1237
- path: resolvedPath,
1238
- body,
1239
- });
811
+ b.m("POST").h(headers).b(body);
812
+ return b.build();
1240
813
  };
1241
814
  export const se_PublishSchemaCommand = async (input, context) => {
1242
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
815
+ const b = rb(input, context);
1243
816
  const headers = map({}, isSerializableHeaderValue, {
1244
817
  "content-type": "application/json",
1245
- "x-amz-data-partition": input.DevelopmentSchemaArn,
818
+ [_xadp]: input[_DSA],
1246
819
  });
1247
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1248
- "/amazonclouddirectory/2017-01-11/schema/publish";
820
+ b.bp("/amazonclouddirectory/2017-01-11/schema/publish");
1249
821
  let body;
1250
822
  body = JSON.stringify(take(input, {
1251
823
  MinorVersion: [],
1252
824
  Name: [],
1253
825
  Version: [],
1254
826
  }));
1255
- return new __HttpRequest({
1256
- protocol,
1257
- hostname,
1258
- port,
1259
- method: "PUT",
1260
- headers,
1261
- path: resolvedPath,
1262
- body,
1263
- });
827
+ b.m("PUT").h(headers).b(body);
828
+ return b.build();
1264
829
  };
1265
830
  export const se_PutSchemaFromJsonCommand = async (input, context) => {
1266
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
831
+ const b = rb(input, context);
1267
832
  const headers = map({}, isSerializableHeaderValue, {
1268
833
  "content-type": "application/json",
1269
- "x-amz-data-partition": input.SchemaArn,
834
+ [_xadp]: input[_SA],
1270
835
  });
1271
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1272
- "/amazonclouddirectory/2017-01-11/schema/json";
836
+ b.bp("/amazonclouddirectory/2017-01-11/schema/json");
1273
837
  let body;
1274
838
  body = JSON.stringify(take(input, {
1275
839
  Document: [],
1276
840
  }));
1277
- return new __HttpRequest({
1278
- protocol,
1279
- hostname,
1280
- port,
1281
- method: "PUT",
1282
- headers,
1283
- path: resolvedPath,
1284
- body,
1285
- });
841
+ b.m("PUT").h(headers).b(body);
842
+ return b.build();
1286
843
  };
1287
844
  export const se_RemoveFacetFromObjectCommand = async (input, context) => {
1288
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
845
+ const b = rb(input, context);
1289
846
  const headers = map({}, isSerializableHeaderValue, {
1290
847
  "content-type": "application/json",
1291
- "x-amz-data-partition": input.DirectoryArn,
848
+ [_xadp]: input[_DA],
1292
849
  });
1293
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1294
- "/amazonclouddirectory/2017-01-11/object/facets/delete";
850
+ b.bp("/amazonclouddirectory/2017-01-11/object/facets/delete");
1295
851
  let body;
1296
852
  body = JSON.stringify(take(input, {
1297
853
  ObjectReference: (_) => _json(_),
1298
854
  SchemaFacet: (_) => _json(_),
1299
855
  }));
1300
- return new __HttpRequest({
1301
- protocol,
1302
- hostname,
1303
- port,
1304
- method: "PUT",
1305
- headers,
1306
- path: resolvedPath,
1307
- body,
1308
- });
856
+ b.m("PUT").h(headers).b(body);
857
+ return b.build();
1309
858
  };
1310
859
  export const se_TagResourceCommand = async (input, context) => {
1311
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
860
+ const b = rb(input, context);
1312
861
  const headers = {
1313
862
  "content-type": "application/json",
1314
863
  };
1315
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags/add";
864
+ b.bp("/amazonclouddirectory/2017-01-11/tags/add");
1316
865
  let body;
1317
866
  body = JSON.stringify(take(input, {
1318
867
  ResourceArn: [],
1319
868
  Tags: (_) => _json(_),
1320
869
  }));
1321
- return new __HttpRequest({
1322
- protocol,
1323
- hostname,
1324
- port,
1325
- method: "PUT",
1326
- headers,
1327
- path: resolvedPath,
1328
- body,
1329
- });
870
+ b.m("PUT").h(headers).b(body);
871
+ return b.build();
1330
872
  };
1331
873
  export const se_UntagResourceCommand = async (input, context) => {
1332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
874
+ const b = rb(input, context);
1333
875
  const headers = {
1334
876
  "content-type": "application/json",
1335
877
  };
1336
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1337
- "/amazonclouddirectory/2017-01-11/tags/remove";
878
+ b.bp("/amazonclouddirectory/2017-01-11/tags/remove");
1338
879
  let body;
1339
880
  body = JSON.stringify(take(input, {
1340
881
  ResourceArn: [],
1341
882
  TagKeys: (_) => _json(_),
1342
883
  }));
1343
- return new __HttpRequest({
1344
- protocol,
1345
- hostname,
1346
- port,
1347
- method: "PUT",
1348
- headers,
1349
- path: resolvedPath,
1350
- body,
1351
- });
884
+ b.m("PUT").h(headers).b(body);
885
+ return b.build();
1352
886
  };
1353
887
  export const se_UpdateFacetCommand = async (input, context) => {
1354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
888
+ const b = rb(input, context);
1355
889
  const headers = map({}, isSerializableHeaderValue, {
1356
890
  "content-type": "application/json",
1357
- "x-amz-data-partition": input.SchemaArn,
891
+ [_xadp]: input[_SA],
1358
892
  });
1359
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet";
893
+ b.bp("/amazonclouddirectory/2017-01-11/facet");
1360
894
  let body;
1361
895
  body = JSON.stringify(take(input, {
1362
896
  AttributeUpdates: (_) => se_FacetAttributeUpdateList(_, context),
1363
897
  Name: [],
1364
898
  ObjectType: [],
1365
899
  }));
1366
- return new __HttpRequest({
1367
- protocol,
1368
- hostname,
1369
- port,
1370
- method: "PUT",
1371
- headers,
1372
- path: resolvedPath,
1373
- body,
1374
- });
900
+ b.m("PUT").h(headers).b(body);
901
+ return b.build();
1375
902
  };
1376
903
  export const se_UpdateLinkAttributesCommand = async (input, context) => {
1377
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
904
+ const b = rb(input, context);
1378
905
  const headers = map({}, isSerializableHeaderValue, {
1379
906
  "content-type": "application/json",
1380
- "x-amz-data-partition": input.DirectoryArn,
907
+ [_xadp]: input[_DA],
1381
908
  });
1382
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1383
- "/amazonclouddirectory/2017-01-11/typedlink/attributes/update";
909
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/attributes/update");
1384
910
  let body;
1385
911
  body = JSON.stringify(take(input, {
1386
912
  AttributeUpdates: (_) => se_LinkAttributeUpdateList(_, context),
1387
913
  TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context),
1388
914
  }));
1389
- return new __HttpRequest({
1390
- protocol,
1391
- hostname,
1392
- port,
1393
- method: "POST",
1394
- headers,
1395
- path: resolvedPath,
1396
- body,
1397
- });
915
+ b.m("POST").h(headers).b(body);
916
+ return b.build();
1398
917
  };
1399
918
  export const se_UpdateObjectAttributesCommand = async (input, context) => {
1400
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
919
+ const b = rb(input, context);
1401
920
  const headers = map({}, isSerializableHeaderValue, {
1402
921
  "content-type": "application/json",
1403
- "x-amz-data-partition": input.DirectoryArn,
922
+ [_xadp]: input[_DA],
1404
923
  });
1405
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1406
- "/amazonclouddirectory/2017-01-11/object/update";
924
+ b.bp("/amazonclouddirectory/2017-01-11/object/update");
1407
925
  let body;
1408
926
  body = JSON.stringify(take(input, {
1409
927
  AttributeUpdates: (_) => se_ObjectAttributeUpdateList(_, context),
1410
928
  ObjectReference: (_) => _json(_),
1411
929
  }));
1412
- return new __HttpRequest({
1413
- protocol,
1414
- hostname,
1415
- port,
1416
- method: "PUT",
1417
- headers,
1418
- path: resolvedPath,
1419
- body,
1420
- });
930
+ b.m("PUT").h(headers).b(body);
931
+ return b.build();
1421
932
  };
1422
933
  export const se_UpdateSchemaCommand = async (input, context) => {
1423
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
934
+ const b = rb(input, context);
1424
935
  const headers = map({}, isSerializableHeaderValue, {
1425
936
  "content-type": "application/json",
1426
- "x-amz-data-partition": input.SchemaArn,
937
+ [_xadp]: input[_SA],
1427
938
  });
1428
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1429
- "/amazonclouddirectory/2017-01-11/schema/update";
939
+ b.bp("/amazonclouddirectory/2017-01-11/schema/update");
1430
940
  let body;
1431
941
  body = JSON.stringify(take(input, {
1432
942
  Name: [],
1433
943
  }));
1434
- return new __HttpRequest({
1435
- protocol,
1436
- hostname,
1437
- port,
1438
- method: "PUT",
1439
- headers,
1440
- path: resolvedPath,
1441
- body,
1442
- });
944
+ b.m("PUT").h(headers).b(body);
945
+ return b.build();
1443
946
  };
1444
947
  export const se_UpdateTypedLinkFacetCommand = async (input, context) => {
1445
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
948
+ const b = rb(input, context);
1446
949
  const headers = map({}, isSerializableHeaderValue, {
1447
950
  "content-type": "application/json",
1448
- "x-amz-data-partition": input.SchemaArn,
951
+ [_xadp]: input[_SA],
1449
952
  });
1450
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1451
- "/amazonclouddirectory/2017-01-11/typedlink/facet";
953
+ b.bp("/amazonclouddirectory/2017-01-11/typedlink/facet");
1452
954
  let body;
1453
955
  body = JSON.stringify(take(input, {
1454
956
  AttributeUpdates: (_) => se_TypedLinkFacetAttributeUpdateList(_, context),
1455
957
  IdentityAttributeOrder: (_) => _json(_),
1456
958
  Name: [],
1457
959
  }));
1458
- return new __HttpRequest({
1459
- protocol,
1460
- hostname,
1461
- port,
1462
- method: "PUT",
1463
- headers,
1464
- path: resolvedPath,
1465
- body,
1466
- });
960
+ b.m("PUT").h(headers).b(body);
961
+ return b.build();
1467
962
  };
1468
963
  export const se_UpgradeAppliedSchemaCommand = async (input, context) => {
1469
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
964
+ const b = rb(input, context);
1470
965
  const headers = {
1471
966
  "content-type": "application/json",
1472
967
  };
1473
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1474
- "/amazonclouddirectory/2017-01-11/schema/upgradeapplied";
968
+ b.bp("/amazonclouddirectory/2017-01-11/schema/upgradeapplied");
1475
969
  let body;
1476
970
  body = JSON.stringify(take(input, {
1477
971
  DirectoryArn: [],
1478
972
  DryRun: [],
1479
973
  PublishedSchemaArn: [],
1480
974
  }));
1481
- return new __HttpRequest({
1482
- protocol,
1483
- hostname,
1484
- port,
1485
- method: "PUT",
1486
- headers,
1487
- path: resolvedPath,
1488
- body,
1489
- });
975
+ b.m("PUT").h(headers).b(body);
976
+ return b.build();
1490
977
  };
1491
978
  export const se_UpgradePublishedSchemaCommand = async (input, context) => {
1492
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
979
+ const b = rb(input, context);
1493
980
  const headers = {
1494
981
  "content-type": "application/json",
1495
982
  };
1496
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1497
- "/amazonclouddirectory/2017-01-11/schema/upgradepublished";
983
+ b.bp("/amazonclouddirectory/2017-01-11/schema/upgradepublished");
1498
984
  let body;
1499
985
  body = JSON.stringify(take(input, {
1500
986
  DevelopmentSchemaArn: [],
@@ -1502,15 +988,8 @@ export const se_UpgradePublishedSchemaCommand = async (input, context) => {
1502
988
  MinorVersion: [],
1503
989
  PublishedSchemaArn: [],
1504
990
  }));
1505
- return new __HttpRequest({
1506
- protocol,
1507
- hostname,
1508
- port,
1509
- method: "PUT",
1510
- headers,
1511
- path: resolvedPath,
1512
- body,
1513
- });
991
+ b.m("PUT").h(headers).b(body);
992
+ return b.build();
1514
993
  };
1515
994
  export const de_AddFacetToObjectCommand = async (output, context) => {
1516
995
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -6235,6 +5714,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
6235
5714
  value !== "" &&
6236
5715
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
6237
5716
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
5717
+ const _CL = "ConsistencyLevel";
5718
+ const _DA = "DirectoryArn";
5719
+ const _DSA = "DevelopmentSchemaArn";
5720
+ const _SA = "SchemaArn";
5721
+ const _xacl = "x-amz-consistency-level";
5722
+ const _xadp = "x-amz-data-partition";
6238
5723
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
6239
5724
  if (encoded.length) {
6240
5725
  return JSON.parse(encoded);