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