org.mongodb.awscdk.resources.mongodbatlas.ProcessArgs Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* Advanced configuration details to add for one cluster in the specified project.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.94.0 (build b380f01)", date = "2024-02-05T16:04:31.952Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.ProcessArgs")
@software.amazon.jsii.Jsii.Proxy(ProcessArgs.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ProcessArgs extends software.amazon.jsii.JsiiSerializable {
/**
* Default level of acknowledgment requested from MongoDB for read operations set for this cluster.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getDefaultReadConcern() {
return null;
}
/**
* Default level of acknowledgment requested from MongoDB for write operations set for this cluster.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getDefaultWriteConcern() {
return null;
}
/**
* Flag that indicates whether you can insert or update documents where all indexed entries don't exceed 1024 bytes.
*
* If you set this to false, mongod writes documents that exceed this limit but doesn't index them.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getFailIndexKeyTooLong() {
return null;
}
/**
* Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getJavascriptEnabled() {
return null;
}
/**
* Minimum Transport Layer Security (TLS) version that the cluster accepts for incoming connections.
*
* Clusters using TLS 1.0 or 1.1 should consider setting TLS 1.2 as the minimum TLS protocol version.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getMinimumEnabledTlsProtocol() {
return null;
}
/**
* Flag that indicates whether the cluster disables executing any query that requires a collection scan to return results.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getNoTableScan() {
return null;
}
/**
* Minimum retention window for cluster's oplog expressed in hours.
*
* A value of null indicates that the cluster uses the default minimum oplog window that MongoDB Cloud calculates.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getOplogMinRetentionHours() {
return null;
}
/**
* Storage limit of cluster's oplog expressed in megabytes.
*
* A value of null indicates that the cluster uses the default oplog size that MongoDB Cloud calculates.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getOplogSizeMb() {
return null;
}
/**
* Number of documents per database to sample when gathering schema information.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getSampleRefreshIntervalBiConnector() {
return null;
}
/**
* Interval in seconds at which the mongosqld process re-samples data to create its relational schema.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getSampleSizeBiConnector() {
return null;
}
/**
* Lifetime, in seconds, of multi-document transactions.
*
* Atlas considers the transactions that exceed this limit as expired and so aborts them through a periodic cleanup process.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getTransactionLifetimeLimitSeconds() {
return null;
}
/**
* @return a {@link Builder} of {@link ProcessArgs}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ProcessArgs}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String defaultReadConcern;
java.lang.String defaultWriteConcern;
java.lang.Boolean failIndexKeyTooLong;
java.lang.Boolean javascriptEnabled;
java.lang.String minimumEnabledTlsProtocol;
java.lang.Boolean noTableScan;
java.lang.Number oplogMinRetentionHours;
java.lang.Number oplogSizeMb;
java.lang.Number sampleRefreshIntervalBiConnector;
java.lang.Number sampleSizeBiConnector;
java.lang.Number transactionLifetimeLimitSeconds;
/**
* Sets the value of {@link ProcessArgs#getDefaultReadConcern}
* @param defaultReadConcern Default level of acknowledgment requested from MongoDB for read operations set for this cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultReadConcern(java.lang.String defaultReadConcern) {
this.defaultReadConcern = defaultReadConcern;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getDefaultWriteConcern}
* @param defaultWriteConcern Default level of acknowledgment requested from MongoDB for write operations set for this cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultWriteConcern(java.lang.String defaultWriteConcern) {
this.defaultWriteConcern = defaultWriteConcern;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getFailIndexKeyTooLong}
* @param failIndexKeyTooLong Flag that indicates whether you can insert or update documents where all indexed entries don't exceed 1024 bytes.
* If you set this to false, mongod writes documents that exceed this limit but doesn't index them.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder failIndexKeyTooLong(java.lang.Boolean failIndexKeyTooLong) {
this.failIndexKeyTooLong = failIndexKeyTooLong;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getJavascriptEnabled}
* @param javascriptEnabled Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder javascriptEnabled(java.lang.Boolean javascriptEnabled) {
this.javascriptEnabled = javascriptEnabled;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getMinimumEnabledTlsProtocol}
* @param minimumEnabledTlsProtocol Minimum Transport Layer Security (TLS) version that the cluster accepts for incoming connections.
* Clusters using TLS 1.0 or 1.1 should consider setting TLS 1.2 as the minimum TLS protocol version.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder minimumEnabledTlsProtocol(java.lang.String minimumEnabledTlsProtocol) {
this.minimumEnabledTlsProtocol = minimumEnabledTlsProtocol;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getNoTableScan}
* @param noTableScan Flag that indicates whether the cluster disables executing any query that requires a collection scan to return results.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder noTableScan(java.lang.Boolean noTableScan) {
this.noTableScan = noTableScan;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getOplogMinRetentionHours}
* @param oplogMinRetentionHours Minimum retention window for cluster's oplog expressed in hours.
* A value of null indicates that the cluster uses the default minimum oplog window that MongoDB Cloud calculates.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder oplogMinRetentionHours(java.lang.Number oplogMinRetentionHours) {
this.oplogMinRetentionHours = oplogMinRetentionHours;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getOplogSizeMb}
* @param oplogSizeMb Storage limit of cluster's oplog expressed in megabytes.
* A value of null indicates that the cluster uses the default oplog size that MongoDB Cloud calculates.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder oplogSizeMb(java.lang.Number oplogSizeMb) {
this.oplogSizeMb = oplogSizeMb;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getSampleRefreshIntervalBiConnector}
* @param sampleRefreshIntervalBiConnector Number of documents per database to sample when gathering schema information.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder sampleRefreshIntervalBiConnector(java.lang.Number sampleRefreshIntervalBiConnector) {
this.sampleRefreshIntervalBiConnector = sampleRefreshIntervalBiConnector;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getSampleSizeBiConnector}
* @param sampleSizeBiConnector Interval in seconds at which the mongosqld process re-samples data to create its relational schema.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder sampleSizeBiConnector(java.lang.Number sampleSizeBiConnector) {
this.sampleSizeBiConnector = sampleSizeBiConnector;
return this;
}
/**
* Sets the value of {@link ProcessArgs#getTransactionLifetimeLimitSeconds}
* @param transactionLifetimeLimitSeconds Lifetime, in seconds, of multi-document transactions.
* Atlas considers the transactions that exceed this limit as expired and so aborts them through a periodic cleanup process.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder transactionLifetimeLimitSeconds(java.lang.Number transactionLifetimeLimitSeconds) {
this.transactionLifetimeLimitSeconds = transactionLifetimeLimitSeconds;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ProcessArgs}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ProcessArgs build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ProcessArgs}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ProcessArgs {
private final java.lang.String defaultReadConcern;
private final java.lang.String defaultWriteConcern;
private final java.lang.Boolean failIndexKeyTooLong;
private final java.lang.Boolean javascriptEnabled;
private final java.lang.String minimumEnabledTlsProtocol;
private final java.lang.Boolean noTableScan;
private final java.lang.Number oplogMinRetentionHours;
private final java.lang.Number oplogSizeMb;
private final java.lang.Number sampleRefreshIntervalBiConnector;
private final java.lang.Number sampleSizeBiConnector;
private final java.lang.Number transactionLifetimeLimitSeconds;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.defaultReadConcern = software.amazon.jsii.Kernel.get(this, "defaultReadConcern", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.defaultWriteConcern = software.amazon.jsii.Kernel.get(this, "defaultWriteConcern", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.failIndexKeyTooLong = software.amazon.jsii.Kernel.get(this, "failIndexKeyTooLong", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.javascriptEnabled = software.amazon.jsii.Kernel.get(this, "javascriptEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.minimumEnabledTlsProtocol = software.amazon.jsii.Kernel.get(this, "minimumEnabledTlsProtocol", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.noTableScan = software.amazon.jsii.Kernel.get(this, "noTableScan", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.oplogMinRetentionHours = software.amazon.jsii.Kernel.get(this, "oplogMinRetentionHours", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.oplogSizeMb = software.amazon.jsii.Kernel.get(this, "oplogSizeMb", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.sampleRefreshIntervalBiConnector = software.amazon.jsii.Kernel.get(this, "sampleRefreshIntervalBiConnector", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.sampleSizeBiConnector = software.amazon.jsii.Kernel.get(this, "sampleSizeBiConnector", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.transactionLifetimeLimitSeconds = software.amazon.jsii.Kernel.get(this, "transactionLifetimeLimitSeconds", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.defaultReadConcern = builder.defaultReadConcern;
this.defaultWriteConcern = builder.defaultWriteConcern;
this.failIndexKeyTooLong = builder.failIndexKeyTooLong;
this.javascriptEnabled = builder.javascriptEnabled;
this.minimumEnabledTlsProtocol = builder.minimumEnabledTlsProtocol;
this.noTableScan = builder.noTableScan;
this.oplogMinRetentionHours = builder.oplogMinRetentionHours;
this.oplogSizeMb = builder.oplogSizeMb;
this.sampleRefreshIntervalBiConnector = builder.sampleRefreshIntervalBiConnector;
this.sampleSizeBiConnector = builder.sampleSizeBiConnector;
this.transactionLifetimeLimitSeconds = builder.transactionLifetimeLimitSeconds;
}
@Override
public final java.lang.String getDefaultReadConcern() {
return this.defaultReadConcern;
}
@Override
public final java.lang.String getDefaultWriteConcern() {
return this.defaultWriteConcern;
}
@Override
public final java.lang.Boolean getFailIndexKeyTooLong() {
return this.failIndexKeyTooLong;
}
@Override
public final java.lang.Boolean getJavascriptEnabled() {
return this.javascriptEnabled;
}
@Override
public final java.lang.String getMinimumEnabledTlsProtocol() {
return this.minimumEnabledTlsProtocol;
}
@Override
public final java.lang.Boolean getNoTableScan() {
return this.noTableScan;
}
@Override
public final java.lang.Number getOplogMinRetentionHours() {
return this.oplogMinRetentionHours;
}
@Override
public final java.lang.Number getOplogSizeMb() {
return this.oplogSizeMb;
}
@Override
public final java.lang.Number getSampleRefreshIntervalBiConnector() {
return this.sampleRefreshIntervalBiConnector;
}
@Override
public final java.lang.Number getSampleSizeBiConnector() {
return this.sampleSizeBiConnector;
}
@Override
public final java.lang.Number getTransactionLifetimeLimitSeconds() {
return this.transactionLifetimeLimitSeconds;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getDefaultReadConcern() != null) {
data.set("defaultReadConcern", om.valueToTree(this.getDefaultReadConcern()));
}
if (this.getDefaultWriteConcern() != null) {
data.set("defaultWriteConcern", om.valueToTree(this.getDefaultWriteConcern()));
}
if (this.getFailIndexKeyTooLong() != null) {
data.set("failIndexKeyTooLong", om.valueToTree(this.getFailIndexKeyTooLong()));
}
if (this.getJavascriptEnabled() != null) {
data.set("javascriptEnabled", om.valueToTree(this.getJavascriptEnabled()));
}
if (this.getMinimumEnabledTlsProtocol() != null) {
data.set("minimumEnabledTlsProtocol", om.valueToTree(this.getMinimumEnabledTlsProtocol()));
}
if (this.getNoTableScan() != null) {
data.set("noTableScan", om.valueToTree(this.getNoTableScan()));
}
if (this.getOplogMinRetentionHours() != null) {
data.set("oplogMinRetentionHours", om.valueToTree(this.getOplogMinRetentionHours()));
}
if (this.getOplogSizeMb() != null) {
data.set("oplogSizeMb", om.valueToTree(this.getOplogSizeMb()));
}
if (this.getSampleRefreshIntervalBiConnector() != null) {
data.set("sampleRefreshIntervalBiConnector", om.valueToTree(this.getSampleRefreshIntervalBiConnector()));
}
if (this.getSampleSizeBiConnector() != null) {
data.set("sampleSizeBiConnector", om.valueToTree(this.getSampleSizeBiConnector()));
}
if (this.getTransactionLifetimeLimitSeconds() != null) {
data.set("transactionLifetimeLimitSeconds", om.valueToTree(this.getTransactionLifetimeLimitSeconds()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.ProcessArgs"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProcessArgs.Jsii$Proxy that = (ProcessArgs.Jsii$Proxy) o;
if (this.defaultReadConcern != null ? !this.defaultReadConcern.equals(that.defaultReadConcern) : that.defaultReadConcern != null) return false;
if (this.defaultWriteConcern != null ? !this.defaultWriteConcern.equals(that.defaultWriteConcern) : that.defaultWriteConcern != null) return false;
if (this.failIndexKeyTooLong != null ? !this.failIndexKeyTooLong.equals(that.failIndexKeyTooLong) : that.failIndexKeyTooLong != null) return false;
if (this.javascriptEnabled != null ? !this.javascriptEnabled.equals(that.javascriptEnabled) : that.javascriptEnabled != null) return false;
if (this.minimumEnabledTlsProtocol != null ? !this.minimumEnabledTlsProtocol.equals(that.minimumEnabledTlsProtocol) : that.minimumEnabledTlsProtocol != null) return false;
if (this.noTableScan != null ? !this.noTableScan.equals(that.noTableScan) : that.noTableScan != null) return false;
if (this.oplogMinRetentionHours != null ? !this.oplogMinRetentionHours.equals(that.oplogMinRetentionHours) : that.oplogMinRetentionHours != null) return false;
if (this.oplogSizeMb != null ? !this.oplogSizeMb.equals(that.oplogSizeMb) : that.oplogSizeMb != null) return false;
if (this.sampleRefreshIntervalBiConnector != null ? !this.sampleRefreshIntervalBiConnector.equals(that.sampleRefreshIntervalBiConnector) : that.sampleRefreshIntervalBiConnector != null) return false;
if (this.sampleSizeBiConnector != null ? !this.sampleSizeBiConnector.equals(that.sampleSizeBiConnector) : that.sampleSizeBiConnector != null) return false;
return this.transactionLifetimeLimitSeconds != null ? this.transactionLifetimeLimitSeconds.equals(that.transactionLifetimeLimitSeconds) : that.transactionLifetimeLimitSeconds == null;
}
@Override
public final int hashCode() {
int result = this.defaultReadConcern != null ? this.defaultReadConcern.hashCode() : 0;
result = 31 * result + (this.defaultWriteConcern != null ? this.defaultWriteConcern.hashCode() : 0);
result = 31 * result + (this.failIndexKeyTooLong != null ? this.failIndexKeyTooLong.hashCode() : 0);
result = 31 * result + (this.javascriptEnabled != null ? this.javascriptEnabled.hashCode() : 0);
result = 31 * result + (this.minimumEnabledTlsProtocol != null ? this.minimumEnabledTlsProtocol.hashCode() : 0);
result = 31 * result + (this.noTableScan != null ? this.noTableScan.hashCode() : 0);
result = 31 * result + (this.oplogMinRetentionHours != null ? this.oplogMinRetentionHours.hashCode() : 0);
result = 31 * result + (this.oplogSizeMb != null ? this.oplogSizeMb.hashCode() : 0);
result = 31 * result + (this.sampleRefreshIntervalBiConnector != null ? this.sampleRefreshIntervalBiConnector.hashCode() : 0);
result = 31 * result + (this.sampleSizeBiConnector != null ? this.sampleSizeBiConnector.hashCode() : 0);
result = 31 * result + (this.transactionLifetimeLimitSeconds != null ? this.transactionLifetimeLimitSeconds.hashCode() : 0);
return result;
}
}
}