// *** 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 java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch {
    /**
     * @return The value of the header should exactly match contents of exactMatch.
     * 
     */
    private @Nullable String exactMatch;
    /**
     * @return The header name to match on.
     * 
     */
    private String headerName;
    /**
     * @return If set to false (default), the headerMatch is considered a match if the match criteria above are met.
     * If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
     * 
     */
    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 the contents of headerName must exist. The match takes place whether or not the request&#39;s header has a value.
     * 
     */
    private @Nullable Boolean presentMatch;
    /**
     * @return The value of the header must end with the contents of suffixMatch.
     * 
     */
    private @Nullable String suffixMatch;

    private EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch() {}
    /**
     * @return The value of the header should exactly match contents of exactMatch.
     * 
     */
    public Optional<String> exactMatch() {
        return Optional.ofNullable(this.exactMatch);
    }
    /**
     * @return The header name to match on.
     * 
     */
    public String headerName() {
        return this.headerName;
    }
    /**
     * @return If set to false (default), the headerMatch is considered a match if the match criteria above are met.
     * If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
     * 
     */
    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 the contents of headerName must exist. The match takes place whether or not the request&#39;s header has a value.
     * 
     */
    public Optional<Boolean> presentMatch() {
        return Optional.ofNullable(this.presentMatch);
    }
    /**
     * @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(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String exactMatch;
        private String headerName;
        private @Nullable Boolean invertMatch;
        private @Nullable String prefixMatch;
        private @Nullable Boolean presentMatch;
        private @Nullable String suffixMatch;
        public Builder() {}
        public Builder(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.exactMatch = defaults.exactMatch;
    	      this.headerName = defaults.headerName;
    	      this.invertMatch = defaults.invertMatch;
    	      this.prefixMatch = defaults.prefixMatch;
    	      this.presentMatch = defaults.presentMatch;
    	      this.suffixMatch = defaults.suffixMatch;
        }

        @CustomType.Setter
        public Builder exactMatch(@Nullable String exactMatch) {
            this.exactMatch = exactMatch;
            return this;
        }
        @CustomType.Setter
        public Builder headerName(String headerName) {
            this.headerName = Objects.requireNonNull(headerName);
            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 suffixMatch(@Nullable String suffixMatch) {
            this.suffixMatch = suffixMatch;
            return this;
        }
        public EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch build() {
            final var o = new EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch();
            o.exactMatch = exactMatch;
            o.headerName = headerName;
            o.invertMatch = invertMatch;
            o.prefixMatch = prefixMatch;
            o.presentMatch = presentMatch;
            o.suffixMatch = suffixMatch;
            return o;
        }
    }
}
