// *** 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.azure.frontdoor.inputs;

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


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

    public static final FrontdoorRoutingRuleForwardingConfigurationArgs Empty = new FrontdoorRoutingRuleForwardingConfigurationArgs();

    /**
     * Specifies the name of the Backend Pool to forward the incoming traffic to.
     * 
     */
    @Import(name="backendPoolName", required=true)
    private Output<String> backendPoolName;

    /**
     * @return Specifies the name of the Backend Pool to forward the incoming traffic to.
     * 
     */
    public Output<String> backendPoolName() {
        return this.backendPoolName;
    }

    /**
     * Specify the minimum caching duration (in ISO8601 notation e.g. `P1DT2H` for 1 day and 2 hours). Needs to be greater than 0 and smaller than 365 days. `cache_duration` works only in combination with `cache_enabled` set to `true`.
     * 
     */
    @Import(name="cacheDuration")
    private @Nullable Output<String> cacheDuration;

    /**
     * @return Specify the minimum caching duration (in ISO8601 notation e.g. `P1DT2H` for 1 day and 2 hours). Needs to be greater than 0 and smaller than 365 days. `cache_duration` works only in combination with `cache_enabled` set to `true`.
     * 
     */
    public Optional<Output<String>> cacheDuration() {
        return Optional.ofNullable(this.cacheDuration);
    }

    /**
     * Specifies whether to Enable caching or not. Valid options are `true` or `false`. Defaults to `false`.
     * 
     */
    @Import(name="cacheEnabled")
    private @Nullable Output<Boolean> cacheEnabled;

    /**
     * @return Specifies whether to Enable caching or not. Valid options are `true` or `false`. Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> cacheEnabled() {
        return Optional.ofNullable(this.cacheEnabled);
    }

    /**
     * Defines cache behaviour in relation to query string parameters. Valid options are `StripAll`, `StripAllExcept`, `StripOnly` or `StripNone`. Defaults to `StripAll`.
     * 
     */
    @Import(name="cacheQueryParameterStripDirective")
    private @Nullable Output<String> cacheQueryParameterStripDirective;

    /**
     * @return Defines cache behaviour in relation to query string parameters. Valid options are `StripAll`, `StripAllExcept`, `StripOnly` or `StripNone`. Defaults to `StripAll`.
     * 
     */
    public Optional<Output<String>> cacheQueryParameterStripDirective() {
        return Optional.ofNullable(this.cacheQueryParameterStripDirective);
    }

    /**
     * Specify query parameters (array). Works only in combination with `cache_query_parameter_strip_directive` set to `StripAllExcept` or `StripOnly`.
     * 
     */
    @Import(name="cacheQueryParameters")
    private @Nullable Output<List<String>> cacheQueryParameters;

    /**
     * @return Specify query parameters (array). Works only in combination with `cache_query_parameter_strip_directive` set to `StripAllExcept` or `StripOnly`.
     * 
     */
    public Optional<Output<List<String>>> cacheQueryParameters() {
        return Optional.ofNullable(this.cacheQueryParameters);
    }

    /**
     * Whether to use dynamic compression when caching. Valid options are `true` or `false`. Defaults to `false`.
     * 
     */
    @Import(name="cacheUseDynamicCompression")
    private @Nullable Output<Boolean> cacheUseDynamicCompression;

    /**
     * @return Whether to use dynamic compression when caching. Valid options are `true` or `false`. Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> cacheUseDynamicCompression() {
        return Optional.ofNullable(this.cacheUseDynamicCompression);
    }

    /**
     * Path to use when constructing the request to forward to the backend. This functions as a URL Rewrite. Default behaviour preserves the URL path.
     * 
     */
    @Import(name="customForwardingPath")
    private @Nullable Output<String> customForwardingPath;

    /**
     * @return Path to use when constructing the request to forward to the backend. This functions as a URL Rewrite. Default behaviour preserves the URL path.
     * 
     */
    public Optional<Output<String>> customForwardingPath() {
        return Optional.ofNullable(this.customForwardingPath);
    }

    /**
     * Protocol to use when redirecting. Valid options are `HttpOnly`, `HttpsOnly`, or `MatchRequest`. Defaults to `HttpsOnly`.
     * 
     */
    @Import(name="forwardingProtocol")
    private @Nullable Output<String> forwardingProtocol;

    /**
     * @return Protocol to use when redirecting. Valid options are `HttpOnly`, `HttpsOnly`, or `MatchRequest`. Defaults to `HttpsOnly`.
     * 
     */
    public Optional<Output<String>> forwardingProtocol() {
        return Optional.ofNullable(this.forwardingProtocol);
    }

    private FrontdoorRoutingRuleForwardingConfigurationArgs() {}

    private FrontdoorRoutingRuleForwardingConfigurationArgs(FrontdoorRoutingRuleForwardingConfigurationArgs $) {
        this.backendPoolName = $.backendPoolName;
        this.cacheDuration = $.cacheDuration;
        this.cacheEnabled = $.cacheEnabled;
        this.cacheQueryParameterStripDirective = $.cacheQueryParameterStripDirective;
        this.cacheQueryParameters = $.cacheQueryParameters;
        this.cacheUseDynamicCompression = $.cacheUseDynamicCompression;
        this.customForwardingPath = $.customForwardingPath;
        this.forwardingProtocol = $.forwardingProtocol;
    }

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

    public static final class Builder {
        private FrontdoorRoutingRuleForwardingConfigurationArgs $;

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

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

        /**
         * @param backendPoolName Specifies the name of the Backend Pool to forward the incoming traffic to.
         * 
         * @return builder
         * 
         */
        public Builder backendPoolName(Output<String> backendPoolName) {
            $.backendPoolName = backendPoolName;
            return this;
        }

        /**
         * @param backendPoolName Specifies the name of the Backend Pool to forward the incoming traffic to.
         * 
         * @return builder
         * 
         */
        public Builder backendPoolName(String backendPoolName) {
            return backendPoolName(Output.of(backendPoolName));
        }

        /**
         * @param cacheDuration Specify the minimum caching duration (in ISO8601 notation e.g. `P1DT2H` for 1 day and 2 hours). Needs to be greater than 0 and smaller than 365 days. `cache_duration` works only in combination with `cache_enabled` set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder cacheDuration(@Nullable Output<String> cacheDuration) {
            $.cacheDuration = cacheDuration;
            return this;
        }

        /**
         * @param cacheDuration Specify the minimum caching duration (in ISO8601 notation e.g. `P1DT2H` for 1 day and 2 hours). Needs to be greater than 0 and smaller than 365 days. `cache_duration` works only in combination with `cache_enabled` set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder cacheDuration(String cacheDuration) {
            return cacheDuration(Output.of(cacheDuration));
        }

        /**
         * @param cacheEnabled Specifies whether to Enable caching or not. Valid options are `true` or `false`. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder cacheEnabled(@Nullable Output<Boolean> cacheEnabled) {
            $.cacheEnabled = cacheEnabled;
            return this;
        }

        /**
         * @param cacheEnabled Specifies whether to Enable caching or not. Valid options are `true` or `false`. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder cacheEnabled(Boolean cacheEnabled) {
            return cacheEnabled(Output.of(cacheEnabled));
        }

        /**
         * @param cacheQueryParameterStripDirective Defines cache behaviour in relation to query string parameters. Valid options are `StripAll`, `StripAllExcept`, `StripOnly` or `StripNone`. Defaults to `StripAll`.
         * 
         * @return builder
         * 
         */
        public Builder cacheQueryParameterStripDirective(@Nullable Output<String> cacheQueryParameterStripDirective) {
            $.cacheQueryParameterStripDirective = cacheQueryParameterStripDirective;
            return this;
        }

        /**
         * @param cacheQueryParameterStripDirective Defines cache behaviour in relation to query string parameters. Valid options are `StripAll`, `StripAllExcept`, `StripOnly` or `StripNone`. Defaults to `StripAll`.
         * 
         * @return builder
         * 
         */
        public Builder cacheQueryParameterStripDirective(String cacheQueryParameterStripDirective) {
            return cacheQueryParameterStripDirective(Output.of(cacheQueryParameterStripDirective));
        }

        /**
         * @param cacheQueryParameters Specify query parameters (array). Works only in combination with `cache_query_parameter_strip_directive` set to `StripAllExcept` or `StripOnly`.
         * 
         * @return builder
         * 
         */
        public Builder cacheQueryParameters(@Nullable Output<List<String>> cacheQueryParameters) {
            $.cacheQueryParameters = cacheQueryParameters;
            return this;
        }

        /**
         * @param cacheQueryParameters Specify query parameters (array). Works only in combination with `cache_query_parameter_strip_directive` set to `StripAllExcept` or `StripOnly`.
         * 
         * @return builder
         * 
         */
        public Builder cacheQueryParameters(List<String> cacheQueryParameters) {
            return cacheQueryParameters(Output.of(cacheQueryParameters));
        }

        /**
         * @param cacheQueryParameters Specify query parameters (array). Works only in combination with `cache_query_parameter_strip_directive` set to `StripAllExcept` or `StripOnly`.
         * 
         * @return builder
         * 
         */
        public Builder cacheQueryParameters(String... cacheQueryParameters) {
            return cacheQueryParameters(List.of(cacheQueryParameters));
        }

        /**
         * @param cacheUseDynamicCompression Whether to use dynamic compression when caching. Valid options are `true` or `false`. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder cacheUseDynamicCompression(@Nullable Output<Boolean> cacheUseDynamicCompression) {
            $.cacheUseDynamicCompression = cacheUseDynamicCompression;
            return this;
        }

        /**
         * @param cacheUseDynamicCompression Whether to use dynamic compression when caching. Valid options are `true` or `false`. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder cacheUseDynamicCompression(Boolean cacheUseDynamicCompression) {
            return cacheUseDynamicCompression(Output.of(cacheUseDynamicCompression));
        }

        /**
         * @param customForwardingPath Path to use when constructing the request to forward to the backend. This functions as a URL Rewrite. Default behaviour preserves the URL path.
         * 
         * @return builder
         * 
         */
        public Builder customForwardingPath(@Nullable Output<String> customForwardingPath) {
            $.customForwardingPath = customForwardingPath;
            return this;
        }

        /**
         * @param customForwardingPath Path to use when constructing the request to forward to the backend. This functions as a URL Rewrite. Default behaviour preserves the URL path.
         * 
         * @return builder
         * 
         */
        public Builder customForwardingPath(String customForwardingPath) {
            return customForwardingPath(Output.of(customForwardingPath));
        }

        /**
         * @param forwardingProtocol Protocol to use when redirecting. Valid options are `HttpOnly`, `HttpsOnly`, or `MatchRequest`. Defaults to `HttpsOnly`.
         * 
         * @return builder
         * 
         */
        public Builder forwardingProtocol(@Nullable Output<String> forwardingProtocol) {
            $.forwardingProtocol = forwardingProtocol;
            return this;
        }

        /**
         * @param forwardingProtocol Protocol to use when redirecting. Valid options are `HttpOnly`, `HttpsOnly`, or `MatchRequest`. Defaults to `HttpsOnly`.
         * 
         * @return builder
         * 
         */
        public Builder forwardingProtocol(String forwardingProtocol) {
            return forwardingProtocol(Output.of(forwardingProtocol));
        }

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

}
