{-# 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.StartSentimentDetectionJob
(
StartSentimentDetectionJob (..),
newStartSentimentDetectionJob,
startSentimentDetectionJob_jobName,
startSentimentDetectionJob_vpcConfig,
startSentimentDetectionJob_volumeKmsKeyId,
startSentimentDetectionJob_clientRequestToken,
startSentimentDetectionJob_tags,
startSentimentDetectionJob_inputDataConfig,
startSentimentDetectionJob_outputDataConfig,
startSentimentDetectionJob_dataAccessRoleArn,
startSentimentDetectionJob_languageCode,
StartSentimentDetectionJobResponse (..),
newStartSentimentDetectionJobResponse,
startSentimentDetectionJobResponse_jobId,
startSentimentDetectionJobResponse_jobArn,
startSentimentDetectionJobResponse_jobStatus,
startSentimentDetectionJobResponse_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 StartSentimentDetectionJob = StartSentimentDetectionJob'
{
StartSentimentDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartSentimentDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartSentimentDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartSentimentDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartSentimentDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartSentimentDetectionJob -> LanguageCode
languageCode :: LanguageCode
}
deriving (StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
(StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool)
-> (StartSentimentDetectionJob
-> StartSentimentDetectionJob -> Bool)
-> Eq StartSentimentDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
$c/= :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
== :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
$c== :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartSentimentDetectionJob]
ReadPrec StartSentimentDetectionJob
Int -> ReadS StartSentimentDetectionJob
ReadS [StartSentimentDetectionJob]
(Int -> ReadS StartSentimentDetectionJob)
-> ReadS [StartSentimentDetectionJob]
-> ReadPrec StartSentimentDetectionJob
-> ReadPrec [StartSentimentDetectionJob]
-> Read StartSentimentDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSentimentDetectionJob]
$creadListPrec :: ReadPrec [StartSentimentDetectionJob]
readPrec :: ReadPrec StartSentimentDetectionJob
$creadPrec :: ReadPrec StartSentimentDetectionJob
readList :: ReadS [StartSentimentDetectionJob]
$creadList :: ReadS [StartSentimentDetectionJob]
readsPrec :: Int -> ReadS StartSentimentDetectionJob
$creadsPrec :: Int -> ReadS StartSentimentDetectionJob
Prelude.Read, Int -> StartSentimentDetectionJob -> ShowS
[StartSentimentDetectionJob] -> ShowS
StartSentimentDetectionJob -> String
(Int -> StartSentimentDetectionJob -> ShowS)
-> (StartSentimentDetectionJob -> String)
-> ([StartSentimentDetectionJob] -> ShowS)
-> Show StartSentimentDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSentimentDetectionJob] -> ShowS
$cshowList :: [StartSentimentDetectionJob] -> ShowS
show :: StartSentimentDetectionJob -> String
$cshow :: StartSentimentDetectionJob -> String
showsPrec :: Int -> StartSentimentDetectionJob -> ShowS
$cshowsPrec :: Int -> StartSentimentDetectionJob -> ShowS
Prelude.Show, (forall x.
StartSentimentDetectionJob -> Rep StartSentimentDetectionJob x)
-> (forall x.
Rep StartSentimentDetectionJob x -> StartSentimentDetectionJob)
-> Generic StartSentimentDetectionJob
forall x.
Rep StartSentimentDetectionJob x -> StartSentimentDetectionJob
forall x.
StartSentimentDetectionJob -> Rep StartSentimentDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSentimentDetectionJob x -> StartSentimentDetectionJob
$cfrom :: forall x.
StartSentimentDetectionJob -> Rep StartSentimentDetectionJob x
Prelude.Generic)
newStartSentimentDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
LanguageCode ->
StartSentimentDetectionJob
newStartSentimentDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartSentimentDetectionJob
newStartSentimentDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_
LanguageCode
pLanguageCode_ =
StartSentimentDetectionJob' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartSentimentDetectionJob
StartSentimentDetectionJob'
{ $sel:jobName:StartSentimentDetectionJob' :: Maybe Text
jobName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartSentimentDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartSentimentDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartSentimentDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartSentimentDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartSentimentDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
$sel:languageCode:StartSentimentDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
}
startSentimentDetectionJob_jobName :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe Prelude.Text)
startSentimentDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_jobName = (StartSentimentDetectionJob -> Maybe Text)
-> (StartSentimentDetectionJob
-> Maybe Text -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} Maybe Text
a -> StartSentimentDetectionJob
s {$sel:jobName:StartSentimentDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_vpcConfig :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe VpcConfig)
startSentimentDetectionJob_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_vpcConfig = (StartSentimentDetectionJob -> Maybe VpcConfig)
-> (StartSentimentDetectionJob
-> Maybe VpcConfig -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
(Maybe VpcConfig)
(Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} Maybe VpcConfig
a -> StartSentimentDetectionJob
s {$sel:vpcConfig:StartSentimentDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_volumeKmsKeyId :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe Prelude.Text)
startSentimentDetectionJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_volumeKmsKeyId = (StartSentimentDetectionJob -> Maybe Text)
-> (StartSentimentDetectionJob
-> Maybe Text -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} Maybe Text
a -> StartSentimentDetectionJob
s {$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_clientRequestToken :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe Prelude.Text)
startSentimentDetectionJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_clientRequestToken = (StartSentimentDetectionJob -> Maybe Text)
-> (StartSentimentDetectionJob
-> Maybe Text -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} Maybe Text
a -> StartSentimentDetectionJob
s {$sel:clientRequestToken:StartSentimentDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_tags :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe [Tag])
startSentimentDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_tags = (StartSentimentDetectionJob -> Maybe [Tag])
-> (StartSentimentDetectionJob
-> Maybe [Tag] -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} Maybe [Tag]
a -> StartSentimentDetectionJob
s {$sel:tags:StartSentimentDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartSentimentDetectionJob) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartSentimentDetectionJob
-> f StartSentimentDetectionJob
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
startSentimentDetectionJob_inputDataConfig :: Lens.Lens' StartSentimentDetectionJob InputDataConfig
startSentimentDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_inputDataConfig = (StartSentimentDetectionJob -> InputDataConfig)
-> (StartSentimentDetectionJob
-> InputDataConfig -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
InputDataConfig
InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} InputDataConfig
a -> StartSentimentDetectionJob
s {$sel:inputDataConfig:StartSentimentDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_outputDataConfig :: Lens.Lens' StartSentimentDetectionJob OutputDataConfig
startSentimentDetectionJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_outputDataConfig = (StartSentimentDetectionJob -> OutputDataConfig)
-> (StartSentimentDetectionJob
-> OutputDataConfig -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
OutputDataConfig
OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} OutputDataConfig
a -> StartSentimentDetectionJob
s {$sel:outputDataConfig:StartSentimentDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_dataAccessRoleArn :: Lens.Lens' StartSentimentDetectionJob Prelude.Text
startSentimentDetectionJob_dataAccessRoleArn :: (Text -> f Text)
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_dataAccessRoleArn = (StartSentimentDetectionJob -> Text)
-> (StartSentimentDetectionJob
-> Text -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob StartSentimentDetectionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} Text
a -> StartSentimentDetectionJob
s {$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartSentimentDetectionJob)
startSentimentDetectionJob_languageCode :: Lens.Lens' StartSentimentDetectionJob LanguageCode
startSentimentDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_languageCode = (StartSentimentDetectionJob -> LanguageCode)
-> (StartSentimentDetectionJob
-> LanguageCode -> StartSentimentDetectionJob)
-> Lens
StartSentimentDetectionJob
StartSentimentDetectionJob
LanguageCode
LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} LanguageCode
a -> StartSentimentDetectionJob
s {$sel:languageCode:StartSentimentDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartSentimentDetectionJob)
instance Core.AWSRequest StartSentimentDetectionJob where
type
AWSResponse StartSentimentDetectionJob =
StartSentimentDetectionJobResponse
request :: StartSentimentDetectionJob -> Request StartSentimentDetectionJob
request = Service
-> StartSentimentDetectionJob -> Request StartSentimentDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartSentimentDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartSentimentDetectionJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartSentimentDetectionJob))
-> Logger
-> Service
-> Proxy StartSentimentDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartSentimentDetectionJob)))
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
-> StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartSentimentDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus -> Int -> StartSentimentDetectionJobResponse)
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 -> StartSentimentDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JobStatus -> Int -> StartSentimentDetectionJobResponse)
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 -> StartSentimentDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartSentimentDetectionJobResponse)
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 -> StartSentimentDetectionJobResponse)
-> Either String Int
-> Either String StartSentimentDetectionJobResponse
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 StartSentimentDetectionJob
instance Prelude.NFData StartSentimentDetectionJob
instance Core.ToHeaders StartSentimentDetectionJob where
toHeaders :: StartSentimentDetectionJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartSentimentDetectionJob -> 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.StartSentimentDetectionJob" ::
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 StartSentimentDetectionJob where
toJSON :: StartSentimentDetectionJob -> Value
toJSON StartSentimentDetectionJob' {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:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Text
$sel:outputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> InputDataConfig
$sel:tags:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:vpcConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe VpcConfig
$sel:jobName:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> 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 StartSentimentDetectionJob where
toPath :: StartSentimentDetectionJob -> ByteString
toPath = ByteString -> StartSentimentDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartSentimentDetectionJob where
toQuery :: StartSentimentDetectionJob -> QueryString
toQuery = QueryString -> StartSentimentDetectionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartSentimentDetectionJobResponse = StartSentimentDetectionJobResponse'
{
StartSentimentDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartSentimentDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool
(StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool)
-> (StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool)
-> Eq StartSentimentDetectionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool
$c/= :: StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool
== :: StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool
$c== :: StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartSentimentDetectionJobResponse]
ReadPrec StartSentimentDetectionJobResponse
Int -> ReadS StartSentimentDetectionJobResponse
ReadS [StartSentimentDetectionJobResponse]
(Int -> ReadS StartSentimentDetectionJobResponse)
-> ReadS [StartSentimentDetectionJobResponse]
-> ReadPrec StartSentimentDetectionJobResponse
-> ReadPrec [StartSentimentDetectionJobResponse]
-> Read StartSentimentDetectionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSentimentDetectionJobResponse]
$creadListPrec :: ReadPrec [StartSentimentDetectionJobResponse]
readPrec :: ReadPrec StartSentimentDetectionJobResponse
$creadPrec :: ReadPrec StartSentimentDetectionJobResponse
readList :: ReadS [StartSentimentDetectionJobResponse]
$creadList :: ReadS [StartSentimentDetectionJobResponse]
readsPrec :: Int -> ReadS StartSentimentDetectionJobResponse
$creadsPrec :: Int -> ReadS StartSentimentDetectionJobResponse
Prelude.Read, Int -> StartSentimentDetectionJobResponse -> ShowS
[StartSentimentDetectionJobResponse] -> ShowS
StartSentimentDetectionJobResponse -> String
(Int -> StartSentimentDetectionJobResponse -> ShowS)
-> (StartSentimentDetectionJobResponse -> String)
-> ([StartSentimentDetectionJobResponse] -> ShowS)
-> Show StartSentimentDetectionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSentimentDetectionJobResponse] -> ShowS
$cshowList :: [StartSentimentDetectionJobResponse] -> ShowS
show :: StartSentimentDetectionJobResponse -> String
$cshow :: StartSentimentDetectionJobResponse -> String
showsPrec :: Int -> StartSentimentDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartSentimentDetectionJobResponse -> ShowS
Prelude.Show, (forall x.
StartSentimentDetectionJobResponse
-> Rep StartSentimentDetectionJobResponse x)
-> (forall x.
Rep StartSentimentDetectionJobResponse x
-> StartSentimentDetectionJobResponse)
-> Generic StartSentimentDetectionJobResponse
forall x.
Rep StartSentimentDetectionJobResponse x
-> StartSentimentDetectionJobResponse
forall x.
StartSentimentDetectionJobResponse
-> Rep StartSentimentDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSentimentDetectionJobResponse x
-> StartSentimentDetectionJobResponse
$cfrom :: forall x.
StartSentimentDetectionJobResponse
-> Rep StartSentimentDetectionJobResponse x
Prelude.Generic)
newStartSentimentDetectionJobResponse ::
Prelude.Int ->
StartSentimentDetectionJobResponse
newStartSentimentDetectionJobResponse :: Int -> StartSentimentDetectionJobResponse
newStartSentimentDetectionJobResponse Int
pHttpStatus_ =
StartSentimentDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse'
{ $sel:jobId:StartSentimentDetectionJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartSentimentDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartSentimentDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartSentimentDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startSentimentDetectionJobResponse_jobId :: Lens.Lens' StartSentimentDetectionJobResponse (Prelude.Maybe Prelude.Text)
startSentimentDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartSentimentDetectionJobResponse
-> f StartSentimentDetectionJobResponse
startSentimentDetectionJobResponse_jobId = (StartSentimentDetectionJobResponse -> Maybe Text)
-> (StartSentimentDetectionJobResponse
-> Maybe Text -> StartSentimentDetectionJobResponse)
-> Lens
StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartSentimentDetectionJobResponse
s@StartSentimentDetectionJobResponse' {} Maybe Text
a -> StartSentimentDetectionJobResponse
s {$sel:jobId:StartSentimentDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartSentimentDetectionJobResponse)
startSentimentDetectionJobResponse_jobArn :: Lens.Lens' StartSentimentDetectionJobResponse (Prelude.Maybe Prelude.Text)
startSentimentDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartSentimentDetectionJobResponse
-> f StartSentimentDetectionJobResponse
startSentimentDetectionJobResponse_jobArn = (StartSentimentDetectionJobResponse -> Maybe Text)
-> (StartSentimentDetectionJobResponse
-> Maybe Text -> StartSentimentDetectionJobResponse)
-> Lens
StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartSentimentDetectionJobResponse
s@StartSentimentDetectionJobResponse' {} Maybe Text
a -> StartSentimentDetectionJobResponse
s {$sel:jobArn:StartSentimentDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartSentimentDetectionJobResponse)
startSentimentDetectionJobResponse_jobStatus :: Lens.Lens' StartSentimentDetectionJobResponse (Prelude.Maybe JobStatus)
startSentimentDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartSentimentDetectionJobResponse
-> f StartSentimentDetectionJobResponse
startSentimentDetectionJobResponse_jobStatus = (StartSentimentDetectionJobResponse -> Maybe JobStatus)
-> (StartSentimentDetectionJobResponse
-> Maybe JobStatus -> StartSentimentDetectionJobResponse)
-> Lens
StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse
(Maybe JobStatus)
(Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartSentimentDetectionJobResponse
s@StartSentimentDetectionJobResponse' {} Maybe JobStatus
a -> StartSentimentDetectionJobResponse
s {$sel:jobStatus:StartSentimentDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartSentimentDetectionJobResponse)
startSentimentDetectionJobResponse_httpStatus :: Lens.Lens' StartSentimentDetectionJobResponse Prelude.Int
startSentimentDetectionJobResponse_httpStatus :: (Int -> f Int)
-> StartSentimentDetectionJobResponse
-> f StartSentimentDetectionJobResponse
startSentimentDetectionJobResponse_httpStatus = (StartSentimentDetectionJobResponse -> Int)
-> (StartSentimentDetectionJobResponse
-> Int -> StartSentimentDetectionJobResponse)
-> Lens
StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartSentimentDetectionJobResponse
s@StartSentimentDetectionJobResponse' {} Int
a -> StartSentimentDetectionJobResponse
s {$sel:httpStatus:StartSentimentDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartSentimentDetectionJobResponse)
instance
Prelude.NFData
StartSentimentDetectionJobResponse