module Stratosphere.EC2.LaunchTemplate.MaintenanceOptionsProperty (
MaintenanceOptionsProperty(..), mkMaintenanceOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MaintenanceOptionsProperty
=
MaintenanceOptionsProperty {MaintenanceOptionsProperty -> ()
haddock_workaround_ :: (),
MaintenanceOptionsProperty -> Maybe (Value Text)
autoRecovery :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (MaintenanceOptionsProperty -> MaintenanceOptionsProperty -> Bool
(MaintenanceOptionsProperty -> MaintenanceOptionsProperty -> Bool)
-> (MaintenanceOptionsProperty
-> MaintenanceOptionsProperty -> Bool)
-> Eq MaintenanceOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MaintenanceOptionsProperty -> MaintenanceOptionsProperty -> Bool
== :: MaintenanceOptionsProperty -> MaintenanceOptionsProperty -> Bool
$c/= :: MaintenanceOptionsProperty -> MaintenanceOptionsProperty -> Bool
/= :: MaintenanceOptionsProperty -> MaintenanceOptionsProperty -> Bool
Prelude.Eq, Int -> MaintenanceOptionsProperty -> ShowS
[MaintenanceOptionsProperty] -> ShowS
MaintenanceOptionsProperty -> String
(Int -> MaintenanceOptionsProperty -> ShowS)
-> (MaintenanceOptionsProperty -> String)
-> ([MaintenanceOptionsProperty] -> ShowS)
-> Show MaintenanceOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MaintenanceOptionsProperty -> ShowS
showsPrec :: Int -> MaintenanceOptionsProperty -> ShowS
$cshow :: MaintenanceOptionsProperty -> String
show :: MaintenanceOptionsProperty -> String
$cshowList :: [MaintenanceOptionsProperty] -> ShowS
showList :: [MaintenanceOptionsProperty] -> ShowS
Prelude.Show)
mkMaintenanceOptionsProperty :: MaintenanceOptionsProperty
mkMaintenanceOptionsProperty :: MaintenanceOptionsProperty
mkMaintenanceOptionsProperty
= MaintenanceOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), autoRecovery :: Maybe (Value Text)
autoRecovery = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MaintenanceOptionsProperty where
toResourceProperties :: MaintenanceOptionsProperty -> ResourceProperties
toResourceProperties MaintenanceOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MaintenanceOptionsProperty -> ()
autoRecovery :: MaintenanceOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoRecovery :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.MaintenanceOptions",
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
"AutoRecovery" (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)
autoRecovery])}
instance JSON.ToJSON MaintenanceOptionsProperty where
toJSON :: MaintenanceOptionsProperty -> Value
toJSON MaintenanceOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MaintenanceOptionsProperty -> ()
autoRecovery :: MaintenanceOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoRecovery :: 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
"AutoRecovery" (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)
autoRecovery]))
instance Property "AutoRecovery" MaintenanceOptionsProperty where
type PropertyType "AutoRecovery" MaintenanceOptionsProperty = Value Prelude.Text
set :: PropertyType "AutoRecovery" MaintenanceOptionsProperty
-> MaintenanceOptionsProperty -> MaintenanceOptionsProperty
set PropertyType "AutoRecovery" MaintenanceOptionsProperty
newValue MaintenanceOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MaintenanceOptionsProperty -> ()
autoRecovery :: MaintenanceOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoRecovery :: Maybe (Value Text)
..}
= MaintenanceOptionsProperty
{autoRecovery :: Maybe (Value Text)
autoRecovery = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AutoRecovery" MaintenanceOptionsProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}