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

com.pulumi.azurenative.network.ForwardingRuleArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.pulumi.azurenative.network;

import com.pulumi.azurenative.network.enums.ForwardingRuleState;
import com.pulumi.azurenative.network.inputs.TargetDnsServerArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ForwardingRuleArgs Empty = new ForwardingRuleArgs();

    /**
     * The name of the DNS forwarding ruleset.
     * 
     */
    @Import(name="dnsForwardingRulesetName", required=true)
    private Output dnsForwardingRulesetName;

    /**
     * @return The name of the DNS forwarding ruleset.
     * 
     */
    public Output dnsForwardingRulesetName() {
        return this.dnsForwardingRulesetName;
    }

    /**
     * The domain name for the forwarding rule.
     * 
     */
    @Import(name="domainName", required=true)
    private Output domainName;

    /**
     * @return The domain name for the forwarding rule.
     * 
     */
    public Output domainName() {
        return this.domainName;
    }

    /**
     * The name of the forwarding rule.
     * 
     */
    @Import(name="forwardingRuleName")
    private @Nullable Output forwardingRuleName;

    /**
     * @return The name of the forwarding rule.
     * 
     */
    public Optional> forwardingRuleName() {
        return Optional.ofNullable(this.forwardingRuleName);
    }

    /**
     * The state of forwarding rule.
     * 
     */
    @Import(name="forwardingRuleState")
    private @Nullable Output> forwardingRuleState;

    /**
     * @return The state of forwarding rule.
     * 
     */
    public Optional>> forwardingRuleState() {
        return Optional.ofNullable(this.forwardingRuleState);
    }

    /**
     * Metadata attached to the forwarding rule.
     * 
     */
    @Import(name="metadata")
    private @Nullable Output> metadata;

    /**
     * @return Metadata attached to the forwarding rule.
     * 
     */
    public Optional>> metadata() {
        return Optional.ofNullable(this.metadata);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * DNS servers to forward the DNS query to.
     * 
     */
    @Import(name="targetDnsServers", required=true)
    private Output> targetDnsServers;

    /**
     * @return DNS servers to forward the DNS query to.
     * 
     */
    public Output> targetDnsServers() {
        return this.targetDnsServers;
    }

    private ForwardingRuleArgs() {}

    private ForwardingRuleArgs(ForwardingRuleArgs $) {
        this.dnsForwardingRulesetName = $.dnsForwardingRulesetName;
        this.domainName = $.domainName;
        this.forwardingRuleName = $.forwardingRuleName;
        this.forwardingRuleState = $.forwardingRuleState;
        this.metadata = $.metadata;
        this.resourceGroupName = $.resourceGroupName;
        this.targetDnsServers = $.targetDnsServers;
    }

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

    public static final class Builder {
        private ForwardingRuleArgs $;

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

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

        /**
         * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset.
         * 
         * @return builder
         * 
         */
        public Builder dnsForwardingRulesetName(Output dnsForwardingRulesetName) {
            $.dnsForwardingRulesetName = dnsForwardingRulesetName;
            return this;
        }

        /**
         * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset.
         * 
         * @return builder
         * 
         */
        public Builder dnsForwardingRulesetName(String dnsForwardingRulesetName) {
            return dnsForwardingRulesetName(Output.of(dnsForwardingRulesetName));
        }

        /**
         * @param domainName The domain name for the forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder domainName(Output domainName) {
            $.domainName = domainName;
            return this;
        }

        /**
         * @param domainName The domain name for the forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder domainName(String domainName) {
            return domainName(Output.of(domainName));
        }

        /**
         * @param forwardingRuleName The name of the forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleName(@Nullable Output forwardingRuleName) {
            $.forwardingRuleName = forwardingRuleName;
            return this;
        }

        /**
         * @param forwardingRuleName The name of the forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleName(String forwardingRuleName) {
            return forwardingRuleName(Output.of(forwardingRuleName));
        }

        /**
         * @param forwardingRuleState The state of forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleState(@Nullable Output> forwardingRuleState) {
            $.forwardingRuleState = forwardingRuleState;
            return this;
        }

        /**
         * @param forwardingRuleState The state of forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleState(Either forwardingRuleState) {
            return forwardingRuleState(Output.of(forwardingRuleState));
        }

        /**
         * @param forwardingRuleState The state of forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleState(String forwardingRuleState) {
            return forwardingRuleState(Either.ofLeft(forwardingRuleState));
        }

        /**
         * @param forwardingRuleState The state of forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleState(ForwardingRuleState forwardingRuleState) {
            return forwardingRuleState(Either.ofRight(forwardingRuleState));
        }

        /**
         * @param metadata Metadata attached to the forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder metadata(@Nullable Output> metadata) {
            $.metadata = metadata;
            return this;
        }

        /**
         * @param metadata Metadata attached to the forwarding rule.
         * 
         * @return builder
         * 
         */
        public Builder metadata(Map metadata) {
            return metadata(Output.of(metadata));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param targetDnsServers DNS servers to forward the DNS query to.
         * 
         * @return builder
         * 
         */
        public Builder targetDnsServers(Output> targetDnsServers) {
            $.targetDnsServers = targetDnsServers;
            return this;
        }

        /**
         * @param targetDnsServers DNS servers to forward the DNS query to.
         * 
         * @return builder
         * 
         */
        public Builder targetDnsServers(List targetDnsServers) {
            return targetDnsServers(Output.of(targetDnsServers));
        }

        /**
         * @param targetDnsServers DNS servers to forward the DNS query to.
         * 
         * @return builder
         * 
         */
        public Builder targetDnsServers(TargetDnsServerArgs... targetDnsServers) {
            return targetDnsServers(List.of(targetDnsServers));
        }

        public ForwardingRuleArgs build() {
            if ($.dnsForwardingRulesetName == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "dnsForwardingRulesetName");
            }
            if ($.domainName == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "domainName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "resourceGroupName");
            }
            if ($.targetDnsServers == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "targetDnsServers");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy