org.mongodb.awscdk.resources.mongodbatlas.CfnFederatedDatabaseInstanceProps Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* Returns, adds, edits, and removes Federated Database Instances.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.930Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnFederatedDatabaseInstanceProps")
@software.amazon.jsii.Jsii.Proxy(CfnFederatedDatabaseInstanceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnFederatedDatabaseInstanceProps extends software.amazon.jsii.JsiiSerializable {
/**
* 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();
/**
* Human-readable label that identifies the data federation.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getTenantName();
/**
* Cloud provider linked to this data lake.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.CloudProviderConfig getCloudProviderConfig() {
return null;
}
/**
* Information about the cloud provider region to which the data lake routes client connections.
*
* MongoDB Cloud supports AWS only.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.DataProcessRegion getDataProcessRegion() {
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;
}
/**
* Flag that indicates whether this request should check if the requesting IAM role can read from the S3 bucket.
*
* AWS checks if the role can list the objects in the bucket before writing to it. Some IAM roles only need write permissions. This flag allows you to skip that check.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getSkipRoleValidation() {
return null;
}
/**
* Configuration information for each data store and its mapping to MongoDB Cloud databases.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.Storage getStorage() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnFederatedDatabaseInstanceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnFederatedDatabaseInstanceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String projectId;
java.lang.String tenantName;
org.mongodb.awscdk.resources.mongodbatlas.CloudProviderConfig cloudProviderConfig;
org.mongodb.awscdk.resources.mongodbatlas.DataProcessRegion dataProcessRegion;
java.lang.String profile;
java.lang.Boolean skipRoleValidation;
org.mongodb.awscdk.resources.mongodbatlas.Storage storage;
/**
* Sets the value of {@link CfnFederatedDatabaseInstanceProps#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 CfnFederatedDatabaseInstanceProps#getTenantName}
* @param tenantName Human-readable label that identifies the data federation. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tenantName(java.lang.String tenantName) {
this.tenantName = tenantName;
return this;
}
/**
* Sets the value of {@link CfnFederatedDatabaseInstanceProps#getCloudProviderConfig}
* @param cloudProviderConfig Cloud provider linked to this data lake.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cloudProviderConfig(org.mongodb.awscdk.resources.mongodbatlas.CloudProviderConfig cloudProviderConfig) {
this.cloudProviderConfig = cloudProviderConfig;
return this;
}
/**
* Sets the value of {@link CfnFederatedDatabaseInstanceProps#getDataProcessRegion}
* @param dataProcessRegion Information about the cloud provider region to which the data lake routes client connections.
* MongoDB Cloud supports AWS only.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dataProcessRegion(org.mongodb.awscdk.resources.mongodbatlas.DataProcessRegion dataProcessRegion) {
this.dataProcessRegion = dataProcessRegion;
return this;
}
/**
* Sets the value of {@link CfnFederatedDatabaseInstanceProps#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 CfnFederatedDatabaseInstanceProps#getSkipRoleValidation}
* @param skipRoleValidation Flag that indicates whether this request should check if the requesting IAM role can read from the S3 bucket.
* AWS checks if the role can list the objects in the bucket before writing to it. Some IAM roles only need write permissions. This flag allows you to skip that check.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder skipRoleValidation(java.lang.Boolean skipRoleValidation) {
this.skipRoleValidation = skipRoleValidation;
return this;
}
/**
* Sets the value of {@link CfnFederatedDatabaseInstanceProps#getStorage}
* @param storage Configuration information for each data store and its mapping to MongoDB Cloud databases.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder storage(org.mongodb.awscdk.resources.mongodbatlas.Storage storage) {
this.storage = storage;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnFederatedDatabaseInstanceProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnFederatedDatabaseInstanceProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnFederatedDatabaseInstanceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnFederatedDatabaseInstanceProps {
private final java.lang.String projectId;
private final java.lang.String tenantName;
private final org.mongodb.awscdk.resources.mongodbatlas.CloudProviderConfig cloudProviderConfig;
private final org.mongodb.awscdk.resources.mongodbatlas.DataProcessRegion dataProcessRegion;
private final java.lang.String profile;
private final java.lang.Boolean skipRoleValidation;
private final org.mongodb.awscdk.resources.mongodbatlas.Storage storage;
/**
* 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.projectId = software.amazon.jsii.Kernel.get(this, "projectId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.tenantName = software.amazon.jsii.Kernel.get(this, "tenantName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.cloudProviderConfig = software.amazon.jsii.Kernel.get(this, "cloudProviderConfig", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.CloudProviderConfig.class));
this.dataProcessRegion = software.amazon.jsii.Kernel.get(this, "dataProcessRegion", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.DataProcessRegion.class));
this.profile = software.amazon.jsii.Kernel.get(this, "profile", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.skipRoleValidation = software.amazon.jsii.Kernel.get(this, "skipRoleValidation", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.storage = software.amazon.jsii.Kernel.get(this, "storage", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.Storage.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.projectId = java.util.Objects.requireNonNull(builder.projectId, "projectId is required");
this.tenantName = java.util.Objects.requireNonNull(builder.tenantName, "tenantName is required");
this.cloudProviderConfig = builder.cloudProviderConfig;
this.dataProcessRegion = builder.dataProcessRegion;
this.profile = builder.profile;
this.skipRoleValidation = builder.skipRoleValidation;
this.storage = builder.storage;
}
@Override
public final java.lang.String getProjectId() {
return this.projectId;
}
@Override
public final java.lang.String getTenantName() {
return this.tenantName;
}
@Override
public final org.mongodb.awscdk.resources.mongodbatlas.CloudProviderConfig getCloudProviderConfig() {
return this.cloudProviderConfig;
}
@Override
public final org.mongodb.awscdk.resources.mongodbatlas.DataProcessRegion getDataProcessRegion() {
return this.dataProcessRegion;
}
@Override
public final java.lang.String getProfile() {
return this.profile;
}
@Override
public final java.lang.Boolean getSkipRoleValidation() {
return this.skipRoleValidation;
}
@Override
public final org.mongodb.awscdk.resources.mongodbatlas.Storage getStorage() {
return this.storage;
}
@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("projectId", om.valueToTree(this.getProjectId()));
data.set("tenantName", om.valueToTree(this.getTenantName()));
if (this.getCloudProviderConfig() != null) {
data.set("cloudProviderConfig", om.valueToTree(this.getCloudProviderConfig()));
}
if (this.getDataProcessRegion() != null) {
data.set("dataProcessRegion", om.valueToTree(this.getDataProcessRegion()));
}
if (this.getProfile() != null) {
data.set("profile", om.valueToTree(this.getProfile()));
}
if (this.getSkipRoleValidation() != null) {
data.set("skipRoleValidation", om.valueToTree(this.getSkipRoleValidation()));
}
if (this.getStorage() != null) {
data.set("storage", om.valueToTree(this.getStorage()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.CfnFederatedDatabaseInstanceProps"));
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;
CfnFederatedDatabaseInstanceProps.Jsii$Proxy that = (CfnFederatedDatabaseInstanceProps.Jsii$Proxy) o;
if (!projectId.equals(that.projectId)) return false;
if (!tenantName.equals(that.tenantName)) return false;
if (this.cloudProviderConfig != null ? !this.cloudProviderConfig.equals(that.cloudProviderConfig) : that.cloudProviderConfig != null) return false;
if (this.dataProcessRegion != null ? !this.dataProcessRegion.equals(that.dataProcessRegion) : that.dataProcessRegion != null) return false;
if (this.profile != null ? !this.profile.equals(that.profile) : that.profile != null) return false;
if (this.skipRoleValidation != null ? !this.skipRoleValidation.equals(that.skipRoleValidation) : that.skipRoleValidation != null) return false;
return this.storage != null ? this.storage.equals(that.storage) : that.storage == null;
}
@Override
public final int hashCode() {
int result = this.projectId.hashCode();
result = 31 * result + (this.tenantName.hashCode());
result = 31 * result + (this.cloudProviderConfig != null ? this.cloudProviderConfig.hashCode() : 0);
result = 31 * result + (this.dataProcessRegion != null ? this.dataProcessRegion.hashCode() : 0);
result = 31 * result + (this.profile != null ? this.profile.hashCode() : 0);
result = 31 * result + (this.skipRoleValidation != null ? this.skipRoleValidation.hashCode() : 0);
result = 31 * result + (this.storage != null ? this.storage.hashCode() : 0);
return result;
}
}
}