{-# 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.DevOpsGuru.Types.AccountInsightHealth
-- 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.DevOpsGuru.Types.AccountInsightHealth 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

-- | Information about the number of open reactive and proactive insights
-- that can be used to gauge the health of your system.
--
-- /See:/ 'newAccountInsightHealth' smart constructor.
data AccountInsightHealth = AccountInsightHealth'
  { -- | An integer that specifies the number of open proactive insights in your
    -- Amazon Web Services account.
    AccountInsightHealth -> Maybe Int
openProactiveInsights :: Prelude.Maybe Prelude.Int,
    -- | An integer that specifies the number of open reactive insights in your
    -- Amazon Web Services account.
    AccountInsightHealth -> Maybe Int
openReactiveInsights :: Prelude.Maybe Prelude.Int
  }
  deriving (AccountInsightHealth -> AccountInsightHealth -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountInsightHealth -> AccountInsightHealth -> Bool
$c/= :: AccountInsightHealth -> AccountInsightHealth -> Bool
== :: AccountInsightHealth -> AccountInsightHealth -> Bool
$c== :: AccountInsightHealth -> AccountInsightHealth -> Bool
Prelude.Eq, ReadPrec [AccountInsightHealth]
ReadPrec AccountInsightHealth
Int -> ReadS AccountInsightHealth
ReadS [AccountInsightHealth]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountInsightHealth]
$creadListPrec :: ReadPrec [AccountInsightHealth]
readPrec :: ReadPrec AccountInsightHealth
$creadPrec :: ReadPrec AccountInsightHealth
readList :: ReadS [AccountInsightHealth]
$creadList :: ReadS [AccountInsightHealth]
readsPrec :: Int -> ReadS AccountInsightHealth
$creadsPrec :: Int -> ReadS AccountInsightHealth
Prelude.Read, Int -> AccountInsightHealth -> ShowS
[AccountInsightHealth] -> ShowS
AccountInsightHealth -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountInsightHealth] -> ShowS
$cshowList :: [AccountInsightHealth] -> ShowS
show :: AccountInsightHealth -> String
$cshow :: AccountInsightHealth -> String
showsPrec :: Int -> AccountInsightHealth -> ShowS
$cshowsPrec :: Int -> AccountInsightHealth -> ShowS
Prelude.Show, forall x. Rep AccountInsightHealth x -> AccountInsightHealth
forall x. AccountInsightHealth -> Rep AccountInsightHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountInsightHealth x -> AccountInsightHealth
$cfrom :: forall x. AccountInsightHealth -> Rep AccountInsightHealth x
Prelude.Generic)

-- |
-- Create a value of 'AccountInsightHealth' 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:
--
-- 'openProactiveInsights', 'accountInsightHealth_openProactiveInsights' - An integer that specifies the number of open proactive insights in your
-- Amazon Web Services account.
--
-- 'openReactiveInsights', 'accountInsightHealth_openReactiveInsights' - An integer that specifies the number of open reactive insights in your
-- Amazon Web Services account.
newAccountInsightHealth ::
  AccountInsightHealth
newAccountInsightHealth :: AccountInsightHealth
newAccountInsightHealth =
  AccountInsightHealth'
    { $sel:openProactiveInsights:AccountInsightHealth' :: Maybe Int
openProactiveInsights =
        forall a. Maybe a
Prelude.Nothing,
      $sel:openReactiveInsights:AccountInsightHealth' :: Maybe Int
openReactiveInsights = forall a. Maybe a
Prelude.Nothing
    }

-- | An integer that specifies the number of open proactive insights in your
-- Amazon Web Services account.
accountInsightHealth_openProactiveInsights :: Lens.Lens' AccountInsightHealth (Prelude.Maybe Prelude.Int)
accountInsightHealth_openProactiveInsights :: Lens' AccountInsightHealth (Maybe Int)
accountInsightHealth_openProactiveInsights = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountInsightHealth' {Maybe Int
openProactiveInsights :: Maybe Int
$sel:openProactiveInsights:AccountInsightHealth' :: AccountInsightHealth -> Maybe Int
openProactiveInsights} -> Maybe Int
openProactiveInsights) (\s :: AccountInsightHealth
s@AccountInsightHealth' {} Maybe Int
a -> AccountInsightHealth
s {$sel:openProactiveInsights:AccountInsightHealth' :: Maybe Int
openProactiveInsights = Maybe Int
a} :: AccountInsightHealth)

-- | An integer that specifies the number of open reactive insights in your
-- Amazon Web Services account.
accountInsightHealth_openReactiveInsights :: Lens.Lens' AccountInsightHealth (Prelude.Maybe Prelude.Int)
accountInsightHealth_openReactiveInsights :: Lens' AccountInsightHealth (Maybe Int)
accountInsightHealth_openReactiveInsights = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountInsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
$sel:openReactiveInsights:AccountInsightHealth' :: AccountInsightHealth -> Maybe Int
openReactiveInsights} -> Maybe Int
openReactiveInsights) (\s :: AccountInsightHealth
s@AccountInsightHealth' {} Maybe Int
a -> AccountInsightHealth
s {$sel:openReactiveInsights:AccountInsightHealth' :: Maybe Int
openReactiveInsights = Maybe Int
a} :: AccountInsightHealth)

instance Data.FromJSON AccountInsightHealth where
  parseJSON :: Value -> Parser AccountInsightHealth
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AccountInsightHealth"
      ( \Object
x ->
          Maybe Int -> Maybe Int -> AccountInsightHealth
AccountInsightHealth'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OpenProactiveInsights")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OpenReactiveInsights")
      )

instance Prelude.Hashable AccountInsightHealth where
  hashWithSalt :: Int -> AccountInsightHealth -> Int
hashWithSalt Int
_salt AccountInsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
openProactiveInsights :: Maybe Int
$sel:openReactiveInsights:AccountInsightHealth' :: AccountInsightHealth -> Maybe Int
$sel:openProactiveInsights:AccountInsightHealth' :: AccountInsightHealth -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
openProactiveInsights
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
openReactiveInsights

instance Prelude.NFData AccountInsightHealth where
  rnf :: AccountInsightHealth -> ()
rnf AccountInsightHealth' {Maybe Int
openReactiveInsights :: Maybe Int
openProactiveInsights :: Maybe Int
$sel:openReactiveInsights:AccountInsightHealth' :: AccountInsightHealth -> Maybe Int
$sel:openProactiveInsights:AccountInsightHealth' :: AccountInsightHealth -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
openProactiveInsights
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
openReactiveInsights