{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.QuickSight.UpdateUser
(
UpdateUser (..),
newUpdateUser,
updateUser_unapplyCustomPermissions,
updateUser_customPermissionsName,
updateUser_customFederationProviderUrl,
updateUser_externalLoginFederationProviderType,
updateUser_externalLoginId,
updateUser_userName,
updateUser_awsAccountId,
updateUser_namespace,
updateUser_email,
updateUser_role,
UpdateUserResponse (..),
newUpdateUserResponse,
updateUserResponse_requestId,
updateUserResponse_user,
updateUserResponse_status,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateUser = UpdateUser'
{
UpdateUser -> Maybe Bool
unapplyCustomPermissions :: Prelude.Maybe Prelude.Bool,
UpdateUser -> Maybe Text
customPermissionsName :: Prelude.Maybe Prelude.Text,
UpdateUser -> Maybe Text
customFederationProviderUrl :: Prelude.Maybe Prelude.Text,
UpdateUser -> Maybe Text
externalLoginFederationProviderType :: Prelude.Maybe Prelude.Text,
UpdateUser -> Maybe Text
externalLoginId :: Prelude.Maybe Prelude.Text,
UpdateUser -> Text
userName :: Prelude.Text,
UpdateUser -> Text
awsAccountId :: Prelude.Text,
UpdateUser -> Text
namespace :: Prelude.Text,
UpdateUser -> Text
email :: Prelude.Text,
UpdateUser -> UserRole
role' :: UserRole
}
deriving (UpdateUser -> UpdateUser -> Bool
(UpdateUser -> UpdateUser -> Bool)
-> (UpdateUser -> UpdateUser -> Bool) -> Eq UpdateUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUser -> UpdateUser -> Bool
$c/= :: UpdateUser -> UpdateUser -> Bool
== :: UpdateUser -> UpdateUser -> Bool
$c== :: UpdateUser -> UpdateUser -> Bool
Prelude.Eq, ReadPrec [UpdateUser]
ReadPrec UpdateUser
Int -> ReadS UpdateUser
ReadS [UpdateUser]
(Int -> ReadS UpdateUser)
-> ReadS [UpdateUser]
-> ReadPrec UpdateUser
-> ReadPrec [UpdateUser]
-> Read UpdateUser
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateUser]
$creadListPrec :: ReadPrec [UpdateUser]
readPrec :: ReadPrec UpdateUser
$creadPrec :: ReadPrec UpdateUser
readList :: ReadS [UpdateUser]
$creadList :: ReadS [UpdateUser]
readsPrec :: Int -> ReadS UpdateUser
$creadsPrec :: Int -> ReadS UpdateUser
Prelude.Read, 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
showList :: [UpdateUser] -> ShowS
$cshowList :: [UpdateUser] -> ShowS
show :: UpdateUser -> String
$cshow :: UpdateUser -> String
showsPrec :: Int -> UpdateUser -> ShowS
$cshowsPrec :: Int -> UpdateUser -> ShowS
Prelude.Show, (forall x. UpdateUser -> Rep UpdateUser x)
-> (forall x. Rep UpdateUser x -> UpdateUser) -> Generic UpdateUser
forall x. Rep UpdateUser x -> UpdateUser
forall x. UpdateUser -> Rep UpdateUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateUser x -> UpdateUser
$cfrom :: forall x. UpdateUser -> Rep UpdateUser x
Prelude.Generic)
newUpdateUser ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UserRole ->
UpdateUser
newUpdateUser :: Text -> Text -> Text -> Text -> UserRole -> UpdateUser
newUpdateUser
Text
pUserName_
Text
pAwsAccountId_
Text
pNamespace_
Text
pEmail_
UserRole
pRole_ =
UpdateUser' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> UserRole
-> UpdateUser
UpdateUser'
{ $sel:unapplyCustomPermissions:UpdateUser' :: Maybe Bool
unapplyCustomPermissions =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:customPermissionsName:UpdateUser' :: Maybe Text
customPermissionsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customFederationProviderUrl:UpdateUser' :: Maybe Text
customFederationProviderUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalLoginFederationProviderType:UpdateUser' :: Maybe Text
externalLoginFederationProviderType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalLoginId:UpdateUser' :: Maybe Text
externalLoginId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userName:UpdateUser' :: Text
userName = Text
pUserName_,
$sel:awsAccountId:UpdateUser' :: Text
awsAccountId = Text
pAwsAccountId_,
$sel:namespace:UpdateUser' :: Text
namespace = Text
pNamespace_,
$sel:email:UpdateUser' :: Text
email = Text
pEmail_,
$sel:role':UpdateUser' :: UserRole
role' = UserRole
pRole_
}
updateUser_unapplyCustomPermissions :: Lens.Lens' UpdateUser (Prelude.Maybe Prelude.Bool)
updateUser_unapplyCustomPermissions :: (Maybe Bool -> f (Maybe Bool)) -> UpdateUser -> f UpdateUser
updateUser_unapplyCustomPermissions = (UpdateUser -> Maybe Bool)
-> (UpdateUser -> Maybe Bool -> UpdateUser)
-> Lens UpdateUser UpdateUser (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Maybe Bool
unapplyCustomPermissions :: Maybe Bool
$sel:unapplyCustomPermissions:UpdateUser' :: UpdateUser -> Maybe Bool
unapplyCustomPermissions} -> Maybe Bool
unapplyCustomPermissions) (\s :: UpdateUser
s@UpdateUser' {} Maybe Bool
a -> UpdateUser
s {$sel:unapplyCustomPermissions:UpdateUser' :: Maybe Bool
unapplyCustomPermissions = Maybe Bool
a} :: UpdateUser)
updateUser_customPermissionsName :: Lens.Lens' UpdateUser (Prelude.Maybe Prelude.Text)
updateUser_customPermissionsName :: (Maybe Text -> f (Maybe Text)) -> UpdateUser -> f UpdateUser
updateUser_customPermissionsName = (UpdateUser -> Maybe Text)
-> (UpdateUser -> Maybe Text -> UpdateUser)
-> Lens UpdateUser UpdateUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Maybe Text
customPermissionsName :: Maybe Text
$sel:customPermissionsName:UpdateUser' :: UpdateUser -> Maybe Text
customPermissionsName} -> Maybe Text
customPermissionsName) (\s :: UpdateUser
s@UpdateUser' {} Maybe Text
a -> UpdateUser
s {$sel:customPermissionsName:UpdateUser' :: Maybe Text
customPermissionsName = Maybe Text
a} :: UpdateUser)
updateUser_customFederationProviderUrl :: Lens.Lens' UpdateUser (Prelude.Maybe Prelude.Text)
updateUser_customFederationProviderUrl :: (Maybe Text -> f (Maybe Text)) -> UpdateUser -> f UpdateUser
updateUser_customFederationProviderUrl = (UpdateUser -> Maybe Text)
-> (UpdateUser -> Maybe Text -> UpdateUser)
-> Lens UpdateUser UpdateUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Maybe Text
customFederationProviderUrl :: Maybe Text
$sel:customFederationProviderUrl:UpdateUser' :: UpdateUser -> Maybe Text
customFederationProviderUrl} -> Maybe Text
customFederationProviderUrl) (\s :: UpdateUser
s@UpdateUser' {} Maybe Text
a -> UpdateUser
s {$sel:customFederationProviderUrl:UpdateUser' :: Maybe Text
customFederationProviderUrl = Maybe Text
a} :: UpdateUser)
updateUser_externalLoginFederationProviderType :: Lens.Lens' UpdateUser (Prelude.Maybe Prelude.Text)
updateUser_externalLoginFederationProviderType :: (Maybe Text -> f (Maybe Text)) -> UpdateUser -> f UpdateUser
updateUser_externalLoginFederationProviderType = (UpdateUser -> Maybe Text)
-> (UpdateUser -> Maybe Text -> UpdateUser)
-> Lens UpdateUser UpdateUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Maybe Text
externalLoginFederationProviderType :: Maybe Text
$sel:externalLoginFederationProviderType:UpdateUser' :: UpdateUser -> Maybe Text
externalLoginFederationProviderType} -> Maybe Text
externalLoginFederationProviderType) (\s :: UpdateUser
s@UpdateUser' {} Maybe Text
a -> UpdateUser
s {$sel:externalLoginFederationProviderType:UpdateUser' :: Maybe Text
externalLoginFederationProviderType = Maybe Text
a} :: UpdateUser)
updateUser_externalLoginId :: Lens.Lens' UpdateUser (Prelude.Maybe Prelude.Text)
updateUser_externalLoginId :: (Maybe Text -> f (Maybe Text)) -> UpdateUser -> f UpdateUser
updateUser_externalLoginId = (UpdateUser -> Maybe Text)
-> (UpdateUser -> Maybe Text -> UpdateUser)
-> Lens UpdateUser UpdateUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Maybe Text
externalLoginId :: Maybe Text
$sel:externalLoginId:UpdateUser' :: UpdateUser -> Maybe Text
externalLoginId} -> Maybe Text
externalLoginId) (\s :: UpdateUser
s@UpdateUser' {} Maybe Text
a -> UpdateUser
s {$sel:externalLoginId:UpdateUser' :: Maybe Text
externalLoginId = Maybe Text
a} :: UpdateUser)
updateUser_userName :: Lens.Lens' UpdateUser Prelude.Text
updateUser_userName :: (Text -> f Text) -> UpdateUser -> f UpdateUser
updateUser_userName = (UpdateUser -> Text)
-> (UpdateUser -> Text -> UpdateUser)
-> Lens UpdateUser UpdateUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Text
userName :: Text
$sel:userName:UpdateUser' :: UpdateUser -> Text
userName} -> Text
userName) (\s :: UpdateUser
s@UpdateUser' {} Text
a -> UpdateUser
s {$sel:userName:UpdateUser' :: Text
userName = Text
a} :: UpdateUser)
updateUser_awsAccountId :: Lens.Lens' UpdateUser Prelude.Text
updateUser_awsAccountId :: (Text -> f Text) -> UpdateUser -> f UpdateUser
updateUser_awsAccountId = (UpdateUser -> Text)
-> (UpdateUser -> Text -> UpdateUser)
-> Lens UpdateUser UpdateUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Text
awsAccountId :: Text
$sel:awsAccountId:UpdateUser' :: UpdateUser -> Text
awsAccountId} -> Text
awsAccountId) (\s :: UpdateUser
s@UpdateUser' {} Text
a -> UpdateUser
s {$sel:awsAccountId:UpdateUser' :: Text
awsAccountId = Text
a} :: UpdateUser)
updateUser_namespace :: Lens.Lens' UpdateUser Prelude.Text
updateUser_namespace :: (Text -> f Text) -> UpdateUser -> f UpdateUser
updateUser_namespace = (UpdateUser -> Text)
-> (UpdateUser -> Text -> UpdateUser)
-> Lens UpdateUser UpdateUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Text
namespace :: Text
$sel:namespace:UpdateUser' :: UpdateUser -> Text
namespace} -> Text
namespace) (\s :: UpdateUser
s@UpdateUser' {} Text
a -> UpdateUser
s {$sel:namespace:UpdateUser' :: Text
namespace = Text
a} :: UpdateUser)
updateUser_email :: Lens.Lens' UpdateUser Prelude.Text
updateUser_email :: (Text -> f Text) -> UpdateUser -> f UpdateUser
updateUser_email = (UpdateUser -> Text)
-> (UpdateUser -> Text -> UpdateUser)
-> Lens UpdateUser UpdateUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {Text
email :: Text
$sel:email:UpdateUser' :: UpdateUser -> Text
email} -> Text
email) (\s :: UpdateUser
s@UpdateUser' {} Text
a -> UpdateUser
s {$sel:email:UpdateUser' :: Text
email = Text
a} :: UpdateUser)
updateUser_role :: Lens.Lens' UpdateUser UserRole
updateUser_role :: (UserRole -> f UserRole) -> UpdateUser -> f UpdateUser
updateUser_role = (UpdateUser -> UserRole)
-> (UpdateUser -> UserRole -> UpdateUser)
-> Lens UpdateUser UpdateUser UserRole UserRole
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUser' {UserRole
role' :: UserRole
$sel:role':UpdateUser' :: UpdateUser -> UserRole
role'} -> UserRole
role') (\s :: UpdateUser
s@UpdateUser' {} UserRole
a -> UpdateUser
s {$sel:role':UpdateUser' :: UserRole
role' = UserRole
a} :: UpdateUser)
instance Core.AWSRequest UpdateUser where
type AWSResponse UpdateUser = UpdateUserResponse
request :: UpdateUser -> Request UpdateUser
request = Service -> UpdateUser -> Request UpdateUser
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateUser
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateUser)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateUser))
-> Logger
-> Service
-> Proxy UpdateUser
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateUser)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe User -> Int -> UpdateUserResponse
UpdateUserResponse'
(Maybe Text -> Maybe User -> Int -> UpdateUserResponse)
-> Either String (Maybe Text)
-> Either String (Maybe User -> Int -> UpdateUserResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestId")
Either String (Maybe User -> Int -> UpdateUserResponse)
-> Either String (Maybe User)
-> Either String (Int -> UpdateUserResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe User)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"User")
Either String (Int -> UpdateUserResponse)
-> Either String Int -> Either String UpdateUserResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateUser
instance Prelude.NFData UpdateUser
instance Core.ToHeaders UpdateUser where
toHeaders :: UpdateUser -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateUser -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateUser where
toJSON :: UpdateUser -> Value
toJSON UpdateUser' {Maybe Bool
Maybe Text
Text
UserRole
role' :: UserRole
email :: Text
namespace :: Text
awsAccountId :: Text
userName :: Text
externalLoginId :: Maybe Text
externalLoginFederationProviderType :: Maybe Text
customFederationProviderUrl :: Maybe Text
customPermissionsName :: Maybe Text
unapplyCustomPermissions :: Maybe Bool
$sel:role':UpdateUser' :: UpdateUser -> UserRole
$sel:email:UpdateUser' :: UpdateUser -> Text
$sel:namespace:UpdateUser' :: UpdateUser -> Text
$sel:awsAccountId:UpdateUser' :: UpdateUser -> Text
$sel:userName:UpdateUser' :: UpdateUser -> Text
$sel:externalLoginId:UpdateUser' :: UpdateUser -> Maybe Text
$sel:externalLoginFederationProviderType:UpdateUser' :: UpdateUser -> Maybe Text
$sel:customFederationProviderUrl:UpdateUser' :: UpdateUser -> Maybe Text
$sel:customPermissionsName:UpdateUser' :: UpdateUser -> Maybe Text
$sel:unapplyCustomPermissions:UpdateUser' :: UpdateUser -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"UnapplyCustomPermissions" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
unapplyCustomPermissions,
(Text
"CustomPermissionsName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customPermissionsName,
(Text
"CustomFederationProviderUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customFederationProviderUrl,
(Text
"ExternalLoginFederationProviderType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
externalLoginFederationProviderType,
(Text
"ExternalLoginId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
externalLoginId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Email" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
email),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Role" Text -> UserRole -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UserRole
role')
]
)
instance Core.ToPath UpdateUser where
toPath :: UpdateUser -> ByteString
toPath UpdateUser' {Maybe Bool
Maybe Text
Text
UserRole
role' :: UserRole
email :: Text
namespace :: Text
awsAccountId :: Text
userName :: Text
externalLoginId :: Maybe Text
externalLoginFederationProviderType :: Maybe Text
customFederationProviderUrl :: Maybe Text
customPermissionsName :: Maybe Text
unapplyCustomPermissions :: Maybe Bool
$sel:role':UpdateUser' :: UpdateUser -> UserRole
$sel:email:UpdateUser' :: UpdateUser -> Text
$sel:namespace:UpdateUser' :: UpdateUser -> Text
$sel:awsAccountId:UpdateUser' :: UpdateUser -> Text
$sel:userName:UpdateUser' :: UpdateUser -> Text
$sel:externalLoginId:UpdateUser' :: UpdateUser -> Maybe Text
$sel:externalLoginFederationProviderType:UpdateUser' :: UpdateUser -> Maybe Text
$sel:customFederationProviderUrl:UpdateUser' :: UpdateUser -> Maybe Text
$sel:customPermissionsName:UpdateUser' :: UpdateUser -> Maybe Text
$sel:unapplyCustomPermissions:UpdateUser' :: UpdateUser -> Maybe Bool
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/accounts/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
ByteString
"/namespaces/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
namespace,
ByteString
"/users/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
userName
]
instance Core.ToQuery UpdateUser where
toQuery :: UpdateUser -> QueryString
toQuery = QueryString -> UpdateUser -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateUserResponse = UpdateUserResponse'
{
UpdateUserResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
UpdateUserResponse -> Maybe User
user :: Prelude.Maybe User,
UpdateUserResponse -> Int
status :: Prelude.Int
}
deriving (UpdateUserResponse -> UpdateUserResponse -> Bool
(UpdateUserResponse -> UpdateUserResponse -> Bool)
-> (UpdateUserResponse -> UpdateUserResponse -> Bool)
-> Eq UpdateUserResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUserResponse -> UpdateUserResponse -> Bool
$c/= :: UpdateUserResponse -> UpdateUserResponse -> Bool
== :: UpdateUserResponse -> UpdateUserResponse -> Bool
$c== :: UpdateUserResponse -> UpdateUserResponse -> Bool
Prelude.Eq, ReadPrec [UpdateUserResponse]
ReadPrec UpdateUserResponse
Int -> ReadS UpdateUserResponse
ReadS [UpdateUserResponse]
(Int -> ReadS UpdateUserResponse)
-> ReadS [UpdateUserResponse]
-> ReadPrec UpdateUserResponse
-> ReadPrec [UpdateUserResponse]
-> Read UpdateUserResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateUserResponse]
$creadListPrec :: ReadPrec [UpdateUserResponse]
readPrec :: ReadPrec UpdateUserResponse
$creadPrec :: ReadPrec UpdateUserResponse
readList :: ReadS [UpdateUserResponse]
$creadList :: ReadS [UpdateUserResponse]
readsPrec :: Int -> ReadS UpdateUserResponse
$creadsPrec :: Int -> ReadS UpdateUserResponse
Prelude.Read, 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
showList :: [UpdateUserResponse] -> ShowS
$cshowList :: [UpdateUserResponse] -> ShowS
show :: UpdateUserResponse -> String
$cshow :: UpdateUserResponse -> String
showsPrec :: Int -> UpdateUserResponse -> ShowS
$cshowsPrec :: Int -> UpdateUserResponse -> ShowS
Prelude.Show, (forall x. UpdateUserResponse -> Rep UpdateUserResponse x)
-> (forall x. Rep UpdateUserResponse x -> UpdateUserResponse)
-> Generic UpdateUserResponse
forall x. Rep UpdateUserResponse x -> UpdateUserResponse
forall x. UpdateUserResponse -> Rep UpdateUserResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateUserResponse x -> UpdateUserResponse
$cfrom :: forall x. UpdateUserResponse -> Rep UpdateUserResponse x
Prelude.Generic)
newUpdateUserResponse ::
Prelude.Int ->
UpdateUserResponse
newUpdateUserResponse :: Int -> UpdateUserResponse
newUpdateUserResponse Int
pStatus_ =
UpdateUserResponse' :: Maybe Text -> Maybe User -> Int -> UpdateUserResponse
UpdateUserResponse'
{ $sel:requestId:UpdateUserResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:user:UpdateUserResponse' :: Maybe User
user = Maybe User
forall a. Maybe a
Prelude.Nothing,
$sel:status:UpdateUserResponse' :: Int
status = Int
pStatus_
}
updateUserResponse_requestId :: Lens.Lens' UpdateUserResponse (Prelude.Maybe Prelude.Text)
updateUserResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> UpdateUserResponse -> f UpdateUserResponse
updateUserResponse_requestId = (UpdateUserResponse -> Maybe Text)
-> (UpdateUserResponse -> Maybe Text -> UpdateUserResponse)
-> Lens
UpdateUserResponse UpdateUserResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:UpdateUserResponse' :: UpdateUserResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: UpdateUserResponse
s@UpdateUserResponse' {} Maybe Text
a -> UpdateUserResponse
s {$sel:requestId:UpdateUserResponse' :: Maybe Text
requestId = Maybe Text
a} :: UpdateUserResponse)
updateUserResponse_user :: Lens.Lens' UpdateUserResponse (Prelude.Maybe User)
updateUserResponse_user :: (Maybe User -> f (Maybe User))
-> UpdateUserResponse -> f UpdateUserResponse
updateUserResponse_user = (UpdateUserResponse -> Maybe User)
-> (UpdateUserResponse -> Maybe User -> UpdateUserResponse)
-> Lens
UpdateUserResponse UpdateUserResponse (Maybe User) (Maybe User)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserResponse' {Maybe User
user :: Maybe User
$sel:user:UpdateUserResponse' :: UpdateUserResponse -> Maybe User
user} -> Maybe User
user) (\s :: UpdateUserResponse
s@UpdateUserResponse' {} Maybe User
a -> UpdateUserResponse
s {$sel:user:UpdateUserResponse' :: Maybe User
user = Maybe User
a} :: UpdateUserResponse)
updateUserResponse_status :: Lens.Lens' UpdateUserResponse Prelude.Int
updateUserResponse_status :: (Int -> f Int) -> UpdateUserResponse -> f UpdateUserResponse
updateUserResponse_status = (UpdateUserResponse -> Int)
-> (UpdateUserResponse -> Int -> UpdateUserResponse)
-> Lens UpdateUserResponse UpdateUserResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserResponse' {Int
status :: Int
$sel:status:UpdateUserResponse' :: UpdateUserResponse -> Int
status} -> Int
status) (\s :: UpdateUserResponse
s@UpdateUserResponse' {} Int
a -> UpdateUserResponse
s {$sel:status:UpdateUserResponse' :: Int
status = Int
a} :: UpdateUserResponse)
instance Prelude.NFData UpdateUserResponse