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

import Amazonka.Connect.Types.QuickConnectType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains summary information about a quick connect.
--
-- /See:/ 'newQuickConnectSummary' smart constructor.
data QuickConnectSummary = QuickConnectSummary'
  { -- | The Amazon Resource Name (ARN) of the quick connect.
    QuickConnectSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The type of quick connect. In the Amazon Connect console, when you
    -- create a quick connect, you are prompted to assign one of the following
    -- types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
    QuickConnectSummary -> Maybe QuickConnectType
quickConnectType :: Prelude.Maybe QuickConnectType,
    -- | The name of the quick connect.
    QuickConnectSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the quick connect.
    QuickConnectSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
  }
  deriving (QuickConnectSummary -> QuickConnectSummary -> Bool
(QuickConnectSummary -> QuickConnectSummary -> Bool)
-> (QuickConnectSummary -> QuickConnectSummary -> Bool)
-> Eq QuickConnectSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QuickConnectSummary -> QuickConnectSummary -> Bool
$c/= :: QuickConnectSummary -> QuickConnectSummary -> Bool
== :: QuickConnectSummary -> QuickConnectSummary -> Bool
$c== :: QuickConnectSummary -> QuickConnectSummary -> Bool
Prelude.Eq, ReadPrec [QuickConnectSummary]
ReadPrec QuickConnectSummary
Int -> ReadS QuickConnectSummary
ReadS [QuickConnectSummary]
(Int -> ReadS QuickConnectSummary)
-> ReadS [QuickConnectSummary]
-> ReadPrec QuickConnectSummary
-> ReadPrec [QuickConnectSummary]
-> Read QuickConnectSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QuickConnectSummary]
$creadListPrec :: ReadPrec [QuickConnectSummary]
readPrec :: ReadPrec QuickConnectSummary
$creadPrec :: ReadPrec QuickConnectSummary
readList :: ReadS [QuickConnectSummary]
$creadList :: ReadS [QuickConnectSummary]
readsPrec :: Int -> ReadS QuickConnectSummary
$creadsPrec :: Int -> ReadS QuickConnectSummary
Prelude.Read, Int -> QuickConnectSummary -> ShowS
[QuickConnectSummary] -> ShowS
QuickConnectSummary -> String
(Int -> QuickConnectSummary -> ShowS)
-> (QuickConnectSummary -> String)
-> ([QuickConnectSummary] -> ShowS)
-> Show QuickConnectSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QuickConnectSummary] -> ShowS
$cshowList :: [QuickConnectSummary] -> ShowS
show :: QuickConnectSummary -> String
$cshow :: QuickConnectSummary -> String
showsPrec :: Int -> QuickConnectSummary -> ShowS
$cshowsPrec :: Int -> QuickConnectSummary -> ShowS
Prelude.Show, (forall x. QuickConnectSummary -> Rep QuickConnectSummary x)
-> (forall x. Rep QuickConnectSummary x -> QuickConnectSummary)
-> Generic QuickConnectSummary
forall x. Rep QuickConnectSummary x -> QuickConnectSummary
forall x. QuickConnectSummary -> Rep QuickConnectSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QuickConnectSummary x -> QuickConnectSummary
$cfrom :: forall x. QuickConnectSummary -> Rep QuickConnectSummary x
Prelude.Generic)

-- |
-- Create a value of 'QuickConnectSummary' 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', 'quickConnectSummary_arn' - The Amazon Resource Name (ARN) of the quick connect.
--
-- 'quickConnectType', 'quickConnectSummary_quickConnectType' - The type of quick connect. In the Amazon Connect console, when you
-- create a quick connect, you are prompted to assign one of the following
-- types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
--
-- 'name', 'quickConnectSummary_name' - The name of the quick connect.
--
-- 'id', 'quickConnectSummary_id' - The identifier for the quick connect.
newQuickConnectSummary ::
  QuickConnectSummary
newQuickConnectSummary :: QuickConnectSummary
newQuickConnectSummary =
  QuickConnectSummary' :: Maybe Text
-> Maybe QuickConnectType
-> Maybe Text
-> Maybe Text
-> QuickConnectSummary
QuickConnectSummary'
    { $sel:arn:QuickConnectSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:quickConnectType:QuickConnectSummary' :: Maybe QuickConnectType
quickConnectType = Maybe QuickConnectType
forall a. Maybe a
Prelude.Nothing,
      $sel:name:QuickConnectSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:QuickConnectSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the quick connect.
quickConnectSummary_arn :: Lens.Lens' QuickConnectSummary (Prelude.Maybe Prelude.Text)
quickConnectSummary_arn :: (Maybe Text -> f (Maybe Text))
-> QuickConnectSummary -> f QuickConnectSummary
quickConnectSummary_arn = (QuickConnectSummary -> Maybe Text)
-> (QuickConnectSummary -> Maybe Text -> QuickConnectSummary)
-> Lens
     QuickConnectSummary QuickConnectSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnectSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:QuickConnectSummary' :: QuickConnectSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: QuickConnectSummary
s@QuickConnectSummary' {} Maybe Text
a -> QuickConnectSummary
s {$sel:arn:QuickConnectSummary' :: Maybe Text
arn = Maybe Text
a} :: QuickConnectSummary)

-- | The type of quick connect. In the Amazon Connect console, when you
-- create a quick connect, you are prompted to assign one of the following
-- types: Agent (USER), External (PHONE_NUMBER), or Queue (QUEUE).
quickConnectSummary_quickConnectType :: Lens.Lens' QuickConnectSummary (Prelude.Maybe QuickConnectType)
quickConnectSummary_quickConnectType :: (Maybe QuickConnectType -> f (Maybe QuickConnectType))
-> QuickConnectSummary -> f QuickConnectSummary
quickConnectSummary_quickConnectType = (QuickConnectSummary -> Maybe QuickConnectType)
-> (QuickConnectSummary
    -> Maybe QuickConnectType -> QuickConnectSummary)
-> Lens
     QuickConnectSummary
     QuickConnectSummary
     (Maybe QuickConnectType)
     (Maybe QuickConnectType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnectSummary' {Maybe QuickConnectType
quickConnectType :: Maybe QuickConnectType
$sel:quickConnectType:QuickConnectSummary' :: QuickConnectSummary -> Maybe QuickConnectType
quickConnectType} -> Maybe QuickConnectType
quickConnectType) (\s :: QuickConnectSummary
s@QuickConnectSummary' {} Maybe QuickConnectType
a -> QuickConnectSummary
s {$sel:quickConnectType:QuickConnectSummary' :: Maybe QuickConnectType
quickConnectType = Maybe QuickConnectType
a} :: QuickConnectSummary)

-- | The name of the quick connect.
quickConnectSummary_name :: Lens.Lens' QuickConnectSummary (Prelude.Maybe Prelude.Text)
quickConnectSummary_name :: (Maybe Text -> f (Maybe Text))
-> QuickConnectSummary -> f QuickConnectSummary
quickConnectSummary_name = (QuickConnectSummary -> Maybe Text)
-> (QuickConnectSummary -> Maybe Text -> QuickConnectSummary)
-> Lens
     QuickConnectSummary QuickConnectSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnectSummary' {Maybe Text
name :: Maybe Text
$sel:name:QuickConnectSummary' :: QuickConnectSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: QuickConnectSummary
s@QuickConnectSummary' {} Maybe Text
a -> QuickConnectSummary
s {$sel:name:QuickConnectSummary' :: Maybe Text
name = Maybe Text
a} :: QuickConnectSummary)

-- | The identifier for the quick connect.
quickConnectSummary_id :: Lens.Lens' QuickConnectSummary (Prelude.Maybe Prelude.Text)
quickConnectSummary_id :: (Maybe Text -> f (Maybe Text))
-> QuickConnectSummary -> f QuickConnectSummary
quickConnectSummary_id = (QuickConnectSummary -> Maybe Text)
-> (QuickConnectSummary -> Maybe Text -> QuickConnectSummary)
-> Lens
     QuickConnectSummary QuickConnectSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnectSummary' {Maybe Text
id :: Maybe Text
$sel:id:QuickConnectSummary' :: QuickConnectSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: QuickConnectSummary
s@QuickConnectSummary' {} Maybe Text
a -> QuickConnectSummary
s {$sel:id:QuickConnectSummary' :: Maybe Text
id = Maybe Text
a} :: QuickConnectSummary)

instance Core.FromJSON QuickConnectSummary where
  parseJSON :: Value -> Parser QuickConnectSummary
parseJSON =
    String
-> (Object -> Parser QuickConnectSummary)
-> Value
-> Parser QuickConnectSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"QuickConnectSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe QuickConnectType
-> Maybe Text
-> Maybe Text
-> QuickConnectSummary
QuickConnectSummary'
            (Maybe Text
 -> Maybe QuickConnectType
 -> Maybe Text
 -> Maybe Text
 -> QuickConnectSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe QuickConnectType
      -> Maybe Text -> Maybe Text -> QuickConnectSummary)
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 QuickConnectType
   -> Maybe Text -> Maybe Text -> QuickConnectSummary)
-> Parser (Maybe QuickConnectType)
-> Parser (Maybe Text -> Maybe Text -> QuickConnectSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe QuickConnectType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QuickConnectType")
            Parser (Maybe Text -> Maybe Text -> QuickConnectSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> QuickConnectSummary)
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 -> QuickConnectSummary)
-> Parser (Maybe Text) -> Parser QuickConnectSummary
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")
      )

instance Prelude.Hashable QuickConnectSummary

instance Prelude.NFData QuickConnectSummary