/** * 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("GetApiKeysRequest").add("Position", position()).add("Limit", limit()) .add("NameQuery", nameQuery()).add("CustomerId", customerId()).add("IncludeValues", includeValues()).build(); }
@Override public GetApiKeysRequest build() { return new GetApiKeysRequest(this); }
/** * <p> * Gets information about the current <a>ApiKeys</a> resource. * </p> * * @return A Java Future containing the result of the GetApiKeys operation returned by the service.<br/> * The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. * <ul> * <li>BadRequestException The submitted request is not valid, for example, the input is incomplete or * incorrect. See the accompanying error message for details.</li> * <li>UnauthorizedException The request is denied because the caller has insufficient permissions.</li> * <li>TooManyRequestsException The request has reached its throttling limit. Retry after the specified time * period.</li> * <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.</li> * <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.</li> * <li>ApiGatewayException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.</li> * </ul> * @sample ApiGatewayAsyncClient.GetApiKeys */ default CompletableFuture<GetApiKeysResponse> getApiKeys() { return getApiKeys(GetApiKeysRequest.builder().build()); }
@Override public CompletableFuture<GetApiKeysResponse> nextPage(final GetApiKeysResponse previousPage) { if (previousPage == null) { return client.getApiKeys(firstRequest); } return client.getApiKeys(firstRequest.toBuilder().position(previousPage.position()).build()); } }
/** * <p> * Gets information about the current <a>ApiKeys</a> resource. * </p> * * @return A Java Future containing the result of the GetApiKeys operation returned by the service.<br/> * The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. * <ul> * <li>BadRequestException The submitted request is not valid, for example, the input is incomplete or * incorrect. See the accompanying error message for details.</li> * <li>UnauthorizedException The request is denied because the caller has insufficient permissions.</li> * <li>TooManyRequestsException The request has reached its throttling limit. Retry after the specified time * period.</li> * <li>SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.</li> * <li>SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.</li> * <li>ApiGatewayException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.</li> * </ul> * @sample ApiGatewayAsyncClient.GetApiKeys */ default CompletableFuture<GetApiKeysResponse> getApiKeys() { return getApiKeys(GetApiKeysRequest.builder().build()); }
@Override public GetApiKeysResponse nextPage(GetApiKeysResponse previousPage) { if (previousPage == null) { return client.getApiKeys(firstRequest); } return client.getApiKeys(firstRequest.toBuilder().position(previousPage.position()).build()); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(position()); hashCode = 31 * hashCode + Objects.hashCode(limit()); hashCode = 31 * hashCode + Objects.hashCode(nameQuery()); hashCode = 31 * hashCode + Objects.hashCode(customerId()); hashCode = 31 * hashCode + Objects.hashCode(includeValues()); return hashCode; }
/** * <p> * Gets information about the current <a>ApiKeys</a> resource. * </p> * * @return Result of the GetApiKeys operation returned by the service. * @throws BadRequestException * The submitted request is not valid, for example, the input is incomplete or incorrect. See the * accompanying error message for details. * @throws UnauthorizedException * The request is denied because the caller has insufficient permissions. * @throws TooManyRequestsException * The request has reached its throttling limit. Retry after the specified time period. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws ApiGatewayException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample ApiGatewayClient.GetApiKeys * @see #getApiKeys(GetApiKeysRequest) */ default GetApiKeysResponse getApiKeys() throws BadRequestException, UnauthorizedException, TooManyRequestsException, AwsServiceException, SdkClientException, ApiGatewayException { return getApiKeys(GetApiKeysRequest.builder().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 GetApiKeysPublisher} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final GetApiKeysPublisher resume(GetApiKeysResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetApiKeysPublisher(client, firstRequest.toBuilder().position(lastSuccessfulPage.position()).build()); } return new GetApiKeysPublisher(client, firstRequest, true) { @Override public void subscribe(Subscriber<? super GetApiKeysResponse> subscriber) { subscriber.onSubscribe(new EmptySubscription(subscriber)); } }; }
@Override public GetApiKeysRequest build() { return new GetApiKeysRequest(this); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(position()); hashCode = 31 * hashCode + Objects.hashCode(limit()); hashCode = 31 * hashCode + Objects.hashCode(nameQuery()); hashCode = 31 * hashCode + Objects.hashCode(customerId()); hashCode = 31 * hashCode + Objects.hashCode(includeValues()); return hashCode; }
return getApiKeysPaginator(GetApiKeysRequest.builder().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 GetApiKeysIterable} that can be used to retrieve the consecutive * pages that follows the input page. * </p> */ private final GetApiKeysIterable resume(GetApiKeysResponse lastSuccessfulPage) { if (nextPageFetcher.hasNextPage(lastSuccessfulPage)) { return new GetApiKeysIterable(client, firstRequest.toBuilder().position(lastSuccessfulPage.position()).build()); } return new GetApiKeysIterable(client, firstRequest) { @Override public Iterator<GetApiKeysResponse> iterator() { return Collections.emptyIterator(); } }; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetApiKeysRequest)) { return false; } GetApiKeysRequest other = (GetApiKeysRequest) obj; return Objects.equals(position(), other.position()) && Objects.equals(limit(), other.limit()) && Objects.equals(nameQuery(), other.nameQuery()) && Objects.equals(customerId(), other.customerId()) && Objects.equals(includeValues(), other.includeValues()); }
return getApiKeysPaginator(GetApiKeysRequest.builder().build());
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetApiKeysRequest)) { return false; } GetApiKeysRequest other = (GetApiKeysRequest) obj; return Objects.equals(position(), other.position()) && Objects.equals(limit(), other.limit()) && Objects.equals(nameQuery(), other.nameQuery()) && Objects.equals(customerId(), other.customerId()) && Objects.equals(includeValues(), other.includeValues()); }
return getApiKeys(GetApiKeysRequest.builder().applyMutation(getApiKeysRequest).build());
/** * 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("GetApiKeysRequest").add("Position", position()).add("Limit", limit()) .add("NameQuery", nameQuery()).add("CustomerId", customerId()).add("IncludeValues", includeValues()).build(); }
return getApiKeysPaginator(GetApiKeysRequest.builder().build());
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "position": return Optional.ofNullable(clazz.cast(position())); case "limit": return Optional.ofNullable(clazz.cast(limit())); case "nameQuery": return Optional.ofNullable(clazz.cast(nameQuery())); case "customerId": return Optional.ofNullable(clazz.cast(customerId())); case "includeValues": return Optional.ofNullable(clazz.cast(includeValues())); default: return Optional.empty(); } }