io.github.cdklabs.cdk.appflow.ScheduleProperties Maven / Gradle / Ivy
package io.github.cdklabs.cdk.appflow;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T07:35:38.282Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.appflow.$Module.class, fqn = "@cdklabs/cdk-appflow.ScheduleProperties")
@software.amazon.jsii.Jsii.Proxy(ScheduleProperties.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ScheduleProperties extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.time.Instant getEndTime() {
return null;
}
/**
* (experimental) Timestamp for the records to import from the connector in the first flow run.
*
* Default: 30 days back from the initial frow run
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.time.Instant getFirstExecutionFrom() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getOffset() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.time.Instant getStartTime() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getTimezone() {
return null;
}
/**
* @return a {@link Builder} of {@link ScheduleProperties}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ScheduleProperties}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.time.Instant endTime;
java.time.Instant firstExecutionFrom;
software.amazon.awscdk.Duration offset;
java.time.Instant startTime;
java.lang.String timezone;
/**
* Sets the value of {@link ScheduleProperties#getEndTime}
* @param endTime the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder endTime(java.time.Instant endTime) {
this.endTime = endTime;
return this;
}
/**
* Sets the value of {@link ScheduleProperties#getFirstExecutionFrom}
* @param firstExecutionFrom Timestamp for the records to import from the connector in the first flow run.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder firstExecutionFrom(java.time.Instant firstExecutionFrom) {
this.firstExecutionFrom = firstExecutionFrom;
return this;
}
/**
* Sets the value of {@link ScheduleProperties#getOffset}
* @param offset the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder offset(software.amazon.awscdk.Duration offset) {
this.offset = offset;
return this;
}
/**
* Sets the value of {@link ScheduleProperties#getStartTime}
* @param startTime the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder startTime(java.time.Instant startTime) {
this.startTime = startTime;
return this;
}
/**
* Sets the value of {@link ScheduleProperties#getTimezone}
* @param timezone the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder timezone(java.lang.String timezone) {
this.timezone = timezone;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ScheduleProperties}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public ScheduleProperties build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ScheduleProperties}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ScheduleProperties {
private final java.time.Instant endTime;
private final java.time.Instant firstExecutionFrom;
private final software.amazon.awscdk.Duration offset;
private final java.time.Instant startTime;
private final java.lang.String timezone;
/**
* 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.endTime = software.amazon.jsii.Kernel.get(this, "endTime", software.amazon.jsii.NativeType.forClass(java.time.Instant.class));
this.firstExecutionFrom = software.amazon.jsii.Kernel.get(this, "firstExecutionFrom", software.amazon.jsii.NativeType.forClass(java.time.Instant.class));
this.offset = software.amazon.jsii.Kernel.get(this, "offset", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class));
this.startTime = software.amazon.jsii.Kernel.get(this, "startTime", software.amazon.jsii.NativeType.forClass(java.time.Instant.class));
this.timezone = software.amazon.jsii.Kernel.get(this, "timezone", 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.endTime = builder.endTime;
this.firstExecutionFrom = builder.firstExecutionFrom;
this.offset = builder.offset;
this.startTime = builder.startTime;
this.timezone = builder.timezone;
}
@Override
public final java.time.Instant getEndTime() {
return this.endTime;
}
@Override
public final java.time.Instant getFirstExecutionFrom() {
return this.firstExecutionFrom;
}
@Override
public final software.amazon.awscdk.Duration getOffset() {
return this.offset;
}
@Override
public final java.time.Instant getStartTime() {
return this.startTime;
}
@Override
public final java.lang.String getTimezone() {
return this.timezone;
}
@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.getEndTime() != null) {
data.set("endTime", om.valueToTree(this.getEndTime()));
}
if (this.getFirstExecutionFrom() != null) {
data.set("firstExecutionFrom", om.valueToTree(this.getFirstExecutionFrom()));
}
if (this.getOffset() != null) {
data.set("offset", om.valueToTree(this.getOffset()));
}
if (this.getStartTime() != null) {
data.set("startTime", om.valueToTree(this.getStartTime()));
}
if (this.getTimezone() != null) {
data.set("timezone", om.valueToTree(this.getTimezone()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/cdk-appflow.ScheduleProperties"));
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;
ScheduleProperties.Jsii$Proxy that = (ScheduleProperties.Jsii$Proxy) o;
if (this.endTime != null ? !this.endTime.equals(that.endTime) : that.endTime != null) return false;
if (this.firstExecutionFrom != null ? !this.firstExecutionFrom.equals(that.firstExecutionFrom) : that.firstExecutionFrom != null) return false;
if (this.offset != null ? !this.offset.equals(that.offset) : that.offset != null) return false;
if (this.startTime != null ? !this.startTime.equals(that.startTime) : that.startTime != null) return false;
return this.timezone != null ? this.timezone.equals(that.timezone) : that.timezone == null;
}
@Override
public final int hashCode() {
int result = this.endTime != null ? this.endTime.hashCode() : 0;
result = 31 * result + (this.firstExecutionFrom != null ? this.firstExecutionFrom.hashCode() : 0);
result = 31 * result + (this.offset != null ? this.offset.hashCode() : 0);
result = 31 * result + (this.startTime != null ? this.startTime.hashCode() : 0);
result = 31 * result + (this.timezone != null ? this.timezone.hashCode() : 0);
return result;
}
}
}