com.pulumi.azurenative.documentdb.outputs.ConsistencyPolicyResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ConsistencyPolicyResponse {
/**
* @return The default consistency level and configuration settings of the Cosmos DB account.
*
*/
private String defaultConsistencyLevel;
/**
* @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'.
*
*/
private @Nullable Integer maxIntervalInSeconds;
/**
* @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'.
*
*/
private @Nullable Double maxStalenessPrefix;
private ConsistencyPolicyResponse() {}
/**
* @return The default consistency level and configuration settings of the Cosmos DB account.
*
*/
public String defaultConsistencyLevel() {
return this.defaultConsistencyLevel;
}
/**
* @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);
}
/**
* @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);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ConsistencyPolicyResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String defaultConsistencyLevel;
private @Nullable Integer maxIntervalInSeconds;
private @Nullable Double maxStalenessPrefix;
public Builder() {}
public Builder(ConsistencyPolicyResponse defaults) {
Objects.requireNonNull(defaults);
this.defaultConsistencyLevel = defaults.defaultConsistencyLevel;
this.maxIntervalInSeconds = defaults.maxIntervalInSeconds;
this.maxStalenessPrefix = defaults.maxStalenessPrefix;
}
@CustomType.Setter
public Builder defaultConsistencyLevel(String defaultConsistencyLevel) {
if (defaultConsistencyLevel == null) {
throw new MissingRequiredPropertyException("ConsistencyPolicyResponse", "defaultConsistencyLevel");
}
this.defaultConsistencyLevel = defaultConsistencyLevel;
return this;
}
@CustomType.Setter
public Builder maxIntervalInSeconds(@Nullable Integer maxIntervalInSeconds) {
this.maxIntervalInSeconds = maxIntervalInSeconds;
return this;
}
@CustomType.Setter
public Builder maxStalenessPrefix(@Nullable Double maxStalenessPrefix) {
this.maxStalenessPrefix = maxStalenessPrefix;
return this;
}
public ConsistencyPolicyResponse build() {
final var _resultValue = new ConsistencyPolicyResponse();
_resultValue.defaultConsistencyLevel = defaultConsistencyLevel;
_resultValue.maxIntervalInSeconds = maxIntervalInSeconds;
_resultValue.maxStalenessPrefix = maxStalenessPrefix;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy