/* * 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.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetPersonalizedRankingRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. *
*/ private String campaignArn; /** *
* A list of items (by itemId
) to rank. If an item was not included in the training dataset, the item
* is appended to the end of the reranked list. The maximum is 500.
*
* The user for which you want the campaign to provide a personalized ranking. *
*/ private String userId; /** ** The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current location or * device type. *
*/ private java.util.Map* The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for * a given user. For more information, see Filtering Recommendations. *
*/ private String filterArn; /** ** The values to use when filtering recommendations. For each placeholder parameter in your filter expression, * provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. * Separate multiple values for one parameter with a comma. *
*
* For filter expressions that use an INCLUDE
element to include items, you must provide values for all
* parameters that are defined in the expression. For filters with expressions that use an EXCLUDE
* element to exclude items, you can omit the filter-values
.In this case, Amazon Personalize doesn't
* use that portion of the expression to filter recommendations.
*
* For more information, see Filtering * Recommendations. *
*/ private java.util.Map* The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. *
* * @param campaignArn * The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. */ public void setCampaignArn(String campaignArn) { this.campaignArn = campaignArn; } /** ** The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. *
* * @return The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. */ public String getCampaignArn() { return this.campaignArn; } /** ** The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. *
* * @param campaignArn * The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPersonalizedRankingRequest withCampaignArn(String campaignArn) { setCampaignArn(campaignArn); return this; } /** *
* A list of items (by itemId
) to rank. If an item was not included in the training dataset, the item
* is appended to the end of the reranked list. The maximum is 500.
*
itemId
) to rank. If an item was not included in the training dataset,
* the item is appended to the end of the reranked list. The maximum is 500.
*/
public java.util.List
* A list of items (by itemId
) to rank. If an item was not included in the training dataset, the item
* is appended to the end of the reranked list. The maximum is 500.
*
itemId
) to rank. If an item was not included in the training dataset, the
* item is appended to the end of the reranked list. The maximum is 500.
*/
public void setInputList(java.util.Collection
* A list of items (by itemId
) to rank. If an item was not included in the training dataset, the item
* is appended to the end of the reranked list. The maximum is 500.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInputList(java.util.Collection)} or {@link #withInputList(java.util.Collection)} if you want to * override the existing values. *
* * @param inputList * A list of items (byitemId
) to rank. If an item was not included in the training dataset, the
* item is appended to the end of the reranked list. The maximum is 500.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPersonalizedRankingRequest withInputList(String... inputList) {
if (this.inputList == null) {
setInputList(new java.util.ArrayList
* A list of items (by itemId
) to rank. If an item was not included in the training dataset, the item
* is appended to the end of the reranked list. The maximum is 500.
*
itemId
) to rank. If an item was not included in the training dataset, the
* item is appended to the end of the reranked list. The maximum is 500.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPersonalizedRankingRequest withInputList(java.util.Collection* The user for which you want the campaign to provide a personalized ranking. *
* * @param userId * The user for which you want the campaign to provide a personalized ranking. */ public void setUserId(String userId) { this.userId = userId; } /** ** The user for which you want the campaign to provide a personalized ranking. *
* * @return The user for which you want the campaign to provide a personalized ranking. */ public String getUserId() { return this.userId; } /** ** The user for which you want the campaign to provide a personalized ranking. *
* * @param userId * The user for which you want the campaign to provide a personalized ranking. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPersonalizedRankingRequest withUserId(String userId) { setUserId(userId); return this; } /** ** The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current location or * device type. *
* * @return The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current * location or device type. */ public java.util.Map* The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current location or * device type. *
* * @param context * The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current * location or device type. */ public void setContext(java.util.Map* The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current location or * device type. *
* * @param context * The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction * information that might be relevant when getting a user's recommendations, such as the user's current * location or device type. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPersonalizedRankingRequest withContext(java.util.Map* The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for * a given user. For more information, see Filtering Recommendations. *
* * @param filterArn * The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from * recommendations for a given user. For more information, see Filtering Recommendations. */ public void setFilterArn(String filterArn) { this.filterArn = filterArn; } /** ** The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for * a given user. For more information, see Filtering Recommendations. *
* * @return The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from * recommendations for a given user. For more information, see Filtering Recommendations. */ public String getFilterArn() { return this.filterArn; } /** ** The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for * a given user. For more information, see Filtering Recommendations. *
* * @param filterArn * The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from * recommendations for a given user. For more information, see Filtering Recommendations. * @return Returns a reference to this object so that method calls can be chained together. */ public GetPersonalizedRankingRequest withFilterArn(String filterArn) { setFilterArn(filterArn); return this; } /** ** The values to use when filtering recommendations. For each placeholder parameter in your filter expression, * provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. * Separate multiple values for one parameter with a comma. *
*
* For filter expressions that use an INCLUDE
element to include items, you must provide values for all
* parameters that are defined in the expression. For filters with expressions that use an EXCLUDE
* element to exclude items, you can omit the filter-values
.In this case, Amazon Personalize doesn't
* use that portion of the expression to filter recommendations.
*
* For more information, see Filtering * Recommendations. *
* * @return The values to use when filtering recommendations. For each placeholder parameter in your filter * expression, provide the parameter name (in matching case) as a key and the filter value(s) as the * corresponding value. Separate multiple values for one parameter with a comma. *
* For filter expressions that use an INCLUDE
element to include items, you must provide values
* for all parameters that are defined in the expression. For filters with expressions that use an
* EXCLUDE
element to exclude items, you can omit the filter-values
.In this case,
* Amazon Personalize doesn't use that portion of the expression to filter recommendations.
*
* For more information, see Filtering Recommendations.
*/
public java.util.Map
* The values to use when filtering recommendations. For each placeholder parameter in your filter expression,
* provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value.
* Separate multiple values for one parameter with a comma.
*
* For filter expressions that use an
* For more information, see Filtering
* Recommendations.
* INCLUDE
element to include items, you must provide values for all
* parameters that are defined in the expression. For filters with expressions that use an EXCLUDE
* element to exclude items, you can omit the filter-values
.In this case, Amazon Personalize doesn't
* use that portion of the expression to filter recommendations.
*
* For filter expressions that use an INCLUDE
element to include items, you must provide values
* for all parameters that are defined in the expression. For filters with expressions that use an
* EXCLUDE
element to exclude items, you can omit the filter-values
.In this case,
* Amazon Personalize doesn't use that portion of the expression to filter recommendations.
*
* For more information, see Filtering Recommendations.
*/
public void setFilterValues(java.util.Map
* The values to use when filtering recommendations. For each placeholder parameter in your filter expression,
* provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value.
* Separate multiple values for one parameter with a comma.
*
* For filter expressions that use an
* For more information, see Filtering
* Recommendations.
* INCLUDE
element to include items, you must provide values for all
* parameters that are defined in the expression. For filters with expressions that use an EXCLUDE
* element to exclude items, you can omit the filter-values
.In this case, Amazon Personalize doesn't
* use that portion of the expression to filter recommendations.
*
* For filter expressions that use an INCLUDE
element to include items, you must provide values
* for all parameters that are defined in the expression. For filters with expressions that use an
* EXCLUDE
element to exclude items, you can omit the filter-values
.In this case,
* Amazon Personalize doesn't use that portion of the expression to filter recommendations.
*
* For more information, see Filtering Recommendations.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetPersonalizedRankingRequest withFilterValues(java.util.Map