{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards       #-}
{-# LANGUAGE TypeFamilies          #-}
module Aws.Iam.Commands.DeleteGroupPolicy
    ( DeleteGroupPolicy(..)
    , DeleteGroupPolicyResponse(..)
    ) where

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

-- | Deletes the specified policy associated with the specified group.
--
-- <http://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroupPolicy.html>
data DeleteGroupPolicy
    = DeleteGroupPolicy {
        DeleteGroupPolicy -> Text
dgpPolicyName :: Text
      -- ^ Name of the policy to be deleted.
      , DeleteGroupPolicy -> Text
dgpGroupName   :: Text
      -- ^ Name of the group with whom the policy is associated.
      }
    deriving (DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c/= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
== :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c== :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
Eq, Eq DeleteGroupPolicy
DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
DeleteGroupPolicy -> DeleteGroupPolicy -> Ordering
DeleteGroupPolicy -> DeleteGroupPolicy -> DeleteGroupPolicy
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 :: DeleteGroupPolicy -> DeleteGroupPolicy -> DeleteGroupPolicy
$cmin :: DeleteGroupPolicy -> DeleteGroupPolicy -> DeleteGroupPolicy
max :: DeleteGroupPolicy -> DeleteGroupPolicy -> DeleteGroupPolicy
$cmax :: DeleteGroupPolicy -> DeleteGroupPolicy -> DeleteGroupPolicy
>= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c>= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
> :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c> :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
<= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c<= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
< :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c< :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
compare :: DeleteGroupPolicy -> DeleteGroupPolicy -> Ordering
$ccompare :: DeleteGroupPolicy -> DeleteGroupPolicy -> Ordering
Ord, Int -> DeleteGroupPolicy -> ShowS
[DeleteGroupPolicy] -> ShowS
DeleteGroupPolicy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGroupPolicy] -> ShowS
$cshowList :: [DeleteGroupPolicy] -> ShowS
show :: DeleteGroupPolicy -> String
$cshow :: DeleteGroupPolicy -> String
showsPrec :: Int -> DeleteGroupPolicy -> ShowS
$cshowsPrec :: Int -> DeleteGroupPolicy -> ShowS
Show, Typeable)

instance SignQuery DeleteGroupPolicy where
    type ServiceConfiguration DeleteGroupPolicy = IamConfiguration
    signQuery :: forall queryType.
DeleteGroupPolicy
-> ServiceConfiguration DeleteGroupPolicy queryType
-> SignatureData
-> SignedQuery
signQuery DeleteGroupPolicy{Text
dgpGroupName :: Text
dgpPolicyName :: Text
dgpGroupName :: DeleteGroupPolicy -> Text
dgpPolicyName :: DeleteGroupPolicy -> Text
..}
        = forall qt.
ByteString
-> [(ByteString, Text)]
-> IamConfiguration qt
-> SignatureData
-> SignedQuery
iamAction ByteString
"DeleteGroupPolicy" [
              (ByteString
"PolicyName", Text
dgpPolicyName)
            , (ByteString
"GroupName", Text
dgpGroupName)
            ]

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

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

instance Transaction DeleteGroupPolicy DeleteGroupPolicyResponse

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