{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Glue.Types.ExecutionProperty where
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
data ExecutionProperty = ExecutionProperty'
{
ExecutionProperty -> Maybe Int
maxConcurrentRuns :: Prelude.Maybe Prelude.Int
}
deriving (ExecutionProperty -> ExecutionProperty -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionProperty -> ExecutionProperty -> Bool
$c/= :: ExecutionProperty -> ExecutionProperty -> Bool
== :: ExecutionProperty -> ExecutionProperty -> Bool
$c== :: ExecutionProperty -> ExecutionProperty -> Bool
Prelude.Eq, ReadPrec [ExecutionProperty]
ReadPrec ExecutionProperty
Int -> ReadS ExecutionProperty
ReadS [ExecutionProperty]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionProperty]
$creadListPrec :: ReadPrec [ExecutionProperty]
readPrec :: ReadPrec ExecutionProperty
$creadPrec :: ReadPrec ExecutionProperty
readList :: ReadS [ExecutionProperty]
$creadList :: ReadS [ExecutionProperty]
readsPrec :: Int -> ReadS ExecutionProperty
$creadsPrec :: Int -> ReadS ExecutionProperty
Prelude.Read, Int -> ExecutionProperty -> ShowS
[ExecutionProperty] -> ShowS
ExecutionProperty -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionProperty] -> ShowS
$cshowList :: [ExecutionProperty] -> ShowS
show :: ExecutionProperty -> String
$cshow :: ExecutionProperty -> String
showsPrec :: Int -> ExecutionProperty -> ShowS
$cshowsPrec :: Int -> ExecutionProperty -> ShowS
Prelude.Show, forall x. Rep ExecutionProperty x -> ExecutionProperty
forall x. ExecutionProperty -> Rep ExecutionProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionProperty x -> ExecutionProperty
$cfrom :: forall x. ExecutionProperty -> Rep ExecutionProperty x
Prelude.Generic)
newExecutionProperty ::
ExecutionProperty
newExecutionProperty :: ExecutionProperty
newExecutionProperty =
ExecutionProperty'
{ $sel:maxConcurrentRuns:ExecutionProperty' :: Maybe Int
maxConcurrentRuns =
forall a. Maybe a
Prelude.Nothing
}
executionProperty_maxConcurrentRuns :: Lens.Lens' ExecutionProperty (Prelude.Maybe Prelude.Int)
executionProperty_maxConcurrentRuns :: Lens' ExecutionProperty (Maybe Int)
executionProperty_maxConcurrentRuns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionProperty' {Maybe Int
maxConcurrentRuns :: Maybe Int
$sel:maxConcurrentRuns:ExecutionProperty' :: ExecutionProperty -> Maybe Int
maxConcurrentRuns} -> Maybe Int
maxConcurrentRuns) (\s :: ExecutionProperty
s@ExecutionProperty' {} Maybe Int
a -> ExecutionProperty
s {$sel:maxConcurrentRuns:ExecutionProperty' :: Maybe Int
maxConcurrentRuns = Maybe Int
a} :: ExecutionProperty)
instance Data.FromJSON ExecutionProperty where
parseJSON :: Value -> Parser ExecutionProperty
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExecutionProperty"
( \Object
x ->
Maybe Int -> ExecutionProperty
ExecutionProperty'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaxConcurrentRuns")
)
instance Prelude.Hashable ExecutionProperty where
hashWithSalt :: Int -> ExecutionProperty -> Int
hashWithSalt Int
_salt ExecutionProperty' {Maybe Int
maxConcurrentRuns :: Maybe Int
$sel:maxConcurrentRuns:ExecutionProperty' :: ExecutionProperty -> Maybe Int
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxConcurrentRuns
instance Prelude.NFData ExecutionProperty where
rnf :: ExecutionProperty -> ()
rnf ExecutionProperty' {Maybe Int
maxConcurrentRuns :: Maybe Int
$sel:maxConcurrentRuns:ExecutionProperty' :: ExecutionProperty -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxConcurrentRuns
instance Data.ToJSON ExecutionProperty where
toJSON :: ExecutionProperty -> Value
toJSON ExecutionProperty' {Maybe Int
maxConcurrentRuns :: Maybe Int
$sel:maxConcurrentRuns:ExecutionProperty' :: ExecutionProperty -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"MaxConcurrentRuns" 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
maxConcurrentRuns
]
)