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

software.amazon.textract.idp.TextractPOCDecider Maven / Gradle / Ivy

There is a newer version: 0.0.43
Show newest version
package software.amazon.textract.idp;

/**
 * This construct takes in a manifest definition or a plain JSON with a s3Path:.
 * 

* example s3Path: * {"s3Path": "s3://bucketname/prefix/image.png"} *

* Then it generated the numberOfPages attribute and the mime on the context. * The mime types checked against the supported mime types for Textract and if fails, will raise an Exception failing the workflow. *

* Example (Python) *

*

 * decider_task_id = tcdk.TextractPOCDecider(
 *      self,
 *      f"InsuranceDecider",
 * )
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.90.0 (build d6bdb4d)", date = "2023-10-26T15:43:30.376Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Jsii(module = software.amazon.textract.idp.$Module.class, fqn = "amazon-textract-idp-cdk-constructs.TextractPOCDecider") public class TextractPOCDecider extends software.amazon.awscdk.services.stepfunctions.StateMachineFragment { protected TextractPOCDecider(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected TextractPOCDecider(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param parent This parameter is required. * @param id Descriptive identifier for this chainable. This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public TextractPOCDecider(final @org.jetbrains.annotations.NotNull software.constructs.Construct parent, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.textract.idp.TextractDPPOCDeciderProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(parent, "parent is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getDeciderFunction() { return software.amazon.jsii.Kernel.get(this, "deciderFunction", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class)); } /** * The states to chain onto if this fragment is used. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getEndStates() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "endStates", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.INextable.class)))); } /** * The start state of this state machine fragment. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.State getStartState() { return software.amazon.jsii.Kernel.get(this, "startState", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.State.class)); } /** * A fluent builder for {@link software.amazon.textract.idp.TextractPOCDecider}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param parent This parameter is required. * @param id Descriptive identifier for this chainable. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.constructs.Construct parent, final java.lang.String id) { return new Builder(parent, id); } private final software.constructs.Construct parent; private final java.lang.String id; private final software.amazon.textract.idp.TextractDPPOCDeciderProps.Builder props; private Builder(final software.constructs.Construct parent, final java.lang.String id) { this.parent = parent; this.id = id; this.props = new software.amazon.textract.idp.TextractDPPOCDeciderProps.Builder(); } /** * @return {@code this} * @param deciderFunction This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder deciderFunction(final software.amazon.awscdk.services.lambda.IFunction deciderFunction) { this.props.deciderFunction(deciderFunction); return this; } /** * List of PolicyStatements to attach to the Lambda function for S3 GET and LIST. *

* @return {@code this} * @param inputPolicyStatements List of PolicyStatements to attach to the Lambda function for S3 GET and LIST. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder inputPolicyStatements(final java.util.List inputPolicyStatements) { this.props.inputPolicyStatements(inputPolicyStatements); return this; } /** * log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL. *

* Default: = DEBUG *

* @return {@code this} * @param lambdaLogLevel log level for Lambda function, supports DEBUG|INFO|WARNING|ERROR|FATAL. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaLogLevel(final java.lang.String lambdaLogLevel) { this.props.lambdaLogLevel(lambdaLogLevel); return this; } /** * memory of Lambda function (may need to increase for larger documents). *

* @return {@code this} * @param lambdaMemoryMb memory of Lambda function (may need to increase for larger documents). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaMemoryMb(final java.lang.Number lambdaMemoryMb) { this.props.lambdaMemoryMb(lambdaMemoryMb); return this; } /** * @return {@code this} * @param lambdaTimeout This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder lambdaTimeout(final java.lang.Number lambdaTimeout) { this.props.lambdaTimeout(lambdaTimeout); return this; } /** * @return {@code this} * @param s3InputBucket This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder s3InputBucket(final java.lang.String s3InputBucket) { this.props.s3InputBucket(s3InputBucket); return this; } /** * prefix for the incoming document. *

* Will be used to create role *

* @return {@code this} * @param s3InputPrefix prefix for the incoming document. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder s3InputPrefix(final java.lang.String s3InputPrefix) { this.props.s3InputPrefix(s3InputPrefix); return this; } /** * retyr backoff rate. *

* Default: is 1.1 *

* @return {@code this} * @param textractDeciderBackoffRate retyr backoff rate. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractDeciderBackoffRate(final java.lang.Number textractDeciderBackoffRate) { this.props.textractDeciderBackoffRate(textractDeciderBackoffRate); return this; } /** * @return {@code this} * @param textractDeciderInterval This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractDeciderInterval(final java.lang.Number textractDeciderInterval) { this.props.textractDeciderInterval(textractDeciderInterval); return this; } /** * number of retries in Step Function flow. *

* Default: is 100 *

* @return {@code this} * @param textractDeciderMaxRetries number of retries in Step Function flow. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder textractDeciderMaxRetries(final java.lang.Number textractDeciderMaxRetries) { this.props.textractDeciderMaxRetries(textractDeciderMaxRetries); return this; } /** * @return a newly built instance of {@link software.amazon.textract.idp.TextractPOCDecider}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.textract.idp.TextractPOCDecider build() { return new software.amazon.textract.idp.TextractPOCDecider( this.parent, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy