io.github.cdklabs.cdk.stacksets.OperationPreferences Maven / Gradle / Ivy
package io.github.cdklabs.cdk.stacksets;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.83.0 (build fd4544d)", date = "2023-06-13T00:17:42.426Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.stacksets.$Module.class, fqn = "cdk-stacksets.OperationPreferences")
@software.amazon.jsii.Jsii.Proxy(OperationPreferences.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface OperationPreferences extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getFailureToleranceCount() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getFailureTolerancePercentage() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMaxConcurrentCount() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMaxConcurrentPercentage() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.stacksets.RegionConcurrencyType getRegionConcurrencyType() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getRegionOrder() {
return null;
}
/**
* @return a {@link Builder} of {@link OperationPreferences}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link OperationPreferences}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Number failureToleranceCount;
java.lang.Number failureTolerancePercentage;
java.lang.Number maxConcurrentCount;
java.lang.Number maxConcurrentPercentage;
io.github.cdklabs.cdk.stacksets.RegionConcurrencyType regionConcurrencyType;
java.util.List regionOrder;
/**
* Sets the value of {@link OperationPreferences#getFailureToleranceCount}
* @param failureToleranceCount the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder failureToleranceCount(java.lang.Number failureToleranceCount) {
this.failureToleranceCount = failureToleranceCount;
return this;
}
/**
* Sets the value of {@link OperationPreferences#getFailureTolerancePercentage}
* @param failureTolerancePercentage the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder failureTolerancePercentage(java.lang.Number failureTolerancePercentage) {
this.failureTolerancePercentage = failureTolerancePercentage;
return this;
}
/**
* Sets the value of {@link OperationPreferences#getMaxConcurrentCount}
* @param maxConcurrentCount the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder maxConcurrentCount(java.lang.Number maxConcurrentCount) {
this.maxConcurrentCount = maxConcurrentCount;
return this;
}
/**
* Sets the value of {@link OperationPreferences#getMaxConcurrentPercentage}
* @param maxConcurrentPercentage the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder maxConcurrentPercentage(java.lang.Number maxConcurrentPercentage) {
this.maxConcurrentPercentage = maxConcurrentPercentage;
return this;
}
/**
* Sets the value of {@link OperationPreferences#getRegionConcurrencyType}
* @param regionConcurrencyType the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder regionConcurrencyType(io.github.cdklabs.cdk.stacksets.RegionConcurrencyType regionConcurrencyType) {
this.regionConcurrencyType = regionConcurrencyType;
return this;
}
/**
* Sets the value of {@link OperationPreferences#getRegionOrder}
* @param regionOrder the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder regionOrder(java.util.List regionOrder) {
this.regionOrder = regionOrder;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link OperationPreferences}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public OperationPreferences build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link OperationPreferences}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements OperationPreferences {
private final java.lang.Number failureToleranceCount;
private final java.lang.Number failureTolerancePercentage;
private final java.lang.Number maxConcurrentCount;
private final java.lang.Number maxConcurrentPercentage;
private final io.github.cdklabs.cdk.stacksets.RegionConcurrencyType regionConcurrencyType;
private final java.util.List regionOrder;
/**
* 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.failureToleranceCount = software.amazon.jsii.Kernel.get(this, "failureToleranceCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.failureTolerancePercentage = software.amazon.jsii.Kernel.get(this, "failureTolerancePercentage", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.maxConcurrentCount = software.amazon.jsii.Kernel.get(this, "maxConcurrentCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.maxConcurrentPercentage = software.amazon.jsii.Kernel.get(this, "maxConcurrentPercentage", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.regionConcurrencyType = software.amazon.jsii.Kernel.get(this, "regionConcurrencyType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.stacksets.RegionConcurrencyType.class));
this.regionOrder = software.amazon.jsii.Kernel.get(this, "regionOrder", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.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.failureToleranceCount = builder.failureToleranceCount;
this.failureTolerancePercentage = builder.failureTolerancePercentage;
this.maxConcurrentCount = builder.maxConcurrentCount;
this.maxConcurrentPercentage = builder.maxConcurrentPercentage;
this.regionConcurrencyType = builder.regionConcurrencyType;
this.regionOrder = builder.regionOrder;
}
@Override
public final java.lang.Number getFailureToleranceCount() {
return this.failureToleranceCount;
}
@Override
public final java.lang.Number getFailureTolerancePercentage() {
return this.failureTolerancePercentage;
}
@Override
public final java.lang.Number getMaxConcurrentCount() {
return this.maxConcurrentCount;
}
@Override
public final java.lang.Number getMaxConcurrentPercentage() {
return this.maxConcurrentPercentage;
}
@Override
public final io.github.cdklabs.cdk.stacksets.RegionConcurrencyType getRegionConcurrencyType() {
return this.regionConcurrencyType;
}
@Override
public final java.util.List getRegionOrder() {
return this.regionOrder;
}
@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.getFailureToleranceCount() != null) {
data.set("failureToleranceCount", om.valueToTree(this.getFailureToleranceCount()));
}
if (this.getFailureTolerancePercentage() != null) {
data.set("failureTolerancePercentage", om.valueToTree(this.getFailureTolerancePercentage()));
}
if (this.getMaxConcurrentCount() != null) {
data.set("maxConcurrentCount", om.valueToTree(this.getMaxConcurrentCount()));
}
if (this.getMaxConcurrentPercentage() != null) {
data.set("maxConcurrentPercentage", om.valueToTree(this.getMaxConcurrentPercentage()));
}
if (this.getRegionConcurrencyType() != null) {
data.set("regionConcurrencyType", om.valueToTree(this.getRegionConcurrencyType()));
}
if (this.getRegionOrder() != null) {
data.set("regionOrder", om.valueToTree(this.getRegionOrder()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk-stacksets.OperationPreferences"));
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;
OperationPreferences.Jsii$Proxy that = (OperationPreferences.Jsii$Proxy) o;
if (this.failureToleranceCount != null ? !this.failureToleranceCount.equals(that.failureToleranceCount) : that.failureToleranceCount != null) return false;
if (this.failureTolerancePercentage != null ? !this.failureTolerancePercentage.equals(that.failureTolerancePercentage) : that.failureTolerancePercentage != null) return false;
if (this.maxConcurrentCount != null ? !this.maxConcurrentCount.equals(that.maxConcurrentCount) : that.maxConcurrentCount != null) return false;
if (this.maxConcurrentPercentage != null ? !this.maxConcurrentPercentage.equals(that.maxConcurrentPercentage) : that.maxConcurrentPercentage != null) return false;
if (this.regionConcurrencyType != null ? !this.regionConcurrencyType.equals(that.regionConcurrencyType) : that.regionConcurrencyType != null) return false;
return this.regionOrder != null ? this.regionOrder.equals(that.regionOrder) : that.regionOrder == null;
}
@Override
public final int hashCode() {
int result = this.failureToleranceCount != null ? this.failureToleranceCount.hashCode() : 0;
result = 31 * result + (this.failureTolerancePercentage != null ? this.failureTolerancePercentage.hashCode() : 0);
result = 31 * result + (this.maxConcurrentCount != null ? this.maxConcurrentCount.hashCode() : 0);
result = 31 * result + (this.maxConcurrentPercentage != null ? this.maxConcurrentPercentage.hashCode() : 0);
result = 31 * result + (this.regionConcurrencyType != null ? this.regionConcurrencyType.hashCode() : 0);
result = 31 * result + (this.regionOrder != null ? this.regionOrder.hashCode() : 0);
return result;
}
}
}