{-# 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 #-}
module Amazonka.Connect.DeleteUserHierarchyGroup
(
DeleteUserHierarchyGroup (..),
newDeleteUserHierarchyGroup,
deleteUserHierarchyGroup_hierarchyGroupId,
deleteUserHierarchyGroup_instanceId,
DeleteUserHierarchyGroupResponse (..),
newDeleteUserHierarchyGroupResponse,
)
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
data DeleteUserHierarchyGroup = DeleteUserHierarchyGroup'
{
DeleteUserHierarchyGroup -> Text
hierarchyGroupId :: Prelude.Text,
DeleteUserHierarchyGroup -> Text
instanceId :: Prelude.Text
}
deriving (DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool
(DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool)
-> (DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool)
-> Eq DeleteUserHierarchyGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool
$c/= :: DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool
== :: DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool
$c== :: DeleteUserHierarchyGroup -> DeleteUserHierarchyGroup -> Bool
Prelude.Eq, ReadPrec [DeleteUserHierarchyGroup]
ReadPrec DeleteUserHierarchyGroup
Int -> ReadS DeleteUserHierarchyGroup
ReadS [DeleteUserHierarchyGroup]
(Int -> ReadS DeleteUserHierarchyGroup)
-> ReadS [DeleteUserHierarchyGroup]
-> ReadPrec DeleteUserHierarchyGroup
-> ReadPrec [DeleteUserHierarchyGroup]
-> Read DeleteUserHierarchyGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteUserHierarchyGroup]
$creadListPrec :: ReadPrec [DeleteUserHierarchyGroup]
readPrec :: ReadPrec DeleteUserHierarchyGroup
$creadPrec :: ReadPrec DeleteUserHierarchyGroup
readList :: ReadS [DeleteUserHierarchyGroup]
$creadList :: ReadS [DeleteUserHierarchyGroup]
readsPrec :: Int -> ReadS DeleteUserHierarchyGroup
$creadsPrec :: Int -> ReadS DeleteUserHierarchyGroup
Prelude.Read, Int -> DeleteUserHierarchyGroup -> ShowS
[DeleteUserHierarchyGroup] -> ShowS
DeleteUserHierarchyGroup -> String
(Int -> DeleteUserHierarchyGroup -> ShowS)
-> (DeleteUserHierarchyGroup -> String)
-> ([DeleteUserHierarchyGroup] -> ShowS)
-> Show DeleteUserHierarchyGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserHierarchyGroup] -> ShowS
$cshowList :: [DeleteUserHierarchyGroup] -> ShowS
show :: DeleteUserHierarchyGroup -> String
$cshow :: DeleteUserHierarchyGroup -> String
showsPrec :: Int -> DeleteUserHierarchyGroup -> ShowS
$cshowsPrec :: Int -> DeleteUserHierarchyGroup -> ShowS
Prelude.Show, (forall x.
DeleteUserHierarchyGroup -> Rep DeleteUserHierarchyGroup x)
-> (forall x.
Rep DeleteUserHierarchyGroup x -> DeleteUserHierarchyGroup)
-> Generic DeleteUserHierarchyGroup
forall x.
Rep DeleteUserHierarchyGroup x -> DeleteUserHierarchyGroup
forall x.
DeleteUserHierarchyGroup -> Rep DeleteUserHierarchyGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteUserHierarchyGroup x -> DeleteUserHierarchyGroup
$cfrom :: forall x.
DeleteUserHierarchyGroup -> Rep DeleteUserHierarchyGroup x
Prelude.Generic)
newDeleteUserHierarchyGroup ::
Prelude.Text ->
Prelude.Text ->
DeleteUserHierarchyGroup
newDeleteUserHierarchyGroup :: Text -> Text -> DeleteUserHierarchyGroup
newDeleteUserHierarchyGroup
Text
pHierarchyGroupId_
Text
pInstanceId_ =
DeleteUserHierarchyGroup' :: Text -> Text -> DeleteUserHierarchyGroup
DeleteUserHierarchyGroup'
{ $sel:hierarchyGroupId:DeleteUserHierarchyGroup' :: Text
hierarchyGroupId =
Text
pHierarchyGroupId_,
$sel:instanceId:DeleteUserHierarchyGroup' :: Text
instanceId = Text
pInstanceId_
}
deleteUserHierarchyGroup_hierarchyGroupId :: Lens.Lens' DeleteUserHierarchyGroup Prelude.Text
deleteUserHierarchyGroup_hierarchyGroupId :: (Text -> f Text)
-> DeleteUserHierarchyGroup -> f DeleteUserHierarchyGroup
deleteUserHierarchyGroup_hierarchyGroupId = (DeleteUserHierarchyGroup -> Text)
-> (DeleteUserHierarchyGroup -> Text -> DeleteUserHierarchyGroup)
-> Lens DeleteUserHierarchyGroup DeleteUserHierarchyGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserHierarchyGroup' {Text
hierarchyGroupId :: Text
$sel:hierarchyGroupId:DeleteUserHierarchyGroup' :: DeleteUserHierarchyGroup -> Text
hierarchyGroupId} -> Text
hierarchyGroupId) (\s :: DeleteUserHierarchyGroup
s@DeleteUserHierarchyGroup' {} Text
a -> DeleteUserHierarchyGroup
s {$sel:hierarchyGroupId:DeleteUserHierarchyGroup' :: Text
hierarchyGroupId = Text
a} :: DeleteUserHierarchyGroup)
deleteUserHierarchyGroup_instanceId :: Lens.Lens' DeleteUserHierarchyGroup Prelude.Text
deleteUserHierarchyGroup_instanceId :: (Text -> f Text)
-> DeleteUserHierarchyGroup -> f DeleteUserHierarchyGroup
deleteUserHierarchyGroup_instanceId = (DeleteUserHierarchyGroup -> Text)
-> (DeleteUserHierarchyGroup -> Text -> DeleteUserHierarchyGroup)
-> Lens DeleteUserHierarchyGroup DeleteUserHierarchyGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserHierarchyGroup' {Text
instanceId :: Text
$sel:instanceId:DeleteUserHierarchyGroup' :: DeleteUserHierarchyGroup -> Text
instanceId} -> Text
instanceId) (\s :: DeleteUserHierarchyGroup
s@DeleteUserHierarchyGroup' {} Text
a -> DeleteUserHierarchyGroup
s {$sel:instanceId:DeleteUserHierarchyGroup' :: Text
instanceId = Text
a} :: DeleteUserHierarchyGroup)
instance Core.AWSRequest DeleteUserHierarchyGroup where
type
AWSResponse DeleteUserHierarchyGroup =
DeleteUserHierarchyGroupResponse
request :: DeleteUserHierarchyGroup -> Request DeleteUserHierarchyGroup
request = Service
-> DeleteUserHierarchyGroup -> Request DeleteUserHierarchyGroup
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteUserHierarchyGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserHierarchyGroup)))
response =
AWSResponse DeleteUserHierarchyGroup
-> Logger
-> Service
-> Proxy DeleteUserHierarchyGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserHierarchyGroup)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteUserHierarchyGroup
DeleteUserHierarchyGroupResponse
DeleteUserHierarchyGroupResponse'
instance Prelude.Hashable DeleteUserHierarchyGroup
instance Prelude.NFData DeleteUserHierarchyGroup
instance Core.ToHeaders DeleteUserHierarchyGroup where
toHeaders :: DeleteUserHierarchyGroup -> [Header]
toHeaders =
[Header] -> DeleteUserHierarchyGroup -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteUserHierarchyGroup where
toPath :: DeleteUserHierarchyGroup -> ByteString
toPath DeleteUserHierarchyGroup' {Text
instanceId :: Text
hierarchyGroupId :: Text
$sel:instanceId:DeleteUserHierarchyGroup' :: DeleteUserHierarchyGroup -> Text
$sel:hierarchyGroupId:DeleteUserHierarchyGroup' :: DeleteUserHierarchyGroup -> 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,
ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
hierarchyGroupId
]
instance Core.ToQuery DeleteUserHierarchyGroup where
toQuery :: DeleteUserHierarchyGroup -> QueryString
toQuery = QueryString -> DeleteUserHierarchyGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteUserHierarchyGroupResponse = DeleteUserHierarchyGroupResponse'
{
}
deriving (DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool
(DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool)
-> (DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool)
-> Eq DeleteUserHierarchyGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool
$c/= :: DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool
== :: DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool
$c== :: DeleteUserHierarchyGroupResponse
-> DeleteUserHierarchyGroupResponse -> Bool
Prelude.Eq, ReadPrec [DeleteUserHierarchyGroupResponse]
ReadPrec DeleteUserHierarchyGroupResponse
Int -> ReadS DeleteUserHierarchyGroupResponse
ReadS [DeleteUserHierarchyGroupResponse]
(Int -> ReadS DeleteUserHierarchyGroupResponse)
-> ReadS [DeleteUserHierarchyGroupResponse]
-> ReadPrec DeleteUserHierarchyGroupResponse
-> ReadPrec [DeleteUserHierarchyGroupResponse]
-> Read DeleteUserHierarchyGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteUserHierarchyGroupResponse]
$creadListPrec :: ReadPrec [DeleteUserHierarchyGroupResponse]
readPrec :: ReadPrec DeleteUserHierarchyGroupResponse
$creadPrec :: ReadPrec DeleteUserHierarchyGroupResponse
readList :: ReadS [DeleteUserHierarchyGroupResponse]
$creadList :: ReadS [DeleteUserHierarchyGroupResponse]
readsPrec :: Int -> ReadS DeleteUserHierarchyGroupResponse
$creadsPrec :: Int -> ReadS DeleteUserHierarchyGroupResponse
Prelude.Read, Int -> DeleteUserHierarchyGroupResponse -> ShowS
[DeleteUserHierarchyGroupResponse] -> ShowS
DeleteUserHierarchyGroupResponse -> String
(Int -> DeleteUserHierarchyGroupResponse -> ShowS)
-> (DeleteUserHierarchyGroupResponse -> String)
-> ([DeleteUserHierarchyGroupResponse] -> ShowS)
-> Show DeleteUserHierarchyGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserHierarchyGroupResponse] -> ShowS
$cshowList :: [DeleteUserHierarchyGroupResponse] -> ShowS
show :: DeleteUserHierarchyGroupResponse -> String
$cshow :: DeleteUserHierarchyGroupResponse -> String
showsPrec :: Int -> DeleteUserHierarchyGroupResponse -> ShowS
$cshowsPrec :: Int -> DeleteUserHierarchyGroupResponse -> ShowS
Prelude.Show, (forall x.
DeleteUserHierarchyGroupResponse
-> Rep DeleteUserHierarchyGroupResponse x)
-> (forall x.
Rep DeleteUserHierarchyGroupResponse x
-> DeleteUserHierarchyGroupResponse)
-> Generic DeleteUserHierarchyGroupResponse
forall x.
Rep DeleteUserHierarchyGroupResponse x
-> DeleteUserHierarchyGroupResponse
forall x.
DeleteUserHierarchyGroupResponse
-> Rep DeleteUserHierarchyGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteUserHierarchyGroupResponse x
-> DeleteUserHierarchyGroupResponse
$cfrom :: forall x.
DeleteUserHierarchyGroupResponse
-> Rep DeleteUserHierarchyGroupResponse x
Prelude.Generic)
newDeleteUserHierarchyGroupResponse ::
DeleteUserHierarchyGroupResponse
newDeleteUserHierarchyGroupResponse :: DeleteUserHierarchyGroupResponse
newDeleteUserHierarchyGroupResponse =
DeleteUserHierarchyGroupResponse
DeleteUserHierarchyGroupResponse'
instance
Prelude.NFData
DeleteUserHierarchyGroupResponse