{-# 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.HierarchyLevelUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HierarchyLevelUpdate = HierarchyLevelUpdate'
{
HierarchyLevelUpdate -> Text
name :: Prelude.Text
}
deriving (HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool
(HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool)
-> (HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool)
-> Eq HierarchyLevelUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool
$c/= :: HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool
== :: HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool
$c== :: HierarchyLevelUpdate -> HierarchyLevelUpdate -> Bool
Prelude.Eq, ReadPrec [HierarchyLevelUpdate]
ReadPrec HierarchyLevelUpdate
Int -> ReadS HierarchyLevelUpdate
ReadS [HierarchyLevelUpdate]
(Int -> ReadS HierarchyLevelUpdate)
-> ReadS [HierarchyLevelUpdate]
-> ReadPrec HierarchyLevelUpdate
-> ReadPrec [HierarchyLevelUpdate]
-> Read HierarchyLevelUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HierarchyLevelUpdate]
$creadListPrec :: ReadPrec [HierarchyLevelUpdate]
readPrec :: ReadPrec HierarchyLevelUpdate
$creadPrec :: ReadPrec HierarchyLevelUpdate
readList :: ReadS [HierarchyLevelUpdate]
$creadList :: ReadS [HierarchyLevelUpdate]
readsPrec :: Int -> ReadS HierarchyLevelUpdate
$creadsPrec :: Int -> ReadS HierarchyLevelUpdate
Prelude.Read, Int -> HierarchyLevelUpdate -> ShowS
[HierarchyLevelUpdate] -> ShowS
HierarchyLevelUpdate -> String
(Int -> HierarchyLevelUpdate -> ShowS)
-> (HierarchyLevelUpdate -> String)
-> ([HierarchyLevelUpdate] -> ShowS)
-> Show HierarchyLevelUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HierarchyLevelUpdate] -> ShowS
$cshowList :: [HierarchyLevelUpdate] -> ShowS
show :: HierarchyLevelUpdate -> String
$cshow :: HierarchyLevelUpdate -> String
showsPrec :: Int -> HierarchyLevelUpdate -> ShowS
$cshowsPrec :: Int -> HierarchyLevelUpdate -> ShowS
Prelude.Show, (forall x. HierarchyLevelUpdate -> Rep HierarchyLevelUpdate x)
-> (forall x. Rep HierarchyLevelUpdate x -> HierarchyLevelUpdate)
-> Generic HierarchyLevelUpdate
forall x. Rep HierarchyLevelUpdate x -> HierarchyLevelUpdate
forall x. HierarchyLevelUpdate -> Rep HierarchyLevelUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HierarchyLevelUpdate x -> HierarchyLevelUpdate
$cfrom :: forall x. HierarchyLevelUpdate -> Rep HierarchyLevelUpdate x
Prelude.Generic)
newHierarchyLevelUpdate ::
Prelude.Text ->
HierarchyLevelUpdate
newHierarchyLevelUpdate :: Text -> HierarchyLevelUpdate
newHierarchyLevelUpdate Text
pName_ =
HierarchyLevelUpdate' :: Text -> HierarchyLevelUpdate
HierarchyLevelUpdate' {$sel:name:HierarchyLevelUpdate' :: Text
name = Text
pName_}
hierarchyLevelUpdate_name :: Lens.Lens' HierarchyLevelUpdate Prelude.Text
hierarchyLevelUpdate_name :: (Text -> f Text) -> HierarchyLevelUpdate -> f HierarchyLevelUpdate
hierarchyLevelUpdate_name = (HierarchyLevelUpdate -> Text)
-> (HierarchyLevelUpdate -> Text -> HierarchyLevelUpdate)
-> Lens HierarchyLevelUpdate HierarchyLevelUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyLevelUpdate' {Text
name :: Text
$sel:name:HierarchyLevelUpdate' :: HierarchyLevelUpdate -> Text
name} -> Text
name) (\s :: HierarchyLevelUpdate
s@HierarchyLevelUpdate' {} Text
a -> HierarchyLevelUpdate
s {$sel:name:HierarchyLevelUpdate' :: Text
name = Text
a} :: HierarchyLevelUpdate)
instance Prelude.Hashable HierarchyLevelUpdate
instance Prelude.NFData HierarchyLevelUpdate
instance Core.ToJSON HierarchyLevelUpdate where
toJSON :: HierarchyLevelUpdate -> Value
toJSON HierarchyLevelUpdate' {Text
name :: Text
$sel:name:HierarchyLevelUpdate' :: HierarchyLevelUpdate -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)