{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Textract.Types
(
defaultService,
_AccessDeniedException,
_BadDocumentException,
_DocumentTooLargeException,
_HumanLoopQuotaExceededException,
_IdempotentParameterMismatchException,
_InternalServerError,
_InvalidJobIdException,
_InvalidKMSKeyException,
_InvalidParameterException,
_InvalidS3ObjectException,
_LimitExceededException,
_ProvisionedThroughputExceededException,
_ThrottlingException,
_UnsupportedDocumentException,
BlockType (..),
ContentClassifier (..),
EntityType (..),
FeatureType (..),
JobStatus (..),
RelationshipType (..),
SelectionStatus (..),
TextType (..),
ValueType (..),
AnalyzeIDDetections (..),
newAnalyzeIDDetections,
analyzeIDDetections_confidence,
analyzeIDDetections_normalizedValue,
analyzeIDDetections_text,
Block (..),
newBlock,
block_blockType,
block_columnIndex,
block_columnSpan,
block_confidence,
block_entityTypes,
block_geometry,
block_id,
block_page,
block_query,
block_relationships,
block_rowIndex,
block_rowSpan,
block_selectionStatus,
block_text,
block_textType,
BoundingBox (..),
newBoundingBox,
boundingBox_height,
boundingBox_left,
boundingBox_top,
boundingBox_width,
DetectedSignature (..),
newDetectedSignature,
detectedSignature_page,
Document (..),
newDocument,
document_bytes,
document_s3Object,
DocumentGroup (..),
newDocumentGroup,
documentGroup_detectedSignatures,
documentGroup_splitDocuments,
documentGroup_type,
documentGroup_undetectedSignatures,
DocumentLocation (..),
newDocumentLocation,
documentLocation_s3Object,
DocumentMetadata (..),
newDocumentMetadata,
documentMetadata_pages,
ExpenseCurrency (..),
newExpenseCurrency,
expenseCurrency_code,
expenseCurrency_confidence,
ExpenseDetection (..),
newExpenseDetection,
expenseDetection_confidence,
expenseDetection_geometry,
expenseDetection_text,
ExpenseDocument (..),
newExpenseDocument,
expenseDocument_blocks,
expenseDocument_expenseIndex,
expenseDocument_lineItemGroups,
expenseDocument_summaryFields,
ExpenseField (..),
newExpenseField,
expenseField_currency,
expenseField_groupProperties,
expenseField_labelDetection,
expenseField_pageNumber,
expenseField_type,
expenseField_valueDetection,
ExpenseGroupProperty (..),
newExpenseGroupProperty,
expenseGroupProperty_id,
expenseGroupProperty_types,
ExpenseType (..),
newExpenseType,
expenseType_confidence,
expenseType_text,
Extraction (..),
newExtraction,
extraction_expenseDocument,
extraction_identityDocument,
extraction_lendingDocument,
Geometry (..),
newGeometry,
geometry_boundingBox,
geometry_polygon,
HumanLoopActivationOutput (..),
newHumanLoopActivationOutput,
humanLoopActivationOutput_humanLoopActivationConditionsEvaluationResults,
humanLoopActivationOutput_humanLoopActivationReasons,
humanLoopActivationOutput_humanLoopArn,
HumanLoopConfig (..),
newHumanLoopConfig,
humanLoopConfig_dataAttributes,
humanLoopConfig_humanLoopName,
humanLoopConfig_flowDefinitionArn,
HumanLoopDataAttributes (..),
newHumanLoopDataAttributes,
humanLoopDataAttributes_contentClassifiers,
IdentityDocument (..),
newIdentityDocument,
identityDocument_blocks,
identityDocument_documentIndex,
identityDocument_identityDocumentFields,
IdentityDocumentField (..),
newIdentityDocumentField,
identityDocumentField_type,
identityDocumentField_valueDetection,
LendingDetection (..),
newLendingDetection,
lendingDetection_confidence,
lendingDetection_geometry,
lendingDetection_selectionStatus,
lendingDetection_text,
LendingDocument (..),
newLendingDocument,
lendingDocument_lendingFields,
lendingDocument_signatureDetections,
LendingField (..),
newLendingField,
lendingField_keyDetection,
lendingField_type,
lendingField_valueDetections,
LendingResult (..),
newLendingResult,
lendingResult_extractions,
lendingResult_page,
lendingResult_pageClassification,
LendingSummary (..),
newLendingSummary,
lendingSummary_documentGroups,
lendingSummary_undetectedDocumentTypes,
LineItemFields (..),
newLineItemFields,
lineItemFields_lineItemExpenseFields,
LineItemGroup (..),
newLineItemGroup,
lineItemGroup_lineItemGroupIndex,
lineItemGroup_lineItems,
NormalizedValue (..),
newNormalizedValue,
normalizedValue_value,
normalizedValue_valueType,
NotificationChannel (..),
newNotificationChannel,
notificationChannel_sNSTopicArn,
notificationChannel_roleArn,
OutputConfig (..),
newOutputConfig,
outputConfig_s3Prefix,
outputConfig_s3Bucket,
PageClassification (..),
newPageClassification,
pageClassification_pageType,
pageClassification_pageNumber,
Point (..),
newPoint,
point_x,
point_y,
Prediction (..),
newPrediction,
prediction_confidence,
prediction_value,
QueriesConfig (..),
newQueriesConfig,
queriesConfig_queries,
Query (..),
newQuery,
query_alias,
query_pages,
query_text,
Relationship (..),
newRelationship,
relationship_ids,
relationship_type,
S3Object (..),
newS3Object,
s3Object_bucket,
s3Object_name,
s3Object_version,
SignatureDetection (..),
newSignatureDetection,
signatureDetection_confidence,
signatureDetection_geometry,
SplitDocument (..),
newSplitDocument,
splitDocument_index,
splitDocument_pages,
UndetectedSignature (..),
newUndetectedSignature,
undetectedSignature_page,
Warning (..),
newWarning,
warning_errorCode,
warning_pages,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
import Amazonka.Textract.Types.AnalyzeIDDetections
import Amazonka.Textract.Types.Block
import Amazonka.Textract.Types.BlockType
import Amazonka.Textract.Types.BoundingBox
import Amazonka.Textract.Types.ContentClassifier
import Amazonka.Textract.Types.DetectedSignature
import Amazonka.Textract.Types.Document
import Amazonka.Textract.Types.DocumentGroup
import Amazonka.Textract.Types.DocumentLocation
import Amazonka.Textract.Types.DocumentMetadata
import Amazonka.Textract.Types.EntityType
import Amazonka.Textract.Types.ExpenseCurrency
import Amazonka.Textract.Types.ExpenseDetection
import Amazonka.Textract.Types.ExpenseDocument
import Amazonka.Textract.Types.ExpenseField
import Amazonka.Textract.Types.ExpenseGroupProperty
import Amazonka.Textract.Types.ExpenseType
import Amazonka.Textract.Types.Extraction
import Amazonka.Textract.Types.FeatureType
import Amazonka.Textract.Types.Geometry
import Amazonka.Textract.Types.HumanLoopActivationOutput
import Amazonka.Textract.Types.HumanLoopConfig
import Amazonka.Textract.Types.HumanLoopDataAttributes
import Amazonka.Textract.Types.IdentityDocument
import Amazonka.Textract.Types.IdentityDocumentField
import Amazonka.Textract.Types.JobStatus
import Amazonka.Textract.Types.LendingDetection
import Amazonka.Textract.Types.LendingDocument
import Amazonka.Textract.Types.LendingField
import Amazonka.Textract.Types.LendingResult
import Amazonka.Textract.Types.LendingSummary
import Amazonka.Textract.Types.LineItemFields
import Amazonka.Textract.Types.LineItemGroup
import Amazonka.Textract.Types.NormalizedValue
import Amazonka.Textract.Types.NotificationChannel
import Amazonka.Textract.Types.OutputConfig
import Amazonka.Textract.Types.PageClassification
import Amazonka.Textract.Types.Point
import Amazonka.Textract.Types.Prediction
import Amazonka.Textract.Types.QueriesConfig
import Amazonka.Textract.Types.Query
import Amazonka.Textract.Types.Relationship
import Amazonka.Textract.Types.RelationshipType
import Amazonka.Textract.Types.S3Object
import Amazonka.Textract.Types.SelectionStatus
import Amazonka.Textract.Types.SignatureDetection
import Amazonka.Textract.Types.SplitDocument
import Amazonka.Textract.Types.TextType
import Amazonka.Textract.Types.UndetectedSignature
import Amazonka.Textract.Types.ValueType
import Amazonka.Textract.Types.Warning
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"Textract",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"textract",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"textract",
$sel:version:Service :: ByteString
Core.version = ByteString
"2018-06-27",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Textract",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
_BadDocumentException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BadDocumentException :: forall a. AsError a => Fold a ServiceError
_BadDocumentException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"BadDocumentException"
_DocumentTooLargeException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DocumentTooLargeException :: forall a. AsError a => Fold a ServiceError
_DocumentTooLargeException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DocumentTooLargeException"
_HumanLoopQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_HumanLoopQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_HumanLoopQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"HumanLoopQuotaExceededException"
_IdempotentParameterMismatchException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_IdempotentParameterMismatchException :: forall a. AsError a => Fold a ServiceError
_IdempotentParameterMismatchException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"IdempotentParameterMismatchException"
_InternalServerError :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerError :: forall a. AsError a => Fold a ServiceError
_InternalServerError =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerError"
_InvalidJobIdException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidJobIdException :: forall a. AsError a => Fold a ServiceError
_InvalidJobIdException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidJobIdException"
_InvalidKMSKeyException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidKMSKeyException :: forall a. AsError a => Fold a ServiceError
_InvalidKMSKeyException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidKMSKeyException"
_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidParameterException :: forall a. AsError a => Fold a ServiceError
_InvalidParameterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidParameterException"
_InvalidS3ObjectException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidS3ObjectException :: forall a. AsError a => Fold a ServiceError
_InvalidS3ObjectException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidS3ObjectException"
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"
_ProvisionedThroughputExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ProvisionedThroughputExceededException :: forall a. AsError a => Fold a ServiceError
_ProvisionedThroughputExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ProvisionedThroughputExceededException"
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
_UnsupportedDocumentException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedDocumentException :: forall a. AsError a => Fold a ServiceError
_UnsupportedDocumentException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedDocumentException"