@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.
@@ -2,102 +2,71 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_ListCoreDevicesCommand = exports.de_ListComponentVersionsCommand = exports.de_ListComponentsCommand = exports.de_ListClientDevicesAssociatedWithCoreDeviceCommand = exports.de_GetServiceRoleForAccountCommand = exports.de_GetDeploymentCommand = exports.de_GetCoreDeviceCommand = exports.de_GetConnectivityInfoCommand = exports.de_GetComponentVersionArtifactCommand = exports.de_GetComponentCommand = exports.de_DisassociateServiceRoleFromAccountCommand = exports.de_DescribeComponentCommand = exports.de_DeleteDeploymentCommand = exports.de_DeleteCoreDeviceCommand = exports.de_DeleteComponentCommand = exports.de_CreateDeploymentCommand = exports.de_CreateComponentVersionCommand = exports.de_CancelDeploymentCommand = exports.de_BatchDisassociateClientDeviceFromCoreDeviceCommand = exports.de_BatchAssociateClientDeviceWithCoreDeviceCommand = exports.de_AssociateServiceRoleToAccountCommand = exports.se_UpdateConnectivityInfoCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResolveComponentCandidatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListInstalledComponentsCommand = exports.se_ListEffectiveDeploymentsCommand = exports.se_ListDeploymentsCommand = exports.se_ListCoreDevicesCommand = exports.se_ListComponentVersionsCommand = exports.se_ListComponentsCommand = exports.se_ListClientDevicesAssociatedWithCoreDeviceCommand = exports.se_GetServiceRoleForAccountCommand = exports.se_GetDeploymentCommand = exports.se_GetCoreDeviceCommand = exports.se_GetConnectivityInfoCommand = exports.se_GetComponentVersionArtifactCommand = exports.se_GetComponentCommand = exports.se_DisassociateServiceRoleFromAccountCommand = exports.se_DescribeComponentCommand = exports.se_DeleteDeploymentCommand = exports.se_DeleteCoreDeviceCommand = exports.se_DeleteComponentCommand = exports.se_CreateDeploymentCommand = exports.se_CreateComponentVersionCommand = exports.se_CancelDeploymentCommand = exports.se_BatchDisassociateClientDeviceFromCoreDeviceCommand = exports.se_BatchAssociateClientDeviceWithCoreDeviceCommand = exports.se_AssociateServiceRoleToAccountCommand = void 0;
4
4
  exports.de_UpdateConnectivityInfoCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResolveComponentCandidatesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListInstalledComponentsCommand = exports.de_ListEffectiveDeploymentsCommand = exports.de_ListDeploymentsCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_1 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
8
  const GreengrassV2ServiceException_1 = require("../models/GreengrassV2ServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_AssociateServiceRoleToAccountCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_1.requestBuilder)(input, context);
12
12
  const headers = {
13
13
  "content-type": "application/json",
14
14
  };
15
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
15
+ b.bp("/greengrass/servicerole");
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  RoleArn: [, , `roleArn`],
19
19
  }));
20
- return new protocol_http_1.HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "PUT",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("PUT").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  exports.se_AssociateServiceRoleToAccountCommand = se_AssociateServiceRoleToAccountCommand;
31
24
  const se_BatchAssociateClientDeviceWithCoreDeviceCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_1.requestBuilder)(input, context);
33
26
  const headers = {
34
27
  "content-type": "application/json",
35
28
  };
36
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
37
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices";
38
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
29
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices");
30
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
39
31
  let body;
40
32
  body = JSON.stringify((0, smithy_client_1.take)(input, {
41
33
  entries: (_) => (0, smithy_client_1._json)(_),
42
34
  }));
43
- return new protocol_http_1.HttpRequest({
44
- protocol,
45
- hostname,
46
- port,
47
- method: "POST",
48
- headers,
49
- path: resolvedPath,
50
- body,
51
- });
35
+ b.m("POST").h(headers).b(body);
36
+ return b.build();
52
37
  };
53
38
  exports.se_BatchAssociateClientDeviceWithCoreDeviceCommand = se_BatchAssociateClientDeviceWithCoreDeviceCommand;
54
39
  const se_BatchDisassociateClientDeviceFromCoreDeviceCommand = async (input, context) => {
55
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = (0, core_1.requestBuilder)(input, context);
56
41
  const headers = {
57
42
  "content-type": "application/json",
58
43
  };
59
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
60
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices";
61
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
44
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices");
45
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
62
46
  let body;
63
47
  body = JSON.stringify((0, smithy_client_1.take)(input, {
64
48
  entries: (_) => (0, smithy_client_1._json)(_),
65
49
  }));
66
- return new protocol_http_1.HttpRequest({
67
- protocol,
68
- hostname,
69
- port,
70
- method: "POST",
71
- headers,
72
- path: resolvedPath,
73
- body,
74
- });
50
+ b.m("POST").h(headers).b(body);
51
+ return b.build();
75
52
  };
76
53
  exports.se_BatchDisassociateClientDeviceFromCoreDeviceCommand = se_BatchDisassociateClientDeviceFromCoreDeviceCommand;
77
54
  const se_CancelDeploymentCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = (0, core_1.requestBuilder)(input, context);
79
56
  const headers = {};
80
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
81
- "/greengrass/v2/deployments/{deploymentId}/cancel";
82
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
57
+ b.bp("/greengrass/v2/deployments/{deploymentId}/cancel");
58
+ b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
83
59
  let body;
84
- return new protocol_http_1.HttpRequest({
85
- protocol,
86
- hostname,
87
- port,
88
- method: "POST",
89
- headers,
90
- path: resolvedPath,
91
- body,
92
- });
60
+ b.m("POST").h(headers).b(body);
61
+ return b.build();
93
62
  };
94
63
  exports.se_CancelDeploymentCommand = se_CancelDeploymentCommand;
95
64
  const se_CreateComponentVersionCommand = async (input, context) => {
96
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
65
+ const b = (0, core_1.requestBuilder)(input, context);
97
66
  const headers = {
98
67
  "content-type": "application/json",
99
68
  };
100
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/createComponentVersion";
69
+ b.bp("/greengrass/v2/createComponentVersion");
101
70
  let body;
102
71
  body = JSON.stringify((0, smithy_client_1.take)(input, {
103
72
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -105,23 +74,16 @@ const se_CreateComponentVersionCommand = async (input, context) => {
105
74
  lambdaFunction: (_) => (0, smithy_client_1._json)(_),
106
75
  tags: (_) => (0, smithy_client_1._json)(_),
107
76
  }));
108
- return new protocol_http_1.HttpRequest({
109
- protocol,
110
- hostname,
111
- port,
112
- method: "POST",
113
- headers,
114
- path: resolvedPath,
115
- body,
116
- });
77
+ b.m("POST").h(headers).b(body);
78
+ return b.build();
117
79
  };
118
80
  exports.se_CreateComponentVersionCommand = se_CreateComponentVersionCommand;
119
81
  const se_CreateDeploymentCommand = async (input, context) => {
120
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = (0, core_1.requestBuilder)(input, context);
121
83
  const headers = {
122
84
  "content-type": "application/json",
123
85
  };
124
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments";
86
+ b.bp("/greengrass/v2/deployments");
125
87
  let body;
126
88
  body = JSON.stringify((0, smithy_client_1.take)(input, {
127
89
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -133,484 +95,299 @@ const se_CreateDeploymentCommand = async (input, context) => {
133
95
  tags: (_) => (0, smithy_client_1._json)(_),
134
96
  targetArn: [],
135
97
  }));
136
- return new protocol_http_1.HttpRequest({
137
- protocol,
138
- hostname,
139
- port,
140
- method: "POST",
141
- headers,
142
- path: resolvedPath,
143
- body,
144
- });
98
+ b.m("POST").h(headers).b(body);
99
+ return b.build();
145
100
  };
146
101
  exports.se_CreateDeploymentCommand = se_CreateDeploymentCommand;
147
102
  const se_DeleteComponentCommand = async (input, context) => {
148
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const b = (0, core_1.requestBuilder)(input, context);
149
104
  const headers = {};
150
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}";
151
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
105
+ b.bp("/greengrass/v2/components/{arn}");
106
+ b.p("arn", () => input.arn, "{arn}", false);
152
107
  let body;
153
- return new protocol_http_1.HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "DELETE",
158
- headers,
159
- path: resolvedPath,
160
- body,
161
- });
108
+ b.m("DELETE").h(headers).b(body);
109
+ return b.build();
162
110
  };
163
111
  exports.se_DeleteComponentCommand = se_DeleteComponentCommand;
164
112
  const se_DeleteCoreDeviceCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = (0, core_1.requestBuilder)(input, context);
166
114
  const headers = {};
167
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
168
- "/greengrass/v2/coreDevices/{coreDeviceThingName}";
169
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
115
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}");
116
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
170
117
  let body;
171
- return new protocol_http_1.HttpRequest({
172
- protocol,
173
- hostname,
174
- port,
175
- method: "DELETE",
176
- headers,
177
- path: resolvedPath,
178
- body,
179
- });
118
+ b.m("DELETE").h(headers).b(body);
119
+ return b.build();
180
120
  };
181
121
  exports.se_DeleteCoreDeviceCommand = se_DeleteCoreDeviceCommand;
182
122
  const se_DeleteDeploymentCommand = async (input, context) => {
183
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = (0, core_1.requestBuilder)(input, context);
184
124
  const headers = {};
185
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments/{deploymentId}";
186
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
125
+ b.bp("/greengrass/v2/deployments/{deploymentId}");
126
+ b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
187
127
  let body;
188
- return new protocol_http_1.HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "DELETE",
193
- headers,
194
- path: resolvedPath,
195
- body,
196
- });
128
+ b.m("DELETE").h(headers).b(body);
129
+ return b.build();
197
130
  };
198
131
  exports.se_DeleteDeploymentCommand = se_DeleteDeploymentCommand;
199
132
  const se_DescribeComponentCommand = async (input, context) => {
200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = (0, core_1.requestBuilder)(input, context);
201
134
  const headers = {};
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}/metadata";
203
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
135
+ b.bp("/greengrass/v2/components/{arn}/metadata");
136
+ b.p("arn", () => input.arn, "{arn}", false);
204
137
  let body;
205
- return new protocol_http_1.HttpRequest({
206
- protocol,
207
- hostname,
208
- port,
209
- method: "GET",
210
- headers,
211
- path: resolvedPath,
212
- body,
213
- });
138
+ b.m("GET").h(headers).b(body);
139
+ return b.build();
214
140
  };
215
141
  exports.se_DescribeComponentCommand = se_DescribeComponentCommand;
216
142
  const se_DisassociateServiceRoleFromAccountCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = (0, core_1.requestBuilder)(input, context);
218
144
  const headers = {
219
145
  "content-type": "application/json",
220
146
  };
221
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
147
+ b.bp("/greengrass/servicerole");
222
148
  let body;
223
149
  body = "";
224
- return new protocol_http_1.HttpRequest({
225
- protocol,
226
- hostname,
227
- port,
228
- method: "DELETE",
229
- headers,
230
- path: resolvedPath,
231
- body,
232
- });
150
+ b.m("DELETE").h(headers).b(body);
151
+ return b.build();
233
152
  };
234
153
  exports.se_DisassociateServiceRoleFromAccountCommand = se_DisassociateServiceRoleFromAccountCommand;
235
154
  const se_GetComponentCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = (0, core_1.requestBuilder)(input, context);
237
156
  const headers = {};
238
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}";
239
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
157
+ b.bp("/greengrass/v2/components/{arn}");
158
+ b.p("arn", () => input.arn, "{arn}", false);
240
159
  const query = (0, smithy_client_1.map)({
241
- recipeOutputFormat: [, input.recipeOutputFormat],
160
+ [_rOF]: [, input[_rOF]],
242
161
  });
243
162
  let body;
244
- return new protocol_http_1.HttpRequest({
245
- protocol,
246
- hostname,
247
- port,
248
- method: "GET",
249
- headers,
250
- path: resolvedPath,
251
- query,
252
- body,
253
- });
163
+ b.m("GET").h(headers).q(query).b(body);
164
+ return b.build();
254
165
  };
255
166
  exports.se_GetComponentCommand = se_GetComponentCommand;
256
167
  const se_GetComponentVersionArtifactCommand = async (input, context) => {
257
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = (0, core_1.requestBuilder)(input, context);
258
169
  const headers = {};
259
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
260
- "/greengrass/v2/components/{arn}/artifacts/{artifactName+}";
261
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
262
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "artifactName", () => input.artifactName, "{artifactName+}", true);
170
+ b.bp("/greengrass/v2/components/{arn}/artifacts/{artifactName+}");
171
+ b.p("arn", () => input.arn, "{arn}", false);
172
+ b.p("artifactName", () => input.artifactName, "{artifactName+}", true);
263
173
  let body;
264
- return new protocol_http_1.HttpRequest({
265
- protocol,
266
- hostname,
267
- port,
268
- method: "GET",
269
- headers,
270
- path: resolvedPath,
271
- body,
272
- });
174
+ b.m("GET").h(headers).b(body);
175
+ return b.build();
273
176
  };
274
177
  exports.se_GetComponentVersionArtifactCommand = se_GetComponentVersionArtifactCommand;
275
178
  const se_GetConnectivityInfoCommand = async (input, context) => {
276
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
179
+ const b = (0, core_1.requestBuilder)(input, context);
277
180
  const headers = {};
278
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
279
- "/greengrass/things/{thingName}/connectivityInfo";
280
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
181
+ b.bp("/greengrass/things/{thingName}/connectivityInfo");
182
+ b.p("thingName", () => input.thingName, "{thingName}", false);
281
183
  let body;
282
- return new protocol_http_1.HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "GET",
287
- headers,
288
- path: resolvedPath,
289
- body,
290
- });
184
+ b.m("GET").h(headers).b(body);
185
+ return b.build();
291
186
  };
292
187
  exports.se_GetConnectivityInfoCommand = se_GetConnectivityInfoCommand;
293
188
  const se_GetCoreDeviceCommand = async (input, context) => {
294
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
189
+ const b = (0, core_1.requestBuilder)(input, context);
295
190
  const headers = {};
296
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
297
- "/greengrass/v2/coreDevices/{coreDeviceThingName}";
298
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
191
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}");
192
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
299
193
  let body;
300
- return new protocol_http_1.HttpRequest({
301
- protocol,
302
- hostname,
303
- port,
304
- method: "GET",
305
- headers,
306
- path: resolvedPath,
307
- body,
308
- });
194
+ b.m("GET").h(headers).b(body);
195
+ return b.build();
309
196
  };
310
197
  exports.se_GetCoreDeviceCommand = se_GetCoreDeviceCommand;
311
198
  const se_GetDeploymentCommand = async (input, context) => {
312
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = (0, core_1.requestBuilder)(input, context);
313
200
  const headers = {};
314
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments/{deploymentId}";
315
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
201
+ b.bp("/greengrass/v2/deployments/{deploymentId}");
202
+ b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
316
203
  let body;
317
- return new protocol_http_1.HttpRequest({
318
- protocol,
319
- hostname,
320
- port,
321
- method: "GET",
322
- headers,
323
- path: resolvedPath,
324
- body,
325
- });
204
+ b.m("GET").h(headers).b(body);
205
+ return b.build();
326
206
  };
327
207
  exports.se_GetDeploymentCommand = se_GetDeploymentCommand;
328
208
  const se_GetServiceRoleForAccountCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
209
+ const b = (0, core_1.requestBuilder)(input, context);
330
210
  const headers = {
331
211
  "content-type": "application/json",
332
212
  };
333
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
213
+ b.bp("/greengrass/servicerole");
334
214
  let body;
335
215
  body = "";
336
- return new protocol_http_1.HttpRequest({
337
- protocol,
338
- hostname,
339
- port,
340
- method: "GET",
341
- headers,
342
- path: resolvedPath,
343
- body,
344
- });
216
+ b.m("GET").h(headers).b(body);
217
+ return b.build();
345
218
  };
346
219
  exports.se_GetServiceRoleForAccountCommand = se_GetServiceRoleForAccountCommand;
347
220
  const se_ListClientDevicesAssociatedWithCoreDeviceCommand = async (input, context) => {
348
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
221
+ const b = (0, core_1.requestBuilder)(input, context);
349
222
  const headers = {};
350
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
351
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/associatedClientDevices";
352
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
223
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/associatedClientDevices");
224
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
353
225
  const query = (0, smithy_client_1.map)({
354
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
355
- nextToken: [, input.nextToken],
226
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
227
+ [_nT]: [, input[_nT]],
356
228
  });
357
229
  let body;
358
- return new protocol_http_1.HttpRequest({
359
- protocol,
360
- hostname,
361
- port,
362
- method: "GET",
363
- headers,
364
- path: resolvedPath,
365
- query,
366
- body,
367
- });
230
+ b.m("GET").h(headers).q(query).b(body);
231
+ return b.build();
368
232
  };
369
233
  exports.se_ListClientDevicesAssociatedWithCoreDeviceCommand = se_ListClientDevicesAssociatedWithCoreDeviceCommand;
370
234
  const se_ListComponentsCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
235
+ const b = (0, core_1.requestBuilder)(input, context);
372
236
  const headers = {};
373
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components";
237
+ b.bp("/greengrass/v2/components");
374
238
  const query = (0, smithy_client_1.map)({
375
- scope: [, input.scope],
376
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
377
- nextToken: [, input.nextToken],
239
+ [_s]: [, input[_s]],
240
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
241
+ [_nT]: [, input[_nT]],
378
242
  });
379
243
  let body;
380
- return new protocol_http_1.HttpRequest({
381
- protocol,
382
- hostname,
383
- port,
384
- method: "GET",
385
- headers,
386
- path: resolvedPath,
387
- query,
388
- body,
389
- });
244
+ b.m("GET").h(headers).q(query).b(body);
245
+ return b.build();
390
246
  };
391
247
  exports.se_ListComponentsCommand = se_ListComponentsCommand;
392
248
  const se_ListComponentVersionsCommand = async (input, context) => {
393
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = (0, core_1.requestBuilder)(input, context);
394
250
  const headers = {};
395
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/components/{arn}/versions";
396
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
251
+ b.bp("/greengrass/v2/components/{arn}/versions");
252
+ b.p("arn", () => input.arn, "{arn}", false);
397
253
  const query = (0, smithy_client_1.map)({
398
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
399
- nextToken: [, input.nextToken],
254
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
255
+ [_nT]: [, input[_nT]],
400
256
  });
401
257
  let body;
402
- return new protocol_http_1.HttpRequest({
403
- protocol,
404
- hostname,
405
- port,
406
- method: "GET",
407
- headers,
408
- path: resolvedPath,
409
- query,
410
- body,
411
- });
258
+ b.m("GET").h(headers).q(query).b(body);
259
+ return b.build();
412
260
  };
413
261
  exports.se_ListComponentVersionsCommand = se_ListComponentVersionsCommand;
414
262
  const se_ListCoreDevicesCommand = async (input, context) => {
415
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
+ const b = (0, core_1.requestBuilder)(input, context);
416
264
  const headers = {};
417
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/coreDevices";
265
+ b.bp("/greengrass/v2/coreDevices");
418
266
  const query = (0, smithy_client_1.map)({
419
- thingGroupArn: [, input.thingGroupArn],
420
- status: [, input.status],
421
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
422
- nextToken: [, input.nextToken],
267
+ [_tGA]: [, input[_tGA]],
268
+ [_st]: [, input[_st]],
269
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
270
+ [_nT]: [, input[_nT]],
423
271
  });
424
272
  let body;
425
- return new protocol_http_1.HttpRequest({
426
- protocol,
427
- hostname,
428
- port,
429
- method: "GET",
430
- headers,
431
- path: resolvedPath,
432
- query,
433
- body,
434
- });
273
+ b.m("GET").h(headers).q(query).b(body);
274
+ return b.build();
435
275
  };
436
276
  exports.se_ListCoreDevicesCommand = se_ListCoreDevicesCommand;
437
277
  const se_ListDeploymentsCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
278
+ const b = (0, core_1.requestBuilder)(input, context);
439
279
  const headers = {};
440
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments";
280
+ b.bp("/greengrass/v2/deployments");
441
281
  const query = (0, smithy_client_1.map)({
442
- targetArn: [, input.targetArn],
443
- historyFilter: [, input.historyFilter],
444
- parentTargetArn: [, input.parentTargetArn],
445
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
446
- nextToken: [, input.nextToken],
282
+ [_tA]: [, input[_tA]],
283
+ [_hF]: [, input[_hF]],
284
+ [_pTA]: [, input[_pTA]],
285
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
286
+ [_nT]: [, input[_nT]],
447
287
  });
448
288
  let body;
449
- return new protocol_http_1.HttpRequest({
450
- protocol,
451
- hostname,
452
- port,
453
- method: "GET",
454
- headers,
455
- path: resolvedPath,
456
- query,
457
- body,
458
- });
289
+ b.m("GET").h(headers).q(query).b(body);
290
+ return b.build();
459
291
  };
460
292
  exports.se_ListDeploymentsCommand = se_ListDeploymentsCommand;
461
293
  const se_ListEffectiveDeploymentsCommand = async (input, context) => {
462
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
294
+ const b = (0, core_1.requestBuilder)(input, context);
463
295
  const headers = {};
464
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
465
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/effectiveDeployments";
466
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
296
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/effectiveDeployments");
297
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
467
298
  const query = (0, smithy_client_1.map)({
468
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
469
- nextToken: [, input.nextToken],
299
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
300
+ [_nT]: [, input[_nT]],
470
301
  });
471
302
  let body;
472
- return new protocol_http_1.HttpRequest({
473
- protocol,
474
- hostname,
475
- port,
476
- method: "GET",
477
- headers,
478
- path: resolvedPath,
479
- query,
480
- body,
481
- });
303
+ b.m("GET").h(headers).q(query).b(body);
304
+ return b.build();
482
305
  };
483
306
  exports.se_ListEffectiveDeploymentsCommand = se_ListEffectiveDeploymentsCommand;
484
307
  const se_ListInstalledComponentsCommand = async (input, context) => {
485
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
308
+ const b = (0, core_1.requestBuilder)(input, context);
486
309
  const headers = {};
487
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
488
- "/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents";
489
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
310
+ b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents");
311
+ b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
490
312
  const query = (0, smithy_client_1.map)({
491
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
492
- nextToken: [, input.nextToken],
493
- topologyFilter: [, input.topologyFilter],
313
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
314
+ [_nT]: [, input[_nT]],
315
+ [_tF]: [, input[_tF]],
494
316
  });
495
317
  let body;
496
- return new protocol_http_1.HttpRequest({
497
- protocol,
498
- hostname,
499
- port,
500
- method: "GET",
501
- headers,
502
- path: resolvedPath,
503
- query,
504
- body,
505
- });
318
+ b.m("GET").h(headers).q(query).b(body);
319
+ return b.build();
506
320
  };
507
321
  exports.se_ListInstalledComponentsCommand = se_ListInstalledComponentsCommand;
508
322
  const se_ListTagsForResourceCommand = async (input, context) => {
509
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
+ const b = (0, core_1.requestBuilder)(input, context);
510
324
  const headers = {};
511
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
512
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
325
+ b.bp("/tags/{resourceArn}");
326
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
513
327
  let body;
514
- return new protocol_http_1.HttpRequest({
515
- protocol,
516
- hostname,
517
- port,
518
- method: "GET",
519
- headers,
520
- path: resolvedPath,
521
- body,
522
- });
328
+ b.m("GET").h(headers).b(body);
329
+ return b.build();
523
330
  };
524
331
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
525
332
  const se_ResolveComponentCandidatesCommand = async (input, context) => {
526
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
333
+ const b = (0, core_1.requestBuilder)(input, context);
527
334
  const headers = {
528
335
  "content-type": "application/json",
529
336
  };
530
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/resolveComponentCandidates";
337
+ b.bp("/greengrass/v2/resolveComponentCandidates");
531
338
  let body;
532
339
  body = JSON.stringify((0, smithy_client_1.take)(input, {
533
340
  componentCandidates: (_) => (0, smithy_client_1._json)(_),
534
341
  platform: (_) => (0, smithy_client_1._json)(_),
535
342
  }));
536
- return new protocol_http_1.HttpRequest({
537
- protocol,
538
- hostname,
539
- port,
540
- method: "POST",
541
- headers,
542
- path: resolvedPath,
543
- body,
544
- });
343
+ b.m("POST").h(headers).b(body);
344
+ return b.build();
545
345
  };
546
346
  exports.se_ResolveComponentCandidatesCommand = se_ResolveComponentCandidatesCommand;
547
347
  const se_TagResourceCommand = async (input, context) => {
548
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
348
+ const b = (0, core_1.requestBuilder)(input, context);
549
349
  const headers = {
550
350
  "content-type": "application/json",
551
351
  };
552
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
553
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
352
+ b.bp("/tags/{resourceArn}");
353
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
554
354
  let body;
555
355
  body = JSON.stringify((0, smithy_client_1.take)(input, {
556
356
  tags: (_) => (0, smithy_client_1._json)(_),
557
357
  }));
558
- return new protocol_http_1.HttpRequest({
559
- protocol,
560
- hostname,
561
- port,
562
- method: "POST",
563
- headers,
564
- path: resolvedPath,
565
- body,
566
- });
358
+ b.m("POST").h(headers).b(body);
359
+ return b.build();
567
360
  };
568
361
  exports.se_TagResourceCommand = se_TagResourceCommand;
569
362
  const se_UntagResourceCommand = async (input, context) => {
570
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
363
+ const b = (0, core_1.requestBuilder)(input, context);
571
364
  const headers = {};
572
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
573
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
365
+ b.bp("/tags/{resourceArn}");
366
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
574
367
  const query = (0, smithy_client_1.map)({
575
- tagKeys: [
368
+ [_tK]: [
576
369
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
577
- () => (input.tagKeys || []).map((_entry) => _entry),
370
+ () => (input[_tK] || []).map((_entry) => _entry),
578
371
  ],
579
372
  });
580
373
  let body;
581
- return new protocol_http_1.HttpRequest({
582
- protocol,
583
- hostname,
584
- port,
585
- method: "DELETE",
586
- headers,
587
- path: resolvedPath,
588
- query,
589
- body,
590
- });
374
+ b.m("DELETE").h(headers).q(query).b(body);
375
+ return b.build();
591
376
  };
592
377
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
593
378
  const se_UpdateConnectivityInfoCommand = async (input, context) => {
594
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
379
+ const b = (0, core_1.requestBuilder)(input, context);
595
380
  const headers = {
596
381
  "content-type": "application/json",
597
382
  };
598
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
599
- "/greengrass/things/{thingName}/connectivityInfo";
600
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
383
+ b.bp("/greengrass/things/{thingName}/connectivityInfo");
384
+ b.p("thingName", () => input.thingName, "{thingName}", false);
601
385
  let body;
602
386
  body = JSON.stringify((0, smithy_client_1.take)(input, {
603
387
  ConnectivityInfo: [, (_) => se_connectivityInfoList(_, context), `connectivityInfo`],
604
388
  }));
605
- return new protocol_http_1.HttpRequest({
606
- protocol,
607
- hostname,
608
- port,
609
- method: "PUT",
610
- headers,
611
- path: resolvedPath,
612
- body,
613
- });
389
+ b.m("PUT").h(headers).b(body);
390
+ return b.build();
614
391
  };
615
392
  exports.se_UpdateConnectivityInfoCommand = se_UpdateConnectivityInfoCommand;
616
393
  const de_AssociateServiceRoleToAccountCommand = async (output, context) => {
@@ -1955,10 +1732,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1955
1732
  };
1956
1733
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1957
1734
  const contents = (0, smithy_client_1.map)({
1958
- retryAfterSeconds: [
1959
- () => void 0 !== parsedOutput.headers["retry-after"],
1960
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1961
- ],
1735
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1962
1736
  });
1963
1737
  const data = parsedOutput.body;
1964
1738
  const doc = (0, smithy_client_1.take)(data, {
@@ -2018,10 +1792,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2018
1792
  };
2019
1793
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2020
1794
  const contents = (0, smithy_client_1.map)({
2021
- retryAfterSeconds: [
2022
- () => void 0 !== parsedOutput.headers["retry-after"],
2023
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
2024
- ],
1795
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2025
1796
  });
2026
1797
  const data = parsedOutput.body;
2027
1798
  const doc = (0, smithy_client_1.take)(data, {
@@ -2369,6 +2140,19 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2369
2140
  value !== "" &&
2370
2141
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2371
2142
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2143
+ const _hF = "historyFilter";
2144
+ const _mR = "maxResults";
2145
+ const _nT = "nextToken";
2146
+ const _pTA = "parentTargetArn";
2147
+ const _rAS = "retryAfterSeconds";
2148
+ const _rOF = "recipeOutputFormat";
2149
+ const _ra = "retry-after";
2150
+ const _s = "scope";
2151
+ const _st = "status";
2152
+ const _tA = "targetArn";
2153
+ const _tF = "topologyFilter";
2154
+ const _tGA = "thingGroupArn";
2155
+ const _tK = "tagKeys";
2372
2156
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2373
2157
  if (encoded.length) {
2374
2158
  return JSON.parse(encoded);