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

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


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

    public static final DomainAdvancedSecurityOptionsArgs Empty = new DomainAdvancedSecurityOptionsArgs();

    /**
     * Whether advanced security is enabled.
     * 
     */
    @Import(name="enabled", required=true)
    private Output<Boolean> enabled;

    /**
     * @return Whether advanced security is enabled.
     * 
     */
    public Output<Boolean> enabled() {
        return this.enabled;
    }

    /**
     * Whether the internal user database is enabled. If not set, defaults to `false` by the AWS API.
     * 
     */
    @Import(name="internalUserDatabaseEnabled")
    private @Nullable Output<Boolean> internalUserDatabaseEnabled;

    /**
     * @return Whether the internal user database is enabled. If not set, defaults to `false` by the AWS API.
     * 
     */
    public Optional<Output<Boolean>> internalUserDatabaseEnabled() {
        return Optional.ofNullable(this.internalUserDatabaseEnabled);
    }

    /**
     * Configuration block for the main user. Detailed below.
     * 
     */
    @Import(name="masterUserOptions")
    private @Nullable Output<DomainAdvancedSecurityOptionsMasterUserOptionsArgs> masterUserOptions;

    /**
     * @return Configuration block for the main user. Detailed below.
     * 
     */
    public Optional<Output<DomainAdvancedSecurityOptionsMasterUserOptionsArgs>> masterUserOptions() {
        return Optional.ofNullable(this.masterUserOptions);
    }

    private DomainAdvancedSecurityOptionsArgs() {}

    private DomainAdvancedSecurityOptionsArgs(DomainAdvancedSecurityOptionsArgs $) {
        this.enabled = $.enabled;
        this.internalUserDatabaseEnabled = $.internalUserDatabaseEnabled;
        this.masterUserOptions = $.masterUserOptions;
    }

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

    public static final class Builder {
        private DomainAdvancedSecurityOptionsArgs $;

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

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

        /**
         * @param enabled Whether advanced security is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Output<Boolean> enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether advanced security is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param internalUserDatabaseEnabled Whether the internal user database is enabled. If not set, defaults to `false` by the AWS API.
         * 
         * @return builder
         * 
         */
        public Builder internalUserDatabaseEnabled(@Nullable Output<Boolean> internalUserDatabaseEnabled) {
            $.internalUserDatabaseEnabled = internalUserDatabaseEnabled;
            return this;
        }

        /**
         * @param internalUserDatabaseEnabled Whether the internal user database is enabled. If not set, defaults to `false` by the AWS API.
         * 
         * @return builder
         * 
         */
        public Builder internalUserDatabaseEnabled(Boolean internalUserDatabaseEnabled) {
            return internalUserDatabaseEnabled(Output.of(internalUserDatabaseEnabled));
        }

        /**
         * @param masterUserOptions Configuration block for the main user. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder masterUserOptions(@Nullable Output<DomainAdvancedSecurityOptionsMasterUserOptionsArgs> masterUserOptions) {
            $.masterUserOptions = masterUserOptions;
            return this;
        }

        /**
         * @param masterUserOptions Configuration block for the main user. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder masterUserOptions(DomainAdvancedSecurityOptionsMasterUserOptionsArgs masterUserOptions) {
            return masterUserOptions(Output.of(masterUserOptions));
        }

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

}
