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

org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfig Maven / Gradle / Ivy

There is a newer version: 3.9.0
Show newest version
package org.mongodb.awscdk.resources.mongodbatlas;

/**
 * Hardware specifications for nodes set for a given region.
 * 

* Each regionConfigs object describes the region's priority in elections and the number and type of MongoDB nodes that MongoDB Cloud deploys to the region. Each regionConfigs object must have either an analyticsSpecs object, electableSpecs object, or readOnlySpecs object. Tenant clusters only require electableSpecs. Dedicated clusters can specify any of these specifications, but must have at least one electableSpecs object within a replicationSpec. Every hardware specification must use the same instanceSize. *

* Example: *

* If you set "replicationSpecs[n].regionConfigs[m].analyticsSpecs.instanceSize" : "M30", set "replicationSpecs[n].regionConfigs[m].electableSpecs.instanceSize" : "M30"if you have electable nodes and"replicationSpecs[n].regionConfigs[m].readOnlySpecs.instanceSize" : "M30" if you have read-only nodes.", */ @javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.851Z") @software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.AdvancedRegionConfig") @software.amazon.jsii.Jsii.Proxy(AdvancedRegionConfig.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public interface AdvancedRegionConfig extends software.amazon.jsii.JsiiSerializable { /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling getAnalyticsAutoScaling() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.Specs getAnalyticsSpecs() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling getAutoScaling() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getBackingProviderName() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.Specs getElectableSpecs() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getPriority() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfigProviderName getProviderName() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.Specs getReadOnlySpecs() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getRegionName() { return null; } /** * @return a {@link Builder} of {@link AdvancedRegionConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link AdvancedRegionConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling analyticsAutoScaling; org.mongodb.awscdk.resources.mongodbatlas.Specs analyticsSpecs; org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling autoScaling; java.lang.String backingProviderName; org.mongodb.awscdk.resources.mongodbatlas.Specs electableSpecs; java.lang.Number priority; org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfigProviderName providerName; org.mongodb.awscdk.resources.mongodbatlas.Specs readOnlySpecs; java.lang.String regionName; /** * Sets the value of {@link AdvancedRegionConfig#getAnalyticsAutoScaling} * @param analyticsAutoScaling the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder analyticsAutoScaling(org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling analyticsAutoScaling) { this.analyticsAutoScaling = analyticsAutoScaling; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getAnalyticsSpecs} * @param analyticsSpecs the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder analyticsSpecs(org.mongodb.awscdk.resources.mongodbatlas.Specs analyticsSpecs) { this.analyticsSpecs = analyticsSpecs; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getAutoScaling} * @param autoScaling the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder autoScaling(org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling autoScaling) { this.autoScaling = autoScaling; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getBackingProviderName} * @param backingProviderName the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder backingProviderName(java.lang.String backingProviderName) { this.backingProviderName = backingProviderName; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getElectableSpecs} * @param electableSpecs the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder electableSpecs(org.mongodb.awscdk.resources.mongodbatlas.Specs electableSpecs) { this.electableSpecs = electableSpecs; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getPriority} * @param priority the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder priority(java.lang.Number priority) { this.priority = priority; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getProviderName} * @param providerName the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder providerName(org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfigProviderName providerName) { this.providerName = providerName; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getReadOnlySpecs} * @param readOnlySpecs the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder readOnlySpecs(org.mongodb.awscdk.resources.mongodbatlas.Specs readOnlySpecs) { this.readOnlySpecs = readOnlySpecs; return this; } /** * Sets the value of {@link AdvancedRegionConfig#getRegionName} * @param regionName the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder regionName(java.lang.String regionName) { this.regionName = regionName; return this; } /** * Builds the configured instance. * @return a new instance of {@link AdvancedRegionConfig} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public AdvancedRegionConfig build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link AdvancedRegionConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AdvancedRegionConfig { private final org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling analyticsAutoScaling; private final org.mongodb.awscdk.resources.mongodbatlas.Specs analyticsSpecs; private final org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling autoScaling; private final java.lang.String backingProviderName; private final org.mongodb.awscdk.resources.mongodbatlas.Specs electableSpecs; private final java.lang.Number priority; private final org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfigProviderName providerName; private final org.mongodb.awscdk.resources.mongodbatlas.Specs readOnlySpecs; private final java.lang.String regionName; /** * 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.analyticsAutoScaling = software.amazon.jsii.Kernel.get(this, "analyticsAutoScaling", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling.class)); this.analyticsSpecs = software.amazon.jsii.Kernel.get(this, "analyticsSpecs", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.Specs.class)); this.autoScaling = software.amazon.jsii.Kernel.get(this, "autoScaling", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling.class)); this.backingProviderName = software.amazon.jsii.Kernel.get(this, "backingProviderName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.electableSpecs = software.amazon.jsii.Kernel.get(this, "electableSpecs", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.Specs.class)); this.priority = software.amazon.jsii.Kernel.get(this, "priority", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.providerName = software.amazon.jsii.Kernel.get(this, "providerName", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfigProviderName.class)); this.readOnlySpecs = software.amazon.jsii.Kernel.get(this, "readOnlySpecs", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.Specs.class)); this.regionName = software.amazon.jsii.Kernel.get(this, "regionName", software.amazon.jsii.NativeType.forClass(java.lang.String.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.analyticsAutoScaling = builder.analyticsAutoScaling; this.analyticsSpecs = builder.analyticsSpecs; this.autoScaling = builder.autoScaling; this.backingProviderName = builder.backingProviderName; this.electableSpecs = builder.electableSpecs; this.priority = builder.priority; this.providerName = builder.providerName; this.readOnlySpecs = builder.readOnlySpecs; this.regionName = builder.regionName; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling getAnalyticsAutoScaling() { return this.analyticsAutoScaling; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.Specs getAnalyticsSpecs() { return this.analyticsSpecs; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.AdvancedAutoScaling getAutoScaling() { return this.autoScaling; } @Override public final java.lang.String getBackingProviderName() { return this.backingProviderName; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.Specs getElectableSpecs() { return this.electableSpecs; } @Override public final java.lang.Number getPriority() { return this.priority; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.AdvancedRegionConfigProviderName getProviderName() { return this.providerName; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.Specs getReadOnlySpecs() { return this.readOnlySpecs; } @Override public final java.lang.String getRegionName() { return this.regionName; } @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.getAnalyticsAutoScaling() != null) { data.set("analyticsAutoScaling", om.valueToTree(this.getAnalyticsAutoScaling())); } if (this.getAnalyticsSpecs() != null) { data.set("analyticsSpecs", om.valueToTree(this.getAnalyticsSpecs())); } if (this.getAutoScaling() != null) { data.set("autoScaling", om.valueToTree(this.getAutoScaling())); } if (this.getBackingProviderName() != null) { data.set("backingProviderName", om.valueToTree(this.getBackingProviderName())); } if (this.getElectableSpecs() != null) { data.set("electableSpecs", om.valueToTree(this.getElectableSpecs())); } if (this.getPriority() != null) { data.set("priority", om.valueToTree(this.getPriority())); } if (this.getProviderName() != null) { data.set("providerName", om.valueToTree(this.getProviderName())); } if (this.getReadOnlySpecs() != null) { data.set("readOnlySpecs", om.valueToTree(this.getReadOnlySpecs())); } if (this.getRegionName() != null) { data.set("regionName", om.valueToTree(this.getRegionName())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.AdvancedRegionConfig")); 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; AdvancedRegionConfig.Jsii$Proxy that = (AdvancedRegionConfig.Jsii$Proxy) o; if (this.analyticsAutoScaling != null ? !this.analyticsAutoScaling.equals(that.analyticsAutoScaling) : that.analyticsAutoScaling != null) return false; if (this.analyticsSpecs != null ? !this.analyticsSpecs.equals(that.analyticsSpecs) : that.analyticsSpecs != null) return false; if (this.autoScaling != null ? !this.autoScaling.equals(that.autoScaling) : that.autoScaling != null) return false; if (this.backingProviderName != null ? !this.backingProviderName.equals(that.backingProviderName) : that.backingProviderName != null) return false; if (this.electableSpecs != null ? !this.electableSpecs.equals(that.electableSpecs) : that.electableSpecs != null) return false; if (this.priority != null ? !this.priority.equals(that.priority) : that.priority != null) return false; if (this.providerName != null ? !this.providerName.equals(that.providerName) : that.providerName != null) return false; if (this.readOnlySpecs != null ? !this.readOnlySpecs.equals(that.readOnlySpecs) : that.readOnlySpecs != null) return false; return this.regionName != null ? this.regionName.equals(that.regionName) : that.regionName == null; } @Override public final int hashCode() { int result = this.analyticsAutoScaling != null ? this.analyticsAutoScaling.hashCode() : 0; result = 31 * result + (this.analyticsSpecs != null ? this.analyticsSpecs.hashCode() : 0); result = 31 * result + (this.autoScaling != null ? this.autoScaling.hashCode() : 0); result = 31 * result + (this.backingProviderName != null ? this.backingProviderName.hashCode() : 0); result = 31 * result + (this.electableSpecs != null ? this.electableSpecs.hashCode() : 0); result = 31 * result + (this.priority != null ? this.priority.hashCode() : 0); result = 31 * result + (this.providerName != null ? this.providerName.hashCode() : 0); result = 31 * result + (this.readOnlySpecs != null ? this.readOnlySpecs.hashCode() : 0); result = 31 * result + (this.regionName != null ? this.regionName.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy