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

com.pulumi.googlenative.networkservices.v1.TcpRouteArgs Maven / Gradle / Ivy

// *** 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.googlenative.networkservices.v1;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.googlenative.networkservices.v1.inputs.TcpRouteRouteRuleArgs;
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 TcpRouteArgs extends com.pulumi.resources.ResourceArgs {

    public static final TcpRouteArgs Empty = new TcpRouteArgs();

    /**
     * Optional. A free-text description of the resource. Max length 1024 characters.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Optional. A free-text description of the resource. Max length 1024 characters.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*{@literal /}locations/global/gateways/`
     * 
     */
    @Import(name="gateways")
    private @Nullable Output> gateways;

    /**
     * @return Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*{@literal /}locations/global/gateways/`
     * 
     */
    public Optional>> gateways() {
        return Optional.ofNullable(this.gateways);
    }

    /**
     * Optional. Set of label tags associated with the TcpRoute resource.
     * 
     */
    @Import(name="labels")
    private @Nullable Output> labels;

    /**
     * @return Optional. Set of label tags associated with the TcpRoute resource.
     * 
     */
    public Optional>> labels() {
        return Optional.ofNullable(this.labels);
    }

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

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

    /**
     * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*{@literal /}locations/global/meshes/` The attached Mesh should be of a type SIDECAR
     * 
     */
    @Import(name="meshes")
    private @Nullable Output> meshes;

    /**
     * @return Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*{@literal /}locations/global/meshes/` The attached Mesh should be of a type SIDECAR
     * 
     */
    public Optional>> meshes() {
        return Optional.ofNullable(this.meshes);
    }

    /**
     * Name of the TcpRoute resource. It matches pattern `projects/*{@literal /}locations/global/tcpRoutes/tcp_route_name>`.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the TcpRoute resource. It matches pattern `projects/*{@literal /}locations/global/tcpRoutes/tcp_route_name>`.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

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

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

    /**
     * Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     * 
     */
    @Import(name="rules", required=true)
    private Output> rules;

    /**
     * @return Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
     * 
     */
    public Output> rules() {
        return this.rules;
    }

    /**
     * Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).
     * 
     */
    @Import(name="tcpRouteId", required=true)
    private Output tcpRouteId;

    /**
     * @return Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).
     * 
     */
    public Output tcpRouteId() {
        return this.tcpRouteId;
    }

    private TcpRouteArgs() {}

    private TcpRouteArgs(TcpRouteArgs $) {
        this.description = $.description;
        this.gateways = $.gateways;
        this.labels = $.labels;
        this.location = $.location;
        this.meshes = $.meshes;
        this.name = $.name;
        this.project = $.project;
        this.rules = $.rules;
        this.tcpRouteId = $.tcpRouteId;
    }

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

    public static final class Builder {
        private TcpRouteArgs $;

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

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

        /**
         * @param description Optional. A free-text description of the resource. Max length 1024 characters.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Optional. A free-text description of the resource. Max length 1024 characters.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param gateways Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*{@literal /}locations/global/gateways/`
         * 
         * @return builder
         * 
         */
        public Builder gateways(@Nullable Output> gateways) {
            $.gateways = gateways;
            return this;
        }

        /**
         * @param gateways Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*{@literal /}locations/global/gateways/`
         * 
         * @return builder
         * 
         */
        public Builder gateways(List gateways) {
            return gateways(Output.of(gateways));
        }

        /**
         * @param gateways Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*{@literal /}locations/global/gateways/`
         * 
         * @return builder
         * 
         */
        public Builder gateways(String... gateways) {
            return gateways(List.of(gateways));
        }

        /**
         * @param labels Optional. Set of label tags associated with the TcpRoute resource.
         * 
         * @return builder
         * 
         */
        public Builder labels(@Nullable Output> labels) {
            $.labels = labels;
            return this;
        }

        /**
         * @param labels Optional. Set of label tags associated with the TcpRoute resource.
         * 
         * @return builder
         * 
         */
        public Builder labels(Map labels) {
            return labels(Output.of(labels));
        }

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

        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param meshes Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*{@literal /}locations/global/meshes/` The attached Mesh should be of a type SIDECAR
         * 
         * @return builder
         * 
         */
        public Builder meshes(@Nullable Output> meshes) {
            $.meshes = meshes;
            return this;
        }

        /**
         * @param meshes Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*{@literal /}locations/global/meshes/` The attached Mesh should be of a type SIDECAR
         * 
         * @return builder
         * 
         */
        public Builder meshes(List meshes) {
            return meshes(Output.of(meshes));
        }

        /**
         * @param meshes Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*{@literal /}locations/global/meshes/` The attached Mesh should be of a type SIDECAR
         * 
         * @return builder
         * 
         */
        public Builder meshes(String... meshes) {
            return meshes(List.of(meshes));
        }

        /**
         * @param name Name of the TcpRoute resource. It matches pattern `projects/*{@literal /}locations/global/tcpRoutes/tcp_route_name>`.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the TcpRoute resource. It matches pattern `projects/*{@literal /}locations/global/tcpRoutes/tcp_route_name>`.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

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

        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param rules Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
         * 
         * @return builder
         * 
         */
        public Builder rules(Output> rules) {
            $.rules = rules;
            return this;
        }

        /**
         * @param rules Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
         * 
         * @return builder
         * 
         */
        public Builder rules(List rules) {
            return rules(Output.of(rules));
        }

        /**
         * @param rules Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.
         * 
         * @return builder
         * 
         */
        public Builder rules(TcpRouteRouteRuleArgs... rules) {
            return rules(List.of(rules));
        }

        /**
         * @param tcpRouteId Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).
         * 
         * @return builder
         * 
         */
        public Builder tcpRouteId(Output tcpRouteId) {
            $.tcpRouteId = tcpRouteId;
            return this;
        }

        /**
         * @param tcpRouteId Required. Short name of the TcpRoute resource to be created. E.g. TODO(Add an example).
         * 
         * @return builder
         * 
         */
        public Builder tcpRouteId(String tcpRouteId) {
            return tcpRouteId(Output.of(tcpRouteId));
        }

        public TcpRouteArgs build() {
            $.rules = Objects.requireNonNull($.rules, "expected parameter 'rules' to be non-null");
            $.tcpRouteId = Objects.requireNonNull($.tcpRouteId, "expected parameter 'tcpRouteId' to be non-null");
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy