{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Config.Types.ConfigRule where
import Amazonka.Config.Types.ConfigRuleState
import Amazonka.Config.Types.EvaluationModeConfiguration
import Amazonka.Config.Types.MaximumExecutionFrequency
import Amazonka.Config.Types.Scope
import Amazonka.Config.Types.Source
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ConfigRule = ConfigRule'
{
ConfigRule -> Maybe Text
configRuleArn :: Prelude.Maybe Prelude.Text,
ConfigRule -> Maybe Text
configRuleId :: Prelude.Maybe Prelude.Text,
ConfigRule -> Maybe Text
configRuleName :: Prelude.Maybe Prelude.Text,
ConfigRule -> Maybe ConfigRuleState
configRuleState :: Prelude.Maybe ConfigRuleState,
ConfigRule -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
ConfigRule -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ConfigRule -> Maybe [EvaluationModeConfiguration]
evaluationModes :: Prelude.Maybe [EvaluationModeConfiguration],
ConfigRule -> Maybe Text
inputParameters :: Prelude.Maybe Prelude.Text,
ConfigRule -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency :: Prelude.Maybe MaximumExecutionFrequency,
ConfigRule -> Maybe Scope
scope :: Prelude.Maybe Scope,
ConfigRule -> Source
source :: Source
}
deriving (ConfigRule -> ConfigRule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigRule -> ConfigRule -> Bool
$c/= :: ConfigRule -> ConfigRule -> Bool
== :: ConfigRule -> ConfigRule -> Bool
$c== :: ConfigRule -> ConfigRule -> Bool
Prelude.Eq, ReadPrec [ConfigRule]
ReadPrec ConfigRule
Int -> ReadS ConfigRule
ReadS [ConfigRule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigRule]
$creadListPrec :: ReadPrec [ConfigRule]
readPrec :: ReadPrec ConfigRule
$creadPrec :: ReadPrec ConfigRule
readList :: ReadS [ConfigRule]
$creadList :: ReadS [ConfigRule]
readsPrec :: Int -> ReadS ConfigRule
$creadsPrec :: Int -> ReadS ConfigRule
Prelude.Read, Int -> ConfigRule -> ShowS
[ConfigRule] -> ShowS
ConfigRule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigRule] -> ShowS
$cshowList :: [ConfigRule] -> ShowS
show :: ConfigRule -> String
$cshow :: ConfigRule -> String
showsPrec :: Int -> ConfigRule -> ShowS
$cshowsPrec :: Int -> ConfigRule -> ShowS
Prelude.Show, forall x. Rep ConfigRule x -> ConfigRule
forall x. ConfigRule -> Rep ConfigRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigRule x -> ConfigRule
$cfrom :: forall x. ConfigRule -> Rep ConfigRule x
Prelude.Generic)
newConfigRule ::
Source ->
ConfigRule
newConfigRule :: Source -> ConfigRule
newConfigRule Source
pSource_ =
ConfigRule'
{ $sel:configRuleArn:ConfigRule' :: Maybe Text
configRuleArn = forall a. Maybe a
Prelude.Nothing,
$sel:configRuleId:ConfigRule' :: Maybe Text
configRuleId = forall a. Maybe a
Prelude.Nothing,
$sel:configRuleName:ConfigRule' :: Maybe Text
configRuleName = forall a. Maybe a
Prelude.Nothing,
$sel:configRuleState:ConfigRule' :: Maybe ConfigRuleState
configRuleState = forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:ConfigRule' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
$sel:description:ConfigRule' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:evaluationModes:ConfigRule' :: Maybe [EvaluationModeConfiguration]
evaluationModes = forall a. Maybe a
Prelude.Nothing,
$sel:inputParameters:ConfigRule' :: Maybe Text
inputParameters = forall a. Maybe a
Prelude.Nothing,
$sel:maximumExecutionFrequency:ConfigRule' :: Maybe MaximumExecutionFrequency
maximumExecutionFrequency = forall a. Maybe a
Prelude.Nothing,
$sel:scope:ConfigRule' :: Maybe Scope
scope = forall a. Maybe a
Prelude.Nothing,
$sel:source:ConfigRule' :: Source
source = Source
pSource_
}
configRule_configRuleArn :: Lens.Lens' ConfigRule (Prelude.Maybe Prelude.Text)
configRule_configRuleArn :: Lens' ConfigRule (Maybe Text)
configRule_configRuleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Text
configRuleArn :: Maybe Text
$sel:configRuleArn:ConfigRule' :: ConfigRule -> Maybe Text
configRuleArn} -> Maybe Text
configRuleArn) (\s :: ConfigRule
s@ConfigRule' {} Maybe Text
a -> ConfigRule
s {$sel:configRuleArn:ConfigRule' :: Maybe Text
configRuleArn = Maybe Text
a} :: ConfigRule)
configRule_configRuleId :: Lens.Lens' ConfigRule (Prelude.Maybe Prelude.Text)
configRule_configRuleId :: Lens' ConfigRule (Maybe Text)
configRule_configRuleId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Text
configRuleId :: Maybe Text
$sel:configRuleId:ConfigRule' :: ConfigRule -> Maybe Text
configRuleId} -> Maybe Text
configRuleId) (\s :: ConfigRule
s@ConfigRule' {} Maybe Text
a -> ConfigRule
s {$sel:configRuleId:ConfigRule' :: Maybe Text
configRuleId = Maybe Text
a} :: ConfigRule)
configRule_configRuleName :: Lens.Lens' ConfigRule (Prelude.Maybe Prelude.Text)
configRule_configRuleName :: Lens' ConfigRule (Maybe Text)
configRule_configRuleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Text
configRuleName :: Maybe Text
$sel:configRuleName:ConfigRule' :: ConfigRule -> Maybe Text
configRuleName} -> Maybe Text
configRuleName) (\s :: ConfigRule
s@ConfigRule' {} Maybe Text
a -> ConfigRule
s {$sel:configRuleName:ConfigRule' :: Maybe Text
configRuleName = Maybe Text
a} :: ConfigRule)
configRule_configRuleState :: Lens.Lens' ConfigRule (Prelude.Maybe ConfigRuleState)
configRule_configRuleState :: Lens' ConfigRule (Maybe ConfigRuleState)
configRule_configRuleState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe ConfigRuleState
configRuleState :: Maybe ConfigRuleState
$sel:configRuleState:ConfigRule' :: ConfigRule -> Maybe ConfigRuleState
configRuleState} -> Maybe ConfigRuleState
configRuleState) (\s :: ConfigRule
s@ConfigRule' {} Maybe ConfigRuleState
a -> ConfigRule
s {$sel:configRuleState:ConfigRule' :: Maybe ConfigRuleState
configRuleState = Maybe ConfigRuleState
a} :: ConfigRule)
configRule_createdBy :: Lens.Lens' ConfigRule (Prelude.Maybe Prelude.Text)
configRule_createdBy :: Lens' ConfigRule (Maybe Text)
configRule_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:ConfigRule' :: ConfigRule -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: ConfigRule
s@ConfigRule' {} Maybe Text
a -> ConfigRule
s {$sel:createdBy:ConfigRule' :: Maybe Text
createdBy = Maybe Text
a} :: ConfigRule)
configRule_description :: Lens.Lens' ConfigRule (Prelude.Maybe Prelude.Text)
configRule_description :: Lens' ConfigRule (Maybe Text)
configRule_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Text
description :: Maybe Text
$sel:description:ConfigRule' :: ConfigRule -> Maybe Text
description} -> Maybe Text
description) (\s :: ConfigRule
s@ConfigRule' {} Maybe Text
a -> ConfigRule
s {$sel:description:ConfigRule' :: Maybe Text
description = Maybe Text
a} :: ConfigRule)
configRule_evaluationModes :: Lens.Lens' ConfigRule (Prelude.Maybe [EvaluationModeConfiguration])
configRule_evaluationModes :: Lens' ConfigRule (Maybe [EvaluationModeConfiguration])
configRule_evaluationModes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe [EvaluationModeConfiguration]
evaluationModes :: Maybe [EvaluationModeConfiguration]
$sel:evaluationModes:ConfigRule' :: ConfigRule -> Maybe [EvaluationModeConfiguration]
evaluationModes} -> Maybe [EvaluationModeConfiguration]
evaluationModes) (\s :: ConfigRule
s@ConfigRule' {} Maybe [EvaluationModeConfiguration]
a -> ConfigRule
s {$sel:evaluationModes:ConfigRule' :: Maybe [EvaluationModeConfiguration]
evaluationModes = Maybe [EvaluationModeConfiguration]
a} :: ConfigRule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
configRule_inputParameters :: Lens.Lens' ConfigRule (Prelude.Maybe Prelude.Text)
configRule_inputParameters :: Lens' ConfigRule (Maybe Text)
configRule_inputParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Text
inputParameters :: Maybe Text
$sel:inputParameters:ConfigRule' :: ConfigRule -> Maybe Text
inputParameters} -> Maybe Text
inputParameters) (\s :: ConfigRule
s@ConfigRule' {} Maybe Text
a -> ConfigRule
s {$sel:inputParameters:ConfigRule' :: Maybe Text
inputParameters = Maybe Text
a} :: ConfigRule)
configRule_maximumExecutionFrequency :: Lens.Lens' ConfigRule (Prelude.Maybe MaximumExecutionFrequency)
configRule_maximumExecutionFrequency :: Lens' ConfigRule (Maybe MaximumExecutionFrequency)
configRule_maximumExecutionFrequency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe MaximumExecutionFrequency
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
$sel:maximumExecutionFrequency:ConfigRule' :: ConfigRule -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency} -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency) (\s :: ConfigRule
s@ConfigRule' {} Maybe MaximumExecutionFrequency
a -> ConfigRule
s {$sel:maximumExecutionFrequency:ConfigRule' :: Maybe MaximumExecutionFrequency
maximumExecutionFrequency = Maybe MaximumExecutionFrequency
a} :: ConfigRule)
configRule_scope :: Lens.Lens' ConfigRule (Prelude.Maybe Scope)
configRule_scope :: Lens' ConfigRule (Maybe Scope)
configRule_scope = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Maybe Scope
scope :: Maybe Scope
$sel:scope:ConfigRule' :: ConfigRule -> Maybe Scope
scope} -> Maybe Scope
scope) (\s :: ConfigRule
s@ConfigRule' {} Maybe Scope
a -> ConfigRule
s {$sel:scope:ConfigRule' :: Maybe Scope
scope = Maybe Scope
a} :: ConfigRule)
configRule_source :: Lens.Lens' ConfigRule Source
configRule_source :: Lens' ConfigRule Source
configRule_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigRule' {Source
source :: Source
$sel:source:ConfigRule' :: ConfigRule -> Source
source} -> Source
source) (\s :: ConfigRule
s@ConfigRule' {} Source
a -> ConfigRule
s {$sel:source:ConfigRule' :: Source
source = Source
a} :: ConfigRule)
instance Data.FromJSON ConfigRule where
parseJSON :: Value -> Parser ConfigRule
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConfigRule"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConfigRuleState
-> Maybe Text
-> Maybe Text
-> Maybe [EvaluationModeConfiguration]
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Scope
-> Source
-> ConfigRule
ConfigRule'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConfigRuleArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConfigRuleId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConfigRuleName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConfigRuleState")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedBy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EvaluationModes"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InputParameters")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaximumExecutionFrequency")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Scope")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Source")
)
instance Prelude.Hashable ConfigRule where
hashWithSalt :: Int -> ConfigRule -> Int
hashWithSalt Int
_salt ConfigRule' {Maybe [EvaluationModeConfiguration]
Maybe Text
Maybe ConfigRuleState
Maybe MaximumExecutionFrequency
Maybe Scope
Source
source :: Source
scope :: Maybe Scope
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
inputParameters :: Maybe Text
evaluationModes :: Maybe [EvaluationModeConfiguration]
description :: Maybe Text
createdBy :: Maybe Text
configRuleState :: Maybe ConfigRuleState
configRuleName :: Maybe Text
configRuleId :: Maybe Text
configRuleArn :: Maybe Text
$sel:source:ConfigRule' :: ConfigRule -> Source
$sel:scope:ConfigRule' :: ConfigRule -> Maybe Scope
$sel:maximumExecutionFrequency:ConfigRule' :: ConfigRule -> Maybe MaximumExecutionFrequency
$sel:inputParameters:ConfigRule' :: ConfigRule -> Maybe Text
$sel:evaluationModes:ConfigRule' :: ConfigRule -> Maybe [EvaluationModeConfiguration]
$sel:description:ConfigRule' :: ConfigRule -> Maybe Text
$sel:createdBy:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleState:ConfigRule' :: ConfigRule -> Maybe ConfigRuleState
$sel:configRuleName:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleId:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleArn:ConfigRule' :: ConfigRule -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configRuleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configRuleId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configRuleName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigRuleState
configRuleState
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [EvaluationModeConfiguration]
evaluationModes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
inputParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaximumExecutionFrequency
maximumExecutionFrequency
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Scope
scope
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Source
source
instance Prelude.NFData ConfigRule where
rnf :: ConfigRule -> ()
rnf ConfigRule' {Maybe [EvaluationModeConfiguration]
Maybe Text
Maybe ConfigRuleState
Maybe MaximumExecutionFrequency
Maybe Scope
Source
source :: Source
scope :: Maybe Scope
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
inputParameters :: Maybe Text
evaluationModes :: Maybe [EvaluationModeConfiguration]
description :: Maybe Text
createdBy :: Maybe Text
configRuleState :: Maybe ConfigRuleState
configRuleName :: Maybe Text
configRuleId :: Maybe Text
configRuleArn :: Maybe Text
$sel:source:ConfigRule' :: ConfigRule -> Source
$sel:scope:ConfigRule' :: ConfigRule -> Maybe Scope
$sel:maximumExecutionFrequency:ConfigRule' :: ConfigRule -> Maybe MaximumExecutionFrequency
$sel:inputParameters:ConfigRule' :: ConfigRule -> Maybe Text
$sel:evaluationModes:ConfigRule' :: ConfigRule -> Maybe [EvaluationModeConfiguration]
$sel:description:ConfigRule' :: ConfigRule -> Maybe Text
$sel:createdBy:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleState:ConfigRule' :: ConfigRule -> Maybe ConfigRuleState
$sel:configRuleName:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleId:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleArn:ConfigRule' :: ConfigRule -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configRuleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configRuleId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configRuleName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigRuleState
configRuleState
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [EvaluationModeConfiguration]
evaluationModes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaximumExecutionFrequency
maximumExecutionFrequency
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Scope
scope
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Source
source
instance Data.ToJSON ConfigRule where
toJSON :: ConfigRule -> Value
toJSON ConfigRule' {Maybe [EvaluationModeConfiguration]
Maybe Text
Maybe ConfigRuleState
Maybe MaximumExecutionFrequency
Maybe Scope
Source
source :: Source
scope :: Maybe Scope
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
inputParameters :: Maybe Text
evaluationModes :: Maybe [EvaluationModeConfiguration]
description :: Maybe Text
createdBy :: Maybe Text
configRuleState :: Maybe ConfigRuleState
configRuleName :: Maybe Text
configRuleId :: Maybe Text
configRuleArn :: Maybe Text
$sel:source:ConfigRule' :: ConfigRule -> Source
$sel:scope:ConfigRule' :: ConfigRule -> Maybe Scope
$sel:maximumExecutionFrequency:ConfigRule' :: ConfigRule -> Maybe MaximumExecutionFrequency
$sel:inputParameters:ConfigRule' :: ConfigRule -> Maybe Text
$sel:evaluationModes:ConfigRule' :: ConfigRule -> Maybe [EvaluationModeConfiguration]
$sel:description:ConfigRule' :: ConfigRule -> Maybe Text
$sel:createdBy:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleState:ConfigRule' :: ConfigRule -> Maybe ConfigRuleState
$sel:configRuleName:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleId:ConfigRule' :: ConfigRule -> Maybe Text
$sel:configRuleArn:ConfigRule' :: ConfigRule -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ConfigRuleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
configRuleArn,
(Key
"ConfigRuleId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
configRuleId,
(Key
"ConfigRuleName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
configRuleName,
(Key
"ConfigRuleState" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConfigRuleState
configRuleState,
(Key
"CreatedBy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
createdBy,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"EvaluationModes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EvaluationModeConfiguration]
evaluationModes,
(Key
"InputParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
inputParameters,
(Key
"MaximumExecutionFrequency" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaximumExecutionFrequency
maximumExecutionFrequency,
(Key
"Scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scope
scope,
forall a. a -> Maybe a
Prelude.Just (Key
"Source" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Source
source)
]
)