{-# 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.AggregateConformancePackCompliance where
import Amazonka.Config.Types.ConformancePackComplianceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AggregateConformancePackCompliance = AggregateConformancePackCompliance'
{
AggregateConformancePackCompliance -> Maybe Int
totalRuleCount :: Prelude.Maybe Prelude.Int,
AggregateConformancePackCompliance -> Maybe Int
compliantRuleCount :: Prelude.Maybe Prelude.Int,
AggregateConformancePackCompliance -> Maybe Int
nonCompliantRuleCount :: Prelude.Maybe Prelude.Int,
AggregateConformancePackCompliance
-> Maybe ConformancePackComplianceType
complianceType :: Prelude.Maybe ConformancePackComplianceType
}
deriving (AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool
(AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool)
-> (AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool)
-> Eq AggregateConformancePackCompliance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool
$c/= :: AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool
== :: AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool
$c== :: AggregateConformancePackCompliance
-> AggregateConformancePackCompliance -> Bool
Prelude.Eq, ReadPrec [AggregateConformancePackCompliance]
ReadPrec AggregateConformancePackCompliance
Int -> ReadS AggregateConformancePackCompliance
ReadS [AggregateConformancePackCompliance]
(Int -> ReadS AggregateConformancePackCompliance)
-> ReadS [AggregateConformancePackCompliance]
-> ReadPrec AggregateConformancePackCompliance
-> ReadPrec [AggregateConformancePackCompliance]
-> Read AggregateConformancePackCompliance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregateConformancePackCompliance]
$creadListPrec :: ReadPrec [AggregateConformancePackCompliance]
readPrec :: ReadPrec AggregateConformancePackCompliance
$creadPrec :: ReadPrec AggregateConformancePackCompliance
readList :: ReadS [AggregateConformancePackCompliance]
$creadList :: ReadS [AggregateConformancePackCompliance]
readsPrec :: Int -> ReadS AggregateConformancePackCompliance
$creadsPrec :: Int -> ReadS AggregateConformancePackCompliance
Prelude.Read, Int -> AggregateConformancePackCompliance -> ShowS
[AggregateConformancePackCompliance] -> ShowS
AggregateConformancePackCompliance -> String
(Int -> AggregateConformancePackCompliance -> ShowS)
-> (AggregateConformancePackCompliance -> String)
-> ([AggregateConformancePackCompliance] -> ShowS)
-> Show AggregateConformancePackCompliance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregateConformancePackCompliance] -> ShowS
$cshowList :: [AggregateConformancePackCompliance] -> ShowS
show :: AggregateConformancePackCompliance -> String
$cshow :: AggregateConformancePackCompliance -> String
showsPrec :: Int -> AggregateConformancePackCompliance -> ShowS
$cshowsPrec :: Int -> AggregateConformancePackCompliance -> ShowS
Prelude.Show, (forall x.
AggregateConformancePackCompliance
-> Rep AggregateConformancePackCompliance x)
-> (forall x.
Rep AggregateConformancePackCompliance x
-> AggregateConformancePackCompliance)
-> Generic AggregateConformancePackCompliance
forall x.
Rep AggregateConformancePackCompliance x
-> AggregateConformancePackCompliance
forall x.
AggregateConformancePackCompliance
-> Rep AggregateConformancePackCompliance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AggregateConformancePackCompliance x
-> AggregateConformancePackCompliance
$cfrom :: forall x.
AggregateConformancePackCompliance
-> Rep AggregateConformancePackCompliance x
Prelude.Generic)
newAggregateConformancePackCompliance ::
AggregateConformancePackCompliance
newAggregateConformancePackCompliance :: AggregateConformancePackCompliance
newAggregateConformancePackCompliance =
AggregateConformancePackCompliance' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance
AggregateConformancePackCompliance'
{ $sel:totalRuleCount:AggregateConformancePackCompliance' :: Maybe Int
totalRuleCount =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:compliantRuleCount:AggregateConformancePackCompliance' :: Maybe Int
compliantRuleCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:nonCompliantRuleCount:AggregateConformancePackCompliance' :: Maybe Int
nonCompliantRuleCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:complianceType:AggregateConformancePackCompliance' :: Maybe ConformancePackComplianceType
complianceType = Maybe ConformancePackComplianceType
forall a. Maybe a
Prelude.Nothing
}
aggregateConformancePackCompliance_totalRuleCount :: Lens.Lens' AggregateConformancePackCompliance (Prelude.Maybe Prelude.Int)
aggregateConformancePackCompliance_totalRuleCount :: (Maybe Int -> f (Maybe Int))
-> AggregateConformancePackCompliance
-> f AggregateConformancePackCompliance
aggregateConformancePackCompliance_totalRuleCount = (AggregateConformancePackCompliance -> Maybe Int)
-> (AggregateConformancePackCompliance
-> Maybe Int -> AggregateConformancePackCompliance)
-> Lens
AggregateConformancePackCompliance
AggregateConformancePackCompliance
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateConformancePackCompliance' {Maybe Int
totalRuleCount :: Maybe Int
$sel:totalRuleCount:AggregateConformancePackCompliance' :: AggregateConformancePackCompliance -> Maybe Int
totalRuleCount} -> Maybe Int
totalRuleCount) (\s :: AggregateConformancePackCompliance
s@AggregateConformancePackCompliance' {} Maybe Int
a -> AggregateConformancePackCompliance
s {$sel:totalRuleCount:AggregateConformancePackCompliance' :: Maybe Int
totalRuleCount = Maybe Int
a} :: AggregateConformancePackCompliance)
aggregateConformancePackCompliance_compliantRuleCount :: Lens.Lens' AggregateConformancePackCompliance (Prelude.Maybe Prelude.Int)
aggregateConformancePackCompliance_compliantRuleCount :: (Maybe Int -> f (Maybe Int))
-> AggregateConformancePackCompliance
-> f AggregateConformancePackCompliance
aggregateConformancePackCompliance_compliantRuleCount = (AggregateConformancePackCompliance -> Maybe Int)
-> (AggregateConformancePackCompliance
-> Maybe Int -> AggregateConformancePackCompliance)
-> Lens
AggregateConformancePackCompliance
AggregateConformancePackCompliance
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateConformancePackCompliance' {Maybe Int
compliantRuleCount :: Maybe Int
$sel:compliantRuleCount:AggregateConformancePackCompliance' :: AggregateConformancePackCompliance -> Maybe Int
compliantRuleCount} -> Maybe Int
compliantRuleCount) (\s :: AggregateConformancePackCompliance
s@AggregateConformancePackCompliance' {} Maybe Int
a -> AggregateConformancePackCompliance
s {$sel:compliantRuleCount:AggregateConformancePackCompliance' :: Maybe Int
compliantRuleCount = Maybe Int
a} :: AggregateConformancePackCompliance)
aggregateConformancePackCompliance_nonCompliantRuleCount :: Lens.Lens' AggregateConformancePackCompliance (Prelude.Maybe Prelude.Int)
aggregateConformancePackCompliance_nonCompliantRuleCount :: (Maybe Int -> f (Maybe Int))
-> AggregateConformancePackCompliance
-> f AggregateConformancePackCompliance
aggregateConformancePackCompliance_nonCompliantRuleCount = (AggregateConformancePackCompliance -> Maybe Int)
-> (AggregateConformancePackCompliance
-> Maybe Int -> AggregateConformancePackCompliance)
-> Lens
AggregateConformancePackCompliance
AggregateConformancePackCompliance
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateConformancePackCompliance' {Maybe Int
nonCompliantRuleCount :: Maybe Int
$sel:nonCompliantRuleCount:AggregateConformancePackCompliance' :: AggregateConformancePackCompliance -> Maybe Int
nonCompliantRuleCount} -> Maybe Int
nonCompliantRuleCount) (\s :: AggregateConformancePackCompliance
s@AggregateConformancePackCompliance' {} Maybe Int
a -> AggregateConformancePackCompliance
s {$sel:nonCompliantRuleCount:AggregateConformancePackCompliance' :: Maybe Int
nonCompliantRuleCount = Maybe Int
a} :: AggregateConformancePackCompliance)
aggregateConformancePackCompliance_complianceType :: Lens.Lens' AggregateConformancePackCompliance (Prelude.Maybe ConformancePackComplianceType)
aggregateConformancePackCompliance_complianceType :: (Maybe ConformancePackComplianceType
-> f (Maybe ConformancePackComplianceType))
-> AggregateConformancePackCompliance
-> f AggregateConformancePackCompliance
aggregateConformancePackCompliance_complianceType = (AggregateConformancePackCompliance
-> Maybe ConformancePackComplianceType)
-> (AggregateConformancePackCompliance
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
-> Lens
AggregateConformancePackCompliance
AggregateConformancePackCompliance
(Maybe ConformancePackComplianceType)
(Maybe ConformancePackComplianceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateConformancePackCompliance' {Maybe ConformancePackComplianceType
complianceType :: Maybe ConformancePackComplianceType
$sel:complianceType:AggregateConformancePackCompliance' :: AggregateConformancePackCompliance
-> Maybe ConformancePackComplianceType
complianceType} -> Maybe ConformancePackComplianceType
complianceType) (\s :: AggregateConformancePackCompliance
s@AggregateConformancePackCompliance' {} Maybe ConformancePackComplianceType
a -> AggregateConformancePackCompliance
s {$sel:complianceType:AggregateConformancePackCompliance' :: Maybe ConformancePackComplianceType
complianceType = Maybe ConformancePackComplianceType
a} :: AggregateConformancePackCompliance)
instance
Core.FromJSON
AggregateConformancePackCompliance
where
parseJSON :: Value -> Parser AggregateConformancePackCompliance
parseJSON =
String
-> (Object -> Parser AggregateConformancePackCompliance)
-> Value
-> Parser AggregateConformancePackCompliance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AggregateConformancePackCompliance"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance
AggregateConformancePackCompliance'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TotalRuleCount")
Parser
(Maybe Int
-> Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompliantRuleCount")
Parser
(Maybe Int
-> Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
-> Parser (Maybe Int)
-> Parser
(Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NonCompliantRuleCount")
Parser
(Maybe ConformancePackComplianceType
-> AggregateConformancePackCompliance)
-> Parser (Maybe ConformancePackComplianceType)
-> Parser AggregateConformancePackCompliance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConformancePackComplianceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComplianceType")
)
instance
Prelude.Hashable
AggregateConformancePackCompliance
instance
Prelude.NFData
AggregateConformancePackCompliance