@aws-sdk/client-pca-connector-ad 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,15 +1,15 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, 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";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, 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 { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  import { PcaConnectorAdServiceException as __BaseException } from "../models/PcaConnectorAdServiceException";
7
7
  export const se_CreateConnectorCommand = async (input, context) => {
8
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
9
9
  const headers = {
10
10
  "content-type": "application/json",
11
11
  };
12
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors";
12
+ b.bp("/connectors");
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
15
  CertificateAuthorityArn: [],
@@ -18,67 +18,45 @@ export const se_CreateConnectorCommand = async (input, context) => {
18
18
  Tags: (_) => _json(_),
19
19
  VpcInformation: (_) => _json(_),
20
20
  }));
21
- return new __HttpRequest({
22
- protocol,
23
- hostname,
24
- port,
25
- method: "POST",
26
- headers,
27
- path: resolvedPath,
28
- body,
29
- });
21
+ b.m("POST").h(headers).b(body);
22
+ return b.build();
30
23
  };
31
24
  export const se_CreateDirectoryRegistrationCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = rb(input, context);
33
26
  const headers = {
34
27
  "content-type": "application/json",
35
28
  };
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/directoryRegistrations";
29
+ b.bp("/directoryRegistrations");
37
30
  let body;
38
31
  body = JSON.stringify(take(input, {
39
32
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
40
33
  DirectoryId: [],
41
34
  Tags: (_) => _json(_),
42
35
  }));
43
- return new __HttpRequest({
44
- protocol,
45
- hostname,
46
- port,
47
- method: "POST",
48
- headers,
49
- path: resolvedPath,
50
- body,
51
- });
36
+ b.m("POST").h(headers).b(body);
37
+ return b.build();
52
38
  };
53
39
  export const se_CreateServicePrincipalNameCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = rb(input, context);
55
41
  const headers = {
56
42
  "content-type": "application/json",
57
43
  };
