com.hashicorp.cdktf.providers.snowflake.database.DatabaseReplicationEnableToAccount Maven / Gradle / Ivy
Show all versions of cdktf-provider-snowflake Show documentation
package com.hashicorp.cdktf.providers.snowflake.database;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-08-03T03:24:50.315Z")
@software.amazon.jsii.Jsii(module = com.hashicorp.cdktf.providers.snowflake.$Module.class, fqn = "@cdktf/provider-snowflake.database.DatabaseReplicationEnableToAccount")
@software.amazon.jsii.Jsii.Proxy(DatabaseReplicationEnableToAccount.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface DatabaseReplicationEnableToAccount extends software.amazon.jsii.JsiiSerializable {
/**
* Specifies account identifier for which replication should be enabled. The account identifiers should be in the form of "<organization_name>"."<account_name>"
.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/database#account_identifier Database#account_identifier}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getAccountIdentifier();
/**
* Specifies if failover should be enabled for the specified account identifier.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/database#with_failover Database#with_failover}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Object getWithFailover() {
return null;
}
/**
* @return a {@link Builder} of {@link DatabaseReplicationEnableToAccount}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link DatabaseReplicationEnableToAccount}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String accountIdentifier;
java.lang.Object withFailover;
/**
* Sets the value of {@link DatabaseReplicationEnableToAccount#getAccountIdentifier}
* @param accountIdentifier Specifies account identifier for which replication should be enabled. The account identifiers should be in the form of "<organization_name>"."<account_name>"
. This parameter is required.
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/database#account_identifier Database#account_identifier}
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder accountIdentifier(java.lang.String accountIdentifier) {
this.accountIdentifier = accountIdentifier;
return this;
}
/**
* Sets the value of {@link DatabaseReplicationEnableToAccount#getWithFailover}
* @param withFailover Specifies if failover should be enabled for the specified account identifier.
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/database#with_failover Database#with_failover}
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder withFailover(java.lang.Boolean withFailover) {
this.withFailover = withFailover;
return this;
}
/**
* Sets the value of {@link DatabaseReplicationEnableToAccount#getWithFailover}
* @param withFailover Specifies if failover should be enabled for the specified account identifier.
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/database#with_failover Database#with_failover}
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder withFailover(com.hashicorp.cdktf.IResolvable withFailover) {
this.withFailover = withFailover;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link DatabaseReplicationEnableToAccount}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public DatabaseReplicationEnableToAccount build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link DatabaseReplicationEnableToAccount}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DatabaseReplicationEnableToAccount {
private final java.lang.String accountIdentifier;
private final java.lang.Object withFailover;
/**
* 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.accountIdentifier = software.amazon.jsii.Kernel.get(this, "accountIdentifier", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.withFailover = software.amazon.jsii.Kernel.get(this, "withFailover", software.amazon.jsii.NativeType.forClass(java.lang.Object.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.accountIdentifier = java.util.Objects.requireNonNull(builder.accountIdentifier, "accountIdentifier is required");
this.withFailover = builder.withFailover;
}
@Override
public final java.lang.String getAccountIdentifier() {
return this.accountIdentifier;
}
@Override
public final java.lang.Object getWithFailover() {
return this.withFailover;
}
@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("accountIdentifier", om.valueToTree(this.getAccountIdentifier()));
if (this.getWithFailover() != null) {
data.set("withFailover", om.valueToTree(this.getWithFailover()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdktf/provider-snowflake.database.DatabaseReplicationEnableToAccount"));
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;
DatabaseReplicationEnableToAccount.Jsii$Proxy that = (DatabaseReplicationEnableToAccount.Jsii$Proxy) o;
if (!accountIdentifier.equals(that.accountIdentifier)) return false;
return this.withFailover != null ? this.withFailover.equals(that.withFailover) : that.withFailover == null;
}
@Override
public final int hashCode() {
int result = this.accountIdentifier.hashCode();
result = 31 * result + (this.withFailover != null ? this.withFailover.hashCode() : 0);
return result;
}
}
}