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