module Stratosphere.CodeDeploy.DeploymentGroup.AutoRollbackConfigurationProperty (
        AutoRollbackConfigurationProperty(..),
        mkAutoRollbackConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutoRollbackConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html>
    AutoRollbackConfigurationProperty {AutoRollbackConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled>
                                       AutoRollbackConfigurationProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events>
                                       AutoRollbackConfigurationProperty -> Maybe (ValueList Text)
events :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty -> Bool
(AutoRollbackConfigurationProperty
 -> AutoRollbackConfigurationProperty -> Bool)
-> (AutoRollbackConfigurationProperty
    -> AutoRollbackConfigurationProperty -> Bool)
-> Eq AutoRollbackConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty -> Bool
== :: AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty -> Bool
$c/= :: AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty -> Bool
/= :: AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty -> Bool
Prelude.Eq, Int -> AutoRollbackConfigurationProperty -> ShowS
[AutoRollbackConfigurationProperty] -> ShowS
AutoRollbackConfigurationProperty -> String
(Int -> AutoRollbackConfigurationProperty -> ShowS)
-> (AutoRollbackConfigurationProperty -> String)
-> ([AutoRollbackConfigurationProperty] -> ShowS)
-> Show AutoRollbackConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutoRollbackConfigurationProperty -> ShowS
showsPrec :: Int -> AutoRollbackConfigurationProperty -> ShowS
$cshow :: AutoRollbackConfigurationProperty -> String
show :: AutoRollbackConfigurationProperty -> String
$cshowList :: [AutoRollbackConfigurationProperty] -> ShowS
showList :: [AutoRollbackConfigurationProperty] -> ShowS
Prelude.Show)
mkAutoRollbackConfigurationProperty ::
  AutoRollbackConfigurationProperty
mkAutoRollbackConfigurationProperty :: AutoRollbackConfigurationProperty
mkAutoRollbackConfigurationProperty
  = AutoRollbackConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       events :: Maybe (ValueList Text)
events = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutoRollbackConfigurationProperty where
  toResourceProperties :: AutoRollbackConfigurationProperty -> ResourceProperties
toResourceProperties AutoRollbackConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: AutoRollbackConfigurationProperty -> ()
enabled :: AutoRollbackConfigurationProperty -> Maybe (Value Bool)
events :: AutoRollbackConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
events :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeDeploy::DeploymentGroup.AutoRollbackConfiguration",
         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
"Enabled" (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)
enabled,
                            Key -> ValueList 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
"Events" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
events])}
instance JSON.ToJSON AutoRollbackConfigurationProperty where
  toJSON :: AutoRollbackConfigurationProperty -> Value
toJSON AutoRollbackConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: AutoRollbackConfigurationProperty -> ()
enabled :: AutoRollbackConfigurationProperty -> Maybe (Value Bool)
events :: AutoRollbackConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
events :: Maybe (ValueList 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 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
"Enabled" (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)
enabled,
               Key -> ValueList 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
"Events" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
events]))
instance Property "Enabled" AutoRollbackConfigurationProperty where
  type PropertyType "Enabled" AutoRollbackConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty
set PropertyType "Enabled" AutoRollbackConfigurationProperty
newValue AutoRollbackConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: AutoRollbackConfigurationProperty -> ()
enabled :: AutoRollbackConfigurationProperty -> Maybe (Value Bool)
events :: AutoRollbackConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
events :: Maybe (ValueList Text)
..}
    = AutoRollbackConfigurationProperty
        {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" AutoRollbackConfigurationProperty
Value Bool
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
events :: Maybe (ValueList Text)
haddock_workaround_ :: ()
events :: Maybe (ValueList Text)
..}
instance Property "Events" AutoRollbackConfigurationProperty where
  type PropertyType "Events" AutoRollbackConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "Events" AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty
-> AutoRollbackConfigurationProperty
set PropertyType "Events" AutoRollbackConfigurationProperty
newValue AutoRollbackConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: AutoRollbackConfigurationProperty -> ()
enabled :: AutoRollbackConfigurationProperty -> Maybe (Value Bool)
events :: AutoRollbackConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
events :: Maybe (ValueList Text)
..}
    = AutoRollbackConfigurationProperty
        {events :: Maybe (ValueList Text)
events = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Events" AutoRollbackConfigurationProperty
ValueList Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}