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

io.github.cdklabs.cdk.appflow.ErrorHandlingConfiguration Maven / Gradle / Ivy

The newest version!
package io.github.cdklabs.cdk.appflow;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T07:35:38.219Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.appflow.$Module.class, fqn = "@cdklabs/cdk-appflow.ErrorHandlingConfiguration")
@software.amazon.jsii.Jsii.Proxy(ErrorHandlingConfiguration.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ErrorHandlingConfiguration extends software.amazon.jsii.JsiiSerializable {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.appflow.S3Location getErrorLocation() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.Boolean getFailOnFirstError() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link ErrorHandlingConfiguration}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link ErrorHandlingConfiguration}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        io.github.cdklabs.cdk.appflow.S3Location errorLocation;
        java.lang.Boolean failOnFirstError;

        /**
         * Sets the value of {@link ErrorHandlingConfiguration#getErrorLocation}
         * @param errorLocation the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder errorLocation(io.github.cdklabs.cdk.appflow.S3Location errorLocation) {
            this.errorLocation = errorLocation;
            return this;
        }

        /**
         * Sets the value of {@link ErrorHandlingConfiguration#getFailOnFirstError}
         * @param failOnFirstError the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder failOnFirstError(java.lang.Boolean failOnFirstError) {
            this.failOnFirstError = failOnFirstError;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link ErrorHandlingConfiguration}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @Override
        public ErrorHandlingConfiguration build() {
            return new Jsii$Proxy(this);
        }
    }

    /**
     * An implementation for {@link ErrorHandlingConfiguration}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ErrorHandlingConfiguration {
        private final io.github.cdklabs.cdk.appflow.S3Location errorLocation;
        private final java.lang.Boolean failOnFirstError;

        /**
         * 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.errorLocation = software.amazon.jsii.Kernel.get(this, "errorLocation", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.S3Location.class));
            this.failOnFirstError = software.amazon.jsii.Kernel.get(this, "failOnFirstError", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.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.errorLocation = builder.errorLocation;
            this.failOnFirstError = builder.failOnFirstError;
        }

        @Override
        public final io.github.cdklabs.cdk.appflow.S3Location getErrorLocation() {
            return this.errorLocation;
        }

        @Override
        public final java.lang.Boolean getFailOnFirstError() {
            return this.failOnFirstError;
        }

        @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.getErrorLocation() != null) {
                data.set("errorLocation", om.valueToTree(this.getErrorLocation()));
            }
            if (this.getFailOnFirstError() != null) {
                data.set("failOnFirstError", om.valueToTree(this.getFailOnFirstError()));
            }

            final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            struct.set("fqn", om.valueToTree("@cdklabs/cdk-appflow.ErrorHandlingConfiguration"));
            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;

            ErrorHandlingConfiguration.Jsii$Proxy that = (ErrorHandlingConfiguration.Jsii$Proxy) o;

            if (this.errorLocation != null ? !this.errorLocation.equals(that.errorLocation) : that.errorLocation != null) return false;
            return this.failOnFirstError != null ? this.failOnFirstError.equals(that.failOnFirstError) : that.failOnFirstError == null;
        }

        @Override
        public final int hashCode() {
            int result = this.errorLocation != null ? this.errorLocation.hashCode() : 0;
            result = 31 * result + (this.failOnFirstError != null ? this.failOnFirstError.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy