{-# 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.RoutingProfileSummary
-- 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.RoutingProfileSummary where

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

-- | Contains summary information about a routing profile.
--
-- /See:/ 'newRoutingProfileSummary' smart constructor.
data RoutingProfileSummary = RoutingProfileSummary'
  { -- | The Amazon Resource Name (ARN) of the routing profile.
    RoutingProfileSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the routing profile.
    RoutingProfileSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the routing profile.
    RoutingProfileSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
  }
  deriving (RoutingProfileSummary -> RoutingProfileSummary -> Bool
(RoutingProfileSummary -> RoutingProfileSummary -> Bool)
-> (RoutingProfileSummary -> RoutingProfileSummary -> Bool)
-> Eq RoutingProfileSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
$c/= :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
== :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
$c== :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
Prelude.Eq, ReadPrec [RoutingProfileSummary]
ReadPrec RoutingProfileSummary
Int -> ReadS RoutingProfileSummary
ReadS [RoutingProfileSummary]
(Int -> ReadS RoutingProfileSummary)
-> ReadS [RoutingProfileSummary]
-> ReadPrec RoutingProfileSummary
-> ReadPrec [RoutingProfileSummary]
-> Read RoutingProfileSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoutingProfileSummary]
$creadListPrec :: ReadPrec [RoutingProfileSummary]
readPrec :: ReadPrec RoutingProfileSummary
$creadPrec :: ReadPrec RoutingProfileSummary
readList :: ReadS [RoutingProfileSummary]
$creadList :: ReadS [RoutingProfileSummary]
readsPrec :: Int -> ReadS RoutingProfileSummary
$creadsPrec :: Int -> ReadS RoutingProfileSummary
Prelude.Read, Int -> RoutingProfileSummary -> ShowS
[RoutingProfileSummary] -> ShowS
RoutingProfileSummary -> String
(Int -> RoutingProfileSummary -> ShowS)
-> (RoutingProfileSummary -> String)
-> ([RoutingProfileSummary] -> ShowS)
-> Show RoutingProfileSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoutingProfileSummary] -> ShowS
$cshowList :: [RoutingProfileSummary] -> ShowS
show :: RoutingProfileSummary -> String
$cshow :: RoutingProfileSummary -> String
showsPrec :: Int -> RoutingProfileSummary -> ShowS
$cshowsPrec :: Int -> RoutingProfileSummary -> ShowS
Prelude.Show, (forall x. RoutingProfileSummary -> Rep RoutingProfileSummary x)
-> (forall x. Rep RoutingProfileSummary x -> RoutingProfileSummary)
-> Generic RoutingProfileSummary
forall x. Rep RoutingProfileSummary x -> RoutingProfileSummary
forall x. RoutingProfileSummary -> Rep RoutingProfileSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RoutingProfileSummary x -> RoutingProfileSummary
$cfrom :: forall x. RoutingProfileSummary -> Rep RoutingProfileSummary x
Prelude.Generic)

-- |
-- Create a value of 'RoutingProfileSummary' 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', 'routingProfileSummary_arn' - The Amazon Resource Name (ARN) of the routing profile.
--
-- 'name', 'routingProfileSummary_name' - The name of the routing profile.
--
-- 'id', 'routingProfileSummary_id' - The identifier of the routing profile.
newRoutingProfileSummary ::
  RoutingProfileSummary
newRoutingProfileSummary :: RoutingProfileSummary
newRoutingProfileSummary =
  RoutingProfileSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> RoutingProfileSummary
RoutingProfileSummary'
    { $sel:arn:RoutingProfileSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:RoutingProfileSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:RoutingProfileSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The name of the routing profile.
routingProfileSummary_name :: Lens.Lens' RoutingProfileSummary (Prelude.Maybe Prelude.Text)
routingProfileSummary_name :: (Maybe Text -> f (Maybe Text))
-> RoutingProfileSummary -> f RoutingProfileSummary
routingProfileSummary_name = (RoutingProfileSummary -> Maybe Text)
-> (RoutingProfileSummary -> Maybe Text -> RoutingProfileSummary)
-> Lens
     RoutingProfileSummary
     RoutingProfileSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileSummary' {Maybe Text
name :: Maybe Text
$sel:name:RoutingProfileSummary' :: RoutingProfileSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: RoutingProfileSummary
s@RoutingProfileSummary' {} Maybe Text
a -> RoutingProfileSummary
s {$sel:name:RoutingProfileSummary' :: Maybe Text
name = Maybe Text
a} :: RoutingProfileSummary)

-- | The identifier of the routing profile.
routingProfileSummary_id :: Lens.Lens' RoutingProfileSummary (Prelude.Maybe Prelude.Text)
routingProfileSummary_id :: (Maybe Text -> f (Maybe Text))
-> RoutingProfileSummary -> f RoutingProfileSummary
routingProfileSummary_id = (RoutingProfileSummary -> Maybe Text)
-> (RoutingProfileSummary -> Maybe Text -> RoutingProfileSummary)
-> Lens
     RoutingProfileSummary
     RoutingProfileSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileSummary' {Maybe Text
id :: Maybe Text
$sel:id:RoutingProfileSummary' :: RoutingProfileSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: RoutingProfileSummary
s@RoutingProfileSummary' {} Maybe Text
a -> RoutingProfileSummary
s {$sel:id:RoutingProfileSummary' :: Maybe Text
id = Maybe Text
a} :: RoutingProfileSummary)

instance Core.FromJSON RoutingProfileSummary where
  parseJSON :: Value -> Parser RoutingProfileSummary
parseJSON =
    String
-> (Object -> Parser RoutingProfileSummary)
-> Value
-> Parser RoutingProfileSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RoutingProfileSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> Maybe Text -> RoutingProfileSummary
RoutingProfileSummary'
            (Maybe Text -> Maybe Text -> Maybe Text -> RoutingProfileSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RoutingProfileSummary)
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 -> RoutingProfileSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RoutingProfileSummary)
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 -> RoutingProfileSummary)
-> Parser (Maybe Text) -> Parser RoutingProfileSummary
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 RoutingProfileSummary

instance Prelude.NFData RoutingProfileSummary