@aws-sdk/client-workspaces-thin-client 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,17 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateSoftwareSetCommand = exports.de_UpdateEnvironmentCommand = exports.de_UpdateDeviceCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSoftwareSetsCommand = exports.de_ListEnvironmentsCommand = exports.de_ListDevicesCommand = exports.de_GetSoftwareSetCommand = exports.de_GetEnvironmentCommand = exports.de_GetDeviceCommand = exports.de_DeregisterDeviceCommand = exports.de_DeleteEnvironmentCommand = exports.de_DeleteDeviceCommand = exports.de_CreateEnvironmentCommand = exports.se_UpdateSoftwareSetCommand = exports.se_UpdateEnvironmentCommand = exports.se_UpdateDeviceCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSoftwareSetsCommand = exports.se_ListEnvironmentsCommand = exports.se_ListDevicesCommand = exports.se_GetSoftwareSetCommand = exports.se_GetEnvironmentCommand = exports.se_GetDeviceCommand = exports.se_DeregisterDeviceCommand = exports.se_DeleteEnvironmentCommand = exports.se_DeleteDeviceCommand = exports.se_CreateEnvironmentCommand = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const protocol_http_1 = require("@smithy/protocol-http");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const uuid_1 = require("uuid");
7
8
  const models_0_1 = require("../models/models_0");
8
9
  const WorkSpacesThinClientServiceException_1 = require("../models/WorkSpacesThinClientServiceException");
9
10
  const se_CreateEnvironmentCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_1.requestBuilder)(input, context);
11
12
  const headers = {
12
13
  "content-type": "application/json",
13
14
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
15
+ b.bp("/environments");
15
16
  let body;
16
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
18
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -32,24 +33,18 @@ const se_CreateEnvironmentCommand = async (input, context) => {
32
33
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
33
34
  }
34
35
  }
35
- return new protocol_http_1.HttpRequest({
36
- protocol,
37
- hostname: resolvedHostname,
38
- port,
39
- method: "POST",
40
- headers,
41
- path: resolvedPath,
42
- body,
43
- });
36
+ b.hn(resolvedHostname);
37
+ b.m("POST").h(headers).b(body);
38
+ return b.build();
44
39
  };
45
40
  exports.se_CreateEnvironmentCommand = se_CreateEnvironmentCommand;
46
41
  const se_DeleteDeviceCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = (0, core_1.requestBuilder)(input, context);
48
43
  const headers = {};
49
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{id}";
50
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
44
+ b.bp("/devices/{id}");
45
+ b.p("id", () => input.id, "{id}", false);
51
46
  const query = (0, smithy_client_1.map)({
52
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
47
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
53
48
  });
54
49
  let body;
55
50
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -59,25 +54,18 @@ const se_DeleteDeviceCommand = async (input, context) => {
59
54
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
60
55
  }
61
56
  }
62
- return new protocol_http_1.HttpRequest({
63
- protocol,
64
- hostname: resolvedHostname,
65
- port,
66
- method: "DELETE",
67
- headers,
68
- path: resolvedPath,
69
- query,
70
- body,
71
- });
57
+ b.hn(resolvedHostname);
58
+ b.m("DELETE").h(headers).q(query).b(body);
59
+ return b.build();
72
60
  };
73
61
  exports.se_DeleteDeviceCommand = se_DeleteDeviceCommand;
74
62
  const se_DeleteEnvironmentCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
63
+ const b = (0, core_1.requestBuilder)(input, context);
76
64
  const headers = {};
77
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{id}";
78
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
65
+ b.bp("/environments/{id}");
66
+ b.p("id", () => input.id, "{id}", false);
79
67
  const query = (0, smithy_client_1.map)({
80
- clientToken: [, input.clientToken ?? (0, uuid_1.v4)()],
68
+ [_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
81
69
  });
82
70
  let body;
83
71
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -87,25 +75,18 @@ const se_DeleteEnvironmentCommand = async (input, context) => {
87
75
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
88
76
  }
89
77
  }
90
- return new protocol_http_1.HttpRequest({
91
- protocol,
92
- hostname: resolvedHostname,
93
- port,
94
- method: "DELETE",
95
- headers,
96
- path: resolvedPath,
97
- query,
98
- body,
99
- });
78
+ b.hn(resolvedHostname);
79
+ b.m("DELETE").h(headers).q(query).b(body);
80
+ return b.build();
100
81
  };
101
82
  exports.se_DeleteEnvironmentCommand = se_DeleteEnvironmentCommand;
102
83
  const se_DeregisterDeviceCommand = async (input, context) => {
103
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = (0, core_1.requestBuilder)(input, context);
104
85
  const headers = {
105
86
  "content-type": "application/json",
106
87
  };
107
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deregister-device/{id}";
108
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
88
+ b.bp("/deregister-device/{id}");
89
+ b.p("id", () => input.id, "{id}", false);
109
90
  let body;
110
91
  body = JSON.stringify((0, smithy_client_1.take)(input, {
111
92
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -118,22 +99,16 @@ const se_DeregisterDeviceCommand = async (input, context) => {
118
99
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
119
100
  }
120
101
  }
121
- return new protocol_http_1.HttpRequest({
122
- protocol,
123
- hostname: resolvedHostname,
124
- port,
125
- method: "POST",
126
- headers,
127
- path: resolvedPath,
128
- body,
129
- });
102
+ b.hn(resolvedHostname);
103
+ b.m("POST").h(headers).b(body);
104
+ return b.build();
130
105
  };
131
106
  exports.se_DeregisterDeviceCommand = se_DeregisterDeviceCommand;
132
107
  const se_GetDeviceCommand = async (input, context) => {
133
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = (0, core_1.requestBuilder)(input, context);
134
109
  const headers = {};
135
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{id}";
136
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
110
+ b.bp("/devices/{id}");
111
+ b.p("id", () => input.id, "{id}", false);
137
112
  let body;
138
113
  let { hostname: resolvedHostname } = await context.endpoint();
139
114
  if (context.disableHostPrefix !== true) {
@@ -142,22 +117,16 @@ const se_GetDeviceCommand = async (input, context) => {
142
117
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
143
118
  }
144
119
  }
145
- return new protocol_http_1.HttpRequest({
146
- protocol,
147
- hostname: resolvedHostname,
148
- port,
149
- method: "GET",
150
- headers,
151
- path: resolvedPath,
152
- body,
153
- });
120
+ b.hn(resolvedHostname);
121
+ b.m("GET").h(headers).b(body);
122
+ return b.build();
154
123
  };
155
124
  exports.se_GetDeviceCommand = se_GetDeviceCommand;
156
125
  const se_GetEnvironmentCommand = async (input, context) => {
157
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const b = (0, core_1.requestBuilder)(input, context);
158
127
  const headers = {};
159
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{id}";
160
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
128
+ b.bp("/environments/{id}");
129
+ b.p("id", () => input.id, "{id}", false);
161
130
  let body;
162
131
  let { hostname: resolvedHostname } = await context.endpoint();
163
132
  if (context.disableHostPrefix !== true) {
@@ -166,22 +135,16 @@ const se_GetEnvironmentCommand = async (input, context) => {
166
135
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
167
136
  }
168
137
  }
169
- return new protocol_http_1.HttpRequest({
170
- protocol,
171
- hostname: resolvedHostname,
172
- port,
173
- method: "GET",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
138
+ b.hn(resolvedHostname);
139
+ b.m("GET").h(headers).b(body);
140
+ return b.build();
178
141
  };
179
142
  exports.se_GetEnvironmentCommand = se_GetEnvironmentCommand;
180
143
  const se_GetSoftwareSetCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = (0, core_1.requestBuilder)(input, context);
182
145
  const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/softwaresets/{id}";
184
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
146
+ b.bp("/softwaresets/{id}");
147
+ b.p("id", () => input.id, "{id}", false);
185
148
  let body;
186
149
  let { hostname: resolvedHostname } = await context.endpoint();
187
150
  if (context.disableHostPrefix !== true) {
@@ -190,24 +153,18 @@ const se_GetSoftwareSetCommand = async (input, context) => {
190
153
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
191
154
  }
192
155
  }
193
- return new protocol_http_1.HttpRequest({
194
- protocol,
195
- hostname: resolvedHostname,
196
- port,
197
- method: "GET",
198
- headers,
199
- path: resolvedPath,
200
- body,
201
- });
156
+ b.hn(resolvedHostname);
157
+ b.m("GET").h(headers).b(body);
158
+ return b.build();
202
159
  };
203
160
  exports.se_GetSoftwareSetCommand = se_GetSoftwareSetCommand;
204
161
  const se_ListDevicesCommand = async (input, context) => {
205
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const b = (0, core_1.requestBuilder)(input, context);
206
163
  const headers = {};
207
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
164
+ b.bp("/devices");
208
165
  const query = (0, smithy_client_1.map)({
209
- nextToken: [, input.nextToken],
210
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
166
+ [_nT]: [, input[_nT]],
167
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
211
168
  });
212
169
  let body;
213
170
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -217,25 +174,18 @@ const se_ListDevicesCommand = async (input, context) => {
217
174
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
218
175
  }
219
176
  }
220
- return new protocol_http_1.HttpRequest({
221
- protocol,
222
- hostname: resolvedHostname,
223
- port,
224
- method: "GET",
225
- headers,
226
- path: resolvedPath,
227
- query,
228
- body,
229
- });
177
+ b.hn(resolvedHostname);
178
+ b.m("GET").h(headers).q(query).b(body);
179
+ return b.build();
230
180
  };
231
181
  exports.se_ListDevicesCommand = se_ListDevicesCommand;
232
182
  const se_ListEnvironmentsCommand = async (input, context) => {
233
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = (0, core_1.requestBuilder)(input, context);
234
184
  const headers = {};
235
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
185
+ b.bp("/environments");
236
186
  const query = (0, smithy_client_1.map)({
237
- nextToken: [, input.nextToken],
238
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
187
+ [_nT]: [, input[_nT]],
188
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
239
189
  });
240
190
  let body;
241
191
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -245,25 +195,18 @@ const se_ListEnvironmentsCommand = async (input, context) => {
245
195
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
246
196
  }
247
197
  }
248
- return new protocol_http_1.HttpRequest({
249
- protocol,
250
- hostname: resolvedHostname,
251
- port,
252
- method: "GET",
253
- headers,
254
- path: resolvedPath,
255
- query,
256
- body,
257
- });
198
+ b.hn(resolvedHostname);
199
+ b.m("GET").h(headers).q(query).b(body);
200
+ return b.build();
258
201
  };
259
202
  exports.se_ListEnvironmentsCommand = se_ListEnvironmentsCommand;
260
203
  const se_ListSoftwareSetsCommand = async (input, context) => {
261
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
+ const b = (0, core_1.requestBuilder)(input, context);
262
205
  const headers = {};
263
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/softwaresets";
206
+ b.bp("/softwaresets");
264
207
  const query = (0, smithy_client_1.map)({
265
- nextToken: [, input.nextToken],
266
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
208
+ [_nT]: [, input[_nT]],
209
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
267
210
  });
268
211
  let body;
269
212
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -273,23 +216,16 @@ const se_ListSoftwareSetsCommand = async (input, context) => {
273
216
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
274
217
  }
275
218
  }
276
- return new protocol_http_1.HttpRequest({
277
- protocol,
278
- hostname: resolvedHostname,
279
- port,
280
- method: "GET",
281
- headers,
282
- path: resolvedPath,
283
- query,
284
- body,
285
- });
219
+ b.hn(resolvedHostname);
220
+ b.m("GET").h(headers).q(query).b(body);
221
+ return b.build();
286
222
  };
287
223
  exports.se_ListSoftwareSetsCommand = se_ListSoftwareSetsCommand;
288
224
  const se_ListTagsForResourceCommand = async (input, context) => {
289
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const b = (0, core_1.requestBuilder)(input, context);
290
226
  const headers = {};
291
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
292
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
227
+ b.bp("/tags/{resourceArn}");
228
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
293
229
  let body;
294
230
  let { hostname: resolvedHostname } = await context.endpoint();
295
231
  if (context.disableHostPrefix !== true) {
@@ -298,24 +234,18 @@ const se_ListTagsForResourceCommand = async (input, context) => {
298
234
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
299
235
  }
300
236
  }
301
- return new protocol_http_1.HttpRequest({
302
- protocol,
303
- hostname: resolvedHostname,
304
- port,
305
- method: "GET",
306
- headers,
307
- path: resolvedPath,
308
- body,
309
- });
237
+ b.hn(resolvedHostname);
238
+ b.m("GET").h(headers).b(body);
239
+ return b.build();
310
240
  };
311
241
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
312
242
  const se_TagResourceCommand = async (input, context) => {
313
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = (0, core_1.requestBuilder)(input, context);
314
244
  const headers = {
315
245
  "content-type": "application/json",
316
246
  };
317
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
318
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
247
+ b.bp("/tags/{resourceArn}");
248
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
319
249
  let body;
320
250
  body = JSON.stringify((0, smithy_client_1.take)(input, {
321
251
  tags: (_) => (0, smithy_client_1._json)(_),
@@ -327,26 +257,20 @@ const se_TagResourceCommand = async (input, context) => {
327
257
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
328
258
  }
329
259
  }
330
- return new protocol_http_1.HttpRequest({
331
- protocol,
332
- hostname: resolvedHostname,
333
- port,
334
- method: "POST",
335
- headers,
336
- path: resolvedPath,
337
- body,
338
- });
260
+ b.hn(resolvedHostname);
261
+ b.m("POST").h(headers).b(body);
262
+ return b.build();
339
263
  };
340
264
  exports.se_TagResourceCommand = se_TagResourceCommand;
341
265
  const se_UntagResourceCommand = async (input, context) => {
342
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
266
+ const b = (0, core_1.requestBuilder)(input, context);
343
267
  const headers = {};
344
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
345
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
268
+ b.bp("/tags/{resourceArn}");
269
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
346
270
  const query = (0, smithy_client_1.map)({
347
- tagKeys: [
271
+ [_tK]: [
348
272
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
349
- () => (input.tagKeys || []).map((_entry) => _entry),
273
+ () => (input[_tK] || []).map((_entry) => _entry),
350
274
  ],
351
275
  });
352
276
  let body;
@@ -357,25 +281,18 @@ const se_UntagResourceCommand = async (input, context) => {
357
281
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
358
282
  }
359
283
  }
360
- return new protocol_http_1.HttpRequest({
361
- protocol,
362
- hostname: resolvedHostname,
363
- port,
364
- method: "DELETE",
365
- headers,
366
- path: resolvedPath,
367
- query,
368
- body,
369
- });
284
+ b.hn(resolvedHostname);
285
+ b.m("DELETE").h(headers).q(query).b(body);
286
+ return b.build();
370
287
  };
371
288
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
372
289
  const se_UpdateDeviceCommand = async (input, context) => {
373
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
290
+ const b = (0, core_1.requestBuilder)(input, context);
374
291
  const headers = {
375
292
  "content-type": "application/json",
376
293
  };
377
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{id}";
378
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
294
+ b.bp("/devices/{id}");
295
+ b.p("id", () => input.id, "{id}", false);
379
296
  let body;
380
297
  body = JSON.stringify((0, smithy_client_1.take)(input, {
381
298
  desiredSoftwareSetId: [],
@@ -390,24 +307,18 @@ const se_UpdateDeviceCommand = async (input, context) => {
390
307
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
391
308
  }
392
309
  }
393
- return new protocol_http_1.HttpRequest({
394
- protocol,
395
- hostname: resolvedHostname,
396
- port,
397
- method: "PATCH",
398
- headers,
399
- path: resolvedPath,
400
- body,
401
- });
310
+ b.hn(resolvedHostname);
311
+ b.m("PATCH").h(headers).b(body);
312
+ return b.build();
402
313
  };
403
314
  exports.se_UpdateDeviceCommand = se_UpdateDeviceCommand;
404
315
  const se_UpdateEnvironmentCommand = async (input, context) => {
405
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
316
+ const b = (0, core_1.requestBuilder)(input, context);
406
317
  const headers = {
407
318
  "content-type": "application/json",
408
319
  };
409
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{id}";
410
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
320
+ b.bp("/environments/{id}");
321
+ b.p("id", () => input.id, "{id}", false);
411
322
  let body;
412
323
  body = JSON.stringify((0, smithy_client_1.take)(input, {
413
324
  desiredSoftwareSetId: [],
@@ -425,24 +336,18 @@ const se_UpdateEnvironmentCommand = async (input, context) => {
425
336
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
426
337
  }
427
338
  }
428
- return new protocol_http_1.HttpRequest({
429
- protocol,
430
- hostname: resolvedHostname,
431
- port,
432
- method: "PATCH",
433
- headers,
434
- path: resolvedPath,
435
- body,
436
- });
339
+ b.hn(resolvedHostname);
340
+ b.m("PATCH").h(headers).b(body);
341
+ return b.build();
437
342
  };
438
343
  exports.se_UpdateEnvironmentCommand = se_UpdateEnvironmentCommand;
439
344
  const se_UpdateSoftwareSetCommand = async (input, context) => {
440
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
345
+ const b = (0, core_1.requestBuilder)(input, context);
441
346
  const headers = {
442
347
  "content-type": "application/json",
443
348
  };
444
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/softwaresets/{id}";
445
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
349
+ b.bp("/softwaresets/{id}");
350
+ b.p("id", () => input.id, "{id}", false);
446
351
  let body;
447
352
  body = JSON.stringify((0, smithy_client_1.take)(input, {
448
353
  validationStatus: [],
@@ -454,15 +359,9 @@ const se_UpdateSoftwareSetCommand = async (input, context) => {
454
359
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
455
360
  }
456
361
  }
457
- return new protocol_http_1.HttpRequest({
458
- protocol,
459
- hostname: resolvedHostname,
460
- port,
461
- method: "PATCH",
462
- headers,
463
- path: resolvedPath,
464
- body,
465
- });
362
+ b.hn(resolvedHostname);
363
+ b.m("PATCH").h(headers).b(body);
364
+ return b.build();
466
365
  };
467
366
  exports.se_UpdateSoftwareSetCommand = se_UpdateSoftwareSetCommand;
468
367
  const de_CreateEnvironmentCommand = async (output, context) => {
@@ -1199,10 +1098,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1199
1098
  };
1200
1099
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1201
1100
  const contents = (0, smithy_client_1.map)({
1202
- retryAfterSeconds: [
1203
- () => void 0 !== parsedOutput.headers["retry-after"],
1204
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1205
- ],
1101
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1206
1102
  });
1207
1103
  const data = parsedOutput.body;
1208
1104
  const doc = (0, smithy_client_1.take)(data, {
@@ -1217,10 +1113,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1217
1113
  };
1218
1114
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
1219
1115
  const contents = (0, smithy_client_1.map)({
1220
- retryAfterSeconds: [
1221
- () => void 0 !== parsedOutput.headers["retry-after"],
1222
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1223
- ],
1116
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1224
1117
  });
1225
1118
  const data = parsedOutput.body;
1226
1119
  const doc = (0, smithy_client_1.take)(data, {
@@ -1267,10 +1160,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1267
1160
  };
1268
1161
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1269
1162
  const contents = (0, smithy_client_1.map)({
1270
- retryAfterSeconds: [
1271
- () => void 0 !== parsedOutput.headers["retry-after"],
1272
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1273
- ],
1163
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1274
1164
  });
1275
1165
  const data = parsedOutput.body;
1276
1166
  const doc = (0, smithy_client_1.take)(data, {
@@ -1444,6 +1334,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1444
1334
  value !== "" &&
1445
1335
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1446
1336
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1337
+ const _cT = "clientToken";
1338
+ const _mR = "maxResults";
1339
+ const _nT = "nextToken";
1340
+ const _rAS = "retryAfterSeconds";
1341
+ const _ra = "retry-after";
1342
+ const _tK = "tagKeys";
1447
1343
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1448
1344
  if (encoded.length) {
1449
1345
  return JSON.parse(encoded);
@@ -1,14 +1,15 @@
1
- import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
4
5
  import { AccessDeniedException, ConflictException, InternalServerException, InternalServiceException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
6
  import { WorkSpacesThinClientServiceException as __BaseException } from "../models/WorkSpacesThinClientServiceException";
6
7
  export const se_CreateEnvironmentCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
8
9
  const headers = {
9
10
  "content-type": "application/json",
10
11
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
12
+ b.bp("/environments");
12
13
  let body;
13
14
  body = JSON.stringify(take(input, {
14
15
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -29,23 +30,17 @@ export const se_CreateEnvironmentCommand = async (input, context) => {
29
30
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
30
31
  }
31
32
  }
32
- return new __HttpRequest({
33
- protocol,
34
- hostname: resolvedHostname,
35
- port,
36
- method: "POST",
37
- headers,
38
- path: resolvedPath,
39
- body,
40
- });
33
+ b.hn(resolvedHostname);
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
41
36
  };
42
37
  export const se_DeleteDeviceCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = rb(input, context);
44
39
  const headers = {};
45
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{id}";
46
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
40
+ b.bp("/devices/{id}");
41
+ b.p("id", () => input.id, "{id}", false);
47
42
  const query = map({
48
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
43
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
49
44
  });
50
45
  let body;
51
46
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -55,24 +50,17 @@ export const se_DeleteDeviceCommand = async (input, context) => {
55
50
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
56
51
  }
57
52
  }
58
- return new __HttpRequest({
59
- protocol,
60
- hostname: resolvedHostname,
61
- port,
62
- method: "DELETE",
63
- headers,
64
- path: resolvedPath,
65
- query,
66
- body,
67
- });
53
+ b.hn(resolvedHostname);
54
+ b.m("DELETE").h(headers).q(query).b(body);
55
+ return b.build();
68
56
  };
69
57
  export const se_DeleteEnvironmentCommand = async (input, context) => {
70
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = rb(input, context);
71
59
  const headers = {};
72
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{id}";
73
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
60
+ b.bp("/environments/{id}");
61
+ b.p("id", () => input.id, "{id}", false);
74
62
  const query = map({
75
- clientToken: [, input.clientToken ?? generateIdempotencyToken()],
63
+ [_cT]: [, input[_cT] ?? generateIdempotencyToken()],
76
64
  });
77
65
  let body;
78
66
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -82,24 +70,17 @@ export const se_DeleteEnvironmentCommand = async (input, context) => {
82
70
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
83
71
  }
84
72
  }
85
- return new __HttpRequest({
86
- protocol,
87
- hostname: resolvedHostname,
88
- port,
89
- method: "DELETE",
90
- headers,
91
- path: resolvedPath,
92
- query,
93
- body,
94
- });
73
+ b.hn(resolvedHostname);
74
+ b.m("DELETE").h(headers).q(query).b(body);
75
+ return b.build();
95
76
  };
96
77
  export const se_DeregisterDeviceCommand = async (input, context) => {
97
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
78
+ const b = rb(input, context);
98
79
  const headers = {
99
80
  "content-type": "application/json",
100
81
  };
101
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deregister-device/{id}";
102
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
82
+ b.bp("/deregister-device/{id}");
83
+ b.p("id", () => input.id, "{id}", false);
103
84
  let body;
104
85
  body = JSON.stringify(take(input, {
105
86
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -112,21 +93,15 @@ export const se_DeregisterDeviceCommand = async (input, context) => {
112
93
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
113
94
  }
114
95
  }
115
- return new __HttpRequest({
116
- protocol,
117
- hostname: resolvedHostname,
118
- port,
119
- method: "POST",
120
- headers,
121
- path: resolvedPath,
122
- body,
123
- });
96
+ b.hn(resolvedHostname);
97
+ b.m("POST").h(headers).b(body);
98
+ return b.build();
124
99
  };
125
100
  export const se_GetDeviceCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
101
+ const b = rb(input, context);
127
102
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{id}";
129
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
103
+ b.bp("/devices/{id}");
104
+ b.p("id", () => input.id, "{id}", false);
130
105
  let body;
131
106
  let { hostname: resolvedHostname } = await context.endpoint();
132
107
  if (context.disableHostPrefix !== true) {
@@ -135,21 +110,15 @@ export const se_GetDeviceCommand = async (input, context) => {
135
110
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
136
111
  }
137
112
  }
138
- return new __HttpRequest({
139
- protocol,
140
- hostname: resolvedHostname,
141
- port,
142
- method: "GET",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
113
+ b.hn(resolvedHostname);
114
+ b.m("GET").h(headers).b(body);
115
+ return b.build();
147
116
  };
148
117
  export const se_GetEnvironmentCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = rb(input, context);
150
119
  const headers = {};
151
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{id}";
152
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
120
+ b.bp("/environments/{id}");
121
+ b.p("id", () => input.id, "{id}", false);
153
122
  let body;
154
123
  let { hostname: resolvedHostname } = await context.endpoint();
155
124
  if (context.disableHostPrefix !== true) {
@@ -158,21 +127,15 @@ export const se_GetEnvironmentCommand = async (input, context) => {
158
127
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
159
128
  }
160
129
  }
161
- return new __HttpRequest({
162
- protocol,
163
- hostname: resolvedHostname,
164
- port,
165
- method: "GET",
166
- headers,
167
- path: resolvedPath,
168
- body,
169
- });
130
+ b.hn(resolvedHostname);
131
+ b.m("GET").h(headers).b(body);
132
+ return b.build();
170
133
  };
171
134
  export const se_GetSoftwareSetCommand = async (input, context) => {
172
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = rb(input, context);
173
136
  const headers = {};
174
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/softwaresets/{id}";
175
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
137
+ b.bp("/softwaresets/{id}");
138
+ b.p("id", () => input.id, "{id}", false);
176
139
  let body;
177
140
  let { hostname: resolvedHostname } = await context.endpoint();
178
141
  if (context.disableHostPrefix !== true) {
@@ -181,23 +144,17 @@ export const se_GetSoftwareSetCommand = async (input, context) => {
181
144
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
182
145
  }
183
146
  }
184
- return new __HttpRequest({
185
- protocol,
186
- hostname: resolvedHostname,
187
- port,
188
- method: "GET",
189
- headers,
190
- path: resolvedPath,
191
- body,
192
- });
147
+ b.hn(resolvedHostname);
148
+ b.m("GET").h(headers).b(body);
149
+ return b.build();
193
150
  };
194
151
  export const se_ListDevicesCommand = async (input, context) => {
195
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = rb(input, context);
196
153
  const headers = {};
197
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
154
+ b.bp("/devices");
198
155
  const query = map({
199
- nextToken: [, input.nextToken],
200
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
156
+ [_nT]: [, input[_nT]],
157
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
201
158
  });
202
159
  let body;
203
160
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -207,24 +164,17 @@ export const se_ListDevicesCommand = async (input, context) => {
207
164
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
208
165
  }
209
166
  }
210
- return new __HttpRequest({
211
- protocol,
212
- hostname: resolvedHostname,
213
- port,
214
- method: "GET",
215
- headers,
216
- path: resolvedPath,
217
- query,
218
- body,
219
- });
167
+ b.hn(resolvedHostname);
168
+ b.m("GET").h(headers).q(query).b(body);
169
+ return b.build();
220
170
  };
221
171
  export const se_ListEnvironmentsCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = rb(input, context);
223
173
  const headers = {};
224
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
174
+ b.bp("/environments");
225
175
  const query = map({
226
- nextToken: [, input.nextToken],
227
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
176
+ [_nT]: [, input[_nT]],
177
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
228
178
  });
229
179
  let body;
230
180
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -234,24 +184,17 @@ export const se_ListEnvironmentsCommand = async (input, context) => {
234
184
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
235
185
  }
236
186
  }
237
- return new __HttpRequest({
238
- protocol,
239
- hostname: resolvedHostname,
240
- port,
241
- method: "GET",
242
- headers,
243
- path: resolvedPath,
244
- query,
245
- body,
246
- });
187
+ b.hn(resolvedHostname);
188
+ b.m("GET").h(headers).q(query).b(body);
189
+ return b.build();
247
190
  };
248
191
  export const se_ListSoftwareSetsCommand = async (input, context) => {
249
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
192
+ const b = rb(input, context);
250
193
  const headers = {};
251
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/softwaresets";
194
+ b.bp("/softwaresets");
252
195
  const query = map({
253
- nextToken: [, input.nextToken],
254
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
196
+ [_nT]: [, input[_nT]],
197
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
255
198
  });
256
199
  let body;
257
200
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -261,22 +204,15 @@ export const se_ListSoftwareSetsCommand = async (input, context) => {
261
204
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
262
205
  }
263
206
  }
264
- return new __HttpRequest({
265
- protocol,
266
- hostname: resolvedHostname,
267
- port,
268
- method: "GET",
269
- headers,
270
- path: resolvedPath,
271
- query,
272
- body,
273
- });
207
+ b.hn(resolvedHostname);
208
+ b.m("GET").h(headers).q(query).b(body);
209
+ return b.build();
274
210
  };
275
211
  export const se_ListTagsForResourceCommand = async (input, context) => {
276
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
212
+ const b = rb(input, context);
277
213
  const headers = {};
278
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
279
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
214
+ b.bp("/tags/{resourceArn}");
215
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
280
216
  let body;
281
217
  let { hostname: resolvedHostname } = await context.endpoint();
282
218
  if (context.disableHostPrefix !== true) {
@@ -285,23 +221,17 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
285
221
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
286
222
  }
287
223
  }
288
- return new __HttpRequest({
289
- protocol,
290
- hostname: resolvedHostname,
291
- port,
292
- method: "GET",
293
- headers,
294
- path: resolvedPath,
295
- body,
296
- });
224
+ b.hn(resolvedHostname);
225
+ b.m("GET").h(headers).b(body);
226
+ return b.build();
297
227
  };
298
228
  export const se_TagResourceCommand = async (input, context) => {
299
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
229
+ const b = rb(input, context);
300
230
  const headers = {
301
231
  "content-type": "application/json",
302
232
  };
303
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
304
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
233
+ b.bp("/tags/{resourceArn}");
234
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
305
235
  let body;
306
236
  body = JSON.stringify(take(input, {
307
237
  tags: (_) => _json(_),
@@ -313,25 +243,19 @@ export const se_TagResourceCommand = async (input, context) => {
313
243
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
314
244
  }
315
245
  }
316
- return new __HttpRequest({
317
- protocol,
318
- hostname: resolvedHostname,
319
- port,
320
- method: "POST",
321
- headers,
322
- path: resolvedPath,
323
- body,
324
- });
246
+ b.hn(resolvedHostname);
247
+ b.m("POST").h(headers).b(body);
248
+ return b.build();
325
249
  };
326
250
  export const se_UntagResourceCommand = async (input, context) => {
327
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = rb(input, context);
328
252
  const headers = {};
329
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
330
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
253
+ b.bp("/tags/{resourceArn}");
254
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
331
255
  const query = map({
332
- tagKeys: [
256
+ [_tK]: [
333
257
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
334
- () => (input.tagKeys || []).map((_entry) => _entry),
258
+ () => (input[_tK] || []).map((_entry) => _entry),
335
259
  ],
336
260
  });
337
261
  let body;
@@ -342,24 +266,17 @@ export const se_UntagResourceCommand = async (input, context) => {
342
266
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
343
267
  }
344
268
  }
345
- return new __HttpRequest({
346
- protocol,
347
- hostname: resolvedHostname,
348
- port,
349
- method: "DELETE",
350
- headers,
351
- path: resolvedPath,
352
- query,
353
- body,
354
- });
269
+ b.hn(resolvedHostname);
270
+ b.m("DELETE").h(headers).q(query).b(body);
271
+ return b.build();
355
272
  };
356
273
  export const se_UpdateDeviceCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = rb(input, context);
358
275
  const headers = {
359
276
  "content-type": "application/json",
360
277
  };
361
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{id}";
362
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
278
+ b.bp("/devices/{id}");
279
+ b.p("id", () => input.id, "{id}", false);
363
280
  let body;
364
281
  body = JSON.stringify(take(input, {
365
282
  desiredSoftwareSetId: [],
@@ -374,23 +291,17 @@ export const se_UpdateDeviceCommand = async (input, context) => {
374
291
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
375
292
  }
376
293
  }
377
- return new __HttpRequest({
378
- protocol,
379
- hostname: resolvedHostname,
380
- port,
381
- method: "PATCH",
382
- headers,
383
- path: resolvedPath,
384
- body,
385
- });
294
+ b.hn(resolvedHostname);
295
+ b.m("PATCH").h(headers).b(body);
296
+ return b.build();
386
297
  };
387
298
  export const se_UpdateEnvironmentCommand = async (input, context) => {
388
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const b = rb(input, context);
389
300
  const headers = {
390
301
  "content-type": "application/json",
391
302
  };
392
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{id}";
393
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
303
+ b.bp("/environments/{id}");
304
+ b.p("id", () => input.id, "{id}", false);
394
305
  let body;
395
306
  body = JSON.stringify(take(input, {
396
307
  desiredSoftwareSetId: [],
@@ -408,23 +319,17 @@ export const se_UpdateEnvironmentCommand = async (input, context) => {
408
319
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
409
320
  }
410
321
  }
411
- return new __HttpRequest({
412
- protocol,
413
- hostname: resolvedHostname,
414
- port,
415
- method: "PATCH",
416
- headers,
417
- path: resolvedPath,
418
- body,
419
- });
322
+ b.hn(resolvedHostname);
323
+ b.m("PATCH").h(headers).b(body);
324
+ return b.build();
420
325
  };
421
326
  export const se_UpdateSoftwareSetCommand = async (input, context) => {
422
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = rb(input, context);
423
328
  const headers = {
424
329
  "content-type": "application/json",
425
330
  };
426
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/softwaresets/{id}";
427
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
331
+ b.bp("/softwaresets/{id}");
332
+ b.p("id", () => input.id, "{id}", false);
428
333
  let body;
429
334
  body = JSON.stringify(take(input, {
430
335
  validationStatus: [],
@@ -436,15 +341,9 @@ export const se_UpdateSoftwareSetCommand = async (input, context) => {
436
341
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
437
342
  }
438
343
  }
439
- return new __HttpRequest({
440
- protocol,
441
- hostname: resolvedHostname,
442
- port,
443
- method: "PATCH",
444
- headers,
445
- path: resolvedPath,
446
- body,
447
- });
344
+ b.hn(resolvedHostname);
345
+ b.m("PATCH").h(headers).b(body);
346
+ return b.build();
448
347
  };
449
348
  export const de_CreateEnvironmentCommand = async (output, context) => {
450
349
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -1164,10 +1063,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1164
1063
  };
1165
1064
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1166
1065
  const contents = map({
1167
- retryAfterSeconds: [
1168
- () => void 0 !== parsedOutput.headers["retry-after"],
1169
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1170
- ],
1066
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1171
1067
  });
1172
1068
  const data = parsedOutput.body;
1173
1069
  const doc = take(data, {
@@ -1182,10 +1078,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1182
1078
  };
1183
1079
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
1184
1080
  const contents = map({
1185
- retryAfterSeconds: [
1186
- () => void 0 !== parsedOutput.headers["retry-after"],
1187
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1188
- ],
1081
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1189
1082
  });
1190
1083
  const data = parsedOutput.body;
1191
1084
  const doc = take(data, {
@@ -1232,10 +1125,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1232
1125
  };
1233
1126
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1234
1127
  const contents = map({
1235
- retryAfterSeconds: [
1236
- () => void 0 !== parsedOutput.headers["retry-after"],
1237
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1238
- ],
1128
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1239
1129
  });
1240
1130
  const data = parsedOutput.body;
1241
1131
  const doc = take(data, {
@@ -1409,6 +1299,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1409
1299
  value !== "" &&
1410
1300
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1411
1301
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1302
+ const _cT = "clientToken";
1303
+ const _mR = "maxResults";
1304
+ const _nT = "nextToken";
1305
+ const _rAS = "retryAfterSeconds";
1306
+ const _ra = "retry-after";
1307
+ const _tK = "tagKeys";
1412
1308
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1413
1309
  if (encoded.length) {
1414
1310
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-workspaces-thin-client",
3
3
  "description": "AWS SDK for JavaScript Workspaces Thin Client Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",