/* * 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.kendra.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A single retrieved relevant passage result. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RetrieveResultItem implements Serializable, Cloneable, StructuredPojo { /** ** The identifier of the relevant passage result. *
*/ private String id; /** ** The identifier of the document. *
*/ private String documentId; /** ** The title of the document. *
*/ private String documentTitle; /** ** The contents of the relevant passage. *
*/ private String content; /** ** The URI of the original location of the document. *
*/ private String documentURI; /** *
* 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.
*
* The identifier of the relevant passage result. *
* * @param id * The identifier of the relevant passage result. */ public void setId(String id) { this.id = id; } /** ** The identifier of the relevant passage result. *
* * @return The identifier of the relevant passage result. */ public String getId() { return this.id; } /** ** The identifier of the relevant passage result. *
* * @param id * The identifier of the relevant passage result. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveResultItem withId(String id) { setId(id); return this; } /** ** The identifier of the document. *
* * @param documentId * The identifier of the document. */ public void setDocumentId(String documentId) { this.documentId = documentId; } /** ** The identifier of the document. *
* * @return The identifier of the document. */ public String getDocumentId() { return this.documentId; } /** ** The identifier of the document. *
* * @param documentId * The identifier of the document. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveResultItem withDocumentId(String documentId) { setDocumentId(documentId); return this; } /** ** The title of the document. *
* * @param documentTitle * The title of the document. */ public void setDocumentTitle(String documentTitle) { this.documentTitle = documentTitle; } /** ** The title of the document. *
* * @return The title of the document. */ public String getDocumentTitle() { return this.documentTitle; } /** ** The title of the document. *
* * @param documentTitle * The title of the document. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveResultItem withDocumentTitle(String documentTitle) { setDocumentTitle(documentTitle); return this; } /** ** The contents of the relevant passage. *
* * @param content * The contents of the relevant passage. */ public void setContent(String content) { this.content = content; } /** ** The contents of the relevant passage. *
* * @return The contents of the relevant passage. */ public String getContent() { return this.content; } /** ** The contents of the relevant passage. *
* * @param content * The contents of the relevant passage. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveResultItem withContent(String content) { setContent(content); return this; } /** ** The URI of the original location of the document. *
* * @param documentURI * The URI of the original location of the document. */ public void setDocumentURI(String documentURI) { this.documentURI = documentURI; } /** ** The URI of the original location of the document. *
* * @return The URI of the original location of the document. */ public String getDocumentURI() { return this.documentURI; } /** ** The URI of the original location of the document. *
* * @param documentURI * The URI of the original location of the document. * @return Returns a reference to this object so that method calls can be chained together. */ public RetrieveResultItem withDocumentURI(String documentURI) { setDocumentURI(documentURI); return this; } /** *
* 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.
*
_author
) or the source URI (_source_uri
) of the document.
*/
public java.util.List
* 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.
*
_author
) or the source URI (_source_uri
) of the document.
*/
public void setDocumentAttributes(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDocumentAttributes(java.util.Collection)} or {@link #withDocumentAttributes(java.util.Collection)} if * you want to override the existing values. *
* * @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrieveResultItem withDocumentAttributes(DocumentAttribute... documentAttributes) {
if (this.documentAttributes == null) {
setDocumentAttributes(new java.util.ArrayList
* 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.
*
_author
) or the source URI (_source_uri
) of the document.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RetrieveResultItem withDocumentAttributes(java.util.Collection