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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.ovh.IpLoadBalancing.inputs.HttpRouteActionArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final HttpRouteArgs Empty = new HttpRouteArgs();

    /**
     * Action triggered when all rules match
     * 
     */
    @Import(name="action", required=true)
    private Output<HttpRouteActionArgs> action;

    /**
     * @return Action triggered when all rules match
     * 
     */
    public Output<HttpRouteActionArgs> action() {
        return this.action;
    }

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

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

    /**
     * Route traffic for this frontend
     * 
     */
    @Import(name="frontendId")
    private @Nullable Output<Integer> frontendId;

    /**
     * @return Route traffic for this frontend
     * 
     */
    public Optional<Output<Integer>> frontendId() {
        return Optional.ofNullable(this.frontendId);
    }

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

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

    /**
     * Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
     * 
     */
    @Import(name="weight")
    private @Nullable Output<Integer> weight;

    /**
     * @return Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
     * 
     */
    public Optional<Output<Integer>> weight() {
        return Optional.ofNullable(this.weight);
    }

    private HttpRouteArgs() {}

    private HttpRouteArgs(HttpRouteArgs $) {
        this.action = $.action;
        this.displayName = $.displayName;
        this.frontendId = $.frontendId;
        this.serviceName = $.serviceName;
        this.weight = $.weight;
    }

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

    public static final class Builder {
        private HttpRouteArgs $;

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

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

        /**
         * @param action Action triggered when all rules match
         * 
         * @return builder
         * 
         */
        public Builder action(Output<HttpRouteActionArgs> action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Action triggered when all rules match
         * 
         * @return builder
         * 
         */
        public Builder action(HttpRouteActionArgs action) {
            return action(Output.of(action));
        }

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

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

        /**
         * @param frontendId Route traffic for this frontend
         * 
         * @return builder
         * 
         */
        public Builder frontendId(@Nullable Output<Integer> frontendId) {
            $.frontendId = frontendId;
            return this;
        }

        /**
         * @param frontendId Route traffic for this frontend
         * 
         * @return builder
         * 
         */
        public Builder frontendId(Integer frontendId) {
            return frontendId(Output.of(frontendId));
        }

        /**
         * @param serviceName The internal name of your IP load balancing
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output<String> 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 weight Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
         * 
         * @return builder
         * 
         */
        public Builder weight(@Nullable Output<Integer> weight) {
            $.weight = weight;
            return this;
        }

        /**
         * @param weight Route priority ([0..255]). 0 if null. Highest priority routes are evaluated first. Only the first matching route will trigger an action
         * 
         * @return builder
         * 
         */
        public Builder weight(Integer weight) {
            return weight(Output.of(weight));
        }

        public HttpRouteArgs build() {
            $.action = Objects.requireNonNull($.action, "expected parameter 'action' to be non-null");
            $.serviceName = Objects.requireNonNull($.serviceName, "expected parameter 'serviceName' to be non-null");
            return $;
        }
    }

}
