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

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

    public static final FirewallRuleArgs Empty = new FirewallRuleArgs();

    /**
     * The highest IP address included in the range.
     * 
     */
    @Import(name="endIp", required=true)
    private Output<String> endIp;

    /**
     * @return The highest IP address included in the range.
     * 
     */
    public Output<String> endIp() {
        return this.endIp;
    }

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

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

    /**
     * The name of the Redis Cache. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="redisCacheName", required=true)
    private Output<String> redisCacheName;

    /**
     * @return The name of the Redis Cache. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> redisCacheName() {
        return this.redisCacheName;
    }

    /**
     * The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The lowest IP address included in the range
     * 
     */
    @Import(name="startIp", required=true)
    private Output<String> startIp;

    /**
     * @return The lowest IP address included in the range
     * 
     */
    public Output<String> startIp() {
        return this.startIp;
    }

    private FirewallRuleArgs() {}

    private FirewallRuleArgs(FirewallRuleArgs $) {
        this.endIp = $.endIp;
        this.name = $.name;
        this.redisCacheName = $.redisCacheName;
        this.resourceGroupName = $.resourceGroupName;
        this.startIp = $.startIp;
    }

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

    public static final class Builder {
        private FirewallRuleArgs $;

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

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

        /**
         * @param endIp The highest IP address included in the range.
         * 
         * @return builder
         * 
         */
        public Builder endIp(Output<String> endIp) {
            $.endIp = endIp;
            return this;
        }

        /**
         * @param endIp The highest IP address included in the range.
         * 
         * @return builder
         * 
         */
        public Builder endIp(String endIp) {
            return endIp(Output.of(endIp));
        }

        /**
         * @param name The name of the Firewall Rule. 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 of the Firewall Rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

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

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

        /**
         * @param resourceGroupName The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param startIp The lowest IP address included in the range
         * 
         * @return builder
         * 
         */
        public Builder startIp(Output<String> startIp) {
            $.startIp = startIp;
            return this;
        }

        /**
         * @param startIp The lowest IP address included in the range
         * 
         * @return builder
         * 
         */
        public Builder startIp(String startIp) {
            return startIp(Output.of(startIp));
        }

        public FirewallRuleArgs build() {
            $.endIp = Objects.requireNonNull($.endIp, "expected parameter 'endIp' to be non-null");
            $.redisCacheName = Objects.requireNonNull($.redisCacheName, "expected parameter 'redisCacheName' to be non-null");
            $.resourceGroupName = Objects.requireNonNull($.resourceGroupName, "expected parameter 'resourceGroupName' to be non-null");
            $.startIp = Objects.requireNonNull($.startIp, "expected parameter 'startIp' to be non-null");
            return $;
        }
    }

}
