{-# 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.HierarchyGroup where
import Amazonka.Connect.Types.HierarchyPath
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
data HierarchyGroup = HierarchyGroup'
{
HierarchyGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
HierarchyGroup -> Maybe HierarchyPath
hierarchyPath :: Prelude.Maybe HierarchyPath,
HierarchyGroup -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
HierarchyGroup -> Maybe Text
levelId :: Prelude.Maybe Prelude.Text,
HierarchyGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
HierarchyGroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (HierarchyGroup -> HierarchyGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HierarchyGroup -> HierarchyGroup -> Bool
$c/= :: HierarchyGroup -> HierarchyGroup -> Bool
== :: HierarchyGroup -> HierarchyGroup -> Bool
$c== :: HierarchyGroup -> HierarchyGroup -> Bool
Prelude.Eq, ReadPrec [HierarchyGroup]
ReadPrec HierarchyGroup
Int -> ReadS HierarchyGroup
ReadS [HierarchyGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HierarchyGroup]
$creadListPrec :: ReadPrec [HierarchyGroup]
readPrec :: ReadPrec HierarchyGroup
$creadPrec :: ReadPrec HierarchyGroup
readList :: ReadS [HierarchyGroup]
$creadList :: ReadS [HierarchyGroup]
readsPrec :: Int -> ReadS HierarchyGroup
$creadsPrec :: Int -> ReadS HierarchyGroup
Prelude.Read, Int -> HierarchyGroup -> ShowS
[HierarchyGroup] -> ShowS
HierarchyGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HierarchyGroup] -> ShowS
$cshowList :: [HierarchyGroup] -> ShowS
show :: HierarchyGroup -> String
$cshow :: HierarchyGroup -> String
showsPrec :: Int -> HierarchyGroup -> ShowS
$cshowsPrec :: Int -> HierarchyGroup -> ShowS
Prelude.Show, forall x. Rep HierarchyGroup x -> HierarchyGroup
forall x. HierarchyGroup -> Rep HierarchyGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HierarchyGroup x -> HierarchyGroup
$cfrom :: forall x. HierarchyGroup -> Rep HierarchyGroup x
Prelude.Generic)
newHierarchyGroup ::
HierarchyGroup
newHierarchyGroup :: HierarchyGroup
newHierarchyGroup =
HierarchyGroup'
{ $sel:arn:HierarchyGroup' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:hierarchyPath:HierarchyGroup' :: Maybe HierarchyPath
hierarchyPath = forall a. Maybe a
Prelude.Nothing,
$sel:id:HierarchyGroup' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:levelId:HierarchyGroup' :: Maybe Text
levelId = forall a. Maybe a
Prelude.Nothing,
$sel:name:HierarchyGroup' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:tags:HierarchyGroup' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
hierarchyGroup_arn :: Lens.Lens' HierarchyGroup (Prelude.Maybe Prelude.Text)
hierarchyGroup_arn :: Lens' HierarchyGroup (Maybe Text)
hierarchyGroup_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:HierarchyGroup' :: HierarchyGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: HierarchyGroup
s@HierarchyGroup' {} Maybe Text
a -> HierarchyGroup
s {$sel:arn:HierarchyGroup' :: Maybe Text
arn = Maybe Text
a} :: HierarchyGroup)
hierarchyGroup_hierarchyPath :: Lens.Lens' HierarchyGroup (Prelude.Maybe HierarchyPath)
hierarchyGroup_hierarchyPath :: Lens' HierarchyGroup (Maybe HierarchyPath)
hierarchyGroup_hierarchyPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyGroup' {Maybe HierarchyPath
hierarchyPath :: Maybe HierarchyPath
$sel:hierarchyPath:HierarchyGroup' :: HierarchyGroup -> Maybe HierarchyPath
hierarchyPath} -> Maybe HierarchyPath
hierarchyPath) (\s :: HierarchyGroup
s@HierarchyGroup' {} Maybe HierarchyPath
a -> HierarchyGroup
s {$sel:hierarchyPath:HierarchyGroup' :: Maybe HierarchyPath
hierarchyPath = Maybe HierarchyPath
a} :: HierarchyGroup)
hierarchyGroup_id :: Lens.Lens' HierarchyGroup (Prelude.Maybe Prelude.Text)
hierarchyGroup_id :: Lens' HierarchyGroup (Maybe Text)
hierarchyGroup_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyGroup' {Maybe Text
id :: Maybe Text
$sel:id:HierarchyGroup' :: HierarchyGroup -> Maybe Text
id} -> Maybe Text
id) (\s :: HierarchyGroup
s@HierarchyGroup' {} Maybe Text
a -> HierarchyGroup
s {$sel:id:HierarchyGroup' :: Maybe Text
id = Maybe Text
a} :: HierarchyGroup)
hierarchyGroup_levelId :: Lens.Lens' HierarchyGroup (Prelude.Maybe Prelude.Text)
hierarchyGroup_levelId :: Lens' HierarchyGroup (Maybe Text)
hierarchyGroup_levelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyGroup' {Maybe Text
levelId :: Maybe Text
$sel:levelId:HierarchyGroup' :: HierarchyGroup -> Maybe Text
levelId} -> Maybe Text
levelId) (\s :: HierarchyGroup
s@HierarchyGroup' {} Maybe Text
a -> HierarchyGroup
s {$sel:levelId:HierarchyGroup' :: Maybe Text
levelId = Maybe Text
a} :: HierarchyGroup)
hierarchyGroup_name :: Lens.Lens' HierarchyGroup (Prelude.Maybe Prelude.Text)
hierarchyGroup_name :: Lens' HierarchyGroup (Maybe Text)
hierarchyGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyGroup' {Maybe Text
name :: Maybe Text
$sel:name:HierarchyGroup' :: HierarchyGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: HierarchyGroup
s@HierarchyGroup' {} Maybe Text
a -> HierarchyGroup
s {$sel:name:HierarchyGroup' :: Maybe Text
name = Maybe Text
a} :: HierarchyGroup)
hierarchyGroup_tags :: Lens.Lens' HierarchyGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
hierarchyGroup_tags :: Lens' HierarchyGroup (Maybe (HashMap Text Text))
hierarchyGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HierarchyGroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:HierarchyGroup' :: HierarchyGroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: HierarchyGroup
s@HierarchyGroup' {} Maybe (HashMap Text Text)
a -> HierarchyGroup
s {$sel:tags:HierarchyGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: HierarchyGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON HierarchyGroup where
parseJSON :: Value -> Parser HierarchyGroup
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HierarchyGroup"
( \Object
x ->
Maybe Text
-> Maybe HierarchyPath
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> HierarchyGroup
HierarchyGroup'
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
"HierarchyPath")
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
"LevelId")
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
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable HierarchyGroup where
hashWithSalt :: Int -> HierarchyGroup -> Int
hashWithSalt Int
_salt HierarchyGroup' {Maybe Text
Maybe (HashMap Text Text)
Maybe HierarchyPath
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
levelId :: Maybe Text
id :: Maybe Text
hierarchyPath :: Maybe HierarchyPath
arn :: Maybe Text
$sel:tags:HierarchyGroup' :: HierarchyGroup -> Maybe (HashMap Text Text)
$sel:name:HierarchyGroup' :: HierarchyGroup -> Maybe Text
$sel:levelId:HierarchyGroup' :: HierarchyGroup -> Maybe Text
$sel:id:HierarchyGroup' :: HierarchyGroup -> Maybe Text
$sel:hierarchyPath:HierarchyGroup' :: HierarchyGroup -> Maybe HierarchyPath
$sel:arn:HierarchyGroup' :: HierarchyGroup -> 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 HierarchyPath
hierarchyPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
levelId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData HierarchyGroup where
rnf :: HierarchyGroup -> ()
rnf HierarchyGroup' {Maybe Text
Maybe (HashMap Text Text)
Maybe HierarchyPath
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
levelId :: Maybe Text
id :: Maybe Text
hierarchyPath :: Maybe HierarchyPath
arn :: Maybe Text
$sel:tags:HierarchyGroup' :: HierarchyGroup -> Maybe (HashMap Text Text)
$sel:name:HierarchyGroup' :: HierarchyGroup -> Maybe Text
$sel:levelId:HierarchyGroup' :: HierarchyGroup -> Maybe Text
$sel:id:HierarchyGroup' :: HierarchyGroup -> Maybe Text
$sel:hierarchyPath:HierarchyGroup' :: HierarchyGroup -> Maybe HierarchyPath
$sel:arn:HierarchyGroup' :: HierarchyGroup -> 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 HierarchyPath
hierarchyPath
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
levelId
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 (HashMap Text Text)
tags