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

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

-- | Removes the specified user from the specified group.
--
-- <http://docs.aws.amazon.com/IAM/latest/APIReference/API_RemoveUserFromGroup.html>
data RemoveUserFromGroup
    = RemoveUserFromGroup {
        RemoveUserFromGroup -> Text
rufgGroupName :: Text
      -- ^ Name of the group to update.
      , RemoveUserFromGroup -> Text
rufgUserName  :: Text
      -- ^ The of the user to add.
      }
    deriving (RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
$c/= :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
== :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
$c== :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
Eq, Eq RemoveUserFromGroup
RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
RemoveUserFromGroup -> RemoveUserFromGroup -> Ordering
RemoveUserFromGroup -> RemoveUserFromGroup -> RemoveUserFromGroup
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 :: RemoveUserFromGroup -> RemoveUserFromGroup -> RemoveUserFromGroup
$cmin :: RemoveUserFromGroup -> RemoveUserFromGroup -> RemoveUserFromGroup
max :: RemoveUserFromGroup -> RemoveUserFromGroup -> RemoveUserFromGroup
$cmax :: RemoveUserFromGroup -> RemoveUserFromGroup -> RemoveUserFromGroup
>= :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
$c>= :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
> :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
$c> :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
<= :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
$c<= :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
< :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
$c< :: RemoveUserFromGroup -> RemoveUserFromGroup -> Bool
compare :: RemoveUserFromGroup -> RemoveUserFromGroup -> Ordering
$ccompare :: RemoveUserFromGroup -> RemoveUserFromGroup -> Ordering
Ord, Int -> RemoveUserFromGroup -> ShowS
[RemoveUserFromGroup] -> ShowS
RemoveUserFromGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveUserFromGroup] -> ShowS
$cshowList :: [RemoveUserFromGroup] -> ShowS
show :: RemoveUserFromGroup -> String
$cshow :: RemoveUserFromGroup -> String
showsPrec :: Int -> RemoveUserFromGroup -> ShowS
$cshowsPrec :: Int -> RemoveUserFromGroup -> ShowS
Show, Typeable)

instance SignQuery RemoveUserFromGroup where
    type ServiceConfiguration RemoveUserFromGroup = IamConfiguration
    signQuery :: forall queryType.
RemoveUserFromGroup
-> ServiceConfiguration RemoveUserFromGroup queryType
-> SignatureData
-> SignedQuery
signQuery RemoveUserFromGroup{Text
rufgUserName :: Text
rufgGroupName :: Text
rufgUserName :: RemoveUserFromGroup -> Text
rufgGroupName :: RemoveUserFromGroup -> Text
..}
        = forall qt.
ByteString
-> [(ByteString, Text)]
-> IamConfiguration qt
-> SignatureData
-> SignedQuery
iamAction ByteString
"RemoveUserFromGroup" [
              (ByteString
"GroupName"     , Text
rufgGroupName)
            , (ByteString
"UserName"      , Text
rufgUserName)
            ]

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

instance ResponseConsumer RemoveUserFromGroup RemoveUserFromGroupResponse where
    type ResponseMetadata RemoveUserFromGroupResponse = IamMetadata
    responseConsumer :: Request
-> RemoveUserFromGroup
-> IORef (ResponseMetadata RemoveUserFromGroupResponse)
-> HTTPResponseConsumer RemoveUserFromGroupResponse
responseConsumer Request
_ RemoveUserFromGroup
_
        = 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 RemoveUserFromGroupResponse
RemoveUserFromGroupResponse)

instance Transaction RemoveUserFromGroup RemoveUserFromGroupResponse

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