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