module Stratosphere.Batch.SchedulingPolicy.FairsharePolicyProperty (
module Exports, FairsharePolicyProperty(..),
mkFairsharePolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Batch.SchedulingPolicy.ShareAttributesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FairsharePolicyProperty
=
FairsharePolicyProperty {FairsharePolicyProperty -> ()
haddock_workaround_ :: (),
FairsharePolicyProperty -> Maybe (Value Double)
computeReservation :: (Prelude.Maybe (Value Prelude.Double)),
FairsharePolicyProperty -> Maybe (Value Double)
shareDecaySeconds :: (Prelude.Maybe (Value Prelude.Double)),
FairsharePolicyProperty -> Maybe [ShareAttributesProperty]
shareDistribution :: (Prelude.Maybe [ShareAttributesProperty])}
deriving stock (FairsharePolicyProperty -> FairsharePolicyProperty -> Bool
(FairsharePolicyProperty -> FairsharePolicyProperty -> Bool)
-> (FairsharePolicyProperty -> FairsharePolicyProperty -> Bool)
-> Eq FairsharePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FairsharePolicyProperty -> FairsharePolicyProperty -> Bool
== :: FairsharePolicyProperty -> FairsharePolicyProperty -> Bool
$c/= :: FairsharePolicyProperty -> FairsharePolicyProperty -> Bool
/= :: FairsharePolicyProperty -> FairsharePolicyProperty -> Bool
Prelude.Eq, Int -> FairsharePolicyProperty -> ShowS
[FairsharePolicyProperty] -> ShowS
FairsharePolicyProperty -> String
(Int -> FairsharePolicyProperty -> ShowS)
-> (FairsharePolicyProperty -> String)
-> ([FairsharePolicyProperty] -> ShowS)
-> Show FairsharePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FairsharePolicyProperty -> ShowS
showsPrec :: Int -> FairsharePolicyProperty -> ShowS
$cshow :: FairsharePolicyProperty -> String
show :: FairsharePolicyProperty -> String
$cshowList :: [FairsharePolicyProperty] -> ShowS
showList :: [FairsharePolicyProperty] -> ShowS
Prelude.Show)
mkFairsharePolicyProperty :: FairsharePolicyProperty
mkFairsharePolicyProperty :: FairsharePolicyProperty
mkFairsharePolicyProperty
= FairsharePolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), computeReservation :: Maybe (Value Double)
computeReservation = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
shareDecaySeconds :: Maybe (Value Double)
shareDecaySeconds = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
shareDistribution :: Maybe [ShareAttributesProperty]
shareDistribution = Maybe [ShareAttributesProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FairsharePolicyProperty where
toResourceProperties :: FairsharePolicyProperty -> ResourceProperties
toResourceProperties FairsharePolicyProperty {Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: FairsharePolicyProperty -> ()
computeReservation :: FairsharePolicyProperty -> Maybe (Value Double)
shareDecaySeconds :: FairsharePolicyProperty -> Maybe (Value Double)
shareDistribution :: FairsharePolicyProperty -> Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Batch::SchedulingPolicy.FairsharePolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ComputeReservation" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
computeReservation,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShareDecaySeconds" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
shareDecaySeconds,
Key -> [ShareAttributesProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShareDistribution" ([ShareAttributesProperty] -> (Key, Value))
-> Maybe [ShareAttributesProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ShareAttributesProperty]
shareDistribution])}
instance JSON.ToJSON FairsharePolicyProperty where
toJSON :: FairsharePolicyProperty -> Value
toJSON FairsharePolicyProperty {Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: FairsharePolicyProperty -> ()
computeReservation :: FairsharePolicyProperty -> Maybe (Value Double)
shareDecaySeconds :: FairsharePolicyProperty -> Maybe (Value Double)
shareDistribution :: FairsharePolicyProperty -> Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ComputeReservation" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
computeReservation,
Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShareDecaySeconds" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
shareDecaySeconds,
Key -> [ShareAttributesProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShareDistribution" ([ShareAttributesProperty] -> (Key, Value))
-> Maybe [ShareAttributesProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ShareAttributesProperty]
shareDistribution]))
instance Property "ComputeReservation" FairsharePolicyProperty where
type PropertyType "ComputeReservation" FairsharePolicyProperty = Value Prelude.Double
set :: PropertyType "ComputeReservation" FairsharePolicyProperty
-> FairsharePolicyProperty -> FairsharePolicyProperty
set PropertyType "ComputeReservation" FairsharePolicyProperty
newValue FairsharePolicyProperty {Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: FairsharePolicyProperty -> ()
computeReservation :: FairsharePolicyProperty -> Maybe (Value Double)
shareDecaySeconds :: FairsharePolicyProperty -> Maybe (Value Double)
shareDistribution :: FairsharePolicyProperty -> Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
= FairsharePolicyProperty
{computeReservation :: Maybe (Value Double)
computeReservation = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComputeReservation" FairsharePolicyProperty
Value Double
newValue, Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: ()
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
instance Property "ShareDecaySeconds" FairsharePolicyProperty where
type PropertyType "ShareDecaySeconds" FairsharePolicyProperty = Value Prelude.Double
set :: PropertyType "ShareDecaySeconds" FairsharePolicyProperty
-> FairsharePolicyProperty -> FairsharePolicyProperty
set PropertyType "ShareDecaySeconds" FairsharePolicyProperty
newValue FairsharePolicyProperty {Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: FairsharePolicyProperty -> ()
computeReservation :: FairsharePolicyProperty -> Maybe (Value Double)
shareDecaySeconds :: FairsharePolicyProperty -> Maybe (Value Double)
shareDistribution :: FairsharePolicyProperty -> Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
= FairsharePolicyProperty
{shareDecaySeconds :: Maybe (Value Double)
shareDecaySeconds = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ShareDecaySeconds" FairsharePolicyProperty
Value Double
newValue, Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
instance Property "ShareDistribution" FairsharePolicyProperty where
type PropertyType "ShareDistribution" FairsharePolicyProperty = [ShareAttributesProperty]
set :: PropertyType "ShareDistribution" FairsharePolicyProperty
-> FairsharePolicyProperty -> FairsharePolicyProperty
set PropertyType "ShareDistribution" FairsharePolicyProperty
newValue FairsharePolicyProperty {Maybe [ShareAttributesProperty]
Maybe (Value Double)
()
haddock_workaround_ :: FairsharePolicyProperty -> ()
computeReservation :: FairsharePolicyProperty -> Maybe (Value Double)
shareDecaySeconds :: FairsharePolicyProperty -> Maybe (Value Double)
shareDistribution :: FairsharePolicyProperty -> Maybe [ShareAttributesProperty]
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
shareDistribution :: Maybe [ShareAttributesProperty]
..}
= FairsharePolicyProperty
{shareDistribution :: Maybe [ShareAttributesProperty]
shareDistribution = [ShareAttributesProperty] -> Maybe [ShareAttributesProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ShareAttributesProperty]
PropertyType "ShareDistribution" FairsharePolicyProperty
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
haddock_workaround_ :: ()
computeReservation :: Maybe (Value Double)
shareDecaySeconds :: Maybe (Value Double)
..}