{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies          #-}
module Aws.Iam.Commands.DeleteGroup
    ( DeleteGroup(..)
    , DeleteGroupResponse(..)
    ) where

import           Aws.Core
import           Aws.Iam.Core
import           Aws.Iam.Internal
import           Data.Text          (Text)
import           Data.Typeable

-- | Deletes the specified group.
--
-- <http://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroup.html>
data DeleteGroup = DeleteGroup Text
    deriving (DeleteGroup -> DeleteGroup -> Bool
(DeleteGroup -> DeleteGroup -> Bool)
-> (DeleteGroup -> DeleteGroup -> Bool) -> Eq DeleteGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGroup -> DeleteGroup -> Bool
$c/= :: DeleteGroup -> DeleteGroup -> Bool
== :: DeleteGroup -> DeleteGroup -> Bool
$c== :: DeleteGroup -> DeleteGroup -> Bool
Eq, Eq DeleteGroup
Eq DeleteGroup
-> (DeleteGroup -> DeleteGroup -> Ordering)
-> (DeleteGroup -> DeleteGroup -> Bool)
-> (DeleteGroup -> DeleteGroup -> Bool)
-> (DeleteGroup -> DeleteGroup -> Bool)
-> (DeleteGroup -> DeleteGroup -> Bool)
-> (DeleteGroup -> DeleteGroup -> DeleteGroup)
-> (DeleteGroup -> DeleteGroup -> DeleteGroup)
-> Ord DeleteGroup
DeleteGroup -> DeleteGroup -> Bool
DeleteGroup -> DeleteGroup -> Ordering
DeleteGroup -> DeleteGroup -> DeleteGroup
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeleteGroup -> DeleteGroup -> DeleteGroup
$cmin :: DeleteGroup -> DeleteGroup -> DeleteGroup
max :: DeleteGroup -> DeleteGroup -> DeleteGroup
$cmax :: DeleteGroup -> DeleteGroup -> DeleteGroup
>= :: DeleteGroup -> DeleteGroup -> Bool
$c>= :: DeleteGroup -> DeleteGroup -> Bool
> :: DeleteGroup -> DeleteGroup -> Bool
$c> :: DeleteGroup -> DeleteGroup -> Bool
<= :: DeleteGroup -> DeleteGroup -> Bool
$c<= :: DeleteGroup -> DeleteGroup -> Bool
< :: DeleteGroup -> DeleteGroup -> Bool
$c< :: DeleteGroup -> DeleteGroup -> Bool
compare :: DeleteGroup -> DeleteGroup -> Ordering
$ccompare :: DeleteGroup -> DeleteGroup -> Ordering
$cp1Ord :: Eq DeleteGroup
Ord, Int -> DeleteGroup -> ShowS
[DeleteGroup] -> ShowS
DeleteGroup -> String
(Int -> DeleteGroup -> ShowS)
-> (DeleteGroup -> String)
-> ([DeleteGroup] -> ShowS)
-> Show DeleteGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGroup] -> ShowS
$cshowList :: [DeleteGroup] -> ShowS
show :: DeleteGroup -> String
$cshow :: DeleteGroup -> String
showsPrec :: Int -> DeleteGroup -> ShowS
$cshowsPrec :: Int -> DeleteGroup -> ShowS
Show, Typeable)

instance SignQuery DeleteGroup where
    type ServiceConfiguration DeleteGroup = IamConfiguration
    signQuery :: DeleteGroup
-> ServiceConfiguration DeleteGroup queryType
-> SignatureData
-> SignedQuery
signQuery (DeleteGroup Text
groupName)
        = ByteString
-> [(ByteString, Text)]
-> IamConfiguration queryType
-> SignatureData
-> SignedQuery
forall qt.
ByteString
-> [(ByteString, Text)]
-> IamConfiguration qt
-> SignatureData
-> SignedQuery
iamAction ByteString
"DeleteGroup" [(ByteString
"GroupName", Text
groupName)]

data DeleteGroupResponse = DeleteGroupResponse
    deriving (DeleteGroupResponse -> DeleteGroupResponse -> Bool
(DeleteGroupResponse -> DeleteGroupResponse -> Bool)
-> (DeleteGroupResponse -> DeleteGroupResponse -> Bool)
-> Eq DeleteGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
$c/= :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
== :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
$c== :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
Eq, Eq DeleteGroupResponse
Eq DeleteGroupResponse
-> (DeleteGroupResponse -> DeleteGroupResponse -> Ordering)
-> (DeleteGroupResponse -> DeleteGroupResponse -> Bool)
-> (DeleteGroupResponse -> DeleteGroupResponse -> Bool)
-> (DeleteGroupResponse -> DeleteGroupResponse -> Bool)
-> (DeleteGroupResponse -> DeleteGroupResponse -> Bool)
-> (DeleteGroupResponse
    -> DeleteGroupResponse -> DeleteGroupResponse)
-> (DeleteGroupResponse
    -> DeleteGroupResponse -> DeleteGroupResponse)
-> Ord DeleteGroupResponse
DeleteGroupResponse -> DeleteGroupResponse -> Bool
DeleteGroupResponse -> DeleteGroupResponse -> Ordering
DeleteGroupResponse -> DeleteGroupResponse -> DeleteGroupResponse
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeleteGroupResponse -> DeleteGroupResponse -> DeleteGroupResponse
$cmin :: DeleteGroupResponse -> DeleteGroupResponse -> DeleteGroupResponse
max :: DeleteGroupResponse -> DeleteGroupResponse -> DeleteGroupResponse
$cmax :: DeleteGroupResponse -> DeleteGroupResponse -> DeleteGroupResponse
>= :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
$c>= :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
> :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
$c> :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
<= :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
$c<= :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
< :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
$c< :: DeleteGroupResponse -> DeleteGroupResponse -> Bool
compare :: DeleteGroupResponse -> DeleteGroupResponse -> Ordering
$ccompare :: DeleteGroupResponse -> DeleteGroupResponse -> Ordering
$cp1Ord :: Eq DeleteGroupResponse
Ord, Int -> DeleteGroupResponse -> ShowS
[DeleteGroupResponse] -> ShowS
DeleteGroupResponse -> String
(Int -> DeleteGroupResponse -> ShowS)
-> (DeleteGroupResponse -> String)
-> ([DeleteGroupResponse] -> ShowS)
-> Show DeleteGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGroupResponse] -> ShowS
$cshowList :: [DeleteGroupResponse] -> ShowS
show :: DeleteGroupResponse -> String
$cshow :: DeleteGroupResponse -> String
showsPrec :: Int -> DeleteGroupResponse -> ShowS
$cshowsPrec :: Int -> DeleteGroupResponse -> ShowS
Show, Typeable)

instance ResponseConsumer DeleteGroup DeleteGroupResponse where
    type ResponseMetadata DeleteGroupResponse = IamMetadata
    responseConsumer :: Request
-> DeleteGroup
-> IORef (ResponseMetadata DeleteGroupResponse)
-> HTTPResponseConsumer DeleteGroupResponse
responseConsumer Request
_ DeleteGroup
_
        = (Cursor -> Response IamMetadata DeleteGroupResponse)
-> IORef IamMetadata -> HTTPResponseConsumer DeleteGroupResponse
forall a.
(Cursor -> Response IamMetadata a)
-> IORef IamMetadata -> HTTPResponseConsumer a
iamResponseConsumer (Response IamMetadata DeleteGroupResponse
-> Cursor -> Response IamMetadata DeleteGroupResponse
forall a b. a -> b -> a
const (Response IamMetadata DeleteGroupResponse
 -> Cursor -> Response IamMetadata DeleteGroupResponse)
-> Response IamMetadata DeleteGroupResponse
-> Cursor
-> Response IamMetadata DeleteGroupResponse
forall a b. (a -> b) -> a -> b
$ DeleteGroupResponse -> Response IamMetadata DeleteGroupResponse
forall (m :: * -> *) a. Monad m => a -> m a
return DeleteGroupResponse
DeleteGroupResponse)

instance Transaction DeleteGroup DeleteGroupResponse

instance AsMemoryResponse DeleteGroupResponse where
    type MemoryResponse DeleteGroupResponse = DeleteGroupResponse
    loadToMemory :: DeleteGroupResponse
-> ResourceT IO (MemoryResponse DeleteGroupResponse)
loadToMemory = DeleteGroupResponse
-> ResourceT IO (MemoryResponse DeleteGroupResponse)
forall (m :: * -> *) a. Monad m => a -> m a
return