module Stratosphere.EC2.EC2Fleet.CapacityReservationOptionsRequestProperty (
CapacityReservationOptionsRequestProperty(..),
mkCapacityReservationOptionsRequestProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CapacityReservationOptionsRequestProperty
=
CapacityReservationOptionsRequestProperty {CapacityReservationOptionsRequestProperty -> ()
haddock_workaround_ :: (),
CapacityReservationOptionsRequestProperty -> Maybe (Value Text)
usageStrategy :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool
(CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool)
-> (CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool)
-> Eq CapacityReservationOptionsRequestProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool
== :: CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool
$c/= :: CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool
/= :: CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty -> Bool
Prelude.Eq, Int -> CapacityReservationOptionsRequestProperty -> ShowS
[CapacityReservationOptionsRequestProperty] -> ShowS
CapacityReservationOptionsRequestProperty -> String
(Int -> CapacityReservationOptionsRequestProperty -> ShowS)
-> (CapacityReservationOptionsRequestProperty -> String)
-> ([CapacityReservationOptionsRequestProperty] -> ShowS)
-> Show CapacityReservationOptionsRequestProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityReservationOptionsRequestProperty -> ShowS
showsPrec :: Int -> CapacityReservationOptionsRequestProperty -> ShowS
$cshow :: CapacityReservationOptionsRequestProperty -> String
show :: CapacityReservationOptionsRequestProperty -> String
$cshowList :: [CapacityReservationOptionsRequestProperty] -> ShowS
showList :: [CapacityReservationOptionsRequestProperty] -> ShowS
Prelude.Show)
mkCapacityReservationOptionsRequestProperty ::
CapacityReservationOptionsRequestProperty
mkCapacityReservationOptionsRequestProperty :: CapacityReservationOptionsRequestProperty
mkCapacityReservationOptionsRequestProperty
= CapacityReservationOptionsRequestProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), usageStrategy :: Maybe (Value Text)
usageStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityReservationOptionsRequestProperty where
toResourceProperties :: CapacityReservationOptionsRequestProperty -> ResourceProperties
toResourceProperties CapacityReservationOptionsRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationOptionsRequestProperty -> ()
usageStrategy :: CapacityReservationOptionsRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
usageStrategy :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::EC2Fleet.CapacityReservationOptionsRequest",
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
"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 CapacityReservationOptionsRequestProperty where
toJSON :: CapacityReservationOptionsRequestProperty -> Value
toJSON CapacityReservationOptionsRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationOptionsRequestProperty -> ()
usageStrategy :: CapacityReservationOptionsRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
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
"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 "UsageStrategy" CapacityReservationOptionsRequestProperty where
type PropertyType "UsageStrategy" CapacityReservationOptionsRequestProperty = Value Prelude.Text
set :: PropertyType
"UsageStrategy" CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty
-> CapacityReservationOptionsRequestProperty
set PropertyType
"UsageStrategy" CapacityReservationOptionsRequestProperty
newValue CapacityReservationOptionsRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationOptionsRequestProperty -> ()
usageStrategy :: CapacityReservationOptionsRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
usageStrategy :: Maybe (Value Text)
..}
= CapacityReservationOptionsRequestProperty
{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" CapacityReservationOptionsRequestProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}