All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ovhcloud.pulumi.ovh.Ip.FirewallArgs Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
// *** 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.ovhcloud.pulumi.ovh.Ip;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FirewallArgs Empty = new FirewallArgs();

    @Import(name="enabled")
    private @Nullable Output enabled;

    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The IP or the CIDR
     * 
     */
    @Import(name="ip", required=true)
    private Output ip;

    /**
     * @return The IP or the CIDR
     * 
     */
    public Output ip() {
        return this.ip;
    }

    /**
     * IPv4 address
     * * ` enabled  ` - Whether firewall should be enabled
     * 
     */
    @Import(name="ipOnFirewall", required=true)
    private Output ipOnFirewall;

    /**
     * @return IPv4 address
     * * ` enabled  ` - Whether firewall should be enabled
     * 
     */
    public Output ipOnFirewall() {
        return this.ipOnFirewall;
    }

    private FirewallArgs() {}

    private FirewallArgs(FirewallArgs $) {
        this.enabled = $.enabled;
        this.ip = $.ip;
        this.ipOnFirewall = $.ipOnFirewall;
    }

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

    public static final class Builder {
        private FirewallArgs $;

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

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

        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param ip The IP or the CIDR
         * 
         * @return builder
         * 
         */
        public Builder ip(Output ip) {
            $.ip = ip;
            return this;
        }

        /**
         * @param ip The IP or the CIDR
         * 
         * @return builder
         * 
         */
        public Builder ip(String ip) {
            return ip(Output.of(ip));
        }

        /**
         * @param ipOnFirewall IPv4 address
         * * ` enabled  ` - Whether firewall should be enabled
         * 
         * @return builder
         * 
         */
        public Builder ipOnFirewall(Output ipOnFirewall) {
            $.ipOnFirewall = ipOnFirewall;
            return this;
        }

        /**
         * @param ipOnFirewall IPv4 address
         * * ` enabled  ` - Whether firewall should be enabled
         * 
         * @return builder
         * 
         */
        public Builder ipOnFirewall(String ipOnFirewall) {
            return ipOnFirewall(Output.of(ipOnFirewall));
        }

        public FirewallArgs build() {
            if ($.ip == null) {
                throw new MissingRequiredPropertyException("FirewallArgs", "ip");
            }
            if ($.ipOnFirewall == null) {
                throw new MissingRequiredPropertyException("FirewallArgs", "ipOnFirewall");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy