module Stratosphere.CodePipeline.Pipeline.BeforeEntryConditionsProperty (
        module Exports, BeforeEntryConditionsProperty(..),
        mkBeforeEntryConditionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodePipeline.Pipeline.ConditionProperty as Exports
import Stratosphere.ResourceProperties
data BeforeEntryConditionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-beforeentryconditions.html>
    BeforeEntryConditionsProperty {BeforeEntryConditionsProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-beforeentryconditions.html#cfn-codepipeline-pipeline-beforeentryconditions-conditions>
                                   BeforeEntryConditionsProperty -> Maybe [ConditionProperty]
conditions :: (Prelude.Maybe [ConditionProperty])}
  deriving stock (BeforeEntryConditionsProperty
-> BeforeEntryConditionsProperty -> Bool
(BeforeEntryConditionsProperty
 -> BeforeEntryConditionsProperty -> Bool)
-> (BeforeEntryConditionsProperty
    -> BeforeEntryConditionsProperty -> Bool)
-> Eq BeforeEntryConditionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BeforeEntryConditionsProperty
-> BeforeEntryConditionsProperty -> Bool
== :: BeforeEntryConditionsProperty
-> BeforeEntryConditionsProperty -> Bool
$c/= :: BeforeEntryConditionsProperty
-> BeforeEntryConditionsProperty -> Bool
/= :: BeforeEntryConditionsProperty
-> BeforeEntryConditionsProperty -> Bool
Prelude.Eq, Int -> BeforeEntryConditionsProperty -> ShowS
[BeforeEntryConditionsProperty] -> ShowS
BeforeEntryConditionsProperty -> String
(Int -> BeforeEntryConditionsProperty -> ShowS)
-> (BeforeEntryConditionsProperty -> String)
-> ([BeforeEntryConditionsProperty] -> ShowS)
-> Show BeforeEntryConditionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BeforeEntryConditionsProperty -> ShowS
showsPrec :: Int -> BeforeEntryConditionsProperty -> ShowS
$cshow :: BeforeEntryConditionsProperty -> String
show :: BeforeEntryConditionsProperty -> String
$cshowList :: [BeforeEntryConditionsProperty] -> ShowS
showList :: [BeforeEntryConditionsProperty] -> ShowS
Prelude.Show)
mkBeforeEntryConditionsProperty :: BeforeEntryConditionsProperty
mkBeforeEntryConditionsProperty :: BeforeEntryConditionsProperty
mkBeforeEntryConditionsProperty
  = BeforeEntryConditionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), conditions :: Maybe [ConditionProperty]
conditions = Maybe [ConditionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BeforeEntryConditionsProperty where
  toResourceProperties :: BeforeEntryConditionsProperty -> ResourceProperties
toResourceProperties BeforeEntryConditionsProperty {Maybe [ConditionProperty]
()
haddock_workaround_ :: BeforeEntryConditionsProperty -> ()
conditions :: BeforeEntryConditionsProperty -> Maybe [ConditionProperty]
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodePipeline::Pipeline.BeforeEntryConditions",
         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 -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditions" ([ConditionProperty] -> (Key, Value))
-> Maybe [ConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionProperty]
conditions])}
instance JSON.ToJSON BeforeEntryConditionsProperty where
  toJSON :: BeforeEntryConditionsProperty -> Value
toJSON BeforeEntryConditionsProperty {Maybe [ConditionProperty]
()
haddock_workaround_ :: BeforeEntryConditionsProperty -> ()
conditions :: BeforeEntryConditionsProperty -> Maybe [ConditionProperty]
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
..}
    = [(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 -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditions" ([ConditionProperty] -> (Key, Value))
-> Maybe [ConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionProperty]
conditions]))
instance Property "Conditions" BeforeEntryConditionsProperty where
  type PropertyType "Conditions" BeforeEntryConditionsProperty = [ConditionProperty]
  set :: PropertyType "Conditions" BeforeEntryConditionsProperty
-> BeforeEntryConditionsProperty -> BeforeEntryConditionsProperty
set PropertyType "Conditions" BeforeEntryConditionsProperty
newValue BeforeEntryConditionsProperty {Maybe [ConditionProperty]
()
haddock_workaround_ :: BeforeEntryConditionsProperty -> ()
conditions :: BeforeEntryConditionsProperty -> Maybe [ConditionProperty]
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
..}
    = BeforeEntryConditionsProperty
        {conditions :: Maybe [ConditionProperty]
conditions = [ConditionProperty] -> Maybe [ConditionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConditionProperty]
PropertyType "Conditions" BeforeEntryConditionsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}