{-# 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.ElastiCache.DeleteUserGroup
(
DeleteUserGroup (..),
newDeleteUserGroup,
deleteUserGroup_userGroupId,
UserGroup (..),
newUserGroup,
userGroup_status,
userGroup_userIds,
userGroup_arn,
userGroup_userGroupId,
userGroup_engine,
userGroup_pendingChanges,
userGroup_replicationGroups,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types
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 DeleteUserGroup = DeleteUserGroup'
{
DeleteUserGroup -> Text
userGroupId :: Prelude.Text
}
deriving (DeleteUserGroup -> DeleteUserGroup -> Bool
(DeleteUserGroup -> DeleteUserGroup -> Bool)
-> (DeleteUserGroup -> DeleteUserGroup -> Bool)
-> Eq DeleteUserGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserGroup -> DeleteUserGroup -> Bool
$c/= :: DeleteUserGroup -> DeleteUserGroup -> Bool
== :: DeleteUserGroup -> DeleteUserGroup -> Bool
$c== :: DeleteUserGroup -> DeleteUserGroup -> Bool
Prelude.Eq, ReadPrec [DeleteUserGroup]
ReadPrec DeleteUserGroup
Int -> ReadS DeleteUserGroup
ReadS [DeleteUserGroup]
(Int -> ReadS DeleteUserGroup)
-> ReadS [DeleteUserGroup]
-> ReadPrec DeleteUserGroup
-> ReadPrec [DeleteUserGroup]
-> Read DeleteUserGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteUserGroup]
$creadListPrec :: ReadPrec [DeleteUserGroup]
readPrec :: ReadPrec DeleteUserGroup
$creadPrec :: ReadPrec DeleteUserGroup
readList :: ReadS [DeleteUserGroup]
$creadList :: ReadS [DeleteUserGroup]
readsPrec :: Int -> ReadS DeleteUserGroup
$creadsPrec :: Int -> ReadS DeleteUserGroup
Prelude.Read, Int -> DeleteUserGroup -> ShowS
[DeleteUserGroup] -> ShowS
DeleteUserGroup -> String
(Int -> DeleteUserGroup -> ShowS)
-> (DeleteUserGroup -> String)
-> ([DeleteUserGroup] -> ShowS)
-> Show DeleteUserGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserGroup] -> ShowS
$cshowList :: [DeleteUserGroup] -> ShowS
show :: DeleteUserGroup -> String
$cshow :: DeleteUserGroup -> String
showsPrec :: Int -> DeleteUserGroup -> ShowS
$cshowsPrec :: Int -> DeleteUserGroup -> ShowS
Prelude.Show, (forall x. DeleteUserGroup -> Rep DeleteUserGroup x)
-> (forall x. Rep DeleteUserGroup x -> DeleteUserGroup)
-> Generic DeleteUserGroup
forall x. Rep DeleteUserGroup x -> DeleteUserGroup
forall x. DeleteUserGroup -> Rep DeleteUserGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteUserGroup x -> DeleteUserGroup
$cfrom :: forall x. DeleteUserGroup -> Rep DeleteUserGroup x
Prelude.Generic)
newDeleteUserGroup ::
Prelude.Text ->
DeleteUserGroup
newDeleteUserGroup :: Text -> DeleteUserGroup
newDeleteUserGroup Text
pUserGroupId_ =
DeleteUserGroup' :: Text -> DeleteUserGroup
DeleteUserGroup' {$sel:userGroupId:DeleteUserGroup' :: Text
userGroupId = Text
pUserGroupId_}
deleteUserGroup_userGroupId :: Lens.Lens' DeleteUserGroup Prelude.Text
deleteUserGroup_userGroupId :: (Text -> f Text) -> DeleteUserGroup -> f DeleteUserGroup
deleteUserGroup_userGroupId = (DeleteUserGroup -> Text)
-> (DeleteUserGroup -> Text -> DeleteUserGroup)
-> Lens DeleteUserGroup DeleteUserGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserGroup' {Text
userGroupId :: Text
$sel:userGroupId:DeleteUserGroup' :: DeleteUserGroup -> Text
userGroupId} -> Text
userGroupId) (\s :: DeleteUserGroup
s@DeleteUserGroup' {} Text
a -> DeleteUserGroup
s {$sel:userGroupId:DeleteUserGroup' :: Text
userGroupId = Text
a} :: DeleteUserGroup)
instance Core.AWSRequest DeleteUserGroup where
type AWSResponse DeleteUserGroup = UserGroup
request :: DeleteUserGroup -> Request DeleteUserGroup
request = Service -> DeleteUserGroup -> Request DeleteUserGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteUserGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteUserGroup)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteUserGroup))
-> Logger
-> Service
-> Proxy DeleteUserGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteUserGroup)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeleteUserGroupResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String UserGroup
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable DeleteUserGroup
instance Prelude.NFData DeleteUserGroup
instance Core.ToHeaders DeleteUserGroup where
toHeaders :: DeleteUserGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteUserGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteUserGroup where
toPath :: DeleteUserGroup -> ByteString
toPath = ByteString -> DeleteUserGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteUserGroup where
toQuery :: DeleteUserGroup -> QueryString
toQuery DeleteUserGroup' {Text
userGroupId :: Text
$sel:userGroupId:DeleteUserGroup' :: DeleteUserGroup -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteUserGroup" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
ByteString
"UserGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
userGroupId
]