module Stratosphere.CodePipeline.Webhook.WebhookFilterRuleProperty (
        WebhookFilterRuleProperty(..), mkWebhookFilterRuleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WebhookFilterRuleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-webhook-webhookfilterrule.html>
    WebhookFilterRuleProperty {WebhookFilterRuleProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-webhook-webhookfilterrule.html#cfn-codepipeline-webhook-webhookfilterrule-jsonpath>
                               WebhookFilterRuleProperty -> Value Text
jsonPath :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-webhook-webhookfilterrule.html#cfn-codepipeline-webhook-webhookfilterrule-matchequals>
                               WebhookFilterRuleProperty -> Maybe (Value Text)
matchEquals :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool
(WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool)
-> (WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool)
-> Eq WebhookFilterRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool
== :: WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool
$c/= :: WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool
/= :: WebhookFilterRuleProperty -> WebhookFilterRuleProperty -> Bool
Prelude.Eq, Int -> WebhookFilterRuleProperty -> ShowS
[WebhookFilterRuleProperty] -> ShowS
WebhookFilterRuleProperty -> String
(Int -> WebhookFilterRuleProperty -> ShowS)
-> (WebhookFilterRuleProperty -> String)
-> ([WebhookFilterRuleProperty] -> ShowS)
-> Show WebhookFilterRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebhookFilterRuleProperty -> ShowS
showsPrec :: Int -> WebhookFilterRuleProperty -> ShowS
$cshow :: WebhookFilterRuleProperty -> String
show :: WebhookFilterRuleProperty -> String
$cshowList :: [WebhookFilterRuleProperty] -> ShowS
showList :: [WebhookFilterRuleProperty] -> ShowS
Prelude.Show)
mkWebhookFilterRuleProperty ::
  Value Prelude.Text -> WebhookFilterRuleProperty
mkWebhookFilterRuleProperty :: Value Text -> WebhookFilterRuleProperty
mkWebhookFilterRuleProperty Value Text
jsonPath
  = WebhookFilterRuleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), jsonPath :: Value Text
jsonPath = Value Text
jsonPath,
       matchEquals :: Maybe (Value Text)
matchEquals = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WebhookFilterRuleProperty where
  toResourceProperties :: WebhookFilterRuleProperty -> ResourceProperties
toResourceProperties WebhookFilterRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WebhookFilterRuleProperty -> ()
jsonPath :: WebhookFilterRuleProperty -> Value Text
matchEquals :: WebhookFilterRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
matchEquals :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodePipeline::Webhook.WebhookFilterRule",
         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
"JsonPath" 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
jsonPath]
                           ([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
"MatchEquals" (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)
matchEquals]))}
instance JSON.ToJSON WebhookFilterRuleProperty where
  toJSON :: WebhookFilterRuleProperty -> Value
toJSON WebhookFilterRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WebhookFilterRuleProperty -> ()
jsonPath :: WebhookFilterRuleProperty -> Value Text
matchEquals :: WebhookFilterRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
matchEquals :: Maybe (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
"JsonPath" 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
jsonPath]
              ([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
"MatchEquals" (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)
matchEquals])))
instance Property "JsonPath" WebhookFilterRuleProperty where
  type PropertyType "JsonPath" WebhookFilterRuleProperty = Value Prelude.Text
  set :: PropertyType "JsonPath" WebhookFilterRuleProperty
-> WebhookFilterRuleProperty -> WebhookFilterRuleProperty
set PropertyType "JsonPath" WebhookFilterRuleProperty
newValue WebhookFilterRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WebhookFilterRuleProperty -> ()
jsonPath :: WebhookFilterRuleProperty -> Value Text
matchEquals :: WebhookFilterRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
matchEquals :: Maybe (Value Text)
..}
    = WebhookFilterRuleProperty {jsonPath :: Value Text
jsonPath = PropertyType "JsonPath" WebhookFilterRuleProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
matchEquals :: Maybe (Value Text)
haddock_workaround_ :: ()
matchEquals :: Maybe (Value Text)
..}
instance Property "MatchEquals" WebhookFilterRuleProperty where
  type PropertyType "MatchEquals" WebhookFilterRuleProperty = Value Prelude.Text
  set :: PropertyType "MatchEquals" WebhookFilterRuleProperty
-> WebhookFilterRuleProperty -> WebhookFilterRuleProperty
set PropertyType "MatchEquals" WebhookFilterRuleProperty
newValue WebhookFilterRuleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WebhookFilterRuleProperty -> ()
jsonPath :: WebhookFilterRuleProperty -> Value Text
matchEquals :: WebhookFilterRuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
matchEquals :: Maybe (Value Text)
..}
    = WebhookFilterRuleProperty
        {matchEquals :: Maybe (Value Text)
matchEquals = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MatchEquals" WebhookFilterRuleProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
jsonPath :: Value Text
haddock_workaround_ :: ()
jsonPath :: Value Text
..}