@aws-sdk/client-chime-sdk-identity 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,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ChimeSDKIdentityServiceException as __BaseException } from "../models/ChimeSDKIdentityServiceException";
5
5
  import { BadRequestException, ConflictException, ForbiddenException, NotFoundException, ResourceLimitExceededException, ServiceFailureException, ServiceUnavailableException, ThrottledClientException, UnauthorizedClientException, } from "../models/models_0";
6
6
  export const se_CreateAppInstanceCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances";
11
+ b.bp("/app-instances");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -16,43 +16,29 @@ export const se_CreateAppInstanceCommand = async (input, context) => {
16
16
  Name: [],
17
17
  Tags: (_) => _json(_),
18
18
  }));
19
- return new __HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  export const se_CreateAppInstanceAdminCommand = async (input, context) => {
30
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
31
24
  const headers = {
32
25
  "content-type": "application/json",
33
26
  };
34
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}/admins";
35
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
27
+ b.bp("/app-instances/{AppInstanceArn}/admins");
28
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
36
29
  let body;
37
30
  body = JSON.stringify(take(input, {
38
31
  AppInstanceAdminArn: [],
39
32
  }));
40
- return new __HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  export const se_CreateAppInstanceBotCommand = async (input, context) => {
51
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
52
38
  const headers = {
53
39
  "content-type": "application/json",
54
40
  };
55
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots";
41
+ b.bp("/app-instance-bots");
56
42
  let body;
57
43
  body = JSON.stringify(take(input, {
58
44
  AppInstanceArn: [],
@@ -62,22 +48,15 @@ export const se_CreateAppInstanceBotCommand = async (input, context) => {
62
48
  Name: [],
63
49
  Tags: (_) => _json(_),
64
50
  }));
65
- return new __HttpRequest({
66
- protocol,
67
- hostname,
68
- port,
69
- method: "POST",
70
- headers,
71
- path: resolvedPath,
72
- body,
73
- });
51
+ b.m("POST").h(headers).b(body);
52
+ return b.build();
74
53
  };
75
54
  export const se_CreateAppInstanceUserCommand = async (input, context) => {
76
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = rb(input, context);
77
56
  const headers = {
78
57
  "content-type": "application/json",
79
58
  };
80
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
59
+ b.bp("/app-instance-users");
81
60
  let body;
82
61
  body = JSON.stringify(take(input, {
83
62
  AppInstanceArn: [],
@@ -88,377 +67,222 @@ export const se_CreateAppInstanceUserCommand = async (input, context) => {
88
67
  Name: [],
89
68
  Tags: (_) => _json(_),
90
69
  }));
91
- return new __HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "POST",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
70
+ b.m("POST").h(headers).b(body);
71
+ return b.build();
100
72
  };
101
73
  export const se_DeleteAppInstanceCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = rb(input, context);
103
75
  const headers = {};
104
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
105
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
76
+ b.bp("/app-instances/{AppInstanceArn}");
77
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
106
78
  let body;
107
- return new __HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "DELETE",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
79
+ b.m("DELETE").h(headers).b(body);
80
+ return b.build();
116
81
  };
117
82
  export const se_DeleteAppInstanceAdminCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = rb(input, context);
119
84
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
121
- "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}";
122
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceAdminArn", () => input.AppInstanceAdminArn, "{AppInstanceAdminArn}", false);
123
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
85
+ b.bp("/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}");
86
+ b.p("AppInstanceAdminArn", () => input.AppInstanceAdminArn, "{AppInstanceAdminArn}", false);
87
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
124
88
  let body;
125
- return new __HttpRequest({
126
- protocol,
127
- hostname,
128
- port,
129
- method: "DELETE",
130
- headers,
131
- path: resolvedPath,
132
- body,
133
- });
89
+ b.m("DELETE").h(headers).b(body);
90
+ return b.build();
134
91
  };
135
92
  export const se_DeleteAppInstanceBotCommand = async (input, context) => {
136
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
93
+ const b = rb(input, context);
137
94
  const headers = {};
138
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots/{AppInstanceBotArn}";
139
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
95
+ b.bp("/app-instance-bots/{AppInstanceBotArn}");
96
+ b.p("AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
140
97
  let body;
141
- return new __HttpRequest({
142
- protocol,
143
- hostname,
144
- port,
145
- method: "DELETE",
146
- headers,
147
- path: resolvedPath,
148
- body,
149
- });
98
+ b.m("DELETE").h(headers).b(body);
99
+ return b.build();
150
100
  };
151
101
  export const se_DeleteAppInstanceUserCommand = async (input, context) => {
152
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = rb(input, context);
153
103
  const headers = {};
154
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
155
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
104
+ b.bp("/app-instance-users/{AppInstanceUserArn}");
105
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
156
106
  let body;
157
- return new __HttpRequest({
158
- protocol,
159
- hostname,
160
- port,
161
- method: "DELETE",
162
- headers,
163
- path: resolvedPath,
164
- body,
165
- });
107
+ b.m("DELETE").h(headers).b(body);
108
+ return b.build();
166
109
  };
167
110
  export const se_DeregisterAppInstanceUserEndpointCommand = async (input, context) => {
168
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
111
+ const b = rb(input, context);
169
112
  const headers = {};
170
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
171
- "/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}";
172
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
173
- resolvedPath = __resolvedPath(resolvedPath, input, "EndpointId", () => input.EndpointId, "{EndpointId}", false);
113
+ b.bp("/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}");
114
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
115
+ b.p("EndpointId", () => input.EndpointId, "{EndpointId}", false);
174
116
  let body;
175
- return new __HttpRequest({
176
- protocol,
177
- hostname,
178
- port,
179
- method: "DELETE",
180
- headers,
181
- path: resolvedPath,
182
- body,
183
- });
117
+ b.m("DELETE").h(headers).b(body);
118
+ return b.build();
184
119
  };
185
120
  export const se_DescribeAppInstanceCommand = async (input, context) => {
186
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = rb(input, context);
187
122
  const headers = {};
188
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
189
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
123
+ b.bp("/app-instances/{AppInstanceArn}");
124
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
190
125
  let body;
191
- return new __HttpRequest({
192
- protocol,
193
- hostname,
194
- port,
195
- method: "GET",
196
- headers,
197
- path: resolvedPath,
198
- body,
199
- });
126
+ b.m("GET").h(headers).b(body);
127
+ return b.build();
200
128
  };
201
129
  export const se_DescribeAppInstanceAdminCommand = async (input, context) => {
202
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = rb(input, context);
203
131
  const headers = {};
204
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
205
- "/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}";
206
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceAdminArn", () => input.AppInstanceAdminArn, "{AppInstanceAdminArn}", false);
207
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
132
+ b.bp("/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}");
133
+ b.p("AppInstanceAdminArn", () => input.AppInstanceAdminArn, "{AppInstanceAdminArn}", false);
134
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
208
135
  let body;
209
- return new __HttpRequest({
210
- protocol,
211
- hostname,
212
- port,
213
- method: "GET",
214
- headers,
215
- path: resolvedPath,
216
- body,
217
- });
136
+ b.m("GET").h(headers).b(body);
137
+ return b.build();
218
138
  };
219
139
  export const se_DescribeAppInstanceBotCommand = async (input, context) => {
220
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = rb(input, context);
221
141
  const headers = {};
222
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots/{AppInstanceBotArn}";
223
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
142
+ b.bp("/app-instance-bots/{AppInstanceBotArn}");
143
+ b.p("AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
224
144
  let body;
225
- return new __HttpRequest({
226
- protocol,
227
- hostname,
228
- port,
229
- method: "GET",
230
- headers,
231
- path: resolvedPath,
232
- body,
233
- });
145
+ b.m("GET").h(headers).b(body);
146
+ return b.build();
234
147
  };
235
148
  export const se_DescribeAppInstanceUserCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = rb(input, context);
237
150
  const headers = {};
238
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
239
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
151
+ b.bp("/app-instance-users/{AppInstanceUserArn}");
152
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
240
153
  let body;
241
- return new __HttpRequest({
242
- protocol,
243
- hostname,
244
- port,
245
- method: "GET",
246
- headers,
247
- path: resolvedPath,
248
- body,
249
- });
154
+ b.m("GET").h(headers).b(body);
155
+ return b.build();
250
156
  };
251
157
  export const se_DescribeAppInstanceUserEndpointCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = rb(input, context);
253
159
  const headers = {};
254
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
255
- "/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}";
256
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
257
- resolvedPath = __resolvedPath(resolvedPath, input, "EndpointId", () => input.EndpointId, "{EndpointId}", false);
160
+ b.bp("/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}");
161
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
162
+ b.p("EndpointId", () => input.EndpointId, "{EndpointId}", false);
258
163
  let body;
259
- return new __HttpRequest({
260
- protocol,
261
- hostname,
262
- port,
263
- method: "GET",
264
- headers,
265
- path: resolvedPath,
266
- body,
267
- });
164
+ b.m("GET").h(headers).b(body);
165
+ return b.build();
268
166
  };
269
167
  export const se_GetAppInstanceRetentionSettingsCommand = async (input, context) => {
270
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = rb(input, context);
271
169
  const headers = {};
272
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
273
- "/app-instances/{AppInstanceArn}/retention-settings";
274
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
170
+ b.bp("/app-instances/{AppInstanceArn}/retention-settings");
171
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
275
172
  let body;
276
- return new __HttpRequest({
277
- protocol,
278
- hostname,
279
- port,
280
- method: "GET",
281
- headers,
282
- path: resolvedPath,
283
- body,
284
- });
173
+ b.m("GET").h(headers).b(body);
174
+ return b.build();
285
175
  };
286
176
  export const se_ListAppInstanceAdminsCommand = async (input, context) => {
287
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = rb(input, context);
288
178
  const headers = {};
289
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}/admins";
290
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
179
+ b.bp("/app-instances/{AppInstanceArn}/admins");
180
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
291
181
  const query = map({
292
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
293
- "next-token": [, input.NextToken],
182
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
183
+ [_nt]: [, input[_NT]],
294
184
  });
295
185
  let body;
296
- return new __HttpRequest({
297
- protocol,
298
- hostname,
299
- port,
300
- method: "GET",
301
- headers,
302
- path: resolvedPath,
303
- query,
304
- body,
305
- });
186
+ b.m("GET").h(headers).q(query).b(body);
187
+ return b.build();
306
188
  };
307
189
  export const se_ListAppInstanceBotsCommand = async (input, context) => {
308
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = rb(input, context);
309
191
  const headers = {};
310
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots";
192
+ b.bp("/app-instance-bots");
311
193
  const query = map({
312
- "app-instance-arn": [, __expectNonNull(input.AppInstanceArn, `AppInstanceArn`)],
313
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
314
- "next-token": [, input.NextToken],
194
+ [_aia]: [, __expectNonNull(input[_AIA], `AppInstanceArn`)],
195
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
196
+ [_nt]: [, input[_NT]],
315
197
  });
316
198
  let body;
317
- return new __HttpRequest({
318
- protocol,
319
- hostname,
320
- port,
321
- method: "GET",
322
- headers,
323
- path: resolvedPath,
324
- query,
325
- body,
326
- });
199
+ b.m("GET").h(headers).q(query).b(body);
200
+ return b.build();
327
201
  };
328
202
  export const se_ListAppInstancesCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
203
+ const b = rb(input, context);
330
204
  const headers = {};
331
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances";
205
+ b.bp("/app-instances");
332
206
  const query = map({
333
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
334
- "next-token": [, input.NextToken],
207
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
208
+ [_nt]: [, input[_NT]],
335
209
  });
336
210
  let body;
337
- return new __HttpRequest({
338
- protocol,
339
- hostname,
340
- port,
341
- method: "GET",
342
- headers,
343
- path: resolvedPath,
344
- query,
345
- body,
346
- });
211
+ b.m("GET").h(headers).q(query).b(body);
212
+ return b.build();
347
213
  };
348
214
  export const se_ListAppInstanceUserEndpointsCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
215
+ const b = rb(input, context);
350
216
  const headers = {};
351
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
352
- "/app-instance-users/{AppInstanceUserArn}/endpoints";
353
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
217
+ b.bp("/app-instance-users/{AppInstanceUserArn}/endpoints");
218
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
354
219
  const query = map({
355
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
356
- "next-token": [, input.NextToken],
220
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
221
+ [_nt]: [, input[_NT]],
357
222
  });
358
223
  let body;
359
- return new __HttpRequest({
360
- protocol,
361
- hostname,
362
- port,
363
- method: "GET",
364
- headers,
365
- path: resolvedPath,
366
- query,
367
- body,
368
- });
224
+ b.m("GET").h(headers).q(query).b(body);
225
+ return b.build();
369
226
  };
370
227
  export const se_ListAppInstanceUsersCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = rb(input, context);
372
229
  const headers = {};
373
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users";
230
+ b.bp("/app-instance-users");
374
231
  const query = map({
375
- "app-instance-arn": [, __expectNonNull(input.AppInstanceArn, `AppInstanceArn`)],
376
- "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
377
- "next-token": [, input.NextToken],
232
+ [_aia]: [, __expectNonNull(input[_AIA], `AppInstanceArn`)],
233
+ [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
234
+ [_nt]: [, input[_NT]],
378
235
  });
379
236
  let body;
380
- return new __HttpRequest({
381
- protocol,
382
- hostname,
383
- port,
384
- method: "GET",
385
- headers,
386
- path: resolvedPath,
387
- query,
388
- body,
389
- });
237
+ b.m("GET").h(headers).q(query).b(body);
238
+ return b.build();
390
239
  };
391
240
  export const se_ListTagsForResourceCommand = async (input, context) => {
392
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
241
+ const b = rb(input, context);
393
242
  const headers = {};
394
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
243
+ b.bp("/tags");
395
244
  const query = map({
396
- arn: [, __expectNonNull(input.ResourceARN, `ResourceARN`)],
245
+ [_a]: [, __expectNonNull(input[_RARN], `ResourceARN`)],
397
246
  });
398
247
  let body;
399
- return new __HttpRequest({
400
- protocol,
401
- hostname,
402
- port,
403
- method: "GET",
404
- headers,
405
- path: resolvedPath,
406
- query,
407
- body,
408
- });
248
+ b.m("GET").h(headers).q(query).b(body);
249
+ return b.build();
409
250
  };
410
251
  export const se_PutAppInstanceRetentionSettingsCommand = async (input, context) => {
411
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
252
+ const b = rb(input, context);
412
253
  const headers = {
413
254
  "content-type": "application/json",
414
255
  };
415
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
416
- "/app-instances/{AppInstanceArn}/retention-settings";
417
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
256
+ b.bp("/app-instances/{AppInstanceArn}/retention-settings");
257
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
418
258
  let body;
419
259
  body = JSON.stringify(take(input, {
420
260
  AppInstanceRetentionSettings: (_) => _json(_),
421
261
  }));
422
- return new __HttpRequest({
423
- protocol,
424
- hostname,
425
- port,
426
- method: "PUT",
427
- headers,
428
- path: resolvedPath,
429
- body,
430
- });
262
+ b.m("PUT").h(headers).b(body);
263
+ return b.build();
431
264
  };
432
265
  export const se_PutAppInstanceUserExpirationSettingsCommand = async (input, context) => {
433
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
266
+ const b = rb(input, context);
434
267
  const headers = {
435
268
  "content-type": "application/json",
436
269
  };
437
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
438
- "/app-instance-users/{AppInstanceUserArn}/expiration-settings";
439
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
270
+ b.bp("/app-instance-users/{AppInstanceUserArn}/expiration-settings");
271
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
440
272
  let body;
441
273
  body = JSON.stringify(take(input, {
442
274
  ExpirationSettings: (_) => _json(_),
443
275
  }));
444
- return new __HttpRequest({
445
- protocol,
446
- hostname,
447
- port,
448
- method: "PUT",
449
- headers,
450
- path: resolvedPath,
451
- body,
452
- });
276
+ b.m("PUT").h(headers).b(body);
277
+ return b.build();
453
278
  };
454
279
  export const se_RegisterAppInstanceUserEndpointCommand = async (input, context) => {
455
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
280
+ const b = rb(input, context);
456
281
  const headers = {
457
282
  "content-type": "application/json",
458
283
  };
459
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
460
- "/app-instance-users/{AppInstanceUserArn}/endpoints";
461
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
284
+ b.bp("/app-instance-users/{AppInstanceUserArn}/endpoints");
285
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
462
286
  let body;
463
287
  body = JSON.stringify(take(input, {
464
288
  AllowMessages: [],
@@ -468,156 +292,104 @@ export const se_RegisterAppInstanceUserEndpointCommand = async (input, context)
468
292
  ResourceArn: [],
469
293
  Type: [],
470
294
  }));
471
- return new __HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "POST",
476
- headers,
477
- path: resolvedPath,
478
- body,
479
- });
295
+ b.m("POST").h(headers).b(body);
296
+ return b.build();
480
297
  };
481
298
  export const se_TagResourceCommand = async (input, context) => {
482
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const b = rb(input, context);
483
300
  const headers = {
484
301
  "content-type": "application/json",
485
302
  };
486
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
303
+ b.bp("/tags");
487
304
  const query = map({
488
- operation: [, "tag-resource"],
305
+ [_o]: [, "tag-resource"],
489
306
  });
490
307
  let body;
491
308
  body = JSON.stringify(take(input, {
492
309
  ResourceARN: [],
493
310
  Tags: (_) => _json(_),
494
311
  }));
495
- return new __HttpRequest({
496
- protocol,
497
- hostname,
498
- port,
499
- method: "POST",
500
- headers,
501
- path: resolvedPath,
502
- query,
503
- body,
504
- });
312
+ b.m("POST").h(headers).q(query).b(body);
313
+ return b.build();
505
314
  };
506
315
  export const se_UntagResourceCommand = async (input, context) => {
507
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
316
+ const b = rb(input, context);
508
317
  const headers = {
509
318
  "content-type": "application/json",
510
319
  };
511
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
320
+ b.bp("/tags");
512
321
  const query = map({
513
- operation: [, "untag-resource"],
322
+ [_o]: [, "untag-resource"],
514
323
  });
515
324
  let body;
516
325
  body = JSON.stringify(take(input, {
517
326
  ResourceARN: [],
518
327
  TagKeys: (_) => _json(_),
519
328
  }));
520
- return new __HttpRequest({
521
- protocol,
522
- hostname,
523
- port,
524
- method: "POST",
525
- headers,
526
- path: resolvedPath,
527
- query,
528
- body,
529
- });
329
+ b.m("POST").h(headers).q(query).b(body);
330
+ return b.build();
530
331
  };
531
332
  export const se_UpdateAppInstanceCommand = async (input, context) => {
532
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
333
+ const b = rb(input, context);
533
334
  const headers = {
534
335
  "content-type": "application/json",
535
336
  };
536
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances/{AppInstanceArn}";
537
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
337
+ b.bp("/app-instances/{AppInstanceArn}");
338
+ b.p("AppInstanceArn", () => input.AppInstanceArn, "{AppInstanceArn}", false);
538
339
  let body;
539
340
  body = JSON.stringify(take(input, {
540
341
  Metadata: [],
541
342
  Name: [],
542
343
  }));
543
- return new __HttpRequest({
544
- protocol,
545
- hostname,
546
- port,
547
- method: "PUT",
548
- headers,
549
- path: resolvedPath,
550
- body,
551
- });
344
+ b.m("PUT").h(headers).b(body);
345
+ return b.build();
552
346
  };
553
347
  export const se_UpdateAppInstanceBotCommand = async (input, context) => {
554
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
348
+ const b = rb(input, context);
555
349
  const headers = {
556
350
  "content-type": "application/json",
557
351
  };
558
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots/{AppInstanceBotArn}";
559
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
352
+ b.bp("/app-instance-bots/{AppInstanceBotArn}");
353
+ b.p("AppInstanceBotArn", () => input.AppInstanceBotArn, "{AppInstanceBotArn}", false);
560
354
  let body;
561
355
  body = JSON.stringify(take(input, {
562
356
  Configuration: (_) => _json(_),
563
357
  Metadata: [],
564
358
  Name: [],
565
359
  }));
566
- return new __HttpRequest({
567
- protocol,
568
- hostname,
569
- port,
570
- method: "PUT",
571
- headers,
572
- path: resolvedPath,
573
- body,
574
- });
360
+ b.m("PUT").h(headers).b(body);
361
+ return b.build();
575
362
  };
576
363
  export const se_UpdateAppInstanceUserCommand = async (input, context) => {
577
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
364
+ const b = rb(input, context);
578
365
  const headers = {
579
366
  "content-type": "application/json",
580
367
  };
581
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users/{AppInstanceUserArn}";
582
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
368
+ b.bp("/app-instance-users/{AppInstanceUserArn}");
369
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
583
370
  let body;
584
371
  body = JSON.stringify(take(input, {
585
372
  Metadata: [],
586
373
  Name: [],
587
374
  }));
588
- return new __HttpRequest({
589
- protocol,
590
- hostname,
591
- port,
592
- method: "PUT",
593
- headers,
594
- path: resolvedPath,
595
- body,
596
- });
375
+ b.m("PUT").h(headers).b(body);
376
+ return b.build();
597
377
  };
598
378
  export const se_UpdateAppInstanceUserEndpointCommand = async (input, context) => {
599
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const b = rb(input, context);
600
380
  const headers = {
601
381
  "content-type": "application/json",
602
382
  };
603
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
604
- "/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}";
605
- resolvedPath = __resolvedPath(resolvedPath, input, "AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
606
- resolvedPath = __resolvedPath(resolvedPath, input, "EndpointId", () => input.EndpointId, "{EndpointId}", false);
383
+ b.bp("/app-instance-users/{AppInstanceUserArn}/endpoints/{EndpointId}");
384
+ b.p("AppInstanceUserArn", () => input.AppInstanceUserArn, "{AppInstanceUserArn}", false);
385
+ b.p("EndpointId", () => input.EndpointId, "{EndpointId}", false);
607
386
  let body;
608
387
  body = JSON.stringify(take(input, {
609
388
  AllowMessages: [],
610
389
  Name: [],
611
390
  }));
612
- return new __HttpRequest({
613
- protocol,
614
- hostname,
615
- port,
616
- method: "PUT",
617
- headers,
618
- path: resolvedPath,
619
- body,
620
- });
391
+ b.m("PUT").h(headers).b(body);
392
+ return b.build();
621
393
  };
622
394
  export const de_CreateAppInstanceCommand = async (output, context) => {
623
395
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -2318,6 +2090,15 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2318
2090
  value !== "" &&
2319
2091
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2320
2092
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2093
+ const _AIA = "AppInstanceArn";
2094
+ const _MR = "MaxResults";
2095
+ const _NT = "NextToken";
2096
+ const _RARN = "ResourceARN";
2097
+ const _a = "arn";
2098
+ const _aia = "app-instance-arn";
2099
+ const _mr = "max-results";
2100
+ const _nt = "next-token";
2101
+ const _o = "operation";
2321
2102
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2322
2103
  if (encoded.length) {
2323
2104
  return JSON.parse(encoded);