software.amazon.awssdk.services.personalizeevents.PersonalizeEventsAsyncClient Maven / Gradle / Ivy
Show all versions of personalizeevents Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.personalizeevents;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.AwsClient;
import software.amazon.awssdk.services.personalizeevents.model.PutActionInteractionsRequest;
import software.amazon.awssdk.services.personalizeevents.model.PutActionInteractionsResponse;
import software.amazon.awssdk.services.personalizeevents.model.PutActionsRequest;
import software.amazon.awssdk.services.personalizeevents.model.PutActionsResponse;
import software.amazon.awssdk.services.personalizeevents.model.PutEventsRequest;
import software.amazon.awssdk.services.personalizeevents.model.PutEventsResponse;
import software.amazon.awssdk.services.personalizeevents.model.PutItemsRequest;
import software.amazon.awssdk.services.personalizeevents.model.PutItemsResponse;
import software.amazon.awssdk.services.personalizeevents.model.PutUsersRequest;
import software.amazon.awssdk.services.personalizeevents.model.PutUsersResponse;
/**
* Service client for accessing Amazon Personalize Events asynchronously. This can be created using the static
* {@link #builder()} method.The asynchronous client performs non-blocking I/O when configured with any
* {@code SdkAsyncHttpClient} supported in the SDK. However, full non-blocking is not guaranteed as the async client may
* perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
* call.
*
*
* Amazon Personalize can consume real-time user event data, such as stream or click data, and use it for
* model training either alone or combined with historical data. For more information see Recording item
* interaction events.
*
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface PersonalizeEventsAsyncClient extends AwsClient {
String SERVICE_NAME = "personalize";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "personalize-events";
/**
*
* Records action interaction event data. An action interaction event is an interaction between a user and an
* action. For example, a user taking an action, such a enrolling in a membership program or downloading your
* app.
*
*
* For more information about recording action interactions, see Recording
* action interaction events. For more information about actions in an Actions dataset, see Actions dataset.
*
*
* @param putActionInteractionsRequest
* @return A Java Future containing the result of the PutActionInteractions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutActionInteractions
* @see AWS API Documentation
*/
default CompletableFuture putActionInteractions(
PutActionInteractionsRequest putActionInteractionsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Records action interaction event data. An action interaction event is an interaction between a user and an
* action. For example, a user taking an action, such a enrolling in a membership program or downloading your
* app.
*
*
* For more information about recording action interactions, see Recording
* action interaction events. For more information about actions in an Actions dataset, see Actions dataset.
*
*
*
* This is a convenience which creates an instance of the {@link PutActionInteractionsRequest.Builder} avoiding the
* need to create one manually via {@link PutActionInteractionsRequest#builder()}
*
*
* @param putActionInteractionsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.personalizeevents.model.PutActionInteractionsRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the PutActionInteractions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutActionInteractions
* @see AWS API Documentation
*/
default CompletableFuture putActionInteractions(
Consumer putActionInteractionsRequest) {
return putActionInteractions(PutActionInteractionsRequest.builder().applyMutation(putActionInteractionsRequest).build());
}
/**
*
* Adds one or more actions to an Actions dataset. For more information see Importing actions
* individually.
*
*
* @param putActionsRequest
* @return A Java Future containing the result of the PutActions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutActions
* @see AWS
* API Documentation
*/
default CompletableFuture putActions(PutActionsRequest putActionsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Adds one or more actions to an Actions dataset. For more information see Importing actions
* individually.
*
*
*
* This is a convenience which creates an instance of the {@link PutActionsRequest.Builder} avoiding the need to
* create one manually via {@link PutActionsRequest#builder()}
*
*
* @param putActionsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.personalizeevents.model.PutActionsRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the PutActions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutActions
* @see AWS
* API Documentation
*/
default CompletableFuture putActions(Consumer putActionsRequest) {
return putActions(PutActionsRequest.builder().applyMutation(putActionsRequest).build());
}
/**
*
* Records item interaction event data. For more information see Recording item
* interaction events.
*
*
* @param putEventsRequest
* @return A Java Future containing the result of the PutEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutEvents
* @see AWS
* API Documentation
*/
default CompletableFuture putEvents(PutEventsRequest putEventsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Records item interaction event data. For more information see Recording item
* interaction events.
*
*
*
* This is a convenience which creates an instance of the {@link PutEventsRequest.Builder} avoiding the need to
* create one manually via {@link PutEventsRequest#builder()}
*
*
* @param putEventsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.personalizeevents.model.PutEventsRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the PutEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutEvents
* @see AWS
* API Documentation
*/
default CompletableFuture putEvents(Consumer putEventsRequest) {
return putEvents(PutEventsRequest.builder().applyMutation(putEventsRequest).build());
}
/**
*
* Adds one or more items to an Items dataset. For more information see Importing items individually.
*
*
* @param putItemsRequest
* @return A Java Future containing the result of the PutItems operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutItems
* @see AWS
* API Documentation
*/
default CompletableFuture putItems(PutItemsRequest putItemsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Adds one or more items to an Items dataset. For more information see Importing items individually.
*
*
*
* This is a convenience which creates an instance of the {@link PutItemsRequest.Builder} avoiding the need to
* create one manually via {@link PutItemsRequest#builder()}
*
*
* @param putItemsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.personalizeevents.model.PutItemsRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the PutItems operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutItems
* @see AWS
* API Documentation
*/
default CompletableFuture putItems(Consumer putItemsRequest) {
return putItems(PutItemsRequest.builder().applyMutation(putItemsRequest).build());
}
/**
*
* Adds one or more users to a Users dataset. For more information see Importing users individually.
*
*
* @param putUsersRequest
* @return A Java Future containing the result of the PutUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutUsers
* @see AWS
* API Documentation
*/
default CompletableFuture putUsers(PutUsersRequest putUsersRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Adds one or more users to a Users dataset. For more information see Importing users individually.
*
*
*
* This is a convenience which creates an instance of the {@link PutUsersRequest.Builder} avoiding the need to
* create one manually via {@link PutUsersRequest#builder()}
*
*
* @param putUsersRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.personalizeevents.model.PutUsersRequest.Builder} to create a
* request.
* @return A Java Future containing the result of the PutUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException Provide a valid value for the field or parameter.
* - ResourceNotFoundException Could not find the specified resource.
* - ResourceInUseException The specified resource is in use.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - PersonalizeEventsException Base class for all service exceptions. Unknown exceptions will be thrown
* as an instance of this type.
*
* @sample PersonalizeEventsAsyncClient.PutUsers
* @see AWS
* API Documentation
*/
default CompletableFuture putUsers(Consumer putUsersRequest) {
return putUsers(PutUsersRequest.builder().applyMutation(putUsersRequest).build());
}
@Override
default PersonalizeEventsServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
/**
* Create a {@link PersonalizeEventsAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static PersonalizeEventsAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link PersonalizeEventsAsyncClient}.
*/
static PersonalizeEventsAsyncClientBuilder builder() {
return new DefaultPersonalizeEventsAsyncClientBuilder();
}
}