module Stratosphere.OpsWorks.Layer.LifecycleEventConfigurationProperty (
        module Exports, LifecycleEventConfigurationProperty(..),
        mkLifecycleEventConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.OpsWorks.Layer.ShutdownEventConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data LifecycleEventConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-lifecycleeventconfiguration.html>
    LifecycleEventConfigurationProperty {LifecycleEventConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-lifecycleeventconfiguration.html#cfn-opsworks-layer-lifecycleconfiguration-shutdowneventconfiguration>
                                         LifecycleEventConfigurationProperty
-> Maybe ShutdownEventConfigurationProperty
shutdownEventConfiguration :: (Prelude.Maybe ShutdownEventConfigurationProperty)}
  deriving stock (LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty -> Bool
(LifecycleEventConfigurationProperty
 -> LifecycleEventConfigurationProperty -> Bool)
-> (LifecycleEventConfigurationProperty
    -> LifecycleEventConfigurationProperty -> Bool)
-> Eq LifecycleEventConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty -> Bool
== :: LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty -> Bool
$c/= :: LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty -> Bool
/= :: LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty -> Bool
Prelude.Eq, Int -> LifecycleEventConfigurationProperty -> ShowS
[LifecycleEventConfigurationProperty] -> ShowS
LifecycleEventConfigurationProperty -> String
(Int -> LifecycleEventConfigurationProperty -> ShowS)
-> (LifecycleEventConfigurationProperty -> String)
-> ([LifecycleEventConfigurationProperty] -> ShowS)
-> Show LifecycleEventConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LifecycleEventConfigurationProperty -> ShowS
showsPrec :: Int -> LifecycleEventConfigurationProperty -> ShowS
$cshow :: LifecycleEventConfigurationProperty -> String
show :: LifecycleEventConfigurationProperty -> String
$cshowList :: [LifecycleEventConfigurationProperty] -> ShowS
showList :: [LifecycleEventConfigurationProperty] -> ShowS
Prelude.Show)
mkLifecycleEventConfigurationProperty ::
  LifecycleEventConfigurationProperty
mkLifecycleEventConfigurationProperty :: LifecycleEventConfigurationProperty
mkLifecycleEventConfigurationProperty
  = LifecycleEventConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       shutdownEventConfiguration :: Maybe ShutdownEventConfigurationProperty
shutdownEventConfiguration = Maybe ShutdownEventConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LifecycleEventConfigurationProperty where
  toResourceProperties :: LifecycleEventConfigurationProperty -> ResourceProperties
toResourceProperties LifecycleEventConfigurationProperty {Maybe ShutdownEventConfigurationProperty
()
haddock_workaround_ :: LifecycleEventConfigurationProperty -> ()
shutdownEventConfiguration :: LifecycleEventConfigurationProperty
-> Maybe ShutdownEventConfigurationProperty
haddock_workaround_ :: ()
shutdownEventConfiguration :: Maybe ShutdownEventConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpsWorks::Layer.LifecycleEventConfiguration",
         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 -> ShutdownEventConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShutdownEventConfiguration"
                              (ShutdownEventConfigurationProperty -> (Key, Value))
-> Maybe ShutdownEventConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ShutdownEventConfigurationProperty
shutdownEventConfiguration])}
instance JSON.ToJSON LifecycleEventConfigurationProperty where
  toJSON :: LifecycleEventConfigurationProperty -> Value
toJSON LifecycleEventConfigurationProperty {Maybe ShutdownEventConfigurationProperty
()
haddock_workaround_ :: LifecycleEventConfigurationProperty -> ()
shutdownEventConfiguration :: LifecycleEventConfigurationProperty
-> Maybe ShutdownEventConfigurationProperty
haddock_workaround_ :: ()
shutdownEventConfiguration :: Maybe ShutdownEventConfigurationProperty
..}
    = [(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 -> ShutdownEventConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShutdownEventConfiguration"
                 (ShutdownEventConfigurationProperty -> (Key, Value))
-> Maybe ShutdownEventConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ShutdownEventConfigurationProperty
shutdownEventConfiguration]))
instance Property "ShutdownEventConfiguration" LifecycleEventConfigurationProperty where
  type PropertyType "ShutdownEventConfiguration" LifecycleEventConfigurationProperty = ShutdownEventConfigurationProperty
  set :: PropertyType
  "ShutdownEventConfiguration" LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty
-> LifecycleEventConfigurationProperty
set PropertyType
  "ShutdownEventConfiguration" LifecycleEventConfigurationProperty
newValue LifecycleEventConfigurationProperty {Maybe ShutdownEventConfigurationProperty
()
haddock_workaround_ :: LifecycleEventConfigurationProperty -> ()
shutdownEventConfiguration :: LifecycleEventConfigurationProperty
-> Maybe ShutdownEventConfigurationProperty
haddock_workaround_ :: ()
shutdownEventConfiguration :: Maybe ShutdownEventConfigurationProperty
..}
    = LifecycleEventConfigurationProperty
        {shutdownEventConfiguration :: Maybe ShutdownEventConfigurationProperty
shutdownEventConfiguration = ShutdownEventConfigurationProperty
-> Maybe ShutdownEventConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ShutdownEventConfiguration" LifecycleEventConfigurationProperty
ShutdownEventConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}