// *** 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.network.outputs;

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

@CustomType
public final class ApplicationGatewayRewriteRuleSetRewriteRuleUrl {
    /**
     * @return The components used to rewrite the URL. Possible values are `path_only` and `query_string_only` to limit the rewrite to the URL Path or URL Query String only.
     * 
     * &gt; **Note:** One or both of `path` and `query_string` must be specified. If one of these is not specified, it means the value  will be empty. If you only want to rewrite `path` or `query_string`, use `components`.
     * 
     */
    private @Nullable String components;
    /**
     * @return The URL path to rewrite.
     * 
     */
    private @Nullable String path;
    /**
     * @return The query string to rewrite.
     * 
     */
    private @Nullable String queryString;
    /**
     * @return Whether the URL path map should be reevaluated after this rewrite has been applied. [More info on rewrite configutation](https://docs.microsoft.com/azure/application-gateway/rewrite-http-headers-url#rewrite-configuration)
     * 
     */
    private @Nullable Boolean reroute;

    private ApplicationGatewayRewriteRuleSetRewriteRuleUrl() {}
    /**
     * @return The components used to rewrite the URL. Possible values are `path_only` and `query_string_only` to limit the rewrite to the URL Path or URL Query String only.
     * 
     * &gt; **Note:** One or both of `path` and `query_string` must be specified. If one of these is not specified, it means the value  will be empty. If you only want to rewrite `path` or `query_string`, use `components`.
     * 
     */
    public Optional<String> components() {
        return Optional.ofNullable(this.components);
    }
    /**
     * @return The URL path to rewrite.
     * 
     */
    public Optional<String> path() {
        return Optional.ofNullable(this.path);
    }
    /**
     * @return The query string to rewrite.
     * 
     */
    public Optional<String> queryString() {
        return Optional.ofNullable(this.queryString);
    }
    /**
     * @return Whether the URL path map should be reevaluated after this rewrite has been applied. [More info on rewrite configutation](https://docs.microsoft.com/azure/application-gateway/rewrite-http-headers-url#rewrite-configuration)
     * 
     */
    public Optional<Boolean> reroute() {
        return Optional.ofNullable(this.reroute);
    }

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

    public static Builder builder(ApplicationGatewayRewriteRuleSetRewriteRuleUrl defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String components;
        private @Nullable String path;
        private @Nullable String queryString;
        private @Nullable Boolean reroute;
        public Builder() {}
        public Builder(ApplicationGatewayRewriteRuleSetRewriteRuleUrl defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.components = defaults.components;
    	      this.path = defaults.path;
    	      this.queryString = defaults.queryString;
    	      this.reroute = defaults.reroute;
        }

        @CustomType.Setter
        public Builder components(@Nullable String components) {
            this.components = components;
            return this;
        }
        @CustomType.Setter
        public Builder path(@Nullable String path) {
            this.path = path;
            return this;
        }
        @CustomType.Setter
        public Builder queryString(@Nullable String queryString) {
            this.queryString = queryString;
            return this;
        }
        @CustomType.Setter
        public Builder reroute(@Nullable Boolean reroute) {
            this.reroute = reroute;
            return this;
        }
        public ApplicationGatewayRewriteRuleSetRewriteRuleUrl build() {
            final var o = new ApplicationGatewayRewriteRuleSetRewriteRuleUrl();
            o.components = components;
            o.path = path;
            o.queryString = queryString;
            o.reroute = reroute;
            return o;
        }
    }
}
