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

import com.pulumi.azure.lb.inputs.BackendAddressPoolTunnelInterfaceArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final BackendAddressPoolArgs Empty = new BackendAddressPoolArgs();

    /**
     * The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="loadbalancerId", required=true)
    private Output<String> loadbalancerId;

    /**
     * @return The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> loadbalancerId() {
        return this.loadbalancerId;
    }

    /**
     * Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * One or more `tunnel_interface` blocks as defined below.
     * 
     */
    @Import(name="tunnelInterfaces")
    private @Nullable Output<List<BackendAddressPoolTunnelInterfaceArgs>> tunnelInterfaces;

    /**
     * @return One or more `tunnel_interface` blocks as defined below.
     * 
     */
    public Optional<Output<List<BackendAddressPoolTunnelInterfaceArgs>>> tunnelInterfaces() {
        return Optional.ofNullable(this.tunnelInterfaces);
    }

    /**
     * The ID of the Virtual Network within which the Backend Address Pool should exist.
     * 
     */
    @Import(name="virtualNetworkId")
    private @Nullable Output<String> virtualNetworkId;

    /**
     * @return The ID of the Virtual Network within which the Backend Address Pool should exist.
     * 
     */
    public Optional<Output<String>> virtualNetworkId() {
        return Optional.ofNullable(this.virtualNetworkId);
    }

    private BackendAddressPoolArgs() {}

    private BackendAddressPoolArgs(BackendAddressPoolArgs $) {
        this.loadbalancerId = $.loadbalancerId;
        this.name = $.name;
        this.tunnelInterfaces = $.tunnelInterfaces;
        this.virtualNetworkId = $.virtualNetworkId;
    }

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

    public static final class Builder {
        private BackendAddressPoolArgs $;

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

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

        /**
         * @param loadbalancerId The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder loadbalancerId(Output<String> loadbalancerId) {
            $.loadbalancerId = loadbalancerId;
            return this;
        }

        /**
         * @param loadbalancerId The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder loadbalancerId(String loadbalancerId) {
            return loadbalancerId(Output.of(loadbalancerId));
        }

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

        /**
         * @param name Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param tunnelInterfaces One or more `tunnel_interface` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder tunnelInterfaces(@Nullable Output<List<BackendAddressPoolTunnelInterfaceArgs>> tunnelInterfaces) {
            $.tunnelInterfaces = tunnelInterfaces;
            return this;
        }

        /**
         * @param tunnelInterfaces One or more `tunnel_interface` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder tunnelInterfaces(List<BackendAddressPoolTunnelInterfaceArgs> tunnelInterfaces) {
            return tunnelInterfaces(Output.of(tunnelInterfaces));
        }

        /**
         * @param tunnelInterfaces One or more `tunnel_interface` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder tunnelInterfaces(BackendAddressPoolTunnelInterfaceArgs... tunnelInterfaces) {
            return tunnelInterfaces(List.of(tunnelInterfaces));
        }

        /**
         * @param virtualNetworkId The ID of the Virtual Network within which the Backend Address Pool should exist.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkId(@Nullable Output<String> virtualNetworkId) {
            $.virtualNetworkId = virtualNetworkId;
            return this;
        }

        /**
         * @param virtualNetworkId The ID of the Virtual Network within which the Backend Address Pool should exist.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkId(String virtualNetworkId) {
            return virtualNetworkId(Output.of(virtualNetworkId));
        }

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

}
