{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.CreateUserHierarchyGroup
-- 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)
--
-- Creates a new user hierarchy group.
module Amazonka.Connect.CreateUserHierarchyGroup
  ( -- * Creating a Request
    CreateUserHierarchyGroup (..),
    newCreateUserHierarchyGroup,

    -- * Request Lenses
    createUserHierarchyGroup_parentGroupId,
    createUserHierarchyGroup_name,
    createUserHierarchyGroup_instanceId,

    -- * Destructuring the Response
    CreateUserHierarchyGroupResponse (..),
    newCreateUserHierarchyGroupResponse,

    -- * Response Lenses
    createUserHierarchyGroupResponse_hierarchyGroupArn,
    createUserHierarchyGroupResponse_hierarchyGroupId,
    createUserHierarchyGroupResponse_httpStatus,
  )
where

import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateUserHierarchyGroup' smart constructor.
data CreateUserHierarchyGroup = CreateUserHierarchyGroup'
  { -- | The identifier for the parent hierarchy group. The user hierarchy is
    -- created at level one if the parent group ID is null.
    CreateUserHierarchyGroup -> Maybe Text
parentGroupId :: Prelude.Maybe Prelude.Text,
    -- | The name of the user hierarchy group. Must not be more than 100
    -- characters.
    CreateUserHierarchyGroup -> Text
name :: Prelude.Text,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    CreateUserHierarchyGroup -> Text
instanceId :: Prelude.Text
  }
  deriving (CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool
(CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool)
-> (CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool)
-> Eq CreateUserHierarchyGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool
$c/= :: CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool
== :: CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool
$c== :: CreateUserHierarchyGroup -> CreateUserHierarchyGroup -> Bool
Prelude.Eq, ReadPrec [CreateUserHierarchyGroup]
ReadPrec CreateUserHierarchyGroup
Int -> ReadS CreateUserHierarchyGroup
ReadS [CreateUserHierarchyGroup]
(Int -> ReadS CreateUserHierarchyGroup)
-> ReadS [CreateUserHierarchyGroup]
-> ReadPrec CreateUserHierarchyGroup
-> ReadPrec [CreateUserHierarchyGroup]
-> Read CreateUserHierarchyGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUserHierarchyGroup]
$creadListPrec :: ReadPrec [CreateUserHierarchyGroup]
readPrec :: ReadPrec CreateUserHierarchyGroup
$creadPrec :: ReadPrec CreateUserHierarchyGroup
readList :: ReadS [CreateUserHierarchyGroup]
$creadList :: ReadS [CreateUserHierarchyGroup]
readsPrec :: Int -> ReadS CreateUserHierarchyGroup
$creadsPrec :: Int -> ReadS CreateUserHierarchyGroup
Prelude.Read, Int -> CreateUserHierarchyGroup -> ShowS
[CreateUserHierarchyGroup] -> ShowS
CreateUserHierarchyGroup -> String
(Int -> CreateUserHierarchyGroup -> ShowS)
-> (CreateUserHierarchyGroup -> String)
-> ([CreateUserHierarchyGroup] -> ShowS)
-> Show CreateUserHierarchyGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserHierarchyGroup] -> ShowS
$cshowList :: [CreateUserHierarchyGroup] -> ShowS
show :: CreateUserHierarchyGroup -> String
$cshow :: CreateUserHierarchyGroup -> String
showsPrec :: Int -> CreateUserHierarchyGroup -> ShowS
$cshowsPrec :: Int -> CreateUserHierarchyGroup -> ShowS
Prelude.Show, (forall x.
 CreateUserHierarchyGroup -> Rep CreateUserHierarchyGroup x)
-> (forall x.
    Rep CreateUserHierarchyGroup x -> CreateUserHierarchyGroup)
-> Generic CreateUserHierarchyGroup
forall x.
Rep CreateUserHierarchyGroup x -> CreateUserHierarchyGroup
forall x.
CreateUserHierarchyGroup -> Rep CreateUserHierarchyGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUserHierarchyGroup x -> CreateUserHierarchyGroup
$cfrom :: forall x.
CreateUserHierarchyGroup -> Rep CreateUserHierarchyGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateUserHierarchyGroup' 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:
--
-- 'parentGroupId', 'createUserHierarchyGroup_parentGroupId' - The identifier for the parent hierarchy group. The user hierarchy is
-- created at level one if the parent group ID is null.
--
-- 'name', 'createUserHierarchyGroup_name' - The name of the user hierarchy group. Must not be more than 100
-- characters.
--
-- 'instanceId', 'createUserHierarchyGroup_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newCreateUserHierarchyGroup ::
  -- | 'name'
  Prelude.Text ->
  -- | 'instanceId'
  Prelude.Text ->
  CreateUserHierarchyGroup
newCreateUserHierarchyGroup :: Text -> Text -> CreateUserHierarchyGroup
newCreateUserHierarchyGroup Text
pName_ Text
pInstanceId_ =
  CreateUserHierarchyGroup' :: Maybe Text -> Text -> Text -> CreateUserHierarchyGroup
CreateUserHierarchyGroup'
    { $sel:parentGroupId:CreateUserHierarchyGroup' :: Maybe Text
parentGroupId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateUserHierarchyGroup' :: Text
name = Text
pName_,
      $sel:instanceId:CreateUserHierarchyGroup' :: Text
instanceId = Text
pInstanceId_
    }

-- | The identifier for the parent hierarchy group. The user hierarchy is
-- created at level one if the parent group ID is null.
createUserHierarchyGroup_parentGroupId :: Lens.Lens' CreateUserHierarchyGroup (Prelude.Maybe Prelude.Text)
createUserHierarchyGroup_parentGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateUserHierarchyGroup -> f CreateUserHierarchyGroup
createUserHierarchyGroup_parentGroupId = (CreateUserHierarchyGroup -> Maybe Text)
-> (CreateUserHierarchyGroup
    -> Maybe Text -> CreateUserHierarchyGroup)
-> Lens
     CreateUserHierarchyGroup
     CreateUserHierarchyGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserHierarchyGroup' {Maybe Text
parentGroupId :: Maybe Text
$sel:parentGroupId:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Maybe Text
parentGroupId} -> Maybe Text
parentGroupId) (\s :: CreateUserHierarchyGroup
s@CreateUserHierarchyGroup' {} Maybe Text
a -> CreateUserHierarchyGroup
s {$sel:parentGroupId:CreateUserHierarchyGroup' :: Maybe Text
parentGroupId = Maybe Text
a} :: CreateUserHierarchyGroup)

-- | The name of the user hierarchy group. Must not be more than 100
-- characters.
createUserHierarchyGroup_name :: Lens.Lens' CreateUserHierarchyGroup Prelude.Text
createUserHierarchyGroup_name :: (Text -> f Text)
-> CreateUserHierarchyGroup -> f CreateUserHierarchyGroup
createUserHierarchyGroup_name = (CreateUserHierarchyGroup -> Text)
-> (CreateUserHierarchyGroup -> Text -> CreateUserHierarchyGroup)
-> Lens CreateUserHierarchyGroup CreateUserHierarchyGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserHierarchyGroup' {Text
name :: Text
$sel:name:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Text
name} -> Text
name) (\s :: CreateUserHierarchyGroup
s@CreateUserHierarchyGroup' {} Text
a -> CreateUserHierarchyGroup
s {$sel:name:CreateUserHierarchyGroup' :: Text
name = Text
a} :: CreateUserHierarchyGroup)

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
createUserHierarchyGroup_instanceId :: Lens.Lens' CreateUserHierarchyGroup Prelude.Text
createUserHierarchyGroup_instanceId :: (Text -> f Text)
-> CreateUserHierarchyGroup -> f CreateUserHierarchyGroup
createUserHierarchyGroup_instanceId = (CreateUserHierarchyGroup -> Text)
-> (CreateUserHierarchyGroup -> Text -> CreateUserHierarchyGroup)
-> Lens CreateUserHierarchyGroup CreateUserHierarchyGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserHierarchyGroup' {Text
instanceId :: Text
$sel:instanceId:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Text
instanceId} -> Text
instanceId) (\s :: CreateUserHierarchyGroup
s@CreateUserHierarchyGroup' {} Text
a -> CreateUserHierarchyGroup
s {$sel:instanceId:CreateUserHierarchyGroup' :: Text
instanceId = Text
a} :: CreateUserHierarchyGroup)

instance Core.AWSRequest CreateUserHierarchyGroup where
  type
    AWSResponse CreateUserHierarchyGroup =
      CreateUserHierarchyGroupResponse
  request :: CreateUserHierarchyGroup -> Request CreateUserHierarchyGroup
request = Service
-> CreateUserHierarchyGroup -> Request CreateUserHierarchyGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateUserHierarchyGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateUserHierarchyGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateUserHierarchyGroup))
-> Logger
-> Service
-> Proxy CreateUserHierarchyGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateUserHierarchyGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Text -> Int -> CreateUserHierarchyGroupResponse
CreateUserHierarchyGroupResponse'
            (Maybe Text
 -> Maybe Text -> Int -> CreateUserHierarchyGroupResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> CreateUserHierarchyGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HierarchyGroupArn")
            Either
  String (Maybe Text -> Int -> CreateUserHierarchyGroupResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateUserHierarchyGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HierarchyGroupId")
            Either String (Int -> CreateUserHierarchyGroupResponse)
-> Either String Int
-> Either String CreateUserHierarchyGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateUserHierarchyGroup

instance Prelude.NFData CreateUserHierarchyGroup

instance Core.ToHeaders CreateUserHierarchyGroup where
  toHeaders :: CreateUserHierarchyGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateUserHierarchyGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateUserHierarchyGroup where
  toJSON :: CreateUserHierarchyGroup -> Value
toJSON CreateUserHierarchyGroup' {Maybe Text
Text
instanceId :: Text
name :: Text
parentGroupId :: Maybe Text
$sel:instanceId:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Text
$sel:name:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Text
$sel:parentGroupId:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ParentGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
parentGroupId,
            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)
          ]
      )

instance Core.ToPath CreateUserHierarchyGroup where
  toPath :: CreateUserHierarchyGroup -> ByteString
toPath CreateUserHierarchyGroup' {Maybe Text
Text
instanceId :: Text
name :: Text
parentGroupId :: Maybe Text
$sel:instanceId:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Text
$sel:name:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Text
$sel:parentGroupId:CreateUserHierarchyGroup' :: CreateUserHierarchyGroup -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/user-hierarchy-groups/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId]

instance Core.ToQuery CreateUserHierarchyGroup where
  toQuery :: CreateUserHierarchyGroup -> QueryString
toQuery = QueryString -> CreateUserHierarchyGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateUserHierarchyGroupResponse' smart constructor.
data CreateUserHierarchyGroupResponse = CreateUserHierarchyGroupResponse'
  { -- | The Amazon Resource Name (ARN) of the hierarchy group.
    CreateUserHierarchyGroupResponse -> Maybe Text
hierarchyGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the hierarchy group.
    CreateUserHierarchyGroupResponse -> Maybe Text
hierarchyGroupId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateUserHierarchyGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateUserHierarchyGroupResponse
-> CreateUserHierarchyGroupResponse -> Bool
(CreateUserHierarchyGroupResponse
 -> CreateUserHierarchyGroupResponse -> Bool)
-> (CreateUserHierarchyGroupResponse
    -> CreateUserHierarchyGroupResponse -> Bool)
-> Eq CreateUserHierarchyGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserHierarchyGroupResponse
-> CreateUserHierarchyGroupResponse -> Bool
$c/= :: CreateUserHierarchyGroupResponse
-> CreateUserHierarchyGroupResponse -> Bool
== :: CreateUserHierarchyGroupResponse
-> CreateUserHierarchyGroupResponse -> Bool
$c== :: CreateUserHierarchyGroupResponse
-> CreateUserHierarchyGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateUserHierarchyGroupResponse]
ReadPrec CreateUserHierarchyGroupResponse
Int -> ReadS CreateUserHierarchyGroupResponse
ReadS [CreateUserHierarchyGroupResponse]
(Int -> ReadS CreateUserHierarchyGroupResponse)
-> ReadS [CreateUserHierarchyGroupResponse]
-> ReadPrec CreateUserHierarchyGroupResponse
-> ReadPrec [CreateUserHierarchyGroupResponse]
-> Read CreateUserHierarchyGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUserHierarchyGroupResponse]
$creadListPrec :: ReadPrec [CreateUserHierarchyGroupResponse]
readPrec :: ReadPrec CreateUserHierarchyGroupResponse
$creadPrec :: ReadPrec CreateUserHierarchyGroupResponse
readList :: ReadS [CreateUserHierarchyGroupResponse]
$creadList :: ReadS [CreateUserHierarchyGroupResponse]
readsPrec :: Int -> ReadS CreateUserHierarchyGroupResponse
$creadsPrec :: Int -> ReadS CreateUserHierarchyGroupResponse
Prelude.Read, Int -> CreateUserHierarchyGroupResponse -> ShowS
[CreateUserHierarchyGroupResponse] -> ShowS
CreateUserHierarchyGroupResponse -> String
(Int -> CreateUserHierarchyGroupResponse -> ShowS)
-> (CreateUserHierarchyGroupResponse -> String)
-> ([CreateUserHierarchyGroupResponse] -> ShowS)
-> Show CreateUserHierarchyGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserHierarchyGroupResponse] -> ShowS
$cshowList :: [CreateUserHierarchyGroupResponse] -> ShowS
show :: CreateUserHierarchyGroupResponse -> String
$cshow :: CreateUserHierarchyGroupResponse -> String
showsPrec :: Int -> CreateUserHierarchyGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateUserHierarchyGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateUserHierarchyGroupResponse
 -> Rep CreateUserHierarchyGroupResponse x)
-> (forall x.
    Rep CreateUserHierarchyGroupResponse x
    -> CreateUserHierarchyGroupResponse)
-> Generic CreateUserHierarchyGroupResponse
forall x.
Rep CreateUserHierarchyGroupResponse x
-> CreateUserHierarchyGroupResponse
forall x.
CreateUserHierarchyGroupResponse
-> Rep CreateUserHierarchyGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUserHierarchyGroupResponse x
-> CreateUserHierarchyGroupResponse
$cfrom :: forall x.
CreateUserHierarchyGroupResponse
-> Rep CreateUserHierarchyGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateUserHierarchyGroupResponse' 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:
--
-- 'hierarchyGroupArn', 'createUserHierarchyGroupResponse_hierarchyGroupArn' - The Amazon Resource Name (ARN) of the hierarchy group.
--
-- 'hierarchyGroupId', 'createUserHierarchyGroupResponse_hierarchyGroupId' - The identifier of the hierarchy group.
--
-- 'httpStatus', 'createUserHierarchyGroupResponse_httpStatus' - The response's http status code.
newCreateUserHierarchyGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateUserHierarchyGroupResponse
newCreateUserHierarchyGroupResponse :: Int -> CreateUserHierarchyGroupResponse
newCreateUserHierarchyGroupResponse Int
pHttpStatus_ =
  CreateUserHierarchyGroupResponse' :: Maybe Text -> Maybe Text -> Int -> CreateUserHierarchyGroupResponse
CreateUserHierarchyGroupResponse'
    { $sel:hierarchyGroupArn:CreateUserHierarchyGroupResponse' :: Maybe Text
hierarchyGroupArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hierarchyGroupId:CreateUserHierarchyGroupResponse' :: Maybe Text
hierarchyGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateUserHierarchyGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the hierarchy group.
createUserHierarchyGroupResponse_hierarchyGroupArn :: Lens.Lens' CreateUserHierarchyGroupResponse (Prelude.Maybe Prelude.Text)
createUserHierarchyGroupResponse_hierarchyGroupArn :: (Maybe Text -> f (Maybe Text))
-> CreateUserHierarchyGroupResponse
-> f CreateUserHierarchyGroupResponse
createUserHierarchyGroupResponse_hierarchyGroupArn = (CreateUserHierarchyGroupResponse -> Maybe Text)
-> (CreateUserHierarchyGroupResponse
    -> Maybe Text -> CreateUserHierarchyGroupResponse)
-> Lens
     CreateUserHierarchyGroupResponse
     CreateUserHierarchyGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserHierarchyGroupResponse' {Maybe Text
hierarchyGroupArn :: Maybe Text
$sel:hierarchyGroupArn:CreateUserHierarchyGroupResponse' :: CreateUserHierarchyGroupResponse -> Maybe Text
hierarchyGroupArn} -> Maybe Text
hierarchyGroupArn) (\s :: CreateUserHierarchyGroupResponse
s@CreateUserHierarchyGroupResponse' {} Maybe Text
a -> CreateUserHierarchyGroupResponse
s {$sel:hierarchyGroupArn:CreateUserHierarchyGroupResponse' :: Maybe Text
hierarchyGroupArn = Maybe Text
a} :: CreateUserHierarchyGroupResponse)

-- | The identifier of the hierarchy group.
createUserHierarchyGroupResponse_hierarchyGroupId :: Lens.Lens' CreateUserHierarchyGroupResponse (Prelude.Maybe Prelude.Text)
createUserHierarchyGroupResponse_hierarchyGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateUserHierarchyGroupResponse
-> f CreateUserHierarchyGroupResponse
createUserHierarchyGroupResponse_hierarchyGroupId = (CreateUserHierarchyGroupResponse -> Maybe Text)
-> (CreateUserHierarchyGroupResponse
    -> Maybe Text -> CreateUserHierarchyGroupResponse)
-> Lens
     CreateUserHierarchyGroupResponse
     CreateUserHierarchyGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserHierarchyGroupResponse' {Maybe Text
hierarchyGroupId :: Maybe Text
$sel:hierarchyGroupId:CreateUserHierarchyGroupResponse' :: CreateUserHierarchyGroupResponse -> Maybe Text
hierarchyGroupId} -> Maybe Text
hierarchyGroupId) (\s :: CreateUserHierarchyGroupResponse
s@CreateUserHierarchyGroupResponse' {} Maybe Text
a -> CreateUserHierarchyGroupResponse
s {$sel:hierarchyGroupId:CreateUserHierarchyGroupResponse' :: Maybe Text
hierarchyGroupId = Maybe Text
a} :: CreateUserHierarchyGroupResponse)

-- | The response's http status code.
createUserHierarchyGroupResponse_httpStatus :: Lens.Lens' CreateUserHierarchyGroupResponse Prelude.Int
createUserHierarchyGroupResponse_httpStatus :: (Int -> f Int)
-> CreateUserHierarchyGroupResponse
-> f CreateUserHierarchyGroupResponse
createUserHierarchyGroupResponse_httpStatus = (CreateUserHierarchyGroupResponse -> Int)
-> (CreateUserHierarchyGroupResponse
    -> Int -> CreateUserHierarchyGroupResponse)
-> Lens
     CreateUserHierarchyGroupResponse
     CreateUserHierarchyGroupResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserHierarchyGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateUserHierarchyGroupResponse' :: CreateUserHierarchyGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateUserHierarchyGroupResponse
s@CreateUserHierarchyGroupResponse' {} Int
a -> CreateUserHierarchyGroupResponse
s {$sel:httpStatus:CreateUserHierarchyGroupResponse' :: Int
httpStatus = Int
a} :: CreateUserHierarchyGroupResponse)

instance
  Prelude.NFData
    CreateUserHierarchyGroupResponse