{-# 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.AdminUpdateDeviceStatus
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the device status as an administrator.
--
-- Calling this action requires developer credentials.
module Amazonka.CognitoIdentityProvider.AdminUpdateDeviceStatus
  ( -- * Creating a Request
    AdminUpdateDeviceStatus (..),
    newAdminUpdateDeviceStatus,

    -- * Request Lenses
    adminUpdateDeviceStatus_deviceRememberedStatus,
    adminUpdateDeviceStatus_userPoolId,
    adminUpdateDeviceStatus_username,
    adminUpdateDeviceStatus_deviceKey,

    -- * Destructuring the Response
    AdminUpdateDeviceStatusResponse (..),
    newAdminUpdateDeviceStatusResponse,

    -- * Response Lenses
    adminUpdateDeviceStatusResponse_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

-- | The request to update the device status, as an administrator.
--
-- /See:/ 'newAdminUpdateDeviceStatus' smart constructor.
data AdminUpdateDeviceStatus = AdminUpdateDeviceStatus'
  { -- | The status indicating whether a device has been remembered or not.
    AdminUpdateDeviceStatus -> Maybe DeviceRememberedStatusType
deviceRememberedStatus :: Prelude.Maybe DeviceRememberedStatusType,
    -- | The user pool ID.
    AdminUpdateDeviceStatus -> Text
userPoolId :: Prelude.Text,
    -- | The user name.
    AdminUpdateDeviceStatus -> Sensitive Text
username :: Core.Sensitive Prelude.Text,
    -- | The device key.
    AdminUpdateDeviceStatus -> Text
deviceKey :: Prelude.Text
  }
  deriving (AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool
(AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool)
-> (AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool)
-> Eq AdminUpdateDeviceStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool
$c/= :: AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool
== :: AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool
$c== :: AdminUpdateDeviceStatus -> AdminUpdateDeviceStatus -> Bool
Prelude.Eq, Int -> AdminUpdateDeviceStatus -> ShowS
[AdminUpdateDeviceStatus] -> ShowS
AdminUpdateDeviceStatus -> String
(Int -> AdminUpdateDeviceStatus -> ShowS)
-> (AdminUpdateDeviceStatus -> String)
-> ([AdminUpdateDeviceStatus] -> ShowS)
-> Show AdminUpdateDeviceStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminUpdateDeviceStatus] -> ShowS
$cshowList :: [AdminUpdateDeviceStatus] -> ShowS
show :: AdminUpdateDeviceStatus -> String
$cshow :: AdminUpdateDeviceStatus -> String
showsPrec :: Int -> AdminUpdateDeviceStatus -> ShowS
$cshowsPrec :: Int -> AdminUpdateDeviceStatus -> ShowS
Prelude.Show, (forall x.
 AdminUpdateDeviceStatus -> Rep AdminUpdateDeviceStatus x)
-> (forall x.
    Rep AdminUpdateDeviceStatus x -> AdminUpdateDeviceStatus)
-> Generic AdminUpdateDeviceStatus
forall x. Rep AdminUpdateDeviceStatus x -> AdminUpdateDeviceStatus
forall x. AdminUpdateDeviceStatus -> Rep AdminUpdateDeviceStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AdminUpdateDeviceStatus x -> AdminUpdateDeviceStatus
$cfrom :: forall x. AdminUpdateDeviceStatus -> Rep AdminUpdateDeviceStatus x
Prelude.Generic)

-- |
-- Create a value of 'AdminUpdateDeviceStatus' 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:
--
-- 'deviceRememberedStatus', 'adminUpdateDeviceStatus_deviceRememberedStatus' - The status indicating whether a device has been remembered or not.
--
-- 'userPoolId', 'adminUpdateDeviceStatus_userPoolId' - The user pool ID.
--
-- 'username', 'adminUpdateDeviceStatus_username' - The user name.
--
-- 'deviceKey', 'adminUpdateDeviceStatus_deviceKey' - The device key.
newAdminUpdateDeviceStatus ::
  -- | 'userPoolId'
  Prelude.Text ->
  -- | 'username'
  Prelude.Text ->
  -- | 'deviceKey'
  Prelude.Text ->
  AdminUpdateDeviceStatus
newAdminUpdateDeviceStatus :: Text -> Text -> Text -> AdminUpdateDeviceStatus
newAdminUpdateDeviceStatus
  Text
pUserPoolId_
  Text
pUsername_
  Text
pDeviceKey_ =
    AdminUpdateDeviceStatus' :: Maybe DeviceRememberedStatusType
-> Text -> Sensitive Text -> Text -> AdminUpdateDeviceStatus
AdminUpdateDeviceStatus'
      { $sel:deviceRememberedStatus:AdminUpdateDeviceStatus' :: Maybe DeviceRememberedStatusType
deviceRememberedStatus =
          Maybe DeviceRememberedStatusType
forall a. Maybe a
Prelude.Nothing,
        $sel:userPoolId:AdminUpdateDeviceStatus' :: Text
userPoolId = Text
pUserPoolId_,
        $sel:username:AdminUpdateDeviceStatus' :: 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:deviceKey:AdminUpdateDeviceStatus' :: Text
deviceKey = Text
pDeviceKey_
      }

-- | The status indicating whether a device has been remembered or not.
adminUpdateDeviceStatus_deviceRememberedStatus :: Lens.Lens' AdminUpdateDeviceStatus (Prelude.Maybe DeviceRememberedStatusType)
adminUpdateDeviceStatus_deviceRememberedStatus :: (Maybe DeviceRememberedStatusType
 -> f (Maybe DeviceRememberedStatusType))
-> AdminUpdateDeviceStatus -> f AdminUpdateDeviceStatus
adminUpdateDeviceStatus_deviceRememberedStatus = (AdminUpdateDeviceStatus -> Maybe DeviceRememberedStatusType)
-> (AdminUpdateDeviceStatus
    -> Maybe DeviceRememberedStatusType -> AdminUpdateDeviceStatus)
-> Lens
     AdminUpdateDeviceStatus
     AdminUpdateDeviceStatus
     (Maybe DeviceRememberedStatusType)
     (Maybe DeviceRememberedStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminUpdateDeviceStatus' {Maybe DeviceRememberedStatusType
deviceRememberedStatus :: Maybe DeviceRememberedStatusType
$sel:deviceRememberedStatus:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Maybe DeviceRememberedStatusType
deviceRememberedStatus} -> Maybe DeviceRememberedStatusType
deviceRememberedStatus) (\s :: AdminUpdateDeviceStatus
s@AdminUpdateDeviceStatus' {} Maybe DeviceRememberedStatusType
a -> AdminUpdateDeviceStatus
s {$sel:deviceRememberedStatus:AdminUpdateDeviceStatus' :: Maybe DeviceRememberedStatusType
deviceRememberedStatus = Maybe DeviceRememberedStatusType
a} :: AdminUpdateDeviceStatus)

-- | The user pool ID.
adminUpdateDeviceStatus_userPoolId :: Lens.Lens' AdminUpdateDeviceStatus Prelude.Text
adminUpdateDeviceStatus_userPoolId :: (Text -> f Text)
-> AdminUpdateDeviceStatus -> f AdminUpdateDeviceStatus
adminUpdateDeviceStatus_userPoolId = (AdminUpdateDeviceStatus -> Text)
-> (AdminUpdateDeviceStatus -> Text -> AdminUpdateDeviceStatus)
-> Lens AdminUpdateDeviceStatus AdminUpdateDeviceStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminUpdateDeviceStatus' {Text
userPoolId :: Text
$sel:userPoolId:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Text
userPoolId} -> Text
userPoolId) (\s :: AdminUpdateDeviceStatus
s@AdminUpdateDeviceStatus' {} Text
a -> AdminUpdateDeviceStatus
s {$sel:userPoolId:AdminUpdateDeviceStatus' :: Text
userPoolId = Text
a} :: AdminUpdateDeviceStatus)

-- | The user name.
adminUpdateDeviceStatus_username :: Lens.Lens' AdminUpdateDeviceStatus Prelude.Text
adminUpdateDeviceStatus_username :: (Text -> f Text)
-> AdminUpdateDeviceStatus -> f AdminUpdateDeviceStatus
adminUpdateDeviceStatus_username = (AdminUpdateDeviceStatus -> Sensitive Text)
-> (AdminUpdateDeviceStatus
    -> Sensitive Text -> AdminUpdateDeviceStatus)
-> Lens
     AdminUpdateDeviceStatus
     AdminUpdateDeviceStatus
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminUpdateDeviceStatus' {Sensitive Text
username :: Sensitive Text
$sel:username:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Sensitive Text
username} -> Sensitive Text
username) (\s :: AdminUpdateDeviceStatus
s@AdminUpdateDeviceStatus' {} Sensitive Text
a -> AdminUpdateDeviceStatus
s {$sel:username:AdminUpdateDeviceStatus' :: Sensitive Text
username = Sensitive Text
a} :: AdminUpdateDeviceStatus) ((Sensitive Text -> f (Sensitive Text))
 -> AdminUpdateDeviceStatus -> f AdminUpdateDeviceStatus)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> AdminUpdateDeviceStatus
-> f AdminUpdateDeviceStatus
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

-- | The device key.
adminUpdateDeviceStatus_deviceKey :: Lens.Lens' AdminUpdateDeviceStatus Prelude.Text
adminUpdateDeviceStatus_deviceKey :: (Text -> f Text)
-> AdminUpdateDeviceStatus -> f AdminUpdateDeviceStatus
adminUpdateDeviceStatus_deviceKey = (AdminUpdateDeviceStatus -> Text)
-> (AdminUpdateDeviceStatus -> Text -> AdminUpdateDeviceStatus)
-> Lens AdminUpdateDeviceStatus AdminUpdateDeviceStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminUpdateDeviceStatus' {Text
deviceKey :: Text
$sel:deviceKey:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Text
deviceKey} -> Text
deviceKey) (\s :: AdminUpdateDeviceStatus
s@AdminUpdateDeviceStatus' {} Text
a -> AdminUpdateDeviceStatus
s {$sel:deviceKey:AdminUpdateDeviceStatus' :: Text
deviceKey = Text
a} :: AdminUpdateDeviceStatus)

instance Core.AWSRequest AdminUpdateDeviceStatus where
  type
    AWSResponse AdminUpdateDeviceStatus =
      AdminUpdateDeviceStatusResponse
  request :: AdminUpdateDeviceStatus -> Request AdminUpdateDeviceStatus
request = Service
-> AdminUpdateDeviceStatus -> Request AdminUpdateDeviceStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AdminUpdateDeviceStatus
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AdminUpdateDeviceStatus)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse AdminUpdateDeviceStatus))
-> Logger
-> Service
-> Proxy AdminUpdateDeviceStatus
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AdminUpdateDeviceStatus)))
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 -> AdminUpdateDeviceStatusResponse
AdminUpdateDeviceStatusResponse'
            (Int -> AdminUpdateDeviceStatusResponse)
-> Either String Int
-> Either String AdminUpdateDeviceStatusResponse
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 AdminUpdateDeviceStatus

instance Prelude.NFData AdminUpdateDeviceStatus

instance Core.ToHeaders AdminUpdateDeviceStatus where
  toHeaders :: AdminUpdateDeviceStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AdminUpdateDeviceStatus -> 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.AdminUpdateDeviceStatus" ::
                          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 AdminUpdateDeviceStatus where
  toJSON :: AdminUpdateDeviceStatus -> Value
toJSON AdminUpdateDeviceStatus' {Maybe DeviceRememberedStatusType
Text
Sensitive Text
deviceKey :: Text
username :: Sensitive Text
userPoolId :: Text
deviceRememberedStatus :: Maybe DeviceRememberedStatusType
$sel:deviceKey:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Text
$sel:username:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Sensitive Text
$sel:userPoolId:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Text
$sel:deviceRememberedStatus:AdminUpdateDeviceStatus' :: AdminUpdateDeviceStatus -> Maybe DeviceRememberedStatusType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DeviceRememberedStatus" Text -> DeviceRememberedStatusType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DeviceRememberedStatusType -> Pair)
-> Maybe DeviceRememberedStatusType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeviceRememberedStatusType
deviceRememberedStatus,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UserPoolId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userPoolId),
            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
"DeviceKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deviceKey)
          ]
      )

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

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

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

-- |
-- Create a value of 'AdminUpdateDeviceStatusResponse' 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', 'adminUpdateDeviceStatusResponse_httpStatus' - The response's http status code.
newAdminUpdateDeviceStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AdminUpdateDeviceStatusResponse
newAdminUpdateDeviceStatusResponse :: Int -> AdminUpdateDeviceStatusResponse
newAdminUpdateDeviceStatusResponse Int
pHttpStatus_ =
  AdminUpdateDeviceStatusResponse' :: Int -> AdminUpdateDeviceStatusResponse
AdminUpdateDeviceStatusResponse'
    { $sel:httpStatus:AdminUpdateDeviceStatusResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    AdminUpdateDeviceStatusResponse