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

com.pulumi.azurenative.network.RouteArgs 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.RouteNextHopType;
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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RouteArgs Empty = new RouteArgs();

    /**
     * The destination CIDR to which the route applies.
     * 
     */
    @Import(name="addressPrefix")
    private @Nullable Output addressPrefix;

    /**
     * @return The destination CIDR to which the route applies.
     * 
     */
    public Optional> addressPrefix() {
        return Optional.ofNullable(this.addressPrefix);
    }

    /**
     * Resource ID.
     * 
     */
    @Import(name="id")
    private @Nullable Output id;

    /**
     * @return Resource ID.
     * 
     */
    public Optional> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * The name of the resource that is unique within a resource group. This name can be used to access the resource.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the resource that is unique within a resource group. This name can be used to access the resource.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
     * 
     */
    @Import(name="nextHopIpAddress")
    private @Nullable Output nextHopIpAddress;

    /**
     * @return The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
     * 
     */
    public Optional> nextHopIpAddress() {
        return Optional.ofNullable(this.nextHopIpAddress);
    }

    /**
     * The type of Azure hop the packet should be sent to.
     * 
     */
    @Import(name="nextHopType", required=true)
    private Output> nextHopType;

    /**
     * @return The type of Azure hop the packet should be sent to.
     * 
     */
    public Output> nextHopType() {
        return this.nextHopType;
    }

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

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

    /**
     * The name of the route.
     * 
     */
    @Import(name="routeName")
    private @Nullable Output routeName;

    /**
     * @return The name of the route.
     * 
     */
    public Optional> routeName() {
        return Optional.ofNullable(this.routeName);
    }

    /**
     * The name of the route table.
     * 
     */
    @Import(name="routeTableName", required=true)
    private Output routeTableName;

    /**
     * @return The name of the route table.
     * 
     */
    public Output routeTableName() {
        return this.routeTableName;
    }

    /**
     * The type of the resource.
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return The type of the resource.
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    private RouteArgs() {}

    private RouteArgs(RouteArgs $) {
        this.addressPrefix = $.addressPrefix;
        this.id = $.id;
        this.name = $.name;
        this.nextHopIpAddress = $.nextHopIpAddress;
        this.nextHopType = $.nextHopType;
        this.resourceGroupName = $.resourceGroupName;
        this.routeName = $.routeName;
        this.routeTableName = $.routeTableName;
        this.type = $.type;
    }

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

    public static final class Builder {
        private RouteArgs $;

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

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

        /**
         * @param addressPrefix The destination CIDR to which the route applies.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefix(@Nullable Output addressPrefix) {
            $.addressPrefix = addressPrefix;
            return this;
        }

        /**
         * @param addressPrefix The destination CIDR to which the route applies.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefix(String addressPrefix) {
            return addressPrefix(Output.of(addressPrefix));
        }

        /**
         * @param id Resource ID.
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output id) {
            $.id = id;
            return this;
        }

        /**
         * @param id Resource ID.
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param nextHopIpAddress The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
         * 
         * @return builder
         * 
         */
        public Builder nextHopIpAddress(@Nullable Output nextHopIpAddress) {
            $.nextHopIpAddress = nextHopIpAddress;
            return this;
        }

        /**
         * @param nextHopIpAddress The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
         * 
         * @return builder
         * 
         */
        public Builder nextHopIpAddress(String nextHopIpAddress) {
            return nextHopIpAddress(Output.of(nextHopIpAddress));
        }

        /**
         * @param nextHopType The type of Azure hop the packet should be sent to.
         * 
         * @return builder
         * 
         */
        public Builder nextHopType(Output> nextHopType) {
            $.nextHopType = nextHopType;
            return this;
        }

        /**
         * @param nextHopType The type of Azure hop the packet should be sent to.
         * 
         * @return builder
         * 
         */
        public Builder nextHopType(Either nextHopType) {
            return nextHopType(Output.of(nextHopType));
        }

        /**
         * @param nextHopType The type of Azure hop the packet should be sent to.
         * 
         * @return builder
         * 
         */
        public Builder nextHopType(String nextHopType) {
            return nextHopType(Either.ofLeft(nextHopType));
        }

        /**
         * @param nextHopType The type of Azure hop the packet should be sent to.
         * 
         * @return builder
         * 
         */
        public Builder nextHopType(RouteNextHopType nextHopType) {
            return nextHopType(Either.ofRight(nextHopType));
        }

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

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

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

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

        /**
         * @param routeTableName The name of the route table.
         * 
         * @return builder
         * 
         */
        public Builder routeTableName(Output routeTableName) {
            $.routeTableName = routeTableName;
            return this;
        }

        /**
         * @param routeTableName The name of the route table.
         * 
         * @return builder
         * 
         */
        public Builder routeTableName(String routeTableName) {
            return routeTableName(Output.of(routeTableName));
        }

        /**
         * @param type The type of the resource.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of the resource.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public RouteArgs build() {
            if ($.nextHopType == null) {
                throw new MissingRequiredPropertyException("RouteArgs", "nextHopType");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("RouteArgs", "resourceGroupName");
            }
            if ($.routeTableName == null) {
                throw new MissingRequiredPropertyException("RouteArgs", "routeTableName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy