// *** 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;

@CustomType
public final class RouteFilterRule {
    /**
     * @return The access type of the rule. The only possible value is `Allow`.
     * 
     */
    private String access;
    /**
     * @return The collection for bgp community values to filter on. e.g. [&#39;12076:5010&#39;,&#39;12076:5020&#39;].
     * 
     */
    private List<String> communities;
    /**
     * @return The name of the route filter rule.
     * 
     */
    private String name;
    /**
     * @return The rule type of the rule. The only possible value is `Community`.
     * 
     */
    private String ruleType;

    private RouteFilterRule() {}
    /**
     * @return The access type of the rule. The only possible value is `Allow`.
     * 
     */
    public String access() {
        return this.access;
    }
    /**
     * @return The collection for bgp community values to filter on. e.g. [&#39;12076:5010&#39;,&#39;12076:5020&#39;].
     * 
     */
    public List<String> communities() {
        return this.communities;
    }
    /**
     * @return The name of the route filter rule.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return The rule type of the rule. The only possible value is `Community`.
     * 
     */
    public String ruleType() {
        return this.ruleType;
    }

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

    public static Builder builder(RouteFilterRule defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String access;
        private List<String> communities;
        private String name;
        private String ruleType;
        public Builder() {}
        public Builder(RouteFilterRule defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.access = defaults.access;
    	      this.communities = defaults.communities;
    	      this.name = defaults.name;
    	      this.ruleType = defaults.ruleType;
        }

        @CustomType.Setter
        public Builder access(String access) {
            this.access = Objects.requireNonNull(access);
            return this;
        }
        @CustomType.Setter
        public Builder communities(List<String> communities) {
            this.communities = Objects.requireNonNull(communities);
            return this;
        }
        public Builder communities(String... communities) {
            return communities(List.of(communities));
        }
        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        @CustomType.Setter
        public Builder ruleType(String ruleType) {
            this.ruleType = Objects.requireNonNull(ruleType);
            return this;
        }
        public RouteFilterRule build() {
            final var o = new RouteFilterRule();
            o.access = access;
            o.communities = communities;
            o.name = name;
            o.ruleType = ruleType;
            return o;
        }
    }
}
