@aws-sdk/client-greengrassv2 3.474.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,95 +1,64 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { GreengrassV2ServiceException as __BaseException } from "../models/GreengrassV2ServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, RequestAlreadyInProgressException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_AssociateServiceRoleToAccountCommand = 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 || ""}` + "/greengrass/servicerole";
11
+ b.bp("/greengrass/servicerole");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  RoleArn: [, , `roleArn`],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "PUT",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("PUT").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_BatchAssociateClientDeviceWithCoreDeviceCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
32
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices";
33
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
24
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices");
25
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
34
26
  let body;
35
27
  body = JSON.stringify(take(input, {
36
28
  entries: (_) => _json(_),
37
29
  }));
38
- return new __HttpRequest({
39
- protocol,
40
- hostname,
41
- port,
42
- method: "POST",
43
- headers,
44
- path: resolvedPath,
45
- body,
46
- });
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
47
32
  };
48
33
  export const se_BatchDisassociateClientDeviceFromCoreDeviceCommand = async (input, context) => {
49
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
50
35
  const headers = {
51
36
  "content-type": "application/json",
52
37
  };
53
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
54
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices";
55
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
38
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices");
39
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
56
40
  let body;
57
41
  body = JSON.stringify(take(input, {
58
42
  entries: (_) => _json(_),
59
43
  }));
60
- return new __HttpRequest({
61
- protocol,
62
- hostname,
63
- port,
64
- method: "POST",
65
- headers,
66
- path: resolvedPath,
67
- body,
68
- });
44
+ b.m("POST").h(headers).b(body);
45
+ return b.build();
69
46
  };
70
47
  export const se_CancelDeploymentCommand = async (input, context) => {
71
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
+ const b = rb(input, context);
72
49
  const headers = {};
73
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
74
- "/greengrass/v2/deployments/{deploymentId}/cancel";
75
- resolvedPath = __resolvedPath(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
50
+ b.bp("/greengrass/v2/deployments/{deploymentId}/cancel");
51
+ b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
76
52
  let body;
77
- return new __HttpRequest({
78
- protocol,
79
- hostname,
80
- port,
81
- method: "POST",
82
- headers,
83
- path: resolvedPath,
84
- body,
85
- });
53
+ b.m("POST").h(headers).b(body);
54
+ return b.build();
86
55
  };
87
56
  export const se_CreateComponentVersionCommand = async (input, context) => {
88
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
+ const b = rb(input, context);
89
58
  const headers = {
90
59
  "content-type": "application/json",
91
60
  };
92
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/createComponentVersion";
61
+ b.bp("/greengrass/v2/createComponentVersion");
93
62
  let body;
94
63
  body = JSON.stringify(take(input, {
95
64
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -97,22 +66,15 @@ export const se_CreateComponentVersionCommand = async (input, context) => {
97
66
  lambdaFunction: (_) => _json(_),
98
67
  tags: (_) => _json(_),
99
68
  }));
100
- return new __HttpRequest({
101
- protocol,
102
- hostname,
103
- port,
104
- method: "POST",
105
- headers,
106
- path: resolvedPath,
107
- body,
108
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
109
71
  };
110
72
  export const se_CreateDeploymentCommand = async (input, context) => {
111
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
112
74
  const headers = {
113
75
  "content-type": "application/json",
114
76
  };
115
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments";
77
+ b.bp("/greengrass/v2/deployments");
116
78
  let body;
117
79
  body = JSON.stringify(take(input, {
118
80
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -124,461 +86,276 @@ export const se_CreateDeploymentCommand = async (input, context) => {
124
86
  tags: (_) => _json(_),
125
87
  targetArn: [],
126
88
  }));
127
- return new __HttpRequest({
128
- protocol,
129
- hostname,
130
- port,
131
- method: "POST",
132
- headers,
133
- path: resolvedPath,
134
- body,
135
- });
89
+ b.m("POST").h(headers).b(body);
90
+ return b.build();
136
91
  };
137
92
  export const se_DeleteComponentCommand = async (input, context) => {
138
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
93
+ const b = rb(input, context);
139
94
  const headers = {};
140
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}";
141
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
95
+ b.bp("/greengrass/v2/components/{arn}");
96
+ b.p("arn", () => input.arn, "{arn}", false);
142
97
  let body;
143
- return new __HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "DELETE",
148
- headers,
149
- path: resolvedPath,
150
- body,
151
- });
98
+ b.m("DELETE").h(headers).b(body);
99
+ return b.build();
152
100
  };
153
101
  export const se_DeleteCoreDeviceCommand = async (input, context) => {
154
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = rb(input, context);
155
103
  const headers = {};
156
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
157
- "/greengrass/v2/coreDevices/{coreDeviceThingName}";
158
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
104
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}");
105
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
159
106
  let body;
160
- return new __HttpRequest({
161
- protocol,
162
- hostname,
163
- port,
164
- method: "DELETE",
165
- headers,
166
- path: resolvedPath,
167
- body,
168
- });
107
+ b.m("DELETE").h(headers).b(body);
108
+ return b.build();
169
109
  };
170
110
  export const se_DeleteDeploymentCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
111
+ const b = rb(input, context);
172
112
  const headers = {};
173
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments/{deploymentId}";
174
- resolvedPath = __resolvedPath(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
113
+ b.bp("/greengrass/v2/deployments/{deploymentId}");
114
+ b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
175
115
  let body;
176
- return new __HttpRequest({
177
- protocol,
178
- hostname,
179
- port,
180
- method: "DELETE",
181
- headers,
182
- path: resolvedPath,
183
- body,
184
- });
116
+ b.m("DELETE").h(headers).b(body);
117
+ return b.build();
185
118
  };
186
119
  export const se_DescribeComponentCommand = async (input, context) => {
187
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const b = rb(input, context);
188
121
  const headers = {};
189
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}/metadata";
190
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
122
+ b.bp("/greengrass/v2/components/{arn}/metadata");
123
+ b.p("arn", () => input.arn, "{arn}", false);
191
124
  let body;
192
- return new __HttpRequest({
193
- protocol,
194
- hostname,
195
- port,
196
- method: "GET",
197
- headers,
198
- path: resolvedPath,
199
- body,
200
- });
125
+ b.m("GET").h(headers).b(body);
126
+ return b.build();
201
127
  };
202
128
  export const se_DisassociateServiceRoleFromAccountCommand = async (input, context) => {
203
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
204
130
  const headers = {
205
131
  "content-type": "application/json",
206
132
  };
207
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
133
+ b.bp("/greengrass/servicerole");
208
134
  let body;
209
135
  body = "";
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "DELETE",
215
- headers,
216
- path: resolvedPath,
217
- body,
218
- });
136
+ b.m("DELETE").h(headers).b(body);
137
+ return b.build();
219
138
  };
220
139
  export const se_GetComponentCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = rb(input, context);
222
141
  const headers = {};
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}";
224
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
142
+ b.bp("/greengrass/v2/components/{arn}");
143
+ b.p("arn", () => input.arn, "{arn}", false);
225
144
  const query = map({
226
- recipeOutputFormat: [, input.recipeOutputFormat],
145
+ [_rOF]: [, input[_rOF]],
227
146
  });
228
147
  let body;
229
- return new __HttpRequest({
230
- protocol,
231
- hostname,
232
- port,
233
- method: "GET",
234
- headers,
235
- path: resolvedPath,
236
- query,
237
- body,
238
- });
148
+ b.m("GET").h(headers).q(query).b(body);
149
+ return b.build();
239
150
  };
240
151
  export const se_GetComponentVersionArtifactCommand = async (input, context) => {
241
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = rb(input, context);
242
153
  const headers = {};
243
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
244
- "/greengrass/v2/components/{arn}/artifacts/{artifactName+}";
245
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
246
- resolvedPath = __resolvedPath(resolvedPath, input, "artifactName", () => input.artifactName, "{artifactName+}", true);
154
+ b.bp("/greengrass/v2/components/{arn}/artifacts/{artifactName+}");
155
+ b.p("arn", () => input.arn, "{arn}", false);
156
+ b.p("artifactName", () => input.artifactName, "{artifactName+}", true);
247
157
  let body;
248
- return new __HttpRequest({
249
- protocol,
250
- hostname,
251
- port,
252
- method: "GET",
253
- headers,
254
- path: resolvedPath,
255
- body,
256
- });
158
+ b.m("GET").h(headers).b(body);
159
+ return b.build();
257
160
  };
258
161
  export const se_GetConnectivityInfoCommand = async (input, context) => {
259
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const b = rb(input, context);
260
163
  const headers = {};
261
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
262
- "/greengrass/things/{thingName}/connectivityInfo";
263
- resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
164
+ b.bp("/greengrass/things/{thingName}/connectivityInfo");
165
+ b.p("thingName", () => input.thingName, "{thingName}", false);
264
166
  let body;
265
- return new __HttpRequest({
266
- protocol,
267
- hostname,
268
- port,
269
- method: "GET",
270
- headers,
271
- path: resolvedPath,
272
- body,
273
- });
167
+ b.m("GET").h(headers).b(body);
168
+ return b.build();
274
169
  };
275
170
  export const se_GetCoreDeviceCommand = async (input, context) => {
276
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = rb(input, context);
277
172
  const headers = {};
278
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
279
- "/greengrass/v2/coreDevices/{coreDeviceThingName}";
280
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
173
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}");
174
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
281
175
  let body;
282
- return new __HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "GET",
287
- headers,
288
- path: resolvedPath,
289
- body,
290
- });
176
+ b.m("GET").h(headers).b(body);
177
+ return b.build();
291
178
  };
292
179
  export const se_GetDeploymentCommand = async (input, context) => {
293
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
180
+ const b = rb(input, context);
294
181
  const headers = {};
295
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments/{deploymentId}";
296
- resolvedPath = __resolvedPath(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
182
+ b.bp("/greengrass/v2/deployments/{deploymentId}");
183
+ b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
297
184
  let body;
298
- return new __HttpRequest({
299
- protocol,
300
- hostname,
301
- port,
302
- method: "GET",
303
- headers,
304
- path: resolvedPath,
305
- body,
306
- });
185
+ b.m("GET").h(headers).b(body);
186
+ return b.build();
307
187
  };
308
188
  export const se_GetServiceRoleForAccountCommand = async (input, context) => {
309
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = rb(input, context);
310
190
  const headers = {
311
191
  "content-type": "application/json",
312
192
  };
313
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
193
+ b.bp("/greengrass/servicerole");
314
194
  let body;
315
195
  body = "";
316
- return new __HttpRequest({
317
- protocol,
318
- hostname,
319
- port,
320
- method: "GET",
321
- headers,
322
- path: resolvedPath,
323
- body,
324
- });
196
+ b.m("GET").h(headers).b(body);
197
+ return b.build();
325
198
  };
326
199
  export const se_ListClientDevicesAssociatedWithCoreDeviceCommand = async (input, context) => {
327
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const b = rb(input, context);
328
201
  const headers = {};
329
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
330
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/associatedClientDevices";
331
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
202
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/associatedClientDevices");
203
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
332
204
  const query = map({
333
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
334
- nextToken: [, input.nextToken],
205
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
206
+ [_nT]: [, input[_nT]],
335
207
  });
336
208
  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
- });
209
+ b.m("GET").h(headers).q(query).b(body);
210
+ return b.build();
347
211
  };
348
212
  export const se_ListComponentsCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = rb(input, context);
350
214
  const headers = {};
351
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components";
215
+ b.bp("/greengrass/v2/components");
352
216
  const query = map({
353
- scope: [, input.scope],
354
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
355
- nextToken: [, input.nextToken],
217
+ [_s]: [, input[_s]],
218
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
219
+ [_nT]: [, input[_nT]],
356
220
  });
357
221
  let body;
358
- return new __HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "GET",
363
- headers,
364
- path: resolvedPath,
365
- query,
366
- body,
367
- });
222
+ b.m("GET").h(headers).q(query).b(body);
223
+ return b.build();
368
224
  };
369
225
  export const se_ListComponentVersionsCommand = async (input, context) => {
370
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
226
+ const b = rb(input, context);
371
227
  const headers = {};
372
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}/versions";
373
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
228
+ b.bp("/greengrass/v2/components/{arn}/versions");
229
+ b.p("arn", () => input.arn, "{arn}", false);
374
230
  const query = map({
375
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
376
- nextToken: [, input.nextToken],
231
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
232
+ [_nT]: [, input[_nT]],
377
233
  });
378
234
  let body;
379
- return new __HttpRequest({
380
- protocol,
381
- hostname,
382
- port,
383
- method: "GET",
384
- headers,
385
- path: resolvedPath,
386
- query,
387
- body,
388
- });
235
+ b.m("GET").h(headers).q(query).b(body);
236
+ return b.build();
389
237
  };
390
238
  export const se_ListCoreDevicesCommand = async (input, context) => {
391
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
+ const b = rb(input, context);
392
240
  const headers = {};
393
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/coreDevices";
241
+ b.bp("/greengrass/v2/coreDevices");
394
242
  const query = map({
395
- thingGroupArn: [, input.thingGroupArn],
396
- status: [, input.status],
397
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
398
- nextToken: [, input.nextToken],
243
+ [_tGA]: [, input[_tGA]],
244
+ [_st]: [, input[_st]],
245
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
246
+ [_nT]: [, input[_nT]],
399
247
  });
400
248
  let body;
401
- return new __HttpRequest({
402
- protocol,
403
- hostname,
404
- port,
405
- method: "GET",
406
- headers,
407
- path: resolvedPath,
408
- query,
409
- body,
410
- });
249
+ b.m("GET").h(headers).q(query).b(body);
250
+ return b.build();
411
251
  };
412
252
  export const se_ListDeploymentsCommand = async (input, context) => {
413
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
253
+ const b = rb(input, context);
414
254
  const headers = {};
415
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments";
255
+ b.bp("/greengrass/v2/deployments");
416
256
  const query = map({
417
- targetArn: [, input.targetArn],
418
- historyFilter: [, input.historyFilter],
419
- parentTargetArn: [, input.parentTargetArn],
420
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
421
- nextToken: [, input.nextToken],
257
+ [_tA]: [, input[_tA]],
258
+ [_hF]: [, input[_hF]],
259
+ [_pTA]: [, input[_pTA]],
260
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
261
+ [_nT]: [, input[_nT]],
422
262
  });
423
263
  let body;
424
- return new __HttpRequest({
425
- protocol,
426
- hostname,
427
- port,
428
- method: "GET",
429
- headers,
430
- path: resolvedPath,
431
- query,
432
- body,
433
- });
264
+ b.m("GET").h(headers).q(query).b(body);
265
+ return b.build();
434
266
  };
435
267
  export const se_ListEffectiveDeploymentsCommand = async (input, context) => {
436
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
268
+ const b = rb(input, context);
437
269
  const headers = {};
438
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
439
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/effectiveDeployments";
440
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
270
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/effectiveDeployments");
271
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
441
272
  const query = map({
442
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
443
- nextToken: [, input.nextToken],
273
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
274
+ [_nT]: [, input[_nT]],
444
275
  });
445
276
  let body;
446
- return new __HttpRequest({
447
- protocol,
448
- hostname,
449
- port,
450
- method: "GET",
451
- headers,
452
- path: resolvedPath,
453
- query,
454
- body,
455
- });
277
+ b.m("GET").h(headers).q(query).b(body);
278
+ return b.build();
456
279
  };
457
280
  export const se_ListInstalledComponentsCommand = async (input, context) => {
458
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const b = rb(input, context);
459
282
  const headers = {};
460
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
461
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents";
462
- resolvedPath = __resolvedPath(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
283
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents");
284
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
463
285
  const query = map({
464
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
465
- nextToken: [, input.nextToken],
466
- topologyFilter: [, input.topologyFilter],
286
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
287
+ [_nT]: [, input[_nT]],
288
+ [_tF]: [, input[_tF]],
467
289
  });
468
290
  let body;
469
- return new __HttpRequest({
470
- protocol,
471
- hostname,
472
- port,
473
- method: "GET",
474
- headers,
475
- path: resolvedPath,
476
- query,
477
- body,
478
- });
291
+ b.m("GET").h(headers).q(query).b(body);
292
+ return b.build();
479
293
  };
480
294
  export const se_ListTagsForResourceCommand = async (input, context) => {
481
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
295
+ const b = rb(input, context);
482
296
  const headers = {};
483
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
484
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
297
+ b.bp("/tags/{resourceArn}");
298
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
485
299
  let body;
486
- return new __HttpRequest({
487
- protocol,
488
- hostname,
489
- port,
490
- method: "GET",
491
- headers,
492
- path: resolvedPath,
493
- body,
494
- });
300
+ b.m("GET").h(headers).b(body);
301
+ return b.build();
495
302
  };
496
303
  export const se_ResolveComponentCandidatesCommand = async (input, context) => {
497
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
304
+ const b = rb(input, context);
498
305
  const headers = {
499
306
  "content-type": "application/json",
500
307
  };
501
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/resolveComponentCandidates";
308
+ b.bp("/greengrass/v2/resolveComponentCandidates");
502
309
  let body;
503
310
  body = JSON.stringify(take(input, {
504
311
  componentCandidates: (_) => _json(_),
505
312
  platform: (_) => _json(_),
506
313
  }));
507
- return new __HttpRequest({
508
- protocol,
509
- hostname,
510
- port,
511
- method: "POST",
512
- headers,
513
- path: resolvedPath,
514
- body,
515
- });
314
+ b.m("POST").h(headers).b(body);
315
+ return b.build();
516
316
  };
517
317
  export const se_TagResourceCommand = async (input, context) => {
518
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
318
+ const b = rb(input, context);
519
319
  const headers = {
520
320
  "content-type": "application/json",
521
321
  };
522
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
523
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
322
+ b.bp("/tags/{resourceArn}");
323
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
524
324
  let body;
525
325
  body = JSON.stringify(take(input, {
526
326
  tags: (_) => _json(_),
527
327
  }));
528
- return new __HttpRequest({
529
- protocol,
530
- hostname,
531
- port,
532
- method: "POST",
533
- headers,
534
- path: resolvedPath,
535
- body,
536
- });
328
+ b.m("POST").h(headers).b(body);
329
+ return b.build();
537
330
  };
538
331
  export const se_UntagResourceCommand = async (input, context) => {
539
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
332
+ const b = rb(input, context);
540
333
  const headers = {};
541
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
542
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
334
+ b.bp("/tags/{resourceArn}");
335
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
543
336
  const query = map({
544
- tagKeys: [
337
+ [_tK]: [
545
338
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
546
- () => (input.tagKeys || []).map((_entry) => _entry),
339
+ () => (input[_tK] || []).map((_entry) => _entry),
547
340
  ],
548
341
  });
549
342
  let body;
550
- return new __HttpRequest({
551
- protocol,
552
- hostname,
553
- port,
554
- method: "DELETE",
555
- headers,
556
- path: resolvedPath,
557
- query,
558
- body,
559
- });
343
+ b.m("DELETE").h(headers).q(query).b(body);
344
+ return b.build();
560
345
  };
561
346
  export const se_UpdateConnectivityInfoCommand = async (input, context) => {
562
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
347
+ const b = rb(input, context);
563
348
  const headers = {
564
349
  "content-type": "application/json",
565
350
  };
566
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
567
- "/greengrass/things/{thingName}/connectivityInfo";
568
- resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
351
+ b.bp("/greengrass/things/{thingName}/connectivityInfo");
352
+ b.p("thingName", () => input.thingName, "{thingName}", false);
569
353
  let body;
570
354
  body = JSON.stringify(take(input, {
571
355
  ConnectivityInfo: [, (_) => se_connectivityInfoList(_, context), `connectivityInfo`],
572
356
  }));
573
- return new __HttpRequest({
574
- protocol,
575
- hostname,
576
- port,
577
- method: "PUT",
578
- headers,
579
- path: resolvedPath,
580
- body,
581
- });
357
+ b.m("PUT").h(headers).b(body);
358
+ return b.build();
582
359
  };
583
360
  export const de_AssociateServiceRoleToAccountCommand = async (output, context) => {
584
361
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1893,10 +1670,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1893
1670
  };
1894
1671
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1895
1672
  const contents = map({
1896
- retryAfterSeconds: [
1897
- () => void 0 !== parsedOutput.headers["retry-after"],
1898
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1899
- ],
1673
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1900
1674
  });
1901
1675
  const data = parsedOutput.body;
1902
1676
  const doc = take(data, {
@@ -1956,10 +1730,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1956
1730
  };
1957
1731
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1958
1732
  const contents = map({
1959
- retryAfterSeconds: [
1960
- () => void 0 !== parsedOutput.headers["retry-after"],
1961
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1962
- ],
1733
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1963
1734
  });
1964
1735
  const data = parsedOutput.body;
1965
1736
  const doc = take(data, {
@@ -2307,6 +2078,19 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2307
2078
  value !== "" &&
2308
2079
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2309
2080
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2081
+ const _hF = "historyFilter";
2082
+ const _mR = "maxResults";
2083
+ const _nT = "nextToken";
2084
+ const _pTA = "parentTargetArn";
2085
+ const _rAS = "retryAfterSeconds";
2086
+ const _rOF = "recipeOutputFormat";
2087
+ const _ra = "retry-after";
2088
+ const _s = "scope";
2089
+ const _st = "status";
2090
+ const _tA = "targetArn";
2091
+ const _tF = "topologyFilter";
2092
+ const _tGA = "thingGroupArn";
2093
+ const _tK = "tagKeys";
2310
2094
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2311
2095
  if (encoded.length) {
2312
2096
  return JSON.parse(encoded);