software.amazon.textract.idp.SearchablePDFProps 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.323Z")
@software.amazon.jsii.Jsii(module = software.amazon.textract.idp.$Module.class, fqn = "amazon-textract-idp-cdk-constructs.SearchablePDFProps")
@software.amazon.jsii.Jsii.Proxy(SearchablePDFProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface SearchablePDFProps extends software.amazon.jsii.JsiiSerializable {
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getS3PDFBucket() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getS3TextractOutputBucket() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.IFunction getSearchablePDFFunction() {
return null;
}
/**
* @return a {@link Builder} of {@link SearchablePDFProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SearchablePDFProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List inputPolicyStatements;
java.lang.Number lambdaMemoryMb;
java.lang.Number lambdaTimeout;
java.lang.String s3InputPrefix;
java.lang.String s3PdfBucket;
java.lang.String s3TextractOutputBucket;
software.amazon.awscdk.services.lambda.IFunction searchablePdfFunction;
/**
* Sets the value of {@link SearchablePDFProps#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 SearchablePDFProps#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 SearchablePDFProps#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 SearchablePDFProps#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 SearchablePDFProps#getS3PdfBucket}
* @param s3PdfBucket the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3PdfBucket(java.lang.String s3PdfBucket) {
this.s3PdfBucket = s3PdfBucket;
return this;
}
/**
* Sets the value of {@link SearchablePDFProps#getS3TextractOutputBucket}
* @param s3TextractOutputBucket the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3TextractOutputBucket(java.lang.String s3TextractOutputBucket) {
this.s3TextractOutputBucket = s3TextractOutputBucket;
return this;
}
/**
* Sets the value of {@link SearchablePDFProps#getSearchablePdfFunction}
* @param searchablePdfFunction the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder searchablePdfFunction(software.amazon.awscdk.services.lambda.IFunction searchablePdfFunction) {
this.searchablePdfFunction = searchablePdfFunction;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SearchablePDFProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public SearchablePDFProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SearchablePDFProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SearchablePDFProps {
private final java.util.List inputPolicyStatements;
private final java.lang.Number lambdaMemoryMb;
private final java.lang.Number lambdaTimeout;
private final java.lang.String s3InputPrefix;
private final java.lang.String s3PdfBucket;
private final java.lang.String s3TextractOutputBucket;
private final software.amazon.awscdk.services.lambda.IFunction searchablePdfFunction;
/**
* 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.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.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.s3InputPrefix = software.amazon.jsii.Kernel.get(this, "s3InputPrefix", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.s3PdfBucket = software.amazon.jsii.Kernel.get(this, "s3PDFBucket", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.s3TextractOutputBucket = software.amazon.jsii.Kernel.get(this, "s3TextractOutputBucket", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.searchablePdfFunction = software.amazon.jsii.Kernel.get(this, "searchablePDFFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.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.inputPolicyStatements = (java.util.List)builder.inputPolicyStatements;
this.lambdaMemoryMb = builder.lambdaMemoryMb;
this.lambdaTimeout = builder.lambdaTimeout;
this.s3InputPrefix = builder.s3InputPrefix;
this.s3PdfBucket = builder.s3PdfBucket;
this.s3TextractOutputBucket = builder.s3TextractOutputBucket;
this.searchablePdfFunction = builder.searchablePdfFunction;
}
@Override
public final java.util.List getInputPolicyStatements() {
return this.inputPolicyStatements;
}
@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 getS3InputPrefix() {
return this.s3InputPrefix;
}
@Override
public final java.lang.String getS3PDFBucket() {
return this.s3PdfBucket;
}
@Override
public final java.lang.String getS3TextractOutputBucket() {
return this.s3TextractOutputBucket;
}
@Override
public final software.amazon.awscdk.services.lambda.IFunction getSearchablePDFFunction() {
return this.searchablePdfFunction;
}
@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.getInputPolicyStatements() != null) {
data.set("inputPolicyStatements", om.valueToTree(this.getInputPolicyStatements()));
}
if (this.getLambdaMemoryMB() != null) {
data.set("lambdaMemoryMB", om.valueToTree(this.getLambdaMemoryMB()));
}
if (this.getLambdaTimeout() != null) {
data.set("lambdaTimeout", om.valueToTree(this.getLambdaTimeout()));
}
if (this.getS3InputPrefix() != null) {
data.set("s3InputPrefix", om.valueToTree(this.getS3InputPrefix()));
}
if (this.getS3PDFBucket() != null) {
data.set("s3PDFBucket", om.valueToTree(this.getS3PDFBucket()));
}
if (this.getS3TextractOutputBucket() != null) {
data.set("s3TextractOutputBucket", om.valueToTree(this.getS3TextractOutputBucket()));
}
if (this.getSearchablePDFFunction() != null) {
data.set("searchablePDFFunction", om.valueToTree(this.getSearchablePDFFunction()));
}
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.SearchablePDFProps"));
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;
SearchablePDFProps.Jsii$Proxy that = (SearchablePDFProps.Jsii$Proxy) o;
if (this.inputPolicyStatements != null ? !this.inputPolicyStatements.equals(that.inputPolicyStatements) : that.inputPolicyStatements != 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.s3InputPrefix != null ? !this.s3InputPrefix.equals(that.s3InputPrefix) : that.s3InputPrefix != null) return false;
if (this.s3PdfBucket != null ? !this.s3PdfBucket.equals(that.s3PdfBucket) : that.s3PdfBucket != null) return false;
if (this.s3TextractOutputBucket != null ? !this.s3TextractOutputBucket.equals(that.s3TextractOutputBucket) : that.s3TextractOutputBucket != null) return false;
return this.searchablePdfFunction != null ? this.searchablePdfFunction.equals(that.searchablePdfFunction) : that.searchablePdfFunction == null;
}
@Override
public final int hashCode() {
int result = this.inputPolicyStatements != null ? this.inputPolicyStatements.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.s3InputPrefix != null ? this.s3InputPrefix.hashCode() : 0);
result = 31 * result + (this.s3PdfBucket != null ? this.s3PdfBucket.hashCode() : 0);
result = 31 * result + (this.s3TextractOutputBucket != null ? this.s3TextractOutputBucket.hashCode() : 0);
result = 31 * result + (this.searchablePdfFunction != null ? this.searchablePdfFunction.hashCode() : 0);
return result;
}
}
}