org.mongodb.awscdk.resources.mongodbatlas.Specs Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:29.061Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.Specs")
@software.amazon.jsii.Jsii.Proxy(Specs.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface Specs extends software.amazon.jsii.JsiiSerializable {
/**
* Target throughput desired for storage attached to your AWS-provisioned cluster. Only change this parameter if you:.
*
* set "replicationSpecs[n].regionConfigs[m].providerName" : "AWS".
* set "replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : "M30" or greater not including Mxx_NVME tiers.
* The maximum input/output operations per second (IOPS) depend on the selected .instanceSize and .diskSizeGB. This parameter defaults to the cluster tier's standard IOPS value. Changing this value impacts cluster cost. MongoDB Cloud enforces minimum ratios of storage capacity to system memory for given cluster tiers. This keeps cluster performance consistent with large datasets.
*
* Instance sizes M10 to M40 have a ratio of disk capacity to system memory of 60:1.
* Instance sizes greater than M40 have a ratio of 120:1.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getDiskIops() {
return null;
}
/**
* Type of storage you want to attach to your AWS-provisioned cluster.
*
* STANDARD volume types can't exceed the default input/output operations per second (IOPS) rate for the selected volume size.
*
* PROVISIONED volume types must fall within the allowable IOPS range for the selected volume size."
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getEbsVolumeType() {
return null;
}
/**
* Hardware specification for the instance sizes in this region.
*
* Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts in your instance size. If you deploy a Global Cluster, you must choose a instance size of M30 or greater.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getInstanceSize() {
return null;
}
/**
* Number of read-only nodes for MongoDB Cloud deploys to the region.
*
* Read-only nodes can never become the primary, but can enable local reads.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getNodeCount() {
return null;
}
/**
* @return a {@link Builder} of {@link Specs}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link Specs}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String diskIops;
java.lang.String ebsVolumeType;
java.lang.String instanceSize;
java.lang.Number nodeCount;
/**
* Sets the value of {@link Specs#getDiskIops}
* @param diskIops Target throughput desired for storage attached to your AWS-provisioned cluster. Only change this parameter if you:.
* set "replicationSpecs[n].regionConfigs[m].providerName" : "AWS".
* set "replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : "M30" or greater not including Mxx_NVME tiers.
* The maximum input/output operations per second (IOPS) depend on the selected .instanceSize and .diskSizeGB. This parameter defaults to the cluster tier's standard IOPS value. Changing this value impacts cluster cost. MongoDB Cloud enforces minimum ratios of storage capacity to system memory for given cluster tiers. This keeps cluster performance consistent with large datasets.
*
* Instance sizes M10 to M40 have a ratio of disk capacity to system memory of 60:1.
* Instance sizes greater than M40 have a ratio of 120:1.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder diskIops(java.lang.String diskIops) {
this.diskIops = diskIops;
return this;
}
/**
* Sets the value of {@link Specs#getEbsVolumeType}
* @param ebsVolumeType Type of storage you want to attach to your AWS-provisioned cluster.
* STANDARD volume types can't exceed the default input/output operations per second (IOPS) rate for the selected volume size.
*
* PROVISIONED volume types must fall within the allowable IOPS range for the selected volume size."
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ebsVolumeType(java.lang.String ebsVolumeType) {
this.ebsVolumeType = ebsVolumeType;
return this;
}
/**
* Sets the value of {@link Specs#getInstanceSize}
* @param instanceSize Hardware specification for the instance sizes in this region.
* Each instance size has a default storage and memory capacity. The instance size you select applies to all the data-bearing hosts in your instance size. If you deploy a Global Cluster, you must choose a instance size of M30 or greater.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder instanceSize(java.lang.String instanceSize) {
this.instanceSize = instanceSize;
return this;
}
/**
* Sets the value of {@link Specs#getNodeCount}
* @param nodeCount Number of read-only nodes for MongoDB Cloud deploys to the region.
* Read-only nodes can never become the primary, but can enable local reads.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder nodeCount(java.lang.Number nodeCount) {
this.nodeCount = nodeCount;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link Specs}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public Specs build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link Specs}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Specs {
private final java.lang.String diskIops;
private final java.lang.String ebsVolumeType;
private final java.lang.String instanceSize;
private final java.lang.Number nodeCount;
/**
* 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.diskIops = software.amazon.jsii.Kernel.get(this, "diskIops", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ebsVolumeType = software.amazon.jsii.Kernel.get(this, "ebsVolumeType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.instanceSize = software.amazon.jsii.Kernel.get(this, "instanceSize", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.nodeCount = software.amazon.jsii.Kernel.get(this, "nodeCount", 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.diskIops = builder.diskIops;
this.ebsVolumeType = builder.ebsVolumeType;
this.instanceSize = builder.instanceSize;
this.nodeCount = builder.nodeCount;
}
@Override
public final java.lang.String getDiskIops() {
return this.diskIops;
}
@Override
public final java.lang.String getEbsVolumeType() {
return this.ebsVolumeType;
}
@Override
public final java.lang.String getInstanceSize() {
return this.instanceSize;
}
@Override
public final java.lang.Number getNodeCount() {
return this.nodeCount;
}
@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.getDiskIops() != null) {
data.set("diskIops", om.valueToTree(this.getDiskIops()));
}
if (this.getEbsVolumeType() != null) {
data.set("ebsVolumeType", om.valueToTree(this.getEbsVolumeType()));
}
if (this.getInstanceSize() != null) {
data.set("instanceSize", om.valueToTree(this.getInstanceSize()));
}
if (this.getNodeCount() != null) {
data.set("nodeCount", om.valueToTree(this.getNodeCount()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.Specs"));
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;
Specs.Jsii$Proxy that = (Specs.Jsii$Proxy) o;
if (this.diskIops != null ? !this.diskIops.equals(that.diskIops) : that.diskIops != null) return false;
if (this.ebsVolumeType != null ? !this.ebsVolumeType.equals(that.ebsVolumeType) : that.ebsVolumeType != null) return false;
if (this.instanceSize != null ? !this.instanceSize.equals(that.instanceSize) : that.instanceSize != null) return false;
return this.nodeCount != null ? this.nodeCount.equals(that.nodeCount) : that.nodeCount == null;
}
@Override
public final int hashCode() {
int result = this.diskIops != null ? this.diskIops.hashCode() : 0;
result = 31 * result + (this.ebsVolumeType != null ? this.ebsVolumeType.hashCode() : 0);
result = 31 * result + (this.instanceSize != null ? this.instanceSize.hashCode() : 0);
result = 31 * result + (this.nodeCount != null ? this.nodeCount.hashCode() : 0);
return result;
}
}
}