@aws-sdk/client-backup 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 (99) hide show
  1. package/dist-cjs/pagination/ListBackupJobSummariesPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListBackupJobsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListBackupPlanTemplatesPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListBackupPlanVersionsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListBackupPlansPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListBackupSelectionsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListBackupVaultsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListCopyJobSummariesPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListCopyJobsPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListFrameworksPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListLegalHoldsPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListProtectedResourcesByBackupVaultPaginator.js +2 -24
  13. package/dist-cjs/pagination/ListProtectedResourcesPaginator.js +2 -24
  14. package/dist-cjs/pagination/ListRecoveryPointsByBackupVaultPaginator.js +2 -24
  15. package/dist-cjs/pagination/ListRecoveryPointsByLegalHoldPaginator.js +2 -24
  16. package/dist-cjs/pagination/ListRecoveryPointsByResourcePaginator.js +2 -24
  17. package/dist-cjs/pagination/ListReportJobsPaginator.js +2 -24
  18. package/dist-cjs/pagination/ListReportPlansPaginator.js +2 -24
  19. package/dist-cjs/pagination/ListRestoreJobSummariesPaginator.js +2 -24
  20. package/dist-cjs/pagination/ListRestoreJobsByProtectedResourcePaginator.js +2 -24
  21. package/dist-cjs/pagination/ListRestoreJobsPaginator.js +2 -24
  22. package/dist-cjs/pagination/ListRestoreTestingPlansPaginator.js +2 -24
  23. package/dist-cjs/pagination/ListRestoreTestingSelectionsPaginator.js +2 -24
  24. package/dist-cjs/pagination/ListTagsPaginator.js +2 -24
  25. package/dist-cjs/protocols/Aws_restJson1.js +634 -1286
  26. package/dist-es/pagination/ListBackupJobSummariesPaginator.js +2 -23
  27. package/dist-es/pagination/ListBackupJobsPaginator.js +2 -23
  28. package/dist-es/pagination/ListBackupPlanTemplatesPaginator.js +2 -23
  29. package/dist-es/pagination/ListBackupPlanVersionsPaginator.js +2 -23
  30. package/dist-es/pagination/ListBackupPlansPaginator.js +2 -23
  31. package/dist-es/pagination/ListBackupSelectionsPaginator.js +2 -23
  32. package/dist-es/pagination/ListBackupVaultsPaginator.js +2 -23
  33. package/dist-es/pagination/ListCopyJobSummariesPaginator.js +2 -23
  34. package/dist-es/pagination/ListCopyJobsPaginator.js +2 -23
  35. package/dist-es/pagination/ListFrameworksPaginator.js +2 -23
  36. package/dist-es/pagination/ListLegalHoldsPaginator.js +2 -23
  37. package/dist-es/pagination/ListProtectedResourcesByBackupVaultPaginator.js +2 -23
  38. package/dist-es/pagination/ListProtectedResourcesPaginator.js +2 -23
  39. package/dist-es/pagination/ListRecoveryPointsByBackupVaultPaginator.js +2 -23
  40. package/dist-es/pagination/ListRecoveryPointsByLegalHoldPaginator.js +2 -23
  41. package/dist-es/pagination/ListRecoveryPointsByResourcePaginator.js +2 -23
  42. package/dist-es/pagination/ListReportJobsPaginator.js +2 -23
  43. package/dist-es/pagination/ListReportPlansPaginator.js +2 -23
  44. package/dist-es/pagination/ListRestoreJobSummariesPaginator.js +2 -23
  45. package/dist-es/pagination/ListRestoreJobsByProtectedResourcePaginator.js +2 -23
  46. package/dist-es/pagination/ListRestoreJobsPaginator.js +2 -23
  47. package/dist-es/pagination/ListRestoreTestingPlansPaginator.js +2 -23
  48. package/dist-es/pagination/ListRestoreTestingSelectionsPaginator.js +2 -23
  49. package/dist-es/pagination/ListTagsPaginator.js +2 -23
  50. package/dist-es/protocols/Aws_restJson1.js +635 -1287
  51. package/dist-types/pagination/ListBackupJobSummariesPaginator.d.ts +1 -1
  52. package/dist-types/pagination/ListBackupJobsPaginator.d.ts +1 -1
  53. package/dist-types/pagination/ListBackupPlanTemplatesPaginator.d.ts +1 -1
  54. package/dist-types/pagination/ListBackupPlanVersionsPaginator.d.ts +1 -1
  55. package/dist-types/pagination/ListBackupPlansPaginator.d.ts +1 -1
  56. package/dist-types/pagination/ListBackupSelectionsPaginator.d.ts +1 -1
  57. package/dist-types/pagination/ListBackupVaultsPaginator.d.ts +1 -1
  58. package/dist-types/pagination/ListCopyJobSummariesPaginator.d.ts +1 -1
  59. package/dist-types/pagination/ListCopyJobsPaginator.d.ts +1 -1
  60. package/dist-types/pagination/ListFrameworksPaginator.d.ts +1 -1
  61. package/dist-types/pagination/ListLegalHoldsPaginator.d.ts +1 -1
  62. package/dist-types/pagination/ListProtectedResourcesByBackupVaultPaginator.d.ts +1 -1
  63. package/dist-types/pagination/ListProtectedResourcesPaginator.d.ts +1 -1
  64. package/dist-types/pagination/ListRecoveryPointsByBackupVaultPaginator.d.ts +1 -1
  65. package/dist-types/pagination/ListRecoveryPointsByLegalHoldPaginator.d.ts +1 -1
  66. package/dist-types/pagination/ListRecoveryPointsByResourcePaginator.d.ts +1 -1
  67. package/dist-types/pagination/ListReportJobsPaginator.d.ts +1 -1
  68. package/dist-types/pagination/ListReportPlansPaginator.d.ts +1 -1
  69. package/dist-types/pagination/ListRestoreJobSummariesPaginator.d.ts +1 -1
  70. package/dist-types/pagination/ListRestoreJobsByProtectedResourcePaginator.d.ts +1 -1
  71. package/dist-types/pagination/ListRestoreJobsPaginator.d.ts +1 -1
  72. package/dist-types/pagination/ListRestoreTestingPlansPaginator.d.ts +1 -1
  73. package/dist-types/pagination/ListRestoreTestingSelectionsPaginator.d.ts +1 -1
  74. package/dist-types/pagination/ListTagsPaginator.d.ts +1 -1
  75. package/dist-types/ts3.4/pagination/ListBackupJobSummariesPaginator.d.ts +3 -3
  76. package/dist-types/ts3.4/pagination/ListBackupJobsPaginator.d.ts +3 -3
  77. package/dist-types/ts3.4/pagination/ListBackupPlanTemplatesPaginator.d.ts +3 -3
  78. package/dist-types/ts3.4/pagination/ListBackupPlanVersionsPaginator.d.ts +3 -3
  79. package/dist-types/ts3.4/pagination/ListBackupPlansPaginator.d.ts +3 -3
  80. package/dist-types/ts3.4/pagination/ListBackupSelectionsPaginator.d.ts +3 -3
  81. package/dist-types/ts3.4/pagination/ListBackupVaultsPaginator.d.ts +3 -3
  82. package/dist-types/ts3.4/pagination/ListCopyJobSummariesPaginator.d.ts +3 -3
  83. package/dist-types/ts3.4/pagination/ListCopyJobsPaginator.d.ts +3 -3
  84. package/dist-types/ts3.4/pagination/ListFrameworksPaginator.d.ts +3 -3
  85. package/dist-types/ts3.4/pagination/ListLegalHoldsPaginator.d.ts +3 -3
  86. package/dist-types/ts3.4/pagination/ListProtectedResourcesByBackupVaultPaginator.d.ts +3 -3
  87. package/dist-types/ts3.4/pagination/ListProtectedResourcesPaginator.d.ts +3 -3
  88. package/dist-types/ts3.4/pagination/ListRecoveryPointsByBackupVaultPaginator.d.ts +3 -3
  89. package/dist-types/ts3.4/pagination/ListRecoveryPointsByLegalHoldPaginator.d.ts +3 -3
  90. package/dist-types/ts3.4/pagination/ListRecoveryPointsByResourcePaginator.d.ts +3 -3
  91. package/dist-types/ts3.4/pagination/ListReportJobsPaginator.d.ts +3 -3
  92. package/dist-types/ts3.4/pagination/ListReportPlansPaginator.d.ts +3 -3
  93. package/dist-types/ts3.4/pagination/ListRestoreJobSummariesPaginator.d.ts +3 -3
  94. package/dist-types/ts3.4/pagination/ListRestoreJobsByProtectedResourcePaginator.d.ts +3 -3
  95. package/dist-types/ts3.4/pagination/ListRestoreJobsPaginator.d.ts +3 -3
  96. package/dist-types/ts3.4/pagination/ListRestoreTestingPlansPaginator.d.ts +3 -3
  97. package/dist-types/ts3.4/pagination/ListRestoreTestingSelectionsPaginator.d.ts +3 -3
  98. package/dist-types/ts3.4/pagination/ListTagsPaginator.d.ts +3 -3
  99. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupJobSummariesCommand, } from "../commands/ListBackupJobSummariesCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupJobSummariesCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupJobSummaries(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupJobSummaries = createPaginator(BackupClient, ListBackupJobSummariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupJobsCommand, } from "../commands/ListBackupJobsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupJobs(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupJobs = createPaginator(BackupClient, ListBackupJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupPlanTemplatesCommand, } from "../commands/ListBackupPlanTemplatesCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupPlanTemplatesCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupPlanTemplates(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupPlanTemplates = createPaginator(BackupClient, ListBackupPlanTemplatesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupPlanVersionsCommand, } from "../commands/ListBackupPlanVersionsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupPlanVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupPlanVersions(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupPlanVersions = createPaginator(BackupClient, ListBackupPlanVersionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupPlansCommand, } from "../commands/ListBackupPlansCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupPlansCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupPlans(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupPlans = createPaginator(BackupClient, ListBackupPlansCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupSelectionsCommand, } from "../commands/ListBackupSelectionsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupSelectionsCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupSelections(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupSelections = createPaginator(BackupClient, ListBackupSelectionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListBackupVaultsCommand, } from "../commands/ListBackupVaultsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBackupVaultsCommand(input), ...args);
5
- };
6
- export async function* paginateListBackupVaults(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListBackupVaults = createPaginator(BackupClient, ListBackupVaultsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListCopyJobSummariesCommand, } from "../commands/ListCopyJobSummariesCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCopyJobSummariesCommand(input), ...args);
5
- };
6
- export async function* paginateListCopyJobSummaries(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListCopyJobSummaries = createPaginator(BackupClient, ListCopyJobSummariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListCopyJobsCommand, } from "../commands/ListCopyJobsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCopyJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListCopyJobs(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListCopyJobs = createPaginator(BackupClient, ListCopyJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListFrameworksCommand, } from "../commands/ListFrameworksCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFrameworksCommand(input), ...args);
5
- };
6
- export async function* paginateListFrameworks(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListFrameworks = createPaginator(BackupClient, ListFrameworksCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListLegalHoldsCommand, } from "../commands/ListLegalHoldsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLegalHoldsCommand(input), ...args);
5
- };
6
- export async function* paginateListLegalHolds(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListLegalHolds = createPaginator(BackupClient, ListLegalHoldsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListProtectedResourcesByBackupVaultCommand, } from "../commands/ListProtectedResourcesByBackupVaultCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListProtectedResourcesByBackupVaultCommand(input), ...args);
5
- };
6
- export async function* paginateListProtectedResourcesByBackupVault(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListProtectedResourcesByBackupVault = createPaginator(BackupClient, ListProtectedResourcesByBackupVaultCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListProtectedResourcesCommand, } from "../commands/ListProtectedResourcesCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListProtectedResourcesCommand(input), ...args);
5
- };
6
- export async function* paginateListProtectedResources(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListProtectedResources = createPaginator(BackupClient, ListProtectedResourcesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRecoveryPointsByBackupVaultCommand, } from "../commands/ListRecoveryPointsByBackupVaultCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRecoveryPointsByBackupVaultCommand(input), ...args);
5
- };
6
- export async function* paginateListRecoveryPointsByBackupVault(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRecoveryPointsByBackupVault = createPaginator(BackupClient, ListRecoveryPointsByBackupVaultCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRecoveryPointsByLegalHoldCommand, } from "../commands/ListRecoveryPointsByLegalHoldCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRecoveryPointsByLegalHoldCommand(input), ...args);
5
- };
6
- export async function* paginateListRecoveryPointsByLegalHold(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRecoveryPointsByLegalHold = createPaginator(BackupClient, ListRecoveryPointsByLegalHoldCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRecoveryPointsByResourceCommand, } from "../commands/ListRecoveryPointsByResourceCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRecoveryPointsByResourceCommand(input), ...args);
5
- };
6
- export async function* paginateListRecoveryPointsByResource(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRecoveryPointsByResource = createPaginator(BackupClient, ListRecoveryPointsByResourceCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListReportJobsCommand, } from "../commands/ListReportJobsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListReportJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListReportJobs(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListReportJobs = createPaginator(BackupClient, ListReportJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListReportPlansCommand, } from "../commands/ListReportPlansCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListReportPlansCommand(input), ...args);
5
- };
6
- export async function* paginateListReportPlans(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListReportPlans = createPaginator(BackupClient, ListReportPlansCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRestoreJobSummariesCommand, } from "../commands/ListRestoreJobSummariesCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRestoreJobSummariesCommand(input), ...args);
5
- };
6
- export async function* paginateListRestoreJobSummaries(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRestoreJobSummaries = createPaginator(BackupClient, ListRestoreJobSummariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRestoreJobsByProtectedResourceCommand, } from "../commands/ListRestoreJobsByProtectedResourceCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRestoreJobsByProtectedResourceCommand(input), ...args);
5
- };
6
- export async function* paginateListRestoreJobsByProtectedResource(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRestoreJobsByProtectedResource = createPaginator(BackupClient, ListRestoreJobsByProtectedResourceCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRestoreJobsCommand, } from "../commands/ListRestoreJobsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRestoreJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListRestoreJobs(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRestoreJobs = createPaginator(BackupClient, ListRestoreJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { BackupClient } from "../BackupClient";
2
3
  import { ListRestoreTestingPlansCommand, } from "../commands/ListRestoreTestingPlansCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRestoreTestingPlansCommand(input), ...args);
5
- };
6
- export async function* paginateListRestoreTestingPlans(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 BackupClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Backup | BackupClient");
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 paginateListRestoreTestingPlans = createPaginator(BackupClient, ListRestoreTestingPlansCommand, "NextToken", "NextToken", "MaxResults");