// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.kendra.inputs;

import com.pulumi.aws.kendra.inputs.DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationInvocationConditionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs extends com.pulumi.resources.ResourceArgs {

    public static final DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs Empty = new DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs();

    /**
     * A block that specifies the condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time. See Document Attribute Condition.
     * 
     */
    @Import(name="invocationCondition")
    private @Nullable Output<DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationInvocationConditionArgs> invocationCondition;

    /**
     * @return A block that specifies the condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time. See Document Attribute Condition.
     * 
     */
    public Optional<Output<DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationInvocationConditionArgs>> invocationCondition() {
        return Optional.ofNullable(this.invocationCondition);
    }

    /**
     * The Amazon Resource Name (ARN) of a Lambda Function that can manipulate your document metadata fields or attributes and content.
     * 
     */
    @Import(name="lambdaArn", required=true)
    private Output<String> lambdaArn;

    /**
     * @return The Amazon Resource Name (ARN) of a Lambda Function that can manipulate your document metadata fields or attributes and content.
     * 
     */
    public Output<String> lambdaArn() {
        return this.lambdaArn;
    }

    /**
     * Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see [Data contracts for Lambda functions](https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#cde-data-contracts-lambda).
     * 
     */
    @Import(name="s3Bucket", required=true)
    private Output<String> s3Bucket;

    /**
     * @return Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see [Data contracts for Lambda functions](https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#cde-data-contracts-lambda).
     * 
     */
    public Output<String> s3Bucket() {
        return this.s3Bucket;
    }

    private DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs() {}

    private DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs(DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs $) {
        this.invocationCondition = $.invocationCondition;
        this.lambdaArn = $.lambdaArn;
        this.s3Bucket = $.s3Bucket;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs $;

        public Builder() {
            $ = new DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs();
        }

        public Builder(DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs defaults) {
            $ = new DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param invocationCondition A block that specifies the condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time. See Document Attribute Condition.
         * 
         * @return builder
         * 
         */
        public Builder invocationCondition(@Nullable Output<DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationInvocationConditionArgs> invocationCondition) {
            $.invocationCondition = invocationCondition;
            return this;
        }

        /**
         * @param invocationCondition A block that specifies the condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time. See Document Attribute Condition.
         * 
         * @return builder
         * 
         */
        public Builder invocationCondition(DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationInvocationConditionArgs invocationCondition) {
            return invocationCondition(Output.of(invocationCondition));
        }

        /**
         * @param lambdaArn The Amazon Resource Name (ARN) of a Lambda Function that can manipulate your document metadata fields or attributes and content.
         * 
         * @return builder
         * 
         */
        public Builder lambdaArn(Output<String> lambdaArn) {
            $.lambdaArn = lambdaArn;
            return this;
        }

        /**
         * @param lambdaArn The Amazon Resource Name (ARN) of a Lambda Function that can manipulate your document metadata fields or attributes and content.
         * 
         * @return builder
         * 
         */
        public Builder lambdaArn(String lambdaArn) {
            return lambdaArn(Output.of(lambdaArn));
        }

        /**
         * @param s3Bucket Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see [Data contracts for Lambda functions](https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#cde-data-contracts-lambda).
         * 
         * @return builder
         * 
         */
        public Builder s3Bucket(Output<String> s3Bucket) {
            $.s3Bucket = s3Bucket;
            return this;
        }

        /**
         * @param s3Bucket Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see [Data contracts for Lambda functions](https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#cde-data-contracts-lambda).
         * 
         * @return builder
         * 
         */
        public Builder s3Bucket(String s3Bucket) {
            return s3Bucket(Output.of(s3Bucket));
        }

        public DataSourceCustomDocumentEnrichmentConfigurationPreExtractionHookConfigurationArgs build() {
            $.lambdaArn = Objects.requireNonNull($.lambdaArn, "expected parameter 'lambdaArn' to be non-null");
            $.s3Bucket = Objects.requireNonNull($.s3Bucket, "expected parameter 's3Bucket' to be non-null");
            return $;
        }
    }

}
