{-# 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.StartEventsDetectionJob
(
StartEventsDetectionJob (..),
newStartEventsDetectionJob,
startEventsDetectionJob_clientRequestToken,
startEventsDetectionJob_jobName,
startEventsDetectionJob_tags,
startEventsDetectionJob_inputDataConfig,
startEventsDetectionJob_outputDataConfig,
startEventsDetectionJob_dataAccessRoleArn,
startEventsDetectionJob_languageCode,
startEventsDetectionJob_targetEventTypes,
StartEventsDetectionJobResponse (..),
newStartEventsDetectionJobResponse,
startEventsDetectionJobResponse_jobArn,
startEventsDetectionJobResponse_jobId,
startEventsDetectionJobResponse_jobStatus,
startEventsDetectionJobResponse_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 StartEventsDetectionJob = StartEventsDetectionJob'
{
StartEventsDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StartEventsDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
StartEventsDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartEventsDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
StartEventsDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
StartEventsDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
StartEventsDetectionJob -> LanguageCode
languageCode :: LanguageCode,
StartEventsDetectionJob -> NonEmpty Text
targetEventTypes :: Prelude.NonEmpty Prelude.Text
}
deriving (StartEventsDetectionJob -> StartEventsDetectionJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartEventsDetectionJob -> StartEventsDetectionJob -> Bool
$c/= :: StartEventsDetectionJob -> StartEventsDetectionJob -> Bool
== :: StartEventsDetectionJob -> StartEventsDetectionJob -> Bool
$c== :: StartEventsDetectionJob -> StartEventsDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartEventsDetectionJob]
ReadPrec StartEventsDetectionJob
Int -> ReadS StartEventsDetectionJob
ReadS [StartEventsDetectionJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartEventsDetectionJob]
$creadListPrec :: ReadPrec [StartEventsDetectionJob]
readPrec :: ReadPrec StartEventsDetectionJob
$creadPrec :: ReadPrec StartEventsDetectionJob
readList :: ReadS [StartEventsDetectionJob]
$creadList :: ReadS [StartEventsDetectionJob]
readsPrec :: Int -> ReadS StartEventsDetectionJob
$creadsPrec :: Int -> ReadS StartEventsDetectionJob
Prelude.Read, Int -> StartEventsDetectionJob -> ShowS
[StartEventsDetectionJob] -> ShowS
StartEventsDetectionJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartEventsDetectionJob] -> ShowS
$cshowList :: [StartEventsDetectionJob] -> ShowS
show :: StartEventsDetectionJob -> String
$cshow :: StartEventsDetectionJob -> String
showsPrec :: Int -> StartEventsDetectionJob -> ShowS
$cshowsPrec :: Int -> StartEventsDetectionJob -> ShowS
Prelude.Show, forall x. Rep StartEventsDetectionJob x -> StartEventsDetectionJob
forall x. StartEventsDetectionJob -> Rep StartEventsDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartEventsDetectionJob x -> StartEventsDetectionJob
$cfrom :: forall x. StartEventsDetectionJob -> Rep StartEventsDetectionJob x
Prelude.Generic)
newStartEventsDetectionJob ::
InputDataConfig ->
OutputDataConfig ->
Prelude.Text ->
LanguageCode ->
Prelude.NonEmpty Prelude.Text ->
StartEventsDetectionJob
newStartEventsDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> NonEmpty Text
-> StartEventsDetectionJob
newStartEventsDetectionJob
InputDataConfig
pInputDataConfig_
OutputDataConfig
pOutputDataConfig_
Text
pDataAccessRoleArn_
LanguageCode
pLanguageCode_
NonEmpty Text
pTargetEventTypes_ =
StartEventsDetectionJob'
{ $sel:clientRequestToken:StartEventsDetectionJob' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartEventsDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartEventsDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:StartEventsDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:outputDataConfig:StartEventsDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
$sel:dataAccessRoleArn:StartEventsDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
$sel:languageCode:StartEventsDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_,
$sel:targetEventTypes:StartEventsDetectionJob' :: NonEmpty Text
targetEventTypes =
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pTargetEventTypes_
}
startEventsDetectionJob_clientRequestToken :: Lens.Lens' StartEventsDetectionJob (Prelude.Maybe Prelude.Text)
startEventsDetectionJob_clientRequestToken :: Lens' StartEventsDetectionJob (Maybe Text)
startEventsDetectionJob_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} Maybe Text
a -> StartEventsDetectionJob
s {$sel:clientRequestToken:StartEventsDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartEventsDetectionJob)
startEventsDetectionJob_jobName :: Lens.Lens' StartEventsDetectionJob (Prelude.Maybe Prelude.Text)
startEventsDetectionJob_jobName :: Lens' StartEventsDetectionJob (Maybe Text)
startEventsDetectionJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} Maybe Text
a -> StartEventsDetectionJob
s {$sel:jobName:StartEventsDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartEventsDetectionJob)
startEventsDetectionJob_tags :: Lens.Lens' StartEventsDetectionJob (Prelude.Maybe [Tag])
startEventsDetectionJob_tags :: Lens' StartEventsDetectionJob (Maybe [Tag])
startEventsDetectionJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} Maybe [Tag]
a -> StartEventsDetectionJob
s {$sel:tags:StartEventsDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartEventsDetectionJob) 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
startEventsDetectionJob_inputDataConfig :: Lens.Lens' StartEventsDetectionJob InputDataConfig
startEventsDetectionJob_inputDataConfig :: Lens' StartEventsDetectionJob InputDataConfig
startEventsDetectionJob_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} InputDataConfig
a -> StartEventsDetectionJob
s {$sel:inputDataConfig:StartEventsDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartEventsDetectionJob)
startEventsDetectionJob_outputDataConfig :: Lens.Lens' StartEventsDetectionJob OutputDataConfig
startEventsDetectionJob_outputDataConfig :: Lens' StartEventsDetectionJob OutputDataConfig
startEventsDetectionJob_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} OutputDataConfig
a -> StartEventsDetectionJob
s {$sel:outputDataConfig:StartEventsDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartEventsDetectionJob)
startEventsDetectionJob_dataAccessRoleArn :: Lens.Lens' StartEventsDetectionJob Prelude.Text
startEventsDetectionJob_dataAccessRoleArn :: Lens' StartEventsDetectionJob Text
startEventsDetectionJob_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartEventsDetectionJob' :: StartEventsDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} Text
a -> StartEventsDetectionJob
s {$sel:dataAccessRoleArn:StartEventsDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartEventsDetectionJob)
startEventsDetectionJob_languageCode :: Lens.Lens' StartEventsDetectionJob LanguageCode
startEventsDetectionJob_languageCode :: Lens' StartEventsDetectionJob LanguageCode
startEventsDetectionJob_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartEventsDetectionJob' :: StartEventsDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} LanguageCode
a -> StartEventsDetectionJob
s {$sel:languageCode:StartEventsDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartEventsDetectionJob)
startEventsDetectionJob_targetEventTypes :: Lens.Lens' StartEventsDetectionJob (Prelude.NonEmpty Prelude.Text)
startEventsDetectionJob_targetEventTypes :: Lens' StartEventsDetectionJob (NonEmpty Text)
startEventsDetectionJob_targetEventTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJob' {NonEmpty Text
targetEventTypes :: NonEmpty Text
$sel:targetEventTypes:StartEventsDetectionJob' :: StartEventsDetectionJob -> NonEmpty Text
targetEventTypes} -> NonEmpty Text
targetEventTypes) (\s :: StartEventsDetectionJob
s@StartEventsDetectionJob' {} NonEmpty Text
a -> StartEventsDetectionJob
s {$sel:targetEventTypes:StartEventsDetectionJob' :: NonEmpty Text
targetEventTypes = NonEmpty Text
a} :: StartEventsDetectionJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest StartEventsDetectionJob where
type
AWSResponse StartEventsDetectionJob =
StartEventsDetectionJobResponse
request :: (Service -> Service)
-> StartEventsDetectionJob -> Request StartEventsDetectionJob
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 StartEventsDetectionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartEventsDetectionJob)))
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
-> StartEventsDetectionJobResponse
StartEventsDetectionJobResponse'
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 StartEventsDetectionJob where
hashWithSalt :: Int -> StartEventsDetectionJob -> Int
hashWithSalt Int
_salt StartEventsDetectionJob' {Maybe [Tag]
Maybe Text
NonEmpty Text
Text
InputDataConfig
LanguageCode
OutputDataConfig
targetEventTypes :: NonEmpty Text
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:targetEventTypes:StartEventsDetectionJob' :: StartEventsDetectionJob -> NonEmpty Text
$sel:languageCode:StartEventsDetectionJob' :: StartEventsDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartEventsDetectionJob' :: StartEventsDetectionJob -> Text
$sel:outputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> InputDataConfig
$sel:tags:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe [Tag]
$sel:jobName:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe Text
$sel:clientRequestToken:StartEventsDetectionJob' :: StartEventsDetectionJob -> 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` 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
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
targetEventTypes
instance Prelude.NFData StartEventsDetectionJob where
rnf :: StartEventsDetectionJob -> ()
rnf StartEventsDetectionJob' {Maybe [Tag]
Maybe Text
NonEmpty Text
Text
InputDataConfig
LanguageCode
OutputDataConfig
targetEventTypes :: NonEmpty Text
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:targetEventTypes:StartEventsDetectionJob' :: StartEventsDetectionJob -> NonEmpty Text
$sel:languageCode:StartEventsDetectionJob' :: StartEventsDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartEventsDetectionJob' :: StartEventsDetectionJob -> Text
$sel:outputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> InputDataConfig
$sel:tags:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe [Tag]
$sel:jobName:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe Text
$sel:clientRequestToken:StartEventsDetectionJob' :: StartEventsDetectionJob -> 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 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
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
targetEventTypes
instance Data.ToHeaders StartEventsDetectionJob where
toHeaders :: StartEventsDetectionJob -> 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.StartEventsDetectionJob" ::
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 StartEventsDetectionJob where
toJSON :: StartEventsDetectionJob -> Value
toJSON StartEventsDetectionJob' {Maybe [Tag]
Maybe Text
NonEmpty Text
Text
InputDataConfig
LanguageCode
OutputDataConfig
targetEventTypes :: NonEmpty Text
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:targetEventTypes:StartEventsDetectionJob' :: StartEventsDetectionJob -> NonEmpty Text
$sel:languageCode:StartEventsDetectionJob' :: StartEventsDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartEventsDetectionJob' :: StartEventsDetectionJob -> Text
$sel:outputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartEventsDetectionJob' :: StartEventsDetectionJob -> InputDataConfig
$sel:tags:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe [Tag]
$sel:jobName:StartEventsDetectionJob' :: StartEventsDetectionJob -> Maybe Text
$sel:clientRequestToken:StartEventsDetectionJob' :: StartEventsDetectionJob -> 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,
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),
forall a. a -> Maybe a
Prelude.Just
(Key
"TargetEventTypes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
targetEventTypes)
]
)
instance Data.ToPath StartEventsDetectionJob where
toPath :: StartEventsDetectionJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StartEventsDetectionJob where
toQuery :: StartEventsDetectionJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartEventsDetectionJobResponse = StartEventsDetectionJobResponse'
{
StartEventsDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
StartEventsDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
StartEventsDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
StartEventsDetectionJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartEventsDetectionJobResponse
-> StartEventsDetectionJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartEventsDetectionJobResponse
-> StartEventsDetectionJobResponse -> Bool
$c/= :: StartEventsDetectionJobResponse
-> StartEventsDetectionJobResponse -> Bool
== :: StartEventsDetectionJobResponse
-> StartEventsDetectionJobResponse -> Bool
$c== :: StartEventsDetectionJobResponse
-> StartEventsDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartEventsDetectionJobResponse]
ReadPrec StartEventsDetectionJobResponse
Int -> ReadS StartEventsDetectionJobResponse
ReadS [StartEventsDetectionJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartEventsDetectionJobResponse]
$creadListPrec :: ReadPrec [StartEventsDetectionJobResponse]
readPrec :: ReadPrec StartEventsDetectionJobResponse
$creadPrec :: ReadPrec StartEventsDetectionJobResponse
readList :: ReadS [StartEventsDetectionJobResponse]
$creadList :: ReadS [StartEventsDetectionJobResponse]
readsPrec :: Int -> ReadS StartEventsDetectionJobResponse
$creadsPrec :: Int -> ReadS StartEventsDetectionJobResponse
Prelude.Read, Int -> StartEventsDetectionJobResponse -> ShowS
[StartEventsDetectionJobResponse] -> ShowS
StartEventsDetectionJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartEventsDetectionJobResponse] -> ShowS
$cshowList :: [StartEventsDetectionJobResponse] -> ShowS
show :: StartEventsDetectionJobResponse -> String
$cshow :: StartEventsDetectionJobResponse -> String
showsPrec :: Int -> StartEventsDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartEventsDetectionJobResponse -> ShowS
Prelude.Show, forall x.
Rep StartEventsDetectionJobResponse x
-> StartEventsDetectionJobResponse
forall x.
StartEventsDetectionJobResponse
-> Rep StartEventsDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartEventsDetectionJobResponse x
-> StartEventsDetectionJobResponse
$cfrom :: forall x.
StartEventsDetectionJobResponse
-> Rep StartEventsDetectionJobResponse x
Prelude.Generic)
newStartEventsDetectionJobResponse ::
Prelude.Int ->
StartEventsDetectionJobResponse
newStartEventsDetectionJobResponse :: Int -> StartEventsDetectionJobResponse
newStartEventsDetectionJobResponse Int
pHttpStatus_ =
StartEventsDetectionJobResponse'
{ $sel:jobArn:StartEventsDetectionJobResponse' :: Maybe Text
jobArn =
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:StartEventsDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:StartEventsDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartEventsDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startEventsDetectionJobResponse_jobArn :: Lens.Lens' StartEventsDetectionJobResponse (Prelude.Maybe Prelude.Text)
startEventsDetectionJobResponse_jobArn :: Lens' StartEventsDetectionJobResponse (Maybe Text)
startEventsDetectionJobResponse_jobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartEventsDetectionJobResponse
s@StartEventsDetectionJobResponse' {} Maybe Text
a -> StartEventsDetectionJobResponse
s {$sel:jobArn:StartEventsDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartEventsDetectionJobResponse)
startEventsDetectionJobResponse_jobId :: Lens.Lens' StartEventsDetectionJobResponse (Prelude.Maybe Prelude.Text)
startEventsDetectionJobResponse_jobId :: Lens' StartEventsDetectionJobResponse (Maybe Text)
startEventsDetectionJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartEventsDetectionJobResponse
s@StartEventsDetectionJobResponse' {} Maybe Text
a -> StartEventsDetectionJobResponse
s {$sel:jobId:StartEventsDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartEventsDetectionJobResponse)
startEventsDetectionJobResponse_jobStatus :: Lens.Lens' StartEventsDetectionJobResponse (Prelude.Maybe JobStatus)
startEventsDetectionJobResponse_jobStatus :: Lens' StartEventsDetectionJobResponse (Maybe JobStatus)
startEventsDetectionJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartEventsDetectionJobResponse
s@StartEventsDetectionJobResponse' {} Maybe JobStatus
a -> StartEventsDetectionJobResponse
s {$sel:jobStatus:StartEventsDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartEventsDetectionJobResponse)
startEventsDetectionJobResponse_httpStatus :: Lens.Lens' StartEventsDetectionJobResponse Prelude.Int
startEventsDetectionJobResponse_httpStatus :: Lens' StartEventsDetectionJobResponse Int
startEventsDetectionJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEventsDetectionJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartEventsDetectionJobResponse
s@StartEventsDetectionJobResponse' {} Int
a -> StartEventsDetectionJobResponse
s {$sel:httpStatus:StartEventsDetectionJobResponse' :: Int
httpStatus = Int
a} :: StartEventsDetectionJobResponse)
instance
Prelude.NFData
StartEventsDetectionJobResponse
where
rnf :: StartEventsDetectionJobResponse -> ()
rnf StartEventsDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Int
$sel:jobStatus:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> Maybe Text
$sel:jobArn:StartEventsDetectionJobResponse' :: StartEventsDetectionJobResponse -> 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