com.aliyun.ros.cdk.polardb.datasource.DBClustersProps Maven / Gradle / Ivy
package com.aliyun.ros.cdk.polardb.datasource;
/**
* Properties for defining a DBClusters
.
*
* See https://www.alibabacloud.com/help/ros/developer-reference/datasource-polardb-dbclusters
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2024-12-13T06:45:10.629Z")
@software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.polardb.$Module.class, fqn = "@alicloud/ros-cdk-polardb.datasource.DBClustersProps")
@software.amazon.jsii.Jsii.Proxy(DBClustersProps.Jsii$Proxy.class)
public interface DBClustersProps extends software.amazon.jsii.JsiiSerializable {
/**
* Property dbClusterId: The ID of the cluster.
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDbClusterId() {
return null;
}
/**
* Property dbType: The database engine that the cluster runs.
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDbType() {
return null;
}
/**
* Property dbVersion: The version of the database engine that the cluster runs.
*
* The range of the MySQL version number is as follows:
* *** 5.6 * * *
* *** 5.7 * * *
* *** 8.0 * * *
* The value range of PostgreSQL version number is as follows:
* *** 11 * * *
* *** 14 * * *
* The Oracle version number is 11.
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDbVersion() {
return null;
}
/**
* Property description: The description of the cluster.
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDescription() {
return null;
}
/**
* Property expired: Indicates whether the cluster has expired.
*
* Valid values:
* true
* false
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getExpired() {
return null;
}
/**
* Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
*
* Valid values:
*
*
* - Never: Never refresh the datasource resource when the stack is updated.
* - Always: Always refresh the datasource resource when the stack is updated.
* Default is Never.
*
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getRefreshOptions() {
return null;
}
/**
* Property resourceGroupId: The ID of the resource group.
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getResourceGroupId() {
return null;
}
/**
* @return a {@link Builder} of {@link DBClustersProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link DBClustersProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object dbClusterId;
java.lang.Object dbType;
java.lang.Object dbVersion;
java.lang.Object description;
java.lang.Object expired;
java.lang.Object refreshOptions;
java.lang.Object resourceGroupId;
/**
* Sets the value of {@link DBClustersProps#getDbClusterId}
* @param dbClusterId Property dbClusterId: The ID of the cluster.
* @return {@code this}
*/
public Builder dbClusterId(java.lang.String dbClusterId) {
this.dbClusterId = dbClusterId;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDbClusterId}
* @param dbClusterId Property dbClusterId: The ID of the cluster.
* @return {@code this}
*/
public Builder dbClusterId(com.aliyun.ros.cdk.core.IResolvable dbClusterId) {
this.dbClusterId = dbClusterId;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDbType}
* @param dbType Property dbType: The database engine that the cluster runs.
* @return {@code this}
*/
public Builder dbType(java.lang.String dbType) {
this.dbType = dbType;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDbType}
* @param dbType Property dbType: The database engine that the cluster runs.
* @return {@code this}
*/
public Builder dbType(com.aliyun.ros.cdk.core.IResolvable dbType) {
this.dbType = dbType;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDbVersion}
* @param dbVersion Property dbVersion: The version of the database engine that the cluster runs.
* The range of the MySQL version number is as follows:
* *** 5.6 * * *
* *** 5.7 * * *
* *** 8.0 * * *
* The value range of PostgreSQL version number is as follows:
* *** 11 * * *
* *** 14 * * *
* The Oracle version number is 11.
* @return {@code this}
*/
public Builder dbVersion(java.lang.String dbVersion) {
this.dbVersion = dbVersion;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDbVersion}
* @param dbVersion Property dbVersion: The version of the database engine that the cluster runs.
* The range of the MySQL version number is as follows:
* *** 5.6 * * *
* *** 5.7 * * *
* *** 8.0 * * *
* The value range of PostgreSQL version number is as follows:
* *** 11 * * *
* *** 14 * * *
* The Oracle version number is 11.
* @return {@code this}
*/
public Builder dbVersion(com.aliyun.ros.cdk.core.IResolvable dbVersion) {
this.dbVersion = dbVersion;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDescription}
* @param description Property description: The description of the cluster.
* @return {@code this}
*/
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getDescription}
* @param description Property description: The description of the cluster.
* @return {@code this}
*/
public Builder description(com.aliyun.ros.cdk.core.IResolvable description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getExpired}
* @param expired Property expired: Indicates whether the cluster has expired.
* Valid values:
* true
* false
* @return {@code this}
*/
public Builder expired(java.lang.String expired) {
this.expired = expired;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getExpired}
* @param expired Property expired: Indicates whether the cluster has expired.
* Valid values:
* true
* false
* @return {@code this}
*/
public Builder expired(com.aliyun.ros.cdk.core.IResolvable expired) {
this.expired = expired;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getRefreshOptions}
* @param refreshOptions Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
* Valid values:
*
*
* - Never: Never refresh the datasource resource when the stack is updated.
* - Always: Always refresh the datasource resource when the stack is updated.
* Default is Never.
*
* @return {@code this}
*/
public Builder refreshOptions(java.lang.String refreshOptions) {
this.refreshOptions = refreshOptions;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getRefreshOptions}
* @param refreshOptions Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
* Valid values:
*
*
* - Never: Never refresh the datasource resource when the stack is updated.
* - Always: Always refresh the datasource resource when the stack is updated.
* Default is Never.
*
* @return {@code this}
*/
public Builder refreshOptions(com.aliyun.ros.cdk.core.IResolvable refreshOptions) {
this.refreshOptions = refreshOptions;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getResourceGroupId}
* @param resourceGroupId Property resourceGroupId: The ID of the resource group.
* @return {@code this}
*/
public Builder resourceGroupId(java.lang.String resourceGroupId) {
this.resourceGroupId = resourceGroupId;
return this;
}
/**
* Sets the value of {@link DBClustersProps#getResourceGroupId}
* @param resourceGroupId Property resourceGroupId: The ID of the resource group.
* @return {@code this}
*/
public Builder resourceGroupId(com.aliyun.ros.cdk.core.IResolvable resourceGroupId) {
this.resourceGroupId = resourceGroupId;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link DBClustersProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public DBClustersProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link DBClustersProps}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DBClustersProps {
private final java.lang.Object dbClusterId;
private final java.lang.Object dbType;
private final java.lang.Object dbVersion;
private final java.lang.Object description;
private final java.lang.Object expired;
private final java.lang.Object refreshOptions;
private final java.lang.Object resourceGroupId;
/**
* 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.dbClusterId = software.amazon.jsii.Kernel.get(this, "dbClusterId", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.dbType = software.amazon.jsii.Kernel.get(this, "dbType", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.dbVersion = software.amazon.jsii.Kernel.get(this, "dbVersion", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.expired = software.amazon.jsii.Kernel.get(this, "expired", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.refreshOptions = software.amazon.jsii.Kernel.get(this, "refreshOptions", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.resourceGroupId = software.amazon.jsii.Kernel.get(this, "resourceGroupId", 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.dbClusterId = builder.dbClusterId;
this.dbType = builder.dbType;
this.dbVersion = builder.dbVersion;
this.description = builder.description;
this.expired = builder.expired;
this.refreshOptions = builder.refreshOptions;
this.resourceGroupId = builder.resourceGroupId;
}
@Override
public final java.lang.Object getDbClusterId() {
return this.dbClusterId;
}
@Override
public final java.lang.Object getDbType() {
return this.dbType;
}
@Override
public final java.lang.Object getDbVersion() {
return this.dbVersion;
}
@Override
public final java.lang.Object getDescription() {
return this.description;
}
@Override
public final java.lang.Object getExpired() {
return this.expired;
}
@Override
public final java.lang.Object getRefreshOptions() {
return this.refreshOptions;
}
@Override
public final java.lang.Object getResourceGroupId() {
return this.resourceGroupId;
}
@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.getDbClusterId() != null) {
data.set("dbClusterId", om.valueToTree(this.getDbClusterId()));
}
if (this.getDbType() != null) {
data.set("dbType", om.valueToTree(this.getDbType()));
}
if (this.getDbVersion() != null) {
data.set("dbVersion", om.valueToTree(this.getDbVersion()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getExpired() != null) {
data.set("expired", om.valueToTree(this.getExpired()));
}
if (this.getRefreshOptions() != null) {
data.set("refreshOptions", om.valueToTree(this.getRefreshOptions()));
}
if (this.getResourceGroupId() != null) {
data.set("resourceGroupId", om.valueToTree(this.getResourceGroupId()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@alicloud/ros-cdk-polardb.datasource.DBClustersProps"));
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;
DBClustersProps.Jsii$Proxy that = (DBClustersProps.Jsii$Proxy) o;
if (this.dbClusterId != null ? !this.dbClusterId.equals(that.dbClusterId) : that.dbClusterId != null) return false;
if (this.dbType != null ? !this.dbType.equals(that.dbType) : that.dbType != null) return false;
if (this.dbVersion != null ? !this.dbVersion.equals(that.dbVersion) : that.dbVersion != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.expired != null ? !this.expired.equals(that.expired) : that.expired != null) return false;
if (this.refreshOptions != null ? !this.refreshOptions.equals(that.refreshOptions) : that.refreshOptions != null) return false;
return this.resourceGroupId != null ? this.resourceGroupId.equals(that.resourceGroupId) : that.resourceGroupId == null;
}
@Override
public final int hashCode() {
int result = this.dbClusterId != null ? this.dbClusterId.hashCode() : 0;
result = 31 * result + (this.dbType != null ? this.dbType.hashCode() : 0);
result = 31 * result + (this.dbVersion != null ? this.dbVersion.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.expired != null ? this.expired.hashCode() : 0);
result = 31 * result + (this.refreshOptions != null ? this.refreshOptions.hashCode() : 0);
result = 31 * result + (this.resourceGroupId != null ? this.resourceGroupId.hashCode() : 0);
return result;
}
}
}