/* * 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 { /// /// A single query result. /// /// /// /// A query result contains information about a document returned by the query. This includes /// the original location of the document, a list of attributes assigned to the document, /// and relevant text from the document that satisfies the query. /// /// public partial class QueryResultItem { private List _additionalAttributes = new List(); private List _documentAttributes = new List(); private TextWithHighlights _documentExcerpt; private string _documentId; private TextWithHighlights _documentTitle; private string _documentURI; private string _feedbackToken; private QueryResultFormat _format; private string _id; private ScoreAttributes _scoreAttributes; private TableExcerpt _tableExcerpt; private QueryResultType _type; /// /// Gets and sets the property AdditionalAttributes. /// /// One or more additional fields/attributes associated with the query result. /// /// public List AdditionalAttributes { get { return this._additionalAttributes; } set { this._additionalAttributes = value; } } // Check to see if AdditionalAttributes property is set internal bool IsSetAdditionalAttributes() { return this._additionalAttributes != null && this._additionalAttributes.Count > 0; } /// /// Gets and sets the property DocumentAttributes. /// /// An array of document fields/attributes assigned to a document in the search results. /// For example, the document author (_author) or the source URI (_source_uri) /// of the document. /// /// public List DocumentAttributes { get { return this._documentAttributes; } set { this._documentAttributes = value; } } // Check to see if DocumentAttributes property is set internal bool IsSetDocumentAttributes() { return this._documentAttributes != null && this._documentAttributes.Count > 0; } /// /// Gets and sets the property DocumentExcerpt. /// /// An extract of the text in the document. Contains information about highlighting the /// relevant terms in the excerpt. /// /// public TextWithHighlights DocumentExcerpt { get { return this._documentExcerpt; } set { this._documentExcerpt = value; } } // Check to see if DocumentExcerpt property is set internal bool IsSetDocumentExcerpt() { return this._documentExcerpt != null; } /// /// Gets and sets the property DocumentId. /// /// The identifier for the document. /// /// [AWSProperty(Min=1, Max=2048)] public string DocumentId { get { return this._documentId; } set { this._documentId = value; } } // Check to see if DocumentId property is set internal bool IsSetDocumentId() { return this._documentId != null; } /// /// Gets and sets the property DocumentTitle. /// /// The title of the document. Contains the text of the title and information for highlighting /// the relevant terms in the title. /// /// public TextWithHighlights DocumentTitle { get { return this._documentTitle; } set { this._documentTitle = value; } } // Check to see if DocumentTitle property is set internal bool IsSetDocumentTitle() { return this._documentTitle != null; } /// /// Gets and sets the property DocumentURI. /// /// The URI of the original location of the document. /// /// [AWSProperty(Min=1, Max=2048)] public string DocumentURI { get { return this._documentURI; } set { this._documentURI = value; } } // Check to see if DocumentURI property is set internal bool IsSetDocumentURI() { return this._documentURI != null; } /// /// Gets and sets the property FeedbackToken. /// /// A token that identifies a particular result from a particular query. Use this token /// to provide click-through feedback for the result. For more information, see Submitting /// feedback. /// /// [AWSProperty(Min=1, Max=2048)] public string FeedbackToken { get { return this._feedbackToken; } set { this._feedbackToken = value; } } // Check to see if FeedbackToken property is set internal bool IsSetFeedbackToken() { return this._feedbackToken != null; } /// /// Gets and sets the property Format. /// /// If the Type of document within the response is ANSWER, then /// it is either a TABLE answer or TEXT answer. If it's a table /// answer, a table excerpt is returned in TableExcerpt. If it's a text answer, /// a text excerpt is returned in DocumentExcerpt. /// /// public QueryResultFormat Format { get { return this._format; } set { this._format = value; } } // Check to see if Format property is set internal bool IsSetFormat() { return this._format != null; } /// /// Gets and sets the property Id. /// /// The identifier for the query result. /// /// [AWSProperty(Min=1, Max=73)] public string Id { get { return this._id; } set { this._id = value; } } // Check to see if Id property is set internal bool IsSetId() { return this._id != null; } /// /// Gets and sets the property ScoreAttributes. /// /// Indicates the confidence level of Amazon Kendra providing a relevant result for the /// query. Each result is placed into a bin that indicates the confidence, VERY_HIGH, /// HIGH, MEDIUM and LOW. You can use the score /// to determine if a response meets the confidence needed for your application. /// /// /// /// The field is only set to LOW when the Type field is set /// to DOCUMENT and Amazon Kendra is not confident that the result is relevant /// to the query. /// /// public ScoreAttributes ScoreAttributes { get { return this._scoreAttributes; } set { this._scoreAttributes = value; } } // Check to see if ScoreAttributes property is set internal bool IsSetScoreAttributes() { return this._scoreAttributes != null; } /// /// Gets and sets the property TableExcerpt. /// /// An excerpt from a table within a document. /// /// public TableExcerpt TableExcerpt { get { return this._tableExcerpt; } set { this._tableExcerpt = value; } } // Check to see if TableExcerpt property is set internal bool IsSetTableExcerpt() { return this._tableExcerpt != null; } /// /// Gets and sets the property Type. /// /// The type of document within the response. For example, a response could include a /// question-answer that's relevant to the query. /// /// public QueryResultType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } } }