software.amazon.textract.idp.TextractDPPOCDeciderProps Maven / Gradle / Ivy
Show all versions of idp-cdk-constructs Show documentation
package software.amazon.textract.idp;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.90.0 (build d6bdb4d)", date = "2023-10-26T15:43:30.343Z")
@software.amazon.jsii.Jsii(module = software.amazon.textract.idp.$Module.class, fqn = "amazon-textract-idp-cdk-constructs.TextractDPPOCDeciderProps")
@software.amazon.jsii.Jsii.Proxy(TextractDPPOCDeciderProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface TextractDPPOCDeciderProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.IFunction getDeciderFunction() {
return null;
}
/**
* List of PolicyStatements to attach to the Lambda function for S3 GET and LIST.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getInputPolicyStatements() {
return null;
}
/**
* log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL.
*
* Default: = DEBUG
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getLambdaLogLevel() {
return null;
}
/**
* memory of Lambda function (may need to increase for larger documents).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getLambdaMemoryMB() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getLambdaTimeout() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getS3InputBucket() {
return null;
}
/**
* prefix for the incoming document.
*
* Will be used to create role
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getS3InputPrefix() {
return null;
}
/**
* retyr backoff rate.
*
* Default: is 1.1
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getTextractDeciderBackoffRate() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getTextractDeciderInterval() {
return null;
}
/**
* number of retries in Step Function flow.
*
* Default: is 100
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getTextractDeciderMaxRetries() {
return null;
}
/**
* @return a {@link Builder} of {@link TextractDPPOCDeciderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link TextractDPPOCDeciderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.lambda.IFunction deciderFunction;
java.util.List inputPolicyStatements;
java.lang.String lambdaLogLevel;
java.lang.Number lambdaMemoryMb;
java.lang.Number lambdaTimeout;
java.lang.String s3InputBucket;
java.lang.String s3InputPrefix;
java.lang.Number textractDeciderBackoffRate;
java.lang.Number textractDeciderInterval;
java.lang.Number textractDeciderMaxRetries;
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getDeciderFunction}
* @param deciderFunction the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deciderFunction(software.amazon.awscdk.services.lambda.IFunction deciderFunction) {
this.deciderFunction = deciderFunction;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getInputPolicyStatements}
* @param inputPolicyStatements List of PolicyStatements to attach to the Lambda function for S3 GET and LIST.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder inputPolicyStatements(java.util.List extends software.amazon.awscdk.services.iam.PolicyStatement> inputPolicyStatements) {
this.inputPolicyStatements = (java.util.List)inputPolicyStatements;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getLambdaLogLevel}
* @param lambdaLogLevel log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambdaLogLevel(java.lang.String lambdaLogLevel) {
this.lambdaLogLevel = lambdaLogLevel;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getLambdaMemoryMb}
* @param lambdaMemoryMb memory of Lambda function (may need to increase for larger documents).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambdaMemoryMb(java.lang.Number lambdaMemoryMb) {
this.lambdaMemoryMb = lambdaMemoryMb;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getLambdaTimeout}
* @param lambdaTimeout the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambdaTimeout(java.lang.Number lambdaTimeout) {
this.lambdaTimeout = lambdaTimeout;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getS3InputBucket}
* @param s3InputBucket the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3InputBucket(java.lang.String s3InputBucket) {
this.s3InputBucket = s3InputBucket;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getS3InputPrefix}
* @param s3InputPrefix prefix for the incoming document.
* Will be used to create role
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3InputPrefix(java.lang.String s3InputPrefix) {
this.s3InputPrefix = s3InputPrefix;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getTextractDeciderBackoffRate}
* @param textractDeciderBackoffRate retyr backoff rate.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder textractDeciderBackoffRate(java.lang.Number textractDeciderBackoffRate) {
this.textractDeciderBackoffRate = textractDeciderBackoffRate;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getTextractDeciderInterval}
* @param textractDeciderInterval the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder textractDeciderInterval(java.lang.Number textractDeciderInterval) {
this.textractDeciderInterval = textractDeciderInterval;
return this;
}
/**
* Sets the value of {@link TextractDPPOCDeciderProps#getTextractDeciderMaxRetries}
* @param textractDeciderMaxRetries number of retries in Step Function flow.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder textractDeciderMaxRetries(java.lang.Number textractDeciderMaxRetries) {
this.textractDeciderMaxRetries = textractDeciderMaxRetries;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link TextractDPPOCDeciderProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public TextractDPPOCDeciderProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link TextractDPPOCDeciderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TextractDPPOCDeciderProps {
private final software.amazon.awscdk.services.lambda.IFunction deciderFunction;
private final java.util.List inputPolicyStatements;
private final java.lang.String lambdaLogLevel;
private final java.lang.Number lambdaMemoryMb;
private final java.lang.Number lambdaTimeout;
private final java.lang.String s3InputBucket;
private final java.lang.String s3InputPrefix;
private final java.lang.Number textractDeciderBackoffRate;
private final java.lang.Number textractDeciderInterval;
private final java.lang.Number textractDeciderMaxRetries;
/**
* 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.deciderFunction = software.amazon.jsii.Kernel.get(this, "deciderFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class));
this.inputPolicyStatements = software.amazon.jsii.Kernel.get(this, "inputPolicyStatements", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.PolicyStatement.class)));
this.lambdaLogLevel = software.amazon.jsii.Kernel.get(this, "lambdaLogLevel", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.lambdaMemoryMb = software.amazon.jsii.Kernel.get(this, "lambdaMemoryMB", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.lambdaTimeout = software.amazon.jsii.Kernel.get(this, "lambdaTimeout", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.s3InputBucket = software.amazon.jsii.Kernel.get(this, "s3InputBucket", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.s3InputPrefix = software.amazon.jsii.Kernel.get(this, "s3InputPrefix", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.textractDeciderBackoffRate = software.amazon.jsii.Kernel.get(this, "textractDeciderBackoffRate", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.textractDeciderInterval = software.amazon.jsii.Kernel.get(this, "textractDeciderInterval", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.textractDeciderMaxRetries = software.amazon.jsii.Kernel.get(this, "textractDeciderMaxRetries", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.deciderFunction = builder.deciderFunction;
this.inputPolicyStatements = (java.util.List)builder.inputPolicyStatements;
this.lambdaLogLevel = builder.lambdaLogLevel;
this.lambdaMemoryMb = builder.lambdaMemoryMb;
this.lambdaTimeout = builder.lambdaTimeout;
this.s3InputBucket = builder.s3InputBucket;
this.s3InputPrefix = builder.s3InputPrefix;
this.textractDeciderBackoffRate = builder.textractDeciderBackoffRate;
this.textractDeciderInterval = builder.textractDeciderInterval;
this.textractDeciderMaxRetries = builder.textractDeciderMaxRetries;
}
@Override
public final software.amazon.awscdk.services.lambda.IFunction getDeciderFunction() {
return this.deciderFunction;
}
@Override
public final java.util.List getInputPolicyStatements() {
return this.inputPolicyStatements;
}
@Override
public final java.lang.String getLambdaLogLevel() {
return this.lambdaLogLevel;
}
@Override
public final java.lang.Number getLambdaMemoryMB() {
return this.lambdaMemoryMb;
}
@Override
public final java.lang.Number getLambdaTimeout() {
return this.lambdaTimeout;
}
@Override
public final java.lang.String getS3InputBucket() {
return this.s3InputBucket;
}
@Override
public final java.lang.String getS3InputPrefix() {
return this.s3InputPrefix;
}
@Override
public final java.lang.Number getTextractDeciderBackoffRate() {
return this.textractDeciderBackoffRate;
}
@Override
public final java.lang.Number getTextractDeciderInterval() {
return this.textractDeciderInterval;
}
@Override
public final java.lang.Number getTextractDeciderMaxRetries() {
return this.textractDeciderMaxRetries;
}
@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.getDeciderFunction() != null) {
data.set("deciderFunction", om.valueToTree(this.getDeciderFunction()));
}
if (this.getInputPolicyStatements() != null) {
data.set("inputPolicyStatements", om.valueToTree(this.getInputPolicyStatements()));
}
if (this.getLambdaLogLevel() != null) {
data.set("lambdaLogLevel", om.valueToTree(this.getLambdaLogLevel()));
}
if (this.getLambdaMemoryMB() != null) {
data.set("lambdaMemoryMB", om.valueToTree(this.getLambdaMemoryMB()));
}
if (this.getLambdaTimeout() != null) {
data.set("lambdaTimeout", om.valueToTree(this.getLambdaTimeout()));
}
if (this.getS3InputBucket() != null) {
data.set("s3InputBucket", om.valueToTree(this.getS3InputBucket()));
}
if (this.getS3InputPrefix() != null) {
data.set("s3InputPrefix", om.valueToTree(this.getS3InputPrefix()));
}
if (this.getTextractDeciderBackoffRate() != null) {
data.set("textractDeciderBackoffRate", om.valueToTree(this.getTextractDeciderBackoffRate()));
}
if (this.getTextractDeciderInterval() != null) {
data.set("textractDeciderInterval", om.valueToTree(this.getTextractDeciderInterval()));
}
if (this.getTextractDeciderMaxRetries() != null) {
data.set("textractDeciderMaxRetries", om.valueToTree(this.getTextractDeciderMaxRetries()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("amazon-textract-idp-cdk-constructs.TextractDPPOCDeciderProps"));
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;
TextractDPPOCDeciderProps.Jsii$Proxy that = (TextractDPPOCDeciderProps.Jsii$Proxy) o;
if (this.deciderFunction != null ? !this.deciderFunction.equals(that.deciderFunction) : that.deciderFunction != null) return false;
if (this.inputPolicyStatements != null ? !this.inputPolicyStatements.equals(that.inputPolicyStatements) : that.inputPolicyStatements != null) return false;
if (this.lambdaLogLevel != null ? !this.lambdaLogLevel.equals(that.lambdaLogLevel) : that.lambdaLogLevel != null) return false;
if (this.lambdaMemoryMb != null ? !this.lambdaMemoryMb.equals(that.lambdaMemoryMb) : that.lambdaMemoryMb != null) return false;
if (this.lambdaTimeout != null ? !this.lambdaTimeout.equals(that.lambdaTimeout) : that.lambdaTimeout != null) return false;
if (this.s3InputBucket != null ? !this.s3InputBucket.equals(that.s3InputBucket) : that.s3InputBucket != null) return false;
if (this.s3InputPrefix != null ? !this.s3InputPrefix.equals(that.s3InputPrefix) : that.s3InputPrefix != null) return false;
if (this.textractDeciderBackoffRate != null ? !this.textractDeciderBackoffRate.equals(that.textractDeciderBackoffRate) : that.textractDeciderBackoffRate != null) return false;
if (this.textractDeciderInterval != null ? !this.textractDeciderInterval.equals(that.textractDeciderInterval) : that.textractDeciderInterval != null) return false;
return this.textractDeciderMaxRetries != null ? this.textractDeciderMaxRetries.equals(that.textractDeciderMaxRetries) : that.textractDeciderMaxRetries == null;
}
@Override
public final int hashCode() {
int result = this.deciderFunction != null ? this.deciderFunction.hashCode() : 0;
result = 31 * result + (this.inputPolicyStatements != null ? this.inputPolicyStatements.hashCode() : 0);
result = 31 * result + (this.lambdaLogLevel != null ? this.lambdaLogLevel.hashCode() : 0);
result = 31 * result + (this.lambdaMemoryMb != null ? this.lambdaMemoryMb.hashCode() : 0);
result = 31 * result + (this.lambdaTimeout != null ? this.lambdaTimeout.hashCode() : 0);
result = 31 * result + (this.s3InputBucket != null ? this.s3InputBucket.hashCode() : 0);
result = 31 * result + (this.s3InputPrefix != null ? this.s3InputPrefix.hashCode() : 0);
result = 31 * result + (this.textractDeciderBackoffRate != null ? this.textractDeciderBackoffRate.hashCode() : 0);
result = 31 * result + (this.textractDeciderInterval != null ? this.textractDeciderInterval.hashCode() : 0);
result = 31 * result + (this.textractDeciderMaxRetries != null ? this.textractDeciderMaxRetries.hashCode() : 0);
return result;
}
}
}