@aws-sdk/client-migrationhubstrategy 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.
Files changed (27) hide show
  1. package/dist-cjs/pagination/GetServerDetailsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListAnalyzableServersPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListApplicationComponentsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListCollectorsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListImportFileTaskPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListServersPaginator.js +2 -24
  7. package/dist-cjs/protocols/Aws_restJson1.js +104 -261
  8. package/dist-es/pagination/GetServerDetailsPaginator.js +2 -23
  9. package/dist-es/pagination/ListAnalyzableServersPaginator.js +2 -23
  10. package/dist-es/pagination/ListApplicationComponentsPaginator.js +2 -23
  11. package/dist-es/pagination/ListCollectorsPaginator.js +2 -23
  12. package/dist-es/pagination/ListImportFileTaskPaginator.js +2 -23
  13. package/dist-es/pagination/ListServersPaginator.js +2 -23
  14. package/dist-es/protocols/Aws_restJson1.js +105 -262
  15. package/dist-types/pagination/GetServerDetailsPaginator.d.ts +1 -1
  16. package/dist-types/pagination/ListAnalyzableServersPaginator.d.ts +1 -1
  17. package/dist-types/pagination/ListApplicationComponentsPaginator.d.ts +1 -1
  18. package/dist-types/pagination/ListCollectorsPaginator.d.ts +1 -1
  19. package/dist-types/pagination/ListImportFileTaskPaginator.d.ts +1 -1
  20. package/dist-types/pagination/ListServersPaginator.d.ts +1 -1
  21. package/dist-types/ts3.4/pagination/GetServerDetailsPaginator.d.ts +3 -3
  22. package/dist-types/ts3.4/pagination/ListAnalyzableServersPaginator.d.ts +3 -3
  23. package/dist-types/ts3.4/pagination/ListApplicationComponentsPaginator.d.ts +3 -3
  24. package/dist-types/ts3.4/pagination/ListCollectorsPaginator.d.ts +3 -3
  25. package/dist-types/ts3.4/pagination/ListImportFileTaskPaginator.d.ts +3 -3
  26. package/dist-types/ts3.4/pagination/ListServersPaginator.d.ts +3 -3
  27. package/package.json +7 -6
@@ -1,222 +1,142 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateServerConfigCommand = exports.de_UpdateApplicationComponentConfigCommand = exports.de_StopAssessmentCommand = exports.de_StartRecommendationReportGenerationCommand = exports.de_StartImportFileTaskCommand = exports.de_StartAssessmentCommand = exports.de_PutPortfolioPreferencesCommand = exports.de_ListServersCommand = exports.de_ListImportFileTaskCommand = exports.de_ListCollectorsCommand = exports.de_ListApplicationComponentsCommand = exports.de_ListAnalyzableServersCommand = exports.de_GetServerStrategiesCommand = exports.de_GetServerDetailsCommand = exports.de_GetRecommendationReportDetailsCommand = exports.de_GetPortfolioSummaryCommand = exports.de_GetPortfolioPreferencesCommand = exports.de_GetLatestAssessmentIdCommand = exports.de_GetImportFileTaskCommand = exports.de_GetAssessmentCommand = exports.de_GetApplicationComponentStrategiesCommand = exports.de_GetApplicationComponentDetailsCommand = exports.se_UpdateServerConfigCommand = exports.se_UpdateApplicationComponentConfigCommand = exports.se_StopAssessmentCommand = exports.se_StartRecommendationReportGenerationCommand = exports.se_StartImportFileTaskCommand = exports.se_StartAssessmentCommand = exports.se_PutPortfolioPreferencesCommand = exports.se_ListServersCommand = exports.se_ListImportFileTaskCommand = exports.se_ListCollectorsCommand = exports.se_ListApplicationComponentsCommand = exports.se_ListAnalyzableServersCommand = exports.se_GetServerStrategiesCommand = exports.se_GetServerDetailsCommand = exports.se_GetRecommendationReportDetailsCommand = exports.se_GetPortfolioSummaryCommand = exports.se_GetPortfolioPreferencesCommand = exports.se_GetLatestAssessmentIdCommand = exports.se_GetImportFileTaskCommand = exports.se_GetAssessmentCommand = exports.se_GetApplicationComponentStrategiesCommand = exports.se_GetApplicationComponentDetailsCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const MigrationHubStrategyServiceException_1 = require("../models/MigrationHubStrategyServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_GetApplicationComponentDetailsCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {};
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
12
- "/get-applicationcomponent-details/{applicationComponentId}";
13
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
11
+ b.bp("/get-applicationcomponent-details/{applicationComponentId}");
12
+ b.p("applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
14
13
  let body;
15
- return new protocol_http_1.HttpRequest({
16
- protocol,
17
- hostname,
18
- port,
19
- method: "GET",
20
- headers,
21
- path: resolvedPath,
22
- body,
23
- });
14
+ b.m("GET").h(headers).b(body);
15
+ return b.build();
24
16
  };
25
17
  exports.se_GetApplicationComponentDetailsCommand = se_GetApplicationComponentDetailsCommand;
26
18
  const se_GetApplicationComponentStrategiesCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
19
+ const b = (0, core_1.requestBuilder)(input, context);
28
20
  const headers = {};
29
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
30
- "/get-applicationcomponent-strategies/{applicationComponentId}";
31
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
21
+ b.bp("/get-applicationcomponent-strategies/{applicationComponentId}");
22
+ b.p("applicationComponentId", () => input.applicationComponentId, "{applicationComponentId}", false);
32
23
  let body;
33
- return new protocol_http_1.HttpRequest({
34
- protocol,
35
- hostname,
36
- port,
37
- method: "GET",
38
- headers,
39
- path: resolvedPath,
40
- body,
41
- });
24
+ b.m("GET").h(headers).b(body);
25
+ return b.build();
42
26
  };
43
27
  exports.se_GetApplicationComponentStrategiesCommand = se_GetApplicationComponentStrategiesCommand;
44
28
  const se_GetAssessmentCommand = async (input, context) => {
45
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = (0, core_1.requestBuilder)(input, context);
46
30
  const headers = {};
47
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-assessment/{id}";
48
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
31
+ b.bp("/get-assessment/{id}");
32
+ b.p("id", () => input.id, "{id}", false);
49
33
  let body;
50
- return new protocol_http_1.HttpRequest({
51
- protocol,
52
- hostname,
53
- port,
54
- method: "GET",
55
- headers,
56
- path: resolvedPath,
57
- body,
58
- });
34
+ b.m("GET").h(headers).b(body);
35
+ return b.build();
59
36
  };
60
37
  exports.se_GetAssessmentCommand = se_GetAssessmentCommand;
61
38
  const se_GetImportFileTaskCommand = async (input, context) => {
62
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
63
40
  const headers = {};
64
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-import-file-task/{id}";
65
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
41
+ b.bp("/get-import-file-task/{id}");
42
+ b.p("id", () => input.id, "{id}", false);
66
43
  let body;
67
- return new protocol_http_1.HttpRequest({
68
- protocol,
69
- hostname,
70
- port,
71
- method: "GET",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
44
+ b.m("GET").h(headers).b(body);
45
+ return b.build();
76
46
  };
77
47
  exports.se_GetImportFileTaskCommand = se_GetImportFileTaskCommand;
78
48
  const se_GetLatestAssessmentIdCommand = async (input, context) => {
79
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
49
+ const b = (0, core_1.requestBuilder)(input, context);
80
50
  const headers = {
81
51
  "content-type": "application/json",
82
52
  };
83
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-latest-assessment-id";
53
+ b.bp("/get-latest-assessment-id");
84
54
  let body;
85
55
  body = "";
86
- return new protocol_http_1.HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "GET",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
56
+ b.m("GET").h(headers).b(body);
57
+ return b.build();
95
58
  };
96
59
  exports.se_GetLatestAssessmentIdCommand = se_GetLatestAssessmentIdCommand;
97
60
  const se_GetPortfolioPreferencesCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const b = (0, core_1.requestBuilder)(input, context);
99
62
  const headers = {
100
63
  "content-type": "application/json",
101
64
  };
102
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-portfolio-preferences";
65
+ b.bp("/get-portfolio-preferences");
103
66
  let body;
104
67
  body = "";
105
- return new protocol_http_1.HttpRequest({
106
- protocol,
107
- hostname,
108
- port,
109
- method: "GET",
110
- headers,
111
- path: resolvedPath,
112
- body,
113
- });
68
+ b.m("GET").h(headers).b(body);
69
+ return b.build();
114
70
  };
115
71
  exports.se_GetPortfolioPreferencesCommand = se_GetPortfolioPreferencesCommand;
116
72
  const se_GetPortfolioSummaryCommand = async (input, context) => {
117
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = (0, core_1.requestBuilder)(input, context);
118
74
  const headers = {
119
75
  "content-type": "application/json",
120
76
  };
121
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-portfolio-summary";
77
+ b.bp("/get-portfolio-summary");
122
78
  let body;
123
79
  body = "";
124
- return new protocol_http_1.HttpRequest({
125
- protocol,
126
- hostname,
127
- port,
128
- method: "GET",
129
- headers,
130
- path: resolvedPath,
131
- body,
132
- });
80
+ b.m("GET").h(headers).b(body);
81
+ return b.build();
133
82
  };
134
83
  exports.se_GetPortfolioSummaryCommand = se_GetPortfolioSummaryCommand;
135
84
  const se_GetRecommendationReportDetailsCommand = async (input, context) => {
136
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = (0, core_1.requestBuilder)(input, context);
137
86
  const headers = {};
138
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-recommendation-report-details/{id}";
139
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
87
+ b.bp("/get-recommendation-report-details/{id}");
88
+ b.p("id", () => input.id, "{id}", false);
140
89
  let body;
141
- return new protocol_http_1.HttpRequest({
142
- protocol,
143
- hostname,
144
- port,
145
- method: "GET",
146
- headers,
147
- path: resolvedPath,
148
- body,
149
- });
90
+ b.m("GET").h(headers).b(body);
91
+ return b.build();
150
92
  };
151
93
  exports.se_GetRecommendationReportDetailsCommand = se_GetRecommendationReportDetailsCommand;
152
94
  const se_GetServerDetailsCommand = async (input, context) => {
153
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = (0, core_1.requestBuilder)(input, context);
154
96
  const headers = {};
155
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-details/{serverId}";
156
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serverId", () => input.serverId, "{serverId}", false);
97
+ b.bp("/get-server-details/{serverId}");
98
+ b.p("serverId", () => input.serverId, "{serverId}", false);
157
99
  const query = (0, smithy_client_1.map)({
158
- nextToken: [, input.nextToken],
159
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
100
+ [_nT]: [, input[_nT]],
101
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
160
102
  });
161
103
  let body;
162
- return new protocol_http_1.HttpRequest({
163
- protocol,
164
- hostname,
165
- port,
166
- method: "GET",
167
- headers,
168
- path: resolvedPath,
169
- query,
170
- body,
171
- });
104
+ b.m("GET").h(headers).q(query).b(body);
105
+ return b.build();
172
106
  };
173
107
  exports.se_GetServerDetailsCommand = se_GetServerDetailsCommand;
174
108
  const se_GetServerStrategiesCommand = async (input, context) => {
175
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = (0, core_1.requestBuilder)(input, context);
176
110
  const headers = {};
177
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-strategies/{serverId}";
178
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "serverId", () => input.serverId, "{serverId}", false);
111
+ b.bp("/get-server-strategies/{serverId}");
112
+ b.p("serverId", () => input.serverId, "{serverId}", false);
179
113
  let body;
180
- return new protocol_http_1.HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "GET",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
114
+ b.m("GET").h(headers).b(body);
115
+ return b.build();
189
116
  };
190
117
  exports.se_GetServerStrategiesCommand = se_GetServerStrategiesCommand;
191
118
  const se_ListAnalyzableServersCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
119
+ const b = (0, core_1.requestBuilder)(input, context);
193
120
  const headers = {
194
121
  "content-type": "application/json",
195
122
  };
196
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-analyzable-servers";
123
+ b.bp("/list-analyzable-servers");
197
124
  let body;
198
125
  body = JSON.stringify((0, smithy_client_1.take)(input, {
199
126
  maxResults: [],
200
127
  nextToken: [],
201
128
  sort: [],
202
129
  }));
203
- return new protocol_http_1.HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "POST",
208
- headers,
209
- path: resolvedPath,
210
- body,
211
- });
130
+ b.m("POST").h(headers).b(body);
131
+ return b.build();
212
132
  };
213
133
  exports.se_ListAnalyzableServersCommand = se_ListAnalyzableServersCommand;
214
134
  const se_ListApplicationComponentsCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
135
+ const b = (0, core_1.requestBuilder)(input, context);
216
136
  const headers = {
217
137
  "content-type": "application/json",
218
138
  };
219
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applicationcomponents";
139
+ b.bp("/list-applicationcomponents");
220
140
  let body;
221
141
  body = JSON.stringify((0, smithy_client_1.take)(input, {
222
142
  applicationComponentCriteria: [],
@@ -226,65 +146,42 @@ const se_ListApplicationComponentsCommand = async (input, context) => {
226
146
  nextToken: [],
227
147
  sort: [],
228
148
  }));
229
- return new protocol_http_1.HttpRequest({
230
- protocol,
231
- hostname,
232
- port,
233
- method: "POST",
234
- headers,
235
- path: resolvedPath,
236
- body,
237
- });
149
+ b.m("POST").h(headers).b(body);
150
+ return b.build();
238
151
  };
239
152
  exports.se_ListApplicationComponentsCommand = se_ListApplicationComponentsCommand;
240
153
  const se_ListCollectorsCommand = async (input, context) => {
241
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = (0, core_1.requestBuilder)(input, context);
242
155
  const headers = {};
243
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-collectors";
156
+ b.bp("/list-collectors");
244
157
  const query = (0, smithy_client_1.map)({
245
- nextToken: [, input.nextToken],
246
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
158
+ [_nT]: [, input[_nT]],
159
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
247
160
  });
248
161
  let body;
249
- return new protocol_http_1.HttpRequest({
250
- protocol,
251
- hostname,
252
- port,
253
- method: "GET",
254
- headers,
255
- path: resolvedPath,
256
- query,
257
- body,
258
- });
162
+ b.m("GET").h(headers).q(query).b(body);
163
+ return b.build();
259
164
  };
260
165
  exports.se_ListCollectorsCommand = se_ListCollectorsCommand;
261
166
  const se_ListImportFileTaskCommand = async (input, context) => {
262
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
167
+ const b = (0, core_1.requestBuilder)(input, context);
263
168
  const headers = {};
264
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-import-file-task";
169
+ b.bp("/list-import-file-task");
265
170
  const query = (0, smithy_client_1.map)({
266
- nextToken: [, input.nextToken],
267
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
171
+ [_nT]: [, input[_nT]],
172
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
268
173
  });
269
174
  let body;
270
- return new protocol_http_1.HttpRequest({
271
- protocol,
272
- hostname,
273
- port,
274
- method: "GET",
275
- headers,
276
- path: resolvedPath,
277
- query,
278
- body,
279
- });
175
+ b.m("GET").h(headers).q(query).b(body);
176
+ return b.build();
280
177
  };
281
178
  exports.se_ListImportFileTaskCommand = se_ListImportFileTaskCommand;
282
179
  const se_ListServersCommand = async (input, context) => {
283
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
180
+ const b = (0, core_1.requestBuilder)(input, context);
284
181
  const headers = {
285
182
  "content-type": "application/json",
286
183
  };
287
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-servers";
184
+ b.bp("/list-servers");
288
185
  let body;
289
186
  body = JSON.stringify((0, smithy_client_1.take)(input, {
290
187
  filterValue: [],
@@ -294,23 +191,16 @@ const se_ListServersCommand = async (input, context) => {
294
191
  serverCriteria: [],
295
192
  sort: [],
296
193
  }));
297
- return new protocol_http_1.HttpRequest({
298
- protocol,
299
- hostname,
300
- port,
301
- method: "POST",
302
- headers,
303
- path: resolvedPath,
304
- body,
305
- });
194
+ b.m("POST").h(headers).b(body);
195
+ return b.build();
306
196
  };
307
197
  exports.se_ListServersCommand = se_ListServersCommand;
308
198
  const se_PutPortfolioPreferencesCommand = async (input, context) => {
309
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = (0, core_1.requestBuilder)(input, context);
310
200
  const headers = {
311
201
  "content-type": "application/json",
312
202
  };
313
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-portfolio-preferences";
203
+ b.bp("/put-portfolio-preferences");
314
204
  let body;
315
205
  body = JSON.stringify((0, smithy_client_1.take)(input, {
316
206
  applicationMode: [],
@@ -318,23 +208,16 @@ const se_PutPortfolioPreferencesCommand = async (input, context) => {
318
208
  databasePreferences: (_) => (0, smithy_client_1._json)(_),
319
209
  prioritizeBusinessGoals: (_) => (0, smithy_client_1._json)(_),
320
210
  }));
321
- return new protocol_http_1.HttpRequest({
322
- protocol,
323
- hostname,
324
- port,
325
- method: "POST",
326
- headers,
327
- path: resolvedPath,
328
- body,
329
- });
211
+ b.m("POST").h(headers).b(body);
212
+ return b.build();
330
213
  };
331
214
  exports.se_PutPortfolioPreferencesCommand = se_PutPortfolioPreferencesCommand;
332
215
  const se_StartAssessmentCommand = async (input, context) => {
333
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
216
+ const b = (0, core_1.requestBuilder)(input, context);
334
217
  const headers = {
335
218
  "content-type": "application/json",
336
219
  };
337
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-assessment";
220
+ b.bp("/start-assessment");
338
221
  let body;
339
222
  body = JSON.stringify((0, smithy_client_1.take)(input, {
340
223
  assessmentDataSourceType: [],
@@ -342,23 +225,16 @@ const se_StartAssessmentCommand = async (input, context) => {
342
225
  s3bucketForAnalysisData: [],
343
226
  s3bucketForReportData: [],
344
227
  }));
345
- return new protocol_http_1.HttpRequest({
346
- protocol,
347
- hostname,
348
- port,
349
- method: "POST",
350
- headers,
351
- path: resolvedPath,
352
- body,
353
- });
228
+ b.m("POST").h(headers).b(body);
229
+ return b.build();
354
230
  };
355
231
  exports.se_StartAssessmentCommand = se_StartAssessmentCommand;
356
232
  const se_StartImportFileTaskCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = (0, core_1.requestBuilder)(input, context);
358
234
  const headers = {
359
235
  "content-type": "application/json",
360
236
  };
361
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-import-file-task";
237
+ b.bp("/start-import-file-task");
362
238
  let body;
363
239
  body = JSON.stringify((0, smithy_client_1.take)(input, {
364
240
  S3Bucket: [],
@@ -368,66 +244,45 @@ const se_StartImportFileTaskCommand = async (input, context) => {
368
244
  s3bucketForReportData: [],
369
245
  s3key: [],
370
246
  }));
371
- return new protocol_http_1.HttpRequest({
372
- protocol,
373
- hostname,
374
- port,
375
- method: "POST",
376
- headers,
377
- path: resolvedPath,
378
- body,
379
- });
247
+ b.m("POST").h(headers).b(body);
248
+ return b.build();
380
249
  };
381
250
  exports.se_StartImportFileTaskCommand = se_StartImportFileTaskCommand;
382
251
  const se_StartRecommendationReportGenerationCommand = async (input, context) => {
383
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
252
+ const b = (0, core_1.requestBuilder)(input, context);
384
253
  const headers = {
385
254
  "content-type": "application/json",
386
255
  };
387
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-recommendation-report-generation";
256
+ b.bp("/start-recommendation-report-generation");
388
257
  let body;
389
258
  body = JSON.stringify((0, smithy_client_1.take)(input, {
390
259
  groupIdFilter: (_) => (0, smithy_client_1._json)(_),
391
260
  outputFormat: [],
392
261
  }));
393
- return new protocol_http_1.HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "POST",
398
- headers,
399
- path: resolvedPath,
400
- body,
401
- });
262
+ b.m("POST").h(headers).b(body);
263
+ return b.build();
402
264
  };
403
265
  exports.se_StartRecommendationReportGenerationCommand = se_StartRecommendationReportGenerationCommand;
404
266
  const se_StopAssessmentCommand = async (input, context) => {
405
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
+ const b = (0, core_1.requestBuilder)(input, context);
406
268
  const headers = {
407
269
  "content-type": "application/json",
408
270
  };
409
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stop-assessment";
271
+ b.bp("/stop-assessment");
410
272
  let body;
411
273
  body = JSON.stringify((0, smithy_client_1.take)(input, {
412
274
  assessmentId: [],
413
275
  }));
414
- return new protocol_http_1.HttpRequest({
415
- protocol,
416
- hostname,
417
- port,
418
- method: "POST",
419
- headers,
420
- path: resolvedPath,
421
- body,
422
- });
276
+ b.m("POST").h(headers).b(body);
277
+ return b.build();
423
278
  };
424
279
  exports.se_StopAssessmentCommand = se_StopAssessmentCommand;
425
280
  const se_UpdateApplicationComponentConfigCommand = async (input, context) => {
426
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const b = (0, core_1.requestBuilder)(input, context);
427
282
  const headers = {
428
283
  "content-type": "application/json",
429
284
  };
430
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-applicationcomponent-config";
285
+ b.bp("/update-applicationcomponent-config");
431
286
  let body;
432
287
  body = JSON.stringify((0, smithy_client_1.take)(input, {
433
288
  appType: [],
@@ -438,37 +293,23 @@ const se_UpdateApplicationComponentConfigCommand = async (input, context) => {
438
293
  sourceCodeList: (_) => (0, smithy_client_1._json)(_),
439
294
  strategyOption: (_) => (0, smithy_client_1._json)(_),
440
295
  }));
441
- return new protocol_http_1.HttpRequest({
442
- protocol,
443
- hostname,
444
- port,
445
- method: "POST",
446
- headers,
447
- path: resolvedPath,
448
- body,
449
- });
296
+ b.m("POST").h(headers).b(body);
297
+ return b.build();
450
298
  };
451
299
  exports.se_UpdateApplicationComponentConfigCommand = se_UpdateApplicationComponentConfigCommand;
452
300
  const se_UpdateServerConfigCommand = async (input, context) => {
453
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
301
+ const b = (0, core_1.requestBuilder)(input, context);
454
302
  const headers = {
455
303
  "content-type": "application/json",
456
304
  };
457
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-server-config";
305
+ b.bp("/update-server-config");
458
306
  let body;
459
307
  body = JSON.stringify((0, smithy_client_1.take)(input, {
460
308
  serverId: [],
461
309
  strategyOption: (_) => (0, smithy_client_1._json)(_),
462
310
  }));
463
- return new protocol_http_1.HttpRequest({
464
- protocol,
465
- hostname,
466
- port,
467
- method: "POST",
468
- headers,
469
- path: resolvedPath,
470
- body,
471
- });
311
+ b.m("POST").h(headers).b(body);
312
+ return b.build();
472
313
  };
473
314
  exports.se_UpdateServerConfigCommand = se_UpdateServerConfigCommand;
474
315
  const de_GetApplicationComponentDetailsCommand = async (output, context) => {
@@ -1690,6 +1531,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1690
1531
  value !== "" &&
1691
1532
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1692
1533
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1534
+ const _mR = "maxResults";
1535
+ const _nT = "nextToken";
1693
1536
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1694
1537
  if (encoded.length) {
1695
1538
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { GetServerDetailsCommand, } from "../commands/GetServerDetailsCommand";
2
3
  import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new GetServerDetailsCommand(input), ...args);
5
- };
6
- export async function* paginateGetServerDetails(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 MigrationHubStrategyClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient");
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 paginateGetServerDetails = createPaginator(MigrationHubStrategyClient, GetServerDetailsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAnalyzableServersCommand, } from "../commands/ListAnalyzableServersCommand";
2
3
  import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAnalyzableServersCommand(input), ...args);
5
- };
6
- export async function* paginateListAnalyzableServers(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 MigrationHubStrategyClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient");
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 paginateListAnalyzableServers = createPaginator(MigrationHubStrategyClient, ListAnalyzableServersCommand, "nextToken", "nextToken", "maxResults");