/* * Copyright 2018-2023 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 com.amazonaws.services.personalizeruntime; import javax.annotation.Generated; import com.amazonaws.services.personalizeruntime.model.*; /** * Interface for accessing Amazon Personalize Runtime asynchronously. Each asynchronous method will return a Java Future * object representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive * notification when an asynchronous operation completes. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.personalizeruntime.AbstractAmazonPersonalizeRuntimeAsync} instead. *

*

*

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonPersonalizeRuntimeAsync extends AmazonPersonalizeRuntime { /** *

* Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely * item to be of interest to the user. *

* *

* The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING. *

*
* * @param getPersonalizedRankingRequest * @return A Java Future containing the result of the GetPersonalizedRanking operation returned by the service. * @sample AmazonPersonalizeRuntimeAsync.GetPersonalizedRanking * @see AWS API Documentation */ java.util.concurrent.Future getPersonalizedRankingAsync(GetPersonalizedRankingRequest getPersonalizedRankingRequest); /** *

* Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely * item to be of interest to the user. *

* *

* The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING. *

*
* * @param getPersonalizedRankingRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the GetPersonalizedRanking operation returned by the service. * @sample AmazonPersonalizeRuntimeAsyncHandler.GetPersonalizedRanking * @see AWS API Documentation */ java.util.concurrent.Future getPersonalizedRankingAsync(GetPersonalizedRankingRequest getPersonalizedRankingRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Returns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the * required user and item input depends on the recipe type used to create the solution backing the campaign as * follows: *

*
    *
  • *

    * USER_PERSONALIZATION - userId required, itemId not used *

    *
  • *
  • *

    * RELATED_ITEMS - itemId required, userId not used *

    *
  • *
* *

* Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API. *

*
*

* For recommenders, the recommender's ARN is required and the required item and user input depends on the use case * (domain-based recipe) backing the recommender. For information on use case requirements see Choosing recommender use * cases. *

* * @param getRecommendationsRequest * @return A Java Future containing the result of the GetRecommendations operation returned by the service. * @sample AmazonPersonalizeRuntimeAsync.GetRecommendations * @see AWS API Documentation */ java.util.concurrent.Future getRecommendationsAsync(GetRecommendationsRequest getRecommendationsRequest); /** *

* Returns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the * required user and item input depends on the recipe type used to create the solution backing the campaign as * follows: *

*
    *
  • *

    * USER_PERSONALIZATION - userId required, itemId not used *

    *
  • *
  • *

    * RELATED_ITEMS - itemId required, userId not used *

    *
  • *
* *

* Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API. *

*
*

* For recommenders, the recommender's ARN is required and the required item and user input depends on the use case * (domain-based recipe) backing the recommender. For information on use case requirements see Choosing recommender use * cases. *

* * @param getRecommendationsRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the GetRecommendations operation returned by the service. * @sample AmazonPersonalizeRuntimeAsyncHandler.GetRecommendations * @see AWS API Documentation */ java.util.concurrent.Future getRecommendationsAsync(GetRecommendationsRequest getRecommendationsRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); }