{-# 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.AccessAnalyzer.Types.AnalyzerSummary
-- 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.AccessAnalyzer.Types.AnalyzerSummary where

import Amazonka.AccessAnalyzer.Types.AnalyzerStatus
import Amazonka.AccessAnalyzer.Types.StatusReason
import Amazonka.AccessAnalyzer.Types.Type
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about the analyzer.
--
-- /See:/ 'newAnalyzerSummary' smart constructor.
data AnalyzerSummary = AnalyzerSummary'
  { -- | The time at which the most recently analyzed resource was analyzed.
    AnalyzerSummary -> Maybe POSIX
lastResourceAnalyzedAt :: Prelude.Maybe Core.POSIX,
    -- | The resource that was most recently analyzed by the analyzer.
    AnalyzerSummary -> Maybe Text
lastResourceAnalyzed :: Prelude.Maybe Prelude.Text,
    -- | The @statusReason@ provides more details about the current status of the
    -- analyzer. For example, if the creation for the analyzer fails, a
    -- @Failed@ status is returned. For an analyzer with organization as the
    -- type, this failure can be due to an issue with creating the
    -- service-linked roles required in the member accounts of the Amazon Web
    -- Services organization.
    AnalyzerSummary -> Maybe StatusReason
statusReason :: Prelude.Maybe StatusReason,
    -- | The tags added to the analyzer.
    AnalyzerSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ARN of the analyzer.
    AnalyzerSummary -> Text
arn :: Prelude.Text,
    -- | A timestamp for the time at which the analyzer was created.
    AnalyzerSummary -> POSIX
createdAt :: Core.POSIX,
    -- | The name of the analyzer.
    AnalyzerSummary -> Text
name :: Prelude.Text,
    -- | The status of the analyzer. An @Active@ analyzer successfully monitors
    -- supported resources and generates new findings. The analyzer is
    -- @Disabled@ when a user action, such as removing trusted access for
    -- Identity and Access Management Access Analyzer from Organizations,
    -- causes the analyzer to stop generating new findings. The status is
    -- @Creating@ when the analyzer creation is in progress and @Failed@ when
    -- the analyzer creation has failed.
    AnalyzerSummary -> AnalyzerStatus
status :: AnalyzerStatus,
    -- | The type of analyzer, which corresponds to the zone of trust chosen for
    -- the analyzer.
    AnalyzerSummary -> Type
type' :: Type
  }
  deriving (AnalyzerSummary -> AnalyzerSummary -> Bool
(AnalyzerSummary -> AnalyzerSummary -> Bool)
-> (AnalyzerSummary -> AnalyzerSummary -> Bool)
-> Eq AnalyzerSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnalyzerSummary -> AnalyzerSummary -> Bool
$c/= :: AnalyzerSummary -> AnalyzerSummary -> Bool
== :: AnalyzerSummary -> AnalyzerSummary -> Bool
$c== :: AnalyzerSummary -> AnalyzerSummary -> Bool
Prelude.Eq, ReadPrec [AnalyzerSummary]
ReadPrec AnalyzerSummary
Int -> ReadS AnalyzerSummary
ReadS [AnalyzerSummary]
(Int -> ReadS AnalyzerSummary)
-> ReadS [AnalyzerSummary]
-> ReadPrec AnalyzerSummary
-> ReadPrec [AnalyzerSummary]
-> Read AnalyzerSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AnalyzerSummary]
$creadListPrec :: ReadPrec [AnalyzerSummary]
readPrec :: ReadPrec AnalyzerSummary
$creadPrec :: ReadPrec AnalyzerSummary
readList :: ReadS [AnalyzerSummary]
$creadList :: ReadS [AnalyzerSummary]
readsPrec :: Int -> ReadS AnalyzerSummary
$creadsPrec :: Int -> ReadS AnalyzerSummary
Prelude.Read, Int -> AnalyzerSummary -> ShowS
[AnalyzerSummary] -> ShowS
AnalyzerSummary -> String
(Int -> AnalyzerSummary -> ShowS)
-> (AnalyzerSummary -> String)
-> ([AnalyzerSummary] -> ShowS)
-> Show AnalyzerSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnalyzerSummary] -> ShowS
$cshowList :: [AnalyzerSummary] -> ShowS
show :: AnalyzerSummary -> String
$cshow :: AnalyzerSummary -> String
showsPrec :: Int -> AnalyzerSummary -> ShowS
$cshowsPrec :: Int -> AnalyzerSummary -> ShowS
Prelude.Show, (forall x. AnalyzerSummary -> Rep AnalyzerSummary x)
-> (forall x. Rep AnalyzerSummary x -> AnalyzerSummary)
-> Generic AnalyzerSummary
forall x. Rep AnalyzerSummary x -> AnalyzerSummary
forall x. AnalyzerSummary -> Rep AnalyzerSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AnalyzerSummary x -> AnalyzerSummary
$cfrom :: forall x. AnalyzerSummary -> Rep AnalyzerSummary x
Prelude.Generic)

-- |
-- Create a value of 'AnalyzerSummary' 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:
--
-- 'lastResourceAnalyzedAt', 'analyzerSummary_lastResourceAnalyzedAt' - The time at which the most recently analyzed resource was analyzed.
--
-- 'lastResourceAnalyzed', 'analyzerSummary_lastResourceAnalyzed' - The resource that was most recently analyzed by the analyzer.
--
-- 'statusReason', 'analyzerSummary_statusReason' - The @statusReason@ provides more details about the current status of the
-- analyzer. For example, if the creation for the analyzer fails, a
-- @Failed@ status is returned. For an analyzer with organization as the
-- type, this failure can be due to an issue with creating the
-- service-linked roles required in the member accounts of the Amazon Web
-- Services organization.
--
-- 'tags', 'analyzerSummary_tags' - The tags added to the analyzer.
--
-- 'arn', 'analyzerSummary_arn' - The ARN of the analyzer.
--
-- 'createdAt', 'analyzerSummary_createdAt' - A timestamp for the time at which the analyzer was created.
--
-- 'name', 'analyzerSummary_name' - The name of the analyzer.
--
-- 'status', 'analyzerSummary_status' - The status of the analyzer. An @Active@ analyzer successfully monitors
-- supported resources and generates new findings. The analyzer is
-- @Disabled@ when a user action, such as removing trusted access for
-- Identity and Access Management Access Analyzer from Organizations,
-- causes the analyzer to stop generating new findings. The status is
-- @Creating@ when the analyzer creation is in progress and @Failed@ when
-- the analyzer creation has failed.
--
-- 'type'', 'analyzerSummary_type' - The type of analyzer, which corresponds to the zone of trust chosen for
-- the analyzer.
newAnalyzerSummary ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'name'
  Prelude.Text ->
  -- | 'status'
  AnalyzerStatus ->
  -- | 'type''
  Type ->
  AnalyzerSummary
newAnalyzerSummary :: Text
-> UTCTime -> Text -> AnalyzerStatus -> Type -> AnalyzerSummary
newAnalyzerSummary
  Text
pArn_
  UTCTime
pCreatedAt_
  Text
pName_
  AnalyzerStatus
pStatus_
  Type
pType_ =
    AnalyzerSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe StatusReason
-> Maybe (HashMap Text Text)
-> Text
-> POSIX
-> Text
-> AnalyzerStatus
-> Type
-> AnalyzerSummary
AnalyzerSummary'
      { $sel:lastResourceAnalyzedAt:AnalyzerSummary' :: Maybe POSIX
lastResourceAnalyzedAt =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:lastResourceAnalyzed:AnalyzerSummary' :: Maybe Text
lastResourceAnalyzed = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:statusReason:AnalyzerSummary' :: Maybe StatusReason
statusReason = Maybe StatusReason
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:AnalyzerSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:AnalyzerSummary' :: Text
arn = Text
pArn_,
        $sel:createdAt:AnalyzerSummary' :: POSIX
createdAt = 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
pCreatedAt_,
        $sel:name:AnalyzerSummary' :: Text
name = Text
pName_,
        $sel:status:AnalyzerSummary' :: AnalyzerStatus
status = AnalyzerStatus
pStatus_,
        $sel:type':AnalyzerSummary' :: Type
type' = Type
pType_
      }

-- | The time at which the most recently analyzed resource was analyzed.
analyzerSummary_lastResourceAnalyzedAt :: Lens.Lens' AnalyzerSummary (Prelude.Maybe Prelude.UTCTime)
analyzerSummary_lastResourceAnalyzedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_lastResourceAnalyzedAt = (AnalyzerSummary -> Maybe POSIX)
-> (AnalyzerSummary -> Maybe POSIX -> AnalyzerSummary)
-> Lens AnalyzerSummary AnalyzerSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {Maybe POSIX
lastResourceAnalyzedAt :: Maybe POSIX
$sel:lastResourceAnalyzedAt:AnalyzerSummary' :: AnalyzerSummary -> Maybe POSIX
lastResourceAnalyzedAt} -> Maybe POSIX
lastResourceAnalyzedAt) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Maybe POSIX
a -> AnalyzerSummary
s {$sel:lastResourceAnalyzedAt:AnalyzerSummary' :: Maybe POSIX
lastResourceAnalyzedAt = Maybe POSIX
a} :: AnalyzerSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> AnalyzerSummary -> f AnalyzerSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AnalyzerSummary
-> f AnalyzerSummary
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 resource that was most recently analyzed by the analyzer.
analyzerSummary_lastResourceAnalyzed :: Lens.Lens' AnalyzerSummary (Prelude.Maybe Prelude.Text)
analyzerSummary_lastResourceAnalyzed :: (Maybe Text -> f (Maybe Text))
-> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_lastResourceAnalyzed = (AnalyzerSummary -> Maybe Text)
-> (AnalyzerSummary -> Maybe Text -> AnalyzerSummary)
-> Lens AnalyzerSummary AnalyzerSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {Maybe Text
lastResourceAnalyzed :: Maybe Text
$sel:lastResourceAnalyzed:AnalyzerSummary' :: AnalyzerSummary -> Maybe Text
lastResourceAnalyzed} -> Maybe Text
lastResourceAnalyzed) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Maybe Text
a -> AnalyzerSummary
s {$sel:lastResourceAnalyzed:AnalyzerSummary' :: Maybe Text
lastResourceAnalyzed = Maybe Text
a} :: AnalyzerSummary)

-- | The @statusReason@ provides more details about the current status of the
-- analyzer. For example, if the creation for the analyzer fails, a
-- @Failed@ status is returned. For an analyzer with organization as the
-- type, this failure can be due to an issue with creating the
-- service-linked roles required in the member accounts of the Amazon Web
-- Services organization.
analyzerSummary_statusReason :: Lens.Lens' AnalyzerSummary (Prelude.Maybe StatusReason)
analyzerSummary_statusReason :: (Maybe StatusReason -> f (Maybe StatusReason))
-> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_statusReason = (AnalyzerSummary -> Maybe StatusReason)
-> (AnalyzerSummary -> Maybe StatusReason -> AnalyzerSummary)
-> Lens
     AnalyzerSummary
     AnalyzerSummary
     (Maybe StatusReason)
     (Maybe StatusReason)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {Maybe StatusReason
statusReason :: Maybe StatusReason
$sel:statusReason:AnalyzerSummary' :: AnalyzerSummary -> Maybe StatusReason
statusReason} -> Maybe StatusReason
statusReason) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Maybe StatusReason
a -> AnalyzerSummary
s {$sel:statusReason:AnalyzerSummary' :: Maybe StatusReason
statusReason = Maybe StatusReason
a} :: AnalyzerSummary)

-- | The tags added to the analyzer.
analyzerSummary_tags :: Lens.Lens' AnalyzerSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
analyzerSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_tags = (AnalyzerSummary -> Maybe (HashMap Text Text))
-> (AnalyzerSummary
    -> Maybe (HashMap Text Text) -> AnalyzerSummary)
-> Lens
     AnalyzerSummary
     AnalyzerSummary
     (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 (\AnalyzerSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:AnalyzerSummary' :: AnalyzerSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Maybe (HashMap Text Text)
a -> AnalyzerSummary
s {$sel:tags:AnalyzerSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: AnalyzerSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AnalyzerSummary -> f AnalyzerSummary)
-> ((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)))
-> AnalyzerSummary
-> f AnalyzerSummary
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

-- | The ARN of the analyzer.
analyzerSummary_arn :: Lens.Lens' AnalyzerSummary Prelude.Text
analyzerSummary_arn :: (Text -> f Text) -> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_arn = (AnalyzerSummary -> Text)
-> (AnalyzerSummary -> Text -> AnalyzerSummary)
-> Lens AnalyzerSummary AnalyzerSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {Text
arn :: Text
$sel:arn:AnalyzerSummary' :: AnalyzerSummary -> Text
arn} -> Text
arn) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Text
a -> AnalyzerSummary
s {$sel:arn:AnalyzerSummary' :: Text
arn = Text
a} :: AnalyzerSummary)

-- | A timestamp for the time at which the analyzer was created.
analyzerSummary_createdAt :: Lens.Lens' AnalyzerSummary Prelude.UTCTime
analyzerSummary_createdAt :: (UTCTime -> f UTCTime) -> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_createdAt = (AnalyzerSummary -> POSIX)
-> (AnalyzerSummary -> POSIX -> AnalyzerSummary)
-> Lens AnalyzerSummary AnalyzerSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:AnalyzerSummary' :: AnalyzerSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} POSIX
a -> AnalyzerSummary
s {$sel:createdAt:AnalyzerSummary' :: POSIX
createdAt = POSIX
a} :: AnalyzerSummary) ((POSIX -> f POSIX) -> AnalyzerSummary -> f AnalyzerSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AnalyzerSummary
-> f AnalyzerSummary
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

-- | The name of the analyzer.
analyzerSummary_name :: Lens.Lens' AnalyzerSummary Prelude.Text
analyzerSummary_name :: (Text -> f Text) -> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_name = (AnalyzerSummary -> Text)
-> (AnalyzerSummary -> Text -> AnalyzerSummary)
-> Lens AnalyzerSummary AnalyzerSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {Text
name :: Text
$sel:name:AnalyzerSummary' :: AnalyzerSummary -> Text
name} -> Text
name) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Text
a -> AnalyzerSummary
s {$sel:name:AnalyzerSummary' :: Text
name = Text
a} :: AnalyzerSummary)

-- | The status of the analyzer. An @Active@ analyzer successfully monitors
-- supported resources and generates new findings. The analyzer is
-- @Disabled@ when a user action, such as removing trusted access for
-- Identity and Access Management Access Analyzer from Organizations,
-- causes the analyzer to stop generating new findings. The status is
-- @Creating@ when the analyzer creation is in progress and @Failed@ when
-- the analyzer creation has failed.
analyzerSummary_status :: Lens.Lens' AnalyzerSummary AnalyzerStatus
analyzerSummary_status :: (AnalyzerStatus -> f AnalyzerStatus)
-> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_status = (AnalyzerSummary -> AnalyzerStatus)
-> (AnalyzerSummary -> AnalyzerStatus -> AnalyzerSummary)
-> Lens
     AnalyzerSummary AnalyzerSummary AnalyzerStatus AnalyzerStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {AnalyzerStatus
status :: AnalyzerStatus
$sel:status:AnalyzerSummary' :: AnalyzerSummary -> AnalyzerStatus
status} -> AnalyzerStatus
status) (\s :: AnalyzerSummary
s@AnalyzerSummary' {} AnalyzerStatus
a -> AnalyzerSummary
s {$sel:status:AnalyzerSummary' :: AnalyzerStatus
status = AnalyzerStatus
a} :: AnalyzerSummary)

-- | The type of analyzer, which corresponds to the zone of trust chosen for
-- the analyzer.
analyzerSummary_type :: Lens.Lens' AnalyzerSummary Type
analyzerSummary_type :: (Type -> f Type) -> AnalyzerSummary -> f AnalyzerSummary
analyzerSummary_type = (AnalyzerSummary -> Type)
-> (AnalyzerSummary -> Type -> AnalyzerSummary)
-> Lens AnalyzerSummary AnalyzerSummary Type Type
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AnalyzerSummary' {Type
type' :: Type
$sel:type':AnalyzerSummary' :: AnalyzerSummary -> Type
type'} -> Type
type') (\s :: AnalyzerSummary
s@AnalyzerSummary' {} Type
a -> AnalyzerSummary
s {$sel:type':AnalyzerSummary' :: Type
type' = Type
a} :: AnalyzerSummary)

instance Core.FromJSON AnalyzerSummary where
  parseJSON :: Value -> Parser AnalyzerSummary
parseJSON =
    String
-> (Object -> Parser AnalyzerSummary)
-> Value
-> Parser AnalyzerSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AnalyzerSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe StatusReason
-> Maybe (HashMap Text Text)
-> Text
-> POSIX
-> Text
-> AnalyzerStatus
-> Type
-> AnalyzerSummary
AnalyzerSummary'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe StatusReason
 -> Maybe (HashMap Text Text)
 -> Text
 -> POSIX
 -> Text
 -> AnalyzerStatus
 -> Type
 -> AnalyzerSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe StatusReason
      -> Maybe (HashMap Text Text)
      -> Text
      -> POSIX
      -> Text
      -> AnalyzerStatus
      -> Type
      -> AnalyzerSummary)
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
"lastResourceAnalyzedAt")
            Parser
  (Maybe Text
   -> Maybe StatusReason
   -> Maybe (HashMap Text Text)
   -> Text
   -> POSIX
   -> Text
   -> AnalyzerStatus
   -> Type
   -> AnalyzerSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe StatusReason
      -> Maybe (HashMap Text Text)
      -> Text
      -> POSIX
      -> Text
      -> AnalyzerStatus
      -> Type
      -> AnalyzerSummary)
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
"lastResourceAnalyzed")
            Parser
  (Maybe StatusReason
   -> Maybe (HashMap Text Text)
   -> Text
   -> POSIX
   -> Text
   -> AnalyzerStatus
   -> Type
   -> AnalyzerSummary)
-> Parser (Maybe StatusReason)
-> Parser
     (Maybe (HashMap Text Text)
      -> Text
      -> POSIX
      -> Text
      -> AnalyzerStatus
      -> Type
      -> AnalyzerSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StatusReason)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusReason")
            Parser
  (Maybe (HashMap Text Text)
   -> Text
   -> POSIX
   -> Text
   -> AnalyzerStatus
   -> Type
   -> AnalyzerSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> POSIX -> Text -> AnalyzerStatus -> Type -> AnalyzerSummary)
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
"tags" 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
  (Text
   -> POSIX -> Text -> AnalyzerStatus -> Type -> AnalyzerSummary)
-> Parser Text
-> Parser
     (POSIX -> Text -> AnalyzerStatus -> Type -> AnalyzerSummary)
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
"arn")
            Parser (POSIX -> Text -> AnalyzerStatus -> Type -> AnalyzerSummary)
-> Parser POSIX
-> Parser (Text -> AnalyzerStatus -> Type -> AnalyzerSummary)
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
"createdAt")
            Parser (Text -> AnalyzerStatus -> Type -> AnalyzerSummary)
-> Parser Text
-> Parser (AnalyzerStatus -> Type -> AnalyzerSummary)
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
"name")
            Parser (AnalyzerStatus -> Type -> AnalyzerSummary)
-> Parser AnalyzerStatus -> Parser (Type -> AnalyzerSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AnalyzerStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
            Parser (Type -> AnalyzerSummary)
-> Parser Type -> Parser AnalyzerSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Type
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
      )

instance Prelude.Hashable AnalyzerSummary

instance Prelude.NFData AnalyzerSummary