{-# 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.ComplianceItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.ComplianceExecutionSummary
import Amazonka.SSM.Types.ComplianceSeverity
import Amazonka.SSM.Types.ComplianceStatus
data ComplianceItem = ComplianceItem'
{
ComplianceItem -> Maybe ComplianceStatus
status :: Prelude.Maybe ComplianceStatus,
ComplianceItem -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
ComplianceItem -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
ComplianceItem -> Maybe ComplianceSeverity
severity :: Prelude.Maybe ComplianceSeverity,
ComplianceItem -> Maybe ComplianceExecutionSummary
executionSummary :: Prelude.Maybe ComplianceExecutionSummary,
ComplianceItem -> Maybe (HashMap Text Text)
details :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ComplianceItem -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ComplianceItem -> Maybe Text
complianceType :: Prelude.Maybe Prelude.Text,
ComplianceItem -> Maybe Text
title :: Prelude.Maybe Prelude.Text
}
deriving (ComplianceItem -> ComplianceItem -> Bool
(ComplianceItem -> ComplianceItem -> Bool)
-> (ComplianceItem -> ComplianceItem -> Bool) -> Eq ComplianceItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComplianceItem -> ComplianceItem -> Bool
$c/= :: ComplianceItem -> ComplianceItem -> Bool
== :: ComplianceItem -> ComplianceItem -> Bool
$c== :: ComplianceItem -> ComplianceItem -> Bool
Prelude.Eq, ReadPrec [ComplianceItem]
ReadPrec ComplianceItem
Int -> ReadS ComplianceItem
ReadS [ComplianceItem]
(Int -> ReadS ComplianceItem)
-> ReadS [ComplianceItem]
-> ReadPrec ComplianceItem
-> ReadPrec [ComplianceItem]
-> Read ComplianceItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComplianceItem]
$creadListPrec :: ReadPrec [ComplianceItem]
readPrec :: ReadPrec ComplianceItem
$creadPrec :: ReadPrec ComplianceItem
readList :: ReadS [ComplianceItem]
$creadList :: ReadS [ComplianceItem]
readsPrec :: Int -> ReadS ComplianceItem
$creadsPrec :: Int -> ReadS ComplianceItem
Prelude.Read, Int -> ComplianceItem -> ShowS
[ComplianceItem] -> ShowS
ComplianceItem -> String
(Int -> ComplianceItem -> ShowS)
-> (ComplianceItem -> String)
-> ([ComplianceItem] -> ShowS)
-> Show ComplianceItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComplianceItem] -> ShowS
$cshowList :: [ComplianceItem] -> ShowS
show :: ComplianceItem -> String
$cshow :: ComplianceItem -> String
showsPrec :: Int -> ComplianceItem -> ShowS
$cshowsPrec :: Int -> ComplianceItem -> ShowS
Prelude.Show, (forall x. ComplianceItem -> Rep ComplianceItem x)
-> (forall x. Rep ComplianceItem x -> ComplianceItem)
-> Generic ComplianceItem
forall x. Rep ComplianceItem x -> ComplianceItem
forall x. ComplianceItem -> Rep ComplianceItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComplianceItem x -> ComplianceItem
$cfrom :: forall x. ComplianceItem -> Rep ComplianceItem x
Prelude.Generic)
newComplianceItem ::
ComplianceItem
newComplianceItem :: ComplianceItem
newComplianceItem =
ComplianceItem' :: Maybe ComplianceStatus
-> Maybe Text
-> Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem
ComplianceItem'
{ $sel:status:ComplianceItem' :: Maybe ComplianceStatus
status = Maybe ComplianceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:resourceId:ComplianceItem' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:ComplianceItem' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:severity:ComplianceItem' :: Maybe ComplianceSeverity
severity = Maybe ComplianceSeverity
forall a. Maybe a
Prelude.Nothing,
$sel:executionSummary:ComplianceItem' :: Maybe ComplianceExecutionSummary
executionSummary = Maybe ComplianceExecutionSummary
forall a. Maybe a
Prelude.Nothing,
$sel:details:ComplianceItem' :: Maybe (HashMap Text Text)
details = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:id:ComplianceItem' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:complianceType:ComplianceItem' :: Maybe Text
complianceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:ComplianceItem' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
complianceItem_status :: Lens.Lens' ComplianceItem (Prelude.Maybe ComplianceStatus)
complianceItem_status :: (Maybe ComplianceStatus -> f (Maybe ComplianceStatus))
-> ComplianceItem -> f ComplianceItem
complianceItem_status = (ComplianceItem -> Maybe ComplianceStatus)
-> (ComplianceItem -> Maybe ComplianceStatus -> ComplianceItem)
-> Lens
ComplianceItem
ComplianceItem
(Maybe ComplianceStatus)
(Maybe ComplianceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe ComplianceStatus
status :: Maybe ComplianceStatus
$sel:status:ComplianceItem' :: ComplianceItem -> Maybe ComplianceStatus
status} -> Maybe ComplianceStatus
status) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe ComplianceStatus
a -> ComplianceItem
s {$sel:status:ComplianceItem' :: Maybe ComplianceStatus
status = Maybe ComplianceStatus
a} :: ComplianceItem)
complianceItem_resourceId :: Lens.Lens' ComplianceItem (Prelude.Maybe Prelude.Text)
complianceItem_resourceId :: (Maybe Text -> f (Maybe Text))
-> ComplianceItem -> f ComplianceItem
complianceItem_resourceId = (ComplianceItem -> Maybe Text)
-> (ComplianceItem -> Maybe Text -> ComplianceItem)
-> Lens ComplianceItem ComplianceItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:ComplianceItem' :: ComplianceItem -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe Text
a -> ComplianceItem
s {$sel:resourceId:ComplianceItem' :: Maybe Text
resourceId = Maybe Text
a} :: ComplianceItem)
complianceItem_resourceType :: Lens.Lens' ComplianceItem (Prelude.Maybe Prelude.Text)
complianceItem_resourceType :: (Maybe Text -> f (Maybe Text))
-> ComplianceItem -> f ComplianceItem
complianceItem_resourceType = (ComplianceItem -> Maybe Text)
-> (ComplianceItem -> Maybe Text -> ComplianceItem)
-> Lens ComplianceItem ComplianceItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:ComplianceItem' :: ComplianceItem -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe Text
a -> ComplianceItem
s {$sel:resourceType:ComplianceItem' :: Maybe Text
resourceType = Maybe Text
a} :: ComplianceItem)
complianceItem_severity :: Lens.Lens' ComplianceItem (Prelude.Maybe ComplianceSeverity)
complianceItem_severity :: (Maybe ComplianceSeverity -> f (Maybe ComplianceSeverity))
-> ComplianceItem -> f ComplianceItem
complianceItem_severity = (ComplianceItem -> Maybe ComplianceSeverity)
-> (ComplianceItem -> Maybe ComplianceSeverity -> ComplianceItem)
-> Lens
ComplianceItem
ComplianceItem
(Maybe ComplianceSeverity)
(Maybe ComplianceSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe ComplianceSeverity
severity :: Maybe ComplianceSeverity
$sel:severity:ComplianceItem' :: ComplianceItem -> Maybe ComplianceSeverity
severity} -> Maybe ComplianceSeverity
severity) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe ComplianceSeverity
a -> ComplianceItem
s {$sel:severity:ComplianceItem' :: Maybe ComplianceSeverity
severity = Maybe ComplianceSeverity
a} :: ComplianceItem)
complianceItem_executionSummary :: Lens.Lens' ComplianceItem (Prelude.Maybe ComplianceExecutionSummary)
complianceItem_executionSummary :: (Maybe ComplianceExecutionSummary
-> f (Maybe ComplianceExecutionSummary))
-> ComplianceItem -> f ComplianceItem
complianceItem_executionSummary = (ComplianceItem -> Maybe ComplianceExecutionSummary)
-> (ComplianceItem
-> Maybe ComplianceExecutionSummary -> ComplianceItem)
-> Lens
ComplianceItem
ComplianceItem
(Maybe ComplianceExecutionSummary)
(Maybe ComplianceExecutionSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe ComplianceExecutionSummary
executionSummary :: Maybe ComplianceExecutionSummary
$sel:executionSummary:ComplianceItem' :: ComplianceItem -> Maybe ComplianceExecutionSummary
executionSummary} -> Maybe ComplianceExecutionSummary
executionSummary) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe ComplianceExecutionSummary
a -> ComplianceItem
s {$sel:executionSummary:ComplianceItem' :: Maybe ComplianceExecutionSummary
executionSummary = Maybe ComplianceExecutionSummary
a} :: ComplianceItem)
complianceItem_details :: Lens.Lens' ComplianceItem (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
complianceItem_details :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComplianceItem -> f ComplianceItem
complianceItem_details = (ComplianceItem -> Maybe (HashMap Text Text))
-> (ComplianceItem -> Maybe (HashMap Text Text) -> ComplianceItem)
-> Lens
ComplianceItem
ComplianceItem
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe (HashMap Text Text)
details :: Maybe (HashMap Text Text)
$sel:details:ComplianceItem' :: ComplianceItem -> Maybe (HashMap Text Text)
details} -> Maybe (HashMap Text Text)
details) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe (HashMap Text Text)
a -> ComplianceItem
s {$sel:details:ComplianceItem' :: Maybe (HashMap Text Text)
details = Maybe (HashMap Text Text)
a} :: ComplianceItem) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComplianceItem -> f ComplianceItem)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComplianceItem
-> f ComplianceItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
complianceItem_id :: Lens.Lens' ComplianceItem (Prelude.Maybe Prelude.Text)
complianceItem_id :: (Maybe Text -> f (Maybe Text))
-> ComplianceItem -> f ComplianceItem
complianceItem_id = (ComplianceItem -> Maybe Text)
-> (ComplianceItem -> Maybe Text -> ComplianceItem)
-> Lens ComplianceItem ComplianceItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe Text
id :: Maybe Text
$sel:id:ComplianceItem' :: ComplianceItem -> Maybe Text
id} -> Maybe Text
id) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe Text
a -> ComplianceItem
s {$sel:id:ComplianceItem' :: Maybe Text
id = Maybe Text
a} :: ComplianceItem)
complianceItem_complianceType :: Lens.Lens' ComplianceItem (Prelude.Maybe Prelude.Text)
complianceItem_complianceType :: (Maybe Text -> f (Maybe Text))
-> ComplianceItem -> f ComplianceItem
complianceItem_complianceType = (ComplianceItem -> Maybe Text)
-> (ComplianceItem -> Maybe Text -> ComplianceItem)
-> Lens ComplianceItem ComplianceItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe Text
complianceType :: Maybe Text
$sel:complianceType:ComplianceItem' :: ComplianceItem -> Maybe Text
complianceType} -> Maybe Text
complianceType) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe Text
a -> ComplianceItem
s {$sel:complianceType:ComplianceItem' :: Maybe Text
complianceType = Maybe Text
a} :: ComplianceItem)
complianceItem_title :: Lens.Lens' ComplianceItem (Prelude.Maybe Prelude.Text)
complianceItem_title :: (Maybe Text -> f (Maybe Text))
-> ComplianceItem -> f ComplianceItem
complianceItem_title = (ComplianceItem -> Maybe Text)
-> (ComplianceItem -> Maybe Text -> ComplianceItem)
-> Lens ComplianceItem ComplianceItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComplianceItem' {Maybe Text
title :: Maybe Text
$sel:title:ComplianceItem' :: ComplianceItem -> Maybe Text
title} -> Maybe Text
title) (\s :: ComplianceItem
s@ComplianceItem' {} Maybe Text
a -> ComplianceItem
s {$sel:title:ComplianceItem' :: Maybe Text
title = Maybe Text
a} :: ComplianceItem)
instance Core.FromJSON ComplianceItem where
parseJSON :: Value -> Parser ComplianceItem
parseJSON =
String
-> (Object -> Parser ComplianceItem)
-> Value
-> Parser ComplianceItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ComplianceItem"
( \Object
x ->
Maybe ComplianceStatus
-> Maybe Text
-> Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem
ComplianceItem'
(Maybe ComplianceStatus
-> Maybe Text
-> Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
-> Parser (Maybe ComplianceStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ComplianceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
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
"ResourceId")
Parser
(Maybe Text
-> Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
-> Parser (Maybe Text)
-> Parser
(Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
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
"ResourceType")
Parser
(Maybe ComplianceSeverity
-> Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
-> Parser (Maybe ComplianceSeverity)
-> Parser
(Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComplianceSeverity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Severity")
Parser
(Maybe ComplianceExecutionSummary
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ComplianceItem)
-> Parser (Maybe ComplianceExecutionSummary)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text -> Maybe Text -> Maybe Text -> ComplianceItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComplianceExecutionSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExecutionSummary")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text -> Maybe Text -> Maybe Text -> ComplianceItem)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ComplianceItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Details" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Maybe Text -> Maybe Text -> ComplianceItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ComplianceItem)
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
"Id")
Parser (Maybe Text -> Maybe Text -> ComplianceItem)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ComplianceItem)
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")
Parser (Maybe Text -> ComplianceItem)
-> Parser (Maybe Text) -> Parser ComplianceItem
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
"Title")
)
instance Prelude.Hashable ComplianceItem
instance Prelude.NFData ComplianceItem