{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CognitoIdentityProvider.AdminResetUserPassword
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Resets the specified user\'s password in a user pool as an
-- administrator. Works on any user.
--
-- When a developer calls this API, the current password is invalidated, so
-- it must be changed. If a user tries to sign in after the API is called,
-- the app will get a PasswordResetRequiredException exception back and
-- should direct the user down the flow to reset the password, which is the
-- same as the forgot password flow. In addition, if the user pool has
-- phone verification selected and a verified phone number exists for the
-- user, or if email verification is selected and a verified email exists
-- for the user, calling this API will also result in sending a message to
-- the end user with the code to change their password.
--
-- This action might generate an SMS text message. Starting June 1, 2021,
-- US telecom carriers require you to register an origination phone number
-- before you can send SMS messages to US phone numbers. If you use SMS
-- text messages in Amazon Cognito, you must register a phone number with
-- <https://console.aws.amazon.com/pinpoint/home/ Amazon Pinpoint>. Amazon
-- Cognito uses the registered number automatically. Otherwise, Amazon
-- Cognito users who must receive SMS messages might not be able to sign
-- up, activate their accounts, or sign in.
--
-- If you have never used SMS text messages with Amazon Cognito or any
-- other Amazon Web Service, Amazon Simple Notification Service might place
-- your account in the SMS sandbox. In
-- /<https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html sandbox mode>/
-- , you can send messages only to verified phone numbers. After you test
-- your app while in the sandbox environment, you can move out of the
-- sandbox and into production. For more information, see
-- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-sms-userpool-settings.html SMS message settings for Amazon Cognito user pools>
-- in the /Amazon Cognito Developer Guide/.
--
-- Calling this action requires developer credentials.
module Amazonka.CognitoIdentityProvider.AdminResetUserPassword
  ( -- * Creating a Request
    AdminResetUserPassword (..),
    newAdminResetUserPassword,

    -- * Request Lenses
    adminResetUserPassword_clientMetadata,
    adminResetUserPassword_userPoolId,
    adminResetUserPassword_username,

    -- * Destructuring the Response
    AdminResetUserPasswordResponse (..),
    newAdminResetUserPasswordResponse,

    -- * Response Lenses
    adminResetUserPasswordResponse_httpStatus,
  )
where

import Amazonka.CognitoIdentityProvider.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the request to reset a user\'s password as an administrator.
--
-- /See:/ 'newAdminResetUserPassword' smart constructor.
data AdminResetUserPassword = AdminResetUserPassword'
  { -- | A map of custom key-value pairs that you can provide as input for any
    -- custom workflows that this action triggers.
    --
    -- You create custom workflows by assigning Lambda functions to user pool
    -- triggers. When you use the AdminResetUserPassword API action, Amazon
    -- Cognito invokes the function that is assigned to the /custom message/
    -- trigger. When Amazon Cognito invokes this function, it passes a JSON
    -- payload, which the function receives as input. This payload contains a
    -- @clientMetadata@ attribute, which provides the data that you assigned to
    -- the ClientMetadata parameter in your AdminResetUserPassword request. In
    -- your function code in Lambda, you can process the @clientMetadata@ value
    -- to enhance your workflow for your specific needs.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html Customizing user pool Workflows with Lambda Triggers>
    -- in the /Amazon Cognito Developer Guide/.
    --
    -- When you use the ClientMetadata parameter, remember that Amazon Cognito
    -- won\'t do the following:
    --
    -- -   Store the ClientMetadata value. This data is available only to
    --     Lambda triggers that are assigned to a user pool to support custom
    --     workflows. If your user pool configuration doesn\'t include
    --     triggers, the ClientMetadata parameter serves no purpose.
    --
    -- -   Validate the ClientMetadata value.
    --
    -- -   Encrypt the ClientMetadata value. Don\'t use Amazon Cognito to
    --     provide sensitive information.
    AdminResetUserPassword -> Maybe (HashMap Text Text)
clientMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The user pool ID for the user pool where you want to reset the user\'s
    -- password.
    AdminResetUserPassword -> Text
userPoolId :: Prelude.Text,
    -- | The user name of the user whose password you want to reset.
    AdminResetUserPassword -> Sensitive Text
username :: Data.Sensitive Prelude.Text
  }
  deriving (AdminResetUserPassword -> AdminResetUserPassword -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminResetUserPassword -> AdminResetUserPassword -> Bool
$c/= :: AdminResetUserPassword -> AdminResetUserPassword -> Bool
== :: AdminResetUserPassword -> AdminResetUserPassword -> Bool
$c== :: AdminResetUserPassword -> AdminResetUserPassword -> Bool
Prelude.Eq, Int -> AdminResetUserPassword -> ShowS
[AdminResetUserPassword] -> ShowS
AdminResetUserPassword -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminResetUserPassword] -> ShowS
$cshowList :: [AdminResetUserPassword] -> ShowS
show :: AdminResetUserPassword -> String
$cshow :: AdminResetUserPassword -> String
showsPrec :: Int -> AdminResetUserPassword -> ShowS
$cshowsPrec :: Int -> AdminResetUserPassword -> ShowS
Prelude.Show, forall x. Rep AdminResetUserPassword x -> AdminResetUserPassword
forall x. AdminResetUserPassword -> Rep AdminResetUserPassword x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AdminResetUserPassword x -> AdminResetUserPassword
$cfrom :: forall x. AdminResetUserPassword -> Rep AdminResetUserPassword x
Prelude.Generic)

-- |
-- Create a value of 'AdminResetUserPassword' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'clientMetadata', 'adminResetUserPassword_clientMetadata' - A map of custom key-value pairs that you can provide as input for any
-- custom workflows that this action triggers.
--
-- You create custom workflows by assigning Lambda functions to user pool
-- triggers. When you use the AdminResetUserPassword API action, Amazon
-- Cognito invokes the function that is assigned to the /custom message/
-- trigger. When Amazon Cognito invokes this function, it passes a JSON
-- payload, which the function receives as input. This payload contains a
-- @clientMetadata@ attribute, which provides the data that you assigned to
-- the ClientMetadata parameter in your AdminResetUserPassword request. In
-- your function code in Lambda, you can process the @clientMetadata@ value
-- to enhance your workflow for your specific needs.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html Customizing user pool Workflows with Lambda Triggers>
-- in the /Amazon Cognito Developer Guide/.
--
-- When you use the ClientMetadata parameter, remember that Amazon Cognito
-- won\'t do the following:
--
-- -   Store the ClientMetadata value. This data is available only to
--     Lambda triggers that are assigned to a user pool to support custom
--     workflows. If your user pool configuration doesn\'t include
--     triggers, the ClientMetadata parameter serves no purpose.
--
-- -   Validate the ClientMetadata value.
--
-- -   Encrypt the ClientMetadata value. Don\'t use Amazon Cognito to
--     provide sensitive information.
--
-- 'userPoolId', 'adminResetUserPassword_userPoolId' - The user pool ID for the user pool where you want to reset the user\'s
-- password.
--
-- 'username', 'adminResetUserPassword_username' - The user name of the user whose password you want to reset.
newAdminResetUserPassword ::
  -- | 'userPoolId'
  Prelude.Text ->
  -- | 'username'
  Prelude.Text ->
  AdminResetUserPassword
newAdminResetUserPassword :: Text -> Text -> AdminResetUserPassword
newAdminResetUserPassword Text
pUserPoolId_ Text
pUsername_ =
  AdminResetUserPassword'
    { $sel:clientMetadata:AdminResetUserPassword' :: Maybe (HashMap Text Text)
clientMetadata =
        forall a. Maybe a
Prelude.Nothing,
      $sel:userPoolId:AdminResetUserPassword' :: Text
userPoolId = Text
pUserPoolId_,
      $sel:username:AdminResetUserPassword' :: Sensitive Text
username = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pUsername_
    }

-- | A map of custom key-value pairs that you can provide as input for any
-- custom workflows that this action triggers.
--
-- You create custom workflows by assigning Lambda functions to user pool
-- triggers. When you use the AdminResetUserPassword API action, Amazon
-- Cognito invokes the function that is assigned to the /custom message/
-- trigger. When Amazon Cognito invokes this function, it passes a JSON
-- payload, which the function receives as input. This payload contains a
-- @clientMetadata@ attribute, which provides the data that you assigned to
-- the ClientMetadata parameter in your AdminResetUserPassword request. In
-- your function code in Lambda, you can process the @clientMetadata@ value
-- to enhance your workflow for your specific needs.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html Customizing user pool Workflows with Lambda Triggers>
-- in the /Amazon Cognito Developer Guide/.
--
-- When you use the ClientMetadata parameter, remember that Amazon Cognito
-- won\'t do the following:
--
-- -   Store the ClientMetadata value. This data is available only to
--     Lambda triggers that are assigned to a user pool to support custom
--     workflows. If your user pool configuration doesn\'t include
--     triggers, the ClientMetadata parameter serves no purpose.
--
-- -   Validate the ClientMetadata value.
--
-- -   Encrypt the ClientMetadata value. Don\'t use Amazon Cognito to
--     provide sensitive information.
adminResetUserPassword_clientMetadata :: Lens.Lens' AdminResetUserPassword (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
adminResetUserPassword_clientMetadata :: Lens' AdminResetUserPassword (Maybe (HashMap Text Text))
adminResetUserPassword_clientMetadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminResetUserPassword' {Maybe (HashMap Text Text)
clientMetadata :: Maybe (HashMap Text Text)
$sel:clientMetadata:AdminResetUserPassword' :: AdminResetUserPassword -> Maybe (HashMap Text Text)
clientMetadata} -> Maybe (HashMap Text Text)
clientMetadata) (\s :: AdminResetUserPassword
s@AdminResetUserPassword' {} Maybe (HashMap Text Text)
a -> AdminResetUserPassword
s {$sel:clientMetadata:AdminResetUserPassword' :: Maybe (HashMap Text Text)
clientMetadata = Maybe (HashMap Text Text)
a} :: AdminResetUserPassword) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The user pool ID for the user pool where you want to reset the user\'s
-- password.
adminResetUserPassword_userPoolId :: Lens.Lens' AdminResetUserPassword Prelude.Text
adminResetUserPassword_userPoolId :: Lens' AdminResetUserPassword Text
adminResetUserPassword_userPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminResetUserPassword' {Text
userPoolId :: Text
$sel:userPoolId:AdminResetUserPassword' :: AdminResetUserPassword -> Text
userPoolId} -> Text
userPoolId) (\s :: AdminResetUserPassword
s@AdminResetUserPassword' {} Text
a -> AdminResetUserPassword
s {$sel:userPoolId:AdminResetUserPassword' :: Text
userPoolId = Text
a} :: AdminResetUserPassword)

-- | The user name of the user whose password you want to reset.
adminResetUserPassword_username :: Lens.Lens' AdminResetUserPassword Prelude.Text
adminResetUserPassword_username :: Lens' AdminResetUserPassword Text
adminResetUserPassword_username = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminResetUserPassword' {Sensitive Text
username :: Sensitive Text
$sel:username:AdminResetUserPassword' :: AdminResetUserPassword -> Sensitive Text
username} -> Sensitive Text
username) (\s :: AdminResetUserPassword
s@AdminResetUserPassword' {} Sensitive Text
a -> AdminResetUserPassword
s {$sel:username:AdminResetUserPassword' :: Sensitive Text
username = Sensitive Text
a} :: AdminResetUserPassword) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

instance Core.AWSRequest AdminResetUserPassword where
  type
    AWSResponse AdminResetUserPassword =
      AdminResetUserPasswordResponse
  request :: (Service -> Service)
-> AdminResetUserPassword -> Request AdminResetUserPassword
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy AdminResetUserPassword
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AdminResetUserPassword)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> AdminResetUserPasswordResponse
AdminResetUserPasswordResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable AdminResetUserPassword where
  hashWithSalt :: Int -> AdminResetUserPassword -> Int
hashWithSalt Int
_salt AdminResetUserPassword' {Maybe (HashMap Text Text)
Text
Sensitive Text
username :: Sensitive Text
userPoolId :: Text
clientMetadata :: Maybe (HashMap Text Text)
$sel:username:AdminResetUserPassword' :: AdminResetUserPassword -> Sensitive Text
$sel:userPoolId:AdminResetUserPassword' :: AdminResetUserPassword -> Text
$sel:clientMetadata:AdminResetUserPassword' :: AdminResetUserPassword -> Maybe (HashMap Text Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
clientMetadata
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userPoolId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
username

instance Prelude.NFData AdminResetUserPassword where
  rnf :: AdminResetUserPassword -> ()
rnf AdminResetUserPassword' {Maybe (HashMap Text Text)
Text
Sensitive Text
username :: Sensitive Text
userPoolId :: Text
clientMetadata :: Maybe (HashMap Text Text)
$sel:username:AdminResetUserPassword' :: AdminResetUserPassword -> Sensitive Text
$sel:userPoolId:AdminResetUserPassword' :: AdminResetUserPassword -> Text
$sel:clientMetadata:AdminResetUserPassword' :: AdminResetUserPassword -> Maybe (HashMap Text Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
clientMetadata
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userPoolId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
username

instance Data.ToHeaders AdminResetUserPassword where
  toHeaders :: AdminResetUserPassword -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSCognitoIdentityProviderService.AdminResetUserPassword" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON AdminResetUserPassword where
  toJSON :: AdminResetUserPassword -> Value
toJSON AdminResetUserPassword' {Maybe (HashMap Text Text)
Text
Sensitive Text
username :: Sensitive Text
userPoolId :: Text
clientMetadata :: Maybe (HashMap Text Text)
$sel:username:AdminResetUserPassword' :: AdminResetUserPassword -> Sensitive Text
$sel:userPoolId:AdminResetUserPassword' :: AdminResetUserPassword -> Text
$sel:clientMetadata:AdminResetUserPassword' :: AdminResetUserPassword -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientMetadata" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
clientMetadata,
            forall a. a -> Maybe a
Prelude.Just (Key
"UserPoolId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userPoolId),
            forall a. a -> Maybe a
Prelude.Just (Key
"Username" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
username)
          ]
      )

instance Data.ToPath AdminResetUserPassword where
  toPath :: AdminResetUserPassword -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery AdminResetUserPassword where
  toQuery :: AdminResetUserPassword -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | Represents the response from the server to reset a user password as an
-- administrator.
--
-- /See:/ 'newAdminResetUserPasswordResponse' smart constructor.
data AdminResetUserPasswordResponse = AdminResetUserPasswordResponse'
  { -- | The response's http status code.
    AdminResetUserPasswordResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AdminResetUserPasswordResponse
-> AdminResetUserPasswordResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminResetUserPasswordResponse
-> AdminResetUserPasswordResponse -> Bool
$c/= :: AdminResetUserPasswordResponse
-> AdminResetUserPasswordResponse -> Bool
== :: AdminResetUserPasswordResponse
-> AdminResetUserPasswordResponse -> Bool
$c== :: AdminResetUserPasswordResponse
-> AdminResetUserPasswordResponse -> Bool
Prelude.Eq, ReadPrec [AdminResetUserPasswordResponse]
ReadPrec AdminResetUserPasswordResponse
Int -> ReadS AdminResetUserPasswordResponse
ReadS [AdminResetUserPasswordResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AdminResetUserPasswordResponse]
$creadListPrec :: ReadPrec [AdminResetUserPasswordResponse]
readPrec :: ReadPrec AdminResetUserPasswordResponse
$creadPrec :: ReadPrec AdminResetUserPasswordResponse
readList :: ReadS [AdminResetUserPasswordResponse]
$creadList :: ReadS [AdminResetUserPasswordResponse]
readsPrec :: Int -> ReadS AdminResetUserPasswordResponse
$creadsPrec :: Int -> ReadS AdminResetUserPasswordResponse
Prelude.Read, Int -> AdminResetUserPasswordResponse -> ShowS
[AdminResetUserPasswordResponse] -> ShowS
AdminResetUserPasswordResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminResetUserPasswordResponse] -> ShowS
$cshowList :: [AdminResetUserPasswordResponse] -> ShowS
show :: AdminResetUserPasswordResponse -> String
$cshow :: AdminResetUserPasswordResponse -> String
showsPrec :: Int -> AdminResetUserPasswordResponse -> ShowS
$cshowsPrec :: Int -> AdminResetUserPasswordResponse -> ShowS
Prelude.Show, forall x.
Rep AdminResetUserPasswordResponse x
-> AdminResetUserPasswordResponse
forall x.
AdminResetUserPasswordResponse
-> Rep AdminResetUserPasswordResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AdminResetUserPasswordResponse x
-> AdminResetUserPasswordResponse
$cfrom :: forall x.
AdminResetUserPasswordResponse
-> Rep AdminResetUserPasswordResponse x
Prelude.Generic)

-- |
-- Create a value of 'AdminResetUserPasswordResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'adminResetUserPasswordResponse_httpStatus' - The response's http status code.
newAdminResetUserPasswordResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AdminResetUserPasswordResponse
newAdminResetUserPasswordResponse :: Int -> AdminResetUserPasswordResponse
newAdminResetUserPasswordResponse Int
pHttpStatus_ =
  AdminResetUserPasswordResponse'
    { $sel:httpStatus:AdminResetUserPasswordResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
adminResetUserPasswordResponse_httpStatus :: Lens.Lens' AdminResetUserPasswordResponse Prelude.Int
adminResetUserPasswordResponse_httpStatus :: Lens' AdminResetUserPasswordResponse Int
adminResetUserPasswordResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminResetUserPasswordResponse' {Int
httpStatus :: Int
$sel:httpStatus:AdminResetUserPasswordResponse' :: AdminResetUserPasswordResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AdminResetUserPasswordResponse
s@AdminResetUserPasswordResponse' {} Int
a -> AdminResetUserPasswordResponse
s {$sel:httpStatus:AdminResetUserPasswordResponse' :: Int
httpStatus = Int
a} :: AdminResetUserPasswordResponse)

instance
  Prelude.NFData
    AdminResetUserPasswordResponse
  where
  rnf :: AdminResetUserPasswordResponse -> ()
rnf AdminResetUserPasswordResponse' {Int
httpStatus :: Int
$sel:httpStatus:AdminResetUserPasswordResponse' :: AdminResetUserPasswordResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus