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

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

    public static final PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs Empty = new PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs();

    /**
     * The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="access", required=true)
    private Output<String> access;

    /**
     * @return The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> access() {
        return this.access;
    }

    /**
     * The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="priority", required=true)
    private Output<Integer> priority;

    /**
     * @return The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
     * 
     */
    public Output<Integer> priority() {
        return this.priority;
    }

    /**
     * The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="sourceAddressPrefix", required=true)
    private Output<String> sourceAddressPrefix;

    /**
     * @return The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> sourceAddressPrefix() {
        return this.sourceAddressPrefix;
    }

    /**
     * The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can&#39;t overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="sourcePortRanges")
    private @Nullable Output<List<String>> sourcePortRanges;

    /**
     * @return The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can&#39;t overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<List<String>>> sourcePortRanges() {
        return Optional.ofNullable(this.sourcePortRanges);
    }

    private PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs() {}

    private PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs(PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs $) {
        this.access = $.access;
        this.priority = $.priority;
        this.sourceAddressPrefix = $.sourceAddressPrefix;
        this.sourcePortRanges = $.sourcePortRanges;
    }

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

    public static final class Builder {
        private PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs $;

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

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

        /**
         * @param access The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder access(Output<String> access) {
            $.access = access;
            return this;
        }

        /**
         * @param access The action that should be taken for a specified IP address, subnet range or tag. Acceptable values are `Allow` and `Deny`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder access(String access) {
            return access(Output.of(access));
        }

        /**
         * @param priority The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder priority(Output<Integer> priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority The priority for this rule. The value must be at least `150`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param sourceAddressPrefix The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefix(Output<String> sourceAddressPrefix) {
            $.sourceAddressPrefix = sourceAddressPrefix;
            return this;
        }

        /**
         * @param sourceAddressPrefix The source address prefix or tag to match for the rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourceAddressPrefix(String sourceAddressPrefix) {
            return sourceAddressPrefix(Output.of(sourceAddressPrefix));
        }

        /**
         * @param sourcePortRanges The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can&#39;t overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRanges(@Nullable Output<List<String>> sourcePortRanges) {
            $.sourcePortRanges = sourcePortRanges;
            return this;
        }

        /**
         * @param sourcePortRanges The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can&#39;t overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRanges(List<String> sourcePortRanges) {
            return sourcePortRanges(Output.of(sourcePortRanges));
        }

        /**
         * @param sourcePortRanges The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can&#39;t overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder sourcePortRanges(String... sourcePortRanges) {
            return sourcePortRanges(List.of(sourcePortRanges));
        }

        public PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs build() {
            $.access = Objects.requireNonNull($.access, "expected parameter 'access' to be non-null");
            $.priority = Objects.requireNonNull($.priority, "expected parameter 'priority' to be non-null");
            $.sourceAddressPrefix = Objects.requireNonNull($.sourceAddressPrefix, "expected parameter 'sourceAddressPrefix' to be non-null");
            return $;
        }
    }

}
