/* * 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 { /// /// Container for the parameters to the GetRecommendations operation. /// 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: /// /// /// /// 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. /// /// public partial class GetRecommendationsRequest : AmazonPersonalizeRuntimeRequest { private string _campaignArn; private Dictionary _context = new Dictionary(); private string _filterArn; private Dictionary _filterValues = new Dictionary(); private string _itemId; private int? _numResults; private List _promotions = new List(); private string _recommenderArn; private string _userId; /// /// Gets and sets the property CampaignArn. /// /// The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. /// /// [AWSProperty(Max=256)] public string CampaignArn { get { return this._campaignArn; } set { this._campaignArn = value; } } // Check to see if CampaignArn property is set internal bool IsSetCampaignArn() { return this._campaignArn != null; } /// /// Gets and sets the property 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. /// /// [AWSProperty(Max=150)] public Dictionary Context { get { return this._context; } set { this._context = value; } } // Check to see if Context property is set internal bool IsSetContext() { return this._context != null && this._context.Count > 0; } /// /// Gets and sets the property 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. /// /// [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 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. /// /// [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 ItemId. /// /// The item ID to provide recommendations for. /// /// /// /// Required for RELATED_ITEMS recipe type. /// /// [AWSProperty(Max=256)] public string ItemId { get { return this._itemId; } set { this._itemId = value; } } // Check to see if ItemId property is set internal bool IsSetItemId() { return this._itemId != null; } /// /// Gets and sets the property NumResults. /// /// The number of results to return. The default is 25. The maximum is 500. /// /// [AWSProperty(Min=0)] public int NumResults { get { return this._numResults.GetValueOrDefault(); } set { this._numResults = value; } } // Check to see if NumResults property is set internal bool IsSetNumResults() { return this._numResults.HasValue; } /// /// Gets and sets the property Promotions. /// /// The promotions to apply to the recommendation request. A promotion defines additional /// business rules that apply to a configurable subset of recommended items. /// /// [AWSProperty(Max=1)] public List Promotions { get { return this._promotions; } set { this._promotions = value; } } // Check to see if Promotions property is set internal bool IsSetPromotions() { return this._promotions != null && this._promotions.Count > 0; } /// /// Gets and sets the property RecommenderArn. /// /// 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. /// /// [AWSProperty(Max=256)] public string RecommenderArn { get { return this._recommenderArn; } set { this._recommenderArn = value; } } // Check to see if RecommenderArn property is set internal bool IsSetRecommenderArn() { return this._recommenderArn != null; } /// /// Gets and sets the property UserId. /// /// The user ID to provide recommendations for. /// /// /// /// Required for USER_PERSONALIZATION recipe type. /// /// [AWSProperty(Max=256)] public string UserId { get { return this._userId; } set { this._userId = value; } } // Check to see if UserId property is set internal bool IsSetUserId() { return this._userId != null; } } }