module Stratosphere.Pipes.Pipe.FilterProperty (
        FilterProperty(..), mkFilterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FilterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-filter.html>
    FilterProperty {FilterProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-filter.html#cfn-pipes-pipe-filter-pattern>
                    FilterProperty -> Maybe (Value Text)
pattern :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (FilterProperty -> FilterProperty -> Bool
(FilterProperty -> FilterProperty -> Bool)
-> (FilterProperty -> FilterProperty -> Bool) -> Eq FilterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FilterProperty -> FilterProperty -> Bool
== :: FilterProperty -> FilterProperty -> Bool
$c/= :: FilterProperty -> FilterProperty -> Bool
/= :: FilterProperty -> FilterProperty -> Bool
Prelude.Eq, Int -> FilterProperty -> ShowS
[FilterProperty] -> ShowS
FilterProperty -> String
(Int -> FilterProperty -> ShowS)
-> (FilterProperty -> String)
-> ([FilterProperty] -> ShowS)
-> Show FilterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FilterProperty -> ShowS
showsPrec :: Int -> FilterProperty -> ShowS
$cshow :: FilterProperty -> String
show :: FilterProperty -> String
$cshowList :: [FilterProperty] -> ShowS
showList :: [FilterProperty] -> ShowS
Prelude.Show)
mkFilterProperty :: FilterProperty
mkFilterProperty :: FilterProperty
mkFilterProperty
  = FilterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), pattern :: Maybe (Value Text)
pattern = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FilterProperty where
  toResourceProperties :: FilterProperty -> ResourceProperties
toResourceProperties FilterProperty {Maybe (Value Text)
()
haddock_workaround_ :: FilterProperty -> ()
pattern :: FilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
pattern :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pipes::Pipe.Filter", 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
"Pattern" (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)
pattern])}
instance JSON.ToJSON FilterProperty where
  toJSON :: FilterProperty -> Value
toJSON FilterProperty {Maybe (Value Text)
()
haddock_workaround_ :: FilterProperty -> ()
pattern :: FilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
pattern :: Maybe (Value Text)
..}
    = [(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
"Pattern" (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)
pattern]))
instance Property "Pattern" FilterProperty where
  type PropertyType "Pattern" FilterProperty = Value Prelude.Text
  set :: PropertyType "Pattern" FilterProperty
-> FilterProperty -> FilterProperty
set PropertyType "Pattern" FilterProperty
newValue FilterProperty {Maybe (Value Text)
()
haddock_workaround_ :: FilterProperty -> ()
pattern :: FilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
pattern :: Maybe (Value Text)
..}
    = FilterProperty {pattern :: Maybe (Value Text)
pattern = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Pattern" FilterProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}