{-# 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.PolicyComplianceDetail
-- 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.PolicyComplianceDetail where

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

-- | Describes the noncompliant resources in a member account for a specific
-- Firewall Manager policy. A maximum of 100 entries are displayed. If more
-- than 100 resources are noncompliant, @EvaluationLimitExceeded@ is set to
-- @True@.
--
-- /See:/ 'newPolicyComplianceDetail' smart constructor.
data PolicyComplianceDetail = PolicyComplianceDetail'
  { -- | A timestamp that indicates when the returned information should be
    -- considered out of date.
    PolicyComplianceDetail -> Maybe POSIX
expiredAt :: Prelude.Maybe Core.POSIX,
    -- | The ID of the Firewall Manager policy.
    PolicyComplianceDetail -> Maybe Text
policyId :: Prelude.Maybe Prelude.Text,
    -- | An array of resources that aren\'t protected by the WAF or Shield
    -- Advanced policy or that aren\'t in compliance with the security group
    -- policy.
    PolicyComplianceDetail -> Maybe [ComplianceViolator]
violators :: Prelude.Maybe [ComplianceViolator],
    -- | Indicates if over 100 resources are noncompliant with the Firewall
    -- Manager policy.
    PolicyComplianceDetail -> Maybe Bool
evaluationLimitExceeded :: Prelude.Maybe Prelude.Bool,
    -- | Details about problems with dependent services, such as WAF or Config,
    -- and the error message received that indicates the problem with the
    -- service.
    PolicyComplianceDetail -> Maybe (HashMap DependentServiceName Text)
issueInfoMap :: Prelude.Maybe (Prelude.HashMap DependentServiceName Prelude.Text),
    -- | The Amazon Web Services account that created the Firewall Manager
    -- policy.
    PolicyComplianceDetail -> Maybe Text
policyOwner :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services account ID.
    PolicyComplianceDetail -> Maybe Text
memberAccount :: Prelude.Maybe Prelude.Text
  }
  deriving (PolicyComplianceDetail -> PolicyComplianceDetail -> Bool
(PolicyComplianceDetail -> PolicyComplianceDetail -> Bool)
-> (PolicyComplianceDetail -> PolicyComplianceDetail -> Bool)
-> Eq PolicyComplianceDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyComplianceDetail -> PolicyComplianceDetail -> Bool
$c/= :: PolicyComplianceDetail -> PolicyComplianceDetail -> Bool
== :: PolicyComplianceDetail -> PolicyComplianceDetail -> Bool
$c== :: PolicyComplianceDetail -> PolicyComplianceDetail -> Bool
Prelude.Eq, ReadPrec [PolicyComplianceDetail]
ReadPrec PolicyComplianceDetail
Int -> ReadS PolicyComplianceDetail
ReadS [PolicyComplianceDetail]
(Int -> ReadS PolicyComplianceDetail)
-> ReadS [PolicyComplianceDetail]
-> ReadPrec PolicyComplianceDetail
-> ReadPrec [PolicyComplianceDetail]
-> Read PolicyComplianceDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyComplianceDetail]
$creadListPrec :: ReadPrec [PolicyComplianceDetail]
readPrec :: ReadPrec PolicyComplianceDetail
$creadPrec :: ReadPrec PolicyComplianceDetail
readList :: ReadS [PolicyComplianceDetail]
$creadList :: ReadS [PolicyComplianceDetail]
readsPrec :: Int -> ReadS PolicyComplianceDetail
$creadsPrec :: Int -> ReadS PolicyComplianceDetail
Prelude.Read, Int -> PolicyComplianceDetail -> ShowS
[PolicyComplianceDetail] -> ShowS
PolicyComplianceDetail -> String
(Int -> PolicyComplianceDetail -> ShowS)
-> (PolicyComplianceDetail -> String)
-> ([PolicyComplianceDetail] -> ShowS)
-> Show PolicyComplianceDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyComplianceDetail] -> ShowS
$cshowList :: [PolicyComplianceDetail] -> ShowS
show :: PolicyComplianceDetail -> String
$cshow :: PolicyComplianceDetail -> String
showsPrec :: Int -> PolicyComplianceDetail -> ShowS
$cshowsPrec :: Int -> PolicyComplianceDetail -> ShowS
Prelude.Show, (forall x. PolicyComplianceDetail -> Rep PolicyComplianceDetail x)
-> (forall x.
    Rep PolicyComplianceDetail x -> PolicyComplianceDetail)
-> Generic PolicyComplianceDetail
forall x. Rep PolicyComplianceDetail x -> PolicyComplianceDetail
forall x. PolicyComplianceDetail -> Rep PolicyComplianceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PolicyComplianceDetail x -> PolicyComplianceDetail
$cfrom :: forall x. PolicyComplianceDetail -> Rep PolicyComplianceDetail x
Prelude.Generic)

-- |
-- Create a value of 'PolicyComplianceDetail' 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:
--
-- 'expiredAt', 'policyComplianceDetail_expiredAt' - A timestamp that indicates when the returned information should be
-- considered out of date.
--
-- 'policyId', 'policyComplianceDetail_policyId' - The ID of the Firewall Manager policy.
--
-- 'violators', 'policyComplianceDetail_violators' - An array of resources that aren\'t protected by the WAF or Shield
-- Advanced policy or that aren\'t in compliance with the security group
-- policy.
--
-- 'evaluationLimitExceeded', 'policyComplianceDetail_evaluationLimitExceeded' - Indicates if over 100 resources are noncompliant with the Firewall
-- Manager policy.
--
-- 'issueInfoMap', 'policyComplianceDetail_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', 'policyComplianceDetail_policyOwner' - The Amazon Web Services account that created the Firewall Manager
-- policy.
--
-- 'memberAccount', 'policyComplianceDetail_memberAccount' - The Amazon Web Services account ID.
newPolicyComplianceDetail ::
  PolicyComplianceDetail
newPolicyComplianceDetail :: PolicyComplianceDetail
newPolicyComplianceDetail =
  PolicyComplianceDetail' :: Maybe POSIX
-> Maybe Text
-> Maybe [ComplianceViolator]
-> Maybe Bool
-> Maybe (HashMap DependentServiceName Text)
-> Maybe Text
-> Maybe Text
-> PolicyComplianceDetail
PolicyComplianceDetail'
    { $sel:expiredAt:PolicyComplianceDetail' :: Maybe POSIX
expiredAt =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:policyId:PolicyComplianceDetail' :: Maybe Text
policyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:violators:PolicyComplianceDetail' :: Maybe [ComplianceViolator]
violators = Maybe [ComplianceViolator]
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationLimitExceeded:PolicyComplianceDetail' :: Maybe Bool
evaluationLimitExceeded = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:issueInfoMap:PolicyComplianceDetail' :: Maybe (HashMap DependentServiceName Text)
issueInfoMap = Maybe (HashMap DependentServiceName Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:policyOwner:PolicyComplianceDetail' :: Maybe Text
policyOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:memberAccount:PolicyComplianceDetail' :: Maybe Text
memberAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A timestamp that indicates when the returned information should be
-- considered out of date.
policyComplianceDetail_expiredAt :: Lens.Lens' PolicyComplianceDetail (Prelude.Maybe Prelude.UTCTime)
policyComplianceDetail_expiredAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PolicyComplianceDetail -> f PolicyComplianceDetail
policyComplianceDetail_expiredAt = (PolicyComplianceDetail -> Maybe POSIX)
-> (PolicyComplianceDetail
    -> Maybe POSIX -> PolicyComplianceDetail)
-> Lens
     PolicyComplianceDetail
     PolicyComplianceDetail
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceDetail' {Maybe POSIX
expiredAt :: Maybe POSIX
$sel:expiredAt:PolicyComplianceDetail' :: PolicyComplianceDetail -> Maybe POSIX
expiredAt} -> Maybe POSIX
expiredAt) (\s :: PolicyComplianceDetail
s@PolicyComplianceDetail' {} Maybe POSIX
a -> PolicyComplianceDetail
s {$sel:expiredAt:PolicyComplianceDetail' :: Maybe POSIX
expiredAt = Maybe POSIX
a} :: PolicyComplianceDetail) ((Maybe POSIX -> f (Maybe POSIX))
 -> PolicyComplianceDetail -> f PolicyComplianceDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PolicyComplianceDetail
-> f PolicyComplianceDetail
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 ID of the Firewall Manager policy.
policyComplianceDetail_policyId :: Lens.Lens' PolicyComplianceDetail (Prelude.Maybe Prelude.Text)
policyComplianceDetail_policyId :: (Maybe Text -> f (Maybe Text))
-> PolicyComplianceDetail -> f PolicyComplianceDetail
policyComplianceDetail_policyId = (PolicyComplianceDetail -> Maybe Text)
-> (PolicyComplianceDetail -> Maybe Text -> PolicyComplianceDetail)
-> Lens
     PolicyComplianceDetail
     PolicyComplianceDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceDetail' {Maybe Text
policyId :: Maybe Text
$sel:policyId:PolicyComplianceDetail' :: PolicyComplianceDetail -> Maybe Text
policyId} -> Maybe Text
policyId) (\s :: PolicyComplianceDetail
s@PolicyComplianceDetail' {} Maybe Text
a -> PolicyComplianceDetail
s {$sel:policyId:PolicyComplianceDetail' :: Maybe Text
policyId = Maybe Text
a} :: PolicyComplianceDetail)

-- | An array of resources that aren\'t protected by the WAF or Shield
-- Advanced policy or that aren\'t in compliance with the security group
-- policy.
policyComplianceDetail_violators :: Lens.Lens' PolicyComplianceDetail (Prelude.Maybe [ComplianceViolator])
policyComplianceDetail_violators :: (Maybe [ComplianceViolator] -> f (Maybe [ComplianceViolator]))
-> PolicyComplianceDetail -> f PolicyComplianceDetail
policyComplianceDetail_violators = (PolicyComplianceDetail -> Maybe [ComplianceViolator])
-> (PolicyComplianceDetail
    -> Maybe [ComplianceViolator] -> PolicyComplianceDetail)
-> Lens
     PolicyComplianceDetail
     PolicyComplianceDetail
     (Maybe [ComplianceViolator])
     (Maybe [ComplianceViolator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceDetail' {Maybe [ComplianceViolator]
violators :: Maybe [ComplianceViolator]
$sel:violators:PolicyComplianceDetail' :: PolicyComplianceDetail -> Maybe [ComplianceViolator]
violators} -> Maybe [ComplianceViolator]
violators) (\s :: PolicyComplianceDetail
s@PolicyComplianceDetail' {} Maybe [ComplianceViolator]
a -> PolicyComplianceDetail
s {$sel:violators:PolicyComplianceDetail' :: Maybe [ComplianceViolator]
violators = Maybe [ComplianceViolator]
a} :: PolicyComplianceDetail) ((Maybe [ComplianceViolator] -> f (Maybe [ComplianceViolator]))
 -> PolicyComplianceDetail -> f PolicyComplianceDetail)
-> ((Maybe [ComplianceViolator] -> f (Maybe [ComplianceViolator]))
    -> Maybe [ComplianceViolator] -> f (Maybe [ComplianceViolator]))
-> (Maybe [ComplianceViolator] -> f (Maybe [ComplianceViolator]))
-> PolicyComplianceDetail
-> f PolicyComplianceDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ComplianceViolator]
  [ComplianceViolator]
  [ComplianceViolator]
  [ComplianceViolator]
-> Iso
     (Maybe [ComplianceViolator])
     (Maybe [ComplianceViolator])
     (Maybe [ComplianceViolator])
     (Maybe [ComplianceViolator])
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
  [ComplianceViolator]
  [ComplianceViolator]
  [ComplianceViolator]
  [ComplianceViolator]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Indicates if over 100 resources are noncompliant with the Firewall
-- Manager policy.
policyComplianceDetail_evaluationLimitExceeded :: Lens.Lens' PolicyComplianceDetail (Prelude.Maybe Prelude.Bool)
policyComplianceDetail_evaluationLimitExceeded :: (Maybe Bool -> f (Maybe Bool))
-> PolicyComplianceDetail -> f PolicyComplianceDetail
policyComplianceDetail_evaluationLimitExceeded = (PolicyComplianceDetail -> Maybe Bool)
-> (PolicyComplianceDetail -> Maybe Bool -> PolicyComplianceDetail)
-> Lens
     PolicyComplianceDetail
     PolicyComplianceDetail
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceDetail' {Maybe Bool
evaluationLimitExceeded :: Maybe Bool
$sel:evaluationLimitExceeded:PolicyComplianceDetail' :: PolicyComplianceDetail -> Maybe Bool
evaluationLimitExceeded} -> Maybe Bool
evaluationLimitExceeded) (\s :: PolicyComplianceDetail
s@PolicyComplianceDetail' {} Maybe Bool
a -> PolicyComplianceDetail
s {$sel:evaluationLimitExceeded:PolicyComplianceDetail' :: Maybe Bool
evaluationLimitExceeded = Maybe Bool
a} :: PolicyComplianceDetail)

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

-- | The Amazon Web Services account ID.
policyComplianceDetail_memberAccount :: Lens.Lens' PolicyComplianceDetail (Prelude.Maybe Prelude.Text)
policyComplianceDetail_memberAccount :: (Maybe Text -> f (Maybe Text))
-> PolicyComplianceDetail -> f PolicyComplianceDetail
policyComplianceDetail_memberAccount = (PolicyComplianceDetail -> Maybe Text)
-> (PolicyComplianceDetail -> Maybe Text -> PolicyComplianceDetail)
-> Lens
     PolicyComplianceDetail
     PolicyComplianceDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyComplianceDetail' {Maybe Text
memberAccount :: Maybe Text
$sel:memberAccount:PolicyComplianceDetail' :: PolicyComplianceDetail -> Maybe Text
memberAccount} -> Maybe Text
memberAccount) (\s :: PolicyComplianceDetail
s@PolicyComplianceDetail' {} Maybe Text
a -> PolicyComplianceDetail
s {$sel:memberAccount:PolicyComplianceDetail' :: Maybe Text
memberAccount = Maybe Text
a} :: PolicyComplianceDetail)

instance Core.FromJSON PolicyComplianceDetail where
  parseJSON :: Value -> Parser PolicyComplianceDetail
parseJSON =
    String
-> (Object -> Parser PolicyComplianceDetail)
-> Value
-> Parser PolicyComplianceDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PolicyComplianceDetail"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe [ComplianceViolator]
-> Maybe Bool
-> Maybe (HashMap DependentServiceName Text)
-> Maybe Text
-> Maybe Text
-> PolicyComplianceDetail
PolicyComplianceDetail'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe [ComplianceViolator]
 -> Maybe Bool
 -> Maybe (HashMap DependentServiceName Text)
 -> Maybe Text
 -> Maybe Text
 -> PolicyComplianceDetail)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe [ComplianceViolator]
      -> Maybe Bool
      -> Maybe (HashMap DependentServiceName Text)
      -> Maybe Text
      -> Maybe Text
      -> PolicyComplianceDetail)
forall (f :: * -> *) a b. Functor 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
"ExpiredAt")
            Parser
  (Maybe Text
   -> Maybe [ComplianceViolator]
   -> Maybe Bool
   -> Maybe (HashMap DependentServiceName Text)
   -> Maybe Text
   -> Maybe Text
   -> PolicyComplianceDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ComplianceViolator]
      -> Maybe Bool
      -> Maybe (HashMap DependentServiceName Text)
      -> Maybe Text
      -> Maybe Text
      -> PolicyComplianceDetail)
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 [ComplianceViolator]
   -> Maybe Bool
   -> Maybe (HashMap DependentServiceName Text)
   -> Maybe Text
   -> Maybe Text
   -> PolicyComplianceDetail)
-> Parser (Maybe [ComplianceViolator])
-> Parser
     (Maybe Bool
      -> Maybe (HashMap DependentServiceName Text)
      -> Maybe Text
      -> Maybe Text
      -> PolicyComplianceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ComplianceViolator]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Violators" Parser (Maybe (Maybe [ComplianceViolator]))
-> Maybe [ComplianceViolator]
-> Parser (Maybe [ComplianceViolator])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ComplianceViolator]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Bool
   -> Maybe (HashMap DependentServiceName Text)
   -> Maybe Text
   -> Maybe Text
   -> PolicyComplianceDetail)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (HashMap DependentServiceName Text)
      -> Maybe Text -> Maybe Text -> PolicyComplianceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationLimitExceeded")
            Parser
  (Maybe (HashMap DependentServiceName Text)
   -> Maybe Text -> Maybe Text -> PolicyComplianceDetail)
-> Parser (Maybe (HashMap DependentServiceName Text))
-> Parser (Maybe Text -> Maybe Text -> PolicyComplianceDetail)
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 -> PolicyComplianceDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> PolicyComplianceDetail)
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 -> PolicyComplianceDetail)
-> Parser (Maybe Text) -> Parser PolicyComplianceDetail
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 PolicyComplianceDetail

instance Prelude.NFData PolicyComplianceDetail