{-# 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.FMS.Types.PolicyComplianceStatus
-- 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.FMS.Types.PolicyComplianceStatus where

import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.DependentServiceName
import Amazonka.FMS.Types.EvaluationResult
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Indicates whether the account is compliant with the specified policy. An
-- account is considered noncompliant if it includes resources that are not
-- protected by the policy, for WAF and Shield Advanced policies, or that
-- are noncompliant with the policy, for security group policies.
--
-- /See:/ 'newPolicyComplianceStatus' smart constructor.
data PolicyComplianceStatus = PolicyComplianceStatus'
  { -- | An array of @EvaluationResult@ objects.
    PolicyComplianceStatus -> Maybe [EvaluationResult]
evaluationResults :: Prelude.Maybe [EvaluationResult],
    -- | Timestamp of the last update to the @EvaluationResult@ objects.
    PolicyComplianceStatus -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
    -- | The name of the Firewall Manager policy.
    PolicyComplianceStatus -> Maybe Text
policyName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Firewall Manager policy.
    PolicyComplianceStatus -> Maybe Text
policyId :: Prelude.Maybe Prelude.Text,
    -- | Details about problems with dependent services, such as WAF or Config,
    -- and the error message received that indicates the problem with the
    -- service.
    PolicyComplianceStatus -> Maybe (HashMap DependentServiceName Text)
issueInfoMap :: Prelude.Maybe (Prelude.HashMap DependentServiceName Prelude.Text),
    -- | The Amazon Web Services account that created the Firewall Manager
    -- policy.
    PolicyComplianceStatus -> Maybe Text
policyOwner :: Prelude.Maybe Prelude.Text,
    -- | The member account ID.
    PolicyComplianceStatus -> Maybe Text
memberAccount :: Prelude.Maybe Prelude.Text
  }
  deriving (PolicyComplianceStatus -> PolicyComplianceStatus -> Bool
(PolicyComplianceStatus -> PolicyComplianceStatus -> Bool)
-> (PolicyComplianceStatus -> PolicyComplianceStatus -> Bool)
-> Eq PolicyComplianceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyComplianceStatus -> PolicyComplianceStatus -> Bool
$c/= :: PolicyComplianceStatus -> PolicyComplianceStatus -> Bool
== :: PolicyComplianceStatus -> PolicyComplianceStatus -> Bool
$c== :: PolicyComplianceStatus -> PolicyComplianceStatus -> Bool
Prelude.Eq, ReadPrec [PolicyComplianceStatus]
ReadPrec PolicyComplianceStatus
Int -> ReadS PolicyComplianceStatus
ReadS [PolicyComplianceStatus]
(Int -> ReadS PolicyComplianceStatus)
-> ReadS [PolicyComplianceStatus]
-> ReadPrec PolicyComplianceStatus
-> ReadPrec [PolicyComplianceStatus]
-> Read PolicyComplianceStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyComplianceStatus]
$creadListPrec :: ReadPrec [PolicyComplianceStatus]
readPrec :: ReadPrec PolicyComplianceStatus
$creadPrec :: ReadPrec PolicyComplianceStatus
readList :: ReadS [PolicyComplianceStatus]
$creadList :: ReadS [PolicyComplianceStatus]
readsPrec :: Int -> ReadS PolicyComplianceStatus
$creadsPrec :: Int -> ReadS PolicyComplianceStatus
Prelude.Read, Int -> PolicyComplianceStatus -> ShowS
[PolicyComplianceStatus] -> ShowS
PolicyComplianceStatus -> String
(Int -> PolicyComplianceStatus -> ShowS)
-> (PolicyComplianceStatus -> String)
-> ([PolicyComplianceStatus] -> ShowS)
-> Show PolicyComplianceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyComplianceStatus] -> ShowS
$cshowList :: [PolicyComplianceStatus] -> ShowS
show :: PolicyComplianceStatus -> String
$cshow :: PolicyComplianceStatus -> String
showsPrec :: Int -> PolicyComplianceStatus -> ShowS
$cshowsPrec :: Int -> PolicyComplianceStatus -> ShowS
Prelude.Show, (forall x. PolicyComplianceStatus -> Rep PolicyComplianceStatus x)
-> (forall x.
    Rep PolicyComplianceStatus x -> PolicyComplianceStatus)
-> Generic PolicyComplianceStatus
forall x. Rep PolicyComplianceStatus x -> PolicyComplianceStatus
forall x. PolicyComplianceStatus -> Rep PolicyComplianceStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PolicyComplianceStatus x -> PolicyComplianceStatus
$cfrom :: forall x. PolicyComplianceStatus -> Rep PolicyComplianceStatus x
Prelude.Generic)

-- |
-- Create a value of 'PolicyComplianceStatus' 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:
--
-- 'evaluationResults', 'policyComplianceStatus_evaluationResults' - An array of @EvaluationResult@ objects.
--
-- 'lastUpdated', 'policyComplianceStatus_lastUpdated' - Timestamp of the last update to the @EvaluationResult@ objects.
--
-- 'policyName', 'policyComplianceStatus_policyName' - The name of the Firewall Manager policy.
--
-- 'policyId', 'policyComplianceStatus_policyId' - The ID of the Firewall Manager policy.
--
-- 'issueInfoMap', 'policyComplianceStatus_issueInfoMap' - Details about problems with dependent services, such as WAF or Config,
-- and the error message received that indicates the problem with the
-- service.
--
-- 'policyOwner', 'policyComplianceStatus_policyOwner' - The Amazon Web Services account that created the Firewall Manager
-- policy.
--
-- 'memberAccount', 'policyComplianceStatus_memberAccount' - The member account ID.
newPolicyComplianceStatus ::
  PolicyComplianceStatus
newPolicyComplianceStatus :: PolicyComplianceStatus
newPolicyComplianceStatus =
  PolicyComplianceStatus' :: Maybe [EvaluationResult]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap DependentServiceName Text)
-> Maybe Text
-> Maybe Text
-> PolicyComplianceStatus
PolicyComplianceStatus'
    { $sel:evaluationResults:PolicyComplianceStatus' :: Maybe [EvaluationResult]
evaluationResults =
        Maybe [EvaluationResult]
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdated:PolicyComplianceStatus' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:policyName:PolicyComplianceStatus' :: Maybe Text
policyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:policyId:PolicyComplianceStatus' :: Maybe Text
policyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:issueInfoMap:PolicyComplianceStatus' :: Maybe (HashMap DependentServiceName Text)
issueInfoMap = Maybe (HashMap DependentServiceName Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:policyOwner:PolicyComplianceStatus' :: Maybe Text
policyOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:memberAccount:PolicyComplianceStatus' :: Maybe Text
memberAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | An array of @EvaluationResult@ objects.
policyComplianceStatus_evaluationResults :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe [EvaluationResult])
policyComplianceStatus_evaluationResults :: (Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_evaluationResults = (PolicyComplianceStatus -> Maybe [EvaluationResult])
-> (PolicyComplianceStatus
    -> Maybe [EvaluationResult] -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe [EvaluationResult]
evaluationResults :: Maybe [EvaluationResult]
$sel:evaluationResults:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe [EvaluationResult]
evaluationResults} -> Maybe [EvaluationResult]
evaluationResults) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe [EvaluationResult]
a -> PolicyComplianceStatus
s {$sel:evaluationResults:PolicyComplianceStatus' :: Maybe [EvaluationResult]
evaluationResults = Maybe [EvaluationResult]
a} :: PolicyComplianceStatus) ((Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
 -> PolicyComplianceStatus -> f PolicyComplianceStatus)
-> ((Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
    -> Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> (Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> PolicyComplianceStatus
-> f PolicyComplianceStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
-> Iso
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
     (Maybe [EvaluationResult])
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
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
  [EvaluationResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Timestamp of the last update to the @EvaluationResult@ objects.
policyComplianceStatus_lastUpdated :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe Prelude.UTCTime)
policyComplianceStatus_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_lastUpdated = (PolicyComplianceStatus -> Maybe POSIX)
-> (PolicyComplianceStatus
    -> Maybe POSIX -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe POSIX
a -> PolicyComplianceStatus
s {$sel:lastUpdated:PolicyComplianceStatus' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: PolicyComplianceStatus) ((Maybe POSIX -> f (Maybe POSIX))
 -> PolicyComplianceStatus -> f PolicyComplianceStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PolicyComplianceStatus
-> f PolicyComplianceStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the Firewall Manager policy.
policyComplianceStatus_policyName :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe Prelude.Text)
policyComplianceStatus_policyName :: (Maybe Text -> f (Maybe Text))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_policyName = (PolicyComplianceStatus -> Maybe Text)
-> (PolicyComplianceStatus -> Maybe Text -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe Text
policyName :: Maybe Text
$sel:policyName:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe Text
policyName} -> Maybe Text
policyName) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe Text
a -> PolicyComplianceStatus
s {$sel:policyName:PolicyComplianceStatus' :: Maybe Text
policyName = Maybe Text
a} :: PolicyComplianceStatus)

-- | The ID of the Firewall Manager policy.
policyComplianceStatus_policyId :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe Prelude.Text)
policyComplianceStatus_policyId :: (Maybe Text -> f (Maybe Text))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_policyId = (PolicyComplianceStatus -> Maybe Text)
-> (PolicyComplianceStatus -> Maybe Text -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe Text
policyId :: Maybe Text
$sel:policyId:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe Text
policyId} -> Maybe Text
policyId) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe Text
a -> PolicyComplianceStatus
s {$sel:policyId:PolicyComplianceStatus' :: Maybe Text
policyId = Maybe Text
a} :: PolicyComplianceStatus)

-- | Details about problems with dependent services, such as WAF or Config,
-- and the error message received that indicates the problem with the
-- service.
policyComplianceStatus_issueInfoMap :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe (Prelude.HashMap DependentServiceName Prelude.Text))
policyComplianceStatus_issueInfoMap :: (Maybe (HashMap DependentServiceName Text)
 -> f (Maybe (HashMap DependentServiceName Text)))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_issueInfoMap = (PolicyComplianceStatus
 -> Maybe (HashMap DependentServiceName Text))
-> (PolicyComplianceStatus
    -> Maybe (HashMap DependentServiceName Text)
    -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe (HashMap DependentServiceName Text))
     (Maybe (HashMap DependentServiceName Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe (HashMap DependentServiceName Text)
issueInfoMap :: Maybe (HashMap DependentServiceName Text)
$sel:issueInfoMap:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe (HashMap DependentServiceName Text)
issueInfoMap} -> Maybe (HashMap DependentServiceName Text)
issueInfoMap) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe (HashMap DependentServiceName Text)
a -> PolicyComplianceStatus
s {$sel:issueInfoMap:PolicyComplianceStatus' :: Maybe (HashMap DependentServiceName Text)
issueInfoMap = Maybe (HashMap DependentServiceName Text)
a} :: PolicyComplianceStatus) ((Maybe (HashMap DependentServiceName Text)
  -> f (Maybe (HashMap DependentServiceName Text)))
 -> PolicyComplianceStatus -> f PolicyComplianceStatus)
-> ((Maybe (HashMap DependentServiceName Text)
     -> f (Maybe (HashMap DependentServiceName Text)))
    -> Maybe (HashMap DependentServiceName Text)
    -> f (Maybe (HashMap DependentServiceName Text)))
-> (Maybe (HashMap DependentServiceName Text)
    -> f (Maybe (HashMap DependentServiceName Text)))
-> PolicyComplianceStatus
-> f PolicyComplianceStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap DependentServiceName Text)
  (HashMap DependentServiceName Text)
  (HashMap DependentServiceName Text)
  (HashMap DependentServiceName Text)
-> Iso
     (Maybe (HashMap DependentServiceName Text))
     (Maybe (HashMap DependentServiceName Text))
     (Maybe (HashMap DependentServiceName Text))
     (Maybe (HashMap DependentServiceName 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 DependentServiceName Text)
  (HashMap DependentServiceName Text)
  (HashMap DependentServiceName Text)
  (HashMap DependentServiceName Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Web Services account that created the Firewall Manager
-- policy.
policyComplianceStatus_policyOwner :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe Prelude.Text)
policyComplianceStatus_policyOwner :: (Maybe Text -> f (Maybe Text))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_policyOwner = (PolicyComplianceStatus -> Maybe Text)
-> (PolicyComplianceStatus -> Maybe Text -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe Text
policyOwner :: Maybe Text
$sel:policyOwner:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe Text
policyOwner} -> Maybe Text
policyOwner) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe Text
a -> PolicyComplianceStatus
s {$sel:policyOwner:PolicyComplianceStatus' :: Maybe Text
policyOwner = Maybe Text
a} :: PolicyComplianceStatus)

-- | The member account ID.
policyComplianceStatus_memberAccount :: Lens.Lens' PolicyComplianceStatus (Prelude.Maybe Prelude.Text)
policyComplianceStatus_memberAccount :: (Maybe Text -> f (Maybe Text))
-> PolicyComplianceStatus -> f PolicyComplianceStatus
policyComplianceStatus_memberAccount = (PolicyComplianceStatus -> Maybe Text)
-> (PolicyComplianceStatus -> Maybe Text -> PolicyComplianceStatus)
-> Lens
     PolicyComplianceStatus
     PolicyComplianceStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceStatus' {Maybe Text
memberAccount :: Maybe Text
$sel:memberAccount:PolicyComplianceStatus' :: PolicyComplianceStatus -> Maybe Text
memberAccount} -> Maybe Text
memberAccount) (\s :: PolicyComplianceStatus
s@PolicyComplianceStatus' {} Maybe Text
a -> PolicyComplianceStatus
s {$sel:memberAccount:PolicyComplianceStatus' :: Maybe Text
memberAccount = Maybe Text
a} :: PolicyComplianceStatus)

instance Core.FromJSON PolicyComplianceStatus where
  parseJSON :: Value -> Parser PolicyComplianceStatus
parseJSON =
    String
-> (Object -> Parser PolicyComplianceStatus)
-> Value
-> Parser PolicyComplianceStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PolicyComplianceStatus"
      ( \Object
x ->
          Maybe [EvaluationResult]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap DependentServiceName Text)
-> Maybe Text
-> Maybe Text
-> PolicyComplianceStatus
PolicyComplianceStatus'
            (Maybe [EvaluationResult]
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap DependentServiceName Text)
 -> Maybe Text
 -> Maybe Text
 -> PolicyComplianceStatus)
-> Parser (Maybe [EvaluationResult])
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap DependentServiceName Text)
      -> Maybe Text
      -> Maybe Text
      -> PolicyComplianceStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [EvaluationResult]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationResults"
                            Parser (Maybe (Maybe [EvaluationResult]))
-> Maybe [EvaluationResult] -> Parser (Maybe [EvaluationResult])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [EvaluationResult]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap DependentServiceName Text)
   -> Maybe Text
   -> Maybe Text
   -> PolicyComplianceStatus)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap DependentServiceName Text)
      -> Maybe Text
      -> Maybe Text
      -> PolicyComplianceStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdated")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap DependentServiceName Text)
   -> Maybe Text
   -> Maybe Text
   -> PolicyComplianceStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap DependentServiceName Text)
      -> Maybe Text
      -> Maybe Text
      -> PolicyComplianceStatus)
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
"PolicyName")
            Parser
  (Maybe Text
   -> Maybe (HashMap DependentServiceName Text)
   -> Maybe Text
   -> Maybe Text
   -> PolicyComplianceStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap DependentServiceName Text)
      -> Maybe Text -> Maybe Text -> PolicyComplianceStatus)
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
"PolicyId")
            Parser
  (Maybe (HashMap DependentServiceName Text)
   -> Maybe Text -> Maybe Text -> PolicyComplianceStatus)
-> Parser (Maybe (HashMap DependentServiceName Text))
-> Parser (Maybe Text -> Maybe Text -> PolicyComplianceStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe (Maybe (HashMap DependentServiceName Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IssueInfoMap" Parser (Maybe (Maybe (HashMap DependentServiceName Text)))
-> Maybe (HashMap DependentServiceName Text)
-> Parser (Maybe (HashMap DependentServiceName Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap DependentServiceName Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Maybe Text -> PolicyComplianceStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> PolicyComplianceStatus)
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
"PolicyOwner")
            Parser (Maybe Text -> PolicyComplianceStatus)
-> Parser (Maybe Text) -> Parser PolicyComplianceStatus
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
"MemberAccount")
      )

instance Prelude.Hashable PolicyComplianceStatus

instance Prelude.NFData PolicyComplianceStatus