sdk/java/src/main/java/com/pulumi/ovh/IpLoadBalancing/inputs/HttpRouteRuleArgs.java
// *** 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.ovh.IpLoadBalancing.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class HttpRouteRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final HttpRouteRuleArgs Empty = new HttpRouteRuleArgs();

    /**
     * Name of the field to match like &#34;protocol&#34; or &#34;host&#34; &#34;/ipLoadbalancing/{serviceName}/route/availableRules&#34; for a list of available rules
     * 
     */
    @Import(name="field")
    private @Nullable Output<String> field;

    /**
     * @return Name of the field to match like &#34;protocol&#34; or &#34;host&#34; &#34;/ipLoadbalancing/{serviceName}/route/availableRules&#34; for a list of available rules
     * 
     */
    public Optional<Output<String>> field() {
        return Optional.ofNullable(this.field);
    }

    /**
     * Matching operator. Not all operators are available for all fields. See &#34;availableRules&#34;
     * 
     */
    @Import(name="match")
    private @Nullable Output<String> match;

    /**
     * @return Matching operator. Not all operators are available for all fields. See &#34;availableRules&#34;
     * 
     */
    public Optional<Output<String>> match() {
        return Optional.ofNullable(this.match);
    }

    /**
     * Invert the matching operator effect
     * 
     */
    @Import(name="negate")
    private @Nullable Output<Boolean> negate;

    /**
     * @return Invert the matching operator effect
     * 
     */
    public Optional<Output<Boolean>> negate() {
        return Optional.ofNullable(this.negate);
    }

    /**
     * Value to match against this match. Interpretation if this field depends on the match and field
     * 
     */
    @Import(name="pattern")
    private @Nullable Output<String> pattern;

    /**
     * @return Value to match against this match. Interpretation if this field depends on the match and field
     * 
     */
    public Optional<Output<String>> pattern() {
        return Optional.ofNullable(this.pattern);
    }

    /**
     * Id of your rule
     * 
     */
    @Import(name="ruleId")
    private @Nullable Output<Integer> ruleId;

    /**
     * @return Id of your rule
     * 
     */
    public Optional<Output<Integer>> ruleId() {
        return Optional.ofNullable(this.ruleId);
    }

    /**
     * Name of sub-field, if applicable. This may be a Cookie or Header name for instance
     * 
     */
    @Import(name="subField")
    private @Nullable Output<String> subField;

    /**
     * @return Name of sub-field, if applicable. This may be a Cookie or Header name for instance
     * 
     */
    public Optional<Output<String>> subField() {
        return Optional.ofNullable(this.subField);
    }

    private HttpRouteRuleArgs() {}

    private HttpRouteRuleArgs(HttpRouteRuleArgs $) {
        this.field = $.field;
        this.match = $.match;
        this.negate = $.negate;
        this.pattern = $.pattern;
        this.ruleId = $.ruleId;
        this.subField = $.subField;
    }

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

    public static final class Builder {
        private HttpRouteRuleArgs $;

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

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

        /**
         * @param field Name of the field to match like &#34;protocol&#34; or &#34;host&#34; &#34;/ipLoadbalancing/{serviceName}/route/availableRules&#34; for a list of available rules
         * 
         * @return builder
         * 
         */
        public Builder field(@Nullable Output<String> field) {
            $.field = field;
            return this;
        }

        /**
         * @param field Name of the field to match like &#34;protocol&#34; or &#34;host&#34; &#34;/ipLoadbalancing/{serviceName}/route/availableRules&#34; for a list of available rules
         * 
         * @return builder
         * 
         */
        public Builder field(String field) {
            return field(Output.of(field));
        }

        /**
         * @param match Matching operator. Not all operators are available for all fields. See &#34;availableRules&#34;
         * 
         * @return builder
         * 
         */
        public Builder match(@Nullable Output<String> match) {
            $.match = match;
            return this;
        }

        /**
         * @param match Matching operator. Not all operators are available for all fields. See &#34;availableRules&#34;
         * 
         * @return builder
         * 
         */
        public Builder match(String match) {
            return match(Output.of(match));
        }

        /**
         * @param negate Invert the matching operator effect
         * 
         * @return builder
         * 
         */
        public Builder negate(@Nullable Output<Boolean> negate) {
            $.negate = negate;
            return this;
        }

        /**
         * @param negate Invert the matching operator effect
         * 
         * @return builder
         * 
         */
        public Builder negate(Boolean negate) {
            return negate(Output.of(negate));
        }

        /**
         * @param pattern Value to match against this match. Interpretation if this field depends on the match and field
         * 
         * @return builder
         * 
         */
        public Builder pattern(@Nullable Output<String> pattern) {
            $.pattern = pattern;
            return this;
        }

        /**
         * @param pattern Value to match against this match. Interpretation if this field depends on the match and field
         * 
         * @return builder
         * 
         */
        public Builder pattern(String pattern) {
            return pattern(Output.of(pattern));
        }

        /**
         * @param ruleId Id of your rule
         * 
         * @return builder
         * 
         */
        public Builder ruleId(@Nullable Output<Integer> ruleId) {
            $.ruleId = ruleId;
            return this;
        }

        /**
         * @param ruleId Id of your rule
         * 
         * @return builder
         * 
         */
        public Builder ruleId(Integer ruleId) {
            return ruleId(Output.of(ruleId));
        }

        /**
         * @param subField Name of sub-field, if applicable. This may be a Cookie or Header name for instance
         * 
         * @return builder
         * 
         */
        public Builder subField(@Nullable Output<String> subField) {
            $.subField = subField;
            return this;
        }

        /**
         * @param subField Name of sub-field, if applicable. This may be a Cookie or Header name for instance
         * 
         * @return builder
         * 
         */
        public Builder subField(String subField) {
            return subField(Output.of(subField));
        }

        public HttpRouteRuleArgs build() {
            return $;
        }
    }

}
