@aws-sdk/client-workspaces-thin-client 3.476.0 → 3.478.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,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDevicesCommand } from "../commands/ListDevicesCommand";
2
3
  import { WorkSpacesThinClientClient } from "../WorkSpacesThinClientClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDevicesCommand(input), ...args);
5
- };
6
- export async function* paginateListDevices(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof WorkSpacesThinClientClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WorkSpacesThinClient | WorkSpacesThinClientClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDevices = createPaginator(WorkSpacesThinClientClient, ListDevicesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEnvironmentsCommand, } from "../commands/ListEnvironmentsCommand";
2
3
  import { WorkSpacesThinClientClient } from "../WorkSpacesThinClientClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEnvironmentsCommand(input), ...args);
5
- };
6
- export async function* paginateListEnvironments(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof WorkSpacesThinClientClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WorkSpacesThinClient | WorkSpacesThinClientClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListEnvironments = createPaginator(WorkSpacesThinClientClient, ListEnvironmentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListSoftwareSetsCommand, } from "../commands/ListSoftwareSetsCommand";
2
3
  import { WorkSpacesThinClientClient } from "../WorkSpacesThinClientClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListSoftwareSetsCommand(input), ...args);
5
- };
6
- export async function* paginateListSoftwareSets(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof WorkSpacesThinClientClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WorkSpacesThinClient | WorkSpacesThinClientClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListSoftwareSets = createPaginator(WorkSpacesThinClientClient, ListSoftwareSetsCommand, "nextToken", "nextToken", "maxResults");
@@ -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);
@@ -4,4 +4,4 @@ import { WorkSpacesThinClientPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListDevices(config: WorkSpacesThinClientPaginationConfiguration, input: ListDevicesCommandInput, ...additionalArguments: any): Paginator<ListDevicesCommandOutput>;
7
+ export declare const paginateListDevices: (config: WorkSpacesThinClientPaginationConfiguration, input: ListDevicesCommandInput, ...rest: any[]) => Paginator<ListDevicesCommandOutput>;
@@ -4,4 +4,4 @@ import { WorkSpacesThinClientPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListEnvironments(config: WorkSpacesThinClientPaginationConfiguration, input: ListEnvironmentsCommandInput, ...additionalArguments: any): Paginator<ListEnvironmentsCommandOutput>;
7
+ export declare const paginateListEnvironments: (config: WorkSpacesThinClientPaginationConfiguration, input: ListEnvironmentsCommandInput, ...rest: any[]) => Paginator<ListEnvironmentsCommandOutput>;
@@ -4,4 +4,4 @@ import { WorkSpacesThinClientPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListSoftwareSets(config: WorkSpacesThinClientPaginationConfiguration, input: ListSoftwareSetsCommandInput, ...additionalArguments: any): Paginator<ListSoftwareSetsCommandOutput>;
7
+ export declare const paginateListSoftwareSets: (config: WorkSpacesThinClientPaginationConfiguration, input: ListSoftwareSetsCommandInput, ...rest: any[]) => Paginator<ListSoftwareSetsCommandOutput>;