module Stratosphere.EMR.InstanceFleetConfig.OnDemandResizingSpecificationProperty (
        module Exports, OnDemandResizingSpecificationProperty(..),
        mkOnDemandResizingSpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EMR.InstanceFleetConfig.OnDemandCapacityReservationOptionsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OnDemandResizingSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandresizingspecification.html>
    OnDemandResizingSpecificationProperty {OnDemandResizingSpecificationProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandresizingspecification.html#cfn-elasticmapreduce-instancefleetconfig-ondemandresizingspecification-allocationstrategy>
                                           OnDemandResizingSpecificationProperty -> Maybe (Value Text)
allocationStrategy :: (Prelude.Maybe (Value Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandresizingspecification.html#cfn-elasticmapreduce-instancefleetconfig-ondemandresizingspecification-capacityreservationoptions>
                                           OnDemandResizingSpecificationProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
capacityReservationOptions :: (Prelude.Maybe OnDemandCapacityReservationOptionsProperty),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-ondemandresizingspecification.html#cfn-elasticmapreduce-instancefleetconfig-ondemandresizingspecification-timeoutdurationminutes>
                                           OnDemandResizingSpecificationProperty -> Maybe (Value Integer)
timeoutDurationMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty -> Bool
(OnDemandResizingSpecificationProperty
 -> OnDemandResizingSpecificationProperty -> Bool)
-> (OnDemandResizingSpecificationProperty
    -> OnDemandResizingSpecificationProperty -> Bool)
-> Eq OnDemandResizingSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty -> Bool
== :: OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty -> Bool
$c/= :: OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty -> Bool
/= :: OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty -> Bool
Prelude.Eq, Int -> OnDemandResizingSpecificationProperty -> ShowS
[OnDemandResizingSpecificationProperty] -> ShowS
OnDemandResizingSpecificationProperty -> String
(Int -> OnDemandResizingSpecificationProperty -> ShowS)
-> (OnDemandResizingSpecificationProperty -> String)
-> ([OnDemandResizingSpecificationProperty] -> ShowS)
-> Show OnDemandResizingSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OnDemandResizingSpecificationProperty -> ShowS
showsPrec :: Int -> OnDemandResizingSpecificationProperty -> ShowS
$cshow :: OnDemandResizingSpecificationProperty -> String
show :: OnDemandResizingSpecificationProperty -> String
$cshowList :: [OnDemandResizingSpecificationProperty] -> ShowS
showList :: [OnDemandResizingSpecificationProperty] -> ShowS
Prelude.Show)
mkOnDemandResizingSpecificationProperty ::
  OnDemandResizingSpecificationProperty
mkOnDemandResizingSpecificationProperty :: OnDemandResizingSpecificationProperty
mkOnDemandResizingSpecificationProperty
  = OnDemandResizingSpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), allocationStrategy :: Maybe (Value Text)
allocationStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
capacityReservationOptions = Maybe OnDemandCapacityReservationOptionsProperty
forall a. Maybe a
Prelude.Nothing,
       timeoutDurationMinutes :: Maybe (Value Integer)
timeoutDurationMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OnDemandResizingSpecificationProperty where
  toResourceProperties :: OnDemandResizingSpecificationProperty -> ResourceProperties
toResourceProperties OnDemandResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: OnDemandResizingSpecificationProperty -> ()
allocationStrategy :: OnDemandResizingSpecificationProperty -> Maybe (Value Text)
capacityReservationOptions :: OnDemandResizingSpecificationProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: OnDemandResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMR::InstanceFleetConfig.OnDemandResizingSpecification",
         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 Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllocationStrategy" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
allocationStrategy,
                            Key -> OnDemandCapacityReservationOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityReservationOptions"
                              (OnDemandCapacityReservationOptionsProperty -> (Key, Value))
-> Maybe OnDemandCapacityReservationOptionsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnDemandCapacityReservationOptionsProperty
capacityReservationOptions,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeoutDurationMinutes"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
timeoutDurationMinutes])}
instance JSON.ToJSON OnDemandResizingSpecificationProperty where
  toJSON :: OnDemandResizingSpecificationProperty -> Value
toJSON OnDemandResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: OnDemandResizingSpecificationProperty -> ()
allocationStrategy :: OnDemandResizingSpecificationProperty -> Maybe (Value Text)
capacityReservationOptions :: OnDemandResizingSpecificationProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: OnDemandResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = [(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 Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllocationStrategy" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
allocationStrategy,
               Key -> OnDemandCapacityReservationOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityReservationOptions"
                 (OnDemandCapacityReservationOptionsProperty -> (Key, Value))
-> Maybe OnDemandCapacityReservationOptionsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnDemandCapacityReservationOptionsProperty
capacityReservationOptions,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeoutDurationMinutes"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
timeoutDurationMinutes]))
instance Property "AllocationStrategy" OnDemandResizingSpecificationProperty where
  type PropertyType "AllocationStrategy" OnDemandResizingSpecificationProperty = Value Prelude.Text
  set :: PropertyType
  "AllocationStrategy" OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty
set PropertyType
  "AllocationStrategy" OnDemandResizingSpecificationProperty
newValue OnDemandResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: OnDemandResizingSpecificationProperty -> ()
allocationStrategy :: OnDemandResizingSpecificationProperty -> Maybe (Value Text)
capacityReservationOptions :: OnDemandResizingSpecificationProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: OnDemandResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = OnDemandResizingSpecificationProperty
        {allocationStrategy :: Maybe (Value Text)
allocationStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AllocationStrategy" OnDemandResizingSpecificationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: ()
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
..}
instance Property "CapacityReservationOptions" OnDemandResizingSpecificationProperty where
  type PropertyType "CapacityReservationOptions" OnDemandResizingSpecificationProperty = OnDemandCapacityReservationOptionsProperty
  set :: PropertyType
  "CapacityReservationOptions" OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty
set PropertyType
  "CapacityReservationOptions" OnDemandResizingSpecificationProperty
newValue OnDemandResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: OnDemandResizingSpecificationProperty -> ()
allocationStrategy :: OnDemandResizingSpecificationProperty -> Maybe (Value Text)
capacityReservationOptions :: OnDemandResizingSpecificationProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: OnDemandResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = OnDemandResizingSpecificationProperty
        {capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
capacityReservationOptions = OnDemandCapacityReservationOptionsProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CapacityReservationOptions" OnDemandResizingSpecificationProperty
OnDemandCapacityReservationOptionsProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutDurationMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutDurationMinutes :: Maybe (Value Integer)
..}
instance Property "TimeoutDurationMinutes" OnDemandResizingSpecificationProperty where
  type PropertyType "TimeoutDurationMinutes" OnDemandResizingSpecificationProperty = Value Prelude.Integer
  set :: PropertyType
  "TimeoutDurationMinutes" OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty
-> OnDemandResizingSpecificationProperty
set PropertyType
  "TimeoutDurationMinutes" OnDemandResizingSpecificationProperty
newValue OnDemandResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: OnDemandResizingSpecificationProperty -> ()
allocationStrategy :: OnDemandResizingSpecificationProperty -> Maybe (Value Text)
capacityReservationOptions :: OnDemandResizingSpecificationProperty
-> Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: OnDemandResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = OnDemandResizingSpecificationProperty
        {timeoutDurationMinutes :: Maybe (Value Integer)
timeoutDurationMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TimeoutDurationMinutes" OnDemandResizingSpecificationProperty
Value Integer
newValue, Maybe (Value Text)
Maybe OnDemandCapacityReservationOptionsProperty
()
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
capacityReservationOptions :: Maybe OnDemandCapacityReservationOptionsProperty
..}