{-# 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_jobName,
startTopicsDetectionJob_vpcConfig,
startTopicsDetectionJob_volumeKmsKeyId,
startTopicsDetectionJob_numberOfTopics,
startTopicsDetectionJob_clientRequestToken,
startTopicsDetectionJob_tags,
startTopicsDetectionJob_inputDataConfig,
startTopicsDetectionJob_outputDataConfig,
startTopicsDetectionJob_dataAccessRoleArn,
StartTopicsDetectionJobResponse (..),
newStartTopicsDetectionJobResponse,
startTopicsDetectionJobResponse_jobId,
startTopicsDetectionJobResponse_jobArn,
startTopicsDetectionJobResponse_jobStatus,
startTopicsDetectionJobResponse_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 StartTopicsDetectionJob = StartTopicsDetectionJob'
{
StartTopicsDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartTopicsDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJob -> Maybe Natural
numberOfTopics :: Prelude.Maybe Prelude.Natural,
StartTopicsDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartTopicsDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartTopicsDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartTopicsDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text
}
deriving (StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
(StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool)
-> (StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool)
-> Eq StartTopicsDetectionJob
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]
(Int -> ReadS StartTopicsDetectionJob)
-> ReadS [StartTopicsDetectionJob]
-> ReadPrec StartTopicsDetectionJob
-> ReadPrec [StartTopicsDetectionJob]
-> Read 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
(Int -> StartTopicsDetectionJob -> ShowS)
-> (StartTopicsDetectionJob -> String)
-> ([StartTopicsDetectionJob] -> ShowS)
-> Show StartTopicsDetectionJob
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.
StartTopicsDetectionJob -> Rep StartTopicsDetectionJob x)
-> (forall x.
Rep StartTopicsDetectionJob x -> StartTopicsDetectionJob)
-> Generic StartTopicsDetectionJob
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' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> StartTopicsDetectionJob
StartTopicsDetectionJob'
{ $sel:jobName:StartTopicsDetectionJob' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartTopicsDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfTopics:StartTopicsDetectionJob' :: Maybe Natural
numberOfTopics = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartTopicsDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartTopicsDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
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_jobName :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Text)
startTopicsDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_jobName = (StartTopicsDetectionJob -> Maybe Text)
-> (StartTopicsDetectionJob
-> Maybe Text -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
(Maybe Text)
(Maybe Text)
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_vpcConfig :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe VpcConfig)
startTopicsDetectionJob_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_vpcConfig = (StartTopicsDetectionJob -> Maybe VpcConfig)
-> (StartTopicsDetectionJob
-> Maybe VpcConfig -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
(Maybe VpcConfig)
(Maybe 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_volumeKmsKeyId :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Text)
startTopicsDetectionJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_volumeKmsKeyId = (StartTopicsDetectionJob -> Maybe Text)
-> (StartTopicsDetectionJob
-> Maybe Text -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
(Maybe Text)
(Maybe Text)
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_numberOfTopics :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Natural)
startTopicsDetectionJob_numberOfTopics :: (Maybe Natural -> f (Maybe Natural))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_numberOfTopics = (StartTopicsDetectionJob -> Maybe Natural)
-> (StartTopicsDetectionJob
-> Maybe Natural -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
(Maybe Natural)
(Maybe Natural)
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_clientRequestToken :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Text)
startTopicsDetectionJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_clientRequestToken = (StartTopicsDetectionJob -> Maybe Text)
-> (StartTopicsDetectionJob
-> Maybe Text -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
(Maybe Text)
(Maybe Text)
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_tags :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe [Tag])
startTopicsDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_tags = (StartTopicsDetectionJob -> Maybe [Tag])
-> (StartTopicsDetectionJob
-> Maybe [Tag] -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
(Maybe [Tag])
(Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartTopicsDetectionJob
-> f StartTopicsDetectionJob
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
startTopicsDetectionJob_inputDataConfig :: Lens.Lens' StartTopicsDetectionJob InputDataConfig
startTopicsDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_inputDataConfig = (StartTopicsDetectionJob -> InputDataConfig)
-> (StartTopicsDetectionJob
-> InputDataConfig -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
InputDataConfig
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 :: (OutputDataConfig -> f OutputDataConfig)
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_outputDataConfig = (StartTopicsDetectionJob -> OutputDataConfig)
-> (StartTopicsDetectionJob
-> OutputDataConfig -> StartTopicsDetectionJob)
-> Lens
StartTopicsDetectionJob
StartTopicsDetectionJob
OutputDataConfig
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 :: (Text -> f Text)
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_dataAccessRoleArn = (StartTopicsDetectionJob -> Text)
-> (StartTopicsDetectionJob -> Text -> StartTopicsDetectionJob)
-> Lens StartTopicsDetectionJob StartTopicsDetectionJob Text Text
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 :: StartTopicsDetectionJob -> Request StartTopicsDetectionJob
request = Service
-> StartTopicsDetectionJob -> Request StartTopicsDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartTopicsDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartTopicsDetectionJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartTopicsDetectionJob))
-> Logger
-> Service
-> Proxy StartTopicsDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartTopicsDetectionJob)))
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
-> StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartTopicsDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> StartTopicsDetectionJobResponse)
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 -> StartTopicsDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe JobStatus -> Int -> StartTopicsDetectionJobResponse)
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 -> StartTopicsDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartTopicsDetectionJobResponse)
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 -> StartTopicsDetectionJobResponse)
-> Either String Int
-> Either String StartTopicsDetectionJobResponse
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 StartTopicsDetectionJob
instance Prelude.NFData StartTopicsDetectionJob
instance Core.ToHeaders StartTopicsDetectionJob where
toHeaders :: StartTopicsDetectionJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartTopicsDetectionJob -> 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.StartTopicsDetectionJob" ::
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 StartTopicsDetectionJob where
toJSON :: StartTopicsDetectionJob -> Value
toJSON StartTopicsDetectionJob' {Maybe Natural
Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
numberOfTopics :: Maybe Natural
volumeKmsKeyId :: Maybe Text
vpcConfig :: Maybe VpcConfig
jobName :: Maybe Text
$sel:dataAccessRoleArn:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Text
$sel:outputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> InputDataConfig
$sel:tags:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:numberOfTopics:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Natural
$sel:volumeKmsKeyId:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Text
$sel:vpcConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe VpcConfig
$sel:jobName:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> 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
"NumberOfTopics" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
numberOfTopics,
(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)
]
)
instance Core.ToPath StartTopicsDetectionJob where
toPath :: StartTopicsDetectionJob -> ByteString
toPath = ByteString -> StartTopicsDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartTopicsDetectionJob where
toQuery :: StartTopicsDetectionJob -> QueryString
toQuery = QueryString -> StartTopicsDetectionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartTopicsDetectionJobResponse = StartTopicsDetectionJobResponse'
{
StartTopicsDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartTopicsDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartTopicsDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool
(StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool)
-> (StartTopicsDetectionJobResponse
-> StartTopicsDetectionJobResponse -> Bool)
-> Eq StartTopicsDetectionJobResponse
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]
(Int -> ReadS StartTopicsDetectionJobResponse)
-> ReadS [StartTopicsDetectionJobResponse]
-> ReadPrec StartTopicsDetectionJobResponse
-> ReadPrec [StartTopicsDetectionJobResponse]
-> Read 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
(Int -> StartTopicsDetectionJobResponse -> ShowS)
-> (StartTopicsDetectionJobResponse -> String)
-> ([StartTopicsDetectionJobResponse] -> ShowS)
-> Show StartTopicsDetectionJobResponse
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.
StartTopicsDetectionJobResponse
-> Rep StartTopicsDetectionJobResponse x)
-> (forall x.
Rep StartTopicsDetectionJobResponse x
-> StartTopicsDetectionJobResponse)
-> Generic StartTopicsDetectionJobResponse
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' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse'
{ $sel:jobId:StartTopicsDetectionJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartTopicsDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartTopicsDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartTopicsDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startTopicsDetectionJobResponse_jobId :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe Prelude.Text)
startTopicsDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartTopicsDetectionJobResponse
-> f StartTopicsDetectionJobResponse
startTopicsDetectionJobResponse_jobId = (StartTopicsDetectionJobResponse -> Maybe Text)
-> (StartTopicsDetectionJobResponse
-> Maybe Text -> StartTopicsDetectionJobResponse)
-> Lens
StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse
(Maybe Text)
(Maybe Text)
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_jobArn :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe Prelude.Text)
startTopicsDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartTopicsDetectionJobResponse
-> f StartTopicsDetectionJobResponse
startTopicsDetectionJobResponse_jobArn = (StartTopicsDetectionJobResponse -> Maybe Text)
-> (StartTopicsDetectionJobResponse
-> Maybe Text -> StartTopicsDetectionJobResponse)
-> Lens
StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse
(Maybe Text)
(Maybe Text)
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_jobStatus :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe JobStatus)
startTopicsDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartTopicsDetectionJobResponse
-> f StartTopicsDetectionJobResponse
startTopicsDetectionJobResponse_jobStatus = (StartTopicsDetectionJobResponse -> Maybe JobStatus)
-> (StartTopicsDetectionJobResponse
-> Maybe JobStatus -> StartTopicsDetectionJobResponse)
-> Lens
StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse
(Maybe JobStatus)
(Maybe 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 :: (Int -> f Int)
-> StartTopicsDetectionJobResponse
-> f StartTopicsDetectionJobResponse
startTopicsDetectionJobResponse_httpStatus = (StartTopicsDetectionJobResponse -> Int)
-> (StartTopicsDetectionJobResponse
-> Int -> StartTopicsDetectionJobResponse)
-> Lens
StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse
Int
Int
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