{-# 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.Connect.UpdateUserIdentityInfo
(
UpdateUserIdentityInfo (..),
newUpdateUserIdentityInfo,
updateUserIdentityInfo_identityInfo,
updateUserIdentityInfo_userId,
updateUserIdentityInfo_instanceId,
UpdateUserIdentityInfoResponse (..),
newUpdateUserIdentityInfoResponse,
)
where
import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateUserIdentityInfo = UpdateUserIdentityInfo'
{
UpdateUserIdentityInfo -> UserIdentityInfo
identityInfo :: UserIdentityInfo,
UpdateUserIdentityInfo -> Text
userId :: Prelude.Text,
UpdateUserIdentityInfo -> Text
instanceId :: Prelude.Text
}
deriving (UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool
(UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool)
-> (UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool)
-> Eq UpdateUserIdentityInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool
$c/= :: UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool
== :: UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool
$c== :: UpdateUserIdentityInfo -> UpdateUserIdentityInfo -> Bool
Prelude.Eq, ReadPrec [UpdateUserIdentityInfo]
ReadPrec UpdateUserIdentityInfo
Int -> ReadS UpdateUserIdentityInfo
ReadS [UpdateUserIdentityInfo]
(Int -> ReadS UpdateUserIdentityInfo)
-> ReadS [UpdateUserIdentityInfo]
-> ReadPrec UpdateUserIdentityInfo
-> ReadPrec [UpdateUserIdentityInfo]
-> Read UpdateUserIdentityInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateUserIdentityInfo]
$creadListPrec :: ReadPrec [UpdateUserIdentityInfo]
readPrec :: ReadPrec UpdateUserIdentityInfo
$creadPrec :: ReadPrec UpdateUserIdentityInfo
readList :: ReadS [UpdateUserIdentityInfo]
$creadList :: ReadS [UpdateUserIdentityInfo]
readsPrec :: Int -> ReadS UpdateUserIdentityInfo
$creadsPrec :: Int -> ReadS UpdateUserIdentityInfo
Prelude.Read, Int -> UpdateUserIdentityInfo -> ShowS
[UpdateUserIdentityInfo] -> ShowS
UpdateUserIdentityInfo -> String
(Int -> UpdateUserIdentityInfo -> ShowS)
-> (UpdateUserIdentityInfo -> String)
-> ([UpdateUserIdentityInfo] -> ShowS)
-> Show UpdateUserIdentityInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateUserIdentityInfo] -> ShowS
$cshowList :: [UpdateUserIdentityInfo] -> ShowS
show :: UpdateUserIdentityInfo -> String
$cshow :: UpdateUserIdentityInfo -> String
showsPrec :: Int -> UpdateUserIdentityInfo -> ShowS
$cshowsPrec :: Int -> UpdateUserIdentityInfo -> ShowS
Prelude.Show, (forall x. UpdateUserIdentityInfo -> Rep UpdateUserIdentityInfo x)
-> (forall x.
Rep UpdateUserIdentityInfo x -> UpdateUserIdentityInfo)
-> Generic UpdateUserIdentityInfo
forall x. Rep UpdateUserIdentityInfo x -> UpdateUserIdentityInfo
forall x. UpdateUserIdentityInfo -> Rep UpdateUserIdentityInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateUserIdentityInfo x -> UpdateUserIdentityInfo
$cfrom :: forall x. UpdateUserIdentityInfo -> Rep UpdateUserIdentityInfo x
Prelude.Generic)
newUpdateUserIdentityInfo ::
UserIdentityInfo ->
Prelude.Text ->
Prelude.Text ->
UpdateUserIdentityInfo
newUpdateUserIdentityInfo :: UserIdentityInfo -> Text -> Text -> UpdateUserIdentityInfo
newUpdateUserIdentityInfo
UserIdentityInfo
pIdentityInfo_
Text
pUserId_
Text
pInstanceId_ =
UpdateUserIdentityInfo' :: UserIdentityInfo -> Text -> Text -> UpdateUserIdentityInfo
UpdateUserIdentityInfo'
{ $sel:identityInfo:UpdateUserIdentityInfo' :: UserIdentityInfo
identityInfo =
UserIdentityInfo
pIdentityInfo_,
$sel:userId:UpdateUserIdentityInfo' :: Text
userId = Text
pUserId_,
$sel:instanceId:UpdateUserIdentityInfo' :: Text
instanceId = Text
pInstanceId_
}
updateUserIdentityInfo_identityInfo :: Lens.Lens' UpdateUserIdentityInfo UserIdentityInfo
updateUserIdentityInfo_identityInfo :: (UserIdentityInfo -> f UserIdentityInfo)
-> UpdateUserIdentityInfo -> f UpdateUserIdentityInfo
updateUserIdentityInfo_identityInfo = (UpdateUserIdentityInfo -> UserIdentityInfo)
-> (UpdateUserIdentityInfo
-> UserIdentityInfo -> UpdateUserIdentityInfo)
-> Lens
UpdateUserIdentityInfo
UpdateUserIdentityInfo
UserIdentityInfo
UserIdentityInfo
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserIdentityInfo' {UserIdentityInfo
identityInfo :: UserIdentityInfo
$sel:identityInfo:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> UserIdentityInfo
identityInfo} -> UserIdentityInfo
identityInfo) (\s :: UpdateUserIdentityInfo
s@UpdateUserIdentityInfo' {} UserIdentityInfo
a -> UpdateUserIdentityInfo
s {$sel:identityInfo:UpdateUserIdentityInfo' :: UserIdentityInfo
identityInfo = UserIdentityInfo
a} :: UpdateUserIdentityInfo)
updateUserIdentityInfo_userId :: Lens.Lens' UpdateUserIdentityInfo Prelude.Text
updateUserIdentityInfo_userId :: (Text -> f Text)
-> UpdateUserIdentityInfo -> f UpdateUserIdentityInfo
updateUserIdentityInfo_userId = (UpdateUserIdentityInfo -> Text)
-> (UpdateUserIdentityInfo -> Text -> UpdateUserIdentityInfo)
-> Lens UpdateUserIdentityInfo UpdateUserIdentityInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserIdentityInfo' {Text
userId :: Text
$sel:userId:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> Text
userId} -> Text
userId) (\s :: UpdateUserIdentityInfo
s@UpdateUserIdentityInfo' {} Text
a -> UpdateUserIdentityInfo
s {$sel:userId:UpdateUserIdentityInfo' :: Text
userId = Text
a} :: UpdateUserIdentityInfo)
updateUserIdentityInfo_instanceId :: Lens.Lens' UpdateUserIdentityInfo Prelude.Text
updateUserIdentityInfo_instanceId :: (Text -> f Text)
-> UpdateUserIdentityInfo -> f UpdateUserIdentityInfo
updateUserIdentityInfo_instanceId = (UpdateUserIdentityInfo -> Text)
-> (UpdateUserIdentityInfo -> Text -> UpdateUserIdentityInfo)
-> Lens UpdateUserIdentityInfo UpdateUserIdentityInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserIdentityInfo' {Text
instanceId :: Text
$sel:instanceId:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> Text
instanceId} -> Text
instanceId) (\s :: UpdateUserIdentityInfo
s@UpdateUserIdentityInfo' {} Text
a -> UpdateUserIdentityInfo
s {$sel:instanceId:UpdateUserIdentityInfo' :: Text
instanceId = Text
a} :: UpdateUserIdentityInfo)
instance Core.AWSRequest UpdateUserIdentityInfo where
type
AWSResponse UpdateUserIdentityInfo =
UpdateUserIdentityInfoResponse
request :: UpdateUserIdentityInfo -> Request UpdateUserIdentityInfo
request = Service -> UpdateUserIdentityInfo -> Request UpdateUserIdentityInfo
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateUserIdentityInfo
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateUserIdentityInfo)))
response =
AWSResponse UpdateUserIdentityInfo
-> Logger
-> Service
-> Proxy UpdateUserIdentityInfo
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateUserIdentityInfo)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateUserIdentityInfo
UpdateUserIdentityInfoResponse
UpdateUserIdentityInfoResponse'
instance Prelude.Hashable UpdateUserIdentityInfo
instance Prelude.NFData UpdateUserIdentityInfo
instance Core.ToHeaders UpdateUserIdentityInfo where
toHeaders :: UpdateUserIdentityInfo -> [Header]
toHeaders =
[Header] -> UpdateUserIdentityInfo -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateUserIdentityInfo where
toJSON :: UpdateUserIdentityInfo -> Value
toJSON UpdateUserIdentityInfo' {Text
UserIdentityInfo
instanceId :: Text
userId :: Text
identityInfo :: UserIdentityInfo
$sel:instanceId:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> Text
$sel:userId:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> Text
$sel:identityInfo:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> UserIdentityInfo
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IdentityInfo" Text -> UserIdentityInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UserIdentityInfo
identityInfo)]
)
instance Core.ToPath UpdateUserIdentityInfo where
toPath :: UpdateUserIdentityInfo -> ByteString
toPath UpdateUserIdentityInfo' {Text
UserIdentityInfo
instanceId :: Text
userId :: Text
identityInfo :: UserIdentityInfo
$sel:instanceId:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> Text
$sel:userId:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> Text
$sel:identityInfo:UpdateUserIdentityInfo' :: UpdateUserIdentityInfo -> UserIdentityInfo
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/users/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
userId,
ByteString
"/identity-info"
]
instance Core.ToQuery UpdateUserIdentityInfo where
toQuery :: UpdateUserIdentityInfo -> QueryString
toQuery = QueryString -> UpdateUserIdentityInfo -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateUserIdentityInfoResponse = UpdateUserIdentityInfoResponse'
{
}
deriving (UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool
(UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool)
-> (UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool)
-> Eq UpdateUserIdentityInfoResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool
$c/= :: UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool
== :: UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool
$c== :: UpdateUserIdentityInfoResponse
-> UpdateUserIdentityInfoResponse -> Bool
Prelude.Eq, ReadPrec [UpdateUserIdentityInfoResponse]
ReadPrec UpdateUserIdentityInfoResponse
Int -> ReadS UpdateUserIdentityInfoResponse
ReadS [UpdateUserIdentityInfoResponse]
(Int -> ReadS UpdateUserIdentityInfoResponse)
-> ReadS [UpdateUserIdentityInfoResponse]
-> ReadPrec UpdateUserIdentityInfoResponse
-> ReadPrec [UpdateUserIdentityInfoResponse]
-> Read UpdateUserIdentityInfoResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateUserIdentityInfoResponse]
$creadListPrec :: ReadPrec [UpdateUserIdentityInfoResponse]
readPrec :: ReadPrec UpdateUserIdentityInfoResponse
$creadPrec :: ReadPrec UpdateUserIdentityInfoResponse
readList :: ReadS [UpdateUserIdentityInfoResponse]
$creadList :: ReadS [UpdateUserIdentityInfoResponse]
readsPrec :: Int -> ReadS UpdateUserIdentityInfoResponse
$creadsPrec :: Int -> ReadS UpdateUserIdentityInfoResponse
Prelude.Read, Int -> UpdateUserIdentityInfoResponse -> ShowS
[UpdateUserIdentityInfoResponse] -> ShowS
UpdateUserIdentityInfoResponse -> String
(Int -> UpdateUserIdentityInfoResponse -> ShowS)
-> (UpdateUserIdentityInfoResponse -> String)
-> ([UpdateUserIdentityInfoResponse] -> ShowS)
-> Show UpdateUserIdentityInfoResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateUserIdentityInfoResponse] -> ShowS
$cshowList :: [UpdateUserIdentityInfoResponse] -> ShowS
show :: UpdateUserIdentityInfoResponse -> String
$cshow :: UpdateUserIdentityInfoResponse -> String
showsPrec :: Int -> UpdateUserIdentityInfoResponse -> ShowS
$cshowsPrec :: Int -> UpdateUserIdentityInfoResponse -> ShowS
Prelude.Show, (forall x.
UpdateUserIdentityInfoResponse
-> Rep UpdateUserIdentityInfoResponse x)
-> (forall x.
Rep UpdateUserIdentityInfoResponse x
-> UpdateUserIdentityInfoResponse)
-> Generic UpdateUserIdentityInfoResponse
forall x.
Rep UpdateUserIdentityInfoResponse x
-> UpdateUserIdentityInfoResponse
forall x.
UpdateUserIdentityInfoResponse
-> Rep UpdateUserIdentityInfoResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateUserIdentityInfoResponse x
-> UpdateUserIdentityInfoResponse
$cfrom :: forall x.
UpdateUserIdentityInfoResponse
-> Rep UpdateUserIdentityInfoResponse x
Prelude.Generic)
newUpdateUserIdentityInfoResponse ::
UpdateUserIdentityInfoResponse
newUpdateUserIdentityInfoResponse :: UpdateUserIdentityInfoResponse
newUpdateUserIdentityInfoResponse =
UpdateUserIdentityInfoResponse
UpdateUserIdentityInfoResponse'
instance
Prelude.NFData
UpdateUserIdentityInfoResponse