{-# 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 #-}
module Amazonka.Discovery.Types.CustomerAgentInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomerAgentInfo = CustomerAgentInfo'
{
CustomerAgentInfo -> Int
activeAgents :: Prelude.Int,
CustomerAgentInfo -> Int
healthyAgents :: Prelude.Int,
CustomerAgentInfo -> Int
blackListedAgents :: Prelude.Int,
CustomerAgentInfo -> Int
shutdownAgents :: Prelude.Int,
CustomerAgentInfo -> Int
unhealthyAgents :: Prelude.Int,
CustomerAgentInfo -> Int
totalAgents :: Prelude.Int,
CustomerAgentInfo -> Int
unknownAgents :: Prelude.Int
}
deriving (CustomerAgentInfo -> CustomerAgentInfo -> Bool
(CustomerAgentInfo -> CustomerAgentInfo -> Bool)
-> (CustomerAgentInfo -> CustomerAgentInfo -> Bool)
-> Eq CustomerAgentInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomerAgentInfo -> CustomerAgentInfo -> Bool
$c/= :: CustomerAgentInfo -> CustomerAgentInfo -> Bool
== :: CustomerAgentInfo -> CustomerAgentInfo -> Bool
$c== :: CustomerAgentInfo -> CustomerAgentInfo -> Bool
Prelude.Eq, ReadPrec [CustomerAgentInfo]
ReadPrec CustomerAgentInfo
Int -> ReadS CustomerAgentInfo
ReadS [CustomerAgentInfo]
(Int -> ReadS CustomerAgentInfo)
-> ReadS [CustomerAgentInfo]
-> ReadPrec CustomerAgentInfo
-> ReadPrec [CustomerAgentInfo]
-> Read CustomerAgentInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomerAgentInfo]
$creadListPrec :: ReadPrec [CustomerAgentInfo]
readPrec :: ReadPrec CustomerAgentInfo
$creadPrec :: ReadPrec CustomerAgentInfo
readList :: ReadS [CustomerAgentInfo]
$creadList :: ReadS [CustomerAgentInfo]
readsPrec :: Int -> ReadS CustomerAgentInfo
$creadsPrec :: Int -> ReadS CustomerAgentInfo
Prelude.Read, Int -> CustomerAgentInfo -> ShowS
[CustomerAgentInfo] -> ShowS
CustomerAgentInfo -> String
(Int -> CustomerAgentInfo -> ShowS)
-> (CustomerAgentInfo -> String)
-> ([CustomerAgentInfo] -> ShowS)
-> Show CustomerAgentInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomerAgentInfo] -> ShowS
$cshowList :: [CustomerAgentInfo] -> ShowS
show :: CustomerAgentInfo -> String
$cshow :: CustomerAgentInfo -> String
showsPrec :: Int -> CustomerAgentInfo -> ShowS
$cshowsPrec :: Int -> CustomerAgentInfo -> ShowS
Prelude.Show, (forall x. CustomerAgentInfo -> Rep CustomerAgentInfo x)
-> (forall x. Rep CustomerAgentInfo x -> CustomerAgentInfo)
-> Generic CustomerAgentInfo
forall x. Rep CustomerAgentInfo x -> CustomerAgentInfo
forall x. CustomerAgentInfo -> Rep CustomerAgentInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomerAgentInfo x -> CustomerAgentInfo
$cfrom :: forall x. CustomerAgentInfo -> Rep CustomerAgentInfo x
Prelude.Generic)
newCustomerAgentInfo ::
Prelude.Int ->
Prelude.Int ->
Prelude.Int ->
Prelude.Int ->
Prelude.Int ->
Prelude.Int ->
Prelude.Int ->
CustomerAgentInfo
newCustomerAgentInfo :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo
newCustomerAgentInfo
Int
pActiveAgents_
Int
pHealthyAgents_
Int
pBlackListedAgents_
Int
pShutdownAgents_
Int
pUnhealthyAgents_
Int
pTotalAgents_
Int
pUnknownAgents_ =
CustomerAgentInfo' :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo
CustomerAgentInfo'
{ $sel:activeAgents:CustomerAgentInfo' :: Int
activeAgents = Int
pActiveAgents_,
$sel:healthyAgents:CustomerAgentInfo' :: Int
healthyAgents = Int
pHealthyAgents_,
$sel:blackListedAgents:CustomerAgentInfo' :: Int
blackListedAgents = Int
pBlackListedAgents_,
$sel:shutdownAgents:CustomerAgentInfo' :: Int
shutdownAgents = Int
pShutdownAgents_,
$sel:unhealthyAgents:CustomerAgentInfo' :: Int
unhealthyAgents = Int
pUnhealthyAgents_,
$sel:totalAgents:CustomerAgentInfo' :: Int
totalAgents = Int
pTotalAgents_,
$sel:unknownAgents:CustomerAgentInfo' :: Int
unknownAgents = Int
pUnknownAgents_
}
customerAgentInfo_activeAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_activeAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_activeAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
activeAgents :: Int
$sel:activeAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
activeAgents} -> Int
activeAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:activeAgents:CustomerAgentInfo' :: Int
activeAgents = Int
a} :: CustomerAgentInfo)
customerAgentInfo_healthyAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_healthyAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_healthyAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
healthyAgents :: Int
$sel:healthyAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
healthyAgents} -> Int
healthyAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:healthyAgents:CustomerAgentInfo' :: Int
healthyAgents = Int
a} :: CustomerAgentInfo)
customerAgentInfo_blackListedAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_blackListedAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_blackListedAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
blackListedAgents :: Int
$sel:blackListedAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
blackListedAgents} -> Int
blackListedAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:blackListedAgents:CustomerAgentInfo' :: Int
blackListedAgents = Int
a} :: CustomerAgentInfo)
customerAgentInfo_shutdownAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_shutdownAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_shutdownAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
shutdownAgents :: Int
$sel:shutdownAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
shutdownAgents} -> Int
shutdownAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:shutdownAgents:CustomerAgentInfo' :: Int
shutdownAgents = Int
a} :: CustomerAgentInfo)
customerAgentInfo_unhealthyAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_unhealthyAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_unhealthyAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
unhealthyAgents :: Int
$sel:unhealthyAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
unhealthyAgents} -> Int
unhealthyAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:unhealthyAgents:CustomerAgentInfo' :: Int
unhealthyAgents = Int
a} :: CustomerAgentInfo)
customerAgentInfo_totalAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_totalAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_totalAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
totalAgents :: Int
$sel:totalAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
totalAgents} -> Int
totalAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:totalAgents:CustomerAgentInfo' :: Int
totalAgents = Int
a} :: CustomerAgentInfo)
customerAgentInfo_unknownAgents :: Lens.Lens' CustomerAgentInfo Prelude.Int
customerAgentInfo_unknownAgents :: (Int -> f Int) -> CustomerAgentInfo -> f CustomerAgentInfo
customerAgentInfo_unknownAgents = (CustomerAgentInfo -> Int)
-> (CustomerAgentInfo -> Int -> CustomerAgentInfo)
-> Lens CustomerAgentInfo CustomerAgentInfo Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerAgentInfo' {Int
unknownAgents :: Int
$sel:unknownAgents:CustomerAgentInfo' :: CustomerAgentInfo -> Int
unknownAgents} -> Int
unknownAgents) (\s :: CustomerAgentInfo
s@CustomerAgentInfo' {} Int
a -> CustomerAgentInfo
s {$sel:unknownAgents:CustomerAgentInfo' :: Int
unknownAgents = Int
a} :: CustomerAgentInfo)
instance Core.FromJSON CustomerAgentInfo where
parseJSON :: Value -> Parser CustomerAgentInfo
parseJSON =
String
-> (Object -> Parser CustomerAgentInfo)
-> Value
-> Parser CustomerAgentInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomerAgentInfo"
( \Object
x ->
Int -> Int -> Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo
CustomerAgentInfo'
(Int
-> Int -> Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo)
-> Parser Int
-> Parser
(Int -> Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo)
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
"activeAgents")
Parser
(Int -> Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo)
-> Parser Int
-> Parser (Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo)
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
"healthyAgents")
Parser (Int -> Int -> Int -> Int -> Int -> CustomerAgentInfo)
-> Parser Int
-> Parser (Int -> Int -> Int -> Int -> CustomerAgentInfo)
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
"blackListedAgents")
Parser (Int -> Int -> Int -> Int -> CustomerAgentInfo)
-> Parser Int -> Parser (Int -> Int -> Int -> CustomerAgentInfo)
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
"shutdownAgents")
Parser (Int -> Int -> Int -> CustomerAgentInfo)
-> Parser Int -> Parser (Int -> Int -> CustomerAgentInfo)
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
"unhealthyAgents")
Parser (Int -> Int -> CustomerAgentInfo)
-> Parser Int -> Parser (Int -> CustomerAgentInfo)
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
"totalAgents")
Parser (Int -> CustomerAgentInfo)
-> Parser Int -> Parser CustomerAgentInfo
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
"unknownAgents")
)
instance Prelude.Hashable CustomerAgentInfo
instance Prelude.NFData CustomerAgentInfo