    {-# LANGUAGE MultiParamTypeClasses #-}
    {-# LANGUAGE RecordWildCards       #-}
    {-# LANGUAGE TupleSections         #-}
    {-# LANGUAGE TypeFamilies          #-}
    module Aws.Iam.Commands.UpdateUser
        ( UpdateUser(..)
        , UpdateUserResponse(..)
        ) where

    import           Aws.Core
    import           Aws.Iam.Core
    import           Aws.Iam.Internal
    import           Control.Applicative
    import           Data.Text           (Text)
    import           Data.Typeable
    import           Prelude

    -- | Updates the name and/or path of the specified user.
    --
    -- <http://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateUser.html>
    data UpdateUser
        = UpdateUser {
            UpdateUser -> Text
    uuUserName    :: Text
          -- ^ Name of the user to be updated.
          , UpdateUser -> Maybe Text
    uuNewUserName :: Maybe Text
          -- ^ New name for the user.
          , UpdateUser -> Maybe Text
    uuNewPath     :: Maybe Text
          -- ^ New path to which the user will be moved.
          }
        deriving (UpdateUser -> UpdateUser -> Bool
    (UpdateUser -> UpdateUser -> Bool)
    -> (UpdateUser -> UpdateUser -> Bool) -> Eq UpdateUser
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: UpdateUser -> UpdateUser -> Bool
    == :: UpdateUser -> UpdateUser -> Bool
    $c/= :: UpdateUser -> UpdateUser -> Bool
    /= :: UpdateUser -> UpdateUser -> Bool
    Eq, Eq UpdateUser
    Eq UpdateUser =>
    (UpdateUser -> UpdateUser -> Ordering)
    -> (UpdateUser -> UpdateUser -> Bool)
    -> (UpdateUser -> UpdateUser -> Bool)
    -> (UpdateUser -> UpdateUser -> Bool)
    -> (UpdateUser -> UpdateUser -> Bool)
    -> (UpdateUser -> UpdateUser -> UpdateUser)
    -> (UpdateUser -> UpdateUser -> UpdateUser)
    -> Ord UpdateUser
    UpdateUser -> UpdateUser -> Bool
    UpdateUser -> UpdateUser -> Ordering
    UpdateUser -> UpdateUser -> UpdateUser
    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
    $ccompare :: UpdateUser -> UpdateUser -> Ordering
    compare :: UpdateUser -> UpdateUser -> Ordering
    $c< :: UpdateUser -> UpdateUser -> Bool
    < :: UpdateUser -> UpdateUser -> Bool
    $c<= :: UpdateUser -> UpdateUser -> Bool
    <= :: UpdateUser -> UpdateUser -> Bool
    $c> :: UpdateUser -> UpdateUser -> Bool
    > :: UpdateUser -> UpdateUser -> Bool
    $c>= :: UpdateUser -> UpdateUser -> Bool
    >= :: UpdateUser -> UpdateUser -> Bool
    $cmax :: UpdateUser -> UpdateUser -> UpdateUser
    max :: UpdateUser -> UpdateUser -> UpdateUser
    $cmin :: UpdateUser -> UpdateUser -> UpdateUser
    min :: UpdateUser -> UpdateUser -> UpdateUser
    Ord, Int -> UpdateUser -> ShowS
    [UpdateUser] -> ShowS
    UpdateUser -> String
    (Int -> UpdateUser -> ShowS)
    -> (UpdateUser -> String)
    -> ([UpdateUser] -> ShowS)
    -> Show UpdateUser
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> UpdateUser -> ShowS
    showsPrec :: Int -> UpdateUser -> ShowS
    $cshow :: UpdateUser -> String
    show :: UpdateUser -> String
    $cshowList :: [UpdateUser] -> ShowS
    showList :: [UpdateUser] -> ShowS
    Show, Typeable)

    instance SignQuery UpdateUser where
        type ServiceConfiguration UpdateUser = IamConfiguration
        signQuery :: forall queryType.
    UpdateUser
    -> ServiceConfiguration UpdateUser queryType
    -> SignatureData
    -> SignedQuery
    signQuery UpdateUser{Maybe Text
    Text
    uuUserName :: UpdateUser -> Text
    uuNewUserName :: UpdateUser -> Maybe Text
    uuNewPath :: UpdateUser -> Maybe Text
    uuUserName :: Text
    uuNewUserName :: Maybe Text
    uuNewPath :: Maybe Text
    ..}
            = ByteString
    -> [Maybe (ByteString, Text)]
    -> IamConfiguration queryType
    -> SignatureData
    -> SignedQuery
    forall qt.
    ByteString
    -> [Maybe (ByteString, Text)]
    -> IamConfiguration qt
    -> SignatureData
    -> SignedQuery
    iamAction' ByteString
    "UpdateUser" [
                  (ByteString, Text) -> Maybe (ByteString, Text)
    forall a. a -> Maybe a
    Just (ByteString
    "UserName", Text
    uuUserName)
                , (ByteString
    "NewUserName",) (Text -> (ByteString, Text))
    -> Maybe Text -> Maybe (ByteString, Text)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe Text
    uuNewUserName
                , (ByteString
    "NewPath",) (Text -> (ByteString, Text))
    -> Maybe Text -> Maybe (ByteString, Text)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Maybe Text
    uuNewPath
                ]

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

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

    instance Transaction UpdateUser UpdateUserResponse

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