// *** 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.gcp.networkservices.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.networkservices.outputs.HttpRouteRuleMatchHeaderRangeMatch;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class HttpRouteRuleMatchHeader {
    /**
     * @return The value of the header should match exactly the content of exactMatch.
     * 
     */
    private @Nullable String exactMatch;
    /**
     * @return The name of the HTTP header to match against.
     * 
     */
    private @Nullable String header;
    /**
     * @return If specified, the match result will be inverted before checking. Default value is set to false.
     * 
     */
    private @Nullable Boolean invertMatch;
    /**
     * @return The value of the header must start with the contents of prefixMatch.
     * 
     */
    private @Nullable String prefixMatch;
    /**
     * @return A header with headerName must exist. The match takes place whether or not the header has a value.
     * 
     */
    private @Nullable Boolean presentMatch;
    /**
     * @return If specified, the rule will match if the request header value is within the range.
     * Structure is documented below.
     * 
     */
    private @Nullable HttpRouteRuleMatchHeaderRangeMatch rangeMatch;
    /**
     * @return The value of the header must match the regular expression specified in regexMatch.
     * 
     */
    private @Nullable String regexMatch;
    /**
     * @return The value of the header must end with the contents of suffixMatch.
     * 
     */
    private @Nullable String suffixMatch;

    private HttpRouteRuleMatchHeader() {}
    /**
     * @return The value of the header should match exactly the content of exactMatch.
     * 
     */
    public Optional<String> exactMatch() {
        return Optional.ofNullable(this.exactMatch);
    }
    /**
     * @return The name of the HTTP header to match against.
     * 
     */
    public Optional<String> header() {
        return Optional.ofNullable(this.header);
    }
    /**
     * @return If specified, the match result will be inverted before checking. Default value is set to false.
     * 
     */
    public Optional<Boolean> invertMatch() {
        return Optional.ofNullable(this.invertMatch);
    }
    /**
     * @return The value of the header must start with the contents of prefixMatch.
     * 
     */
    public Optional<String> prefixMatch() {
        return Optional.ofNullable(this.prefixMatch);
    }
    /**
     * @return A header with headerName must exist. The match takes place whether or not the header has a value.
     * 
     */
    public Optional<Boolean> presentMatch() {
        return Optional.ofNullable(this.presentMatch);
    }
    /**
     * @return If specified, the rule will match if the request header value is within the range.
     * Structure is documented below.
     * 
     */
    public Optional<HttpRouteRuleMatchHeaderRangeMatch> rangeMatch() {
        return Optional.ofNullable(this.rangeMatch);
    }
    /**
     * @return The value of the header must match the regular expression specified in regexMatch.
     * 
     */
    public Optional<String> regexMatch() {
        return Optional.ofNullable(this.regexMatch);
    }
    /**
     * @return The value of the header must end with the contents of suffixMatch.
     * 
     */
    public Optional<String> suffixMatch() {
        return Optional.ofNullable(this.suffixMatch);
    }

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

    public static Builder builder(HttpRouteRuleMatchHeader defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String exactMatch;
        private @Nullable String header;
        private @Nullable Boolean invertMatch;
        private @Nullable String prefixMatch;
        private @Nullable Boolean presentMatch;
        private @Nullable HttpRouteRuleMatchHeaderRangeMatch rangeMatch;
        private @Nullable String regexMatch;
        private @Nullable String suffixMatch;
        public Builder() {}
        public Builder(HttpRouteRuleMatchHeader defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.exactMatch = defaults.exactMatch;
    	      this.header = defaults.header;
    	      this.invertMatch = defaults.invertMatch;
    	      this.prefixMatch = defaults.prefixMatch;
    	      this.presentMatch = defaults.presentMatch;
    	      this.rangeMatch = defaults.rangeMatch;
    	      this.regexMatch = defaults.regexMatch;
    	      this.suffixMatch = defaults.suffixMatch;
        }

        @CustomType.Setter
        public Builder exactMatch(@Nullable String exactMatch) {
            this.exactMatch = exactMatch;
            return this;
        }
        @CustomType.Setter
        public Builder header(@Nullable String header) {
            this.header = header;
            return this;
        }
        @CustomType.Setter
        public Builder invertMatch(@Nullable Boolean invertMatch) {
            this.invertMatch = invertMatch;
            return this;
        }
        @CustomType.Setter
        public Builder prefixMatch(@Nullable String prefixMatch) {
            this.prefixMatch = prefixMatch;
            return this;
        }
        @CustomType.Setter
        public Builder presentMatch(@Nullable Boolean presentMatch) {
            this.presentMatch = presentMatch;
            return this;
        }
        @CustomType.Setter
        public Builder rangeMatch(@Nullable HttpRouteRuleMatchHeaderRangeMatch rangeMatch) {
            this.rangeMatch = rangeMatch;
            return this;
        }
        @CustomType.Setter
        public Builder regexMatch(@Nullable String regexMatch) {
            this.regexMatch = regexMatch;
            return this;
        }
        @CustomType.Setter
        public Builder suffixMatch(@Nullable String suffixMatch) {
            this.suffixMatch = suffixMatch;
            return this;
        }
        public HttpRouteRuleMatchHeader build() {
            final var o = new HttpRouteRuleMatchHeader();
            o.exactMatch = exactMatch;
            o.header = header;
            o.invertMatch = invertMatch;
            o.prefixMatch = prefixMatch;
            o.presentMatch = presentMatch;
            o.rangeMatch = rangeMatch;
            o.regexMatch = regexMatch;
            o.suffixMatch = suffixMatch;
            return o;
        }
    }
}
