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

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

// *** 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.CacheBehavior;
import com.pulumi.azurenative.cdn.enums.CacheType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Defines the parameters for the cache expiration action.
 * 
 */
public final class CacheExpirationActionParametersArgs extends com.pulumi.resources.ResourceArgs {

    public static final CacheExpirationActionParametersArgs Empty = new CacheExpirationActionParametersArgs();

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

    /**
     * @return Caching behavior for the requests
     * 
     */
    public Output> cacheBehavior() {
        return 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);
    }

    /**
     * The level at which the content needs to be cached.
     * 
     */
    @Import(name="cacheType", required=true)
    private Output> cacheType;

    /**
     * @return The level at which the content needs to be cached.
     * 
     */
    public Output> cacheType() {
        return this.cacheType;
    }

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

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

    private CacheExpirationActionParametersArgs() {}

    private CacheExpirationActionParametersArgs(CacheExpirationActionParametersArgs $) {
        this.cacheBehavior = $.cacheBehavior;
        this.cacheDuration = $.cacheDuration;
        this.cacheType = $.cacheType;
        this.typeName = $.typeName;
    }

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

    public static final class Builder {
        private CacheExpirationActionParametersArgs $;

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

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

        /**
         * @param cacheBehavior Caching behavior for the requests
         * 
         * @return builder
         * 
         */
        public Builder cacheBehavior(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(CacheBehavior 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 cacheType The level at which the content needs to be cached.
         * 
         * @return builder
         * 
         */
        public Builder cacheType(Output> cacheType) {
            $.cacheType = cacheType;
            return this;
        }

        /**
         * @param cacheType The level at which the content needs to be cached.
         * 
         * @return builder
         * 
         */
        public Builder cacheType(Either cacheType) {
            return cacheType(Output.of(cacheType));
        }

        /**
         * @param cacheType The level at which the content needs to be cached.
         * 
         * @return builder
         * 
         */
        public Builder cacheType(String cacheType) {
            return cacheType(Either.ofLeft(cacheType));
        }

        /**
         * @param cacheType The level at which the content needs to be cached.
         * 
         * @return builder
         * 
         */
        public Builder cacheType(CacheType cacheType) {
            return cacheType(Either.ofRight(cacheType));
        }

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

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

        public CacheExpirationActionParametersArgs build() {
            if ($.cacheBehavior == null) {
                throw new MissingRequiredPropertyException("CacheExpirationActionParametersArgs", "cacheBehavior");
            }
            if ($.cacheType == null) {
                throw new MissingRequiredPropertyException("CacheExpirationActionParametersArgs", "cacheType");
            }
            if ($.typeName == null) {
                throw new MissingRequiredPropertyException("CacheExpirationActionParametersArgs", "typeName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy