{-# 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.AdminListDevices
-- 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)
--
-- Lists devices, as an administrator.
--
-- Calling this action requires developer credentials.
module Amazonka.CognitoIdentityProvider.AdminListDevices
  ( -- * Creating a Request
    AdminListDevices (..),
    newAdminListDevices,

    -- * Request Lenses
    adminListDevices_paginationToken,
    adminListDevices_limit,
    adminListDevices_userPoolId,
    adminListDevices_username,

    -- * Destructuring the Response
    AdminListDevicesResponse (..),
    newAdminListDevicesResponse,

    -- * Response Lenses
    adminListDevicesResponse_paginationToken,
    adminListDevicesResponse_devices,
    adminListDevicesResponse_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

-- | Represents the request to list devices, as an administrator.
--
-- /See:/ 'newAdminListDevices' smart constructor.
data AdminListDevices = AdminListDevices'
  { -- | The pagination token.
    AdminListDevices -> Maybe Text
paginationToken :: Prelude.Maybe Prelude.Text,
    -- | The limit of the devices request.
    AdminListDevices -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The user pool ID.
    AdminListDevices -> Text
userPoolId :: Prelude.Text,
    -- | The user name.
    AdminListDevices -> Sensitive Text
username :: Core.Sensitive Prelude.Text
  }
  deriving (AdminListDevices -> AdminListDevices -> Bool
(AdminListDevices -> AdminListDevices -> Bool)
-> (AdminListDevices -> AdminListDevices -> Bool)
-> Eq AdminListDevices
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminListDevices -> AdminListDevices -> Bool
$c/= :: AdminListDevices -> AdminListDevices -> Bool
== :: AdminListDevices -> AdminListDevices -> Bool
$c== :: AdminListDevices -> AdminListDevices -> Bool
Prelude.Eq, Int -> AdminListDevices -> ShowS
[AdminListDevices] -> ShowS
AdminListDevices -> String
(Int -> AdminListDevices -> ShowS)
-> (AdminListDevices -> String)
-> ([AdminListDevices] -> ShowS)
-> Show AdminListDevices
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminListDevices] -> ShowS
$cshowList :: [AdminListDevices] -> ShowS
show :: AdminListDevices -> String
$cshow :: AdminListDevices -> String
showsPrec :: Int -> AdminListDevices -> ShowS
$cshowsPrec :: Int -> AdminListDevices -> ShowS
Prelude.Show, (forall x. AdminListDevices -> Rep AdminListDevices x)
-> (forall x. Rep AdminListDevices x -> AdminListDevices)
-> Generic AdminListDevices
forall x. Rep AdminListDevices x -> AdminListDevices
forall x. AdminListDevices -> Rep AdminListDevices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AdminListDevices x -> AdminListDevices
$cfrom :: forall x. AdminListDevices -> Rep AdminListDevices x
Prelude.Generic)

-- |
-- Create a value of 'AdminListDevices' 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:
--
-- 'paginationToken', 'adminListDevices_paginationToken' - The pagination token.
--
-- 'limit', 'adminListDevices_limit' - The limit of the devices request.
--
-- 'userPoolId', 'adminListDevices_userPoolId' - The user pool ID.
--
-- 'username', 'adminListDevices_username' - The user name.
newAdminListDevices ::
  -- | 'userPoolId'
  Prelude.Text ->
  -- | 'username'
  Prelude.Text ->
  AdminListDevices
newAdminListDevices :: Text -> Text -> AdminListDevices
newAdminListDevices Text
pUserPoolId_ Text
pUsername_ =
  AdminListDevices' :: Maybe Text
-> Maybe Natural -> Text -> Sensitive Text -> AdminListDevices
AdminListDevices'
    { $sel:paginationToken:AdminListDevices' :: Maybe Text
paginationToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:AdminListDevices' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:userPoolId:AdminListDevices' :: Text
userPoolId = Text
pUserPoolId_,
      $sel:username:AdminListDevices' :: 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_
    }

-- | The pagination token.
adminListDevices_paginationToken :: Lens.Lens' AdminListDevices (Prelude.Maybe Prelude.Text)
adminListDevices_paginationToken :: (Maybe Text -> f (Maybe Text))
-> AdminListDevices -> f AdminListDevices
adminListDevices_paginationToken = (AdminListDevices -> Maybe Text)
-> (AdminListDevices -> Maybe Text -> AdminListDevices)
-> Lens AdminListDevices AdminListDevices (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminListDevices' {Maybe Text
paginationToken :: Maybe Text
$sel:paginationToken:AdminListDevices' :: AdminListDevices -> Maybe Text
paginationToken} -> Maybe Text
paginationToken) (\s :: AdminListDevices
s@AdminListDevices' {} Maybe Text
a -> AdminListDevices
s {$sel:paginationToken:AdminListDevices' :: Maybe Text
paginationToken = Maybe Text
a} :: AdminListDevices)

-- | The limit of the devices request.
adminListDevices_limit :: Lens.Lens' AdminListDevices (Prelude.Maybe Prelude.Natural)
adminListDevices_limit :: (Maybe Natural -> f (Maybe Natural))
-> AdminListDevices -> f AdminListDevices
adminListDevices_limit = (AdminListDevices -> Maybe Natural)
-> (AdminListDevices -> Maybe Natural -> AdminListDevices)
-> Lens
     AdminListDevices AdminListDevices (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminListDevices' {Maybe Natural
limit :: Maybe Natural
$sel:limit:AdminListDevices' :: AdminListDevices -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: AdminListDevices
s@AdminListDevices' {} Maybe Natural
a -> AdminListDevices
s {$sel:limit:AdminListDevices' :: Maybe Natural
limit = Maybe Natural
a} :: AdminListDevices)

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

-- | The user name.
adminListDevices_username :: Lens.Lens' AdminListDevices Prelude.Text
adminListDevices_username :: (Text -> f Text) -> AdminListDevices -> f AdminListDevices
adminListDevices_username = (AdminListDevices -> Sensitive Text)
-> (AdminListDevices -> Sensitive Text -> AdminListDevices)
-> Lens
     AdminListDevices AdminListDevices (Sensitive Text) (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminListDevices' {Sensitive Text
username :: Sensitive Text
$sel:username:AdminListDevices' :: AdminListDevices -> Sensitive Text
username} -> Sensitive Text
username) (\s :: AdminListDevices
s@AdminListDevices' {} Sensitive Text
a -> AdminListDevices
s {$sel:username:AdminListDevices' :: Sensitive Text
username = Sensitive Text
a} :: AdminListDevices) ((Sensitive Text -> f (Sensitive Text))
 -> AdminListDevices -> f AdminListDevices)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> AdminListDevices
-> f AdminListDevices
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 AdminListDevices where
  type
    AWSResponse AdminListDevices =
      AdminListDevicesResponse
  request :: AdminListDevices -> Request AdminListDevices
request = Service -> AdminListDevices -> Request AdminListDevices
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AdminListDevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AdminListDevices)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AdminListDevices))
-> Logger
-> Service
-> Proxy AdminListDevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AdminListDevices)))
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 [DeviceType] -> Int -> AdminListDevicesResponse
AdminListDevicesResponse'
            (Maybe Text
 -> Maybe [DeviceType] -> Int -> AdminListDevicesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [DeviceType] -> Int -> AdminListDevicesResponse)
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
"PaginationToken")
            Either
  String (Maybe [DeviceType] -> Int -> AdminListDevicesResponse)
-> Either String (Maybe [DeviceType])
-> Either String (Int -> AdminListDevicesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [DeviceType]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Devices" Either String (Maybe (Maybe [DeviceType]))
-> Maybe [DeviceType] -> Either String (Maybe [DeviceType])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DeviceType]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> AdminListDevicesResponse)
-> Either String Int -> Either String AdminListDevicesResponse
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 AdminListDevices

instance Prelude.NFData AdminListDevices

instance Core.ToHeaders AdminListDevices where
  toHeaders :: AdminListDevices -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AdminListDevices -> 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.AdminListDevices" ::
                          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 AdminListDevices where
  toJSON :: AdminListDevices -> Value
toJSON AdminListDevices' {Maybe Natural
Maybe Text
Text
Sensitive Text
username :: Sensitive Text
userPoolId :: Text
limit :: Maybe Natural
paginationToken :: Maybe Text
$sel:username:AdminListDevices' :: AdminListDevices -> Sensitive Text
$sel:userPoolId:AdminListDevices' :: AdminListDevices -> Text
$sel:limit:AdminListDevices' :: AdminListDevices -> Maybe Natural
$sel:paginationToken:AdminListDevices' :: AdminListDevices -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PaginationToken" 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
paginationToken,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            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)
          ]
      )

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

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

-- | Lists the device\'s response, as an administrator.
--
-- /See:/ 'newAdminListDevicesResponse' smart constructor.
data AdminListDevicesResponse = AdminListDevicesResponse'
  { -- | The pagination token.
    AdminListDevicesResponse -> Maybe Text
paginationToken :: Prelude.Maybe Prelude.Text,
    -- | The devices in the list of devices response.
    AdminListDevicesResponse -> Maybe [DeviceType]
devices :: Prelude.Maybe [DeviceType],
    -- | The response's http status code.
    AdminListDevicesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AdminListDevicesResponse -> AdminListDevicesResponse -> Bool
(AdminListDevicesResponse -> AdminListDevicesResponse -> Bool)
-> (AdminListDevicesResponse -> AdminListDevicesResponse -> Bool)
-> Eq AdminListDevicesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdminListDevicesResponse -> AdminListDevicesResponse -> Bool
$c/= :: AdminListDevicesResponse -> AdminListDevicesResponse -> Bool
== :: AdminListDevicesResponse -> AdminListDevicesResponse -> Bool
$c== :: AdminListDevicesResponse -> AdminListDevicesResponse -> Bool
Prelude.Eq, Int -> AdminListDevicesResponse -> ShowS
[AdminListDevicesResponse] -> ShowS
AdminListDevicesResponse -> String
(Int -> AdminListDevicesResponse -> ShowS)
-> (AdminListDevicesResponse -> String)
-> ([AdminListDevicesResponse] -> ShowS)
-> Show AdminListDevicesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdminListDevicesResponse] -> ShowS
$cshowList :: [AdminListDevicesResponse] -> ShowS
show :: AdminListDevicesResponse -> String
$cshow :: AdminListDevicesResponse -> String
showsPrec :: Int -> AdminListDevicesResponse -> ShowS
$cshowsPrec :: Int -> AdminListDevicesResponse -> ShowS
Prelude.Show, (forall x.
 AdminListDevicesResponse -> Rep AdminListDevicesResponse x)
-> (forall x.
    Rep AdminListDevicesResponse x -> AdminListDevicesResponse)
-> Generic AdminListDevicesResponse
forall x.
Rep AdminListDevicesResponse x -> AdminListDevicesResponse
forall x.
AdminListDevicesResponse -> Rep AdminListDevicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AdminListDevicesResponse x -> AdminListDevicesResponse
$cfrom :: forall x.
AdminListDevicesResponse -> Rep AdminListDevicesResponse x
Prelude.Generic)

-- |
-- Create a value of 'AdminListDevicesResponse' 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:
--
-- 'paginationToken', 'adminListDevicesResponse_paginationToken' - The pagination token.
--
-- 'devices', 'adminListDevicesResponse_devices' - The devices in the list of devices response.
--
-- 'httpStatus', 'adminListDevicesResponse_httpStatus' - The response's http status code.
newAdminListDevicesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AdminListDevicesResponse
newAdminListDevicesResponse :: Int -> AdminListDevicesResponse
newAdminListDevicesResponse Int
pHttpStatus_ =
  AdminListDevicesResponse' :: Maybe Text -> Maybe [DeviceType] -> Int -> AdminListDevicesResponse
AdminListDevicesResponse'
    { $sel:paginationToken:AdminListDevicesResponse' :: Maybe Text
paginationToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:devices:AdminListDevicesResponse' :: Maybe [DeviceType]
devices = Maybe [DeviceType]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AdminListDevicesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The pagination token.
adminListDevicesResponse_paginationToken :: Lens.Lens' AdminListDevicesResponse (Prelude.Maybe Prelude.Text)
adminListDevicesResponse_paginationToken :: (Maybe Text -> f (Maybe Text))
-> AdminListDevicesResponse -> f AdminListDevicesResponse
adminListDevicesResponse_paginationToken = (AdminListDevicesResponse -> Maybe Text)
-> (AdminListDevicesResponse
    -> Maybe Text -> AdminListDevicesResponse)
-> Lens
     AdminListDevicesResponse
     AdminListDevicesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminListDevicesResponse' {Maybe Text
paginationToken :: Maybe Text
$sel:paginationToken:AdminListDevicesResponse' :: AdminListDevicesResponse -> Maybe Text
paginationToken} -> Maybe Text
paginationToken) (\s :: AdminListDevicesResponse
s@AdminListDevicesResponse' {} Maybe Text
a -> AdminListDevicesResponse
s {$sel:paginationToken:AdminListDevicesResponse' :: Maybe Text
paginationToken = Maybe Text
a} :: AdminListDevicesResponse)

-- | The devices in the list of devices response.
adminListDevicesResponse_devices :: Lens.Lens' AdminListDevicesResponse (Prelude.Maybe [DeviceType])
adminListDevicesResponse_devices :: (Maybe [DeviceType] -> f (Maybe [DeviceType]))
-> AdminListDevicesResponse -> f AdminListDevicesResponse
adminListDevicesResponse_devices = (AdminListDevicesResponse -> Maybe [DeviceType])
-> (AdminListDevicesResponse
    -> Maybe [DeviceType] -> AdminListDevicesResponse)
-> Lens
     AdminListDevicesResponse
     AdminListDevicesResponse
     (Maybe [DeviceType])
     (Maybe [DeviceType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdminListDevicesResponse' {Maybe [DeviceType]
devices :: Maybe [DeviceType]
$sel:devices:AdminListDevicesResponse' :: AdminListDevicesResponse -> Maybe [DeviceType]
devices} -> Maybe [DeviceType]
devices) (\s :: AdminListDevicesResponse
s@AdminListDevicesResponse' {} Maybe [DeviceType]
a -> AdminListDevicesResponse
s {$sel:devices:AdminListDevicesResponse' :: Maybe [DeviceType]
devices = Maybe [DeviceType]
a} :: AdminListDevicesResponse) ((Maybe [DeviceType] -> f (Maybe [DeviceType]))
 -> AdminListDevicesResponse -> f AdminListDevicesResponse)
-> ((Maybe [DeviceType] -> f (Maybe [DeviceType]))
    -> Maybe [DeviceType] -> f (Maybe [DeviceType]))
-> (Maybe [DeviceType] -> f (Maybe [DeviceType]))
-> AdminListDevicesResponse
-> f AdminListDevicesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [DeviceType] [DeviceType] [DeviceType] [DeviceType]
-> Iso
     (Maybe [DeviceType])
     (Maybe [DeviceType])
     (Maybe [DeviceType])
     (Maybe [DeviceType])
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 [DeviceType] [DeviceType] [DeviceType] [DeviceType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData AdminListDevicesResponse