@Override public GetDeploymentsRequest build() { return new GetDeploymentsRequest(this); }
return getDeployments(GetDeploymentsRequest.builder().applyMutation(getDeploymentsRequest).build());
@Override public GetDeploymentsResponse nextPage(GetDeploymentsResponse previousPage) { if (previousPage == null) { return client.getDeployments(firstRequest); } return client.getDeployments(firstRequest.toBuilder().position(previousPage.position()).build()); } }
return getDeployments(GetDeploymentsRequest.builder().applyMutation(getDeploymentsRequest).build());
@Override public CompletableFuture<GetDeploymentsResponse> nextPage(final GetDeploymentsResponse previousPage) { if (previousPage == null) { return client.getDeployments(firstRequest); } return client.getDeployments(firstRequest.toBuilder().position(previousPage.position()).build()); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetDeploymentsRequest)) { return false; } GetDeploymentsRequest other = (GetDeploymentsRequest) obj; return Objects.equals(restApiId(), other.restApiId()) && Objects.equals(position(), other.position()) && Objects.equals(limit(), other.limit()); }
throws BadRequestException, UnauthorizedException, TooManyRequestsException, ServiceUnavailableException, AwsServiceException, SdkClientException, ApiGatewayException { return getDeployments(GetDeploymentsRequest.builder().applyMutation(getDeploymentsRequest).build());
/** * <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 GetDeploymentsIterable} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final GetDeploymentsIterable resume(GetDeploymentsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetDeploymentsIterable(client, firstRequest.toBuilder().position(lastSuccessfulPage.position()).build()); } return new GetDeploymentsIterable(client, firstRequest) { @Override public Iterator<GetDeploymentsResponse> iterator() { return Collections.emptyIterator(); } }; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("GetDeploymentsRequest").add("RestApiId", restApiId()).add("Position", position()) .add("Limit", limit()).build(); }
return getDeploymentsPaginator(GetDeploymentsRequest.builder().applyMutation(getDeploymentsRequest).build());
/** * <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 GetDeploymentsPublisher} that can be used to retrieve the * consecutive pages that follows the input page. * </p> */ private final GetDeploymentsPublisher resume(GetDeploymentsResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetDeploymentsPublisher(client, firstRequest.toBuilder().position(lastSuccessfulPage.position()).build()); } return new GetDeploymentsPublisher(client, firstRequest, true) { @Override public void subscribe(Subscriber<? super GetDeploymentsResponse> subscriber) { subscriber.onSubscribe(new EmptySubscription(subscriber)); } }; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "restApiId": return Optional.ofNullable(clazz.cast(restApiId())); case "position": return Optional.ofNullable(clazz.cast(position())); case "limit": return Optional.ofNullable(clazz.cast(limit())); default: return Optional.empty(); } }
throws BadRequestException, UnauthorizedException, TooManyRequestsException, ServiceUnavailableException, AwsServiceException, SdkClientException, ApiGatewayException { return getDeploymentsPaginator(GetDeploymentsRequest.builder().applyMutation(getDeploymentsRequest).build());
/** * Marshall the given parameter object */ public void marshall(GetDeploymentsRequest getDeploymentsRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(getDeploymentsRequest, "getDeploymentsRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(getDeploymentsRequest.restApiId(), RESTAPIID_BINDING); protocolMarshaller.marshall(getDeploymentsRequest.position(), POSITION_BINDING); protocolMarshaller.marshall(getDeploymentsRequest.limit(), LIMIT_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }
return getDeploymentsPaginator(GetDeploymentsRequest.builder().applyMutation(getDeploymentsRequest).build());