/* * 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; /** *
* The document ID and its fields/attributes that are used for a query suggestion, if document fields set to use for * query suggestions. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SourceDocument implements Serializable, Cloneable, StructuredPojo { /** ** The identifier of the document used for a query suggestion. *
*/ private String documentId; /** ** The document fields/attributes used for a query suggestion. *
*/ private java.util.List* The additional fields/attributes to include in the response. You can use additional fields to provide extra * information in the response. Additional fields are not used to based suggestions on. *
*/ private java.util.List* The identifier of the document used for a query suggestion. *
* * @param documentId * The identifier of the document used for a query suggestion. */ public void setDocumentId(String documentId) { this.documentId = documentId; } /** ** The identifier of the document used for a query suggestion. *
* * @return The identifier of the document used for a query suggestion. */ public String getDocumentId() { return this.documentId; } /** ** The identifier of the document used for a query suggestion. *
* * @param documentId * The identifier of the document used for a query suggestion. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceDocument withDocumentId(String documentId) { setDocumentId(documentId); return this; } /** ** The document fields/attributes used for a query suggestion. *
* * @return The document fields/attributes used for a query suggestion. */ public java.util.List* The document fields/attributes used for a query suggestion. *
* * @param suggestionAttributes * The document fields/attributes used for a query suggestion. */ public void setSuggestionAttributes(java.util.Collection* The document fields/attributes used for a query suggestion. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSuggestionAttributes(java.util.Collection)} or {@link #withSuggestionAttributes(java.util.Collection)} * if you want to override the existing values. *
* * @param suggestionAttributes * The document fields/attributes used for a query suggestion. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceDocument withSuggestionAttributes(String... suggestionAttributes) { if (this.suggestionAttributes == null) { setSuggestionAttributes(new java.util.ArrayList* The document fields/attributes used for a query suggestion. *
* * @param suggestionAttributes * The document fields/attributes used for a query suggestion. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceDocument withSuggestionAttributes(java.util.Collection* The additional fields/attributes to include in the response. You can use additional fields to provide extra * information in the response. Additional fields are not used to based suggestions on. *
* * @return The additional fields/attributes to include in the response. You can use additional fields to provide * extra information in the response. Additional fields are not used to based suggestions on. */ public java.util.List* The additional fields/attributes to include in the response. You can use additional fields to provide extra * information in the response. Additional fields are not used to based suggestions on. *
* * @param additionalAttributes * The additional fields/attributes to include in the response. You can use additional fields to provide * extra information in the response. Additional fields are not used to based suggestions on. */ public void setAdditionalAttributes(java.util.Collection* The additional fields/attributes to include in the response. You can use additional fields to provide extra * information in the response. Additional fields are not used to based suggestions on. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAdditionalAttributes(java.util.Collection)} or {@link #withAdditionalAttributes(java.util.Collection)} * if you want to override the existing values. *
* * @param additionalAttributes * The additional fields/attributes to include in the response. You can use additional fields to provide * extra information in the response. Additional fields are not used to based suggestions on. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceDocument withAdditionalAttributes(DocumentAttribute... additionalAttributes) { if (this.additionalAttributes == null) { setAdditionalAttributes(new java.util.ArrayList* The additional fields/attributes to include in the response. You can use additional fields to provide extra * information in the response. Additional fields are not used to based suggestions on. *
* * @param additionalAttributes * The additional fields/attributes to include in the response. You can use additional fields to provide * extra information in the response. Additional fields are not used to based suggestions on. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceDocument withAdditionalAttributes(java.util.Collection