tech.condense.cdkconstructs.DatabaseInstanceStackProps Maven / Gradle / Ivy
Show all versions of cdkconstructs Show documentation
package tech.condense.cdkconstructs;
/**
* (experimental) Properties for the DatabaseInstanceStack.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-02T10:46:00.051Z")
@software.amazon.jsii.Jsii(module = tech.condense.cdkconstructs.$Module.class, fqn = "@condensetech/cdk-constructs.DatabaseInstanceStackProps")
@software.amazon.jsii.Jsii.Proxy(DatabaseInstanceStackProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface DatabaseInstanceStackProps extends software.amazon.jsii.JsiiSerializable, tech.condense.cdkconstructs.DatabaseInstanceProps, software.amazon.awscdk.StackProps {
/**
* (experimental) The monitoring configuration to apply to this stack.
*
* Default: - No monitoring.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable tech.condense.cdkconstructs.MonitoringFacadeProps getMonitoring() {
return null;
}
/**
* @return a {@link Builder} of {@link DatabaseInstanceStackProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link DatabaseInstanceStackProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
tech.condense.cdkconstructs.MonitoringFacadeProps monitoring;
software.amazon.awscdk.services.rds.IInstanceEngine engine;
tech.condense.cdkconstructs.INetworking networking;
java.lang.Number allocatedStorage;
software.amazon.awscdk.Duration backupRetention;
java.lang.String credentialsSecretName;
java.lang.String credentialsUsername;
java.lang.String databaseName;
java.lang.String instanceIdentifier;
software.amazon.awscdk.services.ec2.InstanceType instanceType;
java.lang.Boolean multiAz;
software.amazon.awscdk.RemovalPolicy removalPolicy;
java.lang.String securityGroupName;
software.amazon.awscdk.services.rds.StorageType storageType;
java.lang.Boolean analyticsReporting;
java.lang.Boolean crossRegionReferences;
java.lang.String description;
software.amazon.awscdk.Environment env;
software.amazon.awscdk.PermissionsBoundary permissionsBoundary;
java.lang.String stackName;
java.lang.Boolean suppressTemplateIndentation;
software.amazon.awscdk.IStackSynthesizer synthesizer;
java.util.Map tags;
java.lang.Boolean terminationProtection;
/**
* Sets the value of {@link DatabaseInstanceStackProps#getMonitoring}
* @param monitoring The monitoring configuration to apply to this stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder monitoring(tech.condense.cdkconstructs.MonitoringFacadeProps monitoring) {
this.monitoring = monitoring;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getEngine}
* @param engine The engine of the database instance. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder engine(software.amazon.awscdk.services.rds.IInstanceEngine engine) {
this.engine = engine;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getNetworking}
* @param networking The networking configuration for the database instance. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder networking(tech.condense.cdkconstructs.INetworking networking) {
this.networking = networking;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getAllocatedStorage}
* @param allocatedStorage The allocated storage of the database instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder allocatedStorage(java.lang.Number allocatedStorage) {
this.allocatedStorage = allocatedStorage;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getBackupRetention}
* @param backupRetention The backup retention period.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder backupRetention(software.amazon.awscdk.Duration backupRetention) {
this.backupRetention = backupRetention;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getCredentialsSecretName}
* @param credentialsSecretName The name of the secret that stores the credentials of the database.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder credentialsSecretName(java.lang.String credentialsSecretName) {
this.credentialsSecretName = credentialsSecretName;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getCredentialsUsername}
* @param credentialsUsername The username of the database.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder credentialsUsername(java.lang.String credentialsUsername) {
this.credentialsUsername = credentialsUsername;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getDatabaseName}
* @param databaseName The name of the database.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder databaseName(java.lang.String databaseName) {
this.databaseName = databaseName;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getInstanceIdentifier}
* @param instanceIdentifier The identifier of the database instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder instanceIdentifier(java.lang.String instanceIdentifier) {
this.instanceIdentifier = instanceIdentifier;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getInstanceType}
* @param instanceType The instance type of the database instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder instanceType(software.amazon.awscdk.services.ec2.InstanceType instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getMultiAz}
* @param multiAz If the database instance is multi-AZ.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder multiAz(java.lang.Boolean multiAz) {
this.multiAz = multiAz;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getRemovalPolicy}
* @param removalPolicy The removal policy to apply when the cluster is removed.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder removalPolicy(software.amazon.awscdk.RemovalPolicy removalPolicy) {
this.removalPolicy = removalPolicy;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getSecurityGroupName}
* @param securityGroupName The name of the security group.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder securityGroupName(java.lang.String securityGroupName) {
this.securityGroupName = securityGroupName;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getStorageType}
* @param storageType The storage type of the database instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder storageType(software.amazon.awscdk.services.rds.StorageType storageType) {
this.storageType = storageType;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getAnalyticsReporting}
* @param analyticsReporting Include runtime versioning information in this Stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder analyticsReporting(java.lang.Boolean analyticsReporting) {
this.analyticsReporting = analyticsReporting;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getCrossRegionReferences}
* @param crossRegionReferences Enable this flag to allow native cross region stack references.
* Enabling this will create a CloudFormation custom resource
* in both the producing stack and consuming stack in order to perform the export/import
*
* This feature is currently experimental
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder crossRegionReferences(java.lang.Boolean crossRegionReferences) {
this.crossRegionReferences = crossRegionReferences;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getDescription}
* @param description A description of the stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getEnv}
* @param env The AWS environment (account/region) where this stack will be deployed.
* Set the region
/account
fields of env
to either a concrete value to
* select the indicated environment (recommended for production stacks), or to
* the values of environment variables
* CDK_DEFAULT_REGION
/CDK_DEFAULT_ACCOUNT
to let the target environment
* depend on the AWS credentials/configuration that the CDK CLI is executed
* under (recommended for development stacks).
*
* If the Stack
is instantiated inside a Stage
, any undefined
* region
/account
fields from env
will default to the same field on the
* encompassing Stage
, if configured there.
*
* If either region
or account
are not set nor inherited from Stage
, the
* Stack will be considered "environment-agnostic"". Environment-agnostic
* stacks can be deployed to any environment but may not be able to take
* advantage of all features of the CDK. For example, they will not be able to
* use environmental context lookups such as ec2.Vpc.fromLookup
and will not
* automatically translate Service Principals to the right format based on the
* environment's AWS partition, and other such enhancements.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder env(software.amazon.awscdk.Environment env) {
this.env = env;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getPermissionsBoundary}
* @param permissionsBoundary Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder permissionsBoundary(software.amazon.awscdk.PermissionsBoundary permissionsBoundary) {
this.permissionsBoundary = permissionsBoundary;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getStackName}
* @param stackName Name to deploy the stack with.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder stackName(java.lang.String stackName) {
this.stackName = stackName;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getSuppressTemplateIndentation}
* @param suppressTemplateIndentation Enable this flag to suppress indentation in generated CloudFormation templates.
* If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation
* context key will be used. If that is not specified, then the
* default value false
will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder suppressTemplateIndentation(java.lang.Boolean suppressTemplateIndentation) {
this.suppressTemplateIndentation = suppressTemplateIndentation;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getSynthesizer}
* @param synthesizer Synthesis method to use while deploying this stack.
* The Stack Synthesizer controls aspects of synthesis and deployment,
* like how assets are referenced and what IAM roles to use. For more
* information, see the README of the main CDK package.
*
* If not specified, the defaultStackSynthesizer
from App
will be used.
* If that is not specified, DefaultStackSynthesizer
is used if
* @aws-cdk/core:newStyleStackSynthesis
is set to true
or the CDK major
* version is v2. In CDK v1 LegacyStackSynthesizer
is the default if no
* other synthesizer is specified.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder synthesizer(software.amazon.awscdk.IStackSynthesizer synthesizer) {
this.synthesizer = synthesizer;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getTags}
* @param tags Stack tags that will be applied to all the taggable resources and the stack itself.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(java.util.Map tags) {
this.tags = tags;
return this;
}
/**
* Sets the value of {@link DatabaseInstanceStackProps#getTerminationProtection}
* @param terminationProtection Whether to enable termination protection for this stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder terminationProtection(java.lang.Boolean terminationProtection) {
this.terminationProtection = terminationProtection;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link DatabaseInstanceStackProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public DatabaseInstanceStackProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link DatabaseInstanceStackProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DatabaseInstanceStackProps {
private final tech.condense.cdkconstructs.MonitoringFacadeProps monitoring;
private final software.amazon.awscdk.services.rds.IInstanceEngine engine;
private final tech.condense.cdkconstructs.INetworking networking;
private final java.lang.Number allocatedStorage;
private final software.amazon.awscdk.Duration backupRetention;
private final java.lang.String credentialsSecretName;
private final java.lang.String credentialsUsername;
private final java.lang.String databaseName;
private final java.lang.String instanceIdentifier;
private final software.amazon.awscdk.services.ec2.InstanceType instanceType;
private final java.lang.Boolean multiAz;
private final software.amazon.awscdk.RemovalPolicy removalPolicy;
private final java.lang.String securityGroupName;
private final software.amazon.awscdk.services.rds.StorageType storageType;
private final java.lang.Boolean analyticsReporting;
private final java.lang.Boolean crossRegionReferences;
private final java.lang.String description;
private final software.amazon.awscdk.Environment env;
private final software.amazon.awscdk.PermissionsBoundary permissionsBoundary;
private final java.lang.String stackName;
private final java.lang.Boolean suppressTemplateIndentation;
private final software.amazon.awscdk.IStackSynthesizer synthesizer;
private final java.util.Map tags;
private final java.lang.Boolean terminationProtection;
/**
* 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.monitoring = software.amazon.jsii.Kernel.get(this, "monitoring", software.amazon.jsii.NativeType.forClass(tech.condense.cdkconstructs.MonitoringFacadeProps.class));
this.engine = software.amazon.jsii.Kernel.get(this, "engine", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.rds.IInstanceEngine.class));
this.networking = software.amazon.jsii.Kernel.get(this, "networking", software.amazon.jsii.NativeType.forClass(tech.condense.cdkconstructs.INetworking.class));
this.allocatedStorage = software.amazon.jsii.Kernel.get(this, "allocatedStorage", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.backupRetention = software.amazon.jsii.Kernel.get(this, "backupRetention", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class));
this.credentialsSecretName = software.amazon.jsii.Kernel.get(this, "credentialsSecretName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.credentialsUsername = software.amazon.jsii.Kernel.get(this, "credentialsUsername", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.databaseName = software.amazon.jsii.Kernel.get(this, "databaseName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.instanceIdentifier = software.amazon.jsii.Kernel.get(this, "instanceIdentifier", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InstanceType.class));
this.multiAz = software.amazon.jsii.Kernel.get(this, "multiAz", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.removalPolicy = software.amazon.jsii.Kernel.get(this, "removalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.RemovalPolicy.class));
this.securityGroupName = software.amazon.jsii.Kernel.get(this, "securityGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.storageType = software.amazon.jsii.Kernel.get(this, "storageType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.rds.StorageType.class));
this.analyticsReporting = software.amazon.jsii.Kernel.get(this, "analyticsReporting", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.crossRegionReferences = software.amazon.jsii.Kernel.get(this, "crossRegionReferences", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.env = software.amazon.jsii.Kernel.get(this, "env", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Environment.class));
this.permissionsBoundary = software.amazon.jsii.Kernel.get(this, "permissionsBoundary", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.PermissionsBoundary.class));
this.stackName = software.amazon.jsii.Kernel.get(this, "stackName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.suppressTemplateIndentation = software.amazon.jsii.Kernel.get(this, "suppressTemplateIndentation", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.synthesizer = software.amazon.jsii.Kernel.get(this, "synthesizer", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.IStackSynthesizer.class));
this.tags = software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.terminationProtection = software.amazon.jsii.Kernel.get(this, "terminationProtection", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.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.monitoring = builder.monitoring;
this.engine = java.util.Objects.requireNonNull(builder.engine, "engine is required");
this.networking = java.util.Objects.requireNonNull(builder.networking, "networking is required");
this.allocatedStorage = builder.allocatedStorage;
this.backupRetention = builder.backupRetention;
this.credentialsSecretName = builder.credentialsSecretName;
this.credentialsUsername = builder.credentialsUsername;
this.databaseName = builder.databaseName;
this.instanceIdentifier = builder.instanceIdentifier;
this.instanceType = builder.instanceType;
this.multiAz = builder.multiAz;
this.removalPolicy = builder.removalPolicy;
this.securityGroupName = builder.securityGroupName;
this.storageType = builder.storageType;
this.analyticsReporting = builder.analyticsReporting;
this.crossRegionReferences = builder.crossRegionReferences;
this.description = builder.description;
this.env = builder.env;
this.permissionsBoundary = builder.permissionsBoundary;
this.stackName = builder.stackName;
this.suppressTemplateIndentation = builder.suppressTemplateIndentation;
this.synthesizer = builder.synthesizer;
this.tags = builder.tags;
this.terminationProtection = builder.terminationProtection;
}
@Override
public final tech.condense.cdkconstructs.MonitoringFacadeProps getMonitoring() {
return this.monitoring;
}
@Override
public final software.amazon.awscdk.services.rds.IInstanceEngine getEngine() {
return this.engine;
}
@Override
public final tech.condense.cdkconstructs.INetworking getNetworking() {
return this.networking;
}
@Override
public final java.lang.Number getAllocatedStorage() {
return this.allocatedStorage;
}
@Override
public final software.amazon.awscdk.Duration getBackupRetention() {
return this.backupRetention;
}
@Override
public final java.lang.String getCredentialsSecretName() {
return this.credentialsSecretName;
}
@Override
public final java.lang.String getCredentialsUsername() {
return this.credentialsUsername;
}
@Override
public final java.lang.String getDatabaseName() {
return this.databaseName;
}
@Override
public final java.lang.String getInstanceIdentifier() {
return this.instanceIdentifier;
}
@Override
public final software.amazon.awscdk.services.ec2.InstanceType getInstanceType() {
return this.instanceType;
}
@Override
public final java.lang.Boolean getMultiAz() {
return this.multiAz;
}
@Override
public final software.amazon.awscdk.RemovalPolicy getRemovalPolicy() {
return this.removalPolicy;
}
@Override
public final java.lang.String getSecurityGroupName() {
return this.securityGroupName;
}
@Override
public final software.amazon.awscdk.services.rds.StorageType getStorageType() {
return this.storageType;
}
@Override
public final java.lang.Boolean getAnalyticsReporting() {
return this.analyticsReporting;
}
@Override
public final java.lang.Boolean getCrossRegionReferences() {
return this.crossRegionReferences;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final software.amazon.awscdk.Environment getEnv() {
return this.env;
}
@Override
public final software.amazon.awscdk.PermissionsBoundary getPermissionsBoundary() {
return this.permissionsBoundary;
}
@Override
public final java.lang.String getStackName() {
return this.stackName;
}
@Override
public final java.lang.Boolean getSuppressTemplateIndentation() {
return this.suppressTemplateIndentation;
}
@Override
public final software.amazon.awscdk.IStackSynthesizer getSynthesizer() {
return this.synthesizer;
}
@Override
public final java.util.Map getTags() {
return this.tags;
}
@Override
public final java.lang.Boolean getTerminationProtection() {
return this.terminationProtection;
}
@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.getMonitoring() != null) {
data.set("monitoring", om.valueToTree(this.getMonitoring()));
}
data.set("engine", om.valueToTree(this.getEngine()));
data.set("networking", om.valueToTree(this.getNetworking()));
if (this.getAllocatedStorage() != null) {
data.set("allocatedStorage", om.valueToTree(this.getAllocatedStorage()));
}
if (this.getBackupRetention() != null) {
data.set("backupRetention", om.valueToTree(this.getBackupRetention()));
}
if (this.getCredentialsSecretName() != null) {
data.set("credentialsSecretName", om.valueToTree(this.getCredentialsSecretName()));
}
if (this.getCredentialsUsername() != null) {
data.set("credentialsUsername", om.valueToTree(this.getCredentialsUsername()));
}
if (this.getDatabaseName() != null) {
data.set("databaseName", om.valueToTree(this.getDatabaseName()));
}
if (this.getInstanceIdentifier() != null) {
data.set("instanceIdentifier", om.valueToTree(this.getInstanceIdentifier()));
}
if (this.getInstanceType() != null) {
data.set("instanceType", om.valueToTree(this.getInstanceType()));
}
if (this.getMultiAz() != null) {
data.set("multiAz", om.valueToTree(this.getMultiAz()));
}
if (this.getRemovalPolicy() != null) {
data.set("removalPolicy", om.valueToTree(this.getRemovalPolicy()));
}
if (this.getSecurityGroupName() != null) {
data.set("securityGroupName", om.valueToTree(this.getSecurityGroupName()));
}
if (this.getStorageType() != null) {
data.set("storageType", om.valueToTree(this.getStorageType()));
}
if (this.getAnalyticsReporting() != null) {
data.set("analyticsReporting", om.valueToTree(this.getAnalyticsReporting()));
}
if (this.getCrossRegionReferences() != null) {
data.set("crossRegionReferences", om.valueToTree(this.getCrossRegionReferences()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getEnv() != null) {
data.set("env", om.valueToTree(this.getEnv()));
}
if (this.getPermissionsBoundary() != null) {
data.set("permissionsBoundary", om.valueToTree(this.getPermissionsBoundary()));
}
if (this.getStackName() != null) {
data.set("stackName", om.valueToTree(this.getStackName()));
}
if (this.getSuppressTemplateIndentation() != null) {
data.set("suppressTemplateIndentation", om.valueToTree(this.getSuppressTemplateIndentation()));
}
if (this.getSynthesizer() != null) {
data.set("synthesizer", om.valueToTree(this.getSynthesizer()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
if (this.getTerminationProtection() != null) {
data.set("terminationProtection", om.valueToTree(this.getTerminationProtection()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@condensetech/cdk-constructs.DatabaseInstanceStackProps"));
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;
DatabaseInstanceStackProps.Jsii$Proxy that = (DatabaseInstanceStackProps.Jsii$Proxy) o;
if (this.monitoring != null ? !this.monitoring.equals(that.monitoring) : that.monitoring != null) return false;
if (!engine.equals(that.engine)) return false;
if (!networking.equals(that.networking)) return false;
if (this.allocatedStorage != null ? !this.allocatedStorage.equals(that.allocatedStorage) : that.allocatedStorage != null) return false;
if (this.backupRetention != null ? !this.backupRetention.equals(that.backupRetention) : that.backupRetention != null) return false;
if (this.credentialsSecretName != null ? !this.credentialsSecretName.equals(that.credentialsSecretName) : that.credentialsSecretName != null) return false;
if (this.credentialsUsername != null ? !this.credentialsUsername.equals(that.credentialsUsername) : that.credentialsUsername != null) return false;
if (this.databaseName != null ? !this.databaseName.equals(that.databaseName) : that.databaseName != null) return false;
if (this.instanceIdentifier != null ? !this.instanceIdentifier.equals(that.instanceIdentifier) : that.instanceIdentifier != null) return false;
if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false;
if (this.multiAz != null ? !this.multiAz.equals(that.multiAz) : that.multiAz != null) return false;
if (this.removalPolicy != null ? !this.removalPolicy.equals(that.removalPolicy) : that.removalPolicy != null) return false;
if (this.securityGroupName != null ? !this.securityGroupName.equals(that.securityGroupName) : that.securityGroupName != null) return false;
if (this.storageType != null ? !this.storageType.equals(that.storageType) : that.storageType != null) return false;
if (this.analyticsReporting != null ? !this.analyticsReporting.equals(that.analyticsReporting) : that.analyticsReporting != null) return false;
if (this.crossRegionReferences != null ? !this.crossRegionReferences.equals(that.crossRegionReferences) : that.crossRegionReferences != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.env != null ? !this.env.equals(that.env) : that.env != null) return false;
if (this.permissionsBoundary != null ? !this.permissionsBoundary.equals(that.permissionsBoundary) : that.permissionsBoundary != null) return false;
if (this.stackName != null ? !this.stackName.equals(that.stackName) : that.stackName != null) return false;
if (this.suppressTemplateIndentation != null ? !this.suppressTemplateIndentation.equals(that.suppressTemplateIndentation) : that.suppressTemplateIndentation != null) return false;
if (this.synthesizer != null ? !this.synthesizer.equals(that.synthesizer) : that.synthesizer != null) return false;
if (this.tags != null ? !this.tags.equals(that.tags) : that.tags != null) return false;
return this.terminationProtection != null ? this.terminationProtection.equals(that.terminationProtection) : that.terminationProtection == null;
}
@Override
public final int hashCode() {
int result = this.monitoring != null ? this.monitoring.hashCode() : 0;
result = 31 * result + (this.engine.hashCode());
result = 31 * result + (this.networking.hashCode());
result = 31 * result + (this.allocatedStorage != null ? this.allocatedStorage.hashCode() : 0);
result = 31 * result + (this.backupRetention != null ? this.backupRetention.hashCode() : 0);
result = 31 * result + (this.credentialsSecretName != null ? this.credentialsSecretName.hashCode() : 0);
result = 31 * result + (this.credentialsUsername != null ? this.credentialsUsername.hashCode() : 0);
result = 31 * result + (this.databaseName != null ? this.databaseName.hashCode() : 0);
result = 31 * result + (this.instanceIdentifier != null ? this.instanceIdentifier.hashCode() : 0);
result = 31 * result + (this.instanceType != null ? this.instanceType.hashCode() : 0);
result = 31 * result + (this.multiAz != null ? this.multiAz.hashCode() : 0);
result = 31 * result + (this.removalPolicy != null ? this.removalPolicy.hashCode() : 0);
result = 31 * result + (this.securityGroupName != null ? this.securityGroupName.hashCode() : 0);
result = 31 * result + (this.storageType != null ? this.storageType.hashCode() : 0);
result = 31 * result + (this.analyticsReporting != null ? this.analyticsReporting.hashCode() : 0);
result = 31 * result + (this.crossRegionReferences != null ? this.crossRegionReferences.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.env != null ? this.env.hashCode() : 0);
result = 31 * result + (this.permissionsBoundary != null ? this.permissionsBoundary.hashCode() : 0);
result = 31 * result + (this.stackName != null ? this.stackName.hashCode() : 0);
result = 31 * result + (this.suppressTemplateIndentation != null ? this.suppressTemplateIndentation.hashCode() : 0);
result = 31 * result + (this.synthesizer != null ? this.synthesizer.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
result = 31 * result + (this.terminationProtection != null ? this.terminationProtection.hashCode() : 0);
return result;
}
}
}