{-# 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_jobName,
startDominantLanguageDetectionJob_vpcConfig,
startDominantLanguageDetectionJob_volumeKmsKeyId,
startDominantLanguageDetectionJob_clientRequestToken,
startDominantLanguageDetectionJob_tags,
startDominantLanguageDetectionJob_inputDataConfig,
startDominantLanguageDetectionJob_outputDataConfig,
startDominantLanguageDetectionJob_dataAccessRoleArn,
StartDominantLanguageDetectionJobResponse (..),
newStartDominantLanguageDetectionJobResponse,
startDominantLanguageDetectionJobResponse_jobId,
startDominantLanguageDetectionJobResponse_jobArn,
startDominantLanguageDetectionJobResponse_jobStatus,
startDominantLanguageDetectionJobResponse_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 StartDominantLanguageDetectionJob = StartDominantLanguageDetectionJob'
{
StartDominantLanguageDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
StartDominantLanguageDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartDominantLanguageDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartDominantLanguageDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartDominantLanguageDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text
}
deriving (StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool
(StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool)
-> (StartDominantLanguageDetectionJob
-> StartDominantLanguageDetectionJob -> Bool)
-> Eq StartDominantLanguageDetectionJob
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]
(Int -> ReadS StartDominantLanguageDetectionJob)
-> ReadS [StartDominantLanguageDetectionJob]
-> ReadPrec StartDominantLanguageDetectionJob
-> ReadPrec [StartDominantLanguageDetectionJob]
-> Read 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
(Int -> StartDominantLanguageDetectionJob -> ShowS)
-> (StartDominantLanguageDetectionJob -> String)
-> ([StartDominantLanguageDetectionJob] -> ShowS)
-> Show StartDominantLanguageDetectionJob
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.
StartDominantLanguageDetectionJob
-> Rep StartDominantLanguageDetectionJob x)
-> (forall x.
Rep StartDominantLanguageDetectionJob x
-> StartDominantLanguageDetectionJob)
-> Generic StartDominantLanguageDetectionJob
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' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob'
{ $sel:jobName:StartDominantLanguageDetectionJob' :: Maybe Text
jobName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartDominantLanguageDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
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_jobName :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_jobName = (StartDominantLanguageDetectionJob -> Maybe Text)
-> (StartDominantLanguageDetectionJob
-> Maybe Text -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
(Maybe Text)
(Maybe Text)
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_vpcConfig :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe VpcConfig)
startDominantLanguageDetectionJob_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_vpcConfig = (StartDominantLanguageDetectionJob -> Maybe VpcConfig)
-> (StartDominantLanguageDetectionJob
-> Maybe VpcConfig -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
(Maybe VpcConfig)
(Maybe 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_volumeKmsKeyId :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_volumeKmsKeyId = (StartDominantLanguageDetectionJob -> Maybe Text)
-> (StartDominantLanguageDetectionJob
-> Maybe Text -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
(Maybe Text)
(Maybe Text)
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_clientRequestToken :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJob_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_clientRequestToken = (StartDominantLanguageDetectionJob -> Maybe Text)
-> (StartDominantLanguageDetectionJob
-> Maybe Text -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
(Maybe Text)
(Maybe Text)
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_tags :: Lens.Lens' StartDominantLanguageDetectionJob (Prelude.Maybe [Tag])
startDominantLanguageDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_tags = (StartDominantLanguageDetectionJob -> Maybe [Tag])
-> (StartDominantLanguageDetectionJob
-> Maybe [Tag] -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
(Maybe [Tag])
(Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
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
startDominantLanguageDetectionJob_inputDataConfig :: Lens.Lens' StartDominantLanguageDetectionJob InputDataConfig
startDominantLanguageDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_inputDataConfig = (StartDominantLanguageDetectionJob -> InputDataConfig)
-> (StartDominantLanguageDetectionJob
-> InputDataConfig -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
InputDataConfig
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 :: (OutputDataConfig -> f OutputDataConfig)
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_outputDataConfig = (StartDominantLanguageDetectionJob -> OutputDataConfig)
-> (StartDominantLanguageDetectionJob
-> OutputDataConfig -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
OutputDataConfig
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 :: (Text -> f Text)
-> StartDominantLanguageDetectionJob
-> f StartDominantLanguageDetectionJob
startDominantLanguageDetectionJob_dataAccessRoleArn = (StartDominantLanguageDetectionJob -> Text)
-> (StartDominantLanguageDetectionJob
-> Text -> StartDominantLanguageDetectionJob)
-> Lens
StartDominantLanguageDetectionJob
StartDominantLanguageDetectionJob
Text
Text
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 :: StartDominantLanguageDetectionJob
-> Request StartDominantLanguageDetectionJob
request = Service
-> StartDominantLanguageDetectionJob
-> Request StartDominantLanguageDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartDominantLanguageDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartDominantLanguageDetectionJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartDominantLanguageDetectionJob))
-> Logger
-> Service
-> Proxy StartDominantLanguageDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartDominantLanguageDetectionJob)))
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
-> StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse'
(Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartDominantLanguageDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe JobStatus
-> Int
-> StartDominantLanguageDetectionJobResponse)
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
-> StartDominantLanguageDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe JobStatus
-> Int -> StartDominantLanguageDetectionJobResponse)
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 -> StartDominantLanguageDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartDominantLanguageDetectionJobResponse)
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 -> StartDominantLanguageDetectionJobResponse)
-> Either String Int
-> Either String StartDominantLanguageDetectionJobResponse
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
StartDominantLanguageDetectionJob
instance
Prelude.NFData
StartDominantLanguageDetectionJob
instance
Core.ToHeaders
StartDominantLanguageDetectionJob
where
toHeaders :: StartDominantLanguageDetectionJob -> ResponseHeaders
toHeaders =
ResponseHeaders
-> StartDominantLanguageDetectionJob -> 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.StartDominantLanguageDetectionJob" ::
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
StartDominantLanguageDetectionJob
where
toJSON :: StartDominantLanguageDetectionJob -> Value
toJSON StartDominantLanguageDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
OutputDataConfig
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
volumeKmsKeyId :: Maybe Text
vpcConfig :: Maybe VpcConfig
jobName :: Maybe Text
$sel:dataAccessRoleArn:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Text
$sel:outputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> InputDataConfig
$sel:tags:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:volumeKmsKeyId:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe Text
$sel:vpcConfig:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> Maybe VpcConfig
$sel:jobName:StartDominantLanguageDetectionJob' :: StartDominantLanguageDetectionJob -> 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)
]
)
instance
Core.ToPath
StartDominantLanguageDetectionJob
where
toPath :: StartDominantLanguageDetectionJob -> ByteString
toPath = ByteString -> StartDominantLanguageDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
StartDominantLanguageDetectionJob
where
toQuery :: StartDominantLanguageDetectionJob -> QueryString
toQuery = QueryString -> StartDominantLanguageDetectionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartDominantLanguageDetectionJobResponse = StartDominantLanguageDetectionJobResponse'
{
StartDominantLanguageDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartDominantLanguageDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartDominantLanguageDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool
(StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool)
-> (StartDominantLanguageDetectionJobResponse
-> StartDominantLanguageDetectionJobResponse -> Bool)
-> Eq StartDominantLanguageDetectionJobResponse
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]
(Int -> ReadS StartDominantLanguageDetectionJobResponse)
-> ReadS [StartDominantLanguageDetectionJobResponse]
-> ReadPrec StartDominantLanguageDetectionJobResponse
-> ReadPrec [StartDominantLanguageDetectionJobResponse]
-> Read 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
(Int -> StartDominantLanguageDetectionJobResponse -> ShowS)
-> (StartDominantLanguageDetectionJobResponse -> String)
-> ([StartDominantLanguageDetectionJobResponse] -> ShowS)
-> Show StartDominantLanguageDetectionJobResponse
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.
StartDominantLanguageDetectionJobResponse
-> Rep StartDominantLanguageDetectionJobResponse x)
-> (forall x.
Rep StartDominantLanguageDetectionJobResponse x
-> StartDominantLanguageDetectionJobResponse)
-> Generic StartDominantLanguageDetectionJobResponse
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' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse'
{ $sel:jobId:StartDominantLanguageDetectionJobResponse' :: Maybe Text
jobId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:StartDominantLanguageDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartDominantLanguageDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartDominantLanguageDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startDominantLanguageDetectionJobResponse_jobId :: Lens.Lens' StartDominantLanguageDetectionJobResponse (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartDominantLanguageDetectionJobResponse
-> f StartDominantLanguageDetectionJobResponse
startDominantLanguageDetectionJobResponse_jobId = (StartDominantLanguageDetectionJobResponse -> Maybe Text)
-> (StartDominantLanguageDetectionJobResponse
-> Maybe Text -> StartDominantLanguageDetectionJobResponse)
-> Lens
StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse
(Maybe Text)
(Maybe Text)
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_jobArn :: Lens.Lens' StartDominantLanguageDetectionJobResponse (Prelude.Maybe Prelude.Text)
startDominantLanguageDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartDominantLanguageDetectionJobResponse
-> f StartDominantLanguageDetectionJobResponse
startDominantLanguageDetectionJobResponse_jobArn = (StartDominantLanguageDetectionJobResponse -> Maybe Text)
-> (StartDominantLanguageDetectionJobResponse
-> Maybe Text -> StartDominantLanguageDetectionJobResponse)
-> Lens
StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse
(Maybe Text)
(Maybe Text)
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_jobStatus :: Lens.Lens' StartDominantLanguageDetectionJobResponse (Prelude.Maybe JobStatus)
startDominantLanguageDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartDominantLanguageDetectionJobResponse
-> f StartDominantLanguageDetectionJobResponse
startDominantLanguageDetectionJobResponse_jobStatus = (StartDominantLanguageDetectionJobResponse -> Maybe JobStatus)
-> (StartDominantLanguageDetectionJobResponse
-> Maybe JobStatus -> StartDominantLanguageDetectionJobResponse)
-> Lens
StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse
(Maybe JobStatus)
(Maybe 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 :: (Int -> f Int)
-> StartDominantLanguageDetectionJobResponse
-> f StartDominantLanguageDetectionJobResponse
startDominantLanguageDetectionJobResponse_httpStatus = (StartDominantLanguageDetectionJobResponse -> Int)
-> (StartDominantLanguageDetectionJobResponse
-> Int -> StartDominantLanguageDetectionJobResponse)
-> Lens
StartDominantLanguageDetectionJobResponse
StartDominantLanguageDetectionJobResponse
Int
Int
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