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

com.pulumi.azurenative.cdn.inputs.CacheConfigurationArgs 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.azurenative.cdn.enums.RuleCacheBehavior;
import com.pulumi.azurenative.cdn.enums.RuleIsCompressionEnabled;
import com.pulumi.azurenative.cdn.enums.RuleQueryStringCachingBehavior;
import com.pulumi.core.Either;
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;


/**
 * Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.
 * 
 */
public final class CacheConfigurationArgs extends com.pulumi.resources.ResourceArgs {

    public static final CacheConfigurationArgs Empty = new CacheConfigurationArgs();

    /**
     * Caching behavior for the requests
     * 
     */
    @Import(name="cacheBehavior")
    private @Nullable Output> cacheBehavior;

    /**
     * @return Caching behavior for the requests
     * 
     */
    public Optional>> cacheBehavior() {
        return Optional.ofNullable(this.cacheBehavior);
    }

    /**
     * The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
     * 
     */
    @Import(name="cacheDuration")
    private @Nullable Output cacheDuration;

    /**
     * @return The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
     * 
     */
    public Optional> cacheDuration() {
        return Optional.ofNullable(this.cacheDuration);
    }

    /**
     * Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
     * 
     */
    @Import(name="isCompressionEnabled")
    private @Nullable Output> isCompressionEnabled;

    /**
     * @return Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
     * 
     */
    public Optional>> isCompressionEnabled() {
        return Optional.ofNullable(this.isCompressionEnabled);
    }

    /**
     * query parameters to include or exclude (comma separated).
     * 
     */
    @Import(name="queryParameters")
    private @Nullable Output queryParameters;

    /**
     * @return query parameters to include or exclude (comma separated).
     * 
     */
    public Optional> queryParameters() {
        return Optional.ofNullable(this.queryParameters);
    }

    /**
     * Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
     * 
     */
    @Import(name="queryStringCachingBehavior")
    private @Nullable Output> queryStringCachingBehavior;

    /**
     * @return Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
     * 
     */
    public Optional>> queryStringCachingBehavior() {
        return Optional.ofNullable(this.queryStringCachingBehavior);
    }

    private CacheConfigurationArgs() {}

    private CacheConfigurationArgs(CacheConfigurationArgs $) {
        this.cacheBehavior = $.cacheBehavior;
        this.cacheDuration = $.cacheDuration;
        this.isCompressionEnabled = $.isCompressionEnabled;
        this.queryParameters = $.queryParameters;
        this.queryStringCachingBehavior = $.queryStringCachingBehavior;
    }

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

    public static final class Builder {
        private CacheConfigurationArgs $;

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

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

        /**
         * @param cacheBehavior Caching behavior for the requests
         * 
         * @return builder
         * 
         */
        public Builder cacheBehavior(@Nullable Output> cacheBehavior) {
            $.cacheBehavior = cacheBehavior;
            return this;
        }

        /**
         * @param cacheBehavior Caching behavior for the requests
         * 
         * @return builder
         * 
         */
        public Builder cacheBehavior(Either cacheBehavior) {
            return cacheBehavior(Output.of(cacheBehavior));
        }

        /**
         * @param cacheBehavior Caching behavior for the requests
         * 
         * @return builder
         * 
         */
        public Builder cacheBehavior(String cacheBehavior) {
            return cacheBehavior(Either.ofLeft(cacheBehavior));
        }

        /**
         * @param cacheBehavior Caching behavior for the requests
         * 
         * @return builder
         * 
         */
        public Builder cacheBehavior(RuleCacheBehavior cacheBehavior) {
            return cacheBehavior(Either.ofRight(cacheBehavior));
        }

        /**
         * @param cacheDuration The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
         * 
         * @return builder
         * 
         */
        public Builder cacheDuration(@Nullable Output cacheDuration) {
            $.cacheDuration = cacheDuration;
            return this;
        }

        /**
         * @param cacheDuration The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
         * 
         * @return builder
         * 
         */
        public Builder cacheDuration(String cacheDuration) {
            return cacheDuration(Output.of(cacheDuration));
        }

        /**
         * @param isCompressionEnabled Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
         * 
         * @return builder
         * 
         */
        public Builder isCompressionEnabled(@Nullable Output> isCompressionEnabled) {
            $.isCompressionEnabled = isCompressionEnabled;
            return this;
        }

        /**
         * @param isCompressionEnabled Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
         * 
         * @return builder
         * 
         */
        public Builder isCompressionEnabled(Either isCompressionEnabled) {
            return isCompressionEnabled(Output.of(isCompressionEnabled));
        }

        /**
         * @param isCompressionEnabled Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
         * 
         * @return builder
         * 
         */
        public Builder isCompressionEnabled(String isCompressionEnabled) {
            return isCompressionEnabled(Either.ofLeft(isCompressionEnabled));
        }

        /**
         * @param isCompressionEnabled Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.
         * 
         * @return builder
         * 
         */
        public Builder isCompressionEnabled(RuleIsCompressionEnabled isCompressionEnabled) {
            return isCompressionEnabled(Either.ofRight(isCompressionEnabled));
        }

        /**
         * @param queryParameters query parameters to include or exclude (comma separated).
         * 
         * @return builder
         * 
         */
        public Builder queryParameters(@Nullable Output queryParameters) {
            $.queryParameters = queryParameters;
            return this;
        }

        /**
         * @param queryParameters query parameters to include or exclude (comma separated).
         * 
         * @return builder
         * 
         */
        public Builder queryParameters(String queryParameters) {
            return queryParameters(Output.of(queryParameters));
        }

        /**
         * @param queryStringCachingBehavior Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
         * 
         * @return builder
         * 
         */
        public Builder queryStringCachingBehavior(@Nullable Output> queryStringCachingBehavior) {
            $.queryStringCachingBehavior = queryStringCachingBehavior;
            return this;
        }

        /**
         * @param queryStringCachingBehavior Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
         * 
         * @return builder
         * 
         */
        public Builder queryStringCachingBehavior(Either queryStringCachingBehavior) {
            return queryStringCachingBehavior(Output.of(queryStringCachingBehavior));
        }

        /**
         * @param queryStringCachingBehavior Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
         * 
         * @return builder
         * 
         */
        public Builder queryStringCachingBehavior(String queryStringCachingBehavior) {
            return queryStringCachingBehavior(Either.ofLeft(queryStringCachingBehavior));
        }

        /**
         * @param queryStringCachingBehavior Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.
         * 
         * @return builder
         * 
         */
        public Builder queryStringCachingBehavior(RuleQueryStringCachingBehavior queryStringCachingBehavior) {
            return queryStringCachingBehavior(Either.ofRight(queryStringCachingBehavior));
        }

        public CacheConfigurationArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy