module Stratosphere.CodePipeline.Pipeline.ConditionProperty (
module Exports, ConditionProperty(..), mkConditionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodePipeline.Pipeline.RuleDeclarationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionProperty
=
ConditionProperty {ConditionProperty -> ()
haddock_workaround_ :: (),
ConditionProperty -> Maybe (Value Text)
result :: (Prelude.Maybe (Value Prelude.Text)),
ConditionProperty -> Maybe [RuleDeclarationProperty]
rules :: (Prelude.Maybe [RuleDeclarationProperty])}
deriving stock (ConditionProperty -> ConditionProperty -> Bool
(ConditionProperty -> ConditionProperty -> Bool)
-> (ConditionProperty -> ConditionProperty -> Bool)
-> Eq ConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionProperty -> ConditionProperty -> Bool
== :: ConditionProperty -> ConditionProperty -> Bool
$c/= :: ConditionProperty -> ConditionProperty -> Bool
/= :: ConditionProperty -> ConditionProperty -> Bool
Prelude.Eq, Int -> ConditionProperty -> ShowS
[ConditionProperty] -> ShowS
ConditionProperty -> String
(Int -> ConditionProperty -> ShowS)
-> (ConditionProperty -> String)
-> ([ConditionProperty] -> ShowS)
-> Show ConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionProperty -> ShowS
showsPrec :: Int -> ConditionProperty -> ShowS
$cshow :: ConditionProperty -> String
show :: ConditionProperty -> String
$cshowList :: [ConditionProperty] -> ShowS
showList :: [ConditionProperty] -> ShowS
Prelude.Show)
mkConditionProperty :: ConditionProperty
mkConditionProperty :: ConditionProperty
mkConditionProperty
= ConditionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), result :: Maybe (Value Text)
result = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
rules :: Maybe [RuleDeclarationProperty]
rules = Maybe [RuleDeclarationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionProperty where
toResourceProperties :: ConditionProperty -> ResourceProperties
toResourceProperties ConditionProperty {Maybe [RuleDeclarationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
result :: ConditionProperty -> Maybe (Value Text)
rules :: ConditionProperty -> Maybe [RuleDeclarationProperty]
haddock_workaround_ :: ()
result :: Maybe (Value Text)
rules :: Maybe [RuleDeclarationProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodePipeline::Pipeline.Condition",
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
"Result" (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)
result,
Key -> [RuleDeclarationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Rules" ([RuleDeclarationProperty] -> (Key, Value))
-> Maybe [RuleDeclarationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RuleDeclarationProperty]
rules])}
instance JSON.ToJSON ConditionProperty where
toJSON :: ConditionProperty -> Value
toJSON ConditionProperty {Maybe [RuleDeclarationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
result :: ConditionProperty -> Maybe (Value Text)
rules :: ConditionProperty -> Maybe [RuleDeclarationProperty]
haddock_workaround_ :: ()
result :: Maybe (Value Text)
rules :: Maybe [RuleDeclarationProperty]
..}
= [(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
"Result" (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)
result,
Key -> [RuleDeclarationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Rules" ([RuleDeclarationProperty] -> (Key, Value))
-> Maybe [RuleDeclarationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RuleDeclarationProperty]
rules]))
instance Property "Result" ConditionProperty where
type PropertyType "Result" ConditionProperty = Value Prelude.Text
set :: PropertyType "Result" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "Result" ConditionProperty
newValue ConditionProperty {Maybe [RuleDeclarationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
result :: ConditionProperty -> Maybe (Value Text)
rules :: ConditionProperty -> Maybe [RuleDeclarationProperty]
haddock_workaround_ :: ()
result :: Maybe (Value Text)
rules :: Maybe [RuleDeclarationProperty]
..}
= ConditionProperty {result :: Maybe (Value Text)
result = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Result" ConditionProperty
Value Text
newValue, Maybe [RuleDeclarationProperty]
()
haddock_workaround_ :: ()
rules :: Maybe [RuleDeclarationProperty]
haddock_workaround_ :: ()
rules :: Maybe [RuleDeclarationProperty]
..}
instance Property "Rules" ConditionProperty where
type PropertyType "Rules" ConditionProperty = [RuleDeclarationProperty]
set :: PropertyType "Rules" ConditionProperty
-> ConditionProperty -> ConditionProperty
set PropertyType "Rules" ConditionProperty
newValue ConditionProperty {Maybe [RuleDeclarationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ConditionProperty -> ()
result :: ConditionProperty -> Maybe (Value Text)
rules :: ConditionProperty -> Maybe [RuleDeclarationProperty]
haddock_workaround_ :: ()
result :: Maybe (Value Text)
rules :: Maybe [RuleDeclarationProperty]
..}
= ConditionProperty {rules :: Maybe [RuleDeclarationProperty]
rules = [RuleDeclarationProperty] -> Maybe [RuleDeclarationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [RuleDeclarationProperty]
PropertyType "Rules" ConditionProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
result :: Maybe (Value Text)
haddock_workaround_ :: ()
result :: Maybe (Value Text)
..}