{-# 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.AggregateComplianceByConfigRule where
import Amazonka.Config.Types.Compliance
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AggregateComplianceByConfigRule = AggregateComplianceByConfigRule'
{
AggregateComplianceByConfigRule -> Maybe Compliance
compliance :: Prelude.Maybe Compliance,
AggregateComplianceByConfigRule -> Maybe Text
configRuleName :: Prelude.Maybe Prelude.Text,
AggregateComplianceByConfigRule -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AggregateComplianceByConfigRule -> Maybe Text
awsRegion :: Prelude.Maybe Prelude.Text
}
deriving (AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool
(AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool)
-> (AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool)
-> Eq AggregateComplianceByConfigRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool
$c/= :: AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool
== :: AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool
$c== :: AggregateComplianceByConfigRule
-> AggregateComplianceByConfigRule -> Bool
Prelude.Eq, ReadPrec [AggregateComplianceByConfigRule]
ReadPrec AggregateComplianceByConfigRule
Int -> ReadS AggregateComplianceByConfigRule
ReadS [AggregateComplianceByConfigRule]
(Int -> ReadS AggregateComplianceByConfigRule)
-> ReadS [AggregateComplianceByConfigRule]
-> ReadPrec AggregateComplianceByConfigRule
-> ReadPrec [AggregateComplianceByConfigRule]
-> Read AggregateComplianceByConfigRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregateComplianceByConfigRule]
$creadListPrec :: ReadPrec [AggregateComplianceByConfigRule]
readPrec :: ReadPrec AggregateComplianceByConfigRule
$creadPrec :: ReadPrec AggregateComplianceByConfigRule
readList :: ReadS [AggregateComplianceByConfigRule]
$creadList :: ReadS [AggregateComplianceByConfigRule]
readsPrec :: Int -> ReadS AggregateComplianceByConfigRule
$creadsPrec :: Int -> ReadS AggregateComplianceByConfigRule
Prelude.Read, Int -> AggregateComplianceByConfigRule -> ShowS
[AggregateComplianceByConfigRule] -> ShowS
AggregateComplianceByConfigRule -> String
(Int -> AggregateComplianceByConfigRule -> ShowS)
-> (AggregateComplianceByConfigRule -> String)
-> ([AggregateComplianceByConfigRule] -> ShowS)
-> Show AggregateComplianceByConfigRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregateComplianceByConfigRule] -> ShowS
$cshowList :: [AggregateComplianceByConfigRule] -> ShowS
show :: AggregateComplianceByConfigRule -> String
$cshow :: AggregateComplianceByConfigRule -> String
showsPrec :: Int -> AggregateComplianceByConfigRule -> ShowS
$cshowsPrec :: Int -> AggregateComplianceByConfigRule -> ShowS
Prelude.Show, (forall x.
AggregateComplianceByConfigRule
-> Rep AggregateComplianceByConfigRule x)
-> (forall x.
Rep AggregateComplianceByConfigRule x
-> AggregateComplianceByConfigRule)
-> Generic AggregateComplianceByConfigRule
forall x.
Rep AggregateComplianceByConfigRule x
-> AggregateComplianceByConfigRule
forall x.
AggregateComplianceByConfigRule
-> Rep AggregateComplianceByConfigRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AggregateComplianceByConfigRule x
-> AggregateComplianceByConfigRule
$cfrom :: forall x.
AggregateComplianceByConfigRule
-> Rep AggregateComplianceByConfigRule x
Prelude.Generic)
newAggregateComplianceByConfigRule ::
AggregateComplianceByConfigRule
newAggregateComplianceByConfigRule :: AggregateComplianceByConfigRule
newAggregateComplianceByConfigRule =
AggregateComplianceByConfigRule' :: Maybe Compliance
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AggregateComplianceByConfigRule
AggregateComplianceByConfigRule'
{ $sel:compliance:AggregateComplianceByConfigRule' :: Maybe Compliance
compliance =
Maybe Compliance
forall a. Maybe a
Prelude.Nothing,
$sel:configRuleName:AggregateComplianceByConfigRule' :: Maybe Text
configRuleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:AggregateComplianceByConfigRule' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:awsRegion:AggregateComplianceByConfigRule' :: Maybe Text
awsRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aggregateComplianceByConfigRule_compliance :: Lens.Lens' AggregateComplianceByConfigRule (Prelude.Maybe Compliance)
aggregateComplianceByConfigRule_compliance :: (Maybe Compliance -> f (Maybe Compliance))
-> AggregateComplianceByConfigRule
-> f AggregateComplianceByConfigRule
aggregateComplianceByConfigRule_compliance = (AggregateComplianceByConfigRule -> Maybe Compliance)
-> (AggregateComplianceByConfigRule
-> Maybe Compliance -> AggregateComplianceByConfigRule)
-> Lens
AggregateComplianceByConfigRule
AggregateComplianceByConfigRule
(Maybe Compliance)
(Maybe Compliance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateComplianceByConfigRule' {Maybe Compliance
compliance :: Maybe Compliance
$sel:compliance:AggregateComplianceByConfigRule' :: AggregateComplianceByConfigRule -> Maybe Compliance
compliance} -> Maybe Compliance
compliance) (\s :: AggregateComplianceByConfigRule
s@AggregateComplianceByConfigRule' {} Maybe Compliance
a -> AggregateComplianceByConfigRule
s {$sel:compliance:AggregateComplianceByConfigRule' :: Maybe Compliance
compliance = Maybe Compliance
a} :: AggregateComplianceByConfigRule)
aggregateComplianceByConfigRule_configRuleName :: Lens.Lens' AggregateComplianceByConfigRule (Prelude.Maybe Prelude.Text)
aggregateComplianceByConfigRule_configRuleName :: (Maybe Text -> f (Maybe Text))
-> AggregateComplianceByConfigRule
-> f AggregateComplianceByConfigRule
aggregateComplianceByConfigRule_configRuleName = (AggregateComplianceByConfigRule -> Maybe Text)
-> (AggregateComplianceByConfigRule
-> Maybe Text -> AggregateComplianceByConfigRule)
-> Lens
AggregateComplianceByConfigRule
AggregateComplianceByConfigRule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateComplianceByConfigRule' {Maybe Text
configRuleName :: Maybe Text
$sel:configRuleName:AggregateComplianceByConfigRule' :: AggregateComplianceByConfigRule -> Maybe Text
configRuleName} -> Maybe Text
configRuleName) (\s :: AggregateComplianceByConfigRule
s@AggregateComplianceByConfigRule' {} Maybe Text
a -> AggregateComplianceByConfigRule
s {$sel:configRuleName:AggregateComplianceByConfigRule' :: Maybe Text
configRuleName = Maybe Text
a} :: AggregateComplianceByConfigRule)
aggregateComplianceByConfigRule_accountId :: Lens.Lens' AggregateComplianceByConfigRule (Prelude.Maybe Prelude.Text)
aggregateComplianceByConfigRule_accountId :: (Maybe Text -> f (Maybe Text))
-> AggregateComplianceByConfigRule
-> f AggregateComplianceByConfigRule
aggregateComplianceByConfigRule_accountId = (AggregateComplianceByConfigRule -> Maybe Text)
-> (AggregateComplianceByConfigRule
-> Maybe Text -> AggregateComplianceByConfigRule)
-> Lens
AggregateComplianceByConfigRule
AggregateComplianceByConfigRule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateComplianceByConfigRule' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AggregateComplianceByConfigRule' :: AggregateComplianceByConfigRule -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AggregateComplianceByConfigRule
s@AggregateComplianceByConfigRule' {} Maybe Text
a -> AggregateComplianceByConfigRule
s {$sel:accountId:AggregateComplianceByConfigRule' :: Maybe Text
accountId = Maybe Text
a} :: AggregateComplianceByConfigRule)
aggregateComplianceByConfigRule_awsRegion :: Lens.Lens' AggregateComplianceByConfigRule (Prelude.Maybe Prelude.Text)
aggregateComplianceByConfigRule_awsRegion :: (Maybe Text -> f (Maybe Text))
-> AggregateComplianceByConfigRule
-> f AggregateComplianceByConfigRule
aggregateComplianceByConfigRule_awsRegion = (AggregateComplianceByConfigRule -> Maybe Text)
-> (AggregateComplianceByConfigRule
-> Maybe Text -> AggregateComplianceByConfigRule)
-> Lens
AggregateComplianceByConfigRule
AggregateComplianceByConfigRule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateComplianceByConfigRule' {Maybe Text
awsRegion :: Maybe Text
$sel:awsRegion:AggregateComplianceByConfigRule' :: AggregateComplianceByConfigRule -> Maybe Text
awsRegion} -> Maybe Text
awsRegion) (\s :: AggregateComplianceByConfigRule
s@AggregateComplianceByConfigRule' {} Maybe Text
a -> AggregateComplianceByConfigRule
s {$sel:awsRegion:AggregateComplianceByConfigRule' :: Maybe Text
awsRegion = Maybe Text
a} :: AggregateComplianceByConfigRule)
instance
Core.FromJSON
AggregateComplianceByConfigRule
where
parseJSON :: Value -> Parser AggregateComplianceByConfigRule
parseJSON =
String
-> (Object -> Parser AggregateComplianceByConfigRule)
-> Value
-> Parser AggregateComplianceByConfigRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AggregateComplianceByConfigRule"
( \Object
x ->
Maybe Compliance
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AggregateComplianceByConfigRule
AggregateComplianceByConfigRule'
(Maybe Compliance
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AggregateComplianceByConfigRule)
-> Parser (Maybe Compliance)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> AggregateComplianceByConfigRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Compliance)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Compliance")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> AggregateComplianceByConfigRule)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> AggregateComplianceByConfigRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigRuleName")
Parser
(Maybe Text -> Maybe Text -> AggregateComplianceByConfigRule)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AggregateComplianceByConfigRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccountId")
Parser (Maybe Text -> AggregateComplianceByConfigRule)
-> Parser (Maybe Text) -> Parser AggregateComplianceByConfigRule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AwsRegion")
)
instance
Prelude.Hashable
AggregateComplianceByConfigRule
instance
Prelude.NFData
AggregateComplianceByConfigRule