58
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
59
- "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}";
60
- resolvedPath = __resolvedPath(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
61
- resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
44
+ b.bp("/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}");
45
+ b.p("DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
46
+ b.p("ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
62
47
  let body;
63
48
  body = JSON.stringify(take(input, {
64
49
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
65
50
  }));
66
- return new __HttpRequest({
67
- protocol,
68
- hostname,
69
- port,
70
- method: "POST",
71
- headers,
72
- path: resolvedPath,
73
- body,
74
- });
51
+ b.m("POST").h(headers).b(body);
52
+ return b.build();
75
53
  };
76
54
  export const se_CreateTemplateCommand = async (input, context) => {
77
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = rb(input, context);
78
56
  const headers = {
79
57
  "content-type": "application/json",
80
58
  };
81
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates";
59
+ b.bp("/templates");
82
60
  let body;
83
61
  body = JSON.stringify(take(input, {
84
62
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -87,24 +65,16 @@ export const se_CreateTemplateCommand = async (input, context) => {
87
65
  Name: [],
88
66
  Tags: (_) => _json(_),
89
67
  }));
90
- return new __HttpRequest({
91
- protocol,
92
- hostname,
93
- port,
94
- method: "POST",
95
- headers,
96
- path: resolvedPath,
97
- body,
98
- });
68
+ b.m("POST").h(headers).b(body);
69
+ return b.build();
99
70
  };
100
71
  export const se_CreateTemplateGroupAccessControlEntryCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
72
+ const b = rb(input, context);
102
73
  const headers = {
103
74
  "content-type": "application/json",
104
75
  };
105
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
106
- "/templates/{TemplateArn}/accessControlEntries";
107
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
76
+ b.bp("/templates/{TemplateArn}/accessControlEntries");
77
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
108
78
  let body;
109
79
  body = JSON.stringify(take(input, {
110
80
  AccessRights: (_) => _json(_),
@@ -112,396 +82,234 @@ export const se_CreateTemplateGroupAccessControlEntryCommand = async (input, con
112
82
  GroupDisplayName: [],
113
83
  GroupSecurityIdentifier: [],
114
84
  }));
115
- return new __HttpRequest({
116
- protocol,
117
- hostname,
118
- port,
119
- method: "POST",
120
- headers,
121
- path: resolvedPath,
122
- body,
123
- });
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
124
87
  };
125
88
  export const se_DeleteConnectorCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
127
90
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors/{ConnectorArn}";
129
- resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
91
+ b.bp("/connectors/{ConnectorArn}");
92
+ b.p("ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
130
93
  let body;
131
- return new __HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "DELETE",
136
- headers,
137
- path: resolvedPath,
138
- body,
139
- });
94
+ b.m("DELETE").h(headers).b(body);
95
+ return b.build();
140
96
  };
141
97
  export const se_DeleteDirectoryRegistrationCommand = async (input, context) => {
142
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
143
99
  const headers = {};
144
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
145
- "/directoryRegistrations/{DirectoryRegistrationArn}";
146
- resolvedPath = __resolvedPath(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
100
+ b.bp("/directoryRegistrations/{DirectoryRegistrationArn}");
101
+ b.p("DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
147
102
  let body;
148
- return new __HttpRequest({
149
- protocol,
150
- hostname,
151
- port,
152
- method: "DELETE",
153
- headers,
154
- path: resolvedPath,
155
- body,
156
- });
103
+ b.m("DELETE").h(headers).b(body);
104
+ return b.build();
157
105
  };
158
106
  export const se_DeleteServicePrincipalNameCommand = async (input, context) => {
159
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = rb(input, context);
160
108
  const headers = {};
161
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
162
- "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}";
163
- resolvedPath = __resolvedPath(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
164
- resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
109
+ b.bp("/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}");
110
+ b.p("DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
111
+ b.p("ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
165
112
  let body;
166
- return new __HttpRequest({
167
- protocol,
168
- hostname,
169
- port,
170
- method: "DELETE",
171
- headers,
172
- path: resolvedPath,
173
- body,
174
- });
113
+ b.m("DELETE").h(headers).b(body);
114
+ return b.build();
175
115
  };
176
116
  export const se_DeleteTemplateCommand = async (input, context) => {
177
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
117
+ const b = rb(input, context);
178
118
  const headers = {};
179
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateArn}";
180
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
119
+ b.bp("/templates/{TemplateArn}");
120
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
181
121
  let body;
182
- return new __HttpRequest({
183
- protocol,
184
- hostname,
185
- port,
186
- method: "DELETE",
187
- headers,
188
- path: resolvedPath,
189
- body,
190
- });
122
+ b.m("DELETE").h(headers).b(body);
123
+ return b.build();
191
124
  };
192
125
  export const se_DeleteTemplateGroupAccessControlEntryCommand = async (input, context) => {
193
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const b = rb(input, context);
194
127
  const headers = {};
195
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
196
- "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}";
197
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
198
- resolvedPath = __resolvedPath(resolvedPath, input, "GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
128
+ b.bp("/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}");
129
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
130
+ b.p("GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
199
131
  let body;
200
- return new __HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "DELETE",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
132
+ b.m("DELETE").h(headers).b(body);
133
+ return b.build();
209
134
  };
210
135
  export const se_GetConnectorCommand = async (input, context) => {
211
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = rb(input, context);
212
137
  const headers = {};
213
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors/{ConnectorArn}";
214
- resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
138
+ b.bp("/connectors/{ConnectorArn}");
139
+ b.p("ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
215
140
  let body;
216
- return new __HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "GET",
221
- headers,
222
- path: resolvedPath,
223
- body,
224
- });
141
+ b.m("GET").h(headers).b(body);
142
+ return b.build();
225
143
  };
226
144
  export const se_GetDirectoryRegistrationCommand = async (input, context) => {
227
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = rb(input, context);
228
146
  const headers = {};
229
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
230
- "/directoryRegistrations/{DirectoryRegistrationArn}";
231
- resolvedPath = __resolvedPath(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
147
+ b.bp("/directoryRegistrations/{DirectoryRegistrationArn}");
148
+ b.p("DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
232
149
  let body;
233
- return new __HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "GET",
238
- headers,
239
- path: resolvedPath,
240
- body,
241
- });
150
+ b.m("GET").h(headers).b(body);
151
+ return b.build();
242
152
  };
243
153
  export const se_GetServicePrincipalNameCommand = async (input, context) => {
244
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = rb(input, context);
245
155
  const headers = {};
246
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
247
- "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}";
248
- resolvedPath = __resolvedPath(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
249
- resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
156
+ b.bp("/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}");
157
+ b.p("DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
158
+ b.p("ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
250
159
  let body;
251
- return new __HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "GET",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
160
+ b.m("GET").h(headers).b(body);
161
+ return b.build();
260
162
  };
261
163
  export const se_GetTemplateCommand = async (input, context) => {
262
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
164
+ const b = rb(input, context);
263
165
  const headers = {};
264
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateArn}";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
166
+ b.bp("/templates/{TemplateArn}");
167
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
266
168
  let body;
267
- return new __HttpRequest({
268
- protocol,
269
- hostname,
270
- port,
271
- method: "GET",
272
- headers,
273
- path: resolvedPath,
274
- body,
275
- });
169
+ b.m("GET").h(headers).b(body);
170
+ return b.build();
276
171
  };
277
172
  export const se_GetTemplateGroupAccessControlEntryCommand = async (input, context) => {
278
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = rb(input, context);
279
174
  const headers = {};
280
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
281
- "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}";
282
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
283
- resolvedPath = __resolvedPath(resolvedPath, input, "GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
175
+ b.bp("/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}");
176
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
177
+ b.p("GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
284
178
  let body;
285
- return new __HttpRequest({
286
- protocol,
287
- hostname,
288
- port,
289
- method: "GET",
290
- headers,
291
- path: resolvedPath,
292
- body,
293
- });
179
+ b.m("GET").h(headers).b(body);
180
+ return b.build();
294
181
  };
295
182
  export const se_ListConnectorsCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
297
184
  const headers = {};
298
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors";
185
+ b.bp("/connectors");
299
186
  const query = map({
300
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
301
- NextToken: [, input.NextToken],
187
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
188
+ [_NT]: [, input[_NT]],
302
189
  });
303
190
  let body;
304
- return new __HttpRequest({
305
- protocol,
306
- hostname,
307
- port,
308
- method: "GET",
309
- headers,
310
- path: resolvedPath,
311
- query,
312
- body,
313
- });
191
+ b.m("GET").h(headers).q(query).b(body);
192
+ return b.build();
314
193
  };
315
194
  export const se_ListDirectoryRegistrationsCommand = async (input, context) => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = rb(input, context);
317
196
  const headers = {};
318
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/directoryRegistrations";
197
+ b.bp("/directoryRegistrations");
319
198
  const query = map({
320
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
321
- NextToken: [, input.NextToken],
199
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
200
+ [_NT]: [, input[_NT]],
322
201
  });
323
202
  let body;
324
- return new __HttpRequest({
325
- protocol,
326
- hostname,
327
- port,
328
- method: "GET",
329
- headers,
330
- path: resolvedPath,
331
- query,
332
- body,
333
- });
203
+ b.m("GET").h(headers).q(query).b(body);
204
+ return b.build();
334
205
  };
335
206
  export const se_ListServicePrincipalNamesCommand = async (input, context) => {
336
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
207
+ const b = rb(input, context);
337
208
  const headers = {};
338
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
339
- "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames";
340
- resolvedPath = __resolvedPath(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
209
+ b.bp("/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames");
210
+ b.p("DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
341
211
  const query = map({
342
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
343
- NextToken: [, input.NextToken],
212
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
213
+ [_NT]: [, input[_NT]],
344
214
  });
345
215
  let body;
346
- return new __HttpRequest({
347
- protocol,
348
- hostname,
349
- port,
350
- method: "GET",
351
- headers,
352
- path: resolvedPath,
353
- query,
354
- body,
355
- });
216
+ b.m("GET").h(headers).q(query).b(body);
217
+ return b.build();
356
218
  };
357
219
  export const se_ListTagsForResourceCommand = async (input, context) => {
358
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
220
+ const b = rb(input, context);
359
221
  const headers = {};
360
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
361
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
222
+ b.bp("/tags/{ResourceArn}");
223
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
362
224
  let body;
363
- return new __HttpRequest({
364
- protocol,
365
- hostname,
366
- port,
367
- method: "GET",
368
- headers,
369
- path: resolvedPath,
370
- body,
371
- });
225
+ b.m("GET").h(headers).b(body);
226
+ return b.build();
372
227
  };
373
228
  export const se_ListTemplateGroupAccessControlEntriesCommand = async (input, context) => {
374
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
229
+ const b = rb(input, context);
375
230
  const headers = {};
376
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
377
- "/templates/{TemplateArn}/accessControlEntries";
378
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
231
+ b.bp("/templates/{TemplateArn}/accessControlEntries");
232
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
379
233
  const query = map({
380
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
381
- NextToken: [, input.NextToken],
234
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
235
+ [_NT]: [, input[_NT]],
382
236
  });
383
237
  let body;
384
- return new __HttpRequest({
385
- protocol,
386
- hostname,
387
- port,
388
- method: "GET",
389
- headers,
390
- path: resolvedPath,
391
- query,
392
- body,
393
- });
238
+ b.m("GET").h(headers).q(query).b(body);
239
+ return b.build();
394
240
  };
395
241
  export const se_ListTemplatesCommand = async (input, context) => {
396
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
242
+ const b = rb(input, context);
397
243
  const headers = {};
398
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates";
244
+ b.bp("/templates");
399
245
  const query = map({
400
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
401
- NextToken: [, input.NextToken],
402
- ConnectorArn: [, __expectNonNull(input.ConnectorArn, `ConnectorArn`)],
246
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
247
+ [_NT]: [, input[_NT]],
248
+ [_CA]: [, __expectNonNull(input[_CA], `ConnectorArn`)],
403
249
  });
404
250
  let body;
405
- return new __HttpRequest({
406
- protocol,
407
- hostname,
408
- port,
409
- method: "GET",
410
- headers,
411
- path: resolvedPath,
412
- query,
413
- body,
414
- });
251
+ b.m("GET").h(headers).q(query).b(body);
252
+ return b.build();
415
253
  };
416
254
  export const se_TagResourceCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const b = rb(input, context);
418
256
  const headers = {
419
257
  "content-type": "application/json",
420
258
  };
421
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
422
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
259
+ b.bp("/tags/{ResourceArn}");
260
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
423
261
  let body;
424
262
  body = JSON.stringify(take(input, {
425
263
  Tags: (_) => _json(_),
426
264
  }));
427
- return new __HttpRequest({
428
- protocol,
429
- hostname,
430
- port,
431
- method: "POST",
432
- headers,
433
- path: resolvedPath,
434
- body,
435
- });
265
+ b.m("POST").h(headers).b(body);
266
+ return b.build();
436
267
  };
437
268
  export const se_UntagResourceCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
269
+ const b = rb(input, context);
439
270
  const headers = {};
440
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
441
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
271
+ b.bp("/tags/{ResourceArn}");
272
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
442
273
  const query = map({
443
- tagKeys: [
274
+ [_tK]: [
444
275
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
445
- () => (input.TagKeys || []).map((_entry) => _entry),
276
+ () => (input[_TK] || []).map((_entry) => _entry),
446
277
  ],
447
278
  });
448
279
  let body;
449
- return new __HttpRequest({
450
- protocol,
451
- hostname,
452
- port,
453
- method: "DELETE",
454
- headers,
455
- path: resolvedPath,
456
- query,
457
- body,
458
- });
280
+ b.m("DELETE").h(headers).q(query).b(body);
281
+ return b.build();
459
282
  };
460
283
  export const se_UpdateTemplateCommand = async (input, context) => {
461
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
+ const b = rb(input, context);
462
285
  const headers = {
463
286
  "content-type": "application/json",
464
287
  };
465
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateArn}";
466
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
288
+ b.bp("/templates/{TemplateArn}");
289
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
467
290
  let body;
468
291
  body = JSON.stringify(take(input, {
469
292
  Definition: (_) => _json(_),
470
293
  ReenrollAllCertificateHolders: [],
471
294
  }));
472
- return new __HttpRequest({
473
- protocol,
474
- hostname,
475
- port,
476
- method: "PATCH",
477
- headers,
478
- path: resolvedPath,
479
- body,
480
- });
295
+ b.m("PATCH").h(headers).b(body);
296
+ return b.build();
481
297
  };
482
298
  export const se_UpdateTemplateGroupAccessControlEntryCommand = async (input, context) => {
483
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const b = rb(input, context);
484
300
  const headers = {
485
301
  "content-type": "application/json",
486
302
  };
487
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
488
- "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}";
489
- resolvedPath = __resolvedPath(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
490
- resolvedPath = __resolvedPath(resolvedPath, input, "GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
303
+ b.bp("/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}");
304
+ b.p("TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
305
+ b.p("GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
491
306
  let body;
492
307
  body = JSON.stringify(take(input, {
493
308
  AccessRights: (_) => _json(_),
494
309
  GroupDisplayName: [],
495
310
  }));
496
- return new __HttpRequest({
497
- protocol,
498
- hostname,
499
- port,
500
- method: "PATCH",
501
- headers,
502
- path: resolvedPath,
503
- body,
504
- });
311
+ b.m("PATCH").h(headers).b(body);
312
+ return b.build();
505
313
  };
506
314
  export const de_CreateConnectorCommand = async (output, context) => {
507
315
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1891,6 +1699,11 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1891
1699
  value !== "" &&
1892
1700
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1893
1701
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1702
+ const _CA = "ConnectorArn";
1703
+ const _MR = "MaxResults";
1704
+ const _NT = "NextToken";
1705
+ const _TK = "TagKeys";
1706
+ const _tK = "tagKeys";
1894
1707
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1895
1708
  if (encoded.length) {
1896
1709
  return JSON.parse(encoded);