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