{-# 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.CognitoIdentityProvider.ConfirmForgotPassword
(
ConfirmForgotPassword (..),
newConfirmForgotPassword,
confirmForgotPassword_clientMetadata,
confirmForgotPassword_analyticsMetadata,
confirmForgotPassword_userContextData,
confirmForgotPassword_secretHash,
confirmForgotPassword_clientId,
confirmForgotPassword_username,
confirmForgotPassword_confirmationCode,
confirmForgotPassword_password,
ConfirmForgotPasswordResponse (..),
newConfirmForgotPasswordResponse,
confirmForgotPasswordResponse_httpStatus,
)
where
import Amazonka.CognitoIdentityProvider.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 ConfirmForgotPassword = ConfirmForgotPassword'
{
ConfirmForgotPassword -> Maybe (HashMap Text Text)
clientMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ConfirmForgotPassword -> Maybe AnalyticsMetadataType
analyticsMetadata :: Prelude.Maybe AnalyticsMetadataType,
ConfirmForgotPassword -> Maybe UserContextDataType
userContextData :: Prelude.Maybe UserContextDataType,
ConfirmForgotPassword -> Maybe (Sensitive Text)
secretHash :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ConfirmForgotPassword -> Sensitive Text
clientId :: Core.Sensitive Prelude.Text,
ConfirmForgotPassword -> Sensitive Text
username :: Core.Sensitive Prelude.Text,
ConfirmForgotPassword -> Text
confirmationCode :: Prelude.Text,
ConfirmForgotPassword -> Sensitive Text
password :: Core.Sensitive Prelude.Text
}
deriving (ConfirmForgotPassword -> ConfirmForgotPassword -> Bool
(ConfirmForgotPassword -> ConfirmForgotPassword -> Bool)
-> (ConfirmForgotPassword -> ConfirmForgotPassword -> Bool)
-> Eq ConfirmForgotPassword
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfirmForgotPassword -> ConfirmForgotPassword -> Bool
$c/= :: ConfirmForgotPassword -> ConfirmForgotPassword -> Bool
== :: ConfirmForgotPassword -> ConfirmForgotPassword -> Bool
$c== :: ConfirmForgotPassword -> ConfirmForgotPassword -> Bool
Prelude.Eq, Int -> ConfirmForgotPassword -> ShowS
[ConfirmForgotPassword] -> ShowS
ConfirmForgotPassword -> String
(Int -> ConfirmForgotPassword -> ShowS)
-> (ConfirmForgotPassword -> String)
-> ([ConfirmForgotPassword] -> ShowS)
-> Show ConfirmForgotPassword
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfirmForgotPassword] -> ShowS
$cshowList :: [ConfirmForgotPassword] -> ShowS
show :: ConfirmForgotPassword -> String
$cshow :: ConfirmForgotPassword -> String
showsPrec :: Int -> ConfirmForgotPassword -> ShowS
$cshowsPrec :: Int -> ConfirmForgotPassword -> ShowS
Prelude.Show, (forall x. ConfirmForgotPassword -> Rep ConfirmForgotPassword x)
-> (forall x. Rep ConfirmForgotPassword x -> ConfirmForgotPassword)
-> Generic ConfirmForgotPassword
forall x. Rep ConfirmForgotPassword x -> ConfirmForgotPassword
forall x. ConfirmForgotPassword -> Rep ConfirmForgotPassword x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfirmForgotPassword x -> ConfirmForgotPassword
$cfrom :: forall x. ConfirmForgotPassword -> Rep ConfirmForgotPassword x
Prelude.Generic)
newConfirmForgotPassword ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ConfirmForgotPassword
newConfirmForgotPassword :: Text -> Text -> Text -> Text -> ConfirmForgotPassword
newConfirmForgotPassword
Text
pClientId_
Text
pUsername_
Text
pConfirmationCode_
Text
pPassword_ =
ConfirmForgotPassword' :: Maybe (HashMap Text Text)
-> Maybe AnalyticsMetadataType
-> Maybe UserContextDataType
-> Maybe (Sensitive Text)
-> Sensitive Text
-> Sensitive Text
-> Text
-> Sensitive Text
-> ConfirmForgotPassword
ConfirmForgotPassword'
{ $sel:clientMetadata:ConfirmForgotPassword' :: Maybe (HashMap Text Text)
clientMetadata =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:analyticsMetadata:ConfirmForgotPassword' :: Maybe AnalyticsMetadataType
analyticsMetadata = Maybe AnalyticsMetadataType
forall a. Maybe a
Prelude.Nothing,
$sel:userContextData:ConfirmForgotPassword' :: Maybe UserContextDataType
userContextData = Maybe UserContextDataType
forall a. Maybe a
Prelude.Nothing,
$sel:secretHash:ConfirmForgotPassword' :: Maybe (Sensitive Text)
secretHash = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:clientId:ConfirmForgotPassword' :: Sensitive Text
clientId = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pClientId_,
$sel:username:ConfirmForgotPassword' :: Sensitive Text
username = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pUsername_,
$sel:confirmationCode:ConfirmForgotPassword' :: Text
confirmationCode = Text
pConfirmationCode_,
$sel:password:ConfirmForgotPassword' :: Sensitive Text
password = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pPassword_
}
confirmForgotPassword_clientMetadata :: Lens.Lens' ConfirmForgotPassword (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
confirmForgotPassword_clientMetadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_clientMetadata = (ConfirmForgotPassword -> Maybe (HashMap Text Text))
-> (ConfirmForgotPassword
-> Maybe (HashMap Text Text) -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Maybe (HashMap Text Text)
clientMetadata :: Maybe (HashMap Text Text)
$sel:clientMetadata:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe (HashMap Text Text)
clientMetadata} -> Maybe (HashMap Text Text)
clientMetadata) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Maybe (HashMap Text Text)
a -> ConfirmForgotPassword
s {$sel:clientMetadata:ConfirmForgotPassword' :: Maybe (HashMap Text Text)
clientMetadata = Maybe (HashMap Text Text)
a} :: ConfirmForgotPassword) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfirmForgotPassword -> f ConfirmForgotPassword)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ConfirmForgotPassword
-> f ConfirmForgotPassword
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
confirmForgotPassword_analyticsMetadata :: Lens.Lens' ConfirmForgotPassword (Prelude.Maybe AnalyticsMetadataType)
confirmForgotPassword_analyticsMetadata :: (Maybe AnalyticsMetadataType -> f (Maybe AnalyticsMetadataType))
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_analyticsMetadata = (ConfirmForgotPassword -> Maybe AnalyticsMetadataType)
-> (ConfirmForgotPassword
-> Maybe AnalyticsMetadataType -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Maybe AnalyticsMetadataType)
(Maybe AnalyticsMetadataType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Maybe AnalyticsMetadataType
analyticsMetadata :: Maybe AnalyticsMetadataType
$sel:analyticsMetadata:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe AnalyticsMetadataType
analyticsMetadata} -> Maybe AnalyticsMetadataType
analyticsMetadata) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Maybe AnalyticsMetadataType
a -> ConfirmForgotPassword
s {$sel:analyticsMetadata:ConfirmForgotPassword' :: Maybe AnalyticsMetadataType
analyticsMetadata = Maybe AnalyticsMetadataType
a} :: ConfirmForgotPassword)
confirmForgotPassword_userContextData :: Lens.Lens' ConfirmForgotPassword (Prelude.Maybe UserContextDataType)
confirmForgotPassword_userContextData :: (Maybe UserContextDataType -> f (Maybe UserContextDataType))
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_userContextData = (ConfirmForgotPassword -> Maybe UserContextDataType)
-> (ConfirmForgotPassword
-> Maybe UserContextDataType -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Maybe UserContextDataType)
(Maybe UserContextDataType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Maybe UserContextDataType
userContextData :: Maybe UserContextDataType
$sel:userContextData:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe UserContextDataType
userContextData} -> Maybe UserContextDataType
userContextData) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Maybe UserContextDataType
a -> ConfirmForgotPassword
s {$sel:userContextData:ConfirmForgotPassword' :: Maybe UserContextDataType
userContextData = Maybe UserContextDataType
a} :: ConfirmForgotPassword)
confirmForgotPassword_secretHash :: Lens.Lens' ConfirmForgotPassword (Prelude.Maybe Prelude.Text)
confirmForgotPassword_secretHash :: (Maybe Text -> f (Maybe Text))
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_secretHash = (ConfirmForgotPassword -> Maybe (Sensitive Text))
-> (ConfirmForgotPassword
-> Maybe (Sensitive Text) -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Maybe (Sensitive Text)
secretHash :: Maybe (Sensitive Text)
$sel:secretHash:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe (Sensitive Text)
secretHash} -> Maybe (Sensitive Text)
secretHash) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Maybe (Sensitive Text)
a -> ConfirmForgotPassword
s {$sel:secretHash:ConfirmForgotPassword' :: Maybe (Sensitive Text)
secretHash = Maybe (Sensitive Text)
a} :: ConfirmForgotPassword) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ConfirmForgotPassword -> f ConfirmForgotPassword)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ConfirmForgotPassword
-> f ConfirmForgotPassword
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
confirmForgotPassword_clientId :: Lens.Lens' ConfirmForgotPassword Prelude.Text
confirmForgotPassword_clientId :: (Text -> f Text)
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_clientId = (ConfirmForgotPassword -> Sensitive Text)
-> (ConfirmForgotPassword
-> Sensitive Text -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Sensitive Text
clientId :: Sensitive Text
$sel:clientId:ConfirmForgotPassword' :: ConfirmForgotPassword -> Sensitive Text
clientId} -> Sensitive Text
clientId) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Sensitive Text
a -> ConfirmForgotPassword
s {$sel:clientId:ConfirmForgotPassword' :: Sensitive Text
clientId = Sensitive Text
a} :: ConfirmForgotPassword) ((Sensitive Text -> f (Sensitive Text))
-> ConfirmForgotPassword -> f ConfirmForgotPassword)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> ConfirmForgotPassword
-> f ConfirmForgotPassword
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
confirmForgotPassword_username :: Lens.Lens' ConfirmForgotPassword Prelude.Text
confirmForgotPassword_username :: (Text -> f Text)
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_username = (ConfirmForgotPassword -> Sensitive Text)
-> (ConfirmForgotPassword
-> Sensitive Text -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Sensitive Text
username :: Sensitive Text
$sel:username:ConfirmForgotPassword' :: ConfirmForgotPassword -> Sensitive Text
username} -> Sensitive Text
username) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Sensitive Text
a -> ConfirmForgotPassword
s {$sel:username:ConfirmForgotPassword' :: Sensitive Text
username = Sensitive Text
a} :: ConfirmForgotPassword) ((Sensitive Text -> f (Sensitive Text))
-> ConfirmForgotPassword -> f ConfirmForgotPassword)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> ConfirmForgotPassword
-> f ConfirmForgotPassword
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
confirmForgotPassword_confirmationCode :: Lens.Lens' ConfirmForgotPassword Prelude.Text
confirmForgotPassword_confirmationCode :: (Text -> f Text)
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_confirmationCode = (ConfirmForgotPassword -> Text)
-> (ConfirmForgotPassword -> Text -> ConfirmForgotPassword)
-> Lens ConfirmForgotPassword ConfirmForgotPassword Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Text
confirmationCode :: Text
$sel:confirmationCode:ConfirmForgotPassword' :: ConfirmForgotPassword -> Text
confirmationCode} -> Text
confirmationCode) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Text
a -> ConfirmForgotPassword
s {$sel:confirmationCode:ConfirmForgotPassword' :: Text
confirmationCode = Text
a} :: ConfirmForgotPassword)
confirmForgotPassword_password :: Lens.Lens' ConfirmForgotPassword Prelude.Text
confirmForgotPassword_password :: (Text -> f Text)
-> ConfirmForgotPassword -> f ConfirmForgotPassword
confirmForgotPassword_password = (ConfirmForgotPassword -> Sensitive Text)
-> (ConfirmForgotPassword
-> Sensitive Text -> ConfirmForgotPassword)
-> Lens
ConfirmForgotPassword
ConfirmForgotPassword
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPassword' {Sensitive Text
password :: Sensitive Text
$sel:password:ConfirmForgotPassword' :: ConfirmForgotPassword -> Sensitive Text
password} -> Sensitive Text
password) (\s :: ConfirmForgotPassword
s@ConfirmForgotPassword' {} Sensitive Text
a -> ConfirmForgotPassword
s {$sel:password:ConfirmForgotPassword' :: Sensitive Text
password = Sensitive Text
a} :: ConfirmForgotPassword) ((Sensitive Text -> f (Sensitive Text))
-> ConfirmForgotPassword -> f ConfirmForgotPassword)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> ConfirmForgotPassword
-> f ConfirmForgotPassword
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.AWSRequest ConfirmForgotPassword where
type
AWSResponse ConfirmForgotPassword =
ConfirmForgotPasswordResponse
request :: ConfirmForgotPassword -> Request ConfirmForgotPassword
request = Service -> ConfirmForgotPassword -> Request ConfirmForgotPassword
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ConfirmForgotPassword
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ConfirmForgotPassword)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse ConfirmForgotPassword))
-> Logger
-> Service
-> Proxy ConfirmForgotPassword
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ConfirmForgotPassword)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> ConfirmForgotPasswordResponse
ConfirmForgotPasswordResponse'
(Int -> ConfirmForgotPasswordResponse)
-> Either String Int -> Either String ConfirmForgotPasswordResponse
forall (f :: * -> *) a b. Functor 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 ConfirmForgotPassword
instance Prelude.NFData ConfirmForgotPassword
instance Core.ToHeaders ConfirmForgotPassword where
toHeaders :: ConfirmForgotPassword -> ResponseHeaders
toHeaders =
ResponseHeaders -> ConfirmForgotPassword -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSCognitoIdentityProviderService.ConfirmForgotPassword" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ConfirmForgotPassword where
toJSON :: ConfirmForgotPassword -> Value
toJSON ConfirmForgotPassword' {Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe AnalyticsMetadataType
Maybe UserContextDataType
Text
Sensitive Text
password :: Sensitive Text
confirmationCode :: Text
username :: Sensitive Text
clientId :: Sensitive Text
secretHash :: Maybe (Sensitive Text)
userContextData :: Maybe UserContextDataType
analyticsMetadata :: Maybe AnalyticsMetadataType
clientMetadata :: Maybe (HashMap Text Text)
$sel:password:ConfirmForgotPassword' :: ConfirmForgotPassword -> Sensitive Text
$sel:confirmationCode:ConfirmForgotPassword' :: ConfirmForgotPassword -> Text
$sel:username:ConfirmForgotPassword' :: ConfirmForgotPassword -> Sensitive Text
$sel:clientId:ConfirmForgotPassword' :: ConfirmForgotPassword -> Sensitive Text
$sel:secretHash:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe (Sensitive Text)
$sel:userContextData:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe UserContextDataType
$sel:analyticsMetadata:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe AnalyticsMetadataType
$sel:clientMetadata:ConfirmForgotPassword' :: ConfirmForgotPassword -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ClientMetadata" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
clientMetadata,
(Text
"AnalyticsMetadata" Text -> AnalyticsMetadataType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AnalyticsMetadataType -> Pair)
-> Maybe AnalyticsMetadataType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AnalyticsMetadataType
analyticsMetadata,
(Text
"UserContextData" Text -> UserContextDataType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UserContextDataType -> Pair)
-> Maybe UserContextDataType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserContextDataType
userContextData,
(Text
"SecretHash" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
secretHash,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientId" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
clientId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Username" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
username),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ConfirmationCode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
confirmationCode),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
password)
]
)
instance Core.ToPath ConfirmForgotPassword where
toPath :: ConfirmForgotPassword -> ByteString
toPath = ByteString -> ConfirmForgotPassword -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ConfirmForgotPassword where
toQuery :: ConfirmForgotPassword -> QueryString
toQuery = QueryString -> ConfirmForgotPassword -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ConfirmForgotPasswordResponse = ConfirmForgotPasswordResponse'
{
ConfirmForgotPasswordResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool
(ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool)
-> (ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool)
-> Eq ConfirmForgotPasswordResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool
$c/= :: ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool
== :: ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool
$c== :: ConfirmForgotPasswordResponse
-> ConfirmForgotPasswordResponse -> Bool
Prelude.Eq, ReadPrec [ConfirmForgotPasswordResponse]
ReadPrec ConfirmForgotPasswordResponse
Int -> ReadS ConfirmForgotPasswordResponse
ReadS [ConfirmForgotPasswordResponse]
(Int -> ReadS ConfirmForgotPasswordResponse)
-> ReadS [ConfirmForgotPasswordResponse]
-> ReadPrec ConfirmForgotPasswordResponse
-> ReadPrec [ConfirmForgotPasswordResponse]
-> Read ConfirmForgotPasswordResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfirmForgotPasswordResponse]
$creadListPrec :: ReadPrec [ConfirmForgotPasswordResponse]
readPrec :: ReadPrec ConfirmForgotPasswordResponse
$creadPrec :: ReadPrec ConfirmForgotPasswordResponse
readList :: ReadS [ConfirmForgotPasswordResponse]
$creadList :: ReadS [ConfirmForgotPasswordResponse]
readsPrec :: Int -> ReadS ConfirmForgotPasswordResponse
$creadsPrec :: Int -> ReadS ConfirmForgotPasswordResponse
Prelude.Read, Int -> ConfirmForgotPasswordResponse -> ShowS
[ConfirmForgotPasswordResponse] -> ShowS
ConfirmForgotPasswordResponse -> String
(Int -> ConfirmForgotPasswordResponse -> ShowS)
-> (ConfirmForgotPasswordResponse -> String)
-> ([ConfirmForgotPasswordResponse] -> ShowS)
-> Show ConfirmForgotPasswordResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfirmForgotPasswordResponse] -> ShowS
$cshowList :: [ConfirmForgotPasswordResponse] -> ShowS
show :: ConfirmForgotPasswordResponse -> String
$cshow :: ConfirmForgotPasswordResponse -> String
showsPrec :: Int -> ConfirmForgotPasswordResponse -> ShowS
$cshowsPrec :: Int -> ConfirmForgotPasswordResponse -> ShowS
Prelude.Show, (forall x.
ConfirmForgotPasswordResponse
-> Rep ConfirmForgotPasswordResponse x)
-> (forall x.
Rep ConfirmForgotPasswordResponse x
-> ConfirmForgotPasswordResponse)
-> Generic ConfirmForgotPasswordResponse
forall x.
Rep ConfirmForgotPasswordResponse x
-> ConfirmForgotPasswordResponse
forall x.
ConfirmForgotPasswordResponse
-> Rep ConfirmForgotPasswordResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfirmForgotPasswordResponse x
-> ConfirmForgotPasswordResponse
$cfrom :: forall x.
ConfirmForgotPasswordResponse
-> Rep ConfirmForgotPasswordResponse x
Prelude.Generic)
newConfirmForgotPasswordResponse ::
Prelude.Int ->
ConfirmForgotPasswordResponse
newConfirmForgotPasswordResponse :: Int -> ConfirmForgotPasswordResponse
newConfirmForgotPasswordResponse Int
pHttpStatus_ =
ConfirmForgotPasswordResponse' :: Int -> ConfirmForgotPasswordResponse
ConfirmForgotPasswordResponse'
{ $sel:httpStatus:ConfirmForgotPasswordResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
confirmForgotPasswordResponse_httpStatus :: Lens.Lens' ConfirmForgotPasswordResponse Prelude.Int
confirmForgotPasswordResponse_httpStatus :: (Int -> f Int)
-> ConfirmForgotPasswordResponse -> f ConfirmForgotPasswordResponse
confirmForgotPasswordResponse_httpStatus = (ConfirmForgotPasswordResponse -> Int)
-> (ConfirmForgotPasswordResponse
-> Int -> ConfirmForgotPasswordResponse)
-> Lens
ConfirmForgotPasswordResponse ConfirmForgotPasswordResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmForgotPasswordResponse' {Int
httpStatus :: Int
$sel:httpStatus:ConfirmForgotPasswordResponse' :: ConfirmForgotPasswordResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ConfirmForgotPasswordResponse
s@ConfirmForgotPasswordResponse' {} Int
a -> ConfirmForgotPasswordResponse
s {$sel:httpStatus:ConfirmForgotPasswordResponse' :: Int
httpStatus = Int
a} :: ConfirmForgotPasswordResponse)
instance Prelude.NFData ConfirmForgotPasswordResponse