{-# 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.Connect.Types.AgentStatusSummary where
import Amazonka.Connect.Types.AgentStatusType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AgentStatusSummary = AgentStatusSummary'
{
AgentStatusSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
AgentStatusSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AgentStatusSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
AgentStatusSummary -> Maybe AgentStatusType
type' :: Prelude.Maybe AgentStatusType
}
deriving (AgentStatusSummary -> AgentStatusSummary -> Bool
(AgentStatusSummary -> AgentStatusSummary -> Bool)
-> (AgentStatusSummary -> AgentStatusSummary -> Bool)
-> Eq AgentStatusSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AgentStatusSummary -> AgentStatusSummary -> Bool
$c/= :: AgentStatusSummary -> AgentStatusSummary -> Bool
== :: AgentStatusSummary -> AgentStatusSummary -> Bool
$c== :: AgentStatusSummary -> AgentStatusSummary -> Bool
Prelude.Eq, ReadPrec [AgentStatusSummary]
ReadPrec AgentStatusSummary
Int -> ReadS AgentStatusSummary
ReadS [AgentStatusSummary]
(Int -> ReadS AgentStatusSummary)
-> ReadS [AgentStatusSummary]
-> ReadPrec AgentStatusSummary
-> ReadPrec [AgentStatusSummary]
-> Read AgentStatusSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AgentStatusSummary]
$creadListPrec :: ReadPrec [AgentStatusSummary]
readPrec :: ReadPrec AgentStatusSummary
$creadPrec :: ReadPrec AgentStatusSummary
readList :: ReadS [AgentStatusSummary]
$creadList :: ReadS [AgentStatusSummary]
readsPrec :: Int -> ReadS AgentStatusSummary
$creadsPrec :: Int -> ReadS AgentStatusSummary
Prelude.Read, Int -> AgentStatusSummary -> ShowS
[AgentStatusSummary] -> ShowS
AgentStatusSummary -> String
(Int -> AgentStatusSummary -> ShowS)
-> (AgentStatusSummary -> String)
-> ([AgentStatusSummary] -> ShowS)
-> Show AgentStatusSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AgentStatusSummary] -> ShowS
$cshowList :: [AgentStatusSummary] -> ShowS
show :: AgentStatusSummary -> String
$cshow :: AgentStatusSummary -> String
showsPrec :: Int -> AgentStatusSummary -> ShowS
$cshowsPrec :: Int -> AgentStatusSummary -> ShowS
Prelude.Show, (forall x. AgentStatusSummary -> Rep AgentStatusSummary x)
-> (forall x. Rep AgentStatusSummary x -> AgentStatusSummary)
-> Generic AgentStatusSummary
forall x. Rep AgentStatusSummary x -> AgentStatusSummary
forall x. AgentStatusSummary -> Rep AgentStatusSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AgentStatusSummary x -> AgentStatusSummary
$cfrom :: forall x. AgentStatusSummary -> Rep AgentStatusSummary x
Prelude.Generic)
newAgentStatusSummary ::
AgentStatusSummary
newAgentStatusSummary :: AgentStatusSummary
newAgentStatusSummary =
AgentStatusSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AgentStatusType
-> AgentStatusSummary
AgentStatusSummary'
{ $sel:arn:AgentStatusSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:AgentStatusSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:AgentStatusSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':AgentStatusSummary' :: Maybe AgentStatusType
type' = Maybe AgentStatusType
forall a. Maybe a
Prelude.Nothing
}
agentStatusSummary_arn :: Lens.Lens' AgentStatusSummary (Prelude.Maybe Prelude.Text)
agentStatusSummary_arn :: (Maybe Text -> f (Maybe Text))
-> AgentStatusSummary -> f AgentStatusSummary
agentStatusSummary_arn = (AgentStatusSummary -> Maybe Text)
-> (AgentStatusSummary -> Maybe Text -> AgentStatusSummary)
-> Lens
AgentStatusSummary AgentStatusSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentStatusSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: AgentStatusSummary
s@AgentStatusSummary' {} Maybe Text
a -> AgentStatusSummary
s {$sel:arn:AgentStatusSummary' :: Maybe Text
arn = Maybe Text
a} :: AgentStatusSummary)
agentStatusSummary_name :: Lens.Lens' AgentStatusSummary (Prelude.Maybe Prelude.Text)
agentStatusSummary_name :: (Maybe Text -> f (Maybe Text))
-> AgentStatusSummary -> f AgentStatusSummary
agentStatusSummary_name = (AgentStatusSummary -> Maybe Text)
-> (AgentStatusSummary -> Maybe Text -> AgentStatusSummary)
-> Lens
AgentStatusSummary AgentStatusSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentStatusSummary' {Maybe Text
name :: Maybe Text
$sel:name:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: AgentStatusSummary
s@AgentStatusSummary' {} Maybe Text
a -> AgentStatusSummary
s {$sel:name:AgentStatusSummary' :: Maybe Text
name = Maybe Text
a} :: AgentStatusSummary)
agentStatusSummary_id :: Lens.Lens' AgentStatusSummary (Prelude.Maybe Prelude.Text)
agentStatusSummary_id :: (Maybe Text -> f (Maybe Text))
-> AgentStatusSummary -> f AgentStatusSummary
agentStatusSummary_id = (AgentStatusSummary -> Maybe Text)
-> (AgentStatusSummary -> Maybe Text -> AgentStatusSummary)
-> Lens
AgentStatusSummary AgentStatusSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentStatusSummary' {Maybe Text
id :: Maybe Text
$sel:id:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: AgentStatusSummary
s@AgentStatusSummary' {} Maybe Text
a -> AgentStatusSummary
s {$sel:id:AgentStatusSummary' :: Maybe Text
id = Maybe Text
a} :: AgentStatusSummary)
agentStatusSummary_type :: Lens.Lens' AgentStatusSummary (Prelude.Maybe AgentStatusType)
agentStatusSummary_type :: (Maybe AgentStatusType -> f (Maybe AgentStatusType))
-> AgentStatusSummary -> f AgentStatusSummary
agentStatusSummary_type = (AgentStatusSummary -> Maybe AgentStatusType)
-> (AgentStatusSummary
-> Maybe AgentStatusType -> AgentStatusSummary)
-> Lens
AgentStatusSummary
AgentStatusSummary
(Maybe AgentStatusType)
(Maybe AgentStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AgentStatusSummary' {Maybe AgentStatusType
type' :: Maybe AgentStatusType
$sel:type':AgentStatusSummary' :: AgentStatusSummary -> Maybe AgentStatusType
type'} -> Maybe AgentStatusType
type') (\s :: AgentStatusSummary
s@AgentStatusSummary' {} Maybe AgentStatusType
a -> AgentStatusSummary
s {$sel:type':AgentStatusSummary' :: Maybe AgentStatusType
type' = Maybe AgentStatusType
a} :: AgentStatusSummary)
instance Core.FromJSON AgentStatusSummary where
parseJSON :: Value -> Parser AgentStatusSummary
parseJSON =
String
-> (Object -> Parser AgentStatusSummary)
-> Value
-> Parser AgentStatusSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AgentStatusSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AgentStatusType
-> AgentStatusSummary
AgentStatusSummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AgentStatusType
-> AgentStatusSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe AgentStatusType -> AgentStatusSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
Parser
(Maybe Text
-> Maybe Text -> Maybe AgentStatusType -> AgentStatusSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe AgentStatusType -> AgentStatusSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser (Maybe Text -> Maybe AgentStatusType -> AgentStatusSummary)
-> Parser (Maybe Text)
-> Parser (Maybe AgentStatusType -> AgentStatusSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Id")
Parser (Maybe AgentStatusType -> AgentStatusSummary)
-> Parser (Maybe AgentStatusType) -> Parser AgentStatusSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AgentStatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
)
instance Prelude.Hashable AgentStatusSummary
instance Prelude.NFData AgentStatusSummary