module Stratosphere.GuardDuty.Filter.FindingCriteriaProperty (
        module Exports, FindingCriteriaProperty(..),
        mkFindingCriteriaProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.GuardDuty.Filter.ConditionProperty as Exports
import Stratosphere.ResourceProperties
data FindingCriteriaProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-filter-findingcriteria.html>
    FindingCriteriaProperty {FindingCriteriaProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-filter-findingcriteria.html#cfn-guardduty-filter-findingcriteria-criterion>
                             FindingCriteriaProperty -> Maybe (Map Text ConditionProperty)
criterion :: (Prelude.Maybe (Prelude.Map Prelude.Text ConditionProperty))}
  deriving stock (FindingCriteriaProperty -> FindingCriteriaProperty -> Bool
(FindingCriteriaProperty -> FindingCriteriaProperty -> Bool)
-> (FindingCriteriaProperty -> FindingCriteriaProperty -> Bool)
-> Eq FindingCriteriaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FindingCriteriaProperty -> FindingCriteriaProperty -> Bool
== :: FindingCriteriaProperty -> FindingCriteriaProperty -> Bool
$c/= :: FindingCriteriaProperty -> FindingCriteriaProperty -> Bool
/= :: FindingCriteriaProperty -> FindingCriteriaProperty -> Bool
Prelude.Eq, Int -> FindingCriteriaProperty -> ShowS
[FindingCriteriaProperty] -> ShowS
FindingCriteriaProperty -> String
(Int -> FindingCriteriaProperty -> ShowS)
-> (FindingCriteriaProperty -> String)
-> ([FindingCriteriaProperty] -> ShowS)
-> Show FindingCriteriaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FindingCriteriaProperty -> ShowS
showsPrec :: Int -> FindingCriteriaProperty -> ShowS
$cshow :: FindingCriteriaProperty -> String
show :: FindingCriteriaProperty -> String
$cshowList :: [FindingCriteriaProperty] -> ShowS
showList :: [FindingCriteriaProperty] -> ShowS
Prelude.Show)
mkFindingCriteriaProperty :: FindingCriteriaProperty
mkFindingCriteriaProperty :: FindingCriteriaProperty
mkFindingCriteriaProperty
  = FindingCriteriaProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), criterion :: Maybe (Map Text ConditionProperty)
criterion = Maybe (Map Text ConditionProperty)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FindingCriteriaProperty where
  toResourceProperties :: FindingCriteriaProperty -> ResourceProperties
toResourceProperties FindingCriteriaProperty {Maybe (Map Text ConditionProperty)
()
haddock_workaround_ :: FindingCriteriaProperty -> ()
criterion :: FindingCriteriaProperty -> Maybe (Map Text ConditionProperty)
haddock_workaround_ :: ()
criterion :: Maybe (Map Text ConditionProperty)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GuardDuty::Filter.FindingCriteria",
         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 -> Map Text ConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Criterion" (Map Text ConditionProperty -> (Key, Value))
-> Maybe (Map Text ConditionProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text ConditionProperty)
criterion])}
instance JSON.ToJSON FindingCriteriaProperty where
  toJSON :: FindingCriteriaProperty -> Value
toJSON FindingCriteriaProperty {Maybe (Map Text ConditionProperty)
()
haddock_workaround_ :: FindingCriteriaProperty -> ()
criterion :: FindingCriteriaProperty -> Maybe (Map Text ConditionProperty)
haddock_workaround_ :: ()
criterion :: Maybe (Map Text ConditionProperty)
..}
    = [(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 -> Map Text ConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Criterion" (Map Text ConditionProperty -> (Key, Value))
-> Maybe (Map Text ConditionProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text ConditionProperty)
criterion]))
instance Property "Criterion" FindingCriteriaProperty where
  type PropertyType "Criterion" FindingCriteriaProperty = Prelude.Map Prelude.Text ConditionProperty
  set :: PropertyType "Criterion" FindingCriteriaProperty
-> FindingCriteriaProperty -> FindingCriteriaProperty
set PropertyType "Criterion" FindingCriteriaProperty
newValue FindingCriteriaProperty {Maybe (Map Text ConditionProperty)
()
haddock_workaround_ :: FindingCriteriaProperty -> ()
criterion :: FindingCriteriaProperty -> Maybe (Map Text ConditionProperty)
haddock_workaround_ :: ()
criterion :: Maybe (Map Text ConditionProperty)
..}
    = FindingCriteriaProperty {criterion :: Maybe (Map Text ConditionProperty)
criterion = Map Text ConditionProperty -> Maybe (Map Text ConditionProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text ConditionProperty
PropertyType "Criterion" FindingCriteriaProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}