module Stratosphere.GuardDuty.Filter (
module Exports, Filter(..), mkFilter
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.GuardDuty.Filter.FindingCriteriaProperty as Exports
import {-# SOURCE #-} Stratosphere.GuardDuty.Filter.TagItemProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Filter
=
Filter {Filter -> ()
haddock_workaround_ :: (),
Filter -> Maybe (Value Text)
action :: (Prelude.Maybe (Value Prelude.Text)),
Filter -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Filter -> Value Text
detectorId :: (Value Prelude.Text),
Filter -> FindingCriteriaProperty
findingCriteria :: FindingCriteriaProperty,
Filter -> Value Text
name :: (Value Prelude.Text),
Filter -> Maybe (Value Integer)
rank :: (Prelude.Maybe (Value Prelude.Integer)),
Filter -> Maybe [TagItemProperty]
tags :: (Prelude.Maybe [TagItemProperty])}
deriving stock (Filter -> Filter -> Bool
(Filter -> Filter -> Bool)
-> (Filter -> Filter -> Bool) -> Eq Filter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Filter -> Filter -> Bool
== :: Filter -> Filter -> Bool
$c/= :: Filter -> Filter -> Bool
/= :: Filter -> Filter -> Bool
Prelude.Eq, Int -> Filter -> ShowS
[Filter] -> ShowS
Filter -> String
(Int -> Filter -> ShowS)
-> (Filter -> String) -> ([Filter] -> ShowS) -> Show Filter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Filter -> ShowS
showsPrec :: Int -> Filter -> ShowS
$cshow :: Filter -> String
show :: Filter -> String
$cshowList :: [Filter] -> ShowS
showList :: [Filter] -> ShowS
Prelude.Show)
mkFilter ::
Value Prelude.Text
-> FindingCriteriaProperty -> Value Prelude.Text -> Filter
mkFilter :: Value Text -> FindingCriteriaProperty -> Value Text -> Filter
mkFilter Value Text
detectorId FindingCriteriaProperty
findingCriteria Value Text
name
= Filter
{haddock_workaround_ :: ()
haddock_workaround_ = (), detectorId :: Value Text
detectorId = Value Text
detectorId,
findingCriteria :: FindingCriteriaProperty
findingCriteria = FindingCriteriaProperty
findingCriteria, name :: Value Text
name = Value Text
name,
action :: Maybe (Value Text)
action = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
rank :: Maybe (Value Integer)
rank = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [TagItemProperty]
tags = Maybe [TagItemProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Filter where
toResourceProperties :: Filter -> ResourceProperties
toResourceProperties Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GuardDuty::Filter", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"DetectorId" 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
detectorId,
Key
"FindingCriteria" Key -> FindingCriteriaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FindingCriteriaProperty
findingCriteria, Key
"Name" 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
name]
([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
"Action" (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)
action,
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
"Description" (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)
description,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Rank" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
rank,
Key -> [TagItemProperty] -> (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" ([TagItemProperty] -> (Key, Value))
-> Maybe [TagItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagItemProperty]
tags]))}
instance JSON.ToJSON Filter where
toJSON :: Filter -> Value
toJSON Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
= [(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
"DetectorId" 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
detectorId,
Key
"FindingCriteria" Key -> FindingCriteriaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= FindingCriteriaProperty
findingCriteria, Key
"Name" 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
name]
([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
"Action" (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)
action,
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
"Description" (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)
description,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Rank" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
rank,
Key -> [TagItemProperty] -> (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" ([TagItemProperty] -> (Key, Value))
-> Maybe [TagItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagItemProperty]
tags])))
instance Property "Action" Filter where
type PropertyType "Action" Filter = Value Prelude.Text
set :: PropertyType "Action" Filter -> Filter -> Filter
set PropertyType "Action" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
= Filter {action :: Maybe (Value Text)
action = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Action" Filter
Value Text
newValue, Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
instance Property "Description" Filter where
type PropertyType "Description" Filter = Value Prelude.Text
set :: PropertyType "Description" Filter -> Filter -> Filter
set PropertyType "Description" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
= Filter {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Filter
Value Text
newValue, Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
instance Property "DetectorId" Filter where
type PropertyType "DetectorId" Filter = Value Prelude.Text
set :: PropertyType "DetectorId" Filter -> Filter -> Filter
set PropertyType "DetectorId" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..} = Filter {detectorId :: Value Text
detectorId = PropertyType "DetectorId" Filter
Value Text
newValue, Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
instance Property "FindingCriteria" Filter where
type PropertyType "FindingCriteria" Filter = FindingCriteriaProperty
set :: PropertyType "FindingCriteria" Filter -> Filter -> Filter
set PropertyType "FindingCriteria" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..} = Filter {findingCriteria :: FindingCriteriaProperty
findingCriteria = PropertyType "FindingCriteria" Filter
FindingCriteriaProperty
newValue, Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
instance Property "Name" Filter where
type PropertyType "Name" Filter = Value Prelude.Text
set :: PropertyType "Name" Filter -> Filter -> Filter
set PropertyType "Name" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..} = Filter {name :: Value Text
name = PropertyType "Name" Filter
Value Text
newValue, Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
instance Property "Rank" Filter where
type PropertyType "Rank" Filter = Value Prelude.Integer
set :: PropertyType "Rank" Filter -> Filter -> Filter
set PropertyType "Rank" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
= Filter {rank :: Maybe (Value Integer)
rank = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Rank" Filter
Value Integer
newValue, Maybe [TagItemProperty]
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
tags :: Maybe [TagItemProperty]
..}
instance Property "Tags" Filter where
type PropertyType "Tags" Filter = [TagItemProperty]
set :: PropertyType "Tags" Filter -> Filter -> Filter
set PropertyType "Tags" Filter
newValue Filter {Maybe [TagItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: Filter -> ()
action :: Filter -> Maybe (Value Text)
description :: Filter -> Maybe (Value Text)
detectorId :: Filter -> Value Text
findingCriteria :: Filter -> FindingCriteriaProperty
name :: Filter -> Value Text
rank :: Filter -> Maybe (Value Integer)
tags :: Filter -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
tags :: Maybe [TagItemProperty]
..}
= Filter {tags :: Maybe [TagItemProperty]
tags = [TagItemProperty] -> Maybe [TagItemProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagItemProperty]
PropertyType "Tags" Filter
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
FindingCriteriaProperty
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
description :: Maybe (Value Text)
detectorId :: Value Text
findingCriteria :: FindingCriteriaProperty
name :: Value Text
rank :: Maybe (Value Integer)
..}