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

import com.pulumi.azure.webpubsub.inputs.NetworkAclPrivateEndpointArgs;
import com.pulumi.azure.webpubsub.inputs.NetworkAclPublicNetworkArgs;
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 NetworkAclArgs extends com.pulumi.resources.ResourceArgs {

    public static final NetworkAclArgs Empty = new NetworkAclArgs();

    /**
     * The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
     * 
     */
    @Import(name="defaultAction")
    private @Nullable Output<String> defaultAction;

    /**
     * @return The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
     * 
     */
    public Optional<Output<String>> defaultAction() {
        return Optional.ofNullable(this.defaultAction);
    }

    /**
     * A `private_endpoint` block as defined below.
     * 
     */
    @Import(name="privateEndpoints")
    private @Nullable Output<List<NetworkAclPrivateEndpointArgs>> privateEndpoints;

    /**
     * @return A `private_endpoint` block as defined below.
     * 
     */
    public Optional<Output<List<NetworkAclPrivateEndpointArgs>>> privateEndpoints() {
        return Optional.ofNullable(this.privateEndpoints);
    }

    /**
     * A `public_network` block as defined below.
     * 
     */
    @Import(name="publicNetwork", required=true)
    private Output<NetworkAclPublicNetworkArgs> publicNetwork;

    /**
     * @return A `public_network` block as defined below.
     * 
     */
    public Output<NetworkAclPublicNetworkArgs> publicNetwork() {
        return this.publicNetwork;
    }

    /**
     * The ID of the Web Pubsub service. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="webPubsubId", required=true)
    private Output<String> webPubsubId;

    /**
     * @return The ID of the Web Pubsub service. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> webPubsubId() {
        return this.webPubsubId;
    }

    private NetworkAclArgs() {}

    private NetworkAclArgs(NetworkAclArgs $) {
        this.defaultAction = $.defaultAction;
        this.privateEndpoints = $.privateEndpoints;
        this.publicNetwork = $.publicNetwork;
        this.webPubsubId = $.webPubsubId;
    }

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

    public static final class Builder {
        private NetworkAclArgs $;

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

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

        /**
         * @param defaultAction The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
         * 
         * @return builder
         * 
         */
        public Builder defaultAction(@Nullable Output<String> defaultAction) {
            $.defaultAction = defaultAction;
            return this;
        }

        /**
         * @param defaultAction The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
         * 
         * @return builder
         * 
         */
        public Builder defaultAction(String defaultAction) {
            return defaultAction(Output.of(defaultAction));
        }

        /**
         * @param privateEndpoints A `private_endpoint` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpoints(@Nullable Output<List<NetworkAclPrivateEndpointArgs>> privateEndpoints) {
            $.privateEndpoints = privateEndpoints;
            return this;
        }

        /**
         * @param privateEndpoints A `private_endpoint` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpoints(List<NetworkAclPrivateEndpointArgs> privateEndpoints) {
            return privateEndpoints(Output.of(privateEndpoints));
        }

        /**
         * @param privateEndpoints A `private_endpoint` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpoints(NetworkAclPrivateEndpointArgs... privateEndpoints) {
            return privateEndpoints(List.of(privateEndpoints));
        }

        /**
         * @param publicNetwork A `public_network` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder publicNetwork(Output<NetworkAclPublicNetworkArgs> publicNetwork) {
            $.publicNetwork = publicNetwork;
            return this;
        }

        /**
         * @param publicNetwork A `public_network` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder publicNetwork(NetworkAclPublicNetworkArgs publicNetwork) {
            return publicNetwork(Output.of(publicNetwork));
        }

        /**
         * @param webPubsubId The ID of the Web Pubsub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder webPubsubId(Output<String> webPubsubId) {
            $.webPubsubId = webPubsubId;
            return this;
        }

        /**
         * @param webPubsubId The ID of the Web Pubsub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder webPubsubId(String webPubsubId) {
            return webPubsubId(Output.of(webPubsubId));
        }

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

}
