{-# 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_clientRequestToken,
startKeyPhrasesDetectionJob_jobName,
startKeyPhrasesDetectionJob_tags,
startKeyPhrasesDetectionJob_volumeKmsKeyId,
startKeyPhrasesDetectionJob_vpcConfig,
startKeyPhrasesDetectionJob_inputDataConfig,
startKeyPhrasesDetectionJob_outputDataConfig,
startKeyPhrasesDetectionJob_dataAccessRoleArn,
startKeyPhrasesDetectionJob_languageCode,
StartKeyPhrasesDetectionJobResponse (..),
newStartKeyPhrasesDetectionJobResponse,
startKeyPhrasesDetectionJobResponse_jobArn,
startKeyPhrasesDetectionJobResponse_jobId,
startKeyPhrasesDetectionJobResponse_jobStatus,
startKeyPhrasesDetectionJobResponse_httpStatus,
)
where
import Amazonka.Comprehend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartKeyPhrasesDetectionJob = StartKeyPhrasesDetectionJob'
{
StartKeyPhrasesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartKeyPhrasesDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartKeyPhrasesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartKeyPhrasesDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartKeyPhrasesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartKeyPhrasesDetectionJob -> LanguageCode
languageCode :: LanguageCode
}
deriving (StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
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]
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
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.
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'
{ $sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartKeyPhrasesDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartKeyPhrasesDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: Maybe VpcConfig
vpcConfig = 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_clientRequestToken :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_clientRequestToken :: Lens' StartKeyPhrasesDetectionJob (Maybe Text)
startKeyPhrasesDetectionJob_clientRequestToken = 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_jobName :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_jobName :: Lens' StartKeyPhrasesDetectionJob (Maybe Text)
startKeyPhrasesDetectionJob_jobName = 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_tags :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe [Tag])
startKeyPhrasesDetectionJob_tags :: Lens' StartKeyPhrasesDetectionJob (Maybe [Tag])
startKeyPhrasesDetectionJob_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startKeyPhrasesDetectionJob_volumeKmsKeyId :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_volumeKmsKeyId :: Lens' StartKeyPhrasesDetectionJob (Maybe Text)
startKeyPhrasesDetectionJob_volumeKmsKeyId = 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_vpcConfig :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe VpcConfig)
startKeyPhrasesDetectionJob_vpcConfig :: Lens' StartKeyPhrasesDetectionJob (Maybe VpcConfig)
startKeyPhrasesDetectionJob_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_inputDataConfig :: Lens.Lens' StartKeyPhrasesDetectionJob InputDataConfig
startKeyPhrasesDetectionJob_inputDataConfig :: Lens' StartKeyPhrasesDetectionJob InputDataConfig
startKeyPhrasesDetectionJob_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 :: Lens' StartKeyPhrasesDetectionJob OutputDataConfig
startKeyPhrasesDetectionJob_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 :: Lens' StartKeyPhrasesDetectionJob Text
startKeyPhrasesDetectionJob_dataAccessRoleArn = 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 :: Lens' StartKeyPhrasesDetectionJob LanguageCode
startKeyPhrasesDetectionJob_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 :: (Service -> Service)
-> StartKeyPhrasesDetectionJob
-> Request StartKeyPhrasesDetectionJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartKeyPhrasesDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartKeyPhrasesDetectionJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable StartKeyPhrasesDetectionJob where
hashWithSalt :: Int -> StartKeyPhrasesDetectionJob -> Int
hashWithSalt Int
_salt StartKeyPhrasesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeKmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfig
vpcConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputDataConfig
inputDataConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputDataConfig
outputDataConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataAccessRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LanguageCode
languageCode
instance Prelude.NFData StartKeyPhrasesDetectionJob where
rnf :: StartKeyPhrasesDetectionJob -> ()
rnf StartKeyPhrasesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeKmsKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfig
vpcConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InputDataConfig
inputDataConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputDataConfig
outputDataConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataAccessRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LanguageCode
languageCode
instance Data.ToHeaders StartKeyPhrasesDetectionJob where
toHeaders :: StartKeyPhrasesDetectionJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Comprehend_20171127.StartKeyPhrasesDetectionJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
(Key
"JobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobName,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Key
"VolumeKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
volumeKmsKeyId,
(Key
"VpcConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
forall a. a -> Maybe a
Prelude.Just
(Key
"InputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputDataConfig
inputDataConfig),
forall a. a -> Maybe a
Prelude.Just
(Key
"OutputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputDataConfig
outputDataConfig),
forall a. a -> Maybe a
Prelude.Just
(Key
"DataAccessRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataAccessRoleArn),
forall a. a -> Maybe a
Prelude.Just (Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LanguageCode
languageCode)
]
)
instance Data.ToPath StartKeyPhrasesDetectionJob where
toPath :: StartKeyPhrasesDetectionJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StartKeyPhrasesDetectionJob where
toQuery :: StartKeyPhrasesDetectionJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartKeyPhrasesDetectionJobResponse = StartKeyPhrasesDetectionJobResponse'
{
StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartKeyPhrasesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
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]
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
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.
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'
{ $sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobArn =
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startKeyPhrasesDetectionJobResponse_jobArn :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJobResponse_jobArn :: Lens' StartKeyPhrasesDetectionJobResponse (Maybe Text)
startKeyPhrasesDetectionJobResponse_jobArn = 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_jobId :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJobResponse_jobId :: Lens' StartKeyPhrasesDetectionJobResponse (Maybe Text)
startKeyPhrasesDetectionJobResponse_jobId = 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_jobStatus :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe JobStatus)
startKeyPhrasesDetectionJobResponse_jobStatus :: Lens' StartKeyPhrasesDetectionJobResponse (Maybe JobStatus)
startKeyPhrasesDetectionJobResponse_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 :: Lens' StartKeyPhrasesDetectionJobResponse Int
startKeyPhrasesDetectionJobResponse_httpStatus = 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
where
rnf :: StartKeyPhrasesDetectionJobResponse -> ()
rnf StartKeyPhrasesDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Int
$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus