{-# 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.StartTopicsDetectionJob
(
StartTopicsDetectionJob (..),
newStartTopicsDetectionJob,
startTopicsDetectionJob_clientRequestToken,
startTopicsDetectionJob_jobName,
startTopicsDetectionJob_numberOfTopics,
startTopicsDetectionJob_tags,
startTopicsDetectionJob_volumeKmsKeyId,
startTopicsDetectionJob_vpcConfig,
startTopicsDetectionJob_inputDataConfig,
startTopicsDetectionJob_outputDataConfig,
startTopicsDetectionJob_dataAccessRoleArn,
StartTopicsDetectionJobResponse (..),
newStartTopicsDetectionJobResponse,
startTopicsDetectionJobResponse_jobArn,
startTopicsDetectionJobResponse_jobId,
startTopicsDetectionJobResponse_jobStatus,
startTopicsDetectionJobResponse_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 StartTopicsDetectionJob = StartTopicsDetectionJob'
{
StartTopicsDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJob -> Maybe Natural
numberOfTopics :: Prelude.Maybe Prelude.Natural,
StartTopicsDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartTopicsDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartTopicsDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartTopicsDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartTopicsDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text
}
deriving (StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
$c/= :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
== :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
$c== :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartTopicsDetectionJob]
ReadPrec StartTopicsDetectionJob
Int -> ReadS StartTopicsDetectionJob
ReadS [StartTopicsDetectionJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTopicsDetectionJob]
$creadListPrec :: ReadPrec [StartTopicsDetectionJob]
readPrec :: ReadPrec StartTopicsDetectionJob
$creadPrec :: ReadPrec StartTopicsDetectionJob
readList :: ReadS [StartTopicsDetectionJob]
$creadList :: ReadS [StartTopicsDetectionJob]
readsPrec :: Int -> ReadS StartTopicsDetectionJob
$creadsPrec :: Int -> ReadS StartTopicsDetectionJob
Prelude.Read, Int -> StartTopicsDetectionJob -> ShowS
[StartTopicsDetectionJob] -> ShowS
StartTopicsDetectionJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTopicsDetectionJob] -> ShowS
$cshowList :: [StartTopicsDetectionJob] -> ShowS
show :: StartTopicsDetectionJob -> String
$cshow :: StartTopicsDetectionJob -> String
showsPrec :: Int -> StartTopicsDetectionJob -> ShowS
$cshowsPrec :: Int -> StartTopicsDetectionJob -> ShowS
Prelude.Show, forall x. Rep StartTopicsDetectionJob x -> StartTopicsDetectionJob
forall x. StartTopicsDetectionJob -> Rep StartTopicsDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartTopicsDetectionJob x -> StartTopicsDetectionJob
$cfrom :: forall x. StartTopicsDetectionJob -> Rep StartTopicsDetectionJob x
Prelude.Generic)
newStartTopicsDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
StartTopicsDetectionJob
newStartTopicsDetectionJob :: InputDataConfig
-> OutputDataConfig -> Text -> StartTopicsDetectionJob
newStartTopicsDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_ =
StartTopicsDetectionJob'
{ $sel:clientRequestToken:StartTopicsDetectionJob' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartTopicsDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfTopics:StartTopicsDetectionJob' :: Maybe Natural
numberOfTopics = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartTopicsDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartTopicsDetectionJob' :: Maybe VpcConfig
vpcConfig = forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartTopicsDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartTopicsDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_
}
startTopicsDetectionJob_clientRequestToken :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Text)
startTopicsDetectionJob_clientRequestToken :: Lens' StartTopicsDetectionJob (Maybe Text)
startTopicsDetectionJob_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe Text
a -> StartTopicsDetectionJob
s {$sel:clientRequestToken:StartTopicsDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_jobName :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Text)
startTopicsDetectionJob_jobName :: Lens' StartTopicsDetectionJob (Maybe Text)
startTopicsDetectionJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe Text
a -> StartTopicsDetectionJob
s {$sel:jobName:StartTopicsDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_numberOfTopics :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Natural)
startTopicsDetectionJob_numberOfTopics :: Lens' StartTopicsDetectionJob (Maybe Natural)
startTopicsDetectionJob_numberOfTopics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe Natural
numberOfTopics :: Maybe Natural
$sel:numberOfTopics:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Natural
numberOfTopics} -> Maybe Natural
numberOfTopics) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe Natural
a -> StartTopicsDetectionJob
s {$sel:numberOfTopics:StartTopicsDetectionJob' :: Maybe Natural
numberOfTopics = Maybe Natural
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_tags :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe [Tag])
startTopicsDetectionJob_tags :: Lens' StartTopicsDetectionJob (Maybe [Tag])
startTopicsDetectionJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe [Tag]
a -> StartTopicsDetectionJob
s {$sel:tags:StartTopicsDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartTopicsDetectionJob) 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
startTopicsDetectionJob_volumeKmsKeyId :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Text)
startTopicsDetectionJob_volumeKmsKeyId :: Lens' StartTopicsDetectionJob (Maybe Text)
startTopicsDetectionJob_volumeKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe Text
a -> StartTopicsDetectionJob
s {$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_vpcConfig :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe VpcConfig)
startTopicsDetectionJob_vpcConfig :: Lens' StartTopicsDetectionJob (Maybe VpcConfig)
startTopicsDetectionJob_vpcConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe VpcConfig
a -> StartTopicsDetectionJob
s {$sel:vpcConfig:StartTopicsDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_inputDataConfig :: Lens.Lens' StartTopicsDetectionJob InputDataConfig
startTopicsDetectionJob_inputDataConfig :: Lens' StartTopicsDetectionJob InputDataConfig
startTopicsDetectionJob_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} InputDataConfig
a -> StartTopicsDetectionJob
s {$sel:inputDataConfig:StartTopicsDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_outputDataConfig :: Lens.Lens' StartTopicsDetectionJob OutputDataConfig
startTopicsDetectionJob_outputDataConfig :: Lens' StartTopicsDetectionJob OutputDataConfig
startTopicsDetectionJob_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} OutputDataConfig
a -> StartTopicsDetectionJob
s {$sel:outputDataConfig:StartTopicsDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartTopicsDetectionJob)
startTopicsDetectionJob_dataAccessRoleArn :: Lens.Lens' StartTopicsDetectionJob Prelude.Text
startTopicsDetectionJob_dataAccessRoleArn :: Lens' StartTopicsDetectionJob Text
startTopicsDetectionJob_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Text
a -> StartTopicsDetectionJob
s {$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartTopicsDetectionJob)
instance Core.AWSRequest StartTopicsDetectionJob where
type
AWSResponse StartTopicsDetectionJob =
StartTopicsDetectionJobResponse
request :: (Service -> Service)
-> StartTopicsDetectionJob -> Request StartTopicsDetectionJob
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 StartTopicsDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartTopicsDetectionJob)))
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
-> StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse'
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 StartTopicsDetectionJob where
hashWithSalt :: Int -> StartTopicsDetectionJob -> Int
hashWithSalt Int
_salt StartTopicsDetectionJob' {Maybe Natural
Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
numberOfTopics :: Maybe Natural
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Text
$sel:outputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> InputDataConfig
$sel:vpcConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:tags:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe [Tag]
$sel:numberOfTopics:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Natural
$sel:jobName:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:clientRequestToken:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> 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 Natural
numberOfTopics
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
instance Prelude.NFData StartTopicsDetectionJob where
rnf :: StartTopicsDetectionJob -> ()
rnf StartTopicsDetectionJob' {Maybe Natural
Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
numberOfTopics :: Maybe Natural
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Text
$sel:outputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> InputDataConfig
$sel:vpcConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:tags:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe [Tag]
$sel:numberOfTopics:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Natural
$sel:jobName:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:clientRequestToken:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> 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 Natural
numberOfTopics
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
instance Data.ToHeaders StartTopicsDetectionJob where
toHeaders :: StartTopicsDetectionJob -> 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.StartTopicsDetectionJob" ::
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 StartTopicsDetectionJob where
toJSON :: StartTopicsDetectionJob -> Value
toJSON StartTopicsDetectionJob' {Maybe Natural
Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
numberOfTopics :: Maybe Natural
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Text
$sel:outputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> InputDataConfig
$sel:vpcConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:tags:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe [Tag]
$sel:numberOfTopics:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Natural
$sel:jobName:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:clientRequestToken:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> 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
"NumberOfTopics" 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 Natural
numberOfTopics,
(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)
]
)
instance Data.ToPath StartTopicsDetectionJob where
toPath :: StartTopicsDetectionJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StartTopicsDetectionJob where
toQuery :: StartTopicsDetectionJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartTopicsDetectionJobResponse = StartTopicsDetectionJobResponse'
{
StartTopicsDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartTopicsDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool
$c/= :: StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool
== :: StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool
$c== :: StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartTopicsDetectionJobResponse]
ReadPrec StartTopicsDetectionJobResponse
Int -> ReadS StartTopicsDetectionJobResponse
ReadS [StartTopicsDetectionJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTopicsDetectionJobResponse]
$creadListPrec :: ReadPrec [StartTopicsDetectionJobResponse]
readPrec :: ReadPrec StartTopicsDetectionJobResponse
$creadPrec :: ReadPrec StartTopicsDetectionJobResponse
readList :: ReadS [StartTopicsDetectionJobResponse]
$creadList :: ReadS [StartTopicsDetectionJobResponse]
readsPrec :: Int -> ReadS StartTopicsDetectionJobResponse
$creadsPrec :: Int -> ReadS StartTopicsDetectionJobResponse
Prelude.Read, Int -> StartTopicsDetectionJobResponse -> ShowS
[StartTopicsDetectionJobResponse] -> ShowS
StartTopicsDetectionJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTopicsDetectionJobResponse] -> ShowS
$cshowList :: [StartTopicsDetectionJobResponse] -> ShowS
show :: StartTopicsDetectionJobResponse -> String
$cshow :: StartTopicsDetectionJobResponse -> String
showsPrec :: Int -> StartTopicsDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartTopicsDetectionJobResponse -> ShowS
Prelude.Show, forall x.
Rep StartTopicsDetectionJobResponse x
-> StartTopicsDetectionJobResponse
forall x.
StartTopicsDetectionJobResponse
-> Rep StartTopicsDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartTopicsDetectionJobResponse x
-> StartTopicsDetectionJobResponse
$cfrom :: forall x.
StartTopicsDetectionJobResponse
-> Rep StartTopicsDetectionJobResponse x
Prelude.Generic)
newStartTopicsDetectionJobResponse ::
Prelude.Int ->
StartTopicsDetectionJobResponse
newStartTopicsDetectionJobResponse :: Int -> StartTopicsDetectionJobResponse
newStartTopicsDetectionJobResponse Int
pHttpStatus_ =
StartTopicsDetectionJobResponse'
{ $sel:jobArn:StartTopicsDetectionJobResponse' :: Maybe Text
jobArn =
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:StartTopicsDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartTopicsDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartTopicsDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startTopicsDetectionJobResponse_jobArn :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe Prelude.Text)
startTopicsDetectionJobResponse_jobArn :: Lens' StartTopicsDetectionJobResponse (Maybe Text)
startTopicsDetectionJobResponse_jobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartTopicsDetectionJobResponse
s@StartTopicsDetectionJobResponse' {} Maybe Text
a -> StartTopicsDetectionJobResponse
s {$sel:jobArn:StartTopicsDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartTopicsDetectionJobResponse)
startTopicsDetectionJobResponse_jobId :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe Prelude.Text)
startTopicsDetectionJobResponse_jobId :: Lens' StartTopicsDetectionJobResponse (Maybe Text)
startTopicsDetectionJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartTopicsDetectionJobResponse
s@StartTopicsDetectionJobResponse' {} Maybe Text
a -> StartTopicsDetectionJobResponse
s {$sel:jobId:StartTopicsDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartTopicsDetectionJobResponse)
startTopicsDetectionJobResponse_jobStatus :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe JobStatus)
startTopicsDetectionJobResponse_jobStatus :: Lens' StartTopicsDetectionJobResponse (Maybe JobStatus)
startTopicsDetectionJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartTopicsDetectionJobResponse
s@StartTopicsDetectionJobResponse' {} Maybe JobStatus
a -> StartTopicsDetectionJobResponse
s {$sel:jobStatus:StartTopicsDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartTopicsDetectionJobResponse)
startTopicsDetectionJobResponse_httpStatus :: Lens.Lens' StartTopicsDetectionJobResponse Prelude.Int
startTopicsDetectionJobResponse_httpStatus :: Lens' StartTopicsDetectionJobResponse Int
startTopicsDetectionJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartTopicsDetectionJobResponse
s@StartTopicsDetectionJobResponse' {} Int
a -> StartTopicsDetectionJobResponse
s {$sel:httpStatus:StartTopicsDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartTopicsDetectionJobResponse)
instance
Prelude.NFData
StartTopicsDetectionJobResponse
where
rnf :: StartTopicsDetectionJobResponse -> ()
rnf StartTopicsDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Int
$sel:jobStatus:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Maybe Text
$sel:jobArn:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> 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