com.aliyun.ros.cdk.ecs.RosInstanceCloneProps Maven / Gradle / Ivy
Show all versions of ros-cdk-ecs Show documentation
package com.aliyun.ros.cdk.ecs;
/**
* Properties for defining a RosInstanceClone
.
*
* See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ecs-instanceclone
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2024-08-22T08:56:20.156Z")
@software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.ecs.$Module.class, fqn = "@alicloud/ros-cdk-ecs.RosInstanceCloneProps")
@software.amazon.jsii.Jsii.Proxy(RosInstanceCloneProps.Jsii$Proxy.class)
public interface RosInstanceCloneProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@org.jetbrains.annotations.NotNull java.lang.Object getSourceInstanceId();
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getBackendServerWeight() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDeletionProtection() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDescription() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getDiskMappings() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getImageId() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getInstanceChargeType() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getInstanceName() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getInternetMaxBandwidthIn() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getKeyPairName() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getLoadBalancerIdToAttach() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getPassword() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getPeriod() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getRamRoleName() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getResourceGroupId() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getSecurityGroupId() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getSpotPriceLimit() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getSpotStrategy() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.util.List getTags() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.Object getZoneId() {
return null;
}
/**
* @return a {@link Builder} of {@link RosInstanceCloneProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link RosInstanceCloneProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Object sourceInstanceId;
java.lang.Object backendServerWeight;
java.lang.Object deletionProtection;
java.lang.Object description;
java.lang.Object diskMappings;
java.lang.Object imageId;
java.lang.Object instanceChargeType;
java.lang.Object instanceName;
java.lang.Object internetMaxBandwidthIn;
java.lang.Object keyPairName;
java.lang.Object loadBalancerIdToAttach;
java.lang.Object password;
java.lang.Object period;
java.lang.Object ramRoleName;
java.lang.Object resourceGroupId;
java.lang.Object securityGroupId;
java.lang.Object spotPriceLimit;
java.lang.Object spotStrategy;
java.util.List tags;
java.lang.Object zoneId;
/**
* Sets the value of {@link RosInstanceCloneProps#getSourceInstanceId}
* @param sourceInstanceId the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder sourceInstanceId(java.lang.String sourceInstanceId) {
this.sourceInstanceId = sourceInstanceId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSourceInstanceId}
* @param sourceInstanceId the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder sourceInstanceId(com.aliyun.ros.cdk.core.IResolvable sourceInstanceId) {
this.sourceInstanceId = sourceInstanceId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getBackendServerWeight}
* @param backendServerWeight the value to be set.
* @return {@code this}
*/
public Builder backendServerWeight(java.lang.Number backendServerWeight) {
this.backendServerWeight = backendServerWeight;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getBackendServerWeight}
* @param backendServerWeight the value to be set.
* @return {@code this}
*/
public Builder backendServerWeight(com.aliyun.ros.cdk.core.IResolvable backendServerWeight) {
this.backendServerWeight = backendServerWeight;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getDeletionProtection}
* @param deletionProtection the value to be set.
* @return {@code this}
*/
public Builder deletionProtection(java.lang.Boolean deletionProtection) {
this.deletionProtection = deletionProtection;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getDeletionProtection}
* @param deletionProtection the value to be set.
* @return {@code this}
*/
public Builder deletionProtection(com.aliyun.ros.cdk.core.IResolvable deletionProtection) {
this.deletionProtection = deletionProtection;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getDescription}
* @param description the value to be set.
* @return {@code this}
*/
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getDescription}
* @param description the value to be set.
* @return {@code this}
*/
public Builder description(com.aliyun.ros.cdk.core.IResolvable description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getDiskMappings}
* @param diskMappings the value to be set.
* @return {@code this}
*/
public Builder diskMappings(com.aliyun.ros.cdk.core.IResolvable diskMappings) {
this.diskMappings = diskMappings;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getDiskMappings}
* @param diskMappings the value to be set.
* @return {@code this}
*/
public Builder diskMappings(java.util.List extends java.lang.Object> diskMappings) {
this.diskMappings = diskMappings;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getImageId}
* @param imageId the value to be set.
* @return {@code this}
*/
public Builder imageId(java.lang.String imageId) {
this.imageId = imageId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getImageId}
* @param imageId the value to be set.
* @return {@code this}
*/
public Builder imageId(com.aliyun.ros.cdk.core.IResolvable imageId) {
this.imageId = imageId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getInstanceChargeType}
* @param instanceChargeType the value to be set.
* @return {@code this}
*/
public Builder instanceChargeType(java.lang.String instanceChargeType) {
this.instanceChargeType = instanceChargeType;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getInstanceChargeType}
* @param instanceChargeType the value to be set.
* @return {@code this}
*/
public Builder instanceChargeType(com.aliyun.ros.cdk.core.IResolvable instanceChargeType) {
this.instanceChargeType = instanceChargeType;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getInstanceName}
* @param instanceName the value to be set.
* @return {@code this}
*/
public Builder instanceName(java.lang.String instanceName) {
this.instanceName = instanceName;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getInstanceName}
* @param instanceName the value to be set.
* @return {@code this}
*/
public Builder instanceName(com.aliyun.ros.cdk.core.IResolvable instanceName) {
this.instanceName = instanceName;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getInternetMaxBandwidthIn}
* @param internetMaxBandwidthIn the value to be set.
* @return {@code this}
*/
public Builder internetMaxBandwidthIn(java.lang.Number internetMaxBandwidthIn) {
this.internetMaxBandwidthIn = internetMaxBandwidthIn;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getInternetMaxBandwidthIn}
* @param internetMaxBandwidthIn the value to be set.
* @return {@code this}
*/
public Builder internetMaxBandwidthIn(com.aliyun.ros.cdk.core.IResolvable internetMaxBandwidthIn) {
this.internetMaxBandwidthIn = internetMaxBandwidthIn;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getKeyPairName}
* @param keyPairName the value to be set.
* @return {@code this}
*/
public Builder keyPairName(java.lang.String keyPairName) {
this.keyPairName = keyPairName;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getKeyPairName}
* @param keyPairName the value to be set.
* @return {@code this}
*/
public Builder keyPairName(com.aliyun.ros.cdk.core.IResolvable keyPairName) {
this.keyPairName = keyPairName;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getLoadBalancerIdToAttach}
* @param loadBalancerIdToAttach the value to be set.
* @return {@code this}
*/
public Builder loadBalancerIdToAttach(java.lang.String loadBalancerIdToAttach) {
this.loadBalancerIdToAttach = loadBalancerIdToAttach;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getLoadBalancerIdToAttach}
* @param loadBalancerIdToAttach the value to be set.
* @return {@code this}
*/
public Builder loadBalancerIdToAttach(com.aliyun.ros.cdk.core.IResolvable loadBalancerIdToAttach) {
this.loadBalancerIdToAttach = loadBalancerIdToAttach;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getPassword}
* @param password the value to be set.
* @return {@code this}
*/
public Builder password(java.lang.String password) {
this.password = password;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getPassword}
* @param password the value to be set.
* @return {@code this}
*/
public Builder password(com.aliyun.ros.cdk.core.IResolvable password) {
this.password = password;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getPeriod}
* @param period the value to be set.
* @return {@code this}
*/
public Builder period(java.lang.Number period) {
this.period = period;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getPeriod}
* @param period the value to be set.
* @return {@code this}
*/
public Builder period(com.aliyun.ros.cdk.core.IResolvable period) {
this.period = period;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getRamRoleName}
* @param ramRoleName the value to be set.
* @return {@code this}
*/
public Builder ramRoleName(java.lang.String ramRoleName) {
this.ramRoleName = ramRoleName;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getRamRoleName}
* @param ramRoleName the value to be set.
* @return {@code this}
*/
public Builder ramRoleName(com.aliyun.ros.cdk.core.IResolvable ramRoleName) {
this.ramRoleName = ramRoleName;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getResourceGroupId}
* @param resourceGroupId the value to be set.
* @return {@code this}
*/
public Builder resourceGroupId(java.lang.String resourceGroupId) {
this.resourceGroupId = resourceGroupId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getResourceGroupId}
* @param resourceGroupId the value to be set.
* @return {@code this}
*/
public Builder resourceGroupId(com.aliyun.ros.cdk.core.IResolvable resourceGroupId) {
this.resourceGroupId = resourceGroupId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSecurityGroupId}
* @param securityGroupId the value to be set.
* @return {@code this}
*/
public Builder securityGroupId(java.lang.String securityGroupId) {
this.securityGroupId = securityGroupId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSecurityGroupId}
* @param securityGroupId the value to be set.
* @return {@code this}
*/
public Builder securityGroupId(com.aliyun.ros.cdk.core.IResolvable securityGroupId) {
this.securityGroupId = securityGroupId;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSpotPriceLimit}
* @param spotPriceLimit the value to be set.
* @return {@code this}
*/
public Builder spotPriceLimit(java.lang.String spotPriceLimit) {
this.spotPriceLimit = spotPriceLimit;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSpotPriceLimit}
* @param spotPriceLimit the value to be set.
* @return {@code this}
*/
public Builder spotPriceLimit(com.aliyun.ros.cdk.core.IResolvable spotPriceLimit) {
this.spotPriceLimit = spotPriceLimit;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSpotStrategy}
* @param spotStrategy the value to be set.
* @return {@code this}
*/
public Builder spotStrategy(java.lang.String spotStrategy) {
this.spotStrategy = spotStrategy;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getSpotStrategy}
* @param spotStrategy the value to be set.
* @return {@code this}
*/
public Builder spotStrategy(com.aliyun.ros.cdk.core.IResolvable spotStrategy) {
this.spotStrategy = spotStrategy;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#getTags}
* @param tags the value to be set.
* @return {@code this}
*/
@SuppressWarnings("unchecked")
public Builder tags(java.util.List extends com.aliyun.ros.cdk.ecs.RosInstanceClone.TagsProperty> tags) {
this.tags = (java.util.List)tags;
return this;
}
/**
* Sets the value of {@link RosInstanceCloneProps#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 RosInstanceCloneProps#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 RosInstanceCloneProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public RosInstanceCloneProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link RosInstanceCloneProps}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RosInstanceCloneProps {
private final java.lang.Object sourceInstanceId;
private final java.lang.Object backendServerWeight;
private final java.lang.Object deletionProtection;
private final java.lang.Object description;
private final java.lang.Object diskMappings;
private final java.lang.Object imageId;
private final java.lang.Object instanceChargeType;
private final java.lang.Object instanceName;
private final java.lang.Object internetMaxBandwidthIn;
private final java.lang.Object keyPairName;
private final java.lang.Object loadBalancerIdToAttach;
private final java.lang.Object password;
private final java.lang.Object period;
private final java.lang.Object ramRoleName;
private final java.lang.Object resourceGroupId;
private final java.lang.Object securityGroupId;
private final java.lang.Object spotPriceLimit;
private final java.lang.Object spotStrategy;
private final java.util.List tags;
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.sourceInstanceId = software.amazon.jsii.Kernel.get(this, "sourceInstanceId", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.backendServerWeight = software.amazon.jsii.Kernel.get(this, "backendServerWeight", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.deletionProtection = software.amazon.jsii.Kernel.get(this, "deletionProtection", 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.diskMappings = software.amazon.jsii.Kernel.get(this, "diskMappings", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.imageId = software.amazon.jsii.Kernel.get(this, "imageId", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.instanceChargeType = software.amazon.jsii.Kernel.get(this, "instanceChargeType", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.instanceName = software.amazon.jsii.Kernel.get(this, "instanceName", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.internetMaxBandwidthIn = software.amazon.jsii.Kernel.get(this, "internetMaxBandwidthIn", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.keyPairName = software.amazon.jsii.Kernel.get(this, "keyPairName", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.loadBalancerIdToAttach = software.amazon.jsii.Kernel.get(this, "loadBalancerIdToAttach", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.password = software.amazon.jsii.Kernel.get(this, "password", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.period = software.amazon.jsii.Kernel.get(this, "period", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.ramRoleName = software.amazon.jsii.Kernel.get(this, "ramRoleName", 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));
this.securityGroupId = software.amazon.jsii.Kernel.get(this, "securityGroupId", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.spotPriceLimit = software.amazon.jsii.Kernel.get(this, "spotPriceLimit", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.spotStrategy = software.amazon.jsii.Kernel.get(this, "spotStrategy", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
this.tags = software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.ecs.RosInstanceClone.TagsProperty.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}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.sourceInstanceId = java.util.Objects.requireNonNull(builder.sourceInstanceId, "sourceInstanceId is required");
this.backendServerWeight = builder.backendServerWeight;
this.deletionProtection = builder.deletionProtection;
this.description = builder.description;
this.diskMappings = builder.diskMappings;
this.imageId = builder.imageId;
this.instanceChargeType = builder.instanceChargeType;
this.instanceName = builder.instanceName;
this.internetMaxBandwidthIn = builder.internetMaxBandwidthIn;
this.keyPairName = builder.keyPairName;
this.loadBalancerIdToAttach = builder.loadBalancerIdToAttach;
this.password = builder.password;
this.period = builder.period;
this.ramRoleName = builder.ramRoleName;
this.resourceGroupId = builder.resourceGroupId;
this.securityGroupId = builder.securityGroupId;
this.spotPriceLimit = builder.spotPriceLimit;
this.spotStrategy = builder.spotStrategy;
this.tags = (java.util.List)builder.tags;
this.zoneId = builder.zoneId;
}
@Override
public final java.lang.Object getSourceInstanceId() {
return this.sourceInstanceId;
}
@Override
public final java.lang.Object getBackendServerWeight() {
return this.backendServerWeight;
}
@Override
public final java.lang.Object getDeletionProtection() {
return this.deletionProtection;
}
@Override
public final java.lang.Object getDescription() {
return this.description;
}
@Override
public final java.lang.Object getDiskMappings() {
return this.diskMappings;
}
@Override
public final java.lang.Object getImageId() {
return this.imageId;
}
@Override
public final java.lang.Object getInstanceChargeType() {
return this.instanceChargeType;
}
@Override
public final java.lang.Object getInstanceName() {
return this.instanceName;
}
@Override
public final java.lang.Object getInternetMaxBandwidthIn() {
return this.internetMaxBandwidthIn;
}
@Override
public final java.lang.Object getKeyPairName() {
return this.keyPairName;
}
@Override
public final java.lang.Object getLoadBalancerIdToAttach() {
return this.loadBalancerIdToAttach;
}
@Override
public final java.lang.Object getPassword() {
return this.password;
}
@Override
public final java.lang.Object getPeriod() {
return this.period;
}
@Override
public final java.lang.Object getRamRoleName() {
return this.ramRoleName;
}
@Override
public final java.lang.Object getResourceGroupId() {
return this.resourceGroupId;
}
@Override
public final java.lang.Object getSecurityGroupId() {
return this.securityGroupId;
}
@Override
public final java.lang.Object getSpotPriceLimit() {
return this.spotPriceLimit;
}
@Override
public final java.lang.Object getSpotStrategy() {
return this.spotStrategy;
}
@Override
public final java.util.List getTags() {
return this.tags;
}
@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("sourceInstanceId", om.valueToTree(this.getSourceInstanceId()));
if (this.getBackendServerWeight() != null) {
data.set("backendServerWeight", om.valueToTree(this.getBackendServerWeight()));
}
if (this.getDeletionProtection() != null) {
data.set("deletionProtection", om.valueToTree(this.getDeletionProtection()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getDiskMappings() != null) {
data.set("diskMappings", om.valueToTree(this.getDiskMappings()));
}
if (this.getImageId() != null) {
data.set("imageId", om.valueToTree(this.getImageId()));
}
if (this.getInstanceChargeType() != null) {
data.set("instanceChargeType", om.valueToTree(this.getInstanceChargeType()));
}
if (this.getInstanceName() != null) {
data.set("instanceName", om.valueToTree(this.getInstanceName()));
}
if (this.getInternetMaxBandwidthIn() != null) {
data.set("internetMaxBandwidthIn", om.valueToTree(this.getInternetMaxBandwidthIn()));
}
if (this.getKeyPairName() != null) {
data.set("keyPairName", om.valueToTree(this.getKeyPairName()));
}
if (this.getLoadBalancerIdToAttach() != null) {
data.set("loadBalancerIdToAttach", om.valueToTree(this.getLoadBalancerIdToAttach()));
}
if (this.getPassword() != null) {
data.set("password", om.valueToTree(this.getPassword()));
}
if (this.getPeriod() != null) {
data.set("period", om.valueToTree(this.getPeriod()));
}
if (this.getRamRoleName() != null) {
data.set("ramRoleName", om.valueToTree(this.getRamRoleName()));
}
if (this.getResourceGroupId() != null) {
data.set("resourceGroupId", om.valueToTree(this.getResourceGroupId()));
}
if (this.getSecurityGroupId() != null) {
data.set("securityGroupId", om.valueToTree(this.getSecurityGroupId()));
}
if (this.getSpotPriceLimit() != null) {
data.set("spotPriceLimit", om.valueToTree(this.getSpotPriceLimit()));
}
if (this.getSpotStrategy() != null) {
data.set("spotStrategy", om.valueToTree(this.getSpotStrategy()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
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-ecs.RosInstanceCloneProps"));
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;
RosInstanceCloneProps.Jsii$Proxy that = (RosInstanceCloneProps.Jsii$Proxy) o;
if (!sourceInstanceId.equals(that.sourceInstanceId)) return false;
if (this.backendServerWeight != null ? !this.backendServerWeight.equals(that.backendServerWeight) : that.backendServerWeight != null) return false;
if (this.deletionProtection != null ? !this.deletionProtection.equals(that.deletionProtection) : that.deletionProtection != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.diskMappings != null ? !this.diskMappings.equals(that.diskMappings) : that.diskMappings != null) return false;
if (this.imageId != null ? !this.imageId.equals(that.imageId) : that.imageId != null) return false;
if (this.instanceChargeType != null ? !this.instanceChargeType.equals(that.instanceChargeType) : that.instanceChargeType != null) return false;
if (this.instanceName != null ? !this.instanceName.equals(that.instanceName) : that.instanceName != null) return false;
if (this.internetMaxBandwidthIn != null ? !this.internetMaxBandwidthIn.equals(that.internetMaxBandwidthIn) : that.internetMaxBandwidthIn != null) return false;
if (this.keyPairName != null ? !this.keyPairName.equals(that.keyPairName) : that.keyPairName != null) return false;
if (this.loadBalancerIdToAttach != null ? !this.loadBalancerIdToAttach.equals(that.loadBalancerIdToAttach) : that.loadBalancerIdToAttach != null) return false;
if (this.password != null ? !this.password.equals(that.password) : that.password != null) return false;
if (this.period != null ? !this.period.equals(that.period) : that.period != null) return false;
if (this.ramRoleName != null ? !this.ramRoleName.equals(that.ramRoleName) : that.ramRoleName != null) return false;
if (this.resourceGroupId != null ? !this.resourceGroupId.equals(that.resourceGroupId) : that.resourceGroupId != null) return false;
if (this.securityGroupId != null ? !this.securityGroupId.equals(that.securityGroupId) : that.securityGroupId != null) return false;
if (this.spotPriceLimit != null ? !this.spotPriceLimit.equals(that.spotPriceLimit) : that.spotPriceLimit != null) return false;
if (this.spotStrategy != null ? !this.spotStrategy.equals(that.spotStrategy) : that.spotStrategy != null) return false;
if (this.tags != null ? !this.tags.equals(that.tags) : that.tags != null) return false;
return this.zoneId != null ? this.zoneId.equals(that.zoneId) : that.zoneId == null;
}
@Override
public final int hashCode() {
int result = this.sourceInstanceId.hashCode();
result = 31 * result + (this.backendServerWeight != null ? this.backendServerWeight.hashCode() : 0);
result = 31 * result + (this.deletionProtection != null ? this.deletionProtection.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.diskMappings != null ? this.diskMappings.hashCode() : 0);
result = 31 * result + (this.imageId != null ? this.imageId.hashCode() : 0);
result = 31 * result + (this.instanceChargeType != null ? this.instanceChargeType.hashCode() : 0);
result = 31 * result + (this.instanceName != null ? this.instanceName.hashCode() : 0);
result = 31 * result + (this.internetMaxBandwidthIn != null ? this.internetMaxBandwidthIn.hashCode() : 0);
result = 31 * result + (this.keyPairName != null ? this.keyPairName.hashCode() : 0);
result = 31 * result + (this.loadBalancerIdToAttach != null ? this.loadBalancerIdToAttach.hashCode() : 0);
result = 31 * result + (this.password != null ? this.password.hashCode() : 0);
result = 31 * result + (this.period != null ? this.period.hashCode() : 0);
result = 31 * result + (this.ramRoleName != null ? this.ramRoleName.hashCode() : 0);
result = 31 * result + (this.resourceGroupId != null ? this.resourceGroupId.hashCode() : 0);
result = 31 * result + (this.securityGroupId != null ? this.securityGroupId.hashCode() : 0);
result = 31 * result + (this.spotPriceLimit != null ? this.spotPriceLimit.hashCode() : 0);
result = 31 * result + (this.spotStrategy != null ? this.spotStrategy.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
result = 31 * result + (this.zoneId != null ? this.zoneId.hashCode() : 0);
return result;
}
}
}