/* * 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 GetRecommendationsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. *
*/ private String campaignArn; /** ** The item ID to provide recommendations for. *
*
* Required for RELATED_ITEMS
recipe type.
*
* The user ID to provide recommendations for. *
*
* Required for USER_PERSONALIZATION
recipe type.
*
* The number of results to return. The default is 25. The maximum is 500. *
*/ private Integer numResults; /** ** 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 ARN of the filter to apply to the returned recommendations. For more information, see Filtering Recommendations. *
*
* When using this parameter, be sure the filter resource is ACTIVE
.
*
* 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 and user segments. *
*/ private java.util.Map* The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you * created a Domain dataset group with a recommender for a domain use case. *
*/ private String recommenderArn; /** ** The promotions to apply to the recommendation request. A promotion defines additional business rules that apply * to a configurable subset of recommended items. *
*/ private java.util.List* The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. *
* * @param campaignArn * The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. */ public void setCampaignArn(String campaignArn) { this.campaignArn = campaignArn; } /** ** The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. *
* * @return The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. */ public String getCampaignArn() { return this.campaignArn; } /** ** The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. *
* * @param campaignArn * The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRecommendationsRequest withCampaignArn(String campaignArn) { setCampaignArn(campaignArn); return this; } /** ** The item ID to provide recommendations for. *
*
* Required for RELATED_ITEMS
recipe type.
*
* Required for RELATED_ITEMS
recipe type.
*/
public void setItemId(String itemId) {
this.itemId = itemId;
}
/**
*
* The item ID to provide recommendations for. *
*
* Required for RELATED_ITEMS
recipe type.
*
* Required for RELATED_ITEMS
recipe type.
*/
public String getItemId() {
return this.itemId;
}
/**
*
* The item ID to provide recommendations for. *
*
* Required for RELATED_ITEMS
recipe type.
*
* Required for RELATED_ITEMS
recipe type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetRecommendationsRequest withItemId(String itemId) {
setItemId(itemId);
return this;
}
/**
*
* The user ID to provide recommendations for. *
*
* Required for USER_PERSONALIZATION
recipe type.
*
* Required for USER_PERSONALIZATION
recipe type.
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
*
* The user ID to provide recommendations for. *
*
* Required for USER_PERSONALIZATION
recipe type.
*
* Required for USER_PERSONALIZATION
recipe type.
*/
public String getUserId() {
return this.userId;
}
/**
*
* The user ID to provide recommendations for. *
*
* Required for USER_PERSONALIZATION
recipe type.
*
* Required for USER_PERSONALIZATION
recipe type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetRecommendationsRequest withUserId(String userId) {
setUserId(userId);
return this;
}
/**
*
* The number of results to return. The default is 25. The maximum is 500. *
* * @param numResults * The number of results to return. The default is 25. The maximum is 500. */ public void setNumResults(Integer numResults) { this.numResults = numResults; } /** ** The number of results to return. The default is 25. The maximum is 500. *
* * @return The number of results to return. The default is 25. The maximum is 500. */ public Integer getNumResults() { return this.numResults; } /** ** The number of results to return. The default is 25. The maximum is 500. *
* * @param numResults * The number of results to return. The default is 25. The maximum is 500. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRecommendationsRequest withNumResults(Integer numResults) { setNumResults(numResults); 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 GetRecommendationsRequest withContext(java.util.Map* The ARN of the filter to apply to the returned recommendations. For more information, see Filtering Recommendations. *
*
* When using this parameter, be sure the filter resource is ACTIVE
.
*
* When using this parameter, be sure the filter resource is ACTIVE
.
*/
public void setFilterArn(String filterArn) {
this.filterArn = filterArn;
}
/**
*
* The ARN of the filter to apply to the returned recommendations. For more information, see Filtering Recommendations. *
*
* When using this parameter, be sure the filter resource is ACTIVE
.
*
* When using this parameter, be sure the filter resource is ACTIVE
.
*/
public String getFilterArn() {
return this.filterArn;
}
/**
*
* The ARN of the filter to apply to the returned recommendations. For more information, see Filtering Recommendations. *
*
* When using this parameter, be sure the filter resource is ACTIVE
.
*
* When using this parameter, be sure the filter resource is ACTIVE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetRecommendationsRequest 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 and user segments. *
* * @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 and user
* segments.
*/
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 and user segments.
* 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 and user
* segments.
*/
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 and user segments.
* 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 and user
* segments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetRecommendationsRequest withFilterValues(java.util.Map
* The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you
* created a Domain dataset group with a recommender for a domain use case.
*
* The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you
* created a Domain dataset group with a recommender for a domain use case.
*
* The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you
* created a Domain dataset group with a recommender for a domain use case.
*
* The promotions to apply to the recommendation request. A promotion defines additional business rules that apply
* to a configurable subset of recommended items.
*
* The promotions to apply to the recommendation request. A promotion defines additional business rules that apply
* to a configurable subset of recommended items.
*
* The promotions to apply to the recommendation request. A promotion defines additional business rules that apply
* to a configurable subset of recommended items.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPromotions(java.util.Collection)} or {@link #withPromotions(java.util.Collection)} if you want to
* override the existing values.
*
* The promotions to apply to the recommendation request. A promotion defines additional business rules that apply
* to a configurable subset of recommended items.
*