{-# 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.Glue.StartJobRun
(
StartJobRun (..),
newStartJobRun,
startJobRun_allocatedCapacity,
startJobRun_arguments,
startJobRun_executionClass,
startJobRun_jobRunId,
startJobRun_maxCapacity,
startJobRun_notificationProperty,
startJobRun_numberOfWorkers,
startJobRun_securityConfiguration,
startJobRun_timeout,
startJobRun_workerType,
startJobRun_jobName,
StartJobRunResponse (..),
newStartJobRunResponse,
startJobRunResponse_jobRunId,
startJobRunResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartJobRun = StartJobRun'
{
StartJobRun -> Maybe Int
allocatedCapacity :: Prelude.Maybe Prelude.Int,
StartJobRun -> Maybe (HashMap Text Text)
arguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StartJobRun -> Maybe ExecutionClass
executionClass :: Prelude.Maybe ExecutionClass,
StartJobRun -> Maybe Text
jobRunId :: Prelude.Maybe Prelude.Text,
StartJobRun -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
StartJobRun -> Maybe NotificationProperty
notificationProperty :: Prelude.Maybe NotificationProperty,
StartJobRun -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
StartJobRun -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
StartJobRun -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
StartJobRun -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType,
StartJobRun -> Text
jobName :: Prelude.Text
}
deriving (StartJobRun -> StartJobRun -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartJobRun -> StartJobRun -> Bool
$c/= :: StartJobRun -> StartJobRun -> Bool
== :: StartJobRun -> StartJobRun -> Bool
$c== :: StartJobRun -> StartJobRun -> Bool
Prelude.Eq, ReadPrec [StartJobRun]
ReadPrec StartJobRun
Int -> ReadS StartJobRun
ReadS [StartJobRun]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartJobRun]
$creadListPrec :: ReadPrec [StartJobRun]
readPrec :: ReadPrec StartJobRun
$creadPrec :: ReadPrec StartJobRun
readList :: ReadS [StartJobRun]
$creadList :: ReadS [StartJobRun]
readsPrec :: Int -> ReadS StartJobRun
$creadsPrec :: Int -> ReadS StartJobRun
Prelude.Read, Int -> StartJobRun -> ShowS
[StartJobRun] -> ShowS
StartJobRun -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartJobRun] -> ShowS
$cshowList :: [StartJobRun] -> ShowS
show :: StartJobRun -> String
$cshow :: StartJobRun -> String
showsPrec :: Int -> StartJobRun -> ShowS
$cshowsPrec :: Int -> StartJobRun -> ShowS
Prelude.Show, forall x. Rep StartJobRun x -> StartJobRun
forall x. StartJobRun -> Rep StartJobRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartJobRun x -> StartJobRun
$cfrom :: forall x. StartJobRun -> Rep StartJobRun x
Prelude.Generic)
newStartJobRun ::
Prelude.Text ->
StartJobRun
newStartJobRun :: Text -> StartJobRun
newStartJobRun Text
pJobName_ =
StartJobRun'
{ $sel:allocatedCapacity:StartJobRun' :: Maybe Int
allocatedCapacity = forall a. Maybe a
Prelude.Nothing,
$sel:arguments:StartJobRun' :: Maybe (HashMap Text Text)
arguments = forall a. Maybe a
Prelude.Nothing,
$sel:executionClass:StartJobRun' :: Maybe ExecutionClass
executionClass = forall a. Maybe a
Prelude.Nothing,
$sel:jobRunId:StartJobRun' :: Maybe Text
jobRunId = forall a. Maybe a
Prelude.Nothing,
$sel:maxCapacity:StartJobRun' :: Maybe Double
maxCapacity = forall a. Maybe a
Prelude.Nothing,
$sel:notificationProperty:StartJobRun' :: Maybe NotificationProperty
notificationProperty = forall a. Maybe a
Prelude.Nothing,
$sel:numberOfWorkers:StartJobRun' :: Maybe Int
numberOfWorkers = forall a. Maybe a
Prelude.Nothing,
$sel:securityConfiguration:StartJobRun' :: Maybe Text
securityConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:timeout:StartJobRun' :: Maybe Natural
timeout = forall a. Maybe a
Prelude.Nothing,
$sel:workerType:StartJobRun' :: Maybe WorkerType
workerType = forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartJobRun' :: Text
jobName = Text
pJobName_
}
startJobRun_allocatedCapacity :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Int)
startJobRun_allocatedCapacity :: Lens' StartJobRun (Maybe Int)
startJobRun_allocatedCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe Int
allocatedCapacity :: Maybe Int
$sel:allocatedCapacity:StartJobRun' :: StartJobRun -> Maybe Int
allocatedCapacity} -> Maybe Int
allocatedCapacity) (\s :: StartJobRun
s@StartJobRun' {} Maybe Int
a -> StartJobRun
s {$sel:allocatedCapacity:StartJobRun' :: Maybe Int
allocatedCapacity = Maybe Int
a} :: StartJobRun)
startJobRun_arguments :: Lens.Lens' StartJobRun (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startJobRun_arguments :: Lens' StartJobRun (Maybe (HashMap Text Text))
startJobRun_arguments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe (HashMap Text Text)
arguments :: Maybe (HashMap Text Text)
$sel:arguments:StartJobRun' :: StartJobRun -> Maybe (HashMap Text Text)
arguments} -> Maybe (HashMap Text Text)
arguments) (\s :: StartJobRun
s@StartJobRun' {} Maybe (HashMap Text Text)
a -> StartJobRun
s {$sel:arguments:StartJobRun' :: Maybe (HashMap Text Text)
arguments = Maybe (HashMap Text Text)
a} :: StartJobRun) 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
startJobRun_executionClass :: Lens.Lens' StartJobRun (Prelude.Maybe ExecutionClass)
startJobRun_executionClass :: Lens' StartJobRun (Maybe ExecutionClass)
startJobRun_executionClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe ExecutionClass
executionClass :: Maybe ExecutionClass
$sel:executionClass:StartJobRun' :: StartJobRun -> Maybe ExecutionClass
executionClass} -> Maybe ExecutionClass
executionClass) (\s :: StartJobRun
s@StartJobRun' {} Maybe ExecutionClass
a -> StartJobRun
s {$sel:executionClass:StartJobRun' :: Maybe ExecutionClass
executionClass = Maybe ExecutionClass
a} :: StartJobRun)
startJobRun_jobRunId :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Text)
startJobRun_jobRunId :: Lens' StartJobRun (Maybe Text)
startJobRun_jobRunId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe Text
jobRunId :: Maybe Text
$sel:jobRunId:StartJobRun' :: StartJobRun -> Maybe Text
jobRunId} -> Maybe Text
jobRunId) (\s :: StartJobRun
s@StartJobRun' {} Maybe Text
a -> StartJobRun
s {$sel:jobRunId:StartJobRun' :: Maybe Text
jobRunId = Maybe Text
a} :: StartJobRun)
startJobRun_maxCapacity :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Double)
startJobRun_maxCapacity :: Lens' StartJobRun (Maybe Double)
startJobRun_maxCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe Double
maxCapacity :: Maybe Double
$sel:maxCapacity:StartJobRun' :: StartJobRun -> Maybe Double
maxCapacity} -> Maybe Double
maxCapacity) (\s :: StartJobRun
s@StartJobRun' {} Maybe Double
a -> StartJobRun
s {$sel:maxCapacity:StartJobRun' :: Maybe Double
maxCapacity = Maybe Double
a} :: StartJobRun)
startJobRun_notificationProperty :: Lens.Lens' StartJobRun (Prelude.Maybe NotificationProperty)
startJobRun_notificationProperty :: Lens' StartJobRun (Maybe NotificationProperty)
startJobRun_notificationProperty = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe NotificationProperty
notificationProperty :: Maybe NotificationProperty
$sel:notificationProperty:StartJobRun' :: StartJobRun -> Maybe NotificationProperty
notificationProperty} -> Maybe NotificationProperty
notificationProperty) (\s :: StartJobRun
s@StartJobRun' {} Maybe NotificationProperty
a -> StartJobRun
s {$sel:notificationProperty:StartJobRun' :: Maybe NotificationProperty
notificationProperty = Maybe NotificationProperty
a} :: StartJobRun)
startJobRun_numberOfWorkers :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Int)
startJobRun_numberOfWorkers :: Lens' StartJobRun (Maybe Int)
startJobRun_numberOfWorkers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe Int
numberOfWorkers :: Maybe Int
$sel:numberOfWorkers:StartJobRun' :: StartJobRun -> Maybe Int
numberOfWorkers} -> Maybe Int
numberOfWorkers) (\s :: StartJobRun
s@StartJobRun' {} Maybe Int
a -> StartJobRun
s {$sel:numberOfWorkers:StartJobRun' :: Maybe Int
numberOfWorkers = Maybe Int
a} :: StartJobRun)
startJobRun_securityConfiguration :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Text)
startJobRun_securityConfiguration :: Lens' StartJobRun (Maybe Text)
startJobRun_securityConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe Text
securityConfiguration :: Maybe Text
$sel:securityConfiguration:StartJobRun' :: StartJobRun -> Maybe Text
securityConfiguration} -> Maybe Text
securityConfiguration) (\s :: StartJobRun
s@StartJobRun' {} Maybe Text
a -> StartJobRun
s {$sel:securityConfiguration:StartJobRun' :: Maybe Text
securityConfiguration = Maybe Text
a} :: StartJobRun)
startJobRun_timeout :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Natural)
startJobRun_timeout :: Lens' StartJobRun (Maybe Natural)
startJobRun_timeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:StartJobRun' :: StartJobRun -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: StartJobRun
s@StartJobRun' {} Maybe Natural
a -> StartJobRun
s {$sel:timeout:StartJobRun' :: Maybe Natural
timeout = Maybe Natural
a} :: StartJobRun)
startJobRun_workerType :: Lens.Lens' StartJobRun (Prelude.Maybe WorkerType)
startJobRun_workerType :: Lens' StartJobRun (Maybe WorkerType)
startJobRun_workerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Maybe WorkerType
workerType :: Maybe WorkerType
$sel:workerType:StartJobRun' :: StartJobRun -> Maybe WorkerType
workerType} -> Maybe WorkerType
workerType) (\s :: StartJobRun
s@StartJobRun' {} Maybe WorkerType
a -> StartJobRun
s {$sel:workerType:StartJobRun' :: Maybe WorkerType
workerType = Maybe WorkerType
a} :: StartJobRun)
startJobRun_jobName :: Lens.Lens' StartJobRun Prelude.Text
startJobRun_jobName :: Lens' StartJobRun Text
startJobRun_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRun' {Text
jobName :: Text
$sel:jobName:StartJobRun' :: StartJobRun -> Text
jobName} -> Text
jobName) (\s :: StartJobRun
s@StartJobRun' {} Text
a -> StartJobRun
s {$sel:jobName:StartJobRun' :: Text
jobName = Text
a} :: StartJobRun)
instance Core.AWSRequest StartJobRun where
type AWSResponse StartJobRun = StartJobRunResponse
request :: (Service -> Service) -> StartJobRun -> Request StartJobRun
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 StartJobRun
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartJobRun)))
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 -> Int -> StartJobRunResponse
StartJobRunResponse'
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
"JobRunId")
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 StartJobRun where
hashWithSalt :: Int -> StartJobRun -> Int
hashWithSalt Int
_salt StartJobRun' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ExecutionClass
Maybe NotificationProperty
Maybe WorkerType
Text
jobName :: Text
workerType :: Maybe WorkerType
timeout :: Maybe Natural
securityConfiguration :: Maybe Text
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
maxCapacity :: Maybe Double
jobRunId :: Maybe Text
executionClass :: Maybe ExecutionClass
arguments :: Maybe (HashMap Text Text)
allocatedCapacity :: Maybe Int
$sel:jobName:StartJobRun' :: StartJobRun -> Text
$sel:workerType:StartJobRun' :: StartJobRun -> Maybe WorkerType
$sel:timeout:StartJobRun' :: StartJobRun -> Maybe Natural
$sel:securityConfiguration:StartJobRun' :: StartJobRun -> Maybe Text
$sel:numberOfWorkers:StartJobRun' :: StartJobRun -> Maybe Int
$sel:notificationProperty:StartJobRun' :: StartJobRun -> Maybe NotificationProperty
$sel:maxCapacity:StartJobRun' :: StartJobRun -> Maybe Double
$sel:jobRunId:StartJobRun' :: StartJobRun -> Maybe Text
$sel:executionClass:StartJobRun' :: StartJobRun -> Maybe ExecutionClass
$sel:arguments:StartJobRun' :: StartJobRun -> Maybe (HashMap Text Text)
$sel:allocatedCapacity:StartJobRun' :: StartJobRun -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
allocatedCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
arguments
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionClass
executionClass
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobRunId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
maxCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotificationProperty
notificationProperty
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfWorkers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeout
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkerType
workerType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobName
instance Prelude.NFData StartJobRun where
rnf :: StartJobRun -> ()
rnf StartJobRun' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ExecutionClass
Maybe NotificationProperty
Maybe WorkerType
Text
jobName :: Text
workerType :: Maybe WorkerType
timeout :: Maybe Natural
securityConfiguration :: Maybe Text
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
maxCapacity :: Maybe Double
jobRunId :: Maybe Text
executionClass :: Maybe ExecutionClass
arguments :: Maybe (HashMap Text Text)
allocatedCapacity :: Maybe Int
$sel:jobName:StartJobRun' :: StartJobRun -> Text
$sel:workerType:StartJobRun' :: StartJobRun -> Maybe WorkerType
$sel:timeout:StartJobRun' :: StartJobRun -> Maybe Natural
$sel:securityConfiguration:StartJobRun' :: StartJobRun -> Maybe Text
$sel:numberOfWorkers:StartJobRun' :: StartJobRun -> Maybe Int
$sel:notificationProperty:StartJobRun' :: StartJobRun -> Maybe NotificationProperty
$sel:maxCapacity:StartJobRun' :: StartJobRun -> Maybe Double
$sel:jobRunId:StartJobRun' :: StartJobRun -> Maybe Text
$sel:executionClass:StartJobRun' :: StartJobRun -> Maybe ExecutionClass
$sel:arguments:StartJobRun' :: StartJobRun -> Maybe (HashMap Text Text)
$sel:allocatedCapacity:StartJobRun' :: StartJobRun -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
allocatedCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
arguments
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionClass
executionClass
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobRunId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
maxCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotificationProperty
notificationProperty
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfWorkers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
securityConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeout
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkerType
workerType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobName
instance Data.ToHeaders StartJobRun where
toHeaders :: StartJobRun -> 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
"AWSGlue.StartJobRun" :: 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 StartJobRun where
toJSON :: StartJobRun -> Value
toJSON StartJobRun' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe ExecutionClass
Maybe NotificationProperty
Maybe WorkerType
Text
jobName :: Text
workerType :: Maybe WorkerType
timeout :: Maybe Natural
securityConfiguration :: Maybe Text
numberOfWorkers :: Maybe Int
notificationProperty :: Maybe NotificationProperty
maxCapacity :: Maybe Double
jobRunId :: Maybe Text
executionClass :: Maybe ExecutionClass
arguments :: Maybe (HashMap Text Text)
allocatedCapacity :: Maybe Int
$sel:jobName:StartJobRun' :: StartJobRun -> Text
$sel:workerType:StartJobRun' :: StartJobRun -> Maybe WorkerType
$sel:timeout:StartJobRun' :: StartJobRun -> Maybe Natural
$sel:securityConfiguration:StartJobRun' :: StartJobRun -> Maybe Text
$sel:numberOfWorkers:StartJobRun' :: StartJobRun -> Maybe Int
$sel:notificationProperty:StartJobRun' :: StartJobRun -> Maybe NotificationProperty
$sel:maxCapacity:StartJobRun' :: StartJobRun -> Maybe Double
$sel:jobRunId:StartJobRun' :: StartJobRun -> Maybe Text
$sel:executionClass:StartJobRun' :: StartJobRun -> Maybe ExecutionClass
$sel:arguments:StartJobRun' :: StartJobRun -> Maybe (HashMap Text Text)
$sel:allocatedCapacity:StartJobRun' :: StartJobRun -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AllocatedCapacity" 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 Int
allocatedCapacity,
(Key
"Arguments" 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 (HashMap Text Text)
arguments,
(Key
"ExecutionClass" 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 ExecutionClass
executionClass,
(Key
"JobRunId" 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
jobRunId,
(Key
"MaxCapacity" 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 Double
maxCapacity,
(Key
"NotificationProperty" 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 NotificationProperty
notificationProperty,
(Key
"NumberOfWorkers" 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 Int
numberOfWorkers,
(Key
"SecurityConfiguration" 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
securityConfiguration,
(Key
"Timeout" 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 Natural
timeout,
(Key
"WorkerType" 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 WorkerType
workerType,
forall a. a -> Maybe a
Prelude.Just (Key
"JobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jobName)
]
)
instance Data.ToPath StartJobRun where
toPath :: StartJobRun -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery StartJobRun where
toQuery :: StartJobRun -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartJobRunResponse = StartJobRunResponse'
{
StartJobRunResponse -> Maybe Text
jobRunId :: Prelude.Maybe Prelude.Text,
StartJobRunResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartJobRunResponse -> StartJobRunResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartJobRunResponse -> StartJobRunResponse -> Bool
$c/= :: StartJobRunResponse -> StartJobRunResponse -> Bool
== :: StartJobRunResponse -> StartJobRunResponse -> Bool
$c== :: StartJobRunResponse -> StartJobRunResponse -> Bool
Prelude.Eq, ReadPrec [StartJobRunResponse]
ReadPrec StartJobRunResponse
Int -> ReadS StartJobRunResponse
ReadS [StartJobRunResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartJobRunResponse]
$creadListPrec :: ReadPrec [StartJobRunResponse]
readPrec :: ReadPrec StartJobRunResponse
$creadPrec :: ReadPrec StartJobRunResponse
readList :: ReadS [StartJobRunResponse]
$creadList :: ReadS [StartJobRunResponse]
readsPrec :: Int -> ReadS StartJobRunResponse
$creadsPrec :: Int -> ReadS StartJobRunResponse
Prelude.Read, Int -> StartJobRunResponse -> ShowS
[StartJobRunResponse] -> ShowS
StartJobRunResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartJobRunResponse] -> ShowS
$cshowList :: [StartJobRunResponse] -> ShowS
show :: StartJobRunResponse -> String
$cshow :: StartJobRunResponse -> String
showsPrec :: Int -> StartJobRunResponse -> ShowS
$cshowsPrec :: Int -> StartJobRunResponse -> ShowS
Prelude.Show, forall x. Rep StartJobRunResponse x -> StartJobRunResponse
forall x. StartJobRunResponse -> Rep StartJobRunResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartJobRunResponse x -> StartJobRunResponse
$cfrom :: forall x. StartJobRunResponse -> Rep StartJobRunResponse x
Prelude.Generic)
newStartJobRunResponse ::
Prelude.Int ->
StartJobRunResponse
newStartJobRunResponse :: Int -> StartJobRunResponse
newStartJobRunResponse Int
pHttpStatus_ =
StartJobRunResponse'
{ $sel:jobRunId:StartJobRunResponse' :: Maybe Text
jobRunId = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartJobRunResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startJobRunResponse_jobRunId :: Lens.Lens' StartJobRunResponse (Prelude.Maybe Prelude.Text)
startJobRunResponse_jobRunId :: Lens' StartJobRunResponse (Maybe Text)
startJobRunResponse_jobRunId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRunResponse' {Maybe Text
jobRunId :: Maybe Text
$sel:jobRunId:StartJobRunResponse' :: StartJobRunResponse -> Maybe Text
jobRunId} -> Maybe Text
jobRunId) (\s :: StartJobRunResponse
s@StartJobRunResponse' {} Maybe Text
a -> StartJobRunResponse
s {$sel:jobRunId:StartJobRunResponse' :: Maybe Text
jobRunId = Maybe Text
a} :: StartJobRunResponse)
startJobRunResponse_httpStatus :: Lens.Lens' StartJobRunResponse Prelude.Int
startJobRunResponse_httpStatus :: Lens' StartJobRunResponse Int
startJobRunResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartJobRunResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartJobRunResponse' :: StartJobRunResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartJobRunResponse
s@StartJobRunResponse' {} Int
a -> StartJobRunResponse
s {$sel:httpStatus:StartJobRunResponse' :: Int
httpStatus = Int
a} :: StartJobRunResponse)
instance Prelude.NFData StartJobRunResponse where
rnf :: StartJobRunResponse -> ()
rnf StartJobRunResponse' {Int
Maybe Text
httpStatus :: Int
jobRunId :: Maybe Text
$sel:httpStatus:StartJobRunResponse' :: StartJobRunResponse -> Int
$sel:jobRunId:StartJobRunResponse' :: StartJobRunResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobRunId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus