All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.kendra.model.BatchPutDocumentRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWSKendraFrontend module holds the client classes that are used for communicating with AWSKendraFrontend Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BatchPutDocumentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. *

*/ private String indexId; /** *

* The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more information, see * IAM access roles for Amazon Kendra. *

*/ private String roleArn; /** *

* One or more documents to add to the index. *

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. *

*/ private java.util.List documents; /** *

* Configuration information for altering your document metadata and content during the document ingestion process * when you use the BatchPutDocument API. *

*

* For more information on how to create, modify and delete document metadata, or make other content alterations * when you ingest documents into Amazon Kendra, see Customizing document metadata * during the ingestion process. *

*/ private CustomDocumentEnrichmentConfiguration customDocumentEnrichmentConfiguration; /** *

* The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. *

* * @param indexId * The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. */ public void setIndexId(String indexId) { this.indexId = indexId; } /** *

* The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. *

* * @return The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. */ public String getIndexId() { return this.indexId; } /** *

* The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. *

* * @param indexId * The identifier of the index to add the documents to. You need to create the index first using the * CreateIndex API. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutDocumentRequest withIndexId(String indexId) { setIndexId(indexId); return this; } /** *

* The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more information, see * IAM access roles for Amazon Kendra. *

* * @param roleArn * The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more * information, see IAM access roles * for Amazon Kendra. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more information, see * IAM access roles for Amazon Kendra. *

* * @return The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more * information, see IAM access roles * for Amazon Kendra. */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more information, see * IAM access roles for Amazon Kendra. *

* * @param roleArn * The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more * information, see IAM access roles * for Amazon Kendra. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutDocumentRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* One or more documents to add to the index. *

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. *

* * @return One or more documents to add to the index.

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. */ public java.util.List getDocuments() { return documents; } /** *

* One or more documents to add to the index. *

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. *

* * @param documents * One or more documents to add to the index.

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. */ public void setDocuments(java.util.Collection documents) { if (documents == null) { this.documents = null; return; } this.documents = new java.util.ArrayList(documents); } /** *

* One or more documents to add to the index. *

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDocuments(java.util.Collection)} or {@link #withDocuments(java.util.Collection)} if you want to * override the existing values. *

* * @param documents * One or more documents to add to the index.

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutDocumentRequest withDocuments(Document... documents) { if (this.documents == null) { setDocuments(new java.util.ArrayList(documents.length)); } for (Document ele : documents) { this.documents.add(ele); } return this; } /** *

* One or more documents to add to the index. *

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. *

* * @param documents * One or more documents to add to the index.

*

* Documents have the following file size limits. *

*
    *
  • *

    * 50 MB total size for any file *

    *
  • *
  • *

    * 5 MB extracted text for any file *

    *
  • *
*

* For more information, see Quotas. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutDocumentRequest withDocuments(java.util.Collection documents) { setDocuments(documents); return this; } /** *

* Configuration information for altering your document metadata and content during the document ingestion process * when you use the BatchPutDocument API. *

*

* For more information on how to create, modify and delete document metadata, or make other content alterations * when you ingest documents into Amazon Kendra, see Customizing document metadata * during the ingestion process. *

* * @param customDocumentEnrichmentConfiguration * Configuration information for altering your document metadata and content during the document ingestion * process when you use the BatchPutDocument API.

*

* For more information on how to create, modify and delete document metadata, or make other content * alterations when you ingest documents into Amazon Kendra, see Customizing document * metadata during the ingestion process. */ public void setCustomDocumentEnrichmentConfiguration(CustomDocumentEnrichmentConfiguration customDocumentEnrichmentConfiguration) { this.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration; } /** *

* Configuration information for altering your document metadata and content during the document ingestion process * when you use the BatchPutDocument API. *

*

* For more information on how to create, modify and delete document metadata, or make other content alterations * when you ingest documents into Amazon Kendra, see Customizing document metadata * during the ingestion process. *

* * @return Configuration information for altering your document metadata and content during the document ingestion * process when you use the BatchPutDocument API.

*

* For more information on how to create, modify and delete document metadata, or make other content * alterations when you ingest documents into Amazon Kendra, see Customizing document * metadata during the ingestion process. */ public CustomDocumentEnrichmentConfiguration getCustomDocumentEnrichmentConfiguration() { return this.customDocumentEnrichmentConfiguration; } /** *

* Configuration information for altering your document metadata and content during the document ingestion process * when you use the BatchPutDocument API. *

*

* For more information on how to create, modify and delete document metadata, or make other content alterations * when you ingest documents into Amazon Kendra, see Customizing document metadata * during the ingestion process. *

* * @param customDocumentEnrichmentConfiguration * Configuration information for altering your document metadata and content during the document ingestion * process when you use the BatchPutDocument API.

*

* For more information on how to create, modify and delete document metadata, or make other content * alterations when you ingest documents into Amazon Kendra, see Customizing document * metadata during the ingestion process. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutDocumentRequest withCustomDocumentEnrichmentConfiguration(CustomDocumentEnrichmentConfiguration customDocumentEnrichmentConfiguration) { setCustomDocumentEnrichmentConfiguration(customDocumentEnrichmentConfiguration); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIndexId() != null) sb.append("IndexId: ").append(getIndexId()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getDocuments() != null) sb.append("Documents: ").append(getDocuments()).append(","); if (getCustomDocumentEnrichmentConfiguration() != null) sb.append("CustomDocumentEnrichmentConfiguration: ").append(getCustomDocumentEnrichmentConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchPutDocumentRequest == false) return false; BatchPutDocumentRequest other = (BatchPutDocumentRequest) obj; if (other.getIndexId() == null ^ this.getIndexId() == null) return false; if (other.getIndexId() != null && other.getIndexId().equals(this.getIndexId()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getDocuments() == null ^ this.getDocuments() == null) return false; if (other.getDocuments() != null && other.getDocuments().equals(this.getDocuments()) == false) return false; if (other.getCustomDocumentEnrichmentConfiguration() == null ^ this.getCustomDocumentEnrichmentConfiguration() == null) return false; if (other.getCustomDocumentEnrichmentConfiguration() != null && other.getCustomDocumentEnrichmentConfiguration().equals(this.getCustomDocumentEnrichmentConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIndexId() == null) ? 0 : getIndexId().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getDocuments() == null) ? 0 : getDocuments().hashCode()); hashCode = prime * hashCode + ((getCustomDocumentEnrichmentConfiguration() == null) ? 0 : getCustomDocumentEnrichmentConfiguration().hashCode()); return hashCode; } @Override public BatchPutDocumentRequest clone() { return (BatchPutDocumentRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy