{-# 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.Comprehend.StartEntitiesDetectionJob
(
StartEntitiesDetectionJob (..),
newStartEntitiesDetectionJob,
startEntitiesDetectionJob_entityRecognizerArn,
startEntitiesDetectionJob_jobName,
startEntitiesDetectionJob_vpcConfig,
startEntitiesDetectionJob_volumeKmsKeyId,
startEntitiesDetectionJob_clientRequestToken,
startEntitiesDetectionJob_tags,
startEntitiesDetectionJob_inputDataConfig,
startEntitiesDetectionJob_outputDataConfig,
startEntitiesDetectionJob_dataAccessRoleArn,
startEntitiesDetectionJob_languageCode,
StartEntitiesDetectionJobResponse (..),
newStartEntitiesDetectionJobResponse,
startEntitiesDetectionJobResponse_jobId,
startEntitiesDetectionJobResponse_jobArn,
startEntitiesDetectionJobResponse_jobStatus,
startEntitiesDetectionJobResponse_httpStatus,
)
where
import Amazonka.Comprehend.Types
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
data StartEntitiesDetectionJob = StartEntitiesDetectionJob'
{
StartEntitiesDetectionJob -> Maybe Text
entityRecognizerArn :: Prelude.Maybe Prelude.Text,
StartEntitiesDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartEntitiesDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartEntitiesDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartEntitiesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartEntitiesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartEntitiesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartEntitiesDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartEntitiesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartEntitiesDetectionJob -> LanguageCode
languageCode :: LanguageCode
}
deriving (StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
(StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool)
-> (StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool)
-> Eq StartEntitiesDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
$c/= :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
== :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
$c== :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartEntitiesDetectionJob]
ReadPrec StartEntitiesDetectionJob
Int -> ReadS StartEntitiesDetectionJob
ReadS [StartEntitiesDetectionJob]
(Int -> ReadS StartEntitiesDetectionJob)
-> ReadS [StartEntitiesDetectionJob]
-> ReadPrec StartEntitiesDetectionJob
-> ReadPrec [StartEntitiesDetectionJob]
-> Read StartEntitiesDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartEntitiesDetectionJob]
$creadListPrec :: ReadPrec [StartEntitiesDetectionJob]
readPrec :: ReadPrec StartEntitiesDetectionJob
$creadPrec :: ReadPrec StartEntitiesDetectionJob
readList :: ReadS [StartEntitiesDetectionJob]
$creadList :: ReadS [StartEntitiesDetectionJob]
readsPrec :: Int -> ReadS StartEntitiesDetectionJob
$creadsPrec :: Int -> ReadS StartEntitiesDetectionJob
Prelude.Read, Int -> StartEntitiesDetectionJob -> ShowS
[StartEntitiesDetectionJob] -> ShowS
StartEntitiesDetectionJob -> String
(Int -> StartEntitiesDetectionJob -> ShowS)
-> (StartEntitiesDetectionJob -> String)
-> ([StartEntitiesDetectionJob] -> ShowS)
-> Show StartEntitiesDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartEntitiesDetectionJob] -> ShowS
$cshowList :: [StartEntitiesDetectionJob] -> ShowS
show :: StartEntitiesDetectionJob -> String
$cshow :: StartEntitiesDetectionJob -> String
showsPrec :: Int -> StartEntitiesDetectionJob -> ShowS
$cshowsPrec :: Int -> StartEntitiesDetectionJob -> ShowS
Prelude.Show, (forall x.
StartEntitiesDetectionJob -> Rep StartEntitiesDetectionJob x)
-> (forall x.
Rep StartEntitiesDetectionJob x -> StartEntitiesDetectionJob)
-> Generic StartEntitiesDetectionJob
forall x.
Rep StartEntitiesDetectionJob x -> StartEntitiesDetectionJob
forall x.
StartEntitiesDetectionJob -> Rep StartEntitiesDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartEntitiesDetectionJob x -> StartEntitiesDetectionJob
$cfrom :: forall x.
StartEntitiesDetectionJob -> Rep StartEntitiesDetectionJob x
Prelude.Generic)
newStartEntitiesDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
LanguageCode ->
StartEntitiesDetectionJob
newStartEntitiesDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartEntitiesDetectionJob
newStartEntitiesDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_
LanguageCode
pLanguageCode_ =
StartEntitiesDetectionJob' :: Maybe Text
-> Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartEntitiesDetectionJob
StartEntitiesDetectionJob'
{ $sel:entityRecognizerArn:StartEntitiesDetectionJob' :: Maybe Text
entityRecognizerArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartEntitiesDetectionJob' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartEntitiesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartEntitiesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
$sel:languageCode:StartEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
}
startEntitiesDetectionJob_entityRecognizerArn :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJob_entityRecognizerArn :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_entityRecognizerArn = (StartEntitiesDetectionJob -> Maybe Text)
-> (StartEntitiesDetectionJob
-> Maybe Text -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe Text
entityRecognizerArn :: Maybe Text
$sel:entityRecognizerArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
entityRecognizerArn} -> Maybe Text
entityRecognizerArn) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe Text
a -> StartEntitiesDetectionJob
s {$sel:entityRecognizerArn:StartEntitiesDetectionJob' :: Maybe Text
entityRecognizerArn = Maybe Text
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_jobName :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_jobName = (StartEntitiesDetectionJob -> Maybe Text)
-> (StartEntitiesDetectionJob
-> Maybe Text -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe Text
a -> StartEntitiesDetectionJob
s {$sel:jobName:StartEntitiesDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_vpcConfig :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe VpcConfig)
startEntitiesDetectionJob_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_vpcConfig = (StartEntitiesDetectionJob -> Maybe VpcConfig)
-> (StartEntitiesDetectionJob
-> Maybe VpcConfig -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
(Maybe VpcConfig)
(Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe VpcConfig
a -> StartEntitiesDetectionJob
s {$sel:vpcConfig:StartEntitiesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_volumeKmsKeyId :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_volumeKmsKeyId = (StartEntitiesDetectionJob -> Maybe Text)
-> (StartEntitiesDetectionJob
-> Maybe Text -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe Text
a -> StartEntitiesDetectionJob
s {$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_clientRequestToken :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_clientRequestToken = (StartEntitiesDetectionJob -> Maybe Text)
-> (StartEntitiesDetectionJob
-> Maybe Text -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe Text
a -> StartEntitiesDetectionJob
s {$sel:clientRequestToken:StartEntitiesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_tags :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe [Tag])
startEntitiesDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_tags = (StartEntitiesDetectionJob -> Maybe [Tag])
-> (StartEntitiesDetectionJob
-> Maybe [Tag] -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe [Tag]
a -> StartEntitiesDetectionJob
s {$sel:tags:StartEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartEntitiesDetectionJob) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartEntitiesDetectionJob
-> f StartEntitiesDetectionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startEntitiesDetectionJob_inputDataConfig :: Lens.Lens' StartEntitiesDetectionJob InputDataConfig
startEntitiesDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_inputDataConfig = (StartEntitiesDetectionJob -> InputDataConfig)
-> (StartEntitiesDetectionJob
-> InputDataConfig -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
InputDataConfig
InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} InputDataConfig
a -> StartEntitiesDetectionJob
s {$sel:inputDataConfig:StartEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_outputDataConfig :: Lens.Lens' StartEntitiesDetectionJob OutputDataConfig
startEntitiesDetectionJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_outputDataConfig = (StartEntitiesDetectionJob -> OutputDataConfig)
-> (StartEntitiesDetectionJob
-> OutputDataConfig -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
OutputDataConfig
OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} OutputDataConfig
a -> StartEntitiesDetectionJob
s {$sel:outputDataConfig:StartEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_dataAccessRoleArn :: Lens.Lens' StartEntitiesDetectionJob Prelude.Text
startEntitiesDetectionJob_dataAccessRoleArn :: (Text -> f Text)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_dataAccessRoleArn = (StartEntitiesDetectionJob -> Text)
-> (StartEntitiesDetectionJob -> Text -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob StartEntitiesDetectionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Text
a -> StartEntitiesDetectionJob
s {$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartEntitiesDetectionJob)
startEntitiesDetectionJob_languageCode :: Lens.Lens' StartEntitiesDetectionJob LanguageCode
startEntitiesDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_languageCode = (StartEntitiesDetectionJob -> LanguageCode)
-> (StartEntitiesDetectionJob
-> LanguageCode -> StartEntitiesDetectionJob)
-> Lens
StartEntitiesDetectionJob
StartEntitiesDetectionJob
LanguageCode
LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} LanguageCode
a -> StartEntitiesDetectionJob
s {$sel:languageCode:StartEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartEntitiesDetectionJob)
instance Core.AWSRequest StartEntitiesDetectionJob where
type
AWSResponse StartEntitiesDetectionJob =
StartEntitiesDetectionJobResponse
request :: StartEntitiesDetectionJob -> Request StartEntitiesDetectionJob
request = Service
-> StartEntitiesDetectionJob -> Request StartEntitiesDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartEntitiesDetectionJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartEntitiesDetectionJob))
-> Logger
-> Service
-> Proxy StartEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartEntitiesDetectionJob)))
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 Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartEntitiesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> StartEntitiesDetectionJobResponse)
forall (f :: * -> *) a b. Functor 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
"JobId")
Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> StartEntitiesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JobStatus -> Int -> StartEntitiesDetectionJobResponse)
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
"JobArn")
Either
String
(Maybe JobStatus -> Int -> StartEntitiesDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartEntitiesDetectionJobResponse)
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 -> StartEntitiesDetectionJobResponse)
-> Either String Int
-> Either String StartEntitiesDetectionJobResponse
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 StartEntitiesDetectionJob
instance Prelude.NFData StartEntitiesDetectionJob
instance Core.ToHeaders StartEntitiesDetectionJob where
toHeaders :: StartEntitiesDetectionJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartEntitiesDetectionJob -> 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
"Comprehend_20171127.StartEntitiesDetectionJob" ::
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 StartEntitiesDetectionJob where
toJSON :: StartEntitiesDetectionJob -> Value
toJSON StartEntitiesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
volumeKmsKeyId :: Maybe Text
vpcConfig :: Maybe VpcConfig
jobName :: Maybe Text
entityRecognizerArn :: Maybe Text
$sel:languageCode:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Text
$sel:outputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> InputDataConfig
$sel:tags:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
$sel:vpcConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe VpcConfig
$sel:jobName:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
$sel:entityRecognizerArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EntityRecognizerArn" 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
entityRecognizerArn,
(Text
"JobName" 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
jobName,
(Text
"VpcConfig" Text -> VpcConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcConfig -> Pair) -> Maybe VpcConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
(Text
"VolumeKmsKeyId" 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
volumeKmsKeyId,
(Text
"ClientRequestToken" 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
clientRequestToken,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InputDataConfig" Text -> InputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InputDataConfig
inputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"OutputDataConfig" Text -> OutputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= OutputDataConfig
outputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DataAccessRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataAccessRoleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LanguageCode" Text -> LanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LanguageCode
languageCode)
]
)
instance Core.ToPath StartEntitiesDetectionJob where
toPath :: StartEntitiesDetectionJob -> ByteString
toPath = ByteString -> StartEntitiesDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartEntitiesDetectionJob where
toQuery :: StartEntitiesDetectionJob -> QueryString
toQuery = QueryString -> StartEntitiesDetectionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartEntitiesDetectionJobResponse = StartEntitiesDetectionJobResponse'
{
StartEntitiesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartEntitiesDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartEntitiesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
(StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool)
-> (StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool)
-> Eq StartEntitiesDetectionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
$c/= :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
== :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
$c== :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartEntitiesDetectionJobResponse]
ReadPrec StartEntitiesDetectionJobResponse
Int -> ReadS StartEntitiesDetectionJobResponse
ReadS [StartEntitiesDetectionJobResponse]
(Int -> ReadS StartEntitiesDetectionJobResponse)
-> ReadS [StartEntitiesDetectionJobResponse]
-> ReadPrec StartEntitiesDetectionJobResponse
-> ReadPrec [StartEntitiesDetectionJobResponse]
-> Read StartEntitiesDetectionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartEntitiesDetectionJobResponse]
$creadListPrec :: ReadPrec [StartEntitiesDetectionJobResponse]
readPrec :: ReadPrec StartEntitiesDetectionJobResponse
$creadPrec :: ReadPrec StartEntitiesDetectionJobResponse
readList :: ReadS [StartEntitiesDetectionJobResponse]
$creadList :: ReadS [StartEntitiesDetectionJobResponse]
readsPrec :: Int -> ReadS StartEntitiesDetectionJobResponse
$creadsPrec :: Int -> ReadS StartEntitiesDetectionJobResponse
Prelude.Read, Int -> StartEntitiesDetectionJobResponse -> ShowS
[StartEntitiesDetectionJobResponse] -> ShowS
StartEntitiesDetectionJobResponse -> String
(Int -> StartEntitiesDetectionJobResponse -> ShowS)
-> (StartEntitiesDetectionJobResponse -> String)
-> ([StartEntitiesDetectionJobResponse] -> ShowS)
-> Show StartEntitiesDetectionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartEntitiesDetectionJobResponse] -> ShowS
$cshowList :: [StartEntitiesDetectionJobResponse] -> ShowS
show :: StartEntitiesDetectionJobResponse -> String
$cshow :: StartEntitiesDetectionJobResponse -> String
showsPrec :: Int -> StartEntitiesDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartEntitiesDetectionJobResponse -> ShowS
Prelude.Show, (forall x.
StartEntitiesDetectionJobResponse
-> Rep StartEntitiesDetectionJobResponse x)
-> (forall x.
Rep StartEntitiesDetectionJobResponse x
-> StartEntitiesDetectionJobResponse)
-> Generic StartEntitiesDetectionJobResponse
forall x.
Rep StartEntitiesDetectionJobResponse x
-> StartEntitiesDetectionJobResponse
forall x.
StartEntitiesDetectionJobResponse
-> Rep StartEntitiesDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartEntitiesDetectionJobResponse x
-> StartEntitiesDetectionJobResponse
$cfrom :: forall x.
StartEntitiesDetectionJobResponse
-> Rep StartEntitiesDetectionJobResponse x
Prelude.Generic)
newStartEntitiesDetectionJobResponse ::
Prelude.Int ->
StartEntitiesDetectionJobResponse
newStartEntitiesDetectionJobResponse :: Int -> StartEntitiesDetectionJobResponse
newStartEntitiesDetectionJobResponse Int
pHttpStatus_ =
StartEntitiesDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse'
{ $sel:jobId:StartEntitiesDetectionJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartEntitiesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startEntitiesDetectionJobResponse_jobId :: Lens.Lens' StartEntitiesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJobResponse
-> f StartEntitiesDetectionJobResponse
startEntitiesDetectionJobResponse_jobId = (StartEntitiesDetectionJobResponse -> Maybe Text)
-> (StartEntitiesDetectionJobResponse
-> Maybe Text -> StartEntitiesDetectionJobResponse)
-> Lens
StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartEntitiesDetectionJobResponse
s@StartEntitiesDetectionJobResponse' {} Maybe Text
a -> StartEntitiesDetectionJobResponse
s {$sel:jobId:StartEntitiesDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartEntitiesDetectionJobResponse)
startEntitiesDetectionJobResponse_jobArn :: Lens.Lens' StartEntitiesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJobResponse
-> f StartEntitiesDetectionJobResponse
startEntitiesDetectionJobResponse_jobArn = (StartEntitiesDetectionJobResponse -> Maybe Text)
-> (StartEntitiesDetectionJobResponse
-> Maybe Text -> StartEntitiesDetectionJobResponse)
-> Lens
StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartEntitiesDetectionJobResponse
s@StartEntitiesDetectionJobResponse' {} Maybe Text
a -> StartEntitiesDetectionJobResponse
s {$sel:jobArn:StartEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartEntitiesDetectionJobResponse)
startEntitiesDetectionJobResponse_jobStatus :: Lens.Lens' StartEntitiesDetectionJobResponse (Prelude.Maybe JobStatus)
startEntitiesDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartEntitiesDetectionJobResponse
-> f StartEntitiesDetectionJobResponse
startEntitiesDetectionJobResponse_jobStatus = (StartEntitiesDetectionJobResponse -> Maybe JobStatus)
-> (StartEntitiesDetectionJobResponse
-> Maybe JobStatus -> StartEntitiesDetectionJobResponse)
-> Lens
StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartEntitiesDetectionJobResponse
s@StartEntitiesDetectionJobResponse' {} Maybe JobStatus
a -> StartEntitiesDetectionJobResponse
s {$sel:jobStatus:StartEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartEntitiesDetectionJobResponse)
startEntitiesDetectionJobResponse_httpStatus :: Lens.Lens' StartEntitiesDetectionJobResponse Prelude.Int
startEntitiesDetectionJobResponse_httpStatus :: (Int -> f Int)
-> StartEntitiesDetectionJobResponse
-> f StartEntitiesDetectionJobResponse
startEntitiesDetectionJobResponse_httpStatus = (StartEntitiesDetectionJobResponse -> Int)
-> (StartEntitiesDetectionJobResponse
-> Int -> StartEntitiesDetectionJobResponse)
-> Lens
StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartEntitiesDetectionJobResponse
s@StartEntitiesDetectionJobResponse' {} Int
a -> StartEntitiesDetectionJobResponse
s {$sel:httpStatus:StartEntitiesDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartEntitiesDetectionJobResponse)
instance
Prelude.NFData
StartEntitiesDetectionJobResponse