{-# 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.Support.Types.TrustedAdvisorResourcesSummary
-- 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.Support.Types.TrustedAdvisorResourcesSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details about AWS resources that were analyzed in a call to Trusted
-- Advisor DescribeTrustedAdvisorCheckSummaries.
--
-- /See:/ 'newTrustedAdvisorResourcesSummary' smart constructor.
data TrustedAdvisorResourcesSummary = TrustedAdvisorResourcesSummary'
  { -- | The number of AWS resources that were analyzed by the Trusted Advisor
    -- check.
    TrustedAdvisorResourcesSummary -> Integer
resourcesProcessed :: Prelude.Integer,
    -- | The number of AWS resources that were flagged (listed) by the Trusted
    -- Advisor check.
    TrustedAdvisorResourcesSummary -> Integer
resourcesFlagged :: Prelude.Integer,
    -- | The number of AWS resources ignored by Trusted Advisor because
    -- information was unavailable.
    TrustedAdvisorResourcesSummary -> Integer
resourcesIgnored :: Prelude.Integer,
    -- | The number of AWS resources ignored by Trusted Advisor because they were
    -- marked as suppressed by the user.
    TrustedAdvisorResourcesSummary -> Integer
resourcesSuppressed :: Prelude.Integer
  }
  deriving (TrustedAdvisorResourcesSummary
-> TrustedAdvisorResourcesSummary -> Bool
(TrustedAdvisorResourcesSummary
 -> TrustedAdvisorResourcesSummary -> Bool)
-> (TrustedAdvisorResourcesSummary
    -> TrustedAdvisorResourcesSummary -> Bool)
-> Eq TrustedAdvisorResourcesSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustedAdvisorResourcesSummary
-> TrustedAdvisorResourcesSummary -> Bool
$c/= :: TrustedAdvisorResourcesSummary
-> TrustedAdvisorResourcesSummary -> Bool
== :: TrustedAdvisorResourcesSummary
-> TrustedAdvisorResourcesSummary -> Bool
$c== :: TrustedAdvisorResourcesSummary
-> TrustedAdvisorResourcesSummary -> Bool
Prelude.Eq, ReadPrec [TrustedAdvisorResourcesSummary]
ReadPrec TrustedAdvisorResourcesSummary
Int -> ReadS TrustedAdvisorResourcesSummary
ReadS [TrustedAdvisorResourcesSummary]
(Int -> ReadS TrustedAdvisorResourcesSummary)
-> ReadS [TrustedAdvisorResourcesSummary]
-> ReadPrec TrustedAdvisorResourcesSummary
-> ReadPrec [TrustedAdvisorResourcesSummary]
-> Read TrustedAdvisorResourcesSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustedAdvisorResourcesSummary]
$creadListPrec :: ReadPrec [TrustedAdvisorResourcesSummary]
readPrec :: ReadPrec TrustedAdvisorResourcesSummary
$creadPrec :: ReadPrec TrustedAdvisorResourcesSummary
readList :: ReadS [TrustedAdvisorResourcesSummary]
$creadList :: ReadS [TrustedAdvisorResourcesSummary]
readsPrec :: Int -> ReadS TrustedAdvisorResourcesSummary
$creadsPrec :: Int -> ReadS TrustedAdvisorResourcesSummary
Prelude.Read, Int -> TrustedAdvisorResourcesSummary -> ShowS
[TrustedAdvisorResourcesSummary] -> ShowS
TrustedAdvisorResourcesSummary -> String
(Int -> TrustedAdvisorResourcesSummary -> ShowS)
-> (TrustedAdvisorResourcesSummary -> String)
-> ([TrustedAdvisorResourcesSummary] -> ShowS)
-> Show TrustedAdvisorResourcesSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustedAdvisorResourcesSummary] -> ShowS
$cshowList :: [TrustedAdvisorResourcesSummary] -> ShowS
show :: TrustedAdvisorResourcesSummary -> String
$cshow :: TrustedAdvisorResourcesSummary -> String
showsPrec :: Int -> TrustedAdvisorResourcesSummary -> ShowS
$cshowsPrec :: Int -> TrustedAdvisorResourcesSummary -> ShowS
Prelude.Show, (forall x.
 TrustedAdvisorResourcesSummary
 -> Rep TrustedAdvisorResourcesSummary x)
-> (forall x.
    Rep TrustedAdvisorResourcesSummary x
    -> TrustedAdvisorResourcesSummary)
-> Generic TrustedAdvisorResourcesSummary
forall x.
Rep TrustedAdvisorResourcesSummary x
-> TrustedAdvisorResourcesSummary
forall x.
TrustedAdvisorResourcesSummary
-> Rep TrustedAdvisorResourcesSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrustedAdvisorResourcesSummary x
-> TrustedAdvisorResourcesSummary
$cfrom :: forall x.
TrustedAdvisorResourcesSummary
-> Rep TrustedAdvisorResourcesSummary x
Prelude.Generic)

-- |
-- Create a value of 'TrustedAdvisorResourcesSummary' 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:
--
-- 'resourcesProcessed', 'trustedAdvisorResourcesSummary_resourcesProcessed' - The number of AWS resources that were analyzed by the Trusted Advisor
-- check.
--
-- 'resourcesFlagged', 'trustedAdvisorResourcesSummary_resourcesFlagged' - The number of AWS resources that were flagged (listed) by the Trusted
-- Advisor check.
--
-- 'resourcesIgnored', 'trustedAdvisorResourcesSummary_resourcesIgnored' - The number of AWS resources ignored by Trusted Advisor because
-- information was unavailable.
--
-- 'resourcesSuppressed', 'trustedAdvisorResourcesSummary_resourcesSuppressed' - The number of AWS resources ignored by Trusted Advisor because they were
-- marked as suppressed by the user.
newTrustedAdvisorResourcesSummary ::
  -- | 'resourcesProcessed'
  Prelude.Integer ->
  -- | 'resourcesFlagged'
  Prelude.Integer ->
  -- | 'resourcesIgnored'
  Prelude.Integer ->
  -- | 'resourcesSuppressed'
  Prelude.Integer ->
  TrustedAdvisorResourcesSummary
newTrustedAdvisorResourcesSummary :: Integer
-> Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary
newTrustedAdvisorResourcesSummary
  Integer
pResourcesProcessed_
  Integer
pResourcesFlagged_
  Integer
pResourcesIgnored_
  Integer
pResourcesSuppressed_ =
    TrustedAdvisorResourcesSummary' :: Integer
-> Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary
TrustedAdvisorResourcesSummary'
      { $sel:resourcesProcessed:TrustedAdvisorResourcesSummary' :: Integer
resourcesProcessed =
          Integer
pResourcesProcessed_,
        $sel:resourcesFlagged:TrustedAdvisorResourcesSummary' :: Integer
resourcesFlagged = Integer
pResourcesFlagged_,
        $sel:resourcesIgnored:TrustedAdvisorResourcesSummary' :: Integer
resourcesIgnored = Integer
pResourcesIgnored_,
        $sel:resourcesSuppressed:TrustedAdvisorResourcesSummary' :: Integer
resourcesSuppressed = Integer
pResourcesSuppressed_
      }

-- | The number of AWS resources that were analyzed by the Trusted Advisor
-- check.
trustedAdvisorResourcesSummary_resourcesProcessed :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesProcessed :: (Integer -> f Integer)
-> TrustedAdvisorResourcesSummary
-> f TrustedAdvisorResourcesSummary
trustedAdvisorResourcesSummary_resourcesProcessed = (TrustedAdvisorResourcesSummary -> Integer)
-> (TrustedAdvisorResourcesSummary
    -> Integer -> TrustedAdvisorResourcesSummary)
-> Lens
     TrustedAdvisorResourcesSummary
     TrustedAdvisorResourcesSummary
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourcesSummary' {Integer
resourcesProcessed :: Integer
$sel:resourcesProcessed:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
resourcesProcessed} -> Integer
resourcesProcessed) (\s :: TrustedAdvisorResourcesSummary
s@TrustedAdvisorResourcesSummary' {} Integer
a -> TrustedAdvisorResourcesSummary
s {$sel:resourcesProcessed:TrustedAdvisorResourcesSummary' :: Integer
resourcesProcessed = Integer
a} :: TrustedAdvisorResourcesSummary)

-- | The number of AWS resources that were flagged (listed) by the Trusted
-- Advisor check.
trustedAdvisorResourcesSummary_resourcesFlagged :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesFlagged :: (Integer -> f Integer)
-> TrustedAdvisorResourcesSummary
-> f TrustedAdvisorResourcesSummary
trustedAdvisorResourcesSummary_resourcesFlagged = (TrustedAdvisorResourcesSummary -> Integer)
-> (TrustedAdvisorResourcesSummary
    -> Integer -> TrustedAdvisorResourcesSummary)
-> Lens
     TrustedAdvisorResourcesSummary
     TrustedAdvisorResourcesSummary
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourcesSummary' {Integer
resourcesFlagged :: Integer
$sel:resourcesFlagged:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
resourcesFlagged} -> Integer
resourcesFlagged) (\s :: TrustedAdvisorResourcesSummary
s@TrustedAdvisorResourcesSummary' {} Integer
a -> TrustedAdvisorResourcesSummary
s {$sel:resourcesFlagged:TrustedAdvisorResourcesSummary' :: Integer
resourcesFlagged = Integer
a} :: TrustedAdvisorResourcesSummary)

-- | The number of AWS resources ignored by Trusted Advisor because
-- information was unavailable.
trustedAdvisorResourcesSummary_resourcesIgnored :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesIgnored :: (Integer -> f Integer)
-> TrustedAdvisorResourcesSummary
-> f TrustedAdvisorResourcesSummary
trustedAdvisorResourcesSummary_resourcesIgnored = (TrustedAdvisorResourcesSummary -> Integer)
-> (TrustedAdvisorResourcesSummary
    -> Integer -> TrustedAdvisorResourcesSummary)
-> Lens
     TrustedAdvisorResourcesSummary
     TrustedAdvisorResourcesSummary
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourcesSummary' {Integer
resourcesIgnored :: Integer
$sel:resourcesIgnored:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
resourcesIgnored} -> Integer
resourcesIgnored) (\s :: TrustedAdvisorResourcesSummary
s@TrustedAdvisorResourcesSummary' {} Integer
a -> TrustedAdvisorResourcesSummary
s {$sel:resourcesIgnored:TrustedAdvisorResourcesSummary' :: Integer
resourcesIgnored = Integer
a} :: TrustedAdvisorResourcesSummary)

-- | The number of AWS resources ignored by Trusted Advisor because they were
-- marked as suppressed by the user.
trustedAdvisorResourcesSummary_resourcesSuppressed :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesSuppressed :: (Integer -> f Integer)
-> TrustedAdvisorResourcesSummary
-> f TrustedAdvisorResourcesSummary
trustedAdvisorResourcesSummary_resourcesSuppressed = (TrustedAdvisorResourcesSummary -> Integer)
-> (TrustedAdvisorResourcesSummary
    -> Integer -> TrustedAdvisorResourcesSummary)
-> Lens
     TrustedAdvisorResourcesSummary
     TrustedAdvisorResourcesSummary
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourcesSummary' {Integer
resourcesSuppressed :: Integer
$sel:resourcesSuppressed:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
resourcesSuppressed} -> Integer
resourcesSuppressed) (\s :: TrustedAdvisorResourcesSummary
s@TrustedAdvisorResourcesSummary' {} Integer
a -> TrustedAdvisorResourcesSummary
s {$sel:resourcesSuppressed:TrustedAdvisorResourcesSummary' :: Integer
resourcesSuppressed = Integer
a} :: TrustedAdvisorResourcesSummary)

instance Core.FromJSON TrustedAdvisorResourcesSummary where
  parseJSON :: Value -> Parser TrustedAdvisorResourcesSummary
parseJSON =
    String
-> (Object -> Parser TrustedAdvisorResourcesSummary)
-> Value
-> Parser TrustedAdvisorResourcesSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TrustedAdvisorResourcesSummary"
      ( \Object
x ->
          Integer
-> Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary
TrustedAdvisorResourcesSummary'
            (Integer
 -> Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary)
-> Parser Integer
-> Parser
     (Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourcesProcessed")
            Parser
  (Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary)
-> Parser Integer
-> Parser (Integer -> Integer -> TrustedAdvisorResourcesSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourcesFlagged")
            Parser (Integer -> Integer -> TrustedAdvisorResourcesSummary)
-> Parser Integer
-> Parser (Integer -> TrustedAdvisorResourcesSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourcesIgnored")
            Parser (Integer -> TrustedAdvisorResourcesSummary)
-> Parser Integer -> Parser TrustedAdvisorResourcesSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourcesSuppressed")
      )

instance
  Prelude.Hashable
    TrustedAdvisorResourcesSummary

instance
  Prelude.NFData
    TrustedAdvisorResourcesSummary