{-# 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.GetDocumentAnalysis
(
GetDocumentAnalysis (..),
newGetDocumentAnalysis,
getDocumentAnalysis_nextToken,
getDocumentAnalysis_maxResults,
getDocumentAnalysis_jobId,
GetDocumentAnalysisResponse (..),
newGetDocumentAnalysisResponse,
getDocumentAnalysisResponse_documentMetadata,
getDocumentAnalysisResponse_blocks,
getDocumentAnalysisResponse_analyzeDocumentModelVersion,
getDocumentAnalysisResponse_warnings,
getDocumentAnalysisResponse_nextToken,
getDocumentAnalysisResponse_statusMessage,
getDocumentAnalysisResponse_jobStatus,
getDocumentAnalysisResponse_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 GetDocumentAnalysis = GetDocumentAnalysis'
{
GetDocumentAnalysis -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetDocumentAnalysis -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetDocumentAnalysis -> Text
jobId :: Prelude.Text
}
deriving (GetDocumentAnalysis -> GetDocumentAnalysis -> Bool
(GetDocumentAnalysis -> GetDocumentAnalysis -> Bool)
-> (GetDocumentAnalysis -> GetDocumentAnalysis -> Bool)
-> Eq GetDocumentAnalysis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentAnalysis -> GetDocumentAnalysis -> Bool
$c/= :: GetDocumentAnalysis -> GetDocumentAnalysis -> Bool
== :: GetDocumentAnalysis -> GetDocumentAnalysis -> Bool
$c== :: GetDocumentAnalysis -> GetDocumentAnalysis -> Bool
Prelude.Eq, ReadPrec [GetDocumentAnalysis]
ReadPrec GetDocumentAnalysis
Int -> ReadS GetDocumentAnalysis
ReadS [GetDocumentAnalysis]
(Int -> ReadS GetDocumentAnalysis)
-> ReadS [GetDocumentAnalysis]
-> ReadPrec GetDocumentAnalysis
-> ReadPrec [GetDocumentAnalysis]
-> Read GetDocumentAnalysis
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentAnalysis]
$creadListPrec :: ReadPrec [GetDocumentAnalysis]
readPrec :: ReadPrec GetDocumentAnalysis
$creadPrec :: ReadPrec GetDocumentAnalysis
readList :: ReadS [GetDocumentAnalysis]
$creadList :: ReadS [GetDocumentAnalysis]
readsPrec :: Int -> ReadS GetDocumentAnalysis
$creadsPrec :: Int -> ReadS GetDocumentAnalysis
Prelude.Read, Int -> GetDocumentAnalysis -> ShowS
[GetDocumentAnalysis] -> ShowS
GetDocumentAnalysis -> String
(Int -> GetDocumentAnalysis -> ShowS)
-> (GetDocumentAnalysis -> String)
-> ([GetDocumentAnalysis] -> ShowS)
-> Show GetDocumentAnalysis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentAnalysis] -> ShowS
$cshowList :: [GetDocumentAnalysis] -> ShowS
show :: GetDocumentAnalysis -> String
$cshow :: GetDocumentAnalysis -> String
showsPrec :: Int -> GetDocumentAnalysis -> ShowS
$cshowsPrec :: Int -> GetDocumentAnalysis -> ShowS
Prelude.Show, (forall x. GetDocumentAnalysis -> Rep GetDocumentAnalysis x)
-> (forall x. Rep GetDocumentAnalysis x -> GetDocumentAnalysis)
-> Generic GetDocumentAnalysis
forall x. Rep GetDocumentAnalysis x -> GetDocumentAnalysis
forall x. GetDocumentAnalysis -> Rep GetDocumentAnalysis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDocumentAnalysis x -> GetDocumentAnalysis
$cfrom :: forall x. GetDocumentAnalysis -> Rep GetDocumentAnalysis x
Prelude.Generic)
newGetDocumentAnalysis ::
Prelude.Text ->
GetDocumentAnalysis
newGetDocumentAnalysis :: Text -> GetDocumentAnalysis
newGetDocumentAnalysis Text
pJobId_ =
GetDocumentAnalysis' :: Maybe Text -> Maybe Natural -> Text -> GetDocumentAnalysis
GetDocumentAnalysis'
{ $sel:nextToken:GetDocumentAnalysis' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetDocumentAnalysis' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:GetDocumentAnalysis' :: Text
jobId = Text
pJobId_
}
getDocumentAnalysis_nextToken :: Lens.Lens' GetDocumentAnalysis (Prelude.Maybe Prelude.Text)
getDocumentAnalysis_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDocumentAnalysis -> f GetDocumentAnalysis
getDocumentAnalysis_nextToken = (GetDocumentAnalysis -> Maybe Text)
-> (GetDocumentAnalysis -> Maybe Text -> GetDocumentAnalysis)
-> Lens
GetDocumentAnalysis GetDocumentAnalysis (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysis' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDocumentAnalysis' :: GetDocumentAnalysis -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDocumentAnalysis
s@GetDocumentAnalysis' {} Maybe Text
a -> GetDocumentAnalysis
s {$sel:nextToken:GetDocumentAnalysis' :: Maybe Text
nextToken = Maybe Text
a} :: GetDocumentAnalysis)
getDocumentAnalysis_maxResults :: Lens.Lens' GetDocumentAnalysis (Prelude.Maybe Prelude.Natural)
getDocumentAnalysis_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetDocumentAnalysis -> f GetDocumentAnalysis
getDocumentAnalysis_maxResults = (GetDocumentAnalysis -> Maybe Natural)
-> (GetDocumentAnalysis -> Maybe Natural -> GetDocumentAnalysis)
-> Lens
GetDocumentAnalysis
GetDocumentAnalysis
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysis' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetDocumentAnalysis' :: GetDocumentAnalysis -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetDocumentAnalysis
s@GetDocumentAnalysis' {} Maybe Natural
a -> GetDocumentAnalysis
s {$sel:maxResults:GetDocumentAnalysis' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetDocumentAnalysis)
getDocumentAnalysis_jobId :: Lens.Lens' GetDocumentAnalysis Prelude.Text
getDocumentAnalysis_jobId :: (Text -> f Text) -> GetDocumentAnalysis -> f GetDocumentAnalysis
getDocumentAnalysis_jobId = (GetDocumentAnalysis -> Text)
-> (GetDocumentAnalysis -> Text -> GetDocumentAnalysis)
-> Lens GetDocumentAnalysis GetDocumentAnalysis Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysis' {Text
jobId :: Text
$sel:jobId:GetDocumentAnalysis' :: GetDocumentAnalysis -> Text
jobId} -> Text
jobId) (\s :: GetDocumentAnalysis
s@GetDocumentAnalysis' {} Text
a -> GetDocumentAnalysis
s {$sel:jobId:GetDocumentAnalysis' :: Text
jobId = Text
a} :: GetDocumentAnalysis)
instance Core.AWSRequest GetDocumentAnalysis where
type
AWSResponse GetDocumentAnalysis =
GetDocumentAnalysisResponse
request :: GetDocumentAnalysis -> Request GetDocumentAnalysis
request = Service -> GetDocumentAnalysis -> Request GetDocumentAnalysis
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetDocumentAnalysis
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDocumentAnalysis)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDocumentAnalysis))
-> Logger
-> Service
-> Proxy GetDocumentAnalysis
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDocumentAnalysis)))
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 Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse
GetDocumentAnalysisResponse'
(Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
-> Either String (Maybe DocumentMetadata)
-> Either
String
(Maybe [Block]
-> Maybe Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
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 Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
-> Either String (Maybe [Block])
-> Either
String
(Maybe Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
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 Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
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
(Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
-> Either String (Maybe [Warning])
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Warning]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Warnings" Either String (Maybe (Maybe [Warning]))
-> Maybe [Warning] -> Either String (Maybe [Warning])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Warning]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> GetDocumentAnalysisResponse)
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
"NextToken")
Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> GetDocumentAnalysisResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe JobStatus -> Int -> GetDocumentAnalysisResponse)
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
"StatusMessage")
Either
String (Maybe JobStatus -> Int -> GetDocumentAnalysisResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> GetDocumentAnalysisResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobStatus")
Either String (Int -> GetDocumentAnalysisResponse)
-> Either String Int -> Either String GetDocumentAnalysisResponse
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 GetDocumentAnalysis
instance Prelude.NFData GetDocumentAnalysis
instance Core.ToHeaders GetDocumentAnalysis where
toHeaders :: GetDocumentAnalysis -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDocumentAnalysis -> 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.GetDocumentAnalysis" ::
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 GetDocumentAnalysis where
toJSON :: GetDocumentAnalysis -> Value
toJSON GetDocumentAnalysis' {Maybe Natural
Maybe Text
Text
jobId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:jobId:GetDocumentAnalysis' :: GetDocumentAnalysis -> Text
$sel:maxResults:GetDocumentAnalysis' :: GetDocumentAnalysis -> Maybe Natural
$sel:nextToken:GetDocumentAnalysis' :: GetDocumentAnalysis -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"JobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId)
]
)
instance Core.ToPath GetDocumentAnalysis where
toPath :: GetDocumentAnalysis -> ByteString
toPath = ByteString -> GetDocumentAnalysis -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetDocumentAnalysis where
toQuery :: GetDocumentAnalysis -> QueryString
toQuery = QueryString -> GetDocumentAnalysis -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetDocumentAnalysisResponse = GetDocumentAnalysisResponse'
{
GetDocumentAnalysisResponse -> Maybe DocumentMetadata
documentMetadata :: Prelude.Maybe DocumentMetadata,
GetDocumentAnalysisResponse -> Maybe [Block]
blocks :: Prelude.Maybe [Block],
GetDocumentAnalysisResponse -> Maybe Text
analyzeDocumentModelVersion :: Prelude.Maybe Prelude.Text,
GetDocumentAnalysisResponse -> Maybe [Warning]
warnings :: Prelude.Maybe [Warning],
GetDocumentAnalysisResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetDocumentAnalysisResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
GetDocumentAnalysisResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
GetDocumentAnalysisResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDocumentAnalysisResponse -> GetDocumentAnalysisResponse -> Bool
(GetDocumentAnalysisResponse
-> GetDocumentAnalysisResponse -> Bool)
-> (GetDocumentAnalysisResponse
-> GetDocumentAnalysisResponse -> Bool)
-> Eq GetDocumentAnalysisResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentAnalysisResponse -> GetDocumentAnalysisResponse -> Bool
$c/= :: GetDocumentAnalysisResponse -> GetDocumentAnalysisResponse -> Bool
== :: GetDocumentAnalysisResponse -> GetDocumentAnalysisResponse -> Bool
$c== :: GetDocumentAnalysisResponse -> GetDocumentAnalysisResponse -> Bool
Prelude.Eq, ReadPrec [GetDocumentAnalysisResponse]
ReadPrec GetDocumentAnalysisResponse
Int -> ReadS GetDocumentAnalysisResponse
ReadS [GetDocumentAnalysisResponse]
(Int -> ReadS GetDocumentAnalysisResponse)
-> ReadS [GetDocumentAnalysisResponse]
-> ReadPrec GetDocumentAnalysisResponse
-> ReadPrec [GetDocumentAnalysisResponse]
-> Read GetDocumentAnalysisResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentAnalysisResponse]
$creadListPrec :: ReadPrec [GetDocumentAnalysisResponse]
readPrec :: ReadPrec GetDocumentAnalysisResponse
$creadPrec :: ReadPrec GetDocumentAnalysisResponse
readList :: ReadS [GetDocumentAnalysisResponse]
$creadList :: ReadS [GetDocumentAnalysisResponse]
readsPrec :: Int -> ReadS GetDocumentAnalysisResponse
$creadsPrec :: Int -> ReadS GetDocumentAnalysisResponse
Prelude.Read, Int -> GetDocumentAnalysisResponse -> ShowS
[GetDocumentAnalysisResponse] -> ShowS
GetDocumentAnalysisResponse -> String
(Int -> GetDocumentAnalysisResponse -> ShowS)
-> (GetDocumentAnalysisResponse -> String)
-> ([GetDocumentAnalysisResponse] -> ShowS)
-> Show GetDocumentAnalysisResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentAnalysisResponse] -> ShowS
$cshowList :: [GetDocumentAnalysisResponse] -> ShowS
show :: GetDocumentAnalysisResponse -> String
$cshow :: GetDocumentAnalysisResponse -> String
showsPrec :: Int -> GetDocumentAnalysisResponse -> ShowS
$cshowsPrec :: Int -> GetDocumentAnalysisResponse -> ShowS
Prelude.Show, (forall x.
GetDocumentAnalysisResponse -> Rep GetDocumentAnalysisResponse x)
-> (forall x.
Rep GetDocumentAnalysisResponse x -> GetDocumentAnalysisResponse)
-> Generic GetDocumentAnalysisResponse
forall x.
Rep GetDocumentAnalysisResponse x -> GetDocumentAnalysisResponse
forall x.
GetDocumentAnalysisResponse -> Rep GetDocumentAnalysisResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDocumentAnalysisResponse x -> GetDocumentAnalysisResponse
$cfrom :: forall x.
GetDocumentAnalysisResponse -> Rep GetDocumentAnalysisResponse x
Prelude.Generic)
newGetDocumentAnalysisResponse ::
Prelude.Int ->
GetDocumentAnalysisResponse
newGetDocumentAnalysisResponse :: Int -> GetDocumentAnalysisResponse
newGetDocumentAnalysisResponse Int
pHttpStatus_ =
GetDocumentAnalysisResponse' :: Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe Text
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentAnalysisResponse
GetDocumentAnalysisResponse'
{ $sel:documentMetadata:GetDocumentAnalysisResponse' :: Maybe DocumentMetadata
documentMetadata =
Maybe DocumentMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:blocks:GetDocumentAnalysisResponse' :: Maybe [Block]
blocks = Maybe [Block]
forall a. Maybe a
Prelude.Nothing,
$sel:analyzeDocumentModelVersion:GetDocumentAnalysisResponse' :: Maybe Text
analyzeDocumentModelVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:warnings:GetDocumentAnalysisResponse' :: Maybe [Warning]
warnings = Maybe [Warning]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetDocumentAnalysisResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:GetDocumentAnalysisResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:GetDocumentAnalysisResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDocumentAnalysisResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDocumentAnalysisResponse_documentMetadata :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe DocumentMetadata)
getDocumentAnalysisResponse_documentMetadata :: (Maybe DocumentMetadata -> f (Maybe DocumentMetadata))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_documentMetadata = (GetDocumentAnalysisResponse -> Maybe DocumentMetadata)
-> (GetDocumentAnalysisResponse
-> Maybe DocumentMetadata -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe DocumentMetadata)
(Maybe DocumentMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe DocumentMetadata
documentMetadata :: Maybe DocumentMetadata
$sel:documentMetadata:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe DocumentMetadata
documentMetadata} -> Maybe DocumentMetadata
documentMetadata) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe DocumentMetadata
a -> GetDocumentAnalysisResponse
s {$sel:documentMetadata:GetDocumentAnalysisResponse' :: Maybe DocumentMetadata
documentMetadata = Maybe DocumentMetadata
a} :: GetDocumentAnalysisResponse)
getDocumentAnalysisResponse_blocks :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe [Block])
getDocumentAnalysisResponse_blocks :: (Maybe [Block] -> f (Maybe [Block]))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_blocks = (GetDocumentAnalysisResponse -> Maybe [Block])
-> (GetDocumentAnalysisResponse
-> Maybe [Block] -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe [Block])
(Maybe [Block])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe [Block]
blocks :: Maybe [Block]
$sel:blocks:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe [Block]
blocks} -> Maybe [Block]
blocks) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe [Block]
a -> GetDocumentAnalysisResponse
s {$sel:blocks:GetDocumentAnalysisResponse' :: Maybe [Block]
blocks = Maybe [Block]
a} :: GetDocumentAnalysisResponse) ((Maybe [Block] -> f (Maybe [Block]))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse)
-> ((Maybe [Block] -> f (Maybe [Block]))
-> Maybe [Block] -> f (Maybe [Block]))
-> (Maybe [Block] -> f (Maybe [Block]))
-> GetDocumentAnalysisResponse
-> f GetDocumentAnalysisResponse
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
getDocumentAnalysisResponse_analyzeDocumentModelVersion :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe Prelude.Text)
getDocumentAnalysisResponse_analyzeDocumentModelVersion :: (Maybe Text -> f (Maybe Text))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_analyzeDocumentModelVersion = (GetDocumentAnalysisResponse -> Maybe Text)
-> (GetDocumentAnalysisResponse
-> Maybe Text -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe Text
analyzeDocumentModelVersion :: Maybe Text
$sel:analyzeDocumentModelVersion:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe Text
analyzeDocumentModelVersion} -> Maybe Text
analyzeDocumentModelVersion) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe Text
a -> GetDocumentAnalysisResponse
s {$sel:analyzeDocumentModelVersion:GetDocumentAnalysisResponse' :: Maybe Text
analyzeDocumentModelVersion = Maybe Text
a} :: GetDocumentAnalysisResponse)
getDocumentAnalysisResponse_warnings :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe [Warning])
getDocumentAnalysisResponse_warnings :: (Maybe [Warning] -> f (Maybe [Warning]))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_warnings = (GetDocumentAnalysisResponse -> Maybe [Warning])
-> (GetDocumentAnalysisResponse
-> Maybe [Warning] -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe [Warning])
(Maybe [Warning])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe [Warning]
warnings :: Maybe [Warning]
$sel:warnings:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe [Warning]
warnings} -> Maybe [Warning]
warnings) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe [Warning]
a -> GetDocumentAnalysisResponse
s {$sel:warnings:GetDocumentAnalysisResponse' :: Maybe [Warning]
warnings = Maybe [Warning]
a} :: GetDocumentAnalysisResponse) ((Maybe [Warning] -> f (Maybe [Warning]))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse)
-> ((Maybe [Warning] -> f (Maybe [Warning]))
-> Maybe [Warning] -> f (Maybe [Warning]))
-> (Maybe [Warning] -> f (Maybe [Warning]))
-> GetDocumentAnalysisResponse
-> f GetDocumentAnalysisResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Warning] [Warning] [Warning] [Warning]
-> Iso
(Maybe [Warning])
(Maybe [Warning])
(Maybe [Warning])
(Maybe [Warning])
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 [Warning] [Warning] [Warning] [Warning]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getDocumentAnalysisResponse_nextToken :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe Prelude.Text)
getDocumentAnalysisResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_nextToken = (GetDocumentAnalysisResponse -> Maybe Text)
-> (GetDocumentAnalysisResponse
-> Maybe Text -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe Text
a -> GetDocumentAnalysisResponse
s {$sel:nextToken:GetDocumentAnalysisResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetDocumentAnalysisResponse)
getDocumentAnalysisResponse_statusMessage :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe Prelude.Text)
getDocumentAnalysisResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_statusMessage = (GetDocumentAnalysisResponse -> Maybe Text)
-> (GetDocumentAnalysisResponse
-> Maybe Text -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe Text
a -> GetDocumentAnalysisResponse
s {$sel:statusMessage:GetDocumentAnalysisResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: GetDocumentAnalysisResponse)
getDocumentAnalysisResponse_jobStatus :: Lens.Lens' GetDocumentAnalysisResponse (Prelude.Maybe JobStatus)
getDocumentAnalysisResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_jobStatus = (GetDocumentAnalysisResponse -> Maybe JobStatus)
-> (GetDocumentAnalysisResponse
-> Maybe JobStatus -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse
GetDocumentAnalysisResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Maybe JobStatus
a -> GetDocumentAnalysisResponse
s {$sel:jobStatus:GetDocumentAnalysisResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: GetDocumentAnalysisResponse)
getDocumentAnalysisResponse_httpStatus :: Lens.Lens' GetDocumentAnalysisResponse Prelude.Int
getDocumentAnalysisResponse_httpStatus :: (Int -> f Int)
-> GetDocumentAnalysisResponse -> f GetDocumentAnalysisResponse
getDocumentAnalysisResponse_httpStatus = (GetDocumentAnalysisResponse -> Int)
-> (GetDocumentAnalysisResponse
-> Int -> GetDocumentAnalysisResponse)
-> Lens
GetDocumentAnalysisResponse GetDocumentAnalysisResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentAnalysisResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDocumentAnalysisResponse' :: GetDocumentAnalysisResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDocumentAnalysisResponse
s@GetDocumentAnalysisResponse' {} Int
a -> GetDocumentAnalysisResponse
s {$sel:httpStatus:GetDocumentAnalysisResponse' :: Int
httpStatus = Int
a} :: GetDocumentAnalysisResponse)
instance Prelude.NFData GetDocumentAnalysisResponse