module Stratosphere.EMR.Cluster.OnDemandCapacityReservationOptionsProperty (
        OnDemandCapacityReservationOptionsProperty(..),
        mkOnDemandCapacityReservationOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OnDemandCapacityReservationOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandcapacityreservationoptions.html>
    OnDemandCapacityReservationOptionsProperty {OnDemandCapacityReservationOptionsProperty -> ()
haddock_workaround_ :: (),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandcapacityreservationoptions.html#cfn-elasticmapreduce-cluster-ondemandcapacityreservationoptions-capacityreservationpreference>
                                                OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationPreference :: (Prelude.Maybe (Value Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandcapacityreservationoptions.html#cfn-elasticmapreduce-cluster-ondemandcapacityreservationoptions-capacityreservationresourcegrouparn>
                                                OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: (Prelude.Maybe (Value Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ondemandcapacityreservationoptions.html#cfn-elasticmapreduce-cluster-ondemandcapacityreservationoptions-usagestrategy>
                                                OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
usageStrategy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty -> Bool
(OnDemandCapacityReservationOptionsProperty
 -> OnDemandCapacityReservationOptionsProperty -> Bool)
-> (OnDemandCapacityReservationOptionsProperty
    -> OnDemandCapacityReservationOptionsProperty -> Bool)
-> Eq OnDemandCapacityReservationOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty -> Bool
== :: OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty -> Bool
$c/= :: OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty -> Bool
/= :: OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty -> Bool
Prelude.Eq, Int -> OnDemandCapacityReservationOptionsProperty -> ShowS
[OnDemandCapacityReservationOptionsProperty] -> ShowS
OnDemandCapacityReservationOptionsProperty -> String
(Int -> OnDemandCapacityReservationOptionsProperty -> ShowS)
-> (OnDemandCapacityReservationOptionsProperty -> String)
-> ([OnDemandCapacityReservationOptionsProperty] -> ShowS)
-> Show OnDemandCapacityReservationOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OnDemandCapacityReservationOptionsProperty -> ShowS
showsPrec :: Int -> OnDemandCapacityReservationOptionsProperty -> ShowS
$cshow :: OnDemandCapacityReservationOptionsProperty -> String
show :: OnDemandCapacityReservationOptionsProperty -> String
$cshowList :: [OnDemandCapacityReservationOptionsProperty] -> ShowS
showList :: [OnDemandCapacityReservationOptionsProperty] -> ShowS
Prelude.Show)
mkOnDemandCapacityReservationOptionsProperty ::
  OnDemandCapacityReservationOptionsProperty
mkOnDemandCapacityReservationOptionsProperty :: OnDemandCapacityReservationOptionsProperty
mkOnDemandCapacityReservationOptionsProperty
  = OnDemandCapacityReservationOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       capacityReservationPreference :: Maybe (Value Text)
capacityReservationPreference = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       capacityReservationResourceGroupArn :: Maybe (Value Text)
capacityReservationResourceGroupArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       usageStrategy :: Maybe (Value Text)
usageStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OnDemandCapacityReservationOptionsProperty where
  toResourceProperties :: OnDemandCapacityReservationOptionsProperty -> ResourceProperties
toResourceProperties
    OnDemandCapacityReservationOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: OnDemandCapacityReservationOptionsProperty -> ()
capacityReservationPreference :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
usageStrategy :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMR::Cluster.OnDemandCapacityReservationOptions",
         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
"CapacityReservationPreference"
                              (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)
capacityReservationPreference,
                            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
"CapacityReservationResourceGroupArn"
                              (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)
capacityReservationResourceGroupArn,
                            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
"UsageStrategy" (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)
usageStrategy])}
instance JSON.ToJSON OnDemandCapacityReservationOptionsProperty where
  toJSON :: OnDemandCapacityReservationOptionsProperty -> Value
toJSON OnDemandCapacityReservationOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: OnDemandCapacityReservationOptionsProperty -> ()
capacityReservationPreference :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
usageStrategy :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
    = [(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
"CapacityReservationPreference"
                 (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)
capacityReservationPreference,
               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
"CapacityReservationResourceGroupArn"
                 (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)
capacityReservationResourceGroupArn,
               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
"UsageStrategy" (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)
usageStrategy]))
instance Property "CapacityReservationPreference" OnDemandCapacityReservationOptionsProperty where
  type PropertyType "CapacityReservationPreference" OnDemandCapacityReservationOptionsProperty = Value Prelude.Text
  set :: PropertyType
  "CapacityReservationPreference"
  OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty
set PropertyType
  "CapacityReservationPreference"
  OnDemandCapacityReservationOptionsProperty
newValue OnDemandCapacityReservationOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: OnDemandCapacityReservationOptionsProperty -> ()
capacityReservationPreference :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
usageStrategy :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
    = OnDemandCapacityReservationOptionsProperty
        {capacityReservationPreference :: Maybe (Value Text)
capacityReservationPreference = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CapacityReservationPreference"
  OnDemandCapacityReservationOptionsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
instance Property "CapacityReservationResourceGroupArn" OnDemandCapacityReservationOptionsProperty where
  type PropertyType "CapacityReservationResourceGroupArn" OnDemandCapacityReservationOptionsProperty = Value Prelude.Text
  set :: PropertyType
  "CapacityReservationResourceGroupArn"
  OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty
set PropertyType
  "CapacityReservationResourceGroupArn"
  OnDemandCapacityReservationOptionsProperty
newValue OnDemandCapacityReservationOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: OnDemandCapacityReservationOptionsProperty -> ()
capacityReservationPreference :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
usageStrategy :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
    = OnDemandCapacityReservationOptionsProperty
        {capacityReservationResourceGroupArn :: Maybe (Value Text)
capacityReservationResourceGroupArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CapacityReservationResourceGroupArn"
  OnDemandCapacityReservationOptionsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
instance Property "UsageStrategy" OnDemandCapacityReservationOptionsProperty where
  type PropertyType "UsageStrategy" OnDemandCapacityReservationOptionsProperty = Value Prelude.Text
  set :: PropertyType
  "UsageStrategy" OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty
-> OnDemandCapacityReservationOptionsProperty
set PropertyType
  "UsageStrategy" OnDemandCapacityReservationOptionsProperty
newValue OnDemandCapacityReservationOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: OnDemandCapacityReservationOptionsProperty -> ()
capacityReservationPreference :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
usageStrategy :: OnDemandCapacityReservationOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
usageStrategy :: Maybe (Value Text)
..}
    = OnDemandCapacityReservationOptionsProperty
        {usageStrategy :: Maybe (Value Text)
usageStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "UsageStrategy" OnDemandCapacityReservationOptionsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationPreference :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
..}