{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSM.Types.ComplianceItem
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Information about the compliance as defined by the resource type. For
-- example, for a patch resource type, @Items@ includes information about
-- the PatchSeverity, Classification, and so on.
--
-- /See:/ 'newComplianceItem' smart constructor.
data ComplianceItem = ComplianceItem'
  { -- | The status of the compliance item. An item is either COMPLIANT,
    -- NON_COMPLIANT, or an empty string (for Windows patches that aren\'t
    -- applicable).
    ComplianceItem -> Maybe ComplianceStatus
status :: Prelude.Maybe ComplianceStatus,
    -- | An ID for the resource. For a managed instance, this is the instance ID.
    ComplianceItem -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The type of resource. @ManagedInstance@ is currently the only supported
    -- resource type.
    ComplianceItem -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | The severity of the compliance status. Severity can be one of the
    -- following: Critical, High, Medium, Low, Informational, Unspecified.
    ComplianceItem -> Maybe ComplianceSeverity
severity :: Prelude.Maybe ComplianceSeverity,
    -- | A summary for the compliance item. The summary includes an execution ID,
    -- the execution type (for example, command), and the execution time.
    ComplianceItem -> Maybe ComplianceExecutionSummary
executionSummary :: Prelude.Maybe ComplianceExecutionSummary,
    -- | A \"Key\": \"Value\" tag combination for the compliance item.
    ComplianceItem -> Maybe (HashMap Text Text)
details :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | An ID for the compliance item. For example, if the compliance item is a
    -- Windows patch, the ID could be the number of the KB article; for
    -- example: KB4010320.
    ComplianceItem -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The compliance type. For example, Association (for a State Manager
    -- association), Patch, or Custom:@string@ are all valid compliance types.
    ComplianceItem -> Maybe Text
complianceType :: Prelude.Maybe Prelude.Text,
    -- | A title for the compliance item. For example, if the compliance item is
    -- a Windows patch, the title could be the title of the KB article for the
    -- patch; for example: Security Update for Active Directory Federation
    -- Services.
    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)

-- |
-- Create a value of 'ComplianceItem' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'complianceItem_status' - The status of the compliance item. An item is either COMPLIANT,
-- NON_COMPLIANT, or an empty string (for Windows patches that aren\'t
-- applicable).
--
-- 'resourceId', 'complianceItem_resourceId' - An ID for the resource. For a managed instance, this is the instance ID.
--
-- 'resourceType', 'complianceItem_resourceType' - The type of resource. @ManagedInstance@ is currently the only supported
-- resource type.
--
-- 'severity', 'complianceItem_severity' - The severity of the compliance status. Severity can be one of the
-- following: Critical, High, Medium, Low, Informational, Unspecified.
--
-- 'executionSummary', 'complianceItem_executionSummary' - A summary for the compliance item. The summary includes an execution ID,
-- the execution type (for example, command), and the execution time.
--
-- 'details', 'complianceItem_details' - A \"Key\": \"Value\" tag combination for the compliance item.
--
-- 'id', 'complianceItem_id' - An ID for the compliance item. For example, if the compliance item is a
-- Windows patch, the ID could be the number of the KB article; for
-- example: KB4010320.
--
-- 'complianceType', 'complianceItem_complianceType' - The compliance type. For example, Association (for a State Manager
-- association), Patch, or Custom:@string@ are all valid compliance types.
--
-- 'title', 'complianceItem_title' - A title for the compliance item. For example, if the compliance item is
-- a Windows patch, the title could be the title of the KB article for the
-- patch; for example: Security Update for Active Directory Federation
-- Services.
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
    }

-- | The status of the compliance item. An item is either COMPLIANT,
-- NON_COMPLIANT, or an empty string (for Windows patches that aren\'t
-- applicable).
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)

-- | An ID for the resource. For a managed instance, this is the instance ID.
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)

-- | The type of resource. @ManagedInstance@ is currently the only supported
-- resource type.
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)

-- | The severity of the compliance status. Severity can be one of the
-- following: Critical, High, Medium, Low, Informational, Unspecified.
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)

-- | A summary for the compliance item. The summary includes an execution ID,
-- the execution type (for example, command), and the execution time.
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)

-- | A \"Key\": \"Value\" tag combination for the compliance item.
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

-- | An ID for the compliance item. For example, if the compliance item is a
-- Windows patch, the ID could be the number of the KB article; for
-- example: KB4010320.
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)

-- | The compliance type. For example, Association (for a State Manager
-- association), Patch, or Custom:@string@ are all valid compliance types.
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)

-- | A title for the compliance item. For example, if the compliance item is
-- a Windows patch, the title could be the title of the KB article for the
-- patch; for example: Security Update for Active Directory Federation
-- Services.
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