com.aliyun.ros.cdk.polardb.datasource.RosDBNodeClassesProps Maven / Gradle / Ivy
Show all versions of ros-cdk-polardb Show documentation
package com.aliyun.ros.cdk.polardb.datasource;
/**
* Properties for defining a RosDBNodeClasses
.
*
* See https://www.alibabacloud.com/help/ros/developer-reference/datasource-polardb-dbnodeclasses
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2024-12-13T06:45:10.655Z")
@software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.polardb.$Module.class, fqn = "@alicloud/ros-cdk-polardb.datasource.RosDBNodeClassesProps")
@software.amazon.jsii.Jsii.Proxy(RosDBNodeClassesProps.Jsii$Proxy.class)
public interface RosDBNodeClassesProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@org.jetbrains.annotations.NotNull java.lang.Object getPayType();
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDbNodeClass() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDbType() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDbVersion() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getRefreshOptions() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getZoneId() {
return null;
}
/**
* @return a {@link Builder} of {@link RosDBNodeClassesProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link RosDBNodeClassesProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object payType;
java.lang.Object dbNodeClass;
java.lang.Object dbType;
java.lang.Object dbVersion;
java.lang.Object refreshOptions;
java.lang.Object zoneId;
/**
* Sets the value of {@link RosDBNodeClassesProps#getPayType}
* @param payType the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder payType(java.lang.String payType) {
this.payType = payType;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getPayType}
* @param payType the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder payType(com.aliyun.ros.cdk.core.IResolvable payType) {
this.payType = payType;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getDbNodeClass}
* @param dbNodeClass the value to be set.
* @return {@code this}
*/
public Builder dbNodeClass(java.lang.String dbNodeClass) {
this.dbNodeClass = dbNodeClass;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getDbNodeClass}
* @param dbNodeClass the value to be set.
* @return {@code this}
*/
public Builder dbNodeClass(com.aliyun.ros.cdk.core.IResolvable dbNodeClass) {
this.dbNodeClass = dbNodeClass;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getDbType}
* @param dbType the value to be set.
* @return {@code this}
*/
public Builder dbType(java.lang.String dbType) {
this.dbType = dbType;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getDbType}
* @param dbType the value to be set.
* @return {@code this}
*/
public Builder dbType(com.aliyun.ros.cdk.core.IResolvable dbType) {
this.dbType = dbType;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getDbVersion}
* @param dbVersion the value to be set.
* @return {@code this}
*/
public Builder dbVersion(java.lang.String dbVersion) {
this.dbVersion = dbVersion;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getDbVersion}
* @param dbVersion the value to be set.
* @return {@code this}
*/
public Builder dbVersion(com.aliyun.ros.cdk.core.IResolvable dbVersion) {
this.dbVersion = dbVersion;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getRefreshOptions}
* @param refreshOptions the value to be set.
* @return {@code this}
*/
public Builder refreshOptions(java.lang.String refreshOptions) {
this.refreshOptions = refreshOptions;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getRefreshOptions}
* @param refreshOptions the value to be set.
* @return {@code this}
*/
public Builder refreshOptions(com.aliyun.ros.cdk.core.IResolvable refreshOptions) {
this.refreshOptions = refreshOptions;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getZoneId}
* @param zoneId the value to be set.
* @return {@code this}
*/
public Builder zoneId(java.lang.String zoneId) {
this.zoneId = zoneId;
return this;
}
/**
* Sets the value of {@link RosDBNodeClassesProps#getZoneId}
* @param zoneId the value to be set.
* @return {@code this}
*/
public Builder zoneId(com.aliyun.ros.cdk.core.IResolvable zoneId) {
this.zoneId = zoneId;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link RosDBNodeClassesProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public RosDBNodeClassesProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link RosDBNodeClassesProps}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RosDBNodeClassesProps {
private final java.lang.Object payType;
private final java.lang.Object dbNodeClass;
private final java.lang.Object dbType;
private final java.lang.Object dbVersion;
private final java.lang.Object refreshOptions;
private final java.lang.Object zoneId;
/**
* 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.payType = software.amazon.jsii.Kernel.get(this, "payType", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.dbNodeClass = software.amazon.jsii.Kernel.get(this, "dbNodeClass", 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.refreshOptions = software.amazon.jsii.Kernel.get(this, "refreshOptions", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.zoneId = software.amazon.jsii.Kernel.get(this, "zoneId", 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.payType = java.util.Objects.requireNonNull(builder.payType, "payType is required");
this.dbNodeClass = builder.dbNodeClass;
this.dbType = builder.dbType;
this.dbVersion = builder.dbVersion;
this.refreshOptions = builder.refreshOptions;
this.zoneId = builder.zoneId;
}
@Override
public final java.lang.Object getPayType() {
return this.payType;
}
@Override
public final java.lang.Object getDbNodeClass() {
return this.dbNodeClass;
}
@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 getRefreshOptions() {
return this.refreshOptions;
}
@Override
public final java.lang.Object getZoneId() {
return this.zoneId;
}
@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("payType", om.valueToTree(this.getPayType()));
if (this.getDbNodeClass() != null) {
data.set("dbNodeClass", om.valueToTree(this.getDbNodeClass()));
}
if (this.getDbType() != null) {
data.set("dbType", om.valueToTree(this.getDbType()));
}
if (this.getDbVersion() != null) {
data.set("dbVersion", om.valueToTree(this.getDbVersion()));
}
if (this.getRefreshOptions() != null) {
data.set("refreshOptions", om.valueToTree(this.getRefreshOptions()));
}
if (this.getZoneId() != null) {
data.set("zoneId", om.valueToTree(this.getZoneId()));
}
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.RosDBNodeClassesProps"));
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;
RosDBNodeClassesProps.Jsii$Proxy that = (RosDBNodeClassesProps.Jsii$Proxy) o;
if (!payType.equals(that.payType)) return false;
if (this.dbNodeClass != null ? !this.dbNodeClass.equals(that.dbNodeClass) : that.dbNodeClass != 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.refreshOptions != null ? !this.refreshOptions.equals(that.refreshOptions) : that.refreshOptions != null) return false;
return this.zoneId != null ? this.zoneId.equals(that.zoneId) : that.zoneId == null;
}
@Override
public final int hashCode() {
int result = this.payType.hashCode();
result = 31 * result + (this.dbNodeClass != null ? this.dbNodeClass.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.refreshOptions != null ? this.refreshOptions.hashCode() : 0);
result = 31 * result + (this.zoneId != null ? this.zoneId.hashCode() : 0);
return result;
}
}
}