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