@aws-sdk/client-elasticsearch-service 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 (51) hide show
  1. package/dist-cjs/pagination/DescribeDomainAutoTunesPaginator.js +2 -24
  2. package/dist-cjs/pagination/DescribeInboundCrossClusterSearchConnectionsPaginator.js +2 -24
  3. package/dist-cjs/pagination/DescribeOutboundCrossClusterSearchConnectionsPaginator.js +2 -24
  4. package/dist-cjs/pagination/DescribePackagesPaginator.js +2 -24
  5. package/dist-cjs/pagination/DescribeReservedElasticsearchInstanceOfferingsPaginator.js +2 -24
  6. package/dist-cjs/pagination/DescribeReservedElasticsearchInstancesPaginator.js +2 -24
  7. package/dist-cjs/pagination/GetPackageVersionHistoryPaginator.js +2 -24
  8. package/dist-cjs/pagination/GetUpgradeHistoryPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListDomainsForPackagePaginator.js +2 -24
  10. package/dist-cjs/pagination/ListElasticsearchInstanceTypesPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListElasticsearchVersionsPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListPackagesForDomainPaginator.js +2 -24
  13. package/dist-cjs/protocols/Aws_restJson1.js +272 -644
  14. package/dist-es/pagination/DescribeDomainAutoTunesPaginator.js +2 -23
  15. package/dist-es/pagination/DescribeInboundCrossClusterSearchConnectionsPaginator.js +2 -23
  16. package/dist-es/pagination/DescribeOutboundCrossClusterSearchConnectionsPaginator.js +2 -23
  17. package/dist-es/pagination/DescribePackagesPaginator.js +2 -23
  18. package/dist-es/pagination/DescribeReservedElasticsearchInstanceOfferingsPaginator.js +2 -23
  19. package/dist-es/pagination/DescribeReservedElasticsearchInstancesPaginator.js +2 -23
  20. package/dist-es/pagination/GetPackageVersionHistoryPaginator.js +2 -23
  21. package/dist-es/pagination/GetUpgradeHistoryPaginator.js +2 -23
  22. package/dist-es/pagination/ListDomainsForPackagePaginator.js +2 -23
  23. package/dist-es/pagination/ListElasticsearchInstanceTypesPaginator.js +2 -23
  24. package/dist-es/pagination/ListElasticsearchVersionsPaginator.js +2 -23
  25. package/dist-es/pagination/ListPackagesForDomainPaginator.js +2 -23
  26. package/dist-es/protocols/Aws_restJson1.js +273 -645
  27. package/dist-types/pagination/DescribeDomainAutoTunesPaginator.d.ts +1 -1
  28. package/dist-types/pagination/DescribeInboundCrossClusterSearchConnectionsPaginator.d.ts +1 -1
  29. package/dist-types/pagination/DescribeOutboundCrossClusterSearchConnectionsPaginator.d.ts +1 -1
  30. package/dist-types/pagination/DescribePackagesPaginator.d.ts +1 -1
  31. package/dist-types/pagination/DescribeReservedElasticsearchInstanceOfferingsPaginator.d.ts +1 -1
  32. package/dist-types/pagination/DescribeReservedElasticsearchInstancesPaginator.d.ts +1 -1
  33. package/dist-types/pagination/GetPackageVersionHistoryPaginator.d.ts +1 -1
  34. package/dist-types/pagination/GetUpgradeHistoryPaginator.d.ts +1 -1
  35. package/dist-types/pagination/ListDomainsForPackagePaginator.d.ts +1 -1
  36. package/dist-types/pagination/ListElasticsearchInstanceTypesPaginator.d.ts +1 -1
  37. package/dist-types/pagination/ListElasticsearchVersionsPaginator.d.ts +1 -1
  38. package/dist-types/pagination/ListPackagesForDomainPaginator.d.ts +1 -1
  39. package/dist-types/ts3.4/pagination/DescribeDomainAutoTunesPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/DescribeInboundCrossClusterSearchConnectionsPaginator.d.ts +3 -3
  41. package/dist-types/ts3.4/pagination/DescribeOutboundCrossClusterSearchConnectionsPaginator.d.ts +3 -3
  42. package/dist-types/ts3.4/pagination/DescribePackagesPaginator.d.ts +3 -3
  43. package/dist-types/ts3.4/pagination/DescribeReservedElasticsearchInstanceOfferingsPaginator.d.ts +3 -3
  44. package/dist-types/ts3.4/pagination/DescribeReservedElasticsearchInstancesPaginator.d.ts +3 -3
  45. package/dist-types/ts3.4/pagination/GetPackageVersionHistoryPaginator.d.ts +3 -3
  46. package/dist-types/ts3.4/pagination/GetUpgradeHistoryPaginator.d.ts +3 -3
  47. package/dist-types/ts3.4/pagination/ListDomainsForPackagePaginator.d.ts +3 -3
  48. package/dist-types/ts3.4/pagination/ListElasticsearchInstanceTypesPaginator.d.ts +3 -3
  49. package/dist-types/ts3.4/pagination/ListElasticsearchVersionsPaginator.d.ts +3 -3
  50. package/dist-types/ts3.4/pagination/ListPackagesForDomainPaginator.d.ts +3 -3
  51. package/package.json +7 -6
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateDescribeDomainAutoTunes = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribeDomainAutoTunesCommand_1 = require("../commands/DescribeDomainAutoTunesCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribeDomainAutoTunesCommand_1.DescribeDomainAutoTunesCommand(input), ...args);
8
- };
9
- async function* paginateDescribeDomainAutoTunes(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateDescribeDomainAutoTunes = paginateDescribeDomainAutoTunes;
7
+ exports.paginateDescribeDomainAutoTunes = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, DescribeDomainAutoTunesCommand_1.DescribeDomainAutoTunesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateDescribeInboundCrossClusterSearchConnections = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribeInboundCrossClusterSearchConnectionsCommand_1 = require("../commands/DescribeInboundCrossClusterSearchConnectionsCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribeInboundCrossClusterSearchConnectionsCommand_1.DescribeInboundCrossClusterSearchConnectionsCommand(input), ...args);
8
- };
9
- async function* paginateDescribeInboundCrossClusterSearchConnections(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateDescribeInboundCrossClusterSearchConnections = paginateDescribeInboundCrossClusterSearchConnections;
7
+ exports.paginateDescribeInboundCrossClusterSearchConnections = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, DescribeInboundCrossClusterSearchConnectionsCommand_1.DescribeInboundCrossClusterSearchConnectionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateDescribeOutboundCrossClusterSearchConnections = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribeOutboundCrossClusterSearchConnectionsCommand_1 = require("../commands/DescribeOutboundCrossClusterSearchConnectionsCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribeOutboundCrossClusterSearchConnectionsCommand_1.DescribeOutboundCrossClusterSearchConnectionsCommand(input), ...args);
8
- };
9
- async function* paginateDescribeOutboundCrossClusterSearchConnections(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateDescribeOutboundCrossClusterSearchConnections = paginateDescribeOutboundCrossClusterSearchConnections;
7
+ exports.paginateDescribeOutboundCrossClusterSearchConnections = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, DescribeOutboundCrossClusterSearchConnectionsCommand_1.DescribeOutboundCrossClusterSearchConnectionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateDescribePackages = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribePackagesCommand_1 = require("../commands/DescribePackagesCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribePackagesCommand_1.DescribePackagesCommand(input), ...args);
8
- };
9
- async function* paginateDescribePackages(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateDescribePackages = paginateDescribePackages;
7
+ exports.paginateDescribePackages = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, DescribePackagesCommand_1.DescribePackagesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateDescribeReservedElasticsearchInstanceOfferings = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribeReservedElasticsearchInstanceOfferingsCommand_1 = require("../commands/DescribeReservedElasticsearchInstanceOfferingsCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribeReservedElasticsearchInstanceOfferingsCommand_1.DescribeReservedElasticsearchInstanceOfferingsCommand(input), ...args);
8
- };
9
- async function* paginateDescribeReservedElasticsearchInstanceOfferings(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateDescribeReservedElasticsearchInstanceOfferings = paginateDescribeReservedElasticsearchInstanceOfferings;
7
+ exports.paginateDescribeReservedElasticsearchInstanceOfferings = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, DescribeReservedElasticsearchInstanceOfferingsCommand_1.DescribeReservedElasticsearchInstanceOfferingsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateDescribeReservedElasticsearchInstances = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const DescribeReservedElasticsearchInstancesCommand_1 = require("../commands/DescribeReservedElasticsearchInstancesCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new DescribeReservedElasticsearchInstancesCommand_1.DescribeReservedElasticsearchInstancesCommand(input), ...args);
8
- };
9
- async function* paginateDescribeReservedElasticsearchInstances(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateDescribeReservedElasticsearchInstances = paginateDescribeReservedElasticsearchInstances;
7
+ exports.paginateDescribeReservedElasticsearchInstances = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, DescribeReservedElasticsearchInstancesCommand_1.DescribeReservedElasticsearchInstancesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateGetPackageVersionHistory = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const GetPackageVersionHistoryCommand_1 = require("../commands/GetPackageVersionHistoryCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new GetPackageVersionHistoryCommand_1.GetPackageVersionHistoryCommand(input), ...args);
8
- };
9
- async function* paginateGetPackageVersionHistory(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateGetPackageVersionHistory = paginateGetPackageVersionHistory;
7
+ exports.paginateGetPackageVersionHistory = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, GetPackageVersionHistoryCommand_1.GetPackageVersionHistoryCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateGetUpgradeHistory = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const GetUpgradeHistoryCommand_1 = require("../commands/GetUpgradeHistoryCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new GetUpgradeHistoryCommand_1.GetUpgradeHistoryCommand(input), ...args);
8
- };
9
- async function* paginateGetUpgradeHistory(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateGetUpgradeHistory = paginateGetUpgradeHistory;
7
+ exports.paginateGetUpgradeHistory = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, GetUpgradeHistoryCommand_1.GetUpgradeHistoryCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDomainsForPackage = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDomainsForPackageCommand_1 = require("../commands/ListDomainsForPackageCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDomainsForPackageCommand_1.ListDomainsForPackageCommand(input), ...args);
8
- };
9
- async function* paginateListDomainsForPackage(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListDomainsForPackage = paginateListDomainsForPackage;
7
+ exports.paginateListDomainsForPackage = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, ListDomainsForPackageCommand_1.ListDomainsForPackageCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListElasticsearchInstanceTypes = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListElasticsearchInstanceTypesCommand_1 = require("../commands/ListElasticsearchInstanceTypesCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListElasticsearchInstanceTypesCommand_1.ListElasticsearchInstanceTypesCommand(input), ...args);
8
- };
9
- async function* paginateListElasticsearchInstanceTypes(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListElasticsearchInstanceTypes = paginateListElasticsearchInstanceTypes;
7
+ exports.paginateListElasticsearchInstanceTypes = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, ListElasticsearchInstanceTypesCommand_1.ListElasticsearchInstanceTypesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListElasticsearchVersions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListElasticsearchVersionsCommand_1 = require("../commands/ListElasticsearchVersionsCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListElasticsearchVersionsCommand_1.ListElasticsearchVersionsCommand(input), ...args);
8
- };
9
- async function* paginateListElasticsearchVersions(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListElasticsearchVersions = paginateListElasticsearchVersions;
7
+ exports.paginateListElasticsearchVersions = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, ListElasticsearchVersionsCommand_1.ListElasticsearchVersionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPackagesForDomain = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPackagesForDomainCommand_1 = require("../commands/ListPackagesForDomainCommand");
5
6
  const ElasticsearchServiceClient_1 = require("../ElasticsearchServiceClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPackagesForDomainCommand_1.ListPackagesForDomainCommand(input), ...args);
8
- };
9
- async function* paginateListPackagesForDomain(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ElasticsearchServiceClient_1.ElasticsearchServiceClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ElasticsearchService | ElasticsearchServiceClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListPackagesForDomain = paginateListPackagesForDomain;
7
+ exports.paginateListPackagesForDomain = (0, core_1.createPaginator)(ElasticsearchServiceClient_1.ElasticsearchServiceClient, ListPackagesForDomainCommand_1.ListPackagesForDomainCommand, "NextToken", "NextToken", "MaxResults");