// *** 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.azure.network.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class RouteMapRuleMatchCriterion {
    /**
     * @return A list of AS paths which this criterion matches.
     * 
     */
    private @Nullable List<String> asPaths;
    /**
     * @return A list of BGP communities which this criterion matches.
     * 
     */
    private @Nullable List<String> communities;
    /**
     * @return The match condition to apply the rule of the Route Map. Possible values are `Contains`, `Equals`, `NotContains`, `NotEquals` and `Unknown`.
     * 
     */
    private String matchCondition;
    /**
     * @return A list of route prefixes which this criterion matches.
     * 
     */
    private @Nullable List<String> routePrefixes;

    private RouteMapRuleMatchCriterion() {}
    /**
     * @return A list of AS paths which this criterion matches.
     * 
     */
    public List<String> asPaths() {
        return this.asPaths == null ? List.of() : this.asPaths;
    }
    /**
     * @return A list of BGP communities which this criterion matches.
     * 
     */
    public List<String> communities() {
        return this.communities == null ? List.of() : this.communities;
    }
    /**
     * @return The match condition to apply the rule of the Route Map. Possible values are `Contains`, `Equals`, `NotContains`, `NotEquals` and `Unknown`.
     * 
     */
    public String matchCondition() {
        return this.matchCondition;
    }
    /**
     * @return A list of route prefixes which this criterion matches.
     * 
     */
    public List<String> routePrefixes() {
        return this.routePrefixes == null ? List.of() : this.routePrefixes;
    }

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

    public static Builder builder(RouteMapRuleMatchCriterion defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> asPaths;
        private @Nullable List<String> communities;
        private String matchCondition;
        private @Nullable List<String> routePrefixes;
        public Builder() {}
        public Builder(RouteMapRuleMatchCriterion defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.asPaths = defaults.asPaths;
    	      this.communities = defaults.communities;
    	      this.matchCondition = defaults.matchCondition;
    	      this.routePrefixes = defaults.routePrefixes;
        }

        @CustomType.Setter
        public Builder asPaths(@Nullable List<String> asPaths) {
            this.asPaths = asPaths;
            return this;
        }
        public Builder asPaths(String... asPaths) {
            return asPaths(List.of(asPaths));
        }
        @CustomType.Setter
        public Builder communities(@Nullable List<String> communities) {
            this.communities = communities;
            return this;
        }
        public Builder communities(String... communities) {
            return communities(List.of(communities));
        }
        @CustomType.Setter
        public Builder matchCondition(String matchCondition) {
            this.matchCondition = Objects.requireNonNull(matchCondition);
            return this;
        }
        @CustomType.Setter
        public Builder routePrefixes(@Nullable List<String> routePrefixes) {
            this.routePrefixes = routePrefixes;
            return this;
        }
        public Builder routePrefixes(String... routePrefixes) {
            return routePrefixes(List.of(routePrefixes));
        }
        public RouteMapRuleMatchCriterion build() {
            final var o = new RouteMapRuleMatchCriterion();
            o.asPaths = asPaths;
            o.communities = communities;
            o.matchCondition = matchCondition;
            o.routePrefixes = routePrefixes;
            return o;
        }
    }
}
