/* * 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 kendra-2019-02-03.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.Kendra.Model { /// /// Container for the parameters to the GetQuerySuggestions operation. /// Fetches the queries that are suggested to your users. /// /// /// /// GetQuerySuggestions is currently not supported in the Amazon Web Services /// GovCloud (US-West) region. /// /// public partial class GetQuerySuggestionsRequest : AmazonKendraRequest { private AttributeSuggestionsGetConfig _attributeSuggestionsConfig; private string _indexId; private int? _maxSuggestionsCount; private string _queryText; private List _suggestionTypes = new List(); /// /// Gets and sets the property AttributeSuggestionsConfig. /// /// Configuration information for the document fields/attributes that you want to base /// query suggestions on. /// /// public AttributeSuggestionsGetConfig AttributeSuggestionsConfig { get { return this._attributeSuggestionsConfig; } set { this._attributeSuggestionsConfig = value; } } // Check to see if AttributeSuggestionsConfig property is set internal bool IsSetAttributeSuggestionsConfig() { return this._attributeSuggestionsConfig != null; } /// /// Gets and sets the property IndexId. /// /// The identifier of the index you want to get query suggestions from. /// /// [AWSProperty(Required=true, Min=36, Max=36)] public string IndexId { get { return this._indexId; } set { this._indexId = value; } } // Check to see if IndexId property is set internal bool IsSetIndexId() { return this._indexId != null; } /// /// Gets and sets the property MaxSuggestionsCount. /// /// The maximum number of query suggestions you want to show to your users. /// /// public int MaxSuggestionsCount { get { return this._maxSuggestionsCount.GetValueOrDefault(); } set { this._maxSuggestionsCount = value; } } // Check to see if MaxSuggestionsCount property is set internal bool IsSetMaxSuggestionsCount() { return this._maxSuggestionsCount.HasValue; } /// /// Gets and sets the property QueryText. /// /// The text of a user's query to generate query suggestions. /// /// /// /// A query is suggested if the query prefix matches what a user starts to type as their /// query. /// /// /// /// Amazon Kendra does not show any suggestions if a user types fewer than two characters /// or more than 60 characters. A query must also have at least one search result and /// contain at least one word of more than four characters. /// /// [AWSProperty(Required=true)] public string QueryText { get { return this._queryText; } set { this._queryText = value; } } // Check to see if QueryText property is set internal bool IsSetQueryText() { return this._queryText != null; } /// /// Gets and sets the property SuggestionTypes. /// /// The suggestions type to base query suggestions on. The suggestion types are query /// history or document fields/attributes. You can set one type or the other. /// /// /// /// If you set query history as your suggestions type, Amazon Kendra suggests queries /// relevant to your users based on popular queries in the query history. /// /// /// /// If you set document fields/attributes as your suggestions type, Amazon Kendra suggests /// queries relevant to your users based on the contents of document fields. /// /// public List SuggestionTypes { get { return this._suggestionTypes; } set { this._suggestionTypes = value; } } // Check to see if SuggestionTypes property is set internal bool IsSetSuggestionTypes() { return this._suggestionTypes != null && this._suggestionTypes.Count > 0; } } }