{-# 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.Connect.Types.AgentStatusSummary
-- 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.Connect.Types.AgentStatusSummary where

import Amazonka.Connect.Types.AgentStatusType
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

-- | Summary information for an agent status.
--
-- /See:/ 'newAgentStatusSummary' smart constructor.
data AgentStatusSummary = AgentStatusSummary'
  { -- | The Amazon Resource Name (ARN) for the agent status.
    AgentStatusSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The identifier for an agent status.
    AgentStatusSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the agent status.
    AgentStatusSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The type of the agent status.
    AgentStatusSummary -> Maybe AgentStatusType
type' :: Prelude.Maybe AgentStatusType
  }
  deriving (AgentStatusSummary -> AgentStatusSummary -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'AgentStatusSummary' 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:
--
-- 'arn', 'agentStatusSummary_arn' - The Amazon Resource Name (ARN) for the agent status.
--
-- 'id', 'agentStatusSummary_id' - The identifier for an agent status.
--
-- 'name', 'agentStatusSummary_name' - The name of the agent status.
--
-- 'type'', 'agentStatusSummary_type' - The type of the agent status.
newAgentStatusSummary ::
  AgentStatusSummary
newAgentStatusSummary :: AgentStatusSummary
newAgentStatusSummary =
  AgentStatusSummary'
    { $sel:arn:AgentStatusSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:id:AgentStatusSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:AgentStatusSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:type':AgentStatusSummary' :: Maybe AgentStatusType
type' = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) for the agent status.
agentStatusSummary_arn :: Lens.Lens' AgentStatusSummary (Prelude.Maybe Prelude.Text)
agentStatusSummary_arn :: Lens' AgentStatusSummary (Maybe Text)
agentStatusSummary_arn = 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)

-- | The identifier for an agent status.
agentStatusSummary_id :: Lens.Lens' AgentStatusSummary (Prelude.Maybe Prelude.Text)
agentStatusSummary_id :: Lens' AgentStatusSummary (Maybe Text)
agentStatusSummary_id = 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)

-- | The name of the agent status.
agentStatusSummary_name :: Lens.Lens' AgentStatusSummary (Prelude.Maybe Prelude.Text)
agentStatusSummary_name :: Lens' AgentStatusSummary (Maybe Text)
agentStatusSummary_name = 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)

-- | The type of the agent status.
agentStatusSummary_type :: Lens.Lens' AgentStatusSummary (Prelude.Maybe AgentStatusType)
agentStatusSummary_type :: Lens' AgentStatusSummary (Maybe AgentStatusType)
agentStatusSummary_type = 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 Data.FromJSON AgentStatusSummary where
  parseJSON :: Value -> Parser AgentStatusSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AgentStatusSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AgentStatusType
-> AgentStatusSummary
AgentStatusSummary'
            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
"Arn")
            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
"Id")
            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
"Name")
            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
"Type")
      )

instance Prelude.Hashable AgentStatusSummary where
  hashWithSalt :: Int -> AgentStatusSummary -> Int
hashWithSalt Int
_salt AgentStatusSummary' {Maybe Text
Maybe AgentStatusType
type' :: Maybe AgentStatusType
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:type':AgentStatusSummary' :: AgentStatusSummary -> Maybe AgentStatusType
$sel:name:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
$sel:id:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
$sel:arn:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AgentStatusType
type'

instance Prelude.NFData AgentStatusSummary where
  rnf :: AgentStatusSummary -> ()
rnf AgentStatusSummary' {Maybe Text
Maybe AgentStatusType
type' :: Maybe AgentStatusType
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:type':AgentStatusSummary' :: AgentStatusSummary -> Maybe AgentStatusType
$sel:name:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
$sel:id:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
$sel:arn:AgentStatusSummary' :: AgentStatusSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AgentStatusType
type'