{-# 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.StartDominantLanguageDetectionJob
(
StartDominantLanguageDetectionJob (..),
newStartDominantLanguageDetectionJob,
startDominantLanguageDetectionJob_clientRequestToken,
startDominantLanguageDetectionJob_jobName,
startDominantLanguageDetectionJob_tags,
startDominantLanguageDetectionJob_volumeKmsKeyId,
startDominantLanguageDetectionJob_vpcConfig,
startDominantLanguageDetectionJob_inputDataConfig,
startDominantLanguageDetectionJob_outputDataConfig,
startDominantLanguageDetectionJob_dataAccessRoleArn,
StartDominantLanguageDetectionJobResponse (..),
newStartDominantLanguageDetectionJobResponse,
startDominantLanguageDetectionJobResponse_jobArn,
startDominantLanguageDetectionJobResponse_jobId,
startDominantLanguageDetectionJobResponse_jobStatus,
startDominantLanguageDetectionJobResponse_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 StartDominantLanguageDetectionJob = StartDominantLanguageDetectionJob'
{
StartDominantLanguageDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartDominantLanguageDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartDominantLanguageDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartDominantLanguageDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartDominantLanguageDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text
}
deriving (StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool
$c/= :: StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool
== :: StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool
$c== :: StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartDominantLanguageDetectionJob]
ReadPrec StartDominantLanguageDetectionJob
Int -> ReadS StartDominantLanguageDetectionJob
ReadS [StartDominantLanguageDetectionJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartDominantLanguageDetectionJob]
$creadListPrec :: ReadPrec [StartDominantLanguageDetectionJob]
readPrec :: ReadPrec StartDominantLanguageDetectionJob
$creadPrec :: ReadPrec StartDominantLanguageDetectionJob
readList :: ReadS [StartDominantLanguageDetectionJob]
$creadList :: ReadS [StartDominantLanguageDetectionJob]
readsPrec :: Int -> ReadS StartDominantLanguageDetectionJob
$creadsPrec :: Int -> ReadS StartDominantLanguageDetectionJob
Prelude.Read, Int -> StartDominantLanguageDetectionJob -> ShowS
[StartDominantLanguageDetectionJob] -> ShowS
StartDominantLanguageDetectionJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartDominantLanguageDetectionJob] -> ShowS
$cshowList :: [StartDominantLanguageDetectionJob] -> ShowS
show :: StartDominantLanguageDetectionJob -> String
$cshow :: StartDominantLanguageDetectionJob -> String
showsPrec :: Int -> StartDominantLanguageDetectionJob -> ShowS
$cshowsPrec :: Int -> StartDominantLanguageDetectionJob -> ShowS
Prelude.Show, forall x.
Rep StartDominantLanguageDetectionJob x
-> StartDominantLanguageDetectionJob
forall x.
StartDominantLanguageDetectionJob
-> Rep StartDominantLanguageDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartDominantLanguageDetectionJob x
-> StartDominantLanguageDetectionJob
$cfrom :: forall x.
StartDominantLanguageDetectionJob
-> Rep StartDominantLanguageDetectionJob x
Prelude.Generic)
newStartDominantLanguageDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
StartDominantLanguageDetectionJob
newStartDominantLanguageDetectionJob :: InputDataConfig
-> OutputDataConfig -> Text -> StartDominantLanguageDetectionJob
newStartDominantLanguageDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_ =
StartDominantLanguageDetectionJob'
{ $sel:clientRequestToken:StartDominantLanguageDetectionJob' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartDominantLanguageDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartDominantLanguageDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: Maybe VpcConfig
vpcConfig = forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_
}
startDominantLanguageDetectionJob_clientRequestToken :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJob_clientRequestToken :: Lens' StartDominantLanguageDetectionJob (Maybe Text)
startDominantLanguageDetectionJob_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} Maybe Text
a -> StartDominantLanguageDetectionJob
s {$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartDominantLanguageDetectionJob)
startDominantLanguageDetectionJob_jobName :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJob_jobName :: Lens' StartDominantLanguageDetectionJob (Maybe Text)
startDominantLanguageDetectionJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} Maybe Text
a -> StartDominantLanguageDetectionJob
s {$sel:jobName:StartDominantLanguageDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartDominantLanguageDetectionJob)
startDominantLanguageDetectionJob_tags :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe [Tag])
startDominantLanguageDetectionJob_tags :: Lens' StartDominantLanguageDetectionJob (Maybe [Tag])
startDominantLanguageDetectionJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} Maybe [Tag]
a -> StartDominantLanguageDetectionJob
s {$sel:tags:StartDominantLanguageDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartDominantLanguageDetectionJob) 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
startDominantLanguageDetectionJob_volumeKmsKeyId :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJob_volumeKmsKeyId :: Lens' StartDominantLanguageDetectionJob (Maybe Text)
startDominantLanguageDetectionJob_volumeKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} Maybe Text
a -> StartDominantLanguageDetectionJob
s {$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartDominantLanguageDetectionJob)
startDominantLanguageDetectionJob_vpcConfig :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe VpcConfig)
startDominantLanguageDetectionJob_vpcConfig :: Lens' StartDominantLanguageDetectionJob (Maybe VpcConfig)
startDominantLanguageDetectionJob_vpcConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} Maybe VpcConfig
a -> StartDominantLanguageDetectionJob
s {$sel:vpcConfig:StartDominantLanguageDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartDominantLanguageDetectionJob)
startDominantLanguageDetectionJob_inputDataConfig :: Lens.Lens' StartDominantLanguageDetectionJob InputDataConfig
startDominantLanguageDetectionJob_inputDataConfig :: Lens' StartDominantLanguageDetectionJob InputDataConfig
startDominantLanguageDetectionJob_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} InputDataConfig
a -> StartDominantLanguageDetectionJob
s {$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartDominantLanguageDetectionJob)
startDominantLanguageDetectionJob_outputDataConfig :: Lens.Lens' StartDominantLanguageDetectionJob OutputDataConfig
startDominantLanguageDetectionJob_outputDataConfig :: Lens' StartDominantLanguageDetectionJob OutputDataConfig
startDominantLanguageDetectionJob_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} OutputDataConfig
a -> StartDominantLanguageDetectionJob
s {$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartDominantLanguageDetectionJob)
startDominantLanguageDetectionJob_dataAccessRoleArn :: Lens.Lens' StartDominantLanguageDetectionJob Prelude.Text
startDominantLanguageDetectionJob_dataAccessRoleArn :: Lens' StartDominantLanguageDetectionJob Text
startDominantLanguageDetectionJob_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartDominantLanguageDetectionJob
s@StartDominantLanguageDetectionJob' {} Text
a -> StartDominantLanguageDetectionJob
s {$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartDominantLanguageDetectionJob)
instance
Core.AWSRequest
StartDominantLanguageDetectionJob
where
type
AWSResponse StartDominantLanguageDetectionJob =
StartDominantLanguageDetectionJobResponse
request :: (Service -> Service)
-> StartDominantLanguageDetectionJob
-> Request StartDominantLanguageDetectionJob
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 StartDominantLanguageDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartDominantLanguageDetectionJob)))
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
-> StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse'
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
StartDominantLanguageDetectionJob
where
hashWithSalt :: Int -> StartDominantLanguageDetectionJob -> Int
hashWithSalt
Int
_salt
StartDominantLanguageDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Text
$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> InputDataConfig
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:tags:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe [Tag]
$sel:jobName:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> 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
instance
Prelude.NFData
StartDominantLanguageDetectionJob
where
rnf :: StartDominantLanguageDetectionJob -> ()
rnf StartDominantLanguageDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Text
$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> InputDataConfig
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:tags:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe [Tag]
$sel:jobName:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> 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
instance
Data.ToHeaders
StartDominantLanguageDetectionJob
where
toHeaders :: StartDominantLanguageDetectionJob -> 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.StartDominantLanguageDetectionJob" ::
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
StartDominantLanguageDetectionJob
where
toJSON :: StartDominantLanguageDetectionJob -> Value
toJSON StartDominantLanguageDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Text
$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> InputDataConfig
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:tags:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe [Tag]
$sel:jobName:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> 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)
]
)
instance
Data.ToPath
StartDominantLanguageDetectionJob
where
toPath :: StartDominantLanguageDetectionJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
StartDominantLanguageDetectionJob
where
toQuery :: StartDominantLanguageDetectionJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartDominantLanguageDetectionJobResponse = StartDominantLanguageDetectionJobResponse'
{
StartDominantLanguageDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartDominantLanguageDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool
$c/= :: StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool
== :: StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool
$c== :: StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartDominantLanguageDetectionJobResponse]
ReadPrec StartDominantLanguageDetectionJobResponse
Int -> ReadS StartDominantLanguageDetectionJobResponse
ReadS [StartDominantLanguageDetectionJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartDominantLanguageDetectionJobResponse]
$creadListPrec :: ReadPrec [StartDominantLanguageDetectionJobResponse]
readPrec :: ReadPrec StartDominantLanguageDetectionJobResponse
$creadPrec :: ReadPrec StartDominantLanguageDetectionJobResponse
readList :: ReadS [StartDominantLanguageDetectionJobResponse]
$creadList :: ReadS [StartDominantLanguageDetectionJobResponse]
readsPrec :: Int -> ReadS StartDominantLanguageDetectionJobResponse
$creadsPrec :: Int -> ReadS StartDominantLanguageDetectionJobResponse
Prelude.Read, Int -> StartDominantLanguageDetectionJobResponse -> ShowS
[StartDominantLanguageDetectionJobResponse] -> ShowS
StartDominantLanguageDetectionJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartDominantLanguageDetectionJobResponse] -> ShowS
$cshowList :: [StartDominantLanguageDetectionJobResponse] -> ShowS
show :: StartDominantLanguageDetectionJobResponse -> String
$cshow :: StartDominantLanguageDetectionJobResponse -> String
showsPrec :: Int -> StartDominantLanguageDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartDominantLanguageDetectionJobResponse -> ShowS
Prelude.Show, forall x.
Rep StartDominantLanguageDetectionJobResponse x
-> StartDominantLanguageDetectionJobResponse
forall x.
StartDominantLanguageDetectionJobResponse
-> Rep StartDominantLanguageDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartDominantLanguageDetectionJobResponse x
-> StartDominantLanguageDetectionJobResponse
$cfrom :: forall x.
StartDominantLanguageDetectionJobResponse
-> Rep StartDominantLanguageDetectionJobResponse x
Prelude.Generic)
newStartDominantLanguageDetectionJobResponse ::
Prelude.Int ->
StartDominantLanguageDetectionJobResponse
newStartDominantLanguageDetectionJobResponse :: Int -> StartDominantLanguageDetectionJobResponse
newStartDominantLanguageDetectionJobResponse
Int
pHttpStatus_ =
StartDominantLanguageDetectionJobResponse'
{ $sel:jobArn:StartDominantLanguageDetectionJobResponse' :: Maybe Text
jobArn =
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:StartDominantLanguageDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartDominantLanguageDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartDominantLanguageDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startDominantLanguageDetectionJobResponse_jobArn :: Lens.Lens' StartDominantLanguageDetectionJobResponse (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJobResponse_jobArn :: Lens' StartDominantLanguageDetectionJobResponse (Maybe Text)
startDominantLanguageDetectionJobResponse_jobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartDominantLanguageDetectionJobResponse
s@StartDominantLanguageDetectionJobResponse' {} Maybe Text
a -> StartDominantLanguageDetectionJobResponse
s {$sel:jobArn:StartDominantLanguageDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartDominantLanguageDetectionJobResponse)
startDominantLanguageDetectionJobResponse_jobId :: Lens.Lens' StartDominantLanguageDetectionJobResponse (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJobResponse_jobId :: Lens' StartDominantLanguageDetectionJobResponse (Maybe Text)
startDominantLanguageDetectionJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartDominantLanguageDetectionJobResponse
s@StartDominantLanguageDetectionJobResponse' {} Maybe Text
a -> StartDominantLanguageDetectionJobResponse
s {$sel:jobId:StartDominantLanguageDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartDominantLanguageDetectionJobResponse)
startDominantLanguageDetectionJobResponse_jobStatus :: Lens.Lens' StartDominantLanguageDetectionJobResponse (Prelude.Maybe JobStatus)
startDominantLanguageDetectionJobResponse_jobStatus :: Lens' StartDominantLanguageDetectionJobResponse (Maybe JobStatus)
startDominantLanguageDetectionJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartDominantLanguageDetectionJobResponse
s@StartDominantLanguageDetectionJobResponse' {} Maybe JobStatus
a -> StartDominantLanguageDetectionJobResponse
s {$sel:jobStatus:StartDominantLanguageDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartDominantLanguageDetectionJobResponse)
startDominantLanguageDetectionJobResponse_httpStatus :: Lens.Lens' StartDominantLanguageDetectionJobResponse Prelude.Int
startDominantLanguageDetectionJobResponse_httpStatus :: Lens' StartDominantLanguageDetectionJobResponse Int
startDominantLanguageDetectionJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDominantLanguageDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartDominantLanguageDetectionJobResponse
s@StartDominantLanguageDetectionJobResponse' {} Int
a -> StartDominantLanguageDetectionJobResponse
s {$sel:httpStatus:StartDominantLanguageDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartDominantLanguageDetectionJobResponse)
instance
Prelude.NFData
StartDominantLanguageDetectionJobResponse
where
rnf :: StartDominantLanguageDetectionJobResponse -> ()
rnf StartDominantLanguageDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Int
$sel:jobStatus:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> Maybe Text
$sel:jobArn:StartDominantLanguageDetectionJobResponse' :: StartDominantLanguageDetectionJobResponse -> 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