{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Support.Types.TrustedAdvisorResourcesSummary where

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

-- | Details about Amazon Web Services resources that were analyzed in a call
-- to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.
--
-- /See:/ 'newTrustedAdvisorResourcesSummary' smart constructor.
data TrustedAdvisorResourcesSummary = TrustedAdvisorResourcesSummary'
  { -- | The number of Amazon Web Services resources that were analyzed by the
    -- Trusted Advisor check.
    TrustedAdvisorResourcesSummary -> Integer
resourcesProcessed :: Prelude.Integer,
    -- | The number of Amazon Web Services resources that were flagged (listed)
    -- by the Trusted Advisor check.
    TrustedAdvisorResourcesSummary -> Integer
resourcesFlagged :: Prelude.Integer,
    -- | The number of Amazon Web Services resources ignored by Trusted Advisor
    -- because information was unavailable.
    TrustedAdvisorResourcesSummary -> Integer
resourcesIgnored :: Prelude.Integer,
    -- | The number of Amazon Web Services resources ignored by Trusted Advisor
    -- because they were marked as suppressed by the user.
    TrustedAdvisorResourcesSummary -> Integer
resourcesSuppressed :: Prelude.Integer
  }
  deriving (TrustedAdvisorResourcesSummary
-> TrustedAdvisorResourcesSummary -> Bool
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]
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
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.
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 Amazon Web Services resources that were analyzed by the
-- Trusted Advisor check.
--
-- 'resourcesFlagged', 'trustedAdvisorResourcesSummary_resourcesFlagged' - The number of Amazon Web Services resources that were flagged (listed)
-- by the Trusted Advisor check.
--
-- 'resourcesIgnored', 'trustedAdvisorResourcesSummary_resourcesIgnored' - The number of Amazon Web Services resources ignored by Trusted Advisor
-- because information was unavailable.
--
-- 'resourcesSuppressed', 'trustedAdvisorResourcesSummary_resourcesSuppressed' - The number of Amazon Web Services 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'
      { $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 Amazon Web Services resources that were analyzed by the
-- Trusted Advisor check.
trustedAdvisorResourcesSummary_resourcesProcessed :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesProcessed :: Lens' TrustedAdvisorResourcesSummary Integer
trustedAdvisorResourcesSummary_resourcesProcessed = 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 Amazon Web Services resources that were flagged (listed)
-- by the Trusted Advisor check.
trustedAdvisorResourcesSummary_resourcesFlagged :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesFlagged :: Lens' TrustedAdvisorResourcesSummary Integer
trustedAdvisorResourcesSummary_resourcesFlagged = 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 Amazon Web Services resources ignored by Trusted Advisor
-- because information was unavailable.
trustedAdvisorResourcesSummary_resourcesIgnored :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesIgnored :: Lens' TrustedAdvisorResourcesSummary Integer
trustedAdvisorResourcesSummary_resourcesIgnored = 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 Amazon Web Services resources ignored by Trusted Advisor
-- because they were marked as suppressed by the user.
trustedAdvisorResourcesSummary_resourcesSuppressed :: Lens.Lens' TrustedAdvisorResourcesSummary Prelude.Integer
trustedAdvisorResourcesSummary_resourcesSuppressed :: Lens' TrustedAdvisorResourcesSummary Integer
trustedAdvisorResourcesSummary_resourcesSuppressed = 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 Data.FromJSON TrustedAdvisorResourcesSummary where
  parseJSON :: Value -> Parser TrustedAdvisorResourcesSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"TrustedAdvisorResourcesSummary"
      ( \Object
x ->
          Integer
-> Integer -> Integer -> Integer -> TrustedAdvisorResourcesSummary
TrustedAdvisorResourcesSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourcesProcessed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourcesFlagged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourcesIgnored")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourcesSuppressed")
      )

instance
  Prelude.Hashable
    TrustedAdvisorResourcesSummary
  where
  hashWithSalt :: Int -> TrustedAdvisorResourcesSummary -> Int
hashWithSalt
    Int
_salt
    TrustedAdvisorResourcesSummary' {Integer
resourcesSuppressed :: Integer
resourcesIgnored :: Integer
resourcesFlagged :: Integer
resourcesProcessed :: Integer
$sel:resourcesSuppressed:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
$sel:resourcesIgnored:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
$sel:resourcesFlagged:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
$sel:resourcesProcessed:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
resourcesProcessed
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
resourcesFlagged
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
resourcesIgnored
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
resourcesSuppressed

instance
  Prelude.NFData
    TrustedAdvisorResourcesSummary
  where
  rnf :: TrustedAdvisorResourcesSummary -> ()
rnf TrustedAdvisorResourcesSummary' {Integer
resourcesSuppressed :: Integer
resourcesIgnored :: Integer
resourcesFlagged :: Integer
resourcesProcessed :: Integer
$sel:resourcesSuppressed:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
$sel:resourcesIgnored:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
$sel:resourcesFlagged:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
$sel:resourcesProcessed:TrustedAdvisorResourcesSummary' :: TrustedAdvisorResourcesSummary -> Integer
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Integer
resourcesProcessed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
resourcesFlagged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
resourcesIgnored
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
resourcesSuppressed