module Stratosphere.GuardDuty.Detector (
module Exports, Detector(..), mkDetector
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.GuardDuty.Detector.CFNDataSourceConfigurationsProperty as Exports
import {-# SOURCE #-} Stratosphere.GuardDuty.Detector.CFNFeatureConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.GuardDuty.Detector.TagItemProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Detector
=
Detector {Detector -> ()
haddock_workaround_ :: (),
Detector -> Maybe CFNDataSourceConfigurationsProperty
dataSources :: (Prelude.Maybe CFNDataSourceConfigurationsProperty),
Detector -> Value Bool
enable :: (Value Prelude.Bool),
Detector -> Maybe [CFNFeatureConfigurationProperty]
features :: (Prelude.Maybe [CFNFeatureConfigurationProperty]),
Detector -> Maybe (Value Text)
findingPublishingFrequency :: (Prelude.Maybe (Value Prelude.Text)),
Detector -> Maybe [TagItemProperty]
tags :: (Prelude.Maybe [TagItemProperty])}
deriving stock (Detector -> Detector -> Bool
(Detector -> Detector -> Bool)
-> (Detector -> Detector -> Bool) -> Eq Detector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Detector -> Detector -> Bool
== :: Detector -> Detector -> Bool
$c/= :: Detector -> Detector -> Bool
/= :: Detector -> Detector -> Bool
Prelude.Eq, Int -> Detector -> ShowS
[Detector] -> ShowS
Detector -> String
(Int -> Detector -> ShowS)
-> (Detector -> String) -> ([Detector] -> ShowS) -> Show Detector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Detector -> ShowS
showsPrec :: Int -> Detector -> ShowS
$cshow :: Detector -> String
show :: Detector -> String
$cshowList :: [Detector] -> ShowS
showList :: [Detector] -> ShowS
Prelude.Show)
mkDetector :: Value Prelude.Bool -> Detector
mkDetector :: Value Bool -> Detector
mkDetector Value Bool
enable
= Detector
{haddock_workaround_ :: ()
haddock_workaround_ = (), enable :: Value Bool
enable = Value Bool
enable,
dataSources :: Maybe CFNDataSourceConfigurationsProperty
dataSources = Maybe CFNDataSourceConfigurationsProperty
forall a. Maybe a
Prelude.Nothing, features :: Maybe [CFNFeatureConfigurationProperty]
features = Maybe [CFNFeatureConfigurationProperty]
forall a. Maybe a
Prelude.Nothing,
findingPublishingFrequency :: Maybe (Value Text)
findingPublishingFrequency = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [TagItemProperty]
tags = Maybe [TagItemProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Detector where
toResourceProperties :: Detector -> ResourceProperties
toResourceProperties Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GuardDuty::Detector", 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
"Enable" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
enable]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CFNDataSourceConfigurationsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataSources" (CFNDataSourceConfigurationsProperty -> (Key, Value))
-> Maybe CFNDataSourceConfigurationsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CFNDataSourceConfigurationsProperty
dataSources,
Key -> [CFNFeatureConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Features" ([CFNFeatureConfigurationProperty] -> (Key, Value))
-> Maybe [CFNFeatureConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CFNFeatureConfigurationProperty]
features,
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
"FindingPublishingFrequency"
(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)
findingPublishingFrequency,
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 Detector where
toJSON :: Detector -> Value
toJSON Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
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
"Enable" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
enable]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CFNDataSourceConfigurationsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataSources" (CFNDataSourceConfigurationsProperty -> (Key, Value))
-> Maybe CFNDataSourceConfigurationsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CFNDataSourceConfigurationsProperty
dataSources,
Key -> [CFNFeatureConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Features" ([CFNFeatureConfigurationProperty] -> (Key, Value))
-> Maybe [CFNFeatureConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CFNFeatureConfigurationProperty]
features,
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
"FindingPublishingFrequency"
(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)
findingPublishingFrequency,
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 "DataSources" Detector where
type PropertyType "DataSources" Detector = CFNDataSourceConfigurationsProperty
set :: PropertyType "DataSources" Detector -> Detector -> Detector
set PropertyType "DataSources" Detector
newValue Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
= Detector {dataSources :: Maybe CFNDataSourceConfigurationsProperty
dataSources = CFNDataSourceConfigurationsProperty
-> Maybe CFNDataSourceConfigurationsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DataSources" Detector
CFNDataSourceConfigurationsProperty
newValue, Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
instance Property "Enable" Detector where
type PropertyType "Enable" Detector = Value Prelude.Bool
set :: PropertyType "Enable" Detector -> Detector -> Detector
set PropertyType "Enable" Detector
newValue Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..} = Detector {enable :: Value Bool
enable = PropertyType "Enable" Detector
Value Bool
newValue, Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
instance Property "Features" Detector where
type PropertyType "Features" Detector = [CFNFeatureConfigurationProperty]
set :: PropertyType "Features" Detector -> Detector -> Detector
set PropertyType "Features" Detector
newValue Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
= Detector {features :: Maybe [CFNFeatureConfigurationProperty]
features = [CFNFeatureConfigurationProperty]
-> Maybe [CFNFeatureConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CFNFeatureConfigurationProperty]
PropertyType "Features" Detector
newValue, Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
instance Property "FindingPublishingFrequency" Detector where
type PropertyType "FindingPublishingFrequency" Detector = Value Prelude.Text
set :: PropertyType "FindingPublishingFrequency" Detector
-> Detector -> Detector
set PropertyType "FindingPublishingFrequency" Detector
newValue Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
= Detector {findingPublishingFrequency :: Maybe (Value Text)
findingPublishingFrequency = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FindingPublishingFrequency" Detector
Value Text
newValue, Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
tags :: Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
tags :: Maybe [TagItemProperty]
..}
instance Property "Tags" Detector where
type PropertyType "Tags" Detector = [TagItemProperty]
set :: PropertyType "Tags" Detector -> Detector -> Detector
set PropertyType "Tags" Detector
newValue Detector {Maybe [CFNFeatureConfigurationProperty]
Maybe [TagItemProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: Detector -> ()
dataSources :: Detector -> Maybe CFNDataSourceConfigurationsProperty
enable :: Detector -> Value Bool
features :: Detector -> Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Detector -> Maybe (Value Text)
tags :: Detector -> Maybe [TagItemProperty]
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
tags :: Maybe [TagItemProperty]
..}
= Detector {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" Detector
newValue, Maybe [CFNFeatureConfigurationProperty]
Maybe (Value Text)
Maybe CFNDataSourceConfigurationsProperty
()
Value Bool
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
haddock_workaround_ :: ()
dataSources :: Maybe CFNDataSourceConfigurationsProperty
enable :: Value Bool
features :: Maybe [CFNFeatureConfigurationProperty]
findingPublishingFrequency :: Maybe (Value Text)
..}