org.mongodb.awscdk.resources.mongodbatlas.CfnNetworkPeeringProps Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* Returns, adds, edits, and removes network peering containers and peering connections.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.944Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnNetworkPeeringProps")
@software.amazon.jsii.Jsii.Proxy(CfnNetworkPeeringProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnNetworkPeeringProps extends software.amazon.jsii.JsiiSerializable {
/**
* Unique 24-hexadecimal digit string that identifies the MongoDB Cloud network container that contains the specified network peering connection.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getContainerId();
/**
* Unique 24-hexadecimal digit string that identifies your project.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getProjectId();
/**
* Unique string that identifies the VPC on Amazon Web Services (AWS) that you want to peer with the MongoDB Cloud VPC.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getVpcId();
/**
* Amazon Web Services (AWS) region where the Virtual Peering Connection (VPC) that you peered with the MongoDB Cloud VPC resides.
*
* The resource returns null if your VPC and the MongoDB Cloud VPC reside in the same region.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getAccepterRegionName() {
return null;
}
/**
* Unique twelve-digit string that identifies the Amazon Web Services (AWS) account that owns the VPC that you peered with the MongoDB Cloud VPC.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getAwsAccountId() {
return null;
}
/**
* The profile is defined in AWS Secret manager.
*
* See Secret Manager Profile setup.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getProfile() {
return null;
}
/**
* Internet Protocol (IP) addresses expressed in Classless Inter-Domain Routing (CIDR) notation of the VPC's subnet that you want to peer with the MongoDB Cloud VPC.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getRouteTableCidrBlock() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnNetworkPeeringProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnNetworkPeeringProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String containerId;
java.lang.String projectId;
java.lang.String vpcId;
java.lang.String accepterRegionName;
java.lang.String awsAccountId;
java.lang.String profile;
java.lang.String routeTableCidrBlock;
/**
* Sets the value of {@link CfnNetworkPeeringProps#getContainerId}
* @param containerId Unique 24-hexadecimal digit string that identifies the MongoDB Cloud network container that contains the specified network peering connection. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder containerId(java.lang.String containerId) {
this.containerId = containerId;
return this;
}
/**
* Sets the value of {@link CfnNetworkPeeringProps#getProjectId}
* @param projectId Unique 24-hexadecimal digit string that identifies your project. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectId(java.lang.String projectId) {
this.projectId = projectId;
return this;
}
/**
* Sets the value of {@link CfnNetworkPeeringProps#getVpcId}
* @param vpcId Unique string that identifies the VPC on Amazon Web Services (AWS) that you want to peer with the MongoDB Cloud VPC. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcId(java.lang.String vpcId) {
this.vpcId = vpcId;
return this;
}
/**
* Sets the value of {@link CfnNetworkPeeringProps#getAccepterRegionName}
* @param accepterRegionName Amazon Web Services (AWS) region where the Virtual Peering Connection (VPC) that you peered with the MongoDB Cloud VPC resides.
* The resource returns null if your VPC and the MongoDB Cloud VPC reside in the same region.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder accepterRegionName(java.lang.String accepterRegionName) {
this.accepterRegionName = accepterRegionName;
return this;
}
/**
* Sets the value of {@link CfnNetworkPeeringProps#getAwsAccountId}
* @param awsAccountId Unique twelve-digit string that identifies the Amazon Web Services (AWS) account that owns the VPC that you peered with the MongoDB Cloud VPC.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder awsAccountId(java.lang.String awsAccountId) {
this.awsAccountId = awsAccountId;
return this;
}
/**
* Sets the value of {@link CfnNetworkPeeringProps#getProfile}
* @param profile The profile is defined in AWS Secret manager.
* See Secret Manager Profile setup.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(java.lang.String profile) {
this.profile = profile;
return this;
}
/**
* Sets the value of {@link CfnNetworkPeeringProps#getRouteTableCidrBlock}
* @param routeTableCidrBlock Internet Protocol (IP) addresses expressed in Classless Inter-Domain Routing (CIDR) notation of the VPC's subnet that you want to peer with the MongoDB Cloud VPC.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder routeTableCidrBlock(java.lang.String routeTableCidrBlock) {
this.routeTableCidrBlock = routeTableCidrBlock;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnNetworkPeeringProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnNetworkPeeringProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnNetworkPeeringProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnNetworkPeeringProps {
private final java.lang.String containerId;
private final java.lang.String projectId;
private final java.lang.String vpcId;
private final java.lang.String accepterRegionName;
private final java.lang.String awsAccountId;
private final java.lang.String profile;
private final java.lang.String routeTableCidrBlock;
/**
* 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.containerId = software.amazon.jsii.Kernel.get(this, "containerId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.projectId = software.amazon.jsii.Kernel.get(this, "projectId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.vpcId = software.amazon.jsii.Kernel.get(this, "vpcId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.accepterRegionName = software.amazon.jsii.Kernel.get(this, "accepterRegionName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.awsAccountId = software.amazon.jsii.Kernel.get(this, "awsAccountId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.profile = software.amazon.jsii.Kernel.get(this, "profile", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.routeTableCidrBlock = software.amazon.jsii.Kernel.get(this, "routeTableCidrBlock", 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.containerId = java.util.Objects.requireNonNull(builder.containerId, "containerId is required");
this.projectId = java.util.Objects.requireNonNull(builder.projectId, "projectId is required");
this.vpcId = java.util.Objects.requireNonNull(builder.vpcId, "vpcId is required");
this.accepterRegionName = builder.accepterRegionName;
this.awsAccountId = builder.awsAccountId;
this.profile = builder.profile;
this.routeTableCidrBlock = builder.routeTableCidrBlock;
}
@Override
public final java.lang.String getContainerId() {
return this.containerId;
}
@Override
public final java.lang.String getProjectId() {
return this.projectId;
}
@Override
public final java.lang.String getVpcId() {
return this.vpcId;
}
@Override
public final java.lang.String getAccepterRegionName() {
return this.accepterRegionName;
}
@Override
public final java.lang.String getAwsAccountId() {
return this.awsAccountId;
}
@Override
public final java.lang.String getProfile() {
return this.profile;
}
@Override
public final java.lang.String getRouteTableCidrBlock() {
return this.routeTableCidrBlock;
}
@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();
data.set("containerId", om.valueToTree(this.getContainerId()));
data.set("projectId", om.valueToTree(this.getProjectId()));
data.set("vpcId", om.valueToTree(this.getVpcId()));
if (this.getAccepterRegionName() != null) {
data.set("accepterRegionName", om.valueToTree(this.getAccepterRegionName()));
}
if (this.getAwsAccountId() != null) {
data.set("awsAccountId", om.valueToTree(this.getAwsAccountId()));
}
if (this.getProfile() != null) {
data.set("profile", om.valueToTree(this.getProfile()));
}
if (this.getRouteTableCidrBlock() != null) {
data.set("routeTableCidrBlock", om.valueToTree(this.getRouteTableCidrBlock()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.CfnNetworkPeeringProps"));
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;
CfnNetworkPeeringProps.Jsii$Proxy that = (CfnNetworkPeeringProps.Jsii$Proxy) o;
if (!containerId.equals(that.containerId)) return false;
if (!projectId.equals(that.projectId)) return false;
if (!vpcId.equals(that.vpcId)) return false;
if (this.accepterRegionName != null ? !this.accepterRegionName.equals(that.accepterRegionName) : that.accepterRegionName != null) return false;
if (this.awsAccountId != null ? !this.awsAccountId.equals(that.awsAccountId) : that.awsAccountId != null) return false;
if (this.profile != null ? !this.profile.equals(that.profile) : that.profile != null) return false;
return this.routeTableCidrBlock != null ? this.routeTableCidrBlock.equals(that.routeTableCidrBlock) : that.routeTableCidrBlock == null;
}
@Override
public final int hashCode() {
int result = this.containerId.hashCode();
result = 31 * result + (this.projectId.hashCode());
result = 31 * result + (this.vpcId.hashCode());
result = 31 * result + (this.accepterRegionName != null ? this.accepterRegionName.hashCode() : 0);
result = 31 * result + (this.awsAccountId != null ? this.awsAccountId.hashCode() : 0);
result = 31 * result + (this.profile != null ? this.profile.hashCode() : 0);
result = 31 * result + (this.routeTableCidrBlock != null ? this.routeTableCidrBlock.hashCode() : 0);
return result;
}
}
}