{-# 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.StartKeyPhrasesDetectionJob
(
StartKeyPhrasesDetectionJob (..),
newStartKeyPhrasesDetectionJob,
startKeyPhrasesDetectionJob_jobName,
startKeyPhrasesDetectionJob_vpcConfig,
startKeyPhrasesDetectionJob_volumeKmsKeyId,
startKeyPhrasesDetectionJob_clientRequestToken,
startKeyPhrasesDetectionJob_tags,
startKeyPhrasesDetectionJob_inputDataConfig,
startKeyPhrasesDetectionJob_outputDataConfig,
startKeyPhrasesDetectionJob_dataAccessRoleArn,
startKeyPhrasesDetectionJob_languageCode,
StartKeyPhrasesDetectionJobResponse (..),
newStartKeyPhrasesDetectionJobResponse,
startKeyPhrasesDetectionJobResponse_jobId,
startKeyPhrasesDetectionJobResponse_jobArn,
startKeyPhrasesDetectionJobResponse_jobStatus,
startKeyPhrasesDetectionJobResponse_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 StartKeyPhrasesDetectionJob = StartKeyPhrasesDetectionJob'
{
StartKeyPhrasesDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartKeyPhrasesDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartKeyPhrasesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartKeyPhrasesDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartKeyPhrasesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartKeyPhrasesDetectionJob -> LanguageCode
languageCode :: LanguageCode
}
deriving (StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
(StartKeyPhrasesDetectionJob
-> StartKeyPhrasesDetectionJob -> Bool)
-> (StartKeyPhrasesDetectionJob
-> StartKeyPhrasesDetectionJob -> Bool)
-> Eq StartKeyPhrasesDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
$c/= :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
== :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
$c== :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartKeyPhrasesDetectionJob]
ReadPrec StartKeyPhrasesDetectionJob
Int -> ReadS StartKeyPhrasesDetectionJob
ReadS [StartKeyPhrasesDetectionJob]
(Int -> ReadS StartKeyPhrasesDetectionJob)
-> ReadS [StartKeyPhrasesDetectionJob]
-> ReadPrec StartKeyPhrasesDetectionJob
-> ReadPrec [StartKeyPhrasesDetectionJob]
-> Read StartKeyPhrasesDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartKeyPhrasesDetectionJob]
$creadListPrec :: ReadPrec [StartKeyPhrasesDetectionJob]
readPrec :: ReadPrec StartKeyPhrasesDetectionJob
$creadPrec :: ReadPrec StartKeyPhrasesDetectionJob
readList :: ReadS [StartKeyPhrasesDetectionJob]
$creadList :: ReadS [StartKeyPhrasesDetectionJob]
readsPrec :: Int -> ReadS StartKeyPhrasesDetectionJob
$creadsPrec :: Int -> ReadS StartKeyPhrasesDetectionJob
Prelude.Read, Int -> StartKeyPhrasesDetectionJob -> ShowS
[StartKeyPhrasesDetectionJob] -> ShowS
StartKeyPhrasesDetectionJob -> String
(Int -> StartKeyPhrasesDetectionJob -> ShowS)
-> (StartKeyPhrasesDetectionJob -> String)
-> ([StartKeyPhrasesDetectionJob] -> ShowS)
-> Show StartKeyPhrasesDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartKeyPhrasesDetectionJob] -> ShowS
$cshowList :: [StartKeyPhrasesDetectionJob] -> ShowS
show :: StartKeyPhrasesDetectionJob -> String
$cshow :: StartKeyPhrasesDetectionJob -> String
showsPrec :: Int -> StartKeyPhrasesDetectionJob -> ShowS
$cshowsPrec :: Int -> StartKeyPhrasesDetectionJob -> ShowS
Prelude.Show, (forall x.
StartKeyPhrasesDetectionJob -> Rep StartKeyPhrasesDetectionJob x)
-> (forall x.
Rep StartKeyPhrasesDetectionJob x -> StartKeyPhrasesDetectionJob)
-> Generic StartKeyPhrasesDetectionJob
forall x.
Rep StartKeyPhrasesDetectionJob x -> StartKeyPhrasesDetectionJob
forall x.
StartKeyPhrasesDetectionJob -> Rep StartKeyPhrasesDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartKeyPhrasesDetectionJob x -> StartKeyPhrasesDetectionJob
$cfrom :: forall x.
StartKeyPhrasesDetectionJob -> Rep StartKeyPhrasesDetectionJob x
Prelude.Generic)
newStartKeyPhrasesDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
LanguageCode ->
StartKeyPhrasesDetectionJob
newStartKeyPhrasesDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartKeyPhrasesDetectionJob
newStartKeyPhrasesDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_
LanguageCode
pLanguageCode_ =
StartKeyPhrasesDetectionJob' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob'
{ $sel:jobName:StartKeyPhrasesDetectionJob' :: Maybe Text
jobName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartKeyPhrasesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
$sel:languageCode:StartKeyPhrasesDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
}
startKeyPhrasesDetectionJob_jobName :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_jobName = (StartKeyPhrasesDetectionJob -> Maybe Text)
-> (StartKeyPhrasesDetectionJob
-> Maybe Text -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe Text
a -> StartKeyPhrasesDetectionJob
s {$sel:jobName:StartKeyPhrasesDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_vpcConfig :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe VpcConfig)
startKeyPhrasesDetectionJob_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_vpcConfig = (StartKeyPhrasesDetectionJob -> Maybe VpcConfig)
-> (StartKeyPhrasesDetectionJob
-> Maybe VpcConfig -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
(Maybe VpcConfig)
(Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe VpcConfig
a -> StartKeyPhrasesDetectionJob
s {$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_volumeKmsKeyId :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_volumeKmsKeyId = (StartKeyPhrasesDetectionJob -> Maybe Text)
-> (StartKeyPhrasesDetectionJob
-> Maybe Text -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe Text
a -> StartKeyPhrasesDetectionJob
s {$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_clientRequestToken :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_clientRequestToken = (StartKeyPhrasesDetectionJob -> Maybe Text)
-> (StartKeyPhrasesDetectionJob
-> Maybe Text -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe Text
a -> StartKeyPhrasesDetectionJob
s {$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_tags :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe [Tag])
startKeyPhrasesDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_tags = (StartKeyPhrasesDetectionJob -> Maybe [Tag])
-> (StartKeyPhrasesDetectionJob
-> Maybe [Tag] -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe [Tag]
a -> StartKeyPhrasesDetectionJob
s {$sel:tags:StartKeyPhrasesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartKeyPhrasesDetectionJob) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartKeyPhrasesDetectionJob
-> f StartKeyPhrasesDetectionJob
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
startKeyPhrasesDetectionJob_inputDataConfig :: Lens.Lens' StartKeyPhrasesDetectionJob InputDataConfig
startKeyPhrasesDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_inputDataConfig = (StartKeyPhrasesDetectionJob -> InputDataConfig)
-> (StartKeyPhrasesDetectionJob
-> InputDataConfig -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
InputDataConfig
InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} InputDataConfig
a -> StartKeyPhrasesDetectionJob
s {$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_outputDataConfig :: Lens.Lens' StartKeyPhrasesDetectionJob OutputDataConfig
startKeyPhrasesDetectionJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_outputDataConfig = (StartKeyPhrasesDetectionJob -> OutputDataConfig)
-> (StartKeyPhrasesDetectionJob
-> OutputDataConfig -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
OutputDataConfig
OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} OutputDataConfig
a -> StartKeyPhrasesDetectionJob
s {$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_dataAccessRoleArn :: Lens.Lens' StartKeyPhrasesDetectionJob Prelude.Text
startKeyPhrasesDetectionJob_dataAccessRoleArn :: (Text -> f Text)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_dataAccessRoleArn = (StartKeyPhrasesDetectionJob -> Text)
-> (StartKeyPhrasesDetectionJob
-> Text -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob StartKeyPhrasesDetectionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Text
a -> StartKeyPhrasesDetectionJob
s {$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartKeyPhrasesDetectionJob)
startKeyPhrasesDetectionJob_languageCode :: Lens.Lens' StartKeyPhrasesDetectionJob LanguageCode
startKeyPhrasesDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_languageCode = (StartKeyPhrasesDetectionJob -> LanguageCode)
-> (StartKeyPhrasesDetectionJob
-> LanguageCode -> StartKeyPhrasesDetectionJob)
-> Lens
StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob
LanguageCode
LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} LanguageCode
a -> StartKeyPhrasesDetectionJob
s {$sel:languageCode:StartKeyPhrasesDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartKeyPhrasesDetectionJob)
instance Core.AWSRequest StartKeyPhrasesDetectionJob where
type
AWSResponse StartKeyPhrasesDetectionJob =
StartKeyPhrasesDetectionJobResponse
request :: StartKeyPhrasesDetectionJob -> Request StartKeyPhrasesDetectionJob
request = Service
-> StartKeyPhrasesDetectionJob
-> Request StartKeyPhrasesDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartKeyPhrasesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartKeyPhrasesDetectionJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartKeyPhrasesDetectionJob))
-> Logger
-> Service
-> Proxy StartKeyPhrasesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartKeyPhrasesDetectionJob)))
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
-> StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartKeyPhrasesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> StartKeyPhrasesDetectionJobResponse)
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 -> StartKeyPhrasesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JobStatus -> Int -> StartKeyPhrasesDetectionJobResponse)
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 -> StartKeyPhrasesDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartKeyPhrasesDetectionJobResponse)
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 -> StartKeyPhrasesDetectionJobResponse)
-> Either String Int
-> Either String StartKeyPhrasesDetectionJobResponse
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 StartKeyPhrasesDetectionJob
instance Prelude.NFData StartKeyPhrasesDetectionJob
instance Core.ToHeaders StartKeyPhrasesDetectionJob where
toHeaders :: StartKeyPhrasesDetectionJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartKeyPhrasesDetectionJob -> 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.StartKeyPhrasesDetectionJob" ::
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 StartKeyPhrasesDetectionJob where
toJSON :: StartKeyPhrasesDetectionJob -> Value
toJSON StartKeyPhrasesDetectionJob' {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
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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 StartKeyPhrasesDetectionJob where
toPath :: StartKeyPhrasesDetectionJob -> ByteString
toPath = ByteString -> StartKeyPhrasesDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartKeyPhrasesDetectionJob where
toQuery :: StartKeyPhrasesDetectionJob -> QueryString
toQuery = QueryString -> StartKeyPhrasesDetectionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartKeyPhrasesDetectionJobResponse = StartKeyPhrasesDetectionJobResponse'
{
StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartKeyPhrasesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
(StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool)
-> (StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool)
-> Eq StartKeyPhrasesDetectionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
$c/= :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
== :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
$c== :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartKeyPhrasesDetectionJobResponse]
ReadPrec StartKeyPhrasesDetectionJobResponse
Int -> ReadS StartKeyPhrasesDetectionJobResponse
ReadS [StartKeyPhrasesDetectionJobResponse]
(Int -> ReadS StartKeyPhrasesDetectionJobResponse)
-> ReadS [StartKeyPhrasesDetectionJobResponse]
-> ReadPrec StartKeyPhrasesDetectionJobResponse
-> ReadPrec [StartKeyPhrasesDetectionJobResponse]
-> Read StartKeyPhrasesDetectionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartKeyPhrasesDetectionJobResponse]
$creadListPrec :: ReadPrec [StartKeyPhrasesDetectionJobResponse]
readPrec :: ReadPrec StartKeyPhrasesDetectionJobResponse
$creadPrec :: ReadPrec StartKeyPhrasesDetectionJobResponse
readList :: ReadS [StartKeyPhrasesDetectionJobResponse]
$creadList :: ReadS [StartKeyPhrasesDetectionJobResponse]
readsPrec :: Int -> ReadS StartKeyPhrasesDetectionJobResponse
$creadsPrec :: Int -> ReadS StartKeyPhrasesDetectionJobResponse
Prelude.Read, Int -> StartKeyPhrasesDetectionJobResponse -> ShowS
[StartKeyPhrasesDetectionJobResponse] -> ShowS
StartKeyPhrasesDetectionJobResponse -> String
(Int -> StartKeyPhrasesDetectionJobResponse -> ShowS)
-> (StartKeyPhrasesDetectionJobResponse -> String)
-> ([StartKeyPhrasesDetectionJobResponse] -> ShowS)
-> Show StartKeyPhrasesDetectionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartKeyPhrasesDetectionJobResponse] -> ShowS
$cshowList :: [StartKeyPhrasesDetectionJobResponse] -> ShowS
show :: StartKeyPhrasesDetectionJobResponse -> String
$cshow :: StartKeyPhrasesDetectionJobResponse -> String
showsPrec :: Int -> StartKeyPhrasesDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartKeyPhrasesDetectionJobResponse -> ShowS
Prelude.Show, (forall x.
StartKeyPhrasesDetectionJobResponse
-> Rep StartKeyPhrasesDetectionJobResponse x)
-> (forall x.
Rep StartKeyPhrasesDetectionJobResponse x
-> StartKeyPhrasesDetectionJobResponse)
-> Generic StartKeyPhrasesDetectionJobResponse
forall x.
Rep StartKeyPhrasesDetectionJobResponse x
-> StartKeyPhrasesDetectionJobResponse
forall x.
StartKeyPhrasesDetectionJobResponse
-> Rep StartKeyPhrasesDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartKeyPhrasesDetectionJobResponse x
-> StartKeyPhrasesDetectionJobResponse
$cfrom :: forall x.
StartKeyPhrasesDetectionJobResponse
-> Rep StartKeyPhrasesDetectionJobResponse x
Prelude.Generic)
newStartKeyPhrasesDetectionJobResponse ::
Prelude.Int ->
StartKeyPhrasesDetectionJobResponse
newStartKeyPhrasesDetectionJobResponse :: Int -> StartKeyPhrasesDetectionJobResponse
newStartKeyPhrasesDetectionJobResponse Int
pHttpStatus_ =
StartKeyPhrasesDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse'
{ $sel:jobId:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startKeyPhrasesDetectionJobResponse_jobId :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_jobId = (StartKeyPhrasesDetectionJobResponse -> Maybe Text)
-> (StartKeyPhrasesDetectionJobResponse
-> Maybe Text -> StartKeyPhrasesDetectionJobResponse)
-> Lens
StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Maybe Text
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartKeyPhrasesDetectionJobResponse)
startKeyPhrasesDetectionJobResponse_jobArn :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_jobArn = (StartKeyPhrasesDetectionJobResponse -> Maybe Text)
-> (StartKeyPhrasesDetectionJobResponse
-> Maybe Text -> StartKeyPhrasesDetectionJobResponse)
-> Lens
StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Maybe Text
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartKeyPhrasesDetectionJobResponse)
startKeyPhrasesDetectionJobResponse_jobStatus :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe JobStatus)
startKeyPhrasesDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_jobStatus = (StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus)
-> (StartKeyPhrasesDetectionJobResponse
-> Maybe JobStatus -> StartKeyPhrasesDetectionJobResponse)
-> Lens
StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Maybe JobStatus
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartKeyPhrasesDetectionJobResponse)
startKeyPhrasesDetectionJobResponse_httpStatus :: Lens.Lens' StartKeyPhrasesDetectionJobResponse Prelude.Int
startKeyPhrasesDetectionJobResponse_httpStatus :: (Int -> f Int)
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_httpStatus = (StartKeyPhrasesDetectionJobResponse -> Int)
-> (StartKeyPhrasesDetectionJobResponse
-> Int -> StartKeyPhrasesDetectionJobResponse)
-> Lens
StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Int
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartKeyPhrasesDetectionJobResponse)
instance
Prelude.NFData
StartKeyPhrasesDetectionJobResponse