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