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

com.amazonaws.services.kendra.model.CustomDocumentEnrichmentConfiguration 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides the configuration information for altering document metadata and content during the document ingestion * process. *

*

* For more information, see Customizing document metadata * during the ingestion process. *

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

* Configuration information to alter document attributes or metadata fields and content when ingesting documents * into Amazon Kendra. *

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

* Configuration information for invoking a Lambda function in Lambda on the original or raw documents before * extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. *

*/ private HookConfiguration preExtractionHookConfiguration; /** *

* Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, modifying, or * deleting document metadata and content. For more information, see Advanced data manipulation. *

*/ private HookConfiguration postExtractionHookConfiguration; /** *

* The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and * PostExtractionHookConfiguration for altering document metadata and content during the document * ingestion process. For more information, see IAM roles for Amazon Kendra. *

*/ private String roleArn; /** *

* Configuration information to alter document attributes or metadata fields and content when ingesting documents * into Amazon Kendra. *

* * @return Configuration information to alter document attributes or metadata fields and content when ingesting * documents into Amazon Kendra. */ public java.util.List getInlineConfigurations() { return inlineConfigurations; } /** *

* Configuration information to alter document attributes or metadata fields and content when ingesting documents * into Amazon Kendra. *

* * @param inlineConfigurations * Configuration information to alter document attributes or metadata fields and content when ingesting * documents into Amazon Kendra. */ public void setInlineConfigurations(java.util.Collection inlineConfigurations) { if (inlineConfigurations == null) { this.inlineConfigurations = null; return; } this.inlineConfigurations = new java.util.ArrayList(inlineConfigurations); } /** *

* Configuration information to alter document attributes or metadata fields and content when ingesting documents * into Amazon Kendra. *

*

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

* * @param inlineConfigurations * Configuration information to alter document attributes or metadata fields and content when ingesting * documents into Amazon Kendra. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomDocumentEnrichmentConfiguration withInlineConfigurations(InlineCustomDocumentEnrichmentConfiguration... inlineConfigurations) { if (this.inlineConfigurations == null) { setInlineConfigurations(new java.util.ArrayList(inlineConfigurations.length)); } for (InlineCustomDocumentEnrichmentConfiguration ele : inlineConfigurations) { this.inlineConfigurations.add(ele); } return this; } /** *

* Configuration information to alter document attributes or metadata fields and content when ingesting documents * into Amazon Kendra. *

* * @param inlineConfigurations * Configuration information to alter document attributes or metadata fields and content when ingesting * documents into Amazon Kendra. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomDocumentEnrichmentConfiguration withInlineConfigurations(java.util.Collection inlineConfigurations) { setInlineConfigurations(inlineConfigurations); return this; } /** *

* Configuration information for invoking a Lambda function in Lambda on the original or raw documents before * extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. *

* * @param preExtractionHookConfiguration * Configuration information for invoking a Lambda function in Lambda on the original or raw documents before * extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. */ public void setPreExtractionHookConfiguration(HookConfiguration preExtractionHookConfiguration) { this.preExtractionHookConfiguration = preExtractionHookConfiguration; } /** *

* Configuration information for invoking a Lambda function in Lambda on the original or raw documents before * extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. *

* * @return Configuration information for invoking a Lambda function in Lambda on the original or raw documents * before extracting their metadata and text. You can use a Lambda function to apply advanced logic for * creating, modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. */ public HookConfiguration getPreExtractionHookConfiguration() { return this.preExtractionHookConfiguration; } /** *

* Configuration information for invoking a Lambda function in Lambda on the original or raw documents before * extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. *

* * @param preExtractionHookConfiguration * Configuration information for invoking a Lambda function in Lambda on the original or raw documents before * extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomDocumentEnrichmentConfiguration withPreExtractionHookConfiguration(HookConfiguration preExtractionHookConfiguration) { setPreExtractionHookConfiguration(preExtractionHookConfiguration); return this; } /** *

* Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, modifying, or * deleting document metadata and content. For more information, see Advanced data manipulation. *

* * @param postExtractionHookConfiguration * Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. */ public void setPostExtractionHookConfiguration(HookConfiguration postExtractionHookConfiguration) { this.postExtractionHookConfiguration = postExtractionHookConfiguration; } /** *

* Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, modifying, or * deleting document metadata and content. For more information, see Advanced data manipulation. *

* * @return Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. */ public HookConfiguration getPostExtractionHookConfiguration() { return this.postExtractionHookConfiguration; } /** *

* Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, modifying, or * deleting document metadata and content. For more information, see Advanced data manipulation. *

* * @param postExtractionHookConfiguration * Configuration information for invoking a Lambda function in Lambda on the structured documents with their * metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, * modifying, or deleting document metadata and content. For more information, see Advanced data manipulation. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomDocumentEnrichmentConfiguration withPostExtractionHookConfiguration(HookConfiguration postExtractionHookConfiguration) { setPostExtractionHookConfiguration(postExtractionHookConfiguration); return this; } /** *

* The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and * PostExtractionHookConfiguration for altering document metadata and content during the document * ingestion process. For more information, see IAM roles for Amazon Kendra. *

* * @param roleArn * The Amazon Resource Name (ARN) of a role with permission to run * PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering * document metadata and content during the document ingestion process. For more information, see IAM roles for Amazon Kendra. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and * PostExtractionHookConfiguration for altering document metadata and content during the document * ingestion process. For more information, see IAM roles for Amazon Kendra. *

* * @return The Amazon Resource Name (ARN) of a role with permission to run * PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering * document metadata and content during the document ingestion process. For more information, see IAM roles for Amazon Kendra. */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and * PostExtractionHookConfiguration for altering document metadata and content during the document * ingestion process. For more information, see IAM roles for Amazon Kendra. *

* * @param roleArn * The Amazon Resource Name (ARN) of a role with permission to run * PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering * document metadata and content during the document ingestion process. For more information, see IAM roles for Amazon Kendra. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomDocumentEnrichmentConfiguration withRoleArn(String roleArn) { setRoleArn(roleArn); 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 (getInlineConfigurations() != null) sb.append("InlineConfigurations: ").append(getInlineConfigurations()).append(","); if (getPreExtractionHookConfiguration() != null) sb.append("PreExtractionHookConfiguration: ").append(getPreExtractionHookConfiguration()).append(","); if (getPostExtractionHookConfiguration() != null) sb.append("PostExtractionHookConfiguration: ").append(getPostExtractionHookConfiguration()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CustomDocumentEnrichmentConfiguration == false) return false; CustomDocumentEnrichmentConfiguration other = (CustomDocumentEnrichmentConfiguration) obj; if (other.getInlineConfigurations() == null ^ this.getInlineConfigurations() == null) return false; if (other.getInlineConfigurations() != null && other.getInlineConfigurations().equals(this.getInlineConfigurations()) == false) return false; if (other.getPreExtractionHookConfiguration() == null ^ this.getPreExtractionHookConfiguration() == null) return false; if (other.getPreExtractionHookConfiguration() != null && other.getPreExtractionHookConfiguration().equals(this.getPreExtractionHookConfiguration()) == false) return false; if (other.getPostExtractionHookConfiguration() == null ^ this.getPostExtractionHookConfiguration() == null) return false; if (other.getPostExtractionHookConfiguration() != null && other.getPostExtractionHookConfiguration().equals(this.getPostExtractionHookConfiguration()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInlineConfigurations() == null) ? 0 : getInlineConfigurations().hashCode()); hashCode = prime * hashCode + ((getPreExtractionHookConfiguration() == null) ? 0 : getPreExtractionHookConfiguration().hashCode()); hashCode = prime * hashCode + ((getPostExtractionHookConfiguration() == null) ? 0 : getPostExtractionHookConfiguration().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; } @Override public CustomDocumentEnrichmentConfiguration clone() { try { return (CustomDocumentEnrichmentConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.kendra.model.transform.CustomDocumentEnrichmentConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy