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

import com.pulumi.aws.cloudsearch.inputs.DomainEndpointOptionsArgs;
import com.pulumi.aws.cloudsearch.inputs.DomainIndexFieldArgs;
import com.pulumi.aws.cloudsearch.inputs.DomainScalingParametersArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DomainArgs Empty = new DomainArgs();

    /**
     * Domain endpoint options. Documented below.
     * 
     */
    @Import(name="endpointOptions")
    private @Nullable Output<DomainEndpointOptionsArgs> endpointOptions;

    /**
     * @return Domain endpoint options. Documented below.
     * 
     */
    public Optional<Output<DomainEndpointOptionsArgs>> endpointOptions() {
        return Optional.ofNullable(this.endpointOptions);
    }

    /**
     * The index fields for documents added to the domain. Documented below.
     * 
     */
    @Import(name="indexFields")
    private @Nullable Output<List<DomainIndexFieldArgs>> indexFields;

    /**
     * @return The index fields for documents added to the domain. Documented below.
     * 
     */
    public Optional<Output<List<DomainIndexFieldArgs>>> indexFields() {
        return Optional.ofNullable(this.indexFields);
    }

    /**
     * Whether or not to maintain extra instances for the domain in a second Availability Zone to ensure high availability.
     * 
     */
    @Import(name="multiAz")
    private @Nullable Output<Boolean> multiAz;

    /**
     * @return Whether or not to maintain extra instances for the domain in a second Availability Zone to ensure high availability.
     * 
     */
    public Optional<Output<Boolean>> multiAz() {
        return Optional.ofNullable(this.multiAz);
    }

    /**
     * The name of the CloudSearch domain.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name of the CloudSearch domain.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Domain scaling parameters. Documented below.
     * 
     */
    @Import(name="scalingParameters")
    private @Nullable Output<DomainScalingParametersArgs> scalingParameters;

    /**
     * @return Domain scaling parameters. Documented below.
     * 
     */
    public Optional<Output<DomainScalingParametersArgs>> scalingParameters() {
        return Optional.ofNullable(this.scalingParameters);
    }

    private DomainArgs() {}

    private DomainArgs(DomainArgs $) {
        this.endpointOptions = $.endpointOptions;
        this.indexFields = $.indexFields;
        this.multiAz = $.multiAz;
        this.name = $.name;
        this.scalingParameters = $.scalingParameters;
    }

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

    public static final class Builder {
        private DomainArgs $;

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

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

        /**
         * @param endpointOptions Domain endpoint options. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder endpointOptions(@Nullable Output<DomainEndpointOptionsArgs> endpointOptions) {
            $.endpointOptions = endpointOptions;
            return this;
        }

        /**
         * @param endpointOptions Domain endpoint options. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder endpointOptions(DomainEndpointOptionsArgs endpointOptions) {
            return endpointOptions(Output.of(endpointOptions));
        }

        /**
         * @param indexFields The index fields for documents added to the domain. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder indexFields(@Nullable Output<List<DomainIndexFieldArgs>> indexFields) {
            $.indexFields = indexFields;
            return this;
        }

        /**
         * @param indexFields The index fields for documents added to the domain. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder indexFields(List<DomainIndexFieldArgs> indexFields) {
            return indexFields(Output.of(indexFields));
        }

        /**
         * @param indexFields The index fields for documents added to the domain. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder indexFields(DomainIndexFieldArgs... indexFields) {
            return indexFields(List.of(indexFields));
        }

        /**
         * @param multiAz Whether or not to maintain extra instances for the domain in a second Availability Zone to ensure high availability.
         * 
         * @return builder
         * 
         */
        public Builder multiAz(@Nullable Output<Boolean> multiAz) {
            $.multiAz = multiAz;
            return this;
        }

        /**
         * @param multiAz Whether or not to maintain extra instances for the domain in a second Availability Zone to ensure high availability.
         * 
         * @return builder
         * 
         */
        public Builder multiAz(Boolean multiAz) {
            return multiAz(Output.of(multiAz));
        }

        /**
         * @param name The name of the CloudSearch domain.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the CloudSearch domain.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param scalingParameters Domain scaling parameters. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder scalingParameters(@Nullable Output<DomainScalingParametersArgs> scalingParameters) {
            $.scalingParameters = scalingParameters;
            return this;
        }

        /**
         * @param scalingParameters Domain scaling parameters. Documented below.
         * 
         * @return builder
         * 
         */
        public Builder scalingParameters(DomainScalingParametersArgs scalingParameters) {
            return scalingParameters(Output.of(scalingParameters));
        }

        public DomainArgs build() {
            return $;
        }
    }

}
