/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information on a promotion. A promotion defines additional business rules that apply to a configurable * subset of recommended items. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Promotion implements Serializable, Cloneable, StructuredPojo { /** ** The name of the promotion. *
*/ private String name; /** ** The percentage of recommended items to apply the promotion to. *
*/ private Integer percentPromotedItems; /** ** The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for promoted * items. For more information, see Promotion * filters. *
*/ private String filterArn; /** ** The values to use when promoting items. For each placeholder parameter in your promotion's 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 on creating filters, see Filtering recommendations and user * segments. *
*/ private java.util.Map* The name of the promotion. *
* * @param name * The name of the promotion. */ public void setName(String name) { this.name = name; } /** ** The name of the promotion. *
* * @return The name of the promotion. */ public String getName() { return this.name; } /** ** The name of the promotion. *
* * @param name * The name of the promotion. * @return Returns a reference to this object so that method calls can be chained together. */ public Promotion withName(String name) { setName(name); return this; } /** ** The percentage of recommended items to apply the promotion to. *
* * @param percentPromotedItems * The percentage of recommended items to apply the promotion to. */ public void setPercentPromotedItems(Integer percentPromotedItems) { this.percentPromotedItems = percentPromotedItems; } /** ** The percentage of recommended items to apply the promotion to. *
* * @return The percentage of recommended items to apply the promotion to. */ public Integer getPercentPromotedItems() { return this.percentPromotedItems; } /** ** The percentage of recommended items to apply the promotion to. *
* * @param percentPromotedItems * The percentage of recommended items to apply the promotion to. * @return Returns a reference to this object so that method calls can be chained together. */ public Promotion withPercentPromotedItems(Integer percentPromotedItems) { setPercentPromotedItems(percentPromotedItems); return this; } /** ** The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for promoted * items. For more information, see Promotion * filters. *
* * @param filterArn * The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for * promoted items. For more information, see Promotion * filters. */ public void setFilterArn(String filterArn) { this.filterArn = filterArn; } /** ** The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for promoted * items. For more information, see Promotion * filters. *
* * @return The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for * promoted items. For more information, see Promotion * filters. */ public String getFilterArn() { return this.filterArn; } /** ** The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for promoted * items. For more information, see Promotion * filters. *
* * @param filterArn * The Amazon Resource Name (ARN) of the filter used by the promotion. This filter defines the criteria for * promoted items. For more information, see Promotion * filters. * @return Returns a reference to this object so that method calls can be chained together. */ public Promotion withFilterArn(String filterArn) { setFilterArn(filterArn); return this; } /** ** The values to use when promoting items. For each placeholder parameter in your promotion's 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 on creating filters, see Filtering recommendations and user * segments. *
* * @return The values to use when promoting items. For each placeholder parameter in your promotion's 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 on creating filters, see Filtering recommendations and user
* segments.
*/
public java.util.Map
* The values to use when promoting items. For each placeholder parameter in your promotion's 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 on creating filters, 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 on creating filters, see Filtering recommendations and user
* segments.
*/
public void setFilterValues(java.util.Map
* The values to use when promoting items. For each placeholder parameter in your promotion's 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 on creating filters, 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 on creating filters, see Filtering recommendations and user
* segments.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Promotion withFilterValues(java.util.Map