{-# 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.GetDocumentTextDetection
(
GetDocumentTextDetection (..),
newGetDocumentTextDetection,
getDocumentTextDetection_nextToken,
getDocumentTextDetection_maxResults,
getDocumentTextDetection_jobId,
GetDocumentTextDetectionResponse (..),
newGetDocumentTextDetectionResponse,
getDocumentTextDetectionResponse_documentMetadata,
getDocumentTextDetectionResponse_blocks,
getDocumentTextDetectionResponse_warnings,
getDocumentTextDetectionResponse_nextToken,
getDocumentTextDetectionResponse_statusMessage,
getDocumentTextDetectionResponse_detectDocumentTextModelVersion,
getDocumentTextDetectionResponse_jobStatus,
getDocumentTextDetectionResponse_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 GetDocumentTextDetection = GetDocumentTextDetection'
{
GetDocumentTextDetection -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetDocumentTextDetection -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetDocumentTextDetection -> Text
jobId :: Prelude.Text
}
deriving (GetDocumentTextDetection -> GetDocumentTextDetection -> Bool
(GetDocumentTextDetection -> GetDocumentTextDetection -> Bool)
-> (GetDocumentTextDetection -> GetDocumentTextDetection -> Bool)
-> Eq GetDocumentTextDetection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentTextDetection -> GetDocumentTextDetection -> Bool
$c/= :: GetDocumentTextDetection -> GetDocumentTextDetection -> Bool
== :: GetDocumentTextDetection -> GetDocumentTextDetection -> Bool
$c== :: GetDocumentTextDetection -> GetDocumentTextDetection -> Bool
Prelude.Eq, ReadPrec [GetDocumentTextDetection]
ReadPrec GetDocumentTextDetection
Int -> ReadS GetDocumentTextDetection
ReadS [GetDocumentTextDetection]
(Int -> ReadS GetDocumentTextDetection)
-> ReadS [GetDocumentTextDetection]
-> ReadPrec GetDocumentTextDetection
-> ReadPrec [GetDocumentTextDetection]
-> Read GetDocumentTextDetection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentTextDetection]
$creadListPrec :: ReadPrec [GetDocumentTextDetection]
readPrec :: ReadPrec GetDocumentTextDetection
$creadPrec :: ReadPrec GetDocumentTextDetection
readList :: ReadS [GetDocumentTextDetection]
$creadList :: ReadS [GetDocumentTextDetection]
readsPrec :: Int -> ReadS GetDocumentTextDetection
$creadsPrec :: Int -> ReadS GetDocumentTextDetection
Prelude.Read, Int -> GetDocumentTextDetection -> ShowS
[GetDocumentTextDetection] -> ShowS
GetDocumentTextDetection -> String
(Int -> GetDocumentTextDetection -> ShowS)
-> (GetDocumentTextDetection -> String)
-> ([GetDocumentTextDetection] -> ShowS)
-> Show GetDocumentTextDetection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentTextDetection] -> ShowS
$cshowList :: [GetDocumentTextDetection] -> ShowS
show :: GetDocumentTextDetection -> String
$cshow :: GetDocumentTextDetection -> String
showsPrec :: Int -> GetDocumentTextDetection -> ShowS
$cshowsPrec :: Int -> GetDocumentTextDetection -> ShowS
Prelude.Show, (forall x.
GetDocumentTextDetection -> Rep GetDocumentTextDetection x)
-> (forall x.
Rep GetDocumentTextDetection x -> GetDocumentTextDetection)
-> Generic GetDocumentTextDetection
forall x.
Rep GetDocumentTextDetection x -> GetDocumentTextDetection
forall x.
GetDocumentTextDetection -> Rep GetDocumentTextDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDocumentTextDetection x -> GetDocumentTextDetection
$cfrom :: forall x.
GetDocumentTextDetection -> Rep GetDocumentTextDetection x
Prelude.Generic)
newGetDocumentTextDetection ::
Prelude.Text ->
GetDocumentTextDetection
newGetDocumentTextDetection :: Text -> GetDocumentTextDetection
newGetDocumentTextDetection Text
pJobId_ =
GetDocumentTextDetection' :: Maybe Text -> Maybe Natural -> Text -> GetDocumentTextDetection
GetDocumentTextDetection'
{ $sel:nextToken:GetDocumentTextDetection' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetDocumentTextDetection' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:GetDocumentTextDetection' :: Text
jobId = Text
pJobId_
}
getDocumentTextDetection_nextToken :: Lens.Lens' GetDocumentTextDetection (Prelude.Maybe Prelude.Text)
getDocumentTextDetection_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDocumentTextDetection -> f GetDocumentTextDetection
getDocumentTextDetection_nextToken = (GetDocumentTextDetection -> Maybe Text)
-> (GetDocumentTextDetection
-> Maybe Text -> GetDocumentTextDetection)
-> Lens
GetDocumentTextDetection
GetDocumentTextDetection
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetection' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDocumentTextDetection' :: GetDocumentTextDetection -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDocumentTextDetection
s@GetDocumentTextDetection' {} Maybe Text
a -> GetDocumentTextDetection
s {$sel:nextToken:GetDocumentTextDetection' :: Maybe Text
nextToken = Maybe Text
a} :: GetDocumentTextDetection)
getDocumentTextDetection_maxResults :: Lens.Lens' GetDocumentTextDetection (Prelude.Maybe Prelude.Natural)
getDocumentTextDetection_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetDocumentTextDetection -> f GetDocumentTextDetection
getDocumentTextDetection_maxResults = (GetDocumentTextDetection -> Maybe Natural)
-> (GetDocumentTextDetection
-> Maybe Natural -> GetDocumentTextDetection)
-> Lens
GetDocumentTextDetection
GetDocumentTextDetection
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetection' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetDocumentTextDetection' :: GetDocumentTextDetection -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetDocumentTextDetection
s@GetDocumentTextDetection' {} Maybe Natural
a -> GetDocumentTextDetection
s {$sel:maxResults:GetDocumentTextDetection' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetDocumentTextDetection)
getDocumentTextDetection_jobId :: Lens.Lens' GetDocumentTextDetection Prelude.Text
getDocumentTextDetection_jobId :: (Text -> f Text)
-> GetDocumentTextDetection -> f GetDocumentTextDetection
getDocumentTextDetection_jobId = (GetDocumentTextDetection -> Text)
-> (GetDocumentTextDetection -> Text -> GetDocumentTextDetection)
-> Lens GetDocumentTextDetection GetDocumentTextDetection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetection' {Text
jobId :: Text
$sel:jobId:GetDocumentTextDetection' :: GetDocumentTextDetection -> Text
jobId} -> Text
jobId) (\s :: GetDocumentTextDetection
s@GetDocumentTextDetection' {} Text
a -> GetDocumentTextDetection
s {$sel:jobId:GetDocumentTextDetection' :: Text
jobId = Text
a} :: GetDocumentTextDetection)
instance Core.AWSRequest GetDocumentTextDetection where
type
AWSResponse GetDocumentTextDetection =
GetDocumentTextDetectionResponse
request :: GetDocumentTextDetection -> Request GetDocumentTextDetection
request = Service
-> GetDocumentTextDetection -> Request GetDocumentTextDetection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetDocumentTextDetection
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDocumentTextDetection)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDocumentTextDetection))
-> Logger
-> Service
-> Proxy GetDocumentTextDetection
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDocumentTextDetection)))
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 [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse'
(Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
-> Either String (Maybe DocumentMetadata)
-> Either
String
(Maybe [Block]
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
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 [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
-> Either String (Maybe [Block])
-> Either
String
(Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
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 [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
-> Either String (Maybe [Warning])
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
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 Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
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 Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> GetDocumentTextDetectionResponse)
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 Text
-> Maybe JobStatus -> Int -> GetDocumentTextDetectionResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe JobStatus -> Int -> GetDocumentTextDetectionResponse)
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
"DetectDocumentTextModelVersion")
Either
String (Maybe JobStatus -> Int -> GetDocumentTextDetectionResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> GetDocumentTextDetectionResponse)
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 -> GetDocumentTextDetectionResponse)
-> Either String Int
-> Either String GetDocumentTextDetectionResponse
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 GetDocumentTextDetection
instance Prelude.NFData GetDocumentTextDetection
instance Core.ToHeaders GetDocumentTextDetection where
toHeaders :: GetDocumentTextDetection -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDocumentTextDetection -> 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.GetDocumentTextDetection" ::
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 GetDocumentTextDetection where
toJSON :: GetDocumentTextDetection -> Value
toJSON GetDocumentTextDetection' {Maybe Natural
Maybe Text
Text
jobId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:jobId:GetDocumentTextDetection' :: GetDocumentTextDetection -> Text
$sel:maxResults:GetDocumentTextDetection' :: GetDocumentTextDetection -> Maybe Natural
$sel:nextToken:GetDocumentTextDetection' :: GetDocumentTextDetection -> 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 GetDocumentTextDetection where
toPath :: GetDocumentTextDetection -> ByteString
toPath = ByteString -> GetDocumentTextDetection -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetDocumentTextDetection where
toQuery :: GetDocumentTextDetection -> QueryString
toQuery = QueryString -> GetDocumentTextDetection -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetDocumentTextDetectionResponse = GetDocumentTextDetectionResponse'
{
GetDocumentTextDetectionResponse -> Maybe DocumentMetadata
documentMetadata :: Prelude.Maybe DocumentMetadata,
GetDocumentTextDetectionResponse -> Maybe [Block]
blocks :: Prelude.Maybe [Block],
GetDocumentTextDetectionResponse -> Maybe [Warning]
warnings :: Prelude.Maybe [Warning],
GetDocumentTextDetectionResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetDocumentTextDetectionResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
GetDocumentTextDetectionResponse -> Maybe Text
detectDocumentTextModelVersion :: Prelude.Maybe Prelude.Text,
GetDocumentTextDetectionResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
GetDocumentTextDetectionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool
(GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool)
-> (GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool)
-> Eq GetDocumentTextDetectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool
$c/= :: GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool
== :: GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool
$c== :: GetDocumentTextDetectionResponse
-> GetDocumentTextDetectionResponse -> Bool
Prelude.Eq, ReadPrec [GetDocumentTextDetectionResponse]
ReadPrec GetDocumentTextDetectionResponse
Int -> ReadS GetDocumentTextDetectionResponse
ReadS [GetDocumentTextDetectionResponse]
(Int -> ReadS GetDocumentTextDetectionResponse)
-> ReadS [GetDocumentTextDetectionResponse]
-> ReadPrec GetDocumentTextDetectionResponse
-> ReadPrec [GetDocumentTextDetectionResponse]
-> Read GetDocumentTextDetectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentTextDetectionResponse]
$creadListPrec :: ReadPrec [GetDocumentTextDetectionResponse]
readPrec :: ReadPrec GetDocumentTextDetectionResponse
$creadPrec :: ReadPrec GetDocumentTextDetectionResponse
readList :: ReadS [GetDocumentTextDetectionResponse]
$creadList :: ReadS [GetDocumentTextDetectionResponse]
readsPrec :: Int -> ReadS GetDocumentTextDetectionResponse
$creadsPrec :: Int -> ReadS GetDocumentTextDetectionResponse
Prelude.Read, Int -> GetDocumentTextDetectionResponse -> ShowS
[GetDocumentTextDetectionResponse] -> ShowS
GetDocumentTextDetectionResponse -> String
(Int -> GetDocumentTextDetectionResponse -> ShowS)
-> (GetDocumentTextDetectionResponse -> String)
-> ([GetDocumentTextDetectionResponse] -> ShowS)
-> Show GetDocumentTextDetectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentTextDetectionResponse] -> ShowS
$cshowList :: [GetDocumentTextDetectionResponse] -> ShowS
show :: GetDocumentTextDetectionResponse -> String
$cshow :: GetDocumentTextDetectionResponse -> String
showsPrec :: Int -> GetDocumentTextDetectionResponse -> ShowS
$cshowsPrec :: Int -> GetDocumentTextDetectionResponse -> ShowS
Prelude.Show, (forall x.
GetDocumentTextDetectionResponse
-> Rep GetDocumentTextDetectionResponse x)
-> (forall x.
Rep GetDocumentTextDetectionResponse x
-> GetDocumentTextDetectionResponse)
-> Generic GetDocumentTextDetectionResponse
forall x.
Rep GetDocumentTextDetectionResponse x
-> GetDocumentTextDetectionResponse
forall x.
GetDocumentTextDetectionResponse
-> Rep GetDocumentTextDetectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDocumentTextDetectionResponse x
-> GetDocumentTextDetectionResponse
$cfrom :: forall x.
GetDocumentTextDetectionResponse
-> Rep GetDocumentTextDetectionResponse x
Prelude.Generic)
newGetDocumentTextDetectionResponse ::
Prelude.Int ->
GetDocumentTextDetectionResponse
newGetDocumentTextDetectionResponse :: Int -> GetDocumentTextDetectionResponse
newGetDocumentTextDetectionResponse Int
pHttpStatus_ =
GetDocumentTextDetectionResponse' :: Maybe DocumentMetadata
-> Maybe [Block]
-> Maybe [Warning]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse'
{ $sel:documentMetadata:GetDocumentTextDetectionResponse' :: Maybe DocumentMetadata
documentMetadata =
Maybe DocumentMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:blocks:GetDocumentTextDetectionResponse' :: Maybe [Block]
blocks = Maybe [Block]
forall a. Maybe a
Prelude.Nothing,
$sel:warnings:GetDocumentTextDetectionResponse' :: Maybe [Warning]
warnings = Maybe [Warning]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetDocumentTextDetectionResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:GetDocumentTextDetectionResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:detectDocumentTextModelVersion:GetDocumentTextDetectionResponse' :: Maybe Text
detectDocumentTextModelVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:GetDocumentTextDetectionResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDocumentTextDetectionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDocumentTextDetectionResponse_documentMetadata :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe DocumentMetadata)
getDocumentTextDetectionResponse_documentMetadata :: (Maybe DocumentMetadata -> f (Maybe DocumentMetadata))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_documentMetadata = (GetDocumentTextDetectionResponse -> Maybe DocumentMetadata)
-> (GetDocumentTextDetectionResponse
-> Maybe DocumentMetadata -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe DocumentMetadata)
(Maybe DocumentMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe DocumentMetadata
documentMetadata :: Maybe DocumentMetadata
$sel:documentMetadata:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe DocumentMetadata
documentMetadata} -> Maybe DocumentMetadata
documentMetadata) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe DocumentMetadata
a -> GetDocumentTextDetectionResponse
s {$sel:documentMetadata:GetDocumentTextDetectionResponse' :: Maybe DocumentMetadata
documentMetadata = Maybe DocumentMetadata
a} :: GetDocumentTextDetectionResponse)
getDocumentTextDetectionResponse_blocks :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe [Block])
getDocumentTextDetectionResponse_blocks :: (Maybe [Block] -> f (Maybe [Block]))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_blocks = (GetDocumentTextDetectionResponse -> Maybe [Block])
-> (GetDocumentTextDetectionResponse
-> Maybe [Block] -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe [Block])
(Maybe [Block])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe [Block]
blocks :: Maybe [Block]
$sel:blocks:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe [Block]
blocks} -> Maybe [Block]
blocks) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe [Block]
a -> GetDocumentTextDetectionResponse
s {$sel:blocks:GetDocumentTextDetectionResponse' :: Maybe [Block]
blocks = Maybe [Block]
a} :: GetDocumentTextDetectionResponse) ((Maybe [Block] -> f (Maybe [Block]))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse)
-> ((Maybe [Block] -> f (Maybe [Block]))
-> Maybe [Block] -> f (Maybe [Block]))
-> (Maybe [Block] -> f (Maybe [Block]))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
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
getDocumentTextDetectionResponse_warnings :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe [Warning])
getDocumentTextDetectionResponse_warnings :: (Maybe [Warning] -> f (Maybe [Warning]))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_warnings = (GetDocumentTextDetectionResponse -> Maybe [Warning])
-> (GetDocumentTextDetectionResponse
-> Maybe [Warning] -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe [Warning])
(Maybe [Warning])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe [Warning]
warnings :: Maybe [Warning]
$sel:warnings:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe [Warning]
warnings} -> Maybe [Warning]
warnings) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe [Warning]
a -> GetDocumentTextDetectionResponse
s {$sel:warnings:GetDocumentTextDetectionResponse' :: Maybe [Warning]
warnings = Maybe [Warning]
a} :: GetDocumentTextDetectionResponse) ((Maybe [Warning] -> f (Maybe [Warning]))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse)
-> ((Maybe [Warning] -> f (Maybe [Warning]))
-> Maybe [Warning] -> f (Maybe [Warning]))
-> (Maybe [Warning] -> f (Maybe [Warning]))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
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
getDocumentTextDetectionResponse_nextToken :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe Prelude.Text)
getDocumentTextDetectionResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_nextToken = (GetDocumentTextDetectionResponse -> Maybe Text)
-> (GetDocumentTextDetectionResponse
-> Maybe Text -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe Text
a -> GetDocumentTextDetectionResponse
s {$sel:nextToken:GetDocumentTextDetectionResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetDocumentTextDetectionResponse)
getDocumentTextDetectionResponse_statusMessage :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe Prelude.Text)
getDocumentTextDetectionResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_statusMessage = (GetDocumentTextDetectionResponse -> Maybe Text)
-> (GetDocumentTextDetectionResponse
-> Maybe Text -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe Text
a -> GetDocumentTextDetectionResponse
s {$sel:statusMessage:GetDocumentTextDetectionResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: GetDocumentTextDetectionResponse)
getDocumentTextDetectionResponse_detectDocumentTextModelVersion :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe Prelude.Text)
getDocumentTextDetectionResponse_detectDocumentTextModelVersion :: (Maybe Text -> f (Maybe Text))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_detectDocumentTextModelVersion = (GetDocumentTextDetectionResponse -> Maybe Text)
-> (GetDocumentTextDetectionResponse
-> Maybe Text -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe Text
detectDocumentTextModelVersion :: Maybe Text
$sel:detectDocumentTextModelVersion:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe Text
detectDocumentTextModelVersion} -> Maybe Text
detectDocumentTextModelVersion) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe Text
a -> GetDocumentTextDetectionResponse
s {$sel:detectDocumentTextModelVersion:GetDocumentTextDetectionResponse' :: Maybe Text
detectDocumentTextModelVersion = Maybe Text
a} :: GetDocumentTextDetectionResponse)
getDocumentTextDetectionResponse_jobStatus :: Lens.Lens' GetDocumentTextDetectionResponse (Prelude.Maybe JobStatus)
getDocumentTextDetectionResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_jobStatus = (GetDocumentTextDetectionResponse -> Maybe JobStatus)
-> (GetDocumentTextDetectionResponse
-> Maybe JobStatus -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Maybe JobStatus
a -> GetDocumentTextDetectionResponse
s {$sel:jobStatus:GetDocumentTextDetectionResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: GetDocumentTextDetectionResponse)
getDocumentTextDetectionResponse_httpStatus :: Lens.Lens' GetDocumentTextDetectionResponse Prelude.Int
getDocumentTextDetectionResponse_httpStatus :: (Int -> f Int)
-> GetDocumentTextDetectionResponse
-> f GetDocumentTextDetectionResponse
getDocumentTextDetectionResponse_httpStatus = (GetDocumentTextDetectionResponse -> Int)
-> (GetDocumentTextDetectionResponse
-> Int -> GetDocumentTextDetectionResponse)
-> Lens
GetDocumentTextDetectionResponse
GetDocumentTextDetectionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentTextDetectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDocumentTextDetectionResponse' :: GetDocumentTextDetectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDocumentTextDetectionResponse
s@GetDocumentTextDetectionResponse' {} Int
a -> GetDocumentTextDetectionResponse
s {$sel:httpStatus:GetDocumentTextDetectionResponse' :: Int
httpStatus = Int
a} :: GetDocumentTextDetectionResponse)
instance
Prelude.NFData
GetDocumentTextDetectionResponse