All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.cdn.inputs.UrlRewriteActionParametersArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.cdn.inputs;

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


/**
 * Defines the parameters for the url rewrite action.
 * 
 */
public final class UrlRewriteActionParametersArgs extends com.pulumi.resources.ResourceArgs {

    public static final UrlRewriteActionParametersArgs Empty = new UrlRewriteActionParametersArgs();

    /**
     * Define the relative URL to which the above requests will be rewritten by.
     * 
     */
    @Import(name="destination", required=true)
    private Output destination;

    /**
     * @return Define the relative URL to which the above requests will be rewritten by.
     * 
     */
    public Output destination() {
        return this.destination;
    }

    /**
     * Whether to preserve unmatched path. Default value is true.
     * 
     */
    @Import(name="preserveUnmatchedPath")
    private @Nullable Output preserveUnmatchedPath;

    /**
     * @return Whether to preserve unmatched path. Default value is true.
     * 
     */
    public Optional> preserveUnmatchedPath() {
        return Optional.ofNullable(this.preserveUnmatchedPath);
    }

    /**
     * define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
     * 
     */
    @Import(name="sourcePattern", required=true)
    private Output sourcePattern;

    /**
     * @return define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
     * 
     */
    public Output sourcePattern() {
        return this.sourcePattern;
    }

    @Import(name="typeName", required=true)
    private Output typeName;

    public Output typeName() {
        return this.typeName;
    }

    private UrlRewriteActionParametersArgs() {}

    private UrlRewriteActionParametersArgs(UrlRewriteActionParametersArgs $) {
        this.destination = $.destination;
        this.preserveUnmatchedPath = $.preserveUnmatchedPath;
        this.sourcePattern = $.sourcePattern;
        this.typeName = $.typeName;
    }

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

    public static final class Builder {
        private UrlRewriteActionParametersArgs $;

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

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

        /**
         * @param destination Define the relative URL to which the above requests will be rewritten by.
         * 
         * @return builder
         * 
         */
        public Builder destination(Output destination) {
            $.destination = destination;
            return this;
        }

        /**
         * @param destination Define the relative URL to which the above requests will be rewritten by.
         * 
         * @return builder
         * 
         */
        public Builder destination(String destination) {
            return destination(Output.of(destination));
        }

        /**
         * @param preserveUnmatchedPath Whether to preserve unmatched path. Default value is true.
         * 
         * @return builder
         * 
         */
        public Builder preserveUnmatchedPath(@Nullable Output preserveUnmatchedPath) {
            $.preserveUnmatchedPath = preserveUnmatchedPath;
            return this;
        }

        /**
         * @param preserveUnmatchedPath Whether to preserve unmatched path. Default value is true.
         * 
         * @return builder
         * 
         */
        public Builder preserveUnmatchedPath(Boolean preserveUnmatchedPath) {
            return preserveUnmatchedPath(Output.of(preserveUnmatchedPath));
        }

        /**
         * @param sourcePattern define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
         * 
         * @return builder
         * 
         */
        public Builder sourcePattern(Output sourcePattern) {
            $.sourcePattern = sourcePattern;
            return this;
        }

        /**
         * @param sourcePattern define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.
         * 
         * @return builder
         * 
         */
        public Builder sourcePattern(String sourcePattern) {
            return sourcePattern(Output.of(sourcePattern));
        }

        public Builder typeName(Output typeName) {
            $.typeName = typeName;
            return this;
        }

        public Builder typeName(String typeName) {
            return typeName(Output.of(typeName));
        }

        public UrlRewriteActionParametersArgs build() {
            if ($.destination == null) {
                throw new MissingRequiredPropertyException("UrlRewriteActionParametersArgs", "destination");
            }
            if ($.sourcePattern == null) {
                throw new MissingRequiredPropertyException("UrlRewriteActionParametersArgs", "sourcePattern");
            }
            if ($.typeName == null) {
                throw new MissingRequiredPropertyException("UrlRewriteActionParametersArgs", "typeName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy