org.mongodb.awscdk.resources.mongodbatlas.ServerlessInstanceConnectionStrings 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.94.0 (build b380f01)", date = "2024-02-05T16:04:31.958Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.ServerlessInstanceConnectionStrings")
@software.amazon.jsii.Jsii.Proxy(ServerlessInstanceConnectionStrings.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ServerlessInstanceConnectionStrings extends software.amazon.jsii.JsiiSerializable {
/**
* List of private endpoint connection strings that you can use to connect to this serverless instance through a private endpoint.
*
* This parameter returns only if you created a private endpoint for this serverless instance and it is AVAILABLE.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getPrivateEndpoint() {
return null;
}
/**
* Public connection string that you can use to connect to this serverless instance.
*
* This connection string uses the mongodb+srv://
protocol.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getStandardSrv() {
return null;
}
/**
* @return a {@link Builder} of {@link ServerlessInstanceConnectionStrings}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ServerlessInstanceConnectionStrings}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List privateEndpoint;
java.lang.String standardSrv;
/**
* Sets the value of {@link ServerlessInstanceConnectionStrings#getPrivateEndpoint}
* @param privateEndpoint List of private endpoint connection strings that you can use to connect to this serverless instance through a private endpoint.
* This parameter returns only if you created a private endpoint for this serverless instance and it is AVAILABLE.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder privateEndpoint(java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.ServerlessInstancePrivateEndpoint> privateEndpoint) {
this.privateEndpoint = (java.util.List)privateEndpoint;
return this;
}
/**
* Sets the value of {@link ServerlessInstanceConnectionStrings#getStandardSrv}
* @param standardSrv Public connection string that you can use to connect to this serverless instance.
* This connection string uses the mongodb+srv://
protocol.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder standardSrv(java.lang.String standardSrv) {
this.standardSrv = standardSrv;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ServerlessInstanceConnectionStrings}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ServerlessInstanceConnectionStrings build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ServerlessInstanceConnectionStrings}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ServerlessInstanceConnectionStrings {
private final java.util.List privateEndpoint;
private final java.lang.String standardSrv;
/**
* 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.privateEndpoint = software.amazon.jsii.Kernel.get(this, "privateEndpoint", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.ServerlessInstancePrivateEndpoint.class)));
this.standardSrv = software.amazon.jsii.Kernel.get(this, "standardSrv", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.privateEndpoint = (java.util.List)builder.privateEndpoint;
this.standardSrv = builder.standardSrv;
}
@Override
public final java.util.List getPrivateEndpoint() {
return this.privateEndpoint;
}
@Override
public final java.lang.String getStandardSrv() {
return this.standardSrv;
}
@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.getPrivateEndpoint() != null) {
data.set("privateEndpoint", om.valueToTree(this.getPrivateEndpoint()));
}
if (this.getStandardSrv() != null) {
data.set("standardSrv", om.valueToTree(this.getStandardSrv()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.ServerlessInstanceConnectionStrings"));
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;
ServerlessInstanceConnectionStrings.Jsii$Proxy that = (ServerlessInstanceConnectionStrings.Jsii$Proxy) o;
if (this.privateEndpoint != null ? !this.privateEndpoint.equals(that.privateEndpoint) : that.privateEndpoint != null) return false;
return this.standardSrv != null ? this.standardSrv.equals(that.standardSrv) : that.standardSrv == null;
}
@Override
public final int hashCode() {
int result = this.privateEndpoint != null ? this.privateEndpoint.hashCode() : 0;
result = 31 * result + (this.standardSrv != null ? this.standardSrv.hashCode() : 0);
return result;
}
}
}