// *** 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.appsync.inputs;

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


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

    public static final DataSourceDynamodbConfigArgs Empty = new DataSourceDynamodbConfigArgs();

    @Import(name="deltaSyncConfig")
    private @Nullable Output<DataSourceDynamodbConfigDeltaSyncConfigArgs> deltaSyncConfig;

    public Optional<Output<DataSourceDynamodbConfigDeltaSyncConfigArgs>> deltaSyncConfig() {
        return Optional.ofNullable(this.deltaSyncConfig);
    }

    /**
     * AWS region of the DynamoDB table. Defaults to current region.
     * 
     */
    @Import(name="region")
    private @Nullable Output<String> region;

    /**
     * @return AWS region of the DynamoDB table. Defaults to current region.
     * 
     */
    public Optional<Output<String>> region() {
        return Optional.ofNullable(this.region);
    }

    /**
     * Name of the DynamoDB table.
     * 
     */
    @Import(name="tableName", required=true)
    private Output<String> tableName;

    /**
     * @return Name of the DynamoDB table.
     * 
     */
    public Output<String> tableName() {
        return this.tableName;
    }

    /**
     * Set to `true` to use Amazon Cognito credentials with this data source.
     * 
     */
    @Import(name="useCallerCredentials")
    private @Nullable Output<Boolean> useCallerCredentials;

    /**
     * @return Set to `true` to use Amazon Cognito credentials with this data source.
     * 
     */
    public Optional<Output<Boolean>> useCallerCredentials() {
        return Optional.ofNullable(this.useCallerCredentials);
    }

    @Import(name="versioned")
    private @Nullable Output<Boolean> versioned;

    public Optional<Output<Boolean>> versioned() {
        return Optional.ofNullable(this.versioned);
    }

    private DataSourceDynamodbConfigArgs() {}

    private DataSourceDynamodbConfigArgs(DataSourceDynamodbConfigArgs $) {
        this.deltaSyncConfig = $.deltaSyncConfig;
        this.region = $.region;
        this.tableName = $.tableName;
        this.useCallerCredentials = $.useCallerCredentials;
        this.versioned = $.versioned;
    }

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

    public static final class Builder {
        private DataSourceDynamodbConfigArgs $;

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

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

        public Builder deltaSyncConfig(@Nullable Output<DataSourceDynamodbConfigDeltaSyncConfigArgs> deltaSyncConfig) {
            $.deltaSyncConfig = deltaSyncConfig;
            return this;
        }

        public Builder deltaSyncConfig(DataSourceDynamodbConfigDeltaSyncConfigArgs deltaSyncConfig) {
            return deltaSyncConfig(Output.of(deltaSyncConfig));
        }

        /**
         * @param region AWS region of the DynamoDB table. Defaults to current region.
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output<String> region) {
            $.region = region;
            return this;
        }

        /**
         * @param region AWS region of the DynamoDB table. Defaults to current region.
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Output.of(region));
        }

        /**
         * @param tableName Name of the DynamoDB table.
         * 
         * @return builder
         * 
         */
        public Builder tableName(Output<String> tableName) {
            $.tableName = tableName;
            return this;
        }

        /**
         * @param tableName Name of the DynamoDB table.
         * 
         * @return builder
         * 
         */
        public Builder tableName(String tableName) {
            return tableName(Output.of(tableName));
        }

        /**
         * @param useCallerCredentials Set to `true` to use Amazon Cognito credentials with this data source.
         * 
         * @return builder
         * 
         */
        public Builder useCallerCredentials(@Nullable Output<Boolean> useCallerCredentials) {
            $.useCallerCredentials = useCallerCredentials;
            return this;
        }

        /**
         * @param useCallerCredentials Set to `true` to use Amazon Cognito credentials with this data source.
         * 
         * @return builder
         * 
         */
        public Builder useCallerCredentials(Boolean useCallerCredentials) {
            return useCallerCredentials(Output.of(useCallerCredentials));
        }

        public Builder versioned(@Nullable Output<Boolean> versioned) {
            $.versioned = versioned;
            return this;
        }

        public Builder versioned(Boolean versioned) {
            return versioned(Output.of(versioned));
        }

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

}
