module Stratosphere.CodePipeline.Pipeline.SuccessConditionsProperty (
module Exports, SuccessConditionsProperty(..),
mkSuccessConditionsProperty
) 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 SuccessConditionsProperty
=
SuccessConditionsProperty {SuccessConditionsProperty -> ()
haddock_workaround_ :: (),
SuccessConditionsProperty -> Maybe [ConditionProperty]
conditions :: (Prelude.Maybe [ConditionProperty])}
deriving stock (SuccessConditionsProperty -> SuccessConditionsProperty -> Bool
(SuccessConditionsProperty -> SuccessConditionsProperty -> Bool)
-> (SuccessConditionsProperty -> SuccessConditionsProperty -> Bool)
-> Eq SuccessConditionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SuccessConditionsProperty -> SuccessConditionsProperty -> Bool
== :: SuccessConditionsProperty -> SuccessConditionsProperty -> Bool
$c/= :: SuccessConditionsProperty -> SuccessConditionsProperty -> Bool
/= :: SuccessConditionsProperty -> SuccessConditionsProperty -> Bool
Prelude.Eq, Int -> SuccessConditionsProperty -> ShowS
[SuccessConditionsProperty] -> ShowS
SuccessConditionsProperty -> String
(Int -> SuccessConditionsProperty -> ShowS)
-> (SuccessConditionsProperty -> String)
-> ([SuccessConditionsProperty] -> ShowS)
-> Show SuccessConditionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SuccessConditionsProperty -> ShowS
showsPrec :: Int -> SuccessConditionsProperty -> ShowS
$cshow :: SuccessConditionsProperty -> String
show :: SuccessConditionsProperty -> String
$cshowList :: [SuccessConditionsProperty] -> ShowS
showList :: [SuccessConditionsProperty] -> ShowS
Prelude.Show)
mkSuccessConditionsProperty :: SuccessConditionsProperty
mkSuccessConditionsProperty :: SuccessConditionsProperty
mkSuccessConditionsProperty
= SuccessConditionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), conditions :: Maybe [ConditionProperty]
conditions = Maybe [ConditionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SuccessConditionsProperty where
toResourceProperties :: SuccessConditionsProperty -> ResourceProperties
toResourceProperties SuccessConditionsProperty {Maybe [ConditionProperty]
()
haddock_workaround_ :: SuccessConditionsProperty -> ()
conditions :: SuccessConditionsProperty -> Maybe [ConditionProperty]
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodePipeline::Pipeline.SuccessConditions",
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 SuccessConditionsProperty where
toJSON :: SuccessConditionsProperty -> Value
toJSON SuccessConditionsProperty {Maybe [ConditionProperty]
()
haddock_workaround_ :: SuccessConditionsProperty -> ()
conditions :: SuccessConditionsProperty -> 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" SuccessConditionsProperty where
type PropertyType "Conditions" SuccessConditionsProperty = [ConditionProperty]
set :: PropertyType "Conditions" SuccessConditionsProperty
-> SuccessConditionsProperty -> SuccessConditionsProperty
set PropertyType "Conditions" SuccessConditionsProperty
newValue SuccessConditionsProperty {Maybe [ConditionProperty]
()
haddock_workaround_ :: SuccessConditionsProperty -> ()
conditions :: SuccessConditionsProperty -> Maybe [ConditionProperty]
haddock_workaround_ :: ()
conditions :: Maybe [ConditionProperty]
..}
= SuccessConditionsProperty
{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" SuccessConditionsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}