{-# 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_clientRequestToken,
startSentimentDetectionJob_jobName,
startSentimentDetectionJob_tags,
startSentimentDetectionJob_volumeKmsKeyId,
startSentimentDetectionJob_vpcConfig,
startSentimentDetectionJob_inputDataConfig,
startSentimentDetectionJob_outputDataConfig,
startSentimentDetectionJob_dataAccessRoleArn,
startSentimentDetectionJob_languageCode,
StartSentimentDetectionJobResponse (..),
newStartSentimentDetectionJobResponse,
startSentimentDetectionJobResponse_jobArn,
startSentimentDetectionJobResponse_jobId,
startSentimentDetectionJobResponse_jobStatus,
startSentimentDetectionJobResponse_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 StartSentimentDetectionJob = StartSentimentDetectionJob'
{
StartSentimentDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartSentimentDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartSentimentDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartSentimentDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartSentimentDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartSentimentDetectionJob -> LanguageCode
languageCode :: LanguageCode
}
deriving (StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
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]
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
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.
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'
{ $sel:clientRequestToken:StartSentimentDetectionJob' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartSentimentDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartSentimentDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartSentimentDetectionJob' :: Maybe VpcConfig
vpcConfig = 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_clientRequestToken :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe Prelude.Text)
startSentimentDetectionJob_clientRequestToken :: Lens' StartSentimentDetectionJob (Maybe Text)
startSentimentDetectionJob_clientRequestToken = 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_jobName :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe Prelude.Text)
startSentimentDetectionJob_jobName :: Lens' StartSentimentDetectionJob (Maybe Text)
startSentimentDetectionJob_jobName = 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_tags :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe [Tag])
startSentimentDetectionJob_tags :: Lens' StartSentimentDetectionJob (Maybe [Tag])
startSentimentDetectionJob_tags = 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) 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
startSentimentDetectionJob_volumeKmsKeyId :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe Prelude.Text)
startSentimentDetectionJob_volumeKmsKeyId :: Lens' StartSentimentDetectionJob (Maybe Text)
startSentimentDetectionJob_volumeKmsKeyId = 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_vpcConfig :: Lens.Lens' StartSentimentDetectionJob (Prelude.Maybe VpcConfig)
startSentimentDetectionJob_vpcConfig :: Lens' StartSentimentDetectionJob (Maybe VpcConfig)
startSentimentDetectionJob_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_inputDataConfig :: Lens.Lens' StartSentimentDetectionJob InputDataConfig
startSentimentDetectionJob_inputDataConfig :: Lens' StartSentimentDetectionJob InputDataConfig
startSentimentDetectionJob_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 :: Lens' StartSentimentDetectionJob OutputDataConfig
startSentimentDetectionJob_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 :: Lens' StartSentimentDetectionJob Text
startSentimentDetectionJob_dataAccessRoleArn = 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 :: Lens' StartSentimentDetectionJob LanguageCode
startSentimentDetectionJob_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 :: (Service -> Service)
-> StartSentimentDetectionJob -> Request StartSentimentDetectionJob
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 StartSentimentDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartSentimentDetectionJob)))
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
-> StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse'
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 StartSentimentDetectionJob where
hashWithSalt :: Int -> StartSentimentDetectionJob -> Int
hashWithSalt Int
_salt StartSentimentDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Text
$sel:outputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> InputDataConfig
$sel:vpcConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:tags:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe [Tag]
$sel:jobName:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:clientRequestToken:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeKmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfig
vpcConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputDataConfig
inputDataConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputDataConfig
outputDataConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataAccessRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LanguageCode
languageCode
instance Prelude.NFData StartSentimentDetectionJob where
rnf :: StartSentimentDetectionJob -> ()
rnf StartSentimentDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Text
$sel:outputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> InputDataConfig
$sel:vpcConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:tags:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe [Tag]
$sel:jobName:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:clientRequestToken:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeKmsKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfig
vpcConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InputDataConfig
inputDataConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputDataConfig
outputDataConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataAccessRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LanguageCode
languageCode
instance Data.ToHeaders StartSentimentDetectionJob where
toHeaders :: StartSentimentDetectionJob -> 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.StartSentimentDetectionJob" ::
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 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
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Text
$sel:outputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> InputDataConfig
$sel:vpcConfig:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:tags:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe [Tag]
$sel:jobName:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
$sel:clientRequestToken:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
(Key
"JobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobName,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Key
"VolumeKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
volumeKmsKeyId,
(Key
"VpcConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
forall a. a -> Maybe a
Prelude.Just
(Key
"InputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputDataConfig
inputDataConfig),
forall a. a -> Maybe a
Prelude.Just
(Key
"OutputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputDataConfig
outputDataConfig),
forall a. a -> Maybe a
Prelude.Just
(Key
"DataAccessRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataAccessRoleArn),
forall a. a -> Maybe a
Prelude.Just (Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LanguageCode
languageCode)
]
)
instance Data.ToPath StartSentimentDetectionJob where
toPath :: StartSentimentDetectionJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StartSentimentDetectionJob where
toQuery :: StartSentimentDetectionJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartSentimentDetectionJobResponse = StartSentimentDetectionJobResponse'
{
StartSentimentDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartSentimentDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartSentimentDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartSentimentDetectionJobResponse
-> StartSentimentDetectionJobResponse -> Bool
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]
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
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.
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'
{ $sel:jobArn:StartSentimentDetectionJobResponse' :: Maybe Text
jobArn =
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:StartSentimentDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartSentimentDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartSentimentDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startSentimentDetectionJobResponse_jobArn :: Lens.Lens' StartSentimentDetectionJobResponse (Prelude.Maybe Prelude.Text)
startSentimentDetectionJobResponse_jobArn :: Lens' StartSentimentDetectionJobResponse (Maybe Text)
startSentimentDetectionJobResponse_jobArn = 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_jobId :: Lens.Lens' StartSentimentDetectionJobResponse (Prelude.Maybe Prelude.Text)
startSentimentDetectionJobResponse_jobId :: Lens' StartSentimentDetectionJobResponse (Maybe Text)
startSentimentDetectionJobResponse_jobId = 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_jobStatus :: Lens.Lens' StartSentimentDetectionJobResponse (Prelude.Maybe JobStatus)
startSentimentDetectionJobResponse_jobStatus :: Lens' StartSentimentDetectionJobResponse (Maybe JobStatus)
startSentimentDetectionJobResponse_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 :: Lens' StartSentimentDetectionJobResponse Int
startSentimentDetectionJobResponse_httpStatus = 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
where
rnf :: StartSentimentDetectionJobResponse -> ()
rnf StartSentimentDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Int
$sel:jobStatus:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> Maybe Text
$sel:jobArn:StartSentimentDetectionJobResponse' :: StartSentimentDetectionJobResponse -> 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