module Stratosphere.EC2.Instance.HibernationOptionsProperty (
HibernationOptionsProperty(..), mkHibernationOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HibernationOptionsProperty
=
HibernationOptionsProperty {HibernationOptionsProperty -> ()
haddock_workaround_ :: (),
HibernationOptionsProperty -> Maybe (Value Bool)
configured :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (HibernationOptionsProperty -> HibernationOptionsProperty -> Bool
(HibernationOptionsProperty -> HibernationOptionsProperty -> Bool)
-> (HibernationOptionsProperty
-> HibernationOptionsProperty -> Bool)
-> Eq HibernationOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HibernationOptionsProperty -> HibernationOptionsProperty -> Bool
== :: HibernationOptionsProperty -> HibernationOptionsProperty -> Bool
$c/= :: HibernationOptionsProperty -> HibernationOptionsProperty -> Bool
/= :: HibernationOptionsProperty -> HibernationOptionsProperty -> Bool
Prelude.Eq, Int -> HibernationOptionsProperty -> ShowS
[HibernationOptionsProperty] -> ShowS
HibernationOptionsProperty -> String
(Int -> HibernationOptionsProperty -> ShowS)
-> (HibernationOptionsProperty -> String)
-> ([HibernationOptionsProperty] -> ShowS)
-> Show HibernationOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HibernationOptionsProperty -> ShowS
showsPrec :: Int -> HibernationOptionsProperty -> ShowS
$cshow :: HibernationOptionsProperty -> String
show :: HibernationOptionsProperty -> String
$cshowList :: [HibernationOptionsProperty] -> ShowS
showList :: [HibernationOptionsProperty] -> ShowS
Prelude.Show)
mkHibernationOptionsProperty :: HibernationOptionsProperty
mkHibernationOptionsProperty :: HibernationOptionsProperty
mkHibernationOptionsProperty
= HibernationOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), configured :: Maybe (Value Bool)
configured = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HibernationOptionsProperty where
toResourceProperties :: HibernationOptionsProperty -> ResourceProperties
toResourceProperties HibernationOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: HibernationOptionsProperty -> ()
configured :: HibernationOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
configured :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::Instance.HibernationOptions",
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Configured" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
configured])}
instance JSON.ToJSON HibernationOptionsProperty where
toJSON :: HibernationOptionsProperty -> Value
toJSON HibernationOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: HibernationOptionsProperty -> ()
configured :: HibernationOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
configured :: Maybe (Value Bool)
..}
= [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Configured" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
configured]))
instance Property "Configured" HibernationOptionsProperty where
type PropertyType "Configured" HibernationOptionsProperty = Value Prelude.Bool
set :: PropertyType "Configured" HibernationOptionsProperty
-> HibernationOptionsProperty -> HibernationOptionsProperty
set PropertyType "Configured" HibernationOptionsProperty
newValue HibernationOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: HibernationOptionsProperty -> ()
configured :: HibernationOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
configured :: Maybe (Value Bool)
..}
= HibernationOptionsProperty
{configured :: Maybe (Value Bool)
configured = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Configured" HibernationOptionsProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}