{-# 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
(RemoveUserFromGroup -> RemoveUserFromGroup -> Bool)
-> (RemoveUserFromGroup -> RemoveUserFromGroup -> Bool)
-> Eq RemoveUserFromGroup
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
Eq RemoveUserFromGroup
-> (RemoveUserFromGroup -> RemoveUserFromGroup -> Ordering)
-> (RemoveUserFromGroup -> RemoveUserFromGroup -> Bool)
-> (RemoveUserFromGroup -> RemoveUserFromGroup -> Bool)
-> (RemoveUserFromGroup -> RemoveUserFromGroup -> Bool)
-> (RemoveUserFromGroup -> RemoveUserFromGroup -> Bool)
-> (RemoveUserFromGroup
    -> RemoveUserFromGroup -> RemoveUserFromGroup)
-> (RemoveUserFromGroup
    -> RemoveUserFromGroup -> RemoveUserFromGroup)
-> Ord 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
$cp1Ord :: Eq RemoveUserFromGroup
Ord, Int -> RemoveUserFromGroup -> ShowS
[RemoveUserFromGroup] -> ShowS
RemoveUserFromGroup -> String
(Int -> RemoveUserFromGroup -> ShowS)
-> (RemoveUserFromGroup -> String)
-> ([RemoveUserFromGroup] -> ShowS)
-> Show RemoveUserFromGroup
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 :: RemoveUserFromGroup
-> ServiceConfiguration RemoveUserFromGroup queryType
-> SignatureData
-> SignedQuery
signQuery RemoveUserFromGroup{Text
rufgUserName :: Text
rufgGroupName :: Text
rufgUserName :: RemoveUserFromGroup -> Text
rufgGroupName :: RemoveUserFromGroup -> Text
..}
        = ByteString
-> [(ByteString, Text)]
-> IamConfiguration queryType
-> SignatureData
-> SignedQuery
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
(RemoveUserFromGroupResponse
 -> RemoveUserFromGroupResponse -> Bool)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> Bool)
-> Eq RemoveUserFromGroupResponse
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
Eq RemoveUserFromGroupResponse
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> Ordering)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> Bool)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> Bool)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> Bool)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> Bool)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> RemoveUserFromGroupResponse)
-> (RemoveUserFromGroupResponse
    -> RemoveUserFromGroupResponse -> RemoveUserFromGroupResponse)
-> Ord 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
$cp1Ord :: Eq RemoveUserFromGroupResponse
Ord, Int -> RemoveUserFromGroupResponse -> ShowS
[RemoveUserFromGroupResponse] -> ShowS
RemoveUserFromGroupResponse -> String
(Int -> RemoveUserFromGroupResponse -> ShowS)
-> (RemoveUserFromGroupResponse -> String)
-> ([RemoveUserFromGroupResponse] -> ShowS)
-> Show RemoveUserFromGroupResponse
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
_
        = (Cursor -> Response IamMetadata RemoveUserFromGroupResponse)
-> IORef IamMetadata
-> HTTPResponseConsumer RemoveUserFromGroupResponse
forall a.
(Cursor -> Response IamMetadata a)
-> IORef IamMetadata -> HTTPResponseConsumer a
iamResponseConsumer (Response IamMetadata RemoveUserFromGroupResponse
-> Cursor -> Response IamMetadata RemoveUserFromGroupResponse
forall a b. a -> b -> a
const (Response IamMetadata RemoveUserFromGroupResponse
 -> Cursor -> Response IamMetadata RemoveUserFromGroupResponse)
-> Response IamMetadata RemoveUserFromGroupResponse
-> Cursor
-> Response IamMetadata RemoveUserFromGroupResponse
forall a b. (a -> b) -> a -> b
$ RemoveUserFromGroupResponse
-> Response IamMetadata RemoveUserFromGroupResponse
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 = RemoveUserFromGroupResponse
-> ResourceT IO (MemoryResponse RemoveUserFromGroupResponse)
forall (m :: * -> *) a. Monad m => a -> m a
return