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

com.pulumi.azurenative.documentdb.inputs.ConsistencyPolicyArgs Maven / Gradle / Ivy

The 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.documentdb.inputs;

import com.pulumi.azurenative.documentdb.enums.DefaultConsistencyLevel;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Double;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The consistency policy for the Cosmos DB database account.
 * 
 */
public final class ConsistencyPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final ConsistencyPolicyArgs Empty = new ConsistencyPolicyArgs();

    /**
     * The default consistency level and configuration settings of the Cosmos DB account.
     * 
     */
    @Import(name="defaultConsistencyLevel", required=true)
    private Output defaultConsistencyLevel;

    /**
     * @return The default consistency level and configuration settings of the Cosmos DB account.
     * 
     */
    public Output defaultConsistencyLevel() {
        return this.defaultConsistencyLevel;
    }

    /**
     * When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
     * 
     */
    @Import(name="maxIntervalInSeconds")
    private @Nullable Output maxIntervalInSeconds;

    /**
     * @return When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
     * 
     */
    public Optional> maxIntervalInSeconds() {
        return Optional.ofNullable(this.maxIntervalInSeconds);
    }

    /**
     * When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
     * 
     */
    @Import(name="maxStalenessPrefix")
    private @Nullable Output maxStalenessPrefix;

    /**
     * @return When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
     * 
     */
    public Optional> maxStalenessPrefix() {
        return Optional.ofNullable(this.maxStalenessPrefix);
    }

    private ConsistencyPolicyArgs() {}

    private ConsistencyPolicyArgs(ConsistencyPolicyArgs $) {
        this.defaultConsistencyLevel = $.defaultConsistencyLevel;
        this.maxIntervalInSeconds = $.maxIntervalInSeconds;
        this.maxStalenessPrefix = $.maxStalenessPrefix;
    }

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

    public static final class Builder {
        private ConsistencyPolicyArgs $;

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

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

        /**
         * @param defaultConsistencyLevel The default consistency level and configuration settings of the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder defaultConsistencyLevel(Output defaultConsistencyLevel) {
            $.defaultConsistencyLevel = defaultConsistencyLevel;
            return this;
        }

        /**
         * @param defaultConsistencyLevel The default consistency level and configuration settings of the Cosmos DB account.
         * 
         * @return builder
         * 
         */
        public Builder defaultConsistencyLevel(DefaultConsistencyLevel defaultConsistencyLevel) {
            return defaultConsistencyLevel(Output.of(defaultConsistencyLevel));
        }

        /**
         * @param maxIntervalInSeconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
         * 
         * @return builder
         * 
         */
        public Builder maxIntervalInSeconds(@Nullable Output maxIntervalInSeconds) {
            $.maxIntervalInSeconds = maxIntervalInSeconds;
            return this;
        }

        /**
         * @param maxIntervalInSeconds When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
         * 
         * @return builder
         * 
         */
        public Builder maxIntervalInSeconds(Integer maxIntervalInSeconds) {
            return maxIntervalInSeconds(Output.of(maxIntervalInSeconds));
        }

        /**
         * @param maxStalenessPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
         * 
         * @return builder
         * 
         */
        public Builder maxStalenessPrefix(@Nullable Output maxStalenessPrefix) {
            $.maxStalenessPrefix = maxStalenessPrefix;
            return this;
        }

        /**
         * @param maxStalenessPrefix When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.
         * 
         * @return builder
         * 
         */
        public Builder maxStalenessPrefix(Double maxStalenessPrefix) {
            return maxStalenessPrefix(Output.of(maxStalenessPrefix));
        }

        public ConsistencyPolicyArgs build() {
            if ($.defaultConsistencyLevel == null) {
                throw new MissingRequiredPropertyException("ConsistencyPolicyArgs", "defaultConsistencyLevel");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy