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

import com.pulumi.azure.mssql.inputs.VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineAvailabilityGroupListenerReplicaArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final VirtualMachineAvailabilityGroupListenerState Empty = new VirtualMachineAvailabilityGroupListenerState();

    /**
     * The name of the Availability Group. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="availabilityGroupName")
    private @Nullable Output<String> availabilityGroupName;

    /**
     * @return The name of the Availability Group. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> availabilityGroupName() {
        return Optional.ofNullable(this.availabilityGroupName);
    }

    /**
     * A `load_balancer_configuration` block as defined below. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Either one of `load_balancer_configuration` or `multi_subnet_ip_configuration` must be specified.
     * 
     */
    @Import(name="loadBalancerConfiguration")
    private @Nullable Output<VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs> loadBalancerConfiguration;

    /**
     * @return A `load_balancer_configuration` block as defined below. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Either one of `load_balancer_configuration` or `multi_subnet_ip_configuration` must be specified.
     * 
     */
    public Optional<Output<VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs>> loadBalancerConfiguration() {
        return Optional.ofNullable(this.loadBalancerConfiguration);
    }

    /**
     * One or more `multi_subnet_ip_configuration` blocks as defined below. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="multiSubnetIpConfigurations")
    private @Nullable Output<List<VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs>> multiSubnetIpConfigurations;

    /**
     * @return One or more `multi_subnet_ip_configuration` blocks as defined below. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<List<VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs>>> multiSubnetIpConfigurations() {
        return Optional.ofNullable(this.multiSubnetIpConfigurations);
    }

    /**
     * The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The port of the listener. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="port")
    private @Nullable Output<Integer> port;

    /**
     * @return The port of the listener. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<Integer>> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="replicas")
    private @Nullable Output<List<VirtualMachineAvailabilityGroupListenerReplicaArgs>> replicas;

    /**
     * @return One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<List<VirtualMachineAvailabilityGroupListenerReplicaArgs>>> replicas() {
        return Optional.ofNullable(this.replicas);
    }

    /**
     * The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="sqlVirtualMachineGroupId")
    private @Nullable Output<String> sqlVirtualMachineGroupId;

    /**
     * @return The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> sqlVirtualMachineGroupId() {
        return Optional.ofNullable(this.sqlVirtualMachineGroupId);
    }

    private VirtualMachineAvailabilityGroupListenerState() {}

    private VirtualMachineAvailabilityGroupListenerState(VirtualMachineAvailabilityGroupListenerState $) {
        this.availabilityGroupName = $.availabilityGroupName;
        this.loadBalancerConfiguration = $.loadBalancerConfiguration;
        this.multiSubnetIpConfigurations = $.multiSubnetIpConfigurations;
        this.name = $.name;
        this.port = $.port;
        this.replicas = $.replicas;
        this.sqlVirtualMachineGroupId = $.sqlVirtualMachineGroupId;
    }

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

    public static final class Builder {
        private VirtualMachineAvailabilityGroupListenerState $;

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

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

        /**
         * @param availabilityGroupName The name of the Availability Group. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder availabilityGroupName(@Nullable Output<String> availabilityGroupName) {
            $.availabilityGroupName = availabilityGroupName;
            return this;
        }

        /**
         * @param availabilityGroupName The name of the Availability Group. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder availabilityGroupName(String availabilityGroupName) {
            return availabilityGroupName(Output.of(availabilityGroupName));
        }

        /**
         * @param loadBalancerConfiguration A `load_balancer_configuration` block as defined below. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** Either one of `load_balancer_configuration` or `multi_subnet_ip_configuration` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder loadBalancerConfiguration(@Nullable Output<VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs> loadBalancerConfiguration) {
            $.loadBalancerConfiguration = loadBalancerConfiguration;
            return this;
        }

        /**
         * @param loadBalancerConfiguration A `load_balancer_configuration` block as defined below. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** Either one of `load_balancer_configuration` or `multi_subnet_ip_configuration` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder loadBalancerConfiguration(VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs loadBalancerConfiguration) {
            return loadBalancerConfiguration(Output.of(loadBalancerConfiguration));
        }

        /**
         * @param multiSubnetIpConfigurations One or more `multi_subnet_ip_configuration` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder multiSubnetIpConfigurations(@Nullable Output<List<VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs>> multiSubnetIpConfigurations) {
            $.multiSubnetIpConfigurations = multiSubnetIpConfigurations;
            return this;
        }

        /**
         * @param multiSubnetIpConfigurations One or more `multi_subnet_ip_configuration` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder multiSubnetIpConfigurations(List<VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs> multiSubnetIpConfigurations) {
            return multiSubnetIpConfigurations(Output.of(multiSubnetIpConfigurations));
        }

        /**
         * @param multiSubnetIpConfigurations One or more `multi_subnet_ip_configuration` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder multiSubnetIpConfigurations(VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs... multiSubnetIpConfigurations) {
            return multiSubnetIpConfigurations(List.of(multiSubnetIpConfigurations));
        }

        /**
         * @param name The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param port The port of the listener. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output<Integer> port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The port of the listener. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param replicas One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder replicas(@Nullable Output<List<VirtualMachineAvailabilityGroupListenerReplicaArgs>> replicas) {
            $.replicas = replicas;
            return this;
        }

        /**
         * @param replicas One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder replicas(List<VirtualMachineAvailabilityGroupListenerReplicaArgs> replicas) {
            return replicas(Output.of(replicas));
        }

        /**
         * @param replicas One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder replicas(VirtualMachineAvailabilityGroupListenerReplicaArgs... replicas) {
            return replicas(List.of(replicas));
        }

        /**
         * @param sqlVirtualMachineGroupId The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sqlVirtualMachineGroupId(@Nullable Output<String> sqlVirtualMachineGroupId) {
            $.sqlVirtualMachineGroupId = sqlVirtualMachineGroupId;
            return this;
        }

        /**
         * @param sqlVirtualMachineGroupId The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sqlVirtualMachineGroupId(String sqlVirtualMachineGroupId) {
            return sqlVirtualMachineGroupId(Output.of(sqlVirtualMachineGroupId));
        }

        public VirtualMachineAvailabilityGroupListenerState build() {
            return $;
        }
    }

}
