{-# 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.PatchComplianceData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.PatchComplianceDataState
data PatchComplianceData = PatchComplianceData'
{
PatchComplianceData -> Maybe Text
cVEIds :: Prelude.Maybe Prelude.Text,
PatchComplianceData -> Text
title :: Prelude.Text,
PatchComplianceData -> Text
kBId :: Prelude.Text,
PatchComplianceData -> Text
classification :: Prelude.Text,
PatchComplianceData -> Text
severity :: Prelude.Text,
PatchComplianceData -> PatchComplianceDataState
state :: PatchComplianceDataState,
PatchComplianceData -> POSIX
installedTime :: Core.POSIX
}
deriving (PatchComplianceData -> PatchComplianceData -> Bool
(PatchComplianceData -> PatchComplianceData -> Bool)
-> (PatchComplianceData -> PatchComplianceData -> Bool)
-> Eq PatchComplianceData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PatchComplianceData -> PatchComplianceData -> Bool
$c/= :: PatchComplianceData -> PatchComplianceData -> Bool
== :: PatchComplianceData -> PatchComplianceData -> Bool
$c== :: PatchComplianceData -> PatchComplianceData -> Bool
Prelude.Eq, ReadPrec [PatchComplianceData]
ReadPrec PatchComplianceData
Int -> ReadS PatchComplianceData
ReadS [PatchComplianceData]
(Int -> ReadS PatchComplianceData)
-> ReadS [PatchComplianceData]
-> ReadPrec PatchComplianceData
-> ReadPrec [PatchComplianceData]
-> Read PatchComplianceData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PatchComplianceData]
$creadListPrec :: ReadPrec [PatchComplianceData]
readPrec :: ReadPrec PatchComplianceData
$creadPrec :: ReadPrec PatchComplianceData
readList :: ReadS [PatchComplianceData]
$creadList :: ReadS [PatchComplianceData]
readsPrec :: Int -> ReadS PatchComplianceData
$creadsPrec :: Int -> ReadS PatchComplianceData
Prelude.Read, Int -> PatchComplianceData -> ShowS
[PatchComplianceData] -> ShowS
PatchComplianceData -> String
(Int -> PatchComplianceData -> ShowS)
-> (PatchComplianceData -> String)
-> ([PatchComplianceData] -> ShowS)
-> Show PatchComplianceData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PatchComplianceData] -> ShowS
$cshowList :: [PatchComplianceData] -> ShowS
show :: PatchComplianceData -> String
$cshow :: PatchComplianceData -> String
showsPrec :: Int -> PatchComplianceData -> ShowS
$cshowsPrec :: Int -> PatchComplianceData -> ShowS
Prelude.Show, (forall x. PatchComplianceData -> Rep PatchComplianceData x)
-> (forall x. Rep PatchComplianceData x -> PatchComplianceData)
-> Generic PatchComplianceData
forall x. Rep PatchComplianceData x -> PatchComplianceData
forall x. PatchComplianceData -> Rep PatchComplianceData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PatchComplianceData x -> PatchComplianceData
$cfrom :: forall x. PatchComplianceData -> Rep PatchComplianceData x
Prelude.Generic)
newPatchComplianceData ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PatchComplianceDataState ->
Prelude.UTCTime ->
PatchComplianceData
newPatchComplianceData :: Text
-> Text
-> Text
-> Text
-> PatchComplianceDataState
-> UTCTime
-> PatchComplianceData
newPatchComplianceData
Text
pTitle_
Text
pKBId_
Text
pClassification_
Text
pSeverity_
PatchComplianceDataState
pState_
UTCTime
pInstalledTime_ =
PatchComplianceData' :: Maybe Text
-> Text
-> Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData
PatchComplianceData'
{ $sel:cVEIds:PatchComplianceData' :: Maybe Text
cVEIds = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:PatchComplianceData' :: Text
title = Text
pTitle_,
$sel:kBId:PatchComplianceData' :: Text
kBId = Text
pKBId_,
$sel:classification:PatchComplianceData' :: Text
classification = Text
pClassification_,
$sel:severity:PatchComplianceData' :: Text
severity = Text
pSeverity_,
$sel:state:PatchComplianceData' :: PatchComplianceDataState
state = PatchComplianceDataState
pState_,
$sel:installedTime:PatchComplianceData' :: POSIX
installedTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pInstalledTime_
}
patchComplianceData_cVEIds :: Lens.Lens' PatchComplianceData (Prelude.Maybe Prelude.Text)
patchComplianceData_cVEIds :: (Maybe Text -> f (Maybe Text))
-> PatchComplianceData -> f PatchComplianceData
patchComplianceData_cVEIds = (PatchComplianceData -> Maybe Text)
-> (PatchComplianceData -> Maybe Text -> PatchComplianceData)
-> Lens
PatchComplianceData PatchComplianceData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {Maybe Text
cVEIds :: Maybe Text
$sel:cVEIds:PatchComplianceData' :: PatchComplianceData -> Maybe Text
cVEIds} -> Maybe Text
cVEIds) (\s :: PatchComplianceData
s@PatchComplianceData' {} Maybe Text
a -> PatchComplianceData
s {$sel:cVEIds:PatchComplianceData' :: Maybe Text
cVEIds = Maybe Text
a} :: PatchComplianceData)
patchComplianceData_title :: Lens.Lens' PatchComplianceData Prelude.Text
patchComplianceData_title :: (Text -> f Text) -> PatchComplianceData -> f PatchComplianceData
patchComplianceData_title = (PatchComplianceData -> Text)
-> (PatchComplianceData -> Text -> PatchComplianceData)
-> Lens PatchComplianceData PatchComplianceData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {Text
title :: Text
$sel:title:PatchComplianceData' :: PatchComplianceData -> Text
title} -> Text
title) (\s :: PatchComplianceData
s@PatchComplianceData' {} Text
a -> PatchComplianceData
s {$sel:title:PatchComplianceData' :: Text
title = Text
a} :: PatchComplianceData)
patchComplianceData_kBId :: Lens.Lens' PatchComplianceData Prelude.Text
patchComplianceData_kBId :: (Text -> f Text) -> PatchComplianceData -> f PatchComplianceData
patchComplianceData_kBId = (PatchComplianceData -> Text)
-> (PatchComplianceData -> Text -> PatchComplianceData)
-> Lens PatchComplianceData PatchComplianceData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {Text
kBId :: Text
$sel:kBId:PatchComplianceData' :: PatchComplianceData -> Text
kBId} -> Text
kBId) (\s :: PatchComplianceData
s@PatchComplianceData' {} Text
a -> PatchComplianceData
s {$sel:kBId:PatchComplianceData' :: Text
kBId = Text
a} :: PatchComplianceData)
patchComplianceData_classification :: Lens.Lens' PatchComplianceData Prelude.Text
patchComplianceData_classification :: (Text -> f Text) -> PatchComplianceData -> f PatchComplianceData
patchComplianceData_classification = (PatchComplianceData -> Text)
-> (PatchComplianceData -> Text -> PatchComplianceData)
-> Lens PatchComplianceData PatchComplianceData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {Text
classification :: Text
$sel:classification:PatchComplianceData' :: PatchComplianceData -> Text
classification} -> Text
classification) (\s :: PatchComplianceData
s@PatchComplianceData' {} Text
a -> PatchComplianceData
s {$sel:classification:PatchComplianceData' :: Text
classification = Text
a} :: PatchComplianceData)
patchComplianceData_severity :: Lens.Lens' PatchComplianceData Prelude.Text
patchComplianceData_severity :: (Text -> f Text) -> PatchComplianceData -> f PatchComplianceData
patchComplianceData_severity = (PatchComplianceData -> Text)
-> (PatchComplianceData -> Text -> PatchComplianceData)
-> Lens PatchComplianceData PatchComplianceData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {Text
severity :: Text
$sel:severity:PatchComplianceData' :: PatchComplianceData -> Text
severity} -> Text
severity) (\s :: PatchComplianceData
s@PatchComplianceData' {} Text
a -> PatchComplianceData
s {$sel:severity:PatchComplianceData' :: Text
severity = Text
a} :: PatchComplianceData)
patchComplianceData_state :: Lens.Lens' PatchComplianceData PatchComplianceDataState
patchComplianceData_state :: (PatchComplianceDataState -> f PatchComplianceDataState)
-> PatchComplianceData -> f PatchComplianceData
patchComplianceData_state = (PatchComplianceData -> PatchComplianceDataState)
-> (PatchComplianceData
-> PatchComplianceDataState -> PatchComplianceData)
-> Lens
PatchComplianceData
PatchComplianceData
PatchComplianceDataState
PatchComplianceDataState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {PatchComplianceDataState
state :: PatchComplianceDataState
$sel:state:PatchComplianceData' :: PatchComplianceData -> PatchComplianceDataState
state} -> PatchComplianceDataState
state) (\s :: PatchComplianceData
s@PatchComplianceData' {} PatchComplianceDataState
a -> PatchComplianceData
s {$sel:state:PatchComplianceData' :: PatchComplianceDataState
state = PatchComplianceDataState
a} :: PatchComplianceData)
patchComplianceData_installedTime :: Lens.Lens' PatchComplianceData Prelude.UTCTime
patchComplianceData_installedTime :: (UTCTime -> f UTCTime)
-> PatchComplianceData -> f PatchComplianceData
patchComplianceData_installedTime = (PatchComplianceData -> POSIX)
-> (PatchComplianceData -> POSIX -> PatchComplianceData)
-> Lens PatchComplianceData PatchComplianceData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchComplianceData' {POSIX
installedTime :: POSIX
$sel:installedTime:PatchComplianceData' :: PatchComplianceData -> POSIX
installedTime} -> POSIX
installedTime) (\s :: PatchComplianceData
s@PatchComplianceData' {} POSIX
a -> PatchComplianceData
s {$sel:installedTime:PatchComplianceData' :: POSIX
installedTime = POSIX
a} :: PatchComplianceData) ((POSIX -> f POSIX)
-> PatchComplianceData -> f PatchComplianceData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> PatchComplianceData
-> f PatchComplianceData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON PatchComplianceData where
parseJSON :: Value -> Parser PatchComplianceData
parseJSON =
String
-> (Object -> Parser PatchComplianceData)
-> Value
-> Parser PatchComplianceData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PatchComplianceData"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData
PatchComplianceData'
(Maybe Text
-> Text
-> Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
-> Parser (Maybe Text)
-> Parser
(Text
-> Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
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
"CVEIds")
Parser
(Text
-> Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
-> Parser Text
-> Parser
(Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Title")
Parser
(Text
-> Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
-> Parser Text
-> Parser
(Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"KBId")
Parser
(Text
-> Text
-> PatchComplianceDataState
-> POSIX
-> PatchComplianceData)
-> Parser Text
-> Parser
(Text -> PatchComplianceDataState -> POSIX -> PatchComplianceData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Classification")
Parser
(Text -> PatchComplianceDataState -> POSIX -> PatchComplianceData)
-> Parser Text
-> Parser
(PatchComplianceDataState -> POSIX -> PatchComplianceData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Severity")
Parser (PatchComplianceDataState -> POSIX -> PatchComplianceData)
-> Parser PatchComplianceDataState
-> Parser (POSIX -> PatchComplianceData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser PatchComplianceDataState
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"State")
Parser (POSIX -> PatchComplianceData)
-> Parser POSIX -> Parser PatchComplianceData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"InstalledTime")
)
instance Prelude.Hashable PatchComplianceData
instance Prelude.NFData PatchComplianceData