// *** 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.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FrontdoorRoutingRuleRedirectConfigurationArgs Empty = new FrontdoorRoutingRuleRedirectConfigurationArgs();

    /**
     * The destination fragment in the portion of URL after &#39;#&#39;. Set this to add a fragment to the redirect URL.
     * 
     */
    @Import(name="customFragment")
    private @Nullable Output<String> customFragment;

    /**
     * @return The destination fragment in the portion of URL after &#39;#&#39;. Set this to add a fragment to the redirect URL.
     * 
     */
    public Optional<Output<String>> customFragment() {
        return Optional.ofNullable(this.customFragment);
    }

    /**
     * Set this to change the URL for the redirection.
     * 
     */
    @Import(name="customHost")
    private @Nullable Output<String> customHost;

    /**
     * @return Set this to change the URL for the redirection.
     * 
     */
    public Optional<Output<String>> customHost() {
        return Optional.ofNullable(this.customHost);
    }

    /**
     * The path to retain as per the incoming request, or update in the URL for the redirection.
     * 
     */
    @Import(name="customPath")
    private @Nullable Output<String> customPath;

    /**
     * @return The path to retain as per the incoming request, or update in the URL for the redirection.
     * 
     */
    public Optional<Output<String>> customPath() {
        return Optional.ofNullable(this.customPath);
    }

    /**
     * Replace any existing query string from the incoming request URL.
     * 
     */
    @Import(name="customQueryString")
    private @Nullable Output<String> customQueryString;

    /**
     * @return Replace any existing query string from the incoming request URL.
     * 
     */
    public Optional<Output<String>> customQueryString() {
        return Optional.ofNullable(this.customQueryString);
    }

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

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

    /**
     * Status code for the redirect. Valida options are `Moved`, `Found`, `TemporaryRedirect`, `PermanentRedirect`.
     * 
     */
    @Import(name="redirectType", required=true)
    private Output<String> redirectType;

    /**
     * @return Status code for the redirect. Valida options are `Moved`, `Found`, `TemporaryRedirect`, `PermanentRedirect`.
     * 
     */
    public Output<String> redirectType() {
        return this.redirectType;
    }

    private FrontdoorRoutingRuleRedirectConfigurationArgs() {}

    private FrontdoorRoutingRuleRedirectConfigurationArgs(FrontdoorRoutingRuleRedirectConfigurationArgs $) {
        this.customFragment = $.customFragment;
        this.customHost = $.customHost;
        this.customPath = $.customPath;
        this.customQueryString = $.customQueryString;
        this.redirectProtocol = $.redirectProtocol;
        this.redirectType = $.redirectType;
    }

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

    public static final class Builder {
        private FrontdoorRoutingRuleRedirectConfigurationArgs $;

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

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

        /**
         * @param customFragment The destination fragment in the portion of URL after &#39;#&#39;. Set this to add a fragment to the redirect URL.
         * 
         * @return builder
         * 
         */
        public Builder customFragment(@Nullable Output<String> customFragment) {
            $.customFragment = customFragment;
            return this;
        }

        /**
         * @param customFragment The destination fragment in the portion of URL after &#39;#&#39;. Set this to add a fragment to the redirect URL.
         * 
         * @return builder
         * 
         */
        public Builder customFragment(String customFragment) {
            return customFragment(Output.of(customFragment));
        }

        /**
         * @param customHost Set this to change the URL for the redirection.
         * 
         * @return builder
         * 
         */
        public Builder customHost(@Nullable Output<String> customHost) {
            $.customHost = customHost;
            return this;
        }

        /**
         * @param customHost Set this to change the URL for the redirection.
         * 
         * @return builder
         * 
         */
        public Builder customHost(String customHost) {
            return customHost(Output.of(customHost));
        }

        /**
         * @param customPath The path to retain as per the incoming request, or update in the URL for the redirection.
         * 
         * @return builder
         * 
         */
        public Builder customPath(@Nullable Output<String> customPath) {
            $.customPath = customPath;
            return this;
        }

        /**
         * @param customPath The path to retain as per the incoming request, or update in the URL for the redirection.
         * 
         * @return builder
         * 
         */
        public Builder customPath(String customPath) {
            return customPath(Output.of(customPath));
        }

        /**
         * @param customQueryString Replace any existing query string from the incoming request URL.
         * 
         * @return builder
         * 
         */
        public Builder customQueryString(@Nullable Output<String> customQueryString) {
            $.customQueryString = customQueryString;
            return this;
        }

        /**
         * @param customQueryString Replace any existing query string from the incoming request URL.
         * 
         * @return builder
         * 
         */
        public Builder customQueryString(String customQueryString) {
            return customQueryString(Output.of(customQueryString));
        }

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

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

        /**
         * @param redirectType Status code for the redirect. Valida options are `Moved`, `Found`, `TemporaryRedirect`, `PermanentRedirect`.
         * 
         * @return builder
         * 
         */
        public Builder redirectType(Output<String> redirectType) {
            $.redirectType = redirectType;
            return this;
        }

        /**
         * @param redirectType Status code for the redirect. Valida options are `Moved`, `Found`, `TemporaryRedirect`, `PermanentRedirect`.
         * 
         * @return builder
         * 
         */
        public Builder redirectType(String redirectType) {
            return redirectType(Output.of(redirectType));
        }

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

}
