/*
* 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.
*/
/*
* Do not modify this file. This file is generated from the personalize-runtime-2018-05-22.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.PersonalizeRuntime.Model
{
///
/// Contains information on a promotion. A promotion defines additional business rules
/// that apply to a configurable subset of recommended items.
///
public partial class Promotion
{
private string _filterArn;
private Dictionary _filterValues = new Dictionary();
private string _name;
private int? _percentPromotedItems;
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Max=256)]
public string FilterArn
{
get { return this._filterArn; }
set { this._filterArn = value; }
}
// Check to see if FilterArn property is set
internal bool IsSetFilterArn()
{
return this._filterArn != null;
}
///
/// Gets and sets the property FilterValues.
///
/// 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.
///
///
[AWSProperty(Max=25)]
public Dictionary FilterValues
{
get { return this._filterValues; }
set { this._filterValues = value; }
}
// Check to see if FilterValues property is set
internal bool IsSetFilterValues()
{
return this._filterValues != null && this._filterValues.Count > 0;
}
///
/// Gets and sets the property Name.
///
/// The name of the promotion.
///
///
[AWSProperty(Min=1, Max=63)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property PercentPromotedItems.
///
/// The percentage of recommended items to apply the promotion to.
///
///
[AWSProperty(Min=1, Max=100)]
public int PercentPromotedItems
{
get { return this._percentPromotedItems.GetValueOrDefault(); }
set { this._percentPromotedItems = value; }
}
// Check to see if PercentPromotedItems property is set
internal bool IsSetPercentPromotedItems()
{
return this._percentPromotedItems.HasValue;
}
}
}