{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Textract.AnalyzeDocument
(
AnalyzeDocument (..),
newAnalyzeDocument,
analyzeDocument_humanLoopConfig,
analyzeDocument_document,
analyzeDocument_featureTypes,
AnalyzeDocumentResponse (..),
newAnalyzeDocumentResponse,
analyzeDocumentResponse_documentMetadata,
analyzeDocumentResponse_blocks,
analyzeDocumentResponse_humanLoopActivationOutput,
analyzeDocumentResponse_analyzeDocumentModelVersion,
analyzeDocumentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Textract.Types
data AnalyzeDocument = AnalyzeDocument'
{
AnalyzeDocument -> Maybe HumanLoopConfig
humanLoopConfig :: Prelude.Maybe HumanLoopConfig,
AnalyzeDocument -> Document
document :: Document,
AnalyzeDocument -> [FeatureType]
featureTypes :: [FeatureType]
}
deriving (AnalyzeDocument -> AnalyzeDocument -> Bool
(AnalyzeDocument -> AnalyzeDocument -> Bool)
-> (AnalyzeDocument -> AnalyzeDocument -> Bool)
-> Eq AnalyzeDocument
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalyzeDocument -> AnalyzeDocument -> Bool
$c/= :: AnalyzeDocument -> AnalyzeDocument -> Bool
== :: AnalyzeDocument -> AnalyzeDocument -> Bool
$c== :: AnalyzeDocument -> AnalyzeDocument -> Bool
Prelude.Eq, ReadPrec [AnalyzeDocument]
ReadPrec AnalyzeDocument
Int -> ReadS AnalyzeDocument
ReadS [AnalyzeDocument]
(Int -> ReadS AnalyzeDocument)
-> ReadS [AnalyzeDocument]
-> ReadPrec AnalyzeDocument
-> ReadPrec [AnalyzeDocument]
-> Read AnalyzeDocument
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalyzeDocument]
$creadListPrec :: ReadPrec [AnalyzeDocument]
readPrec :: ReadPrec AnalyzeDocument
$creadPrec :: ReadPrec AnalyzeDocument
readList :: ReadS [AnalyzeDocument]
$creadList :: ReadS [AnalyzeDocument]
readsPrec :: Int -> ReadS AnalyzeDocument
$creadsPrec :: Int -> ReadS AnalyzeDocument
Prelude.Read, Int -> AnalyzeDocument -> ShowS
[AnalyzeDocument] -> ShowS
AnalyzeDocument -> String
(Int -> AnalyzeDocument -> ShowS)
-> (AnalyzeDocument -> String)
-> ([AnalyzeDocument] -> ShowS)
-> Show AnalyzeDocument
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalyzeDocument] -> ShowS
$cshowList :: [AnalyzeDocument] -> ShowS
show :: AnalyzeDocument -> String
$cshow :: AnalyzeDocument -> String
showsPrec :: Int -> AnalyzeDocument -> ShowS
$cshowsPrec :: Int -> AnalyzeDocument -> ShowS
Prelude.Show, (forall x. AnalyzeDocument -> Rep AnalyzeDocument x)
-> (forall x. Rep AnalyzeDocument x -> AnalyzeDocument)
-> Generic AnalyzeDocument
forall x. Rep AnalyzeDocument x -> AnalyzeDocument
forall x. AnalyzeDocument -> Rep AnalyzeDocument x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnalyzeDocument x -> AnalyzeDocument
$cfrom :: forall x. AnalyzeDocument -> Rep AnalyzeDocument x
Prelude.Generic)
newAnalyzeDocument ::
Document ->
AnalyzeDocument
newAnalyzeDocument :: Document -> AnalyzeDocument
newAnalyzeDocument Document
pDocument_ =
AnalyzeDocument' :: Maybe HumanLoopConfig
-> Document -> [FeatureType] -> AnalyzeDocument
AnalyzeDocument'
{ $sel:humanLoopConfig:AnalyzeDocument' :: Maybe HumanLoopConfig
humanLoopConfig = Maybe HumanLoopConfig
forall a. Maybe a
Prelude.Nothing,
$sel:document:AnalyzeDocument' :: Document
document = Document
pDocument_,
$sel:featureTypes:AnalyzeDocument' :: [FeatureType]
featureTypes = [FeatureType]
forall a. Monoid a => a
Prelude.mempty
}
analyzeDocument_humanLoopConfig :: Lens.Lens' AnalyzeDocument (Prelude.Maybe HumanLoopConfig)
analyzeDocument_humanLoopConfig :: (Maybe HumanLoopConfig -> f (Maybe HumanLoopConfig))
-> AnalyzeDocument -> f AnalyzeDocument
analyzeDocument_humanLoopConfig = (AnalyzeDocument -> Maybe HumanLoopConfig)
-> (AnalyzeDocument -> Maybe HumanLoopConfig -> AnalyzeDocument)
-> Lens
AnalyzeDocument
AnalyzeDocument
(Maybe HumanLoopConfig)
(Maybe HumanLoopConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocument' {Maybe HumanLoopConfig
humanLoopConfig :: Maybe HumanLoopConfig
$sel:humanLoopConfig:AnalyzeDocument' :: AnalyzeDocument -> Maybe HumanLoopConfig
humanLoopConfig} -> Maybe HumanLoopConfig
humanLoopConfig) (\s :: AnalyzeDocument
s@AnalyzeDocument' {} Maybe HumanLoopConfig
a -> AnalyzeDocument
s {$sel:humanLoopConfig:AnalyzeDocument' :: Maybe HumanLoopConfig
humanLoopConfig = Maybe HumanLoopConfig
a} :: AnalyzeDocument)
analyzeDocument_document :: Lens.Lens' AnalyzeDocument Document
analyzeDocument_document :: (Document -> f Document) -> AnalyzeDocument -> f AnalyzeDocument
analyzeDocument_document = (AnalyzeDocument -> Document)
-> (AnalyzeDocument -> Document -> AnalyzeDocument)
-> Lens AnalyzeDocument AnalyzeDocument Document Document
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocument' {Document
document :: Document
$sel:document:AnalyzeDocument' :: AnalyzeDocument -> Document
document} -> Document
document) (\s :: AnalyzeDocument
s@AnalyzeDocument' {} Document
a -> AnalyzeDocument
s {$sel:document:AnalyzeDocument' :: Document
document = Document
a} :: AnalyzeDocument)
analyzeDocument_featureTypes :: Lens.Lens' AnalyzeDocument [FeatureType]
analyzeDocument_featureTypes :: ([FeatureType] -> f [FeatureType])
-> AnalyzeDocument -> f AnalyzeDocument
analyzeDocument_featureTypes = (AnalyzeDocument -> [FeatureType])
-> (AnalyzeDocument -> [FeatureType] -> AnalyzeDocument)
-> Lens AnalyzeDocument AnalyzeDocument [FeatureType] [FeatureType]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocument' {[FeatureType]
featureTypes :: [FeatureType]
$sel:featureTypes:AnalyzeDocument' :: AnalyzeDocument -> [FeatureType]
featureTypes} -> [FeatureType]
featureTypes) (\s :: AnalyzeDocument
s@AnalyzeDocument' {} [FeatureType]
a -> AnalyzeDocument
s {$sel:featureTypes:AnalyzeDocument' :: [FeatureType]
featureTypes = [FeatureType]
a} :: AnalyzeDocument) (([FeatureType] -> f [FeatureType])
-> AnalyzeDocument -> f AnalyzeDocument)
-> (([FeatureType] -> f [FeatureType])
-> [FeatureType] -> f [FeatureType])
-> ([FeatureType] -> f [FeatureType])
-> AnalyzeDocument
-> f AnalyzeDocument
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([FeatureType] -> f [FeatureType])
-> [FeatureType] -> f [FeatureType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest AnalyzeDocument where
type
AWSResponse AnalyzeDocument =
AnalyzeDocumentResponse
request :: AnalyzeDocument -> Request AnalyzeDocument
request = Service -> AnalyzeDocument -> Request AnalyzeDocument
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AnalyzeDocument
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AnalyzeDocument)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse AnalyzeDocument))
-> Logger
-> Service
-> Proxy AnalyzeDocument
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AnalyzeDocument)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe HumanLoopActivationOutput
-> Maybe Text
-> Int
-> AnalyzeDocumentResponse
AnalyzeDocumentResponse'
(Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe HumanLoopActivationOutput
-> Maybe Text
-> Int
-> AnalyzeDocumentResponse)
-> Either String (Maybe DocumentMetadata)
-> Either
String
(Maybe [Block]
-> Maybe HumanLoopActivationOutput
-> Maybe Text
-> Int
-> AnalyzeDocumentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DocumentMetadata)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DocumentMetadata")
Either
String
(Maybe [Block]
-> Maybe HumanLoopActivationOutput
-> Maybe Text
-> Int
-> AnalyzeDocumentResponse)
-> Either String (Maybe [Block])
-> Either
String
(Maybe HumanLoopActivationOutput
-> Maybe Text -> Int -> AnalyzeDocumentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Block]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Blocks" Either String (Maybe (Maybe [Block]))
-> Maybe [Block] -> Either String (Maybe [Block])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Block]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe HumanLoopActivationOutput
-> Maybe Text -> Int -> AnalyzeDocumentResponse)
-> Either String (Maybe HumanLoopActivationOutput)
-> Either String (Maybe Text -> Int -> AnalyzeDocumentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe HumanLoopActivationOutput)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HumanLoopActivationOutput")
Either String (Maybe Text -> Int -> AnalyzeDocumentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> AnalyzeDocumentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AnalyzeDocumentModelVersion")
Either String (Int -> AnalyzeDocumentResponse)
-> Either String Int -> Either String AnalyzeDocumentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable AnalyzeDocument
instance Prelude.NFData AnalyzeDocument
instance Core.ToHeaders AnalyzeDocument where
toHeaders :: AnalyzeDocument -> ResponseHeaders
toHeaders =
ResponseHeaders -> AnalyzeDocument -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"Textract.AnalyzeDocument" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON AnalyzeDocument where
toJSON :: AnalyzeDocument -> Value
toJSON AnalyzeDocument' {[FeatureType]
Maybe HumanLoopConfig
Document
featureTypes :: [FeatureType]
document :: Document
humanLoopConfig :: Maybe HumanLoopConfig
$sel:featureTypes:AnalyzeDocument' :: AnalyzeDocument -> [FeatureType]
$sel:document:AnalyzeDocument' :: AnalyzeDocument -> Document
$sel:humanLoopConfig:AnalyzeDocument' :: AnalyzeDocument -> Maybe HumanLoopConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"HumanLoopConfig" Text -> HumanLoopConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HumanLoopConfig -> Pair) -> Maybe HumanLoopConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HumanLoopConfig
humanLoopConfig,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Document" Text -> Document -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Document
document),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FeatureTypes" Text -> [FeatureType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [FeatureType]
featureTypes)
]
)
instance Core.ToPath AnalyzeDocument where
toPath :: AnalyzeDocument -> ByteString
toPath = ByteString -> AnalyzeDocument -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery AnalyzeDocument where
toQuery :: AnalyzeDocument -> QueryString
toQuery = QueryString -> AnalyzeDocument -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AnalyzeDocumentResponse = AnalyzeDocumentResponse'
{
AnalyzeDocumentResponse -> Maybe DocumentMetadata
documentMetadata :: Prelude.Maybe DocumentMetadata,
AnalyzeDocumentResponse -> Maybe [Block]
blocks :: Prelude.Maybe [Block],
AnalyzeDocumentResponse -> Maybe HumanLoopActivationOutput
humanLoopActivationOutput :: Prelude.Maybe HumanLoopActivationOutput,
AnalyzeDocumentResponse -> Maybe Text
analyzeDocumentModelVersion :: Prelude.Maybe Prelude.Text,
AnalyzeDocumentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool
(AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool)
-> (AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool)
-> Eq AnalyzeDocumentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool
$c/= :: AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool
== :: AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool
$c== :: AnalyzeDocumentResponse -> AnalyzeDocumentResponse -> Bool
Prelude.Eq, ReadPrec [AnalyzeDocumentResponse]
ReadPrec AnalyzeDocumentResponse
Int -> ReadS AnalyzeDocumentResponse
ReadS [AnalyzeDocumentResponse]
(Int -> ReadS AnalyzeDocumentResponse)
-> ReadS [AnalyzeDocumentResponse]
-> ReadPrec AnalyzeDocumentResponse
-> ReadPrec [AnalyzeDocumentResponse]
-> Read AnalyzeDocumentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalyzeDocumentResponse]
$creadListPrec :: ReadPrec [AnalyzeDocumentResponse]
readPrec :: ReadPrec AnalyzeDocumentResponse
$creadPrec :: ReadPrec AnalyzeDocumentResponse
readList :: ReadS [AnalyzeDocumentResponse]
$creadList :: ReadS [AnalyzeDocumentResponse]
readsPrec :: Int -> ReadS AnalyzeDocumentResponse
$creadsPrec :: Int -> ReadS AnalyzeDocumentResponse
Prelude.Read, Int -> AnalyzeDocumentResponse -> ShowS
[AnalyzeDocumentResponse] -> ShowS
AnalyzeDocumentResponse -> String
(Int -> AnalyzeDocumentResponse -> ShowS)
-> (AnalyzeDocumentResponse -> String)
-> ([AnalyzeDocumentResponse] -> ShowS)
-> Show AnalyzeDocumentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalyzeDocumentResponse] -> ShowS
$cshowList :: [AnalyzeDocumentResponse] -> ShowS
show :: AnalyzeDocumentResponse -> String
$cshow :: AnalyzeDocumentResponse -> String
showsPrec :: Int -> AnalyzeDocumentResponse -> ShowS
$cshowsPrec :: Int -> AnalyzeDocumentResponse -> ShowS
Prelude.Show, (forall x.
AnalyzeDocumentResponse -> Rep AnalyzeDocumentResponse x)
-> (forall x.
Rep AnalyzeDocumentResponse x -> AnalyzeDocumentResponse)
-> Generic AnalyzeDocumentResponse
forall x. Rep AnalyzeDocumentResponse x -> AnalyzeDocumentResponse
forall x. AnalyzeDocumentResponse -> Rep AnalyzeDocumentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnalyzeDocumentResponse x -> AnalyzeDocumentResponse
$cfrom :: forall x. AnalyzeDocumentResponse -> Rep AnalyzeDocumentResponse x
Prelude.Generic)
newAnalyzeDocumentResponse ::
Prelude.Int ->
AnalyzeDocumentResponse
newAnalyzeDocumentResponse :: Int -> AnalyzeDocumentResponse
newAnalyzeDocumentResponse Int
pHttpStatus_ =
AnalyzeDocumentResponse' :: Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe HumanLoopActivationOutput
-> Maybe Text
-> Int
-> AnalyzeDocumentResponse
AnalyzeDocumentResponse'
{ $sel:documentMetadata:AnalyzeDocumentResponse' :: Maybe DocumentMetadata
documentMetadata =
Maybe DocumentMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:blocks:AnalyzeDocumentResponse' :: Maybe [Block]
blocks = Maybe [Block]
forall a. Maybe a
Prelude.Nothing,
$sel:humanLoopActivationOutput:AnalyzeDocumentResponse' :: Maybe HumanLoopActivationOutput
humanLoopActivationOutput = Maybe HumanLoopActivationOutput
forall a. Maybe a
Prelude.Nothing,
$sel:analyzeDocumentModelVersion:AnalyzeDocumentResponse' :: Maybe Text
analyzeDocumentModelVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:AnalyzeDocumentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
analyzeDocumentResponse_documentMetadata :: Lens.Lens' AnalyzeDocumentResponse (Prelude.Maybe DocumentMetadata)
analyzeDocumentResponse_documentMetadata :: (Maybe DocumentMetadata -> f (Maybe DocumentMetadata))
-> AnalyzeDocumentResponse -> f AnalyzeDocumentResponse
analyzeDocumentResponse_documentMetadata = (AnalyzeDocumentResponse -> Maybe DocumentMetadata)
-> (AnalyzeDocumentResponse
-> Maybe DocumentMetadata -> AnalyzeDocumentResponse)
-> Lens
AnalyzeDocumentResponse
AnalyzeDocumentResponse
(Maybe DocumentMetadata)
(Maybe DocumentMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocumentResponse' {Maybe DocumentMetadata
documentMetadata :: Maybe DocumentMetadata
$sel:documentMetadata:AnalyzeDocumentResponse' :: AnalyzeDocumentResponse -> Maybe DocumentMetadata
documentMetadata} -> Maybe DocumentMetadata
documentMetadata) (\s :: AnalyzeDocumentResponse
s@AnalyzeDocumentResponse' {} Maybe DocumentMetadata
a -> AnalyzeDocumentResponse
s {$sel:documentMetadata:AnalyzeDocumentResponse' :: Maybe DocumentMetadata
documentMetadata = Maybe DocumentMetadata
a} :: AnalyzeDocumentResponse)
analyzeDocumentResponse_blocks :: Lens.Lens' AnalyzeDocumentResponse (Prelude.Maybe [Block])
analyzeDocumentResponse_blocks :: (Maybe [Block] -> f (Maybe [Block]))
-> AnalyzeDocumentResponse -> f AnalyzeDocumentResponse
analyzeDocumentResponse_blocks = (AnalyzeDocumentResponse -> Maybe [Block])
-> (AnalyzeDocumentResponse
-> Maybe [Block] -> AnalyzeDocumentResponse)
-> Lens
AnalyzeDocumentResponse
AnalyzeDocumentResponse
(Maybe [Block])
(Maybe [Block])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocumentResponse' {Maybe [Block]
blocks :: Maybe [Block]
$sel:blocks:AnalyzeDocumentResponse' :: AnalyzeDocumentResponse -> Maybe [Block]
blocks} -> Maybe [Block]
blocks) (\s :: AnalyzeDocumentResponse
s@AnalyzeDocumentResponse' {} Maybe [Block]
a -> AnalyzeDocumentResponse
s {$sel:blocks:AnalyzeDocumentResponse' :: Maybe [Block]
blocks = Maybe [Block]
a} :: AnalyzeDocumentResponse) ((Maybe [Block] -> f (Maybe [Block]))
-> AnalyzeDocumentResponse -> f AnalyzeDocumentResponse)
-> ((Maybe [Block] -> f (Maybe [Block]))
-> Maybe [Block] -> f (Maybe [Block]))
-> (Maybe [Block] -> f (Maybe [Block]))
-> AnalyzeDocumentResponse
-> f AnalyzeDocumentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Block] [Block] [Block] [Block]
-> Iso
(Maybe [Block]) (Maybe [Block]) (Maybe [Block]) (Maybe [Block])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Block] [Block] [Block] [Block]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
analyzeDocumentResponse_humanLoopActivationOutput :: Lens.Lens' AnalyzeDocumentResponse (Prelude.Maybe HumanLoopActivationOutput)
analyzeDocumentResponse_humanLoopActivationOutput :: (Maybe HumanLoopActivationOutput
-> f (Maybe HumanLoopActivationOutput))
-> AnalyzeDocumentResponse -> f AnalyzeDocumentResponse
analyzeDocumentResponse_humanLoopActivationOutput = (AnalyzeDocumentResponse -> Maybe HumanLoopActivationOutput)
-> (AnalyzeDocumentResponse
-> Maybe HumanLoopActivationOutput -> AnalyzeDocumentResponse)
-> Lens
AnalyzeDocumentResponse
AnalyzeDocumentResponse
(Maybe HumanLoopActivationOutput)
(Maybe HumanLoopActivationOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocumentResponse' {Maybe HumanLoopActivationOutput
humanLoopActivationOutput :: Maybe HumanLoopActivationOutput
$sel:humanLoopActivationOutput:AnalyzeDocumentResponse' :: AnalyzeDocumentResponse -> Maybe HumanLoopActivationOutput
humanLoopActivationOutput} -> Maybe HumanLoopActivationOutput
humanLoopActivationOutput) (\s :: AnalyzeDocumentResponse
s@AnalyzeDocumentResponse' {} Maybe HumanLoopActivationOutput
a -> AnalyzeDocumentResponse
s {$sel:humanLoopActivationOutput:AnalyzeDocumentResponse' :: Maybe HumanLoopActivationOutput
humanLoopActivationOutput = Maybe HumanLoopActivationOutput
a} :: AnalyzeDocumentResponse)
analyzeDocumentResponse_analyzeDocumentModelVersion :: Lens.Lens' AnalyzeDocumentResponse (Prelude.Maybe Prelude.Text)
analyzeDocumentResponse_analyzeDocumentModelVersion :: (Maybe Text -> f (Maybe Text))
-> AnalyzeDocumentResponse -> f AnalyzeDocumentResponse
analyzeDocumentResponse_analyzeDocumentModelVersion = (AnalyzeDocumentResponse -> Maybe Text)
-> (AnalyzeDocumentResponse
-> Maybe Text -> AnalyzeDocumentResponse)
-> Lens
AnalyzeDocumentResponse
AnalyzeDocumentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocumentResponse' {Maybe Text
analyzeDocumentModelVersion :: Maybe Text
$sel:analyzeDocumentModelVersion:AnalyzeDocumentResponse' :: AnalyzeDocumentResponse -> Maybe Text
analyzeDocumentModelVersion} -> Maybe Text
analyzeDocumentModelVersion) (\s :: AnalyzeDocumentResponse
s@AnalyzeDocumentResponse' {} Maybe Text
a -> AnalyzeDocumentResponse
s {$sel:analyzeDocumentModelVersion:AnalyzeDocumentResponse' :: Maybe Text
analyzeDocumentModelVersion = Maybe Text
a} :: AnalyzeDocumentResponse)
analyzeDocumentResponse_httpStatus :: Lens.Lens' AnalyzeDocumentResponse Prelude.Int
analyzeDocumentResponse_httpStatus :: (Int -> f Int)
-> AnalyzeDocumentResponse -> f AnalyzeDocumentResponse
analyzeDocumentResponse_httpStatus = (AnalyzeDocumentResponse -> Int)
-> (AnalyzeDocumentResponse -> Int -> AnalyzeDocumentResponse)
-> Lens AnalyzeDocumentResponse AnalyzeDocumentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzeDocumentResponse' {Int
httpStatus :: Int
$sel:httpStatus:AnalyzeDocumentResponse' :: AnalyzeDocumentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AnalyzeDocumentResponse
s@AnalyzeDocumentResponse' {} Int
a -> AnalyzeDocumentResponse
s {$sel:httpStatus:AnalyzeDocumentResponse' :: Int
httpStatus = Int
a} :: AnalyzeDocumentResponse)
instance Prelude.NFData AnalyzeDocumentResponse