@Override public boolean hasNext() { return oldResponse == null || nextPageFetcher.hasNextPage(oldResponse); }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link GetDevEndpointsIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final GetDevEndpointsIterable resume(GetDevEndpointsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetDevEndpointsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new GetDevEndpointsIterable(client, firstRequest) { @Override public Iterator<GetDevEndpointsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListDetectorsIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListDetectorsIterable resume(ListDetectorsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListDetectorsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListDetectorsIterable(client, firstRequest) { @Override public Iterator<ListDetectorsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListAliasesIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final ListAliasesIterable resume(ListAliasesResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListAliasesIterable(client, firstRequest.toBuilder().marker(lastSuccessfulPage.nextMarker()).build()); } return new ListAliasesIterable(client, firstRequest) { @Override public Iterator<ListAliasesResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link GetIntentsIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final GetIntentsIterable resume(GetIntentsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetIntentsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new GetIntentsIterable(client, firstRequest) { @Override public Iterator<GetIntentsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListChannelsIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListChannelsIterable resume(ListChannelsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListChannelsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListChannelsIterable(client, firstRequest) { @Override public Iterator<ListChannelsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListDatastoresIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListDatastoresIterable resume(ListDatastoresResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListDatastoresIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListDatastoresIterable(client, firstRequest) { @Override public Iterator<ListDatastoresResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link GetBotsIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final GetBotsIterable resume(GetBotsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetBotsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new GetBotsIterable(client, firstRequest) { @Override public Iterator<GetBotsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListJobsIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final ListJobsIterable resume(ListJobsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListJobsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListJobsIterable(client, firstRequest) { @Override public Iterator<ListJobsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link DescribeClustersIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final DescribeClustersIterable resume(DescribeClustersResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new DescribeClustersIterable(client, firstRequest.toBuilder().marker(lastSuccessfulPage.marker()).build()); } return new DescribeClustersIterable(client, firstRequest) { @Override public Iterator<DescribeClustersResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListInvitationsIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListInvitationsIterable resume(ListInvitationsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListInvitationsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListInvitationsIterable(client, firstRequest) { @Override public Iterator<ListInvitationsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link PreviewAgentsIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final PreviewAgentsIterable resume(PreviewAgentsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new PreviewAgentsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new PreviewAgentsIterable(client, firstRequest) { @Override public Iterator<PreviewAgentsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link GetSlotTypesIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final GetSlotTypesIterable resume(GetSlotTypesResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetSlotTypesIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new GetSlotTypesIterable(client, firstRequest) { @Override public Iterator<GetSlotTypesResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListKeyPoliciesIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListKeyPoliciesIterable resume(ListKeyPoliciesResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListKeyPoliciesIterable(client, firstRequest.toBuilder().marker(lastSuccessfulPage.nextMarker()).build()); } return new ListKeyPoliciesIterable(client, firstRequest) { @Override public Iterator<ListKeyPoliciesResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListPresetsIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final ListPresetsIterable resume(ListPresetsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListPresetsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListPresetsIterable(client, firstRequest) { @Override public Iterator<ListPresetsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListFlowsIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final ListFlowsIterable resume(ListFlowsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListFlowsIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new ListFlowsIterable(client, firstRequest) { @Override public Iterator<ListFlowsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link GetTablesIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final GetTablesIterable resume(GetTablesResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetTablesIterable(client, firstRequest.toBuilder().nextToken(lastSuccessfulPage.nextToken()).build()); } return new GetTablesIterable(client, firstRequest) { @Override public Iterator<GetTablesResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListAccountAliasesIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListAccountAliasesIterable resume(ListAccountAliasesResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListAccountAliasesIterable(client, firstRequest.toBuilder().marker(lastSuccessfulPage.marker()).build()); } return new ListAccountAliasesIterable(client, firstRequest) { @Override public Iterator<ListAccountAliasesResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListInstanceProfilesIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListInstanceProfilesIterable resume(ListInstanceProfilesResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListInstanceProfilesIterable(client, firstRequest.toBuilder().marker(lastSuccessfulPage.marker()).build()); } return new ListInstanceProfilesIterable(client, firstRequest) { @Override public Iterator<ListInstanceProfilesResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * <p> * A helper method to resume the pages in case of unexpected failures. The method takes the last successful response * page as input and returns an instance of {@link ListHealthChecksIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final ListHealthChecksIterable resume(ListHealthChecksResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new ListHealthChecksIterable(client, firstRequest.toBuilder().marker(lastSuccessfulPage.nextMarker()).build()); } return new ListHealthChecksIterable(client, firstRequest) { @Override public Iterator<ListHealthChecksResponse> iterator() { return Collections.emptyIterator(); } }; }