{-# 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_numberOfWorkers,
startJobRun_notificationProperty,
startJobRun_arguments,
startJobRun_workerType,
startJobRun_securityConfiguration,
startJobRun_allocatedCapacity,
startJobRun_maxCapacity,
startJobRun_timeout,
startJobRun_jobRunId,
startJobRun_jobName,
StartJobRunResponse (..),
newStartJobRunResponse,
startJobRunResponse_jobRunId,
startJobRunResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
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 StartJobRun = StartJobRun'
{
StartJobRun -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
StartJobRun -> Maybe NotificationProperty
notificationProperty :: Prelude.Maybe NotificationProperty,
StartJobRun -> Maybe (HashMap Text Text)
arguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StartJobRun -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType,
StartJobRun -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
StartJobRun -> Maybe Int
allocatedCapacity :: Prelude.Maybe Prelude.Int,
StartJobRun -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
StartJobRun -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
StartJobRun -> Maybe Text
jobRunId :: Prelude.Maybe Prelude.Text,
StartJobRun -> Text
jobName :: Prelude.Text
}
deriving (StartJobRun -> StartJobRun -> Bool
(StartJobRun -> StartJobRun -> Bool)
-> (StartJobRun -> StartJobRun -> Bool) -> Eq StartJobRun
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]
(Int -> ReadS StartJobRun)
-> ReadS [StartJobRun]
-> ReadPrec StartJobRun
-> ReadPrec [StartJobRun]
-> Read 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
(Int -> StartJobRun -> ShowS)
-> (StartJobRun -> String)
-> ([StartJobRun] -> ShowS)
-> Show StartJobRun
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. StartJobRun -> Rep StartJobRun x)
-> (forall x. Rep StartJobRun x -> StartJobRun)
-> Generic StartJobRun
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' :: Maybe Int
-> Maybe NotificationProperty
-> Maybe (HashMap Text Text)
-> Maybe WorkerType
-> Maybe Text
-> Maybe Int
-> Maybe Double
-> Maybe Natural
-> Maybe Text
-> Text
-> StartJobRun
StartJobRun'
{ $sel:numberOfWorkers:StartJobRun' :: Maybe Int
numberOfWorkers = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:notificationProperty:StartJobRun' :: Maybe NotificationProperty
notificationProperty = Maybe NotificationProperty
forall a. Maybe a
Prelude.Nothing,
$sel:arguments:StartJobRun' :: Maybe (HashMap Text Text)
arguments = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:workerType:StartJobRun' :: Maybe WorkerType
workerType = Maybe WorkerType
forall a. Maybe a
Prelude.Nothing,
$sel:securityConfiguration:StartJobRun' :: Maybe Text
securityConfiguration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allocatedCapacity:StartJobRun' :: Maybe Int
allocatedCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:maxCapacity:StartJobRun' :: Maybe Double
maxCapacity = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:timeout:StartJobRun' :: Maybe Natural
timeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:jobRunId:StartJobRun' :: Maybe Text
jobRunId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobName:StartJobRun' :: Text
jobName = Text
pJobName_
}
startJobRun_numberOfWorkers :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Int)
startJobRun_numberOfWorkers :: (Maybe Int -> f (Maybe Int)) -> StartJobRun -> f StartJobRun
startJobRun_numberOfWorkers = (StartJobRun -> Maybe Int)
-> (StartJobRun -> Maybe Int -> StartJobRun)
-> Lens StartJobRun StartJobRun (Maybe Int) (Maybe Int)
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_notificationProperty :: Lens.Lens' StartJobRun (Prelude.Maybe NotificationProperty)
startJobRun_notificationProperty :: (Maybe NotificationProperty -> f (Maybe NotificationProperty))
-> StartJobRun -> f StartJobRun
startJobRun_notificationProperty = (StartJobRun -> Maybe NotificationProperty)
-> (StartJobRun -> Maybe NotificationProperty -> StartJobRun)
-> Lens
StartJobRun
StartJobRun
(Maybe NotificationProperty)
(Maybe 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_arguments :: Lens.Lens' StartJobRun (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startJobRun_arguments :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartJobRun -> f StartJobRun
startJobRun_arguments = (StartJobRun -> Maybe (HashMap Text Text))
-> (StartJobRun -> Maybe (HashMap Text Text) -> StartJobRun)
-> Lens
StartJobRun
StartJobRun
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartJobRun -> f StartJobRun)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartJobRun
-> f StartJobRun
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startJobRun_workerType :: Lens.Lens' StartJobRun (Prelude.Maybe WorkerType)
startJobRun_workerType :: (Maybe WorkerType -> f (Maybe WorkerType))
-> StartJobRun -> f StartJobRun
startJobRun_workerType = (StartJobRun -> Maybe WorkerType)
-> (StartJobRun -> Maybe WorkerType -> StartJobRun)
-> Lens
StartJobRun StartJobRun (Maybe WorkerType) (Maybe 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_securityConfiguration :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Text)
startJobRun_securityConfiguration :: (Maybe Text -> f (Maybe Text)) -> StartJobRun -> f StartJobRun
startJobRun_securityConfiguration = (StartJobRun -> Maybe Text)
-> (StartJobRun -> Maybe Text -> StartJobRun)
-> Lens StartJobRun StartJobRun (Maybe Text) (Maybe Text)
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_allocatedCapacity :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Int)
startJobRun_allocatedCapacity :: (Maybe Int -> f (Maybe Int)) -> StartJobRun -> f StartJobRun
startJobRun_allocatedCapacity = (StartJobRun -> Maybe Int)
-> (StartJobRun -> Maybe Int -> StartJobRun)
-> Lens StartJobRun StartJobRun (Maybe Int) (Maybe Int)
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_maxCapacity :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Double)
startJobRun_maxCapacity :: (Maybe Double -> f (Maybe Double)) -> StartJobRun -> f StartJobRun
startJobRun_maxCapacity = (StartJobRun -> Maybe Double)
-> (StartJobRun -> Maybe Double -> StartJobRun)
-> Lens StartJobRun StartJobRun (Maybe Double) (Maybe Double)
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_timeout :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Natural)
startJobRun_timeout :: (Maybe Natural -> f (Maybe Natural))
-> StartJobRun -> f StartJobRun
startJobRun_timeout = (StartJobRun -> Maybe Natural)
-> (StartJobRun -> Maybe Natural -> StartJobRun)
-> Lens StartJobRun StartJobRun (Maybe Natural) (Maybe Natural)
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_jobRunId :: Lens.Lens' StartJobRun (Prelude.Maybe Prelude.Text)
startJobRun_jobRunId :: (Maybe Text -> f (Maybe Text)) -> StartJobRun -> f StartJobRun
startJobRun_jobRunId = (StartJobRun -> Maybe Text)
-> (StartJobRun -> Maybe Text -> StartJobRun)
-> Lens StartJobRun StartJobRun (Maybe Text) (Maybe Text)
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_jobName :: Lens.Lens' StartJobRun Prelude.Text
startJobRun_jobName :: (Text -> f Text) -> StartJobRun -> f StartJobRun
startJobRun_jobName = (StartJobRun -> Text)
-> (StartJobRun -> Text -> StartJobRun)
-> Lens StartJobRun StartJobRun Text Text
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 :: StartJobRun -> Request StartJobRun
request = Service -> StartJobRun -> Request StartJobRun
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartJobRun
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartJobRun)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartJobRun))
-> Logger
-> Service
-> Proxy StartJobRun
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartJobRun)))
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 -> Int -> StartJobRunResponse
StartJobRunResponse'
(Maybe Text -> Int -> StartJobRunResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartJobRunResponse)
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
"JobRunId")
Either String (Int -> StartJobRunResponse)
-> Either String Int -> Either String StartJobRunResponse
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 StartJobRun
instance Prelude.NFData StartJobRun
instance Core.ToHeaders StartJobRun where
toHeaders :: StartJobRun -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartJobRun -> 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
"AWSGlue.StartJobRun" :: 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 StartJobRun where
toJSON :: StartJobRun -> Value
toJSON StartJobRun' {Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe NotificationProperty
Maybe WorkerType
Text
jobName :: Text
jobRunId :: Maybe Text
timeout :: Maybe Natural
maxCapacity :: Maybe Double
allocatedCapacity :: Maybe Int
securityConfiguration :: Maybe Text
workerType :: Maybe WorkerType
arguments :: Maybe (HashMap Text Text)
notificationProperty :: Maybe NotificationProperty
numberOfWorkers :: Maybe Int
$sel:jobName:StartJobRun' :: StartJobRun -> Text
$sel:jobRunId:StartJobRun' :: StartJobRun -> Maybe Text
$sel:timeout:StartJobRun' :: StartJobRun -> Maybe Natural
$sel:maxCapacity:StartJobRun' :: StartJobRun -> Maybe Double
$sel:allocatedCapacity:StartJobRun' :: StartJobRun -> Maybe Int
$sel:securityConfiguration:StartJobRun' :: StartJobRun -> Maybe Text
$sel:workerType:StartJobRun' :: StartJobRun -> Maybe WorkerType
$sel:arguments:StartJobRun' :: StartJobRun -> Maybe (HashMap Text Text)
$sel:notificationProperty:StartJobRun' :: StartJobRun -> Maybe NotificationProperty
$sel:numberOfWorkers:StartJobRun' :: StartJobRun -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NumberOfWorkers" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
numberOfWorkers,
(Text
"NotificationProperty" Text -> NotificationProperty -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NotificationProperty -> Pair)
-> Maybe NotificationProperty -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationProperty
notificationProperty,
(Text
"Arguments" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
arguments,
(Text
"WorkerType" Text -> WorkerType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (WorkerType -> Pair) -> Maybe WorkerType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkerType
workerType,
(Text
"SecurityConfiguration" 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
securityConfiguration,
(Text
"AllocatedCapacity" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
allocatedCapacity,
(Text
"MaxCapacity" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
maxCapacity,
(Text
"Timeout" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeout,
(Text
"JobRunId" 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
jobRunId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"JobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobName)
]
)
instance Core.ToPath StartJobRun where
toPath :: StartJobRun -> ByteString
toPath = ByteString -> StartJobRun -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartJobRun where
toQuery :: StartJobRun -> QueryString
toQuery = QueryString -> StartJobRun -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(StartJobRunResponse -> StartJobRunResponse -> Bool)
-> (StartJobRunResponse -> StartJobRunResponse -> Bool)
-> Eq StartJobRunResponse
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]
(Int -> ReadS StartJobRunResponse)
-> ReadS [StartJobRunResponse]
-> ReadPrec StartJobRunResponse
-> ReadPrec [StartJobRunResponse]
-> Read 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
(Int -> StartJobRunResponse -> ShowS)
-> (StartJobRunResponse -> String)
-> ([StartJobRunResponse] -> ShowS)
-> Show StartJobRunResponse
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. StartJobRunResponse -> Rep StartJobRunResponse x)
-> (forall x. Rep StartJobRunResponse x -> StartJobRunResponse)
-> Generic StartJobRunResponse
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' :: Maybe Text -> Int -> StartJobRunResponse
StartJobRunResponse'
{ $sel:jobRunId:StartJobRunResponse' :: Maybe Text
jobRunId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartJobRunResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startJobRunResponse_jobRunId :: Lens.Lens' StartJobRunResponse (Prelude.Maybe Prelude.Text)
startJobRunResponse_jobRunId :: (Maybe Text -> f (Maybe Text))
-> StartJobRunResponse -> f StartJobRunResponse
startJobRunResponse_jobRunId = (StartJobRunResponse -> Maybe Text)
-> (StartJobRunResponse -> Maybe Text -> StartJobRunResponse)
-> Lens
StartJobRunResponse StartJobRunResponse (Maybe Text) (Maybe Text)
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 :: (Int -> f Int) -> StartJobRunResponse -> f StartJobRunResponse
startJobRunResponse_httpStatus = (StartJobRunResponse -> Int)
-> (StartJobRunResponse -> Int -> StartJobRunResponse)
-> Lens StartJobRunResponse StartJobRunResponse Int Int
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