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