
software.amazon.awscdk.services.dynamodb.EnableScalingProps Maven / Gradle / Ivy
package software.amazon.awscdk.services.dynamodb;
/**
* Properties for enabling DynamoDB capacity scaling.
*/
@javax.annotation.Generated(value = "jsii-pacmak/0.21.1 (build 9ff44cb)", date = "2020-01-16T01:51:39.096Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.dynamodb.$Module.class, fqn = "@aws-cdk/aws-dynamodb.EnableScalingProps")
@software.amazon.jsii.Jsii.Proxy(EnableScalingProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface EnableScalingProps extends software.amazon.jsii.JsiiSerializable {
/**
* Maximum capacity to scale to.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
java.lang.Number getMaxCapacity();
/**
* Minimum capacity to scale to.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
java.lang.Number getMinCapacity();
/**
* @return a {@link Builder} of {@link EnableScalingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link EnableScalingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder {
private java.lang.Number maxCapacity;
private java.lang.Number minCapacity;
/**
* Sets the value of {@link EnableScalingProps#getMaxCapacity}
* @param maxCapacity Maximum capacity to scale to. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder maxCapacity(java.lang.Number maxCapacity) {
this.maxCapacity = maxCapacity;
return this;
}
/**
* Sets the value of {@link EnableScalingProps#getMinCapacity}
* @param minCapacity Minimum capacity to scale to. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder minCapacity(java.lang.Number minCapacity) {
this.minCapacity = minCapacity;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link EnableScalingProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public EnableScalingProps build() {
return new Jsii$Proxy(maxCapacity, minCapacity);
}
}
/**
* An implementation for {@link EnableScalingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements EnableScalingProps {
private final java.lang.Number maxCapacity;
private final java.lang.Number minCapacity;
/**
* 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.maxCapacity = this.jsiiGet("maxCapacity", java.lang.Number.class);
this.minCapacity = this.jsiiGet("minCapacity", java.lang.Number.class);
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final java.lang.Number maxCapacity, final java.lang.Number minCapacity) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.maxCapacity = java.util.Objects.requireNonNull(maxCapacity, "maxCapacity is required");
this.minCapacity = java.util.Objects.requireNonNull(minCapacity, "minCapacity is required");
}
@Override
public java.lang.Number getMaxCapacity() {
return this.maxCapacity;
}
@Override
public java.lang.Number getMinCapacity() {
return this.minCapacity;
}
@Override
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("maxCapacity", om.valueToTree(this.getMaxCapacity()));
data.set("minCapacity", om.valueToTree(this.getMinCapacity()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-dynamodb.EnableScalingProps"));
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 boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EnableScalingProps.Jsii$Proxy that = (EnableScalingProps.Jsii$Proxy) o;
if (!maxCapacity.equals(that.maxCapacity)) return false;
return this.minCapacity.equals(that.minCapacity);
}
@Override
public int hashCode() {
int result = this.maxCapacity.hashCode();
result = 31 * result + (this.minCapacity.hashCode());
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy