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

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 FlexibleServerHighAvailabilityArgs extends com.pulumi.resources.ResourceArgs {

    public static final FlexibleServerHighAvailabilityArgs Empty = new FlexibleServerHighAvailabilityArgs();

    /**
     * The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`.
     * 
     */
    @Import(name="mode", required=true)
    private Output<String> mode;

    /**
     * @return The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`.
     * 
     */
    public Output<String> mode() {
        return this.mode;
    }

    @Import(name="standbyAvailabilityZone")
    private @Nullable Output<String> standbyAvailabilityZone;

    public Optional<Output<String>> standbyAvailabilityZone() {
        return Optional.ofNullable(this.standbyAvailabilityZone);
    }

    private FlexibleServerHighAvailabilityArgs() {}

    private FlexibleServerHighAvailabilityArgs(FlexibleServerHighAvailabilityArgs $) {
        this.mode = $.mode;
        this.standbyAvailabilityZone = $.standbyAvailabilityZone;
    }

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

    public static final class Builder {
        private FlexibleServerHighAvailabilityArgs $;

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

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

        /**
         * @param mode The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`.
         * 
         * @return builder
         * 
         */
        public Builder mode(Output<String> mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`.
         * 
         * @return builder
         * 
         */
        public Builder mode(String mode) {
            return mode(Output.of(mode));
        }

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

        public Builder standbyAvailabilityZone(String standbyAvailabilityZone) {
            return standbyAvailabilityZone(Output.of(standbyAvailabilityZone));
        }

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

}
