All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ovhcloud.pulumi.ovh.IpLoadBalancing.TcpRouteRuleArgs Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
// *** 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.ovhcloud.pulumi.ovh.IpLoadBalancing;

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


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

    public static final TcpRouteRuleArgs Empty = new TcpRouteRuleArgs();

    /**
     * Human readable name for your rule, this field is for you
     * 
     */
    @Import(name="displayName")
    private @Nullable Output displayName;

    /**
     * @return Human readable name for your rule, this field is for you
     * 
     */
    public Optional> displayName() {
        return Optional.ofNullable(this.displayName);
    }

    /**
     * Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules
     * 
     */
    @Import(name="field", required=true)
    private Output field;

    /**
     * @return Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules
     * 
     */
    public Output field() {
        return this.field;
    }

    /**
     * Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules"
     * 
     */
    @Import(name="match", required=true)
    private Output match;

    /**
     * @return Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules"
     * 
     */
    public Output match() {
        return this.match;
    }

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

    /**
     * @return Invert the matching operator effect
     * 
     */
    public Optional> 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 pattern;

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

    /**
     * The route to apply this rule
     * 
     */
    @Import(name="routeId", required=true)
    private Output routeId;

    /**
     * @return The route to apply this rule
     * 
     */
    public Output routeId() {
        return this.routeId;
    }

    /**
     * The internal name of your IP load balancing
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The internal name of your IP load balancing
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

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

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

    private TcpRouteRuleArgs() {}

    private TcpRouteRuleArgs(TcpRouteRuleArgs $) {
        this.displayName = $.displayName;
        this.field = $.field;
        this.match = $.match;
        this.negate = $.negate;
        this.pattern = $.pattern;
        this.routeId = $.routeId;
        this.serviceName = $.serviceName;
        this.subField = $.subField;
    }

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

    public static final class Builder {
        private TcpRouteRuleArgs $;

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

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

        /**
         * @param displayName Human readable name for your rule, this field is for you
         * 
         * @return builder
         * 
         */
        public Builder displayName(@Nullable Output displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName Human readable name for your rule, this field is for you
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

        /**
         * @param field Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules
         * 
         * @return builder
         * 
         */
        public Builder field(Output field) {
            $.field = field;
            return this;
        }

        /**
         * @param field Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" 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 "/ipLoadbalancing/{serviceName}/availableRouteRules"
         * 
         * @return builder
         * 
         */
        public Builder match(Output match) {
            $.match = match;
            return this;
        }

        /**
         * @param match Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules"
         * 
         * @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 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 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 routeId The route to apply this rule
         * 
         * @return builder
         * 
         */
        public Builder routeId(Output routeId) {
            $.routeId = routeId;
            return this;
        }

        /**
         * @param routeId The route to apply this rule
         * 
         * @return builder
         * 
         */
        public Builder routeId(String routeId) {
            return routeId(Output.of(routeId));
        }

        /**
         * @param serviceName The internal name of your IP load balancing
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The internal name of your IP load balancing
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        /**
         * @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 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 TcpRouteRuleArgs build() {
            if ($.field == null) {
                throw new MissingRequiredPropertyException("TcpRouteRuleArgs", "field");
            }
            if ($.match == null) {
                throw new MissingRequiredPropertyException("TcpRouteRuleArgs", "match");
            }
            if ($.routeId == null) {
                throw new MissingRequiredPropertyException("TcpRouteRuleArgs", "routeId");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("TcpRouteRuleArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy