{-# 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.Discovery.Types.CustomerConnectorInfo
-- 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.Discovery.Types.CustomerConnectorInfo where

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

-- | Inventory data for installed discovery connectors.
--
-- /See:/ 'newCustomerConnectorInfo' smart constructor.
data CustomerConnectorInfo = CustomerConnectorInfo'
  { -- | Number of active discovery connectors.
    CustomerConnectorInfo -> Int
activeConnectors :: Prelude.Int,
    -- | Number of healthy discovery connectors.
    CustomerConnectorInfo -> Int
healthyConnectors :: Prelude.Int,
    -- | Number of blacklisted discovery connectors.
    CustomerConnectorInfo -> Int
blackListedConnectors :: Prelude.Int,
    -- | Number of discovery connectors with status SHUTDOWN,
    CustomerConnectorInfo -> Int
shutdownConnectors :: Prelude.Int,
    -- | Number of unhealthy discovery connectors.
    CustomerConnectorInfo -> Int
unhealthyConnectors :: Prelude.Int,
    -- | Total number of discovery connectors.
    CustomerConnectorInfo -> Int
totalConnectors :: Prelude.Int,
    -- | Number of unknown discovery connectors.
    CustomerConnectorInfo -> Int
unknownConnectors :: Prelude.Int
  }
  deriving (CustomerConnectorInfo -> CustomerConnectorInfo -> Bool
(CustomerConnectorInfo -> CustomerConnectorInfo -> Bool)
-> (CustomerConnectorInfo -> CustomerConnectorInfo -> Bool)
-> Eq CustomerConnectorInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomerConnectorInfo -> CustomerConnectorInfo -> Bool
$c/= :: CustomerConnectorInfo -> CustomerConnectorInfo -> Bool
== :: CustomerConnectorInfo -> CustomerConnectorInfo -> Bool
$c== :: CustomerConnectorInfo -> CustomerConnectorInfo -> Bool
Prelude.Eq, ReadPrec [CustomerConnectorInfo]
ReadPrec CustomerConnectorInfo
Int -> ReadS CustomerConnectorInfo
ReadS [CustomerConnectorInfo]
(Int -> ReadS CustomerConnectorInfo)
-> ReadS [CustomerConnectorInfo]
-> ReadPrec CustomerConnectorInfo
-> ReadPrec [CustomerConnectorInfo]
-> Read CustomerConnectorInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomerConnectorInfo]
$creadListPrec :: ReadPrec [CustomerConnectorInfo]
readPrec :: ReadPrec CustomerConnectorInfo
$creadPrec :: ReadPrec CustomerConnectorInfo
readList :: ReadS [CustomerConnectorInfo]
$creadList :: ReadS [CustomerConnectorInfo]
readsPrec :: Int -> ReadS CustomerConnectorInfo
$creadsPrec :: Int -> ReadS CustomerConnectorInfo
Prelude.Read, Int -> CustomerConnectorInfo -> ShowS
[CustomerConnectorInfo] -> ShowS
CustomerConnectorInfo -> String
(Int -> CustomerConnectorInfo -> ShowS)
-> (CustomerConnectorInfo -> String)
-> ([CustomerConnectorInfo] -> ShowS)
-> Show CustomerConnectorInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomerConnectorInfo] -> ShowS
$cshowList :: [CustomerConnectorInfo] -> ShowS
show :: CustomerConnectorInfo -> String
$cshow :: CustomerConnectorInfo -> String
showsPrec :: Int -> CustomerConnectorInfo -> ShowS
$cshowsPrec :: Int -> CustomerConnectorInfo -> ShowS
Prelude.Show, (forall x. CustomerConnectorInfo -> Rep CustomerConnectorInfo x)
-> (forall x. Rep CustomerConnectorInfo x -> CustomerConnectorInfo)
-> Generic CustomerConnectorInfo
forall x. Rep CustomerConnectorInfo x -> CustomerConnectorInfo
forall x. CustomerConnectorInfo -> Rep CustomerConnectorInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomerConnectorInfo x -> CustomerConnectorInfo
$cfrom :: forall x. CustomerConnectorInfo -> Rep CustomerConnectorInfo x
Prelude.Generic)

-- |
-- Create a value of 'CustomerConnectorInfo' 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:
--
-- 'activeConnectors', 'customerConnectorInfo_activeConnectors' - Number of active discovery connectors.
--
-- 'healthyConnectors', 'customerConnectorInfo_healthyConnectors' - Number of healthy discovery connectors.
--
-- 'blackListedConnectors', 'customerConnectorInfo_blackListedConnectors' - Number of blacklisted discovery connectors.
--
-- 'shutdownConnectors', 'customerConnectorInfo_shutdownConnectors' - Number of discovery connectors with status SHUTDOWN,
--
-- 'unhealthyConnectors', 'customerConnectorInfo_unhealthyConnectors' - Number of unhealthy discovery connectors.
--
-- 'totalConnectors', 'customerConnectorInfo_totalConnectors' - Total number of discovery connectors.
--
-- 'unknownConnectors', 'customerConnectorInfo_unknownConnectors' - Number of unknown discovery connectors.
newCustomerConnectorInfo ::
  -- | 'activeConnectors'
  Prelude.Int ->
  -- | 'healthyConnectors'
  Prelude.Int ->
  -- | 'blackListedConnectors'
  Prelude.Int ->
  -- | 'shutdownConnectors'
  Prelude.Int ->
  -- | 'unhealthyConnectors'
  Prelude.Int ->
  -- | 'totalConnectors'
  Prelude.Int ->
  -- | 'unknownConnectors'
  Prelude.Int ->
  CustomerConnectorInfo
newCustomerConnectorInfo :: Int
-> Int -> Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo
newCustomerConnectorInfo
  Int
pActiveConnectors_
  Int
pHealthyConnectors_
  Int
pBlackListedConnectors_
  Int
pShutdownConnectors_
  Int
pUnhealthyConnectors_
  Int
pTotalConnectors_
  Int
pUnknownConnectors_ =
    CustomerConnectorInfo' :: Int
-> Int -> Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo
CustomerConnectorInfo'
      { $sel:activeConnectors:CustomerConnectorInfo' :: Int
activeConnectors =
          Int
pActiveConnectors_,
        $sel:healthyConnectors:CustomerConnectorInfo' :: Int
healthyConnectors = Int
pHealthyConnectors_,
        $sel:blackListedConnectors:CustomerConnectorInfo' :: Int
blackListedConnectors = Int
pBlackListedConnectors_,
        $sel:shutdownConnectors:CustomerConnectorInfo' :: Int
shutdownConnectors = Int
pShutdownConnectors_,
        $sel:unhealthyConnectors:CustomerConnectorInfo' :: Int
unhealthyConnectors = Int
pUnhealthyConnectors_,
        $sel:totalConnectors:CustomerConnectorInfo' :: Int
totalConnectors = Int
pTotalConnectors_,
        $sel:unknownConnectors:CustomerConnectorInfo' :: Int
unknownConnectors = Int
pUnknownConnectors_
      }

-- | Number of active discovery connectors.
customerConnectorInfo_activeConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_activeConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_activeConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
activeConnectors :: Int
$sel:activeConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
activeConnectors} -> Int
activeConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:activeConnectors:CustomerConnectorInfo' :: Int
activeConnectors = Int
a} :: CustomerConnectorInfo)

-- | Number of healthy discovery connectors.
customerConnectorInfo_healthyConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_healthyConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_healthyConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
healthyConnectors :: Int
$sel:healthyConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
healthyConnectors} -> Int
healthyConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:healthyConnectors:CustomerConnectorInfo' :: Int
healthyConnectors = Int
a} :: CustomerConnectorInfo)

-- | Number of blacklisted discovery connectors.
customerConnectorInfo_blackListedConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_blackListedConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_blackListedConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
blackListedConnectors :: Int
$sel:blackListedConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
blackListedConnectors} -> Int
blackListedConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:blackListedConnectors:CustomerConnectorInfo' :: Int
blackListedConnectors = Int
a} :: CustomerConnectorInfo)

-- | Number of discovery connectors with status SHUTDOWN,
customerConnectorInfo_shutdownConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_shutdownConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_shutdownConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
shutdownConnectors :: Int
$sel:shutdownConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
shutdownConnectors} -> Int
shutdownConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:shutdownConnectors:CustomerConnectorInfo' :: Int
shutdownConnectors = Int
a} :: CustomerConnectorInfo)

-- | Number of unhealthy discovery connectors.
customerConnectorInfo_unhealthyConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_unhealthyConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_unhealthyConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
unhealthyConnectors :: Int
$sel:unhealthyConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
unhealthyConnectors} -> Int
unhealthyConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:unhealthyConnectors:CustomerConnectorInfo' :: Int
unhealthyConnectors = Int
a} :: CustomerConnectorInfo)

-- | Total number of discovery connectors.
customerConnectorInfo_totalConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_totalConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_totalConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
totalConnectors :: Int
$sel:totalConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
totalConnectors} -> Int
totalConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:totalConnectors:CustomerConnectorInfo' :: Int
totalConnectors = Int
a} :: CustomerConnectorInfo)

-- | Number of unknown discovery connectors.
customerConnectorInfo_unknownConnectors :: Lens.Lens' CustomerConnectorInfo Prelude.Int
customerConnectorInfo_unknownConnectors :: (Int -> f Int) -> CustomerConnectorInfo -> f CustomerConnectorInfo
customerConnectorInfo_unknownConnectors = (CustomerConnectorInfo -> Int)
-> (CustomerConnectorInfo -> Int -> CustomerConnectorInfo)
-> Lens CustomerConnectorInfo CustomerConnectorInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerConnectorInfo' {Int
unknownConnectors :: Int
$sel:unknownConnectors:CustomerConnectorInfo' :: CustomerConnectorInfo -> Int
unknownConnectors} -> Int
unknownConnectors) (\s :: CustomerConnectorInfo
s@CustomerConnectorInfo' {} Int
a -> CustomerConnectorInfo
s {$sel:unknownConnectors:CustomerConnectorInfo' :: Int
unknownConnectors = Int
a} :: CustomerConnectorInfo)

instance Core.FromJSON CustomerConnectorInfo where
  parseJSON :: Value -> Parser CustomerConnectorInfo
parseJSON =
    String
-> (Object -> Parser CustomerConnectorInfo)
-> Value
-> Parser CustomerConnectorInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CustomerConnectorInfo"
      ( \Object
x ->
          Int
-> Int -> Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo
CustomerConnectorInfo'
            (Int
 -> Int -> Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo)
-> Parser Int
-> Parser
     (Int -> Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activeConnectors")
            Parser
  (Int -> Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo)
-> Parser Int
-> Parser
     (Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"healthyConnectors")
            Parser (Int -> Int -> Int -> Int -> Int -> CustomerConnectorInfo)
-> Parser Int
-> Parser (Int -> Int -> Int -> Int -> CustomerConnectorInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"blackListedConnectors")
            Parser (Int -> Int -> Int -> Int -> CustomerConnectorInfo)
-> Parser Int
-> Parser (Int -> Int -> Int -> CustomerConnectorInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"shutdownConnectors")
            Parser (Int -> Int -> Int -> CustomerConnectorInfo)
-> Parser Int -> Parser (Int -> Int -> CustomerConnectorInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"unhealthyConnectors")
            Parser (Int -> Int -> CustomerConnectorInfo)
-> Parser Int -> Parser (Int -> CustomerConnectorInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"totalConnectors")
            Parser (Int -> CustomerConnectorInfo)
-> Parser Int -> Parser CustomerConnectorInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"unknownConnectors")
      )

instance Prelude.Hashable CustomerConnectorInfo

instance Prelude.NFData CustomerConnectorInfo