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

com.pulumi.azurenative.network.inputs.CriterionArgs 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.inputs;

import com.pulumi.azurenative.network.enums.RouteMapMatchCondition;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * A matching criteria which matches routes based on route prefix, community, and AS path.
 * 
 */
public final class CriterionArgs extends com.pulumi.resources.ResourceArgs {

    public static final CriterionArgs Empty = new CriterionArgs();

    /**
     * List of AS paths which this criteria matches.
     * 
     */
    @Import(name="asPath")
    private @Nullable Output> asPath;

    /**
     * @return List of AS paths which this criteria matches.
     * 
     */
    public Optional>> asPath() {
        return Optional.ofNullable(this.asPath);
    }

    /**
     * List of BGP communities which this criteria matches.
     * 
     */
    @Import(name="community")
    private @Nullable Output> community;

    /**
     * @return List of BGP communities which this criteria matches.
     * 
     */
    public Optional>> community() {
        return Optional.ofNullable(this.community);
    }

    /**
     * Match condition to apply RouteMap rules.
     * 
     */
    @Import(name="matchCondition")
    private @Nullable Output> matchCondition;

    /**
     * @return Match condition to apply RouteMap rules.
     * 
     */
    public Optional>> matchCondition() {
        return Optional.ofNullable(this.matchCondition);
    }

    /**
     * List of route prefixes which this criteria matches.
     * 
     */
    @Import(name="routePrefix")
    private @Nullable Output> routePrefix;

    /**
     * @return List of route prefixes which this criteria matches.
     * 
     */
    public Optional>> routePrefix() {
        return Optional.ofNullable(this.routePrefix);
    }

    private CriterionArgs() {}

    private CriterionArgs(CriterionArgs $) {
        this.asPath = $.asPath;
        this.community = $.community;
        this.matchCondition = $.matchCondition;
        this.routePrefix = $.routePrefix;
    }

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

    public static final class Builder {
        private CriterionArgs $;

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

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

        /**
         * @param asPath List of AS paths which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder asPath(@Nullable Output> asPath) {
            $.asPath = asPath;
            return this;
        }

        /**
         * @param asPath List of AS paths which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder asPath(List asPath) {
            return asPath(Output.of(asPath));
        }

        /**
         * @param asPath List of AS paths which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder asPath(String... asPath) {
            return asPath(List.of(asPath));
        }

        /**
         * @param community List of BGP communities which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder community(@Nullable Output> community) {
            $.community = community;
            return this;
        }

        /**
         * @param community List of BGP communities which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder community(List community) {
            return community(Output.of(community));
        }

        /**
         * @param community List of BGP communities which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder community(String... community) {
            return community(List.of(community));
        }

        /**
         * @param matchCondition Match condition to apply RouteMap rules.
         * 
         * @return builder
         * 
         */
        public Builder matchCondition(@Nullable Output> matchCondition) {
            $.matchCondition = matchCondition;
            return this;
        }

        /**
         * @param matchCondition Match condition to apply RouteMap rules.
         * 
         * @return builder
         * 
         */
        public Builder matchCondition(Either matchCondition) {
            return matchCondition(Output.of(matchCondition));
        }

        /**
         * @param matchCondition Match condition to apply RouteMap rules.
         * 
         * @return builder
         * 
         */
        public Builder matchCondition(String matchCondition) {
            return matchCondition(Either.ofLeft(matchCondition));
        }

        /**
         * @param matchCondition Match condition to apply RouteMap rules.
         * 
         * @return builder
         * 
         */
        public Builder matchCondition(RouteMapMatchCondition matchCondition) {
            return matchCondition(Either.ofRight(matchCondition));
        }

        /**
         * @param routePrefix List of route prefixes which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder routePrefix(@Nullable Output> routePrefix) {
            $.routePrefix = routePrefix;
            return this;
        }

        /**
         * @param routePrefix List of route prefixes which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder routePrefix(List routePrefix) {
            return routePrefix(Output.of(routePrefix));
        }

        /**
         * @param routePrefix List of route prefixes which this criteria matches.
         * 
         * @return builder
         * 
         */
        public Builder routePrefix(String... routePrefix) {
            return routePrefix(List.of(routePrefix));
        }

        public CriterionArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy