module Stratosphere.CodePipeline.Pipeline.GitConfigurationProperty (
module Exports, GitConfigurationProperty(..),
mkGitConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodePipeline.Pipeline.GitPullRequestFilterProperty as Exports
import {-# SOURCE #-} Stratosphere.CodePipeline.Pipeline.GitPushFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GitConfigurationProperty
=
GitConfigurationProperty {GitConfigurationProperty -> ()
haddock_workaround_ :: (),
GitConfigurationProperty -> Maybe [GitPullRequestFilterProperty]
pullRequest :: (Prelude.Maybe [GitPullRequestFilterProperty]),
GitConfigurationProperty -> Maybe [GitPushFilterProperty]
push :: (Prelude.Maybe [GitPushFilterProperty]),
GitConfigurationProperty -> Value Text
sourceActionName :: (Value Prelude.Text)}
deriving stock (GitConfigurationProperty -> GitConfigurationProperty -> Bool
(GitConfigurationProperty -> GitConfigurationProperty -> Bool)
-> (GitConfigurationProperty -> GitConfigurationProperty -> Bool)
-> Eq GitConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GitConfigurationProperty -> GitConfigurationProperty -> Bool
== :: GitConfigurationProperty -> GitConfigurationProperty -> Bool
$c/= :: GitConfigurationProperty -> GitConfigurationProperty -> Bool
/= :: GitConfigurationProperty -> GitConfigurationProperty -> Bool
Prelude.Eq, Int -> GitConfigurationProperty -> ShowS
[GitConfigurationProperty] -> ShowS
GitConfigurationProperty -> String
(Int -> GitConfigurationProperty -> ShowS)
-> (GitConfigurationProperty -> String)
-> ([GitConfigurationProperty] -> ShowS)
-> Show GitConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GitConfigurationProperty -> ShowS
showsPrec :: Int -> GitConfigurationProperty -> ShowS
$cshow :: GitConfigurationProperty -> String
show :: GitConfigurationProperty -> String
$cshowList :: [GitConfigurationProperty] -> ShowS
showList :: [GitConfigurationProperty] -> ShowS
Prelude.Show)
mkGitConfigurationProperty ::
Value Prelude.Text -> GitConfigurationProperty
mkGitConfigurationProperty :: Value Text -> GitConfigurationProperty
mkGitConfigurationProperty Value Text
sourceActionName
= GitConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), sourceActionName :: Value Text
sourceActionName = Value Text
sourceActionName,
pullRequest :: Maybe [GitPullRequestFilterProperty]
pullRequest = Maybe [GitPullRequestFilterProperty]
forall a. Maybe a
Prelude.Nothing, push :: Maybe [GitPushFilterProperty]
push = Maybe [GitPushFilterProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GitConfigurationProperty where
toResourceProperties :: GitConfigurationProperty -> ResourceProperties
toResourceProperties GitConfigurationProperty {Maybe [GitPullRequestFilterProperty]
Maybe [GitPushFilterProperty]
()
Value Text
haddock_workaround_ :: GitConfigurationProperty -> ()
pullRequest :: GitConfigurationProperty -> Maybe [GitPullRequestFilterProperty]
push :: GitConfigurationProperty -> Maybe [GitPushFilterProperty]
sourceActionName :: GitConfigurationProperty -> Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodePipeline::Pipeline.GitConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"SourceActionName" 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..= Value Text
sourceActionName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [GitPullRequestFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PullRequest" ([GitPullRequestFilterProperty] -> (Key, Value))
-> Maybe [GitPullRequestFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GitPullRequestFilterProperty]
pullRequest,
Key -> [GitPushFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Push" ([GitPushFilterProperty] -> (Key, Value))
-> Maybe [GitPushFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GitPushFilterProperty]
push]))}
instance JSON.ToJSON GitConfigurationProperty where
toJSON :: GitConfigurationProperty -> Value
toJSON GitConfigurationProperty {Maybe [GitPullRequestFilterProperty]
Maybe [GitPushFilterProperty]
()
Value Text
haddock_workaround_ :: GitConfigurationProperty -> ()
pullRequest :: GitConfigurationProperty -> Maybe [GitPullRequestFilterProperty]
push :: GitConfigurationProperty -> Maybe [GitPushFilterProperty]
sourceActionName :: GitConfigurationProperty -> Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"SourceActionName" 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..= Value Text
sourceActionName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [GitPullRequestFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PullRequest" ([GitPullRequestFilterProperty] -> (Key, Value))
-> Maybe [GitPullRequestFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GitPullRequestFilterProperty]
pullRequest,
Key -> [GitPushFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Push" ([GitPushFilterProperty] -> (Key, Value))
-> Maybe [GitPushFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GitPushFilterProperty]
push])))
instance Property "PullRequest" GitConfigurationProperty where
type PropertyType "PullRequest" GitConfigurationProperty = [GitPullRequestFilterProperty]
set :: PropertyType "PullRequest" GitConfigurationProperty
-> GitConfigurationProperty -> GitConfigurationProperty
set PropertyType "PullRequest" GitConfigurationProperty
newValue GitConfigurationProperty {Maybe [GitPullRequestFilterProperty]
Maybe [GitPushFilterProperty]
()
Value Text
haddock_workaround_ :: GitConfigurationProperty -> ()
pullRequest :: GitConfigurationProperty -> Maybe [GitPullRequestFilterProperty]
push :: GitConfigurationProperty -> Maybe [GitPushFilterProperty]
sourceActionName :: GitConfigurationProperty -> Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
..}
= GitConfigurationProperty
{pullRequest :: Maybe [GitPullRequestFilterProperty]
pullRequest = [GitPullRequestFilterProperty]
-> Maybe [GitPullRequestFilterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [GitPullRequestFilterProperty]
PropertyType "PullRequest" GitConfigurationProperty
newValue, Maybe [GitPushFilterProperty]
()
Value Text
haddock_workaround_ :: ()
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
haddock_workaround_ :: ()
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
..}
instance Property "Push" GitConfigurationProperty where
type PropertyType "Push" GitConfigurationProperty = [GitPushFilterProperty]
set :: PropertyType "Push" GitConfigurationProperty
-> GitConfigurationProperty -> GitConfigurationProperty
set PropertyType "Push" GitConfigurationProperty
newValue GitConfigurationProperty {Maybe [GitPullRequestFilterProperty]
Maybe [GitPushFilterProperty]
()
Value Text
haddock_workaround_ :: GitConfigurationProperty -> ()
pullRequest :: GitConfigurationProperty -> Maybe [GitPullRequestFilterProperty]
push :: GitConfigurationProperty -> Maybe [GitPushFilterProperty]
sourceActionName :: GitConfigurationProperty -> Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
..}
= GitConfigurationProperty {push :: Maybe [GitPushFilterProperty]
push = [GitPushFilterProperty] -> Maybe [GitPushFilterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [GitPushFilterProperty]
PropertyType "Push" GitConfigurationProperty
newValue, Maybe [GitPullRequestFilterProperty]
()
Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
sourceActionName :: Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
sourceActionName :: Value Text
..}
instance Property "SourceActionName" GitConfigurationProperty where
type PropertyType "SourceActionName" GitConfigurationProperty = Value Prelude.Text
set :: PropertyType "SourceActionName" GitConfigurationProperty
-> GitConfigurationProperty -> GitConfigurationProperty
set PropertyType "SourceActionName" GitConfigurationProperty
newValue GitConfigurationProperty {Maybe [GitPullRequestFilterProperty]
Maybe [GitPushFilterProperty]
()
Value Text
haddock_workaround_ :: GitConfigurationProperty -> ()
pullRequest :: GitConfigurationProperty -> Maybe [GitPullRequestFilterProperty]
push :: GitConfigurationProperty -> Maybe [GitPushFilterProperty]
sourceActionName :: GitConfigurationProperty -> Value Text
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
sourceActionName :: Value Text
..}
= GitConfigurationProperty {sourceActionName :: Value Text
sourceActionName = PropertyType "SourceActionName" GitConfigurationProperty
Value Text
newValue, Maybe [GitPullRequestFilterProperty]
Maybe [GitPushFilterProperty]
()
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
haddock_workaround_ :: ()
pullRequest :: Maybe [GitPullRequestFilterProperty]
push :: Maybe [GitPushFilterProperty]
..}