All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mongodb.awscdk.resources.mongodbatlas.SynchronousCreationOptions Maven / Gradle / Ivy

There is a newer version: 3.9.0
Show newest version
package org.mongodb.awscdk.resources.mongodbatlas;

/**
 * Options that needs to be set to control the synchronous creation flow, this options need to be set if EnableSynchronousCreation is se to TRUE.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:29.064Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.SynchronousCreationOptions")
@software.amazon.jsii.Jsii.Proxy(SynchronousCreationOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface SynchronousCreationOptions extends software.amazon.jsii.JsiiSerializable {

    /**
     * Represents the time interval, measured in seconds, for the synchronous process to wait before checking again to verify if the job has been completed.
     * 

* example: if set to 20, it will chek every 20 seconds if the resource is completed, default (30 seconds) */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getCallbackDelaySeconds() { return null; } /** * if set to true, the process will return success, in the event of a timeOut, default false. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Boolean getReturnSuccessIfTimeOut() { return null; } /** * The amount of time the process will wait until exiting with a success, default (1200 seconds). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getTimeOutInSeconds() { return null; } /** * @return a {@link Builder} of {@link SynchronousCreationOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link SynchronousCreationOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Number callbackDelaySeconds; java.lang.Boolean returnSuccessIfTimeOut; java.lang.Number timeOutInSeconds; /** * Sets the value of {@link SynchronousCreationOptions#getCallbackDelaySeconds} * @param callbackDelaySeconds Represents the time interval, measured in seconds, for the synchronous process to wait before checking again to verify if the job has been completed. * example: if set to 20, it will chek every 20 seconds if the resource is completed, default (30 seconds) * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder callbackDelaySeconds(java.lang.Number callbackDelaySeconds) { this.callbackDelaySeconds = callbackDelaySeconds; return this; } /** * Sets the value of {@link SynchronousCreationOptions#getReturnSuccessIfTimeOut} * @param returnSuccessIfTimeOut if set to true, the process will return success, in the event of a timeOut, default false. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder returnSuccessIfTimeOut(java.lang.Boolean returnSuccessIfTimeOut) { this.returnSuccessIfTimeOut = returnSuccessIfTimeOut; return this; } /** * Sets the value of {@link SynchronousCreationOptions#getTimeOutInSeconds} * @param timeOutInSeconds The amount of time the process will wait until exiting with a success, default (1200 seconds). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder timeOutInSeconds(java.lang.Number timeOutInSeconds) { this.timeOutInSeconds = timeOutInSeconds; return this; } /** * Builds the configured instance. * @return a new instance of {@link SynchronousCreationOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public SynchronousCreationOptions build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link SynchronousCreationOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SynchronousCreationOptions { private final java.lang.Number callbackDelaySeconds; private final java.lang.Boolean returnSuccessIfTimeOut; private final java.lang.Number timeOutInSeconds; /** * 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.callbackDelaySeconds = software.amazon.jsii.Kernel.get(this, "callbackDelaySeconds", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.returnSuccessIfTimeOut = software.amazon.jsii.Kernel.get(this, "returnSuccessIfTimeOut", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.timeOutInSeconds = software.amazon.jsii.Kernel.get(this, "timeOutInSeconds", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.callbackDelaySeconds = builder.callbackDelaySeconds; this.returnSuccessIfTimeOut = builder.returnSuccessIfTimeOut; this.timeOutInSeconds = builder.timeOutInSeconds; } @Override public final java.lang.Number getCallbackDelaySeconds() { return this.callbackDelaySeconds; } @Override public final java.lang.Boolean getReturnSuccessIfTimeOut() { return this.returnSuccessIfTimeOut; } @Override public final java.lang.Number getTimeOutInSeconds() { return this.timeOutInSeconds; } @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.getCallbackDelaySeconds() != null) { data.set("callbackDelaySeconds", om.valueToTree(this.getCallbackDelaySeconds())); } if (this.getReturnSuccessIfTimeOut() != null) { data.set("returnSuccessIfTimeOut", om.valueToTree(this.getReturnSuccessIfTimeOut())); } if (this.getTimeOutInSeconds() != null) { data.set("timeOutInSeconds", om.valueToTree(this.getTimeOutInSeconds())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.SynchronousCreationOptions")); 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; SynchronousCreationOptions.Jsii$Proxy that = (SynchronousCreationOptions.Jsii$Proxy) o; if (this.callbackDelaySeconds != null ? !this.callbackDelaySeconds.equals(that.callbackDelaySeconds) : that.callbackDelaySeconds != null) return false; if (this.returnSuccessIfTimeOut != null ? !this.returnSuccessIfTimeOut.equals(that.returnSuccessIfTimeOut) : that.returnSuccessIfTimeOut != null) return false; return this.timeOutInSeconds != null ? this.timeOutInSeconds.equals(that.timeOutInSeconds) : that.timeOutInSeconds == null; } @Override public final int hashCode() { int result = this.callbackDelaySeconds != null ? this.callbackDelaySeconds.hashCode() : 0; result = 31 * result + (this.returnSuccessIfTimeOut != null ? this.returnSuccessIfTimeOut.hashCode() : 0); result = 31 * result + (this.timeOutInSeconds != null ? this.timeOutInSeconds.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy