software.amazon.awssdk.services.personalizeevents.PersonalizeEventsClient 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.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.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.regions.ServiceMetadata;
import software.amazon.awssdk.services.personalizeevents.model.InvalidInputException;
import software.amazon.awssdk.services.personalizeevents.model.PersonalizeEventsException;
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;
import software.amazon.awssdk.services.personalizeevents.model.ResourceInUseException;
import software.amazon.awssdk.services.personalizeevents.model.ResourceNotFoundException;
/**
* Service client for accessing Amazon Personalize Events. This can be created using the static {@link #builder()}
* method.
*
*
* 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 PersonalizeEventsClient 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 Result of the PutActionInteractions operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutActionInteractions
* @see AWS API Documentation
*/
default PutActionInteractionsResponse putActionInteractions(PutActionInteractionsRequest putActionInteractionsRequest)
throws InvalidInputException, ResourceNotFoundException, ResourceInUseException, AwsServiceException,
SdkClientException, PersonalizeEventsException {
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 Result of the PutActionInteractions operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutActionInteractions
* @see AWS API Documentation
*/
default PutActionInteractionsResponse putActionInteractions(
Consumer putActionInteractionsRequest) throws InvalidInputException,
ResourceNotFoundException, ResourceInUseException, AwsServiceException, SdkClientException,
PersonalizeEventsException {
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 Result of the PutActions operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutActions
* @see AWS
* API Documentation
*/
default PutActionsResponse putActions(PutActionsRequest putActionsRequest) throws InvalidInputException,
ResourceNotFoundException, ResourceInUseException, AwsServiceException, SdkClientException,
PersonalizeEventsException {
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 Result of the PutActions operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutActions
* @see AWS
* API Documentation
*/
default PutActionsResponse putActions(Consumer putActionsRequest) throws InvalidInputException,
ResourceNotFoundException, ResourceInUseException, AwsServiceException, SdkClientException,
PersonalizeEventsException {
return putActions(PutActionsRequest.builder().applyMutation(putActionsRequest).build());
}
/**
*
* Records item interaction event data. For more information see Recording item
* interaction events.
*
*
* @param putEventsRequest
* @return Result of the PutEvents operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutEvents
* @see AWS
* API Documentation
*/
default PutEventsResponse putEvents(PutEventsRequest putEventsRequest) throws InvalidInputException, AwsServiceException,
SdkClientException, PersonalizeEventsException {
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 Result of the PutEvents operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutEvents
* @see AWS
* API Documentation
*/
default PutEventsResponse putEvents(Consumer putEventsRequest) throws InvalidInputException,
AwsServiceException, SdkClientException, PersonalizeEventsException {
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 Result of the PutItems operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutItems
* @see AWS
* API Documentation
*/
default PutItemsResponse putItems(PutItemsRequest putItemsRequest) throws InvalidInputException, ResourceNotFoundException,
ResourceInUseException, AwsServiceException, SdkClientException, PersonalizeEventsException {
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 Result of the PutItems operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutItems
* @see AWS
* API Documentation
*/
default PutItemsResponse putItems(Consumer putItemsRequest) throws InvalidInputException,
ResourceNotFoundException, ResourceInUseException, AwsServiceException, SdkClientException,
PersonalizeEventsException {
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 Result of the PutUsers operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutUsers
* @see AWS
* API Documentation
*/
default PutUsersResponse putUsers(PutUsersRequest putUsersRequest) throws InvalidInputException, ResourceNotFoundException,
ResourceInUseException, AwsServiceException, SdkClientException, PersonalizeEventsException {
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 Result of the PutUsers operation returned by the service.
* @throws InvalidInputException
* Provide a valid value for the field or parameter.
* @throws ResourceNotFoundException
* Could not find the specified resource.
* @throws ResourceInUseException
* The specified resource is in use.
* @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 PersonalizeEventsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample PersonalizeEventsClient.PutUsers
* @see AWS
* API Documentation
*/
default PutUsersResponse putUsers(Consumer putUsersRequest) throws InvalidInputException,
ResourceNotFoundException, ResourceInUseException, AwsServiceException, SdkClientException,
PersonalizeEventsException {
return putUsers(PutUsersRequest.builder().applyMutation(putUsersRequest).build());
}
/**
* Create a {@link PersonalizeEventsClient} 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 PersonalizeEventsClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link PersonalizeEventsClient}.
*/
static PersonalizeEventsClientBuilder builder() {
return new DefaultPersonalizeEventsClientBuilder();
}
static ServiceMetadata serviceMetadata() {
return ServiceMetadata.of(SERVICE_METADATA_ID);
}
@Override
default PersonalizeEventsServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
}