sdk/java/src/main/java/com/pulumi/ovh/IpLoadBalancing/inputs/HttpRouteActionArgs.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.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final HttpRouteActionArgs Empty = new HttpRouteActionArgs();

    /**
     * HTTP status code for &#34;redirect&#34; and &#34;reject&#34; actions
     * 
     */
    @Import(name="status")
    private @Nullable Output<Integer> status;

    /**
     * @return HTTP status code for &#34;redirect&#34; and &#34;reject&#34; actions
     * 
     */
    public Optional<Output<Integer>> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * Farm ID for &#34;farm&#34; action type or URL template for &#34;redirect&#34; action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
     * 
     */
    @Import(name="target")
    private @Nullable Output<String> target;

    /**
     * @return Farm ID for &#34;farm&#34; action type or URL template for &#34;redirect&#34; action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
     * 
     */
    public Optional<Output<String>> target() {
        return Optional.ofNullable(this.target);
    }

    /**
     * Action to trigger if all the rules of this route matches
     * 
     */
    @Import(name="type", required=true)
    private Output<String> type;

    /**
     * @return Action to trigger if all the rules of this route matches
     * 
     */
    public Output<String> type() {
        return this.type;
    }

    private HttpRouteActionArgs() {}

    private HttpRouteActionArgs(HttpRouteActionArgs $) {
        this.status = $.status;
        this.target = $.target;
        this.type = $.type;
    }

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

    public static final class Builder {
        private HttpRouteActionArgs $;

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

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

        /**
         * @param status HTTP status code for &#34;redirect&#34; and &#34;reject&#34; actions
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output<Integer> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status HTTP status code for &#34;redirect&#34; and &#34;reject&#34; actions
         * 
         * @return builder
         * 
         */
        public Builder status(Integer status) {
            return status(Output.of(status));
        }

        /**
         * @param target Farm ID for &#34;farm&#34; action type or URL template for &#34;redirect&#34; action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
         * 
         * @return builder
         * 
         */
        public Builder target(@Nullable Output<String> target) {
            $.target = target;
            return this;
        }

        /**
         * @param target Farm ID for &#34;farm&#34; action type or URL template for &#34;redirect&#34; action. You may use ${uri}, ${protocol}, ${host}, ${port} and ${path} variables in redirect target
         * 
         * @return builder
         * 
         */
        public Builder target(String target) {
            return target(Output.of(target));
        }

        /**
         * @param type Action to trigger if all the rules of this route matches
         * 
         * @return builder
         * 
         */
        public Builder type(Output<String> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Action to trigger if all the rules of this route matches
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

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

}
