{-# 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.RegisterUser
(
RegisterUser (..),
newRegisterUser,
registerUser_userName,
registerUser_customPermissionsName,
registerUser_customFederationProviderUrl,
registerUser_externalLoginFederationProviderType,
registerUser_iamArn,
registerUser_externalLoginId,
registerUser_sessionName,
registerUser_identityType,
registerUser_email,
registerUser_userRole,
registerUser_awsAccountId,
registerUser_namespace,
RegisterUserResponse (..),
newRegisterUserResponse,
registerUserResponse_requestId,
registerUserResponse_userInvitationUrl,
registerUserResponse_user,
registerUserResponse_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 RegisterUser = RegisterUser'
{
RegisterUser -> Maybe Text
userName :: Prelude.Maybe Prelude.Text,
RegisterUser -> Maybe Text
customPermissionsName :: Prelude.Maybe Prelude.Text,
RegisterUser -> Maybe Text
customFederationProviderUrl :: Prelude.Maybe Prelude.Text,
RegisterUser -> Maybe Text
externalLoginFederationProviderType :: Prelude.Maybe Prelude.Text,
RegisterUser -> Maybe Text
iamArn :: Prelude.Maybe Prelude.Text,
RegisterUser -> Maybe Text
externalLoginId :: Prelude.Maybe Prelude.Text,
RegisterUser -> Maybe Text
sessionName :: Prelude.Maybe Prelude.Text,
RegisterUser -> IdentityType
identityType :: IdentityType,
RegisterUser -> Text
email :: Prelude.Text,
RegisterUser -> UserRole
userRole :: UserRole,
RegisterUser -> Text
awsAccountId :: Prelude.Text,
RegisterUser -> Text
namespace :: Prelude.Text
}
deriving (RegisterUser -> RegisterUser -> Bool
(RegisterUser -> RegisterUser -> Bool)
-> (RegisterUser -> RegisterUser -> Bool) -> Eq RegisterUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterUser -> RegisterUser -> Bool
$c/= :: RegisterUser -> RegisterUser -> Bool
== :: RegisterUser -> RegisterUser -> Bool
$c== :: RegisterUser -> RegisterUser -> Bool
Prelude.Eq, ReadPrec [RegisterUser]
ReadPrec RegisterUser
Int -> ReadS RegisterUser
ReadS [RegisterUser]
(Int -> ReadS RegisterUser)
-> ReadS [RegisterUser]
-> ReadPrec RegisterUser
-> ReadPrec [RegisterUser]
-> Read RegisterUser
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterUser]
$creadListPrec :: ReadPrec [RegisterUser]
readPrec :: ReadPrec RegisterUser
$creadPrec :: ReadPrec RegisterUser
readList :: ReadS [RegisterUser]
$creadList :: ReadS [RegisterUser]
readsPrec :: Int -> ReadS RegisterUser
$creadsPrec :: Int -> ReadS RegisterUser
Prelude.Read, Int -> RegisterUser -> ShowS
[RegisterUser] -> ShowS
RegisterUser -> String
(Int -> RegisterUser -> ShowS)
-> (RegisterUser -> String)
-> ([RegisterUser] -> ShowS)
-> Show RegisterUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterUser] -> ShowS
$cshowList :: [RegisterUser] -> ShowS
show :: RegisterUser -> String
$cshow :: RegisterUser -> String
showsPrec :: Int -> RegisterUser -> ShowS
$cshowsPrec :: Int -> RegisterUser -> ShowS
Prelude.Show, (forall x. RegisterUser -> Rep RegisterUser x)
-> (forall x. Rep RegisterUser x -> RegisterUser)
-> Generic RegisterUser
forall x. Rep RegisterUser x -> RegisterUser
forall x. RegisterUser -> Rep RegisterUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterUser x -> RegisterUser
$cfrom :: forall x. RegisterUser -> Rep RegisterUser x
Prelude.Generic)
newRegisterUser ::
IdentityType ->
Prelude.Text ->
UserRole ->
Prelude.Text ->
Prelude.Text ->
RegisterUser
newRegisterUser :: IdentityType -> Text -> UserRole -> Text -> Text -> RegisterUser
newRegisterUser
IdentityType
pIdentityType_
Text
pEmail_
UserRole
pUserRole_
Text
pAwsAccountId_
Text
pNamespace_ =
RegisterUser' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> IdentityType
-> Text
-> UserRole
-> Text
-> Text
-> RegisterUser
RegisterUser'
{ $sel:userName:RegisterUser' :: Maybe Text
userName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customPermissionsName:RegisterUser' :: Maybe Text
customPermissionsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customFederationProviderUrl:RegisterUser' :: Maybe Text
customFederationProviderUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalLoginFederationProviderType:RegisterUser' :: Maybe Text
externalLoginFederationProviderType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:iamArn:RegisterUser' :: Maybe Text
iamArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:externalLoginId:RegisterUser' :: Maybe Text
externalLoginId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sessionName:RegisterUser' :: Maybe Text
sessionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityType:RegisterUser' :: IdentityType
identityType = IdentityType
pIdentityType_,
$sel:email:RegisterUser' :: Text
email = Text
pEmail_,
$sel:userRole:RegisterUser' :: UserRole
userRole = UserRole
pUserRole_,
$sel:awsAccountId:RegisterUser' :: Text
awsAccountId = Text
pAwsAccountId_,
$sel:namespace:RegisterUser' :: Text
namespace = Text
pNamespace_
}
registerUser_userName :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_userName :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_userName = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
userName :: Maybe Text
$sel:userName:RegisterUser' :: RegisterUser -> Maybe Text
userName} -> Maybe Text
userName) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:userName:RegisterUser' :: Maybe Text
userName = Maybe Text
a} :: RegisterUser)
registerUser_customPermissionsName :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_customPermissionsName :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_customPermissionsName = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
customPermissionsName :: Maybe Text
$sel:customPermissionsName:RegisterUser' :: RegisterUser -> Maybe Text
customPermissionsName} -> Maybe Text
customPermissionsName) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:customPermissionsName:RegisterUser' :: Maybe Text
customPermissionsName = Maybe Text
a} :: RegisterUser)
registerUser_customFederationProviderUrl :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_customFederationProviderUrl :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_customFederationProviderUrl = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
customFederationProviderUrl :: Maybe Text
$sel:customFederationProviderUrl:RegisterUser' :: RegisterUser -> Maybe Text
customFederationProviderUrl} -> Maybe Text
customFederationProviderUrl) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:customFederationProviderUrl:RegisterUser' :: Maybe Text
customFederationProviderUrl = Maybe Text
a} :: RegisterUser)
registerUser_externalLoginFederationProviderType :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_externalLoginFederationProviderType :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_externalLoginFederationProviderType = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
externalLoginFederationProviderType :: Maybe Text
$sel:externalLoginFederationProviderType:RegisterUser' :: RegisterUser -> Maybe Text
externalLoginFederationProviderType} -> Maybe Text
externalLoginFederationProviderType) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:externalLoginFederationProviderType:RegisterUser' :: Maybe Text
externalLoginFederationProviderType = Maybe Text
a} :: RegisterUser)
registerUser_iamArn :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_iamArn :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_iamArn = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
iamArn :: Maybe Text
$sel:iamArn:RegisterUser' :: RegisterUser -> Maybe Text
iamArn} -> Maybe Text
iamArn) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:iamArn:RegisterUser' :: Maybe Text
iamArn = Maybe Text
a} :: RegisterUser)
registerUser_externalLoginId :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_externalLoginId :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_externalLoginId = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
externalLoginId :: Maybe Text
$sel:externalLoginId:RegisterUser' :: RegisterUser -> Maybe Text
externalLoginId} -> Maybe Text
externalLoginId) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:externalLoginId:RegisterUser' :: Maybe Text
externalLoginId = Maybe Text
a} :: RegisterUser)
registerUser_sessionName :: Lens.Lens' RegisterUser (Prelude.Maybe Prelude.Text)
registerUser_sessionName :: (Maybe Text -> f (Maybe Text)) -> RegisterUser -> f RegisterUser
registerUser_sessionName = (RegisterUser -> Maybe Text)
-> (RegisterUser -> Maybe Text -> RegisterUser)
-> Lens RegisterUser RegisterUser (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Maybe Text
sessionName :: Maybe Text
$sel:sessionName:RegisterUser' :: RegisterUser -> Maybe Text
sessionName} -> Maybe Text
sessionName) (\s :: RegisterUser
s@RegisterUser' {} Maybe Text
a -> RegisterUser
s {$sel:sessionName:RegisterUser' :: Maybe Text
sessionName = Maybe Text
a} :: RegisterUser)
registerUser_identityType :: Lens.Lens' RegisterUser IdentityType
registerUser_identityType :: (IdentityType -> f IdentityType) -> RegisterUser -> f RegisterUser
registerUser_identityType = (RegisterUser -> IdentityType)
-> (RegisterUser -> IdentityType -> RegisterUser)
-> Lens RegisterUser RegisterUser IdentityType IdentityType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {IdentityType
identityType :: IdentityType
$sel:identityType:RegisterUser' :: RegisterUser -> IdentityType
identityType} -> IdentityType
identityType) (\s :: RegisterUser
s@RegisterUser' {} IdentityType
a -> RegisterUser
s {$sel:identityType:RegisterUser' :: IdentityType
identityType = IdentityType
a} :: RegisterUser)
registerUser_email :: Lens.Lens' RegisterUser Prelude.Text
registerUser_email :: (Text -> f Text) -> RegisterUser -> f RegisterUser
registerUser_email = (RegisterUser -> Text)
-> (RegisterUser -> Text -> RegisterUser)
-> Lens RegisterUser RegisterUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Text
email :: Text
$sel:email:RegisterUser' :: RegisterUser -> Text
email} -> Text
email) (\s :: RegisterUser
s@RegisterUser' {} Text
a -> RegisterUser
s {$sel:email:RegisterUser' :: Text
email = Text
a} :: RegisterUser)
registerUser_userRole :: Lens.Lens' RegisterUser UserRole
registerUser_userRole :: (UserRole -> f UserRole) -> RegisterUser -> f RegisterUser
registerUser_userRole = (RegisterUser -> UserRole)
-> (RegisterUser -> UserRole -> RegisterUser)
-> Lens RegisterUser RegisterUser UserRole UserRole
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {UserRole
userRole :: UserRole
$sel:userRole:RegisterUser' :: RegisterUser -> UserRole
userRole} -> UserRole
userRole) (\s :: RegisterUser
s@RegisterUser' {} UserRole
a -> RegisterUser
s {$sel:userRole:RegisterUser' :: UserRole
userRole = UserRole
a} :: RegisterUser)
registerUser_awsAccountId :: Lens.Lens' RegisterUser Prelude.Text
registerUser_awsAccountId :: (Text -> f Text) -> RegisterUser -> f RegisterUser
registerUser_awsAccountId = (RegisterUser -> Text)
-> (RegisterUser -> Text -> RegisterUser)
-> Lens RegisterUser RegisterUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Text
awsAccountId :: Text
$sel:awsAccountId:RegisterUser' :: RegisterUser -> Text
awsAccountId} -> Text
awsAccountId) (\s :: RegisterUser
s@RegisterUser' {} Text
a -> RegisterUser
s {$sel:awsAccountId:RegisterUser' :: Text
awsAccountId = Text
a} :: RegisterUser)
registerUser_namespace :: Lens.Lens' RegisterUser Prelude.Text
registerUser_namespace :: (Text -> f Text) -> RegisterUser -> f RegisterUser
registerUser_namespace = (RegisterUser -> Text)
-> (RegisterUser -> Text -> RegisterUser)
-> Lens RegisterUser RegisterUser Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUser' {Text
namespace :: Text
$sel:namespace:RegisterUser' :: RegisterUser -> Text
namespace} -> Text
namespace) (\s :: RegisterUser
s@RegisterUser' {} Text
a -> RegisterUser
s {$sel:namespace:RegisterUser' :: Text
namespace = Text
a} :: RegisterUser)
instance Core.AWSRequest RegisterUser where
type AWSResponse RegisterUser = RegisterUserResponse
request :: RegisterUser -> Request RegisterUser
request = Service -> RegisterUser -> Request RegisterUser
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RegisterUser
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterUser)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse RegisterUser))
-> Logger
-> Service
-> Proxy RegisterUser
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterUser)))
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 Text -> Maybe User -> Int -> RegisterUserResponse
RegisterUserResponse'
(Maybe Text
-> Maybe Text -> Maybe User -> Int -> RegisterUserResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe User -> Int -> RegisterUserResponse)
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 Text -> Maybe User -> Int -> RegisterUserResponse)
-> Either String (Maybe Text)
-> Either String (Maybe User -> Int -> RegisterUserResponse)
forall (f :: * -> *) a b. Applicative f => 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
"UserInvitationUrl")
Either String (Maybe User -> Int -> RegisterUserResponse)
-> Either String (Maybe User)
-> Either String (Int -> RegisterUserResponse)
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 -> RegisterUserResponse)
-> Either String Int -> Either String RegisterUserResponse
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 RegisterUser
instance Prelude.NFData RegisterUser
instance Core.ToHeaders RegisterUser where
toHeaders :: RegisterUser -> ResponseHeaders
toHeaders =
ResponseHeaders -> RegisterUser -> 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 RegisterUser where
toJSON :: RegisterUser -> Value
toJSON RegisterUser' {Maybe Text
Text
IdentityType
UserRole
namespace :: Text
awsAccountId :: Text
userRole :: UserRole
email :: Text
identityType :: IdentityType
sessionName :: Maybe Text
externalLoginId :: Maybe Text
iamArn :: Maybe Text
externalLoginFederationProviderType :: Maybe Text
customFederationProviderUrl :: Maybe Text
customPermissionsName :: Maybe Text
userName :: Maybe Text
$sel:namespace:RegisterUser' :: RegisterUser -> Text
$sel:awsAccountId:RegisterUser' :: RegisterUser -> Text
$sel:userRole:RegisterUser' :: RegisterUser -> UserRole
$sel:email:RegisterUser' :: RegisterUser -> Text
$sel:identityType:RegisterUser' :: RegisterUser -> IdentityType
$sel:sessionName:RegisterUser' :: RegisterUser -> Maybe Text
$sel:externalLoginId:RegisterUser' :: RegisterUser -> Maybe Text
$sel:iamArn:RegisterUser' :: RegisterUser -> Maybe Text
$sel:externalLoginFederationProviderType:RegisterUser' :: RegisterUser -> Maybe Text
$sel:customFederationProviderUrl:RegisterUser' :: RegisterUser -> Maybe Text
$sel:customPermissionsName:RegisterUser' :: RegisterUser -> Maybe Text
$sel:userName:RegisterUser' :: RegisterUser -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"UserName" 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
userName,
(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
"IamArn" 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
iamArn,
(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,
(Text
"SessionName" 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
sessionName,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IdentityType" Text -> IdentityType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= IdentityType
identityType),
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
"UserRole" Text -> UserRole -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UserRole
userRole)
]
)
instance Core.ToPath RegisterUser where
toPath :: RegisterUser -> ByteString
toPath RegisterUser' {Maybe Text
Text
IdentityType
UserRole
namespace :: Text
awsAccountId :: Text
userRole :: UserRole
email :: Text
identityType :: IdentityType
sessionName :: Maybe Text
externalLoginId :: Maybe Text
iamArn :: Maybe Text
externalLoginFederationProviderType :: Maybe Text
customFederationProviderUrl :: Maybe Text
customPermissionsName :: Maybe Text
userName :: Maybe Text
$sel:namespace:RegisterUser' :: RegisterUser -> Text
$sel:awsAccountId:RegisterUser' :: RegisterUser -> Text
$sel:userRole:RegisterUser' :: RegisterUser -> UserRole
$sel:email:RegisterUser' :: RegisterUser -> Text
$sel:identityType:RegisterUser' :: RegisterUser -> IdentityType
$sel:sessionName:RegisterUser' :: RegisterUser -> Maybe Text
$sel:externalLoginId:RegisterUser' :: RegisterUser -> Maybe Text
$sel:iamArn:RegisterUser' :: RegisterUser -> Maybe Text
$sel:externalLoginFederationProviderType:RegisterUser' :: RegisterUser -> Maybe Text
$sel:customFederationProviderUrl:RegisterUser' :: RegisterUser -> Maybe Text
$sel:customPermissionsName:RegisterUser' :: RegisterUser -> Maybe Text
$sel:userName:RegisterUser' :: RegisterUser -> Maybe Text
..} =
[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"
]
instance Core.ToQuery RegisterUser where
toQuery :: RegisterUser -> QueryString
toQuery = QueryString -> RegisterUser -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RegisterUserResponse = RegisterUserResponse'
{
RegisterUserResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
RegisterUserResponse -> Maybe Text
userInvitationUrl :: Prelude.Maybe Prelude.Text,
RegisterUserResponse -> Maybe User
user :: Prelude.Maybe User,
RegisterUserResponse -> Int
status :: Prelude.Int
}
deriving (RegisterUserResponse -> RegisterUserResponse -> Bool
(RegisterUserResponse -> RegisterUserResponse -> Bool)
-> (RegisterUserResponse -> RegisterUserResponse -> Bool)
-> Eq RegisterUserResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterUserResponse -> RegisterUserResponse -> Bool
$c/= :: RegisterUserResponse -> RegisterUserResponse -> Bool
== :: RegisterUserResponse -> RegisterUserResponse -> Bool
$c== :: RegisterUserResponse -> RegisterUserResponse -> Bool
Prelude.Eq, ReadPrec [RegisterUserResponse]
ReadPrec RegisterUserResponse
Int -> ReadS RegisterUserResponse
ReadS [RegisterUserResponse]
(Int -> ReadS RegisterUserResponse)
-> ReadS [RegisterUserResponse]
-> ReadPrec RegisterUserResponse
-> ReadPrec [RegisterUserResponse]
-> Read RegisterUserResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterUserResponse]
$creadListPrec :: ReadPrec [RegisterUserResponse]
readPrec :: ReadPrec RegisterUserResponse
$creadPrec :: ReadPrec RegisterUserResponse
readList :: ReadS [RegisterUserResponse]
$creadList :: ReadS [RegisterUserResponse]
readsPrec :: Int -> ReadS RegisterUserResponse
$creadsPrec :: Int -> ReadS RegisterUserResponse
Prelude.Read, Int -> RegisterUserResponse -> ShowS
[RegisterUserResponse] -> ShowS
RegisterUserResponse -> String
(Int -> RegisterUserResponse -> ShowS)
-> (RegisterUserResponse -> String)
-> ([RegisterUserResponse] -> ShowS)
-> Show RegisterUserResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterUserResponse] -> ShowS
$cshowList :: [RegisterUserResponse] -> ShowS
show :: RegisterUserResponse -> String
$cshow :: RegisterUserResponse -> String
showsPrec :: Int -> RegisterUserResponse -> ShowS
$cshowsPrec :: Int -> RegisterUserResponse -> ShowS
Prelude.Show, (forall x. RegisterUserResponse -> Rep RegisterUserResponse x)
-> (forall x. Rep RegisterUserResponse x -> RegisterUserResponse)
-> Generic RegisterUserResponse
forall x. Rep RegisterUserResponse x -> RegisterUserResponse
forall x. RegisterUserResponse -> Rep RegisterUserResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterUserResponse x -> RegisterUserResponse
$cfrom :: forall x. RegisterUserResponse -> Rep RegisterUserResponse x
Prelude.Generic)
newRegisterUserResponse ::
Prelude.Int ->
RegisterUserResponse
newRegisterUserResponse :: Int -> RegisterUserResponse
newRegisterUserResponse Int
pStatus_ =
RegisterUserResponse' :: Maybe Text
-> Maybe Text -> Maybe User -> Int -> RegisterUserResponse
RegisterUserResponse'
{ $sel:requestId:RegisterUserResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userInvitationUrl:RegisterUserResponse' :: Maybe Text
userInvitationUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:user:RegisterUserResponse' :: Maybe User
user = Maybe User
forall a. Maybe a
Prelude.Nothing,
$sel:status:RegisterUserResponse' :: Int
status = Int
pStatus_
}
registerUserResponse_requestId :: Lens.Lens' RegisterUserResponse (Prelude.Maybe Prelude.Text)
registerUserResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> RegisterUserResponse -> f RegisterUserResponse
registerUserResponse_requestId = (RegisterUserResponse -> Maybe Text)
-> (RegisterUserResponse -> Maybe Text -> RegisterUserResponse)
-> Lens
RegisterUserResponse RegisterUserResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUserResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:RegisterUserResponse' :: RegisterUserResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: RegisterUserResponse
s@RegisterUserResponse' {} Maybe Text
a -> RegisterUserResponse
s {$sel:requestId:RegisterUserResponse' :: Maybe Text
requestId = Maybe Text
a} :: RegisterUserResponse)
registerUserResponse_userInvitationUrl :: Lens.Lens' RegisterUserResponse (Prelude.Maybe Prelude.Text)
registerUserResponse_userInvitationUrl :: (Maybe Text -> f (Maybe Text))
-> RegisterUserResponse -> f RegisterUserResponse
registerUserResponse_userInvitationUrl = (RegisterUserResponse -> Maybe Text)
-> (RegisterUserResponse -> Maybe Text -> RegisterUserResponse)
-> Lens
RegisterUserResponse RegisterUserResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUserResponse' {Maybe Text
userInvitationUrl :: Maybe Text
$sel:userInvitationUrl:RegisterUserResponse' :: RegisterUserResponse -> Maybe Text
userInvitationUrl} -> Maybe Text
userInvitationUrl) (\s :: RegisterUserResponse
s@RegisterUserResponse' {} Maybe Text
a -> RegisterUserResponse
s {$sel:userInvitationUrl:RegisterUserResponse' :: Maybe Text
userInvitationUrl = Maybe Text
a} :: RegisterUserResponse)
registerUserResponse_user :: Lens.Lens' RegisterUserResponse (Prelude.Maybe User)
registerUserResponse_user :: (Maybe User -> f (Maybe User))
-> RegisterUserResponse -> f RegisterUserResponse
registerUserResponse_user = (RegisterUserResponse -> Maybe User)
-> (RegisterUserResponse -> Maybe User -> RegisterUserResponse)
-> Lens
RegisterUserResponse RegisterUserResponse (Maybe User) (Maybe User)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUserResponse' {Maybe User
user :: Maybe User
$sel:user:RegisterUserResponse' :: RegisterUserResponse -> Maybe User
user} -> Maybe User
user) (\s :: RegisterUserResponse
s@RegisterUserResponse' {} Maybe User
a -> RegisterUserResponse
s {$sel:user:RegisterUserResponse' :: Maybe User
user = Maybe User
a} :: RegisterUserResponse)
registerUserResponse_status :: Lens.Lens' RegisterUserResponse Prelude.Int
registerUserResponse_status :: (Int -> f Int) -> RegisterUserResponse -> f RegisterUserResponse
registerUserResponse_status = (RegisterUserResponse -> Int)
-> (RegisterUserResponse -> Int -> RegisterUserResponse)
-> Lens RegisterUserResponse RegisterUserResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterUserResponse' {Int
status :: Int
$sel:status:RegisterUserResponse' :: RegisterUserResponse -> Int
status} -> Int
status) (\s :: RegisterUserResponse
s@RegisterUserResponse' {} Int
a -> RegisterUserResponse
s {$sel:status:RegisterUserResponse' :: Int
status = Int
a} :: RegisterUserResponse)
instance Prelude.NFData RegisterUserResponse