{-# 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.SageMaker.ListDevices
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- A list of devices.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListDevices
  ( -- * Creating a Request
    ListDevices (..),
    newListDevices,

    -- * Request Lenses
    listDevices_deviceFleetName,
    listDevices_latestHeartbeatAfter,
    listDevices_maxResults,
    listDevices_modelName,
    listDevices_nextToken,

    -- * Destructuring the Response
    ListDevicesResponse (..),
    newListDevicesResponse,

    -- * Response Lenses
    listDevicesResponse_nextToken,
    listDevicesResponse_httpStatus,
    listDevicesResponse_deviceSummaries,
  )
where

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
import Amazonka.SageMaker.Types

-- | /See:/ 'newListDevices' smart constructor.
data ListDevices = ListDevices'
  { -- | Filter for fleets containing this name in their device fleet name.
    ListDevices -> Maybe Text
deviceFleetName :: Prelude.Maybe Prelude.Text,
    -- | Select fleets where the job was updated after X
    ListDevices -> Maybe POSIX
latestHeartbeatAfter :: Prelude.Maybe Data.POSIX,
    -- | Maximum number of results to select.
    ListDevices -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | A filter that searches devices that contains this name in any of their
    -- models.
    ListDevices -> Maybe Text
modelName :: Prelude.Maybe Prelude.Text,
    -- | The response from the last list when returning a list large enough to
    -- need tokening.
    ListDevices -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListDevices -> ListDevices -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDevices -> ListDevices -> Bool
$c/= :: ListDevices -> ListDevices -> Bool
== :: ListDevices -> ListDevices -> Bool
$c== :: ListDevices -> ListDevices -> Bool
Prelude.Eq, ReadPrec [ListDevices]
ReadPrec ListDevices
Int -> ReadS ListDevices
ReadS [ListDevices]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDevices]
$creadListPrec :: ReadPrec [ListDevices]
readPrec :: ReadPrec ListDevices
$creadPrec :: ReadPrec ListDevices
readList :: ReadS [ListDevices]
$creadList :: ReadS [ListDevices]
readsPrec :: Int -> ReadS ListDevices
$creadsPrec :: Int -> ReadS ListDevices
Prelude.Read, Int -> ListDevices -> ShowS
[ListDevices] -> ShowS
ListDevices -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDevices] -> ShowS
$cshowList :: [ListDevices] -> ShowS
show :: ListDevices -> String
$cshow :: ListDevices -> String
showsPrec :: Int -> ListDevices -> ShowS
$cshowsPrec :: Int -> ListDevices -> ShowS
Prelude.Show, forall x. Rep ListDevices x -> ListDevices
forall x. ListDevices -> Rep ListDevices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDevices x -> ListDevices
$cfrom :: forall x. ListDevices -> Rep ListDevices x
Prelude.Generic)

-- |
-- Create a value of 'ListDevices' 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:
--
-- 'deviceFleetName', 'listDevices_deviceFleetName' - Filter for fleets containing this name in their device fleet name.
--
-- 'latestHeartbeatAfter', 'listDevices_latestHeartbeatAfter' - Select fleets where the job was updated after X
--
-- 'maxResults', 'listDevices_maxResults' - Maximum number of results to select.
--
-- 'modelName', 'listDevices_modelName' - A filter that searches devices that contains this name in any of their
-- models.
--
-- 'nextToken', 'listDevices_nextToken' - The response from the last list when returning a list large enough to
-- need tokening.
newListDevices ::
  ListDevices
newListDevices :: ListDevices
newListDevices =
  ListDevices'
    { $sel:deviceFleetName:ListDevices' :: Maybe Text
deviceFleetName = forall a. Maybe a
Prelude.Nothing,
      $sel:latestHeartbeatAfter:ListDevices' :: Maybe POSIX
latestHeartbeatAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDevices' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:modelName:ListDevices' :: Maybe Text
modelName = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDevices' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Filter for fleets containing this name in their device fleet name.
listDevices_deviceFleetName :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Text)
listDevices_deviceFleetName :: Lens' ListDevices (Maybe Text)
listDevices_deviceFleetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevices' {Maybe Text
deviceFleetName :: Maybe Text
$sel:deviceFleetName:ListDevices' :: ListDevices -> Maybe Text
deviceFleetName} -> Maybe Text
deviceFleetName) (\s :: ListDevices
s@ListDevices' {} Maybe Text
a -> ListDevices
s {$sel:deviceFleetName:ListDevices' :: Maybe Text
deviceFleetName = Maybe Text
a} :: ListDevices)

-- | Select fleets where the job was updated after X
listDevices_latestHeartbeatAfter :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.UTCTime)
listDevices_latestHeartbeatAfter :: Lens' ListDevices (Maybe UTCTime)
listDevices_latestHeartbeatAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevices' {Maybe POSIX
latestHeartbeatAfter :: Maybe POSIX
$sel:latestHeartbeatAfter:ListDevices' :: ListDevices -> Maybe POSIX
latestHeartbeatAfter} -> Maybe POSIX
latestHeartbeatAfter) (\s :: ListDevices
s@ListDevices' {} Maybe POSIX
a -> ListDevices
s {$sel:latestHeartbeatAfter:ListDevices' :: Maybe POSIX
latestHeartbeatAfter = Maybe POSIX
a} :: ListDevices) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Maximum number of results to select.
listDevices_maxResults :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Int)
listDevices_maxResults :: Lens' ListDevices (Maybe Int)
listDevices_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevices' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListDevices' :: ListDevices -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListDevices
s@ListDevices' {} Maybe Int
a -> ListDevices
s {$sel:maxResults:ListDevices' :: Maybe Int
maxResults = Maybe Int
a} :: ListDevices)

-- | A filter that searches devices that contains this name in any of their
-- models.
listDevices_modelName :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Text)
listDevices_modelName :: Lens' ListDevices (Maybe Text)
listDevices_modelName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevices' {Maybe Text
modelName :: Maybe Text
$sel:modelName:ListDevices' :: ListDevices -> Maybe Text
modelName} -> Maybe Text
modelName) (\s :: ListDevices
s@ListDevices' {} Maybe Text
a -> ListDevices
s {$sel:modelName:ListDevices' :: Maybe Text
modelName = Maybe Text
a} :: ListDevices)

-- | The response from the last list when returning a list large enough to
-- need tokening.
listDevices_nextToken :: Lens.Lens' ListDevices (Prelude.Maybe Prelude.Text)
listDevices_nextToken :: Lens' ListDevices (Maybe Text)
listDevices_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevices' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDevices' :: ListDevices -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDevices
s@ListDevices' {} Maybe Text
a -> ListDevices
s {$sel:nextToken:ListDevices' :: Maybe Text
nextToken = Maybe Text
a} :: ListDevices)

instance Core.AWSPager ListDevices where
  page :: ListDevices -> AWSResponse ListDevices -> Maybe ListDevices
page ListDevices
rq AWSResponse ListDevices
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDevices
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDevicesResponse (Maybe Text)
listDevicesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListDevices
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListDevicesResponse [DeviceSummary]
listDevicesResponse_deviceSummaries) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListDevices
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListDevices (Maybe Text)
listDevices_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDevices
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDevicesResponse (Maybe Text)
listDevicesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListDevices where
  type AWSResponse ListDevices = ListDevicesResponse
  request :: (Service -> Service) -> ListDevices -> Request ListDevices
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 ListDevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDevices)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> [DeviceSummary] -> ListDevicesResponse
ListDevicesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DeviceSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListDevices where
  hashWithSalt :: Int -> ListDevices -> Int
hashWithSalt Int
_salt ListDevices' {Maybe Int
Maybe Text
Maybe POSIX
nextToken :: Maybe Text
modelName :: Maybe Text
maxResults :: Maybe Int
latestHeartbeatAfter :: Maybe POSIX
deviceFleetName :: Maybe Text
$sel:nextToken:ListDevices' :: ListDevices -> Maybe Text
$sel:modelName:ListDevices' :: ListDevices -> Maybe Text
$sel:maxResults:ListDevices' :: ListDevices -> Maybe Int
$sel:latestHeartbeatAfter:ListDevices' :: ListDevices -> Maybe POSIX
$sel:deviceFleetName:ListDevices' :: ListDevices -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceFleetName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
latestHeartbeatAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListDevices where
  rnf :: ListDevices -> ()
rnf ListDevices' {Maybe Int
Maybe Text
Maybe POSIX
nextToken :: Maybe Text
modelName :: Maybe Text
maxResults :: Maybe Int
latestHeartbeatAfter :: Maybe POSIX
deviceFleetName :: Maybe Text
$sel:nextToken:ListDevices' :: ListDevices -> Maybe Text
$sel:modelName:ListDevices' :: ListDevices -> Maybe Text
$sel:maxResults:ListDevices' :: ListDevices -> Maybe Int
$sel:latestHeartbeatAfter:ListDevices' :: ListDevices -> Maybe POSIX
$sel:deviceFleetName:ListDevices' :: ListDevices -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceFleetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
latestHeartbeatAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListDevices where
  toHeaders :: ListDevices -> 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
"SageMaker.ListDevices" :: 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 ListDevices where
  toJSON :: ListDevices -> Value
toJSON ListDevices' {Maybe Int
Maybe Text
Maybe POSIX
nextToken :: Maybe Text
modelName :: Maybe Text
maxResults :: Maybe Int
latestHeartbeatAfter :: Maybe POSIX
deviceFleetName :: Maybe Text
$sel:nextToken:ListDevices' :: ListDevices -> Maybe Text
$sel:modelName:ListDevices' :: ListDevices -> Maybe Text
$sel:maxResults:ListDevices' :: ListDevices -> Maybe Int
$sel:latestHeartbeatAfter:ListDevices' :: ListDevices -> Maybe POSIX
$sel:deviceFleetName:ListDevices' :: ListDevices -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DeviceFleetName" 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 Text
deviceFleetName,
            (Key
"LatestHeartbeatAfter" 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 POSIX
latestHeartbeatAfter,
            (Key
"MaxResults" 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 Int
maxResults,
            (Key
"ModelName" 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 Text
modelName,
            (Key
"NextToken" 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 Text
nextToken
          ]
      )

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

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

-- | /See:/ 'newListDevicesResponse' smart constructor.
data ListDevicesResponse = ListDevicesResponse'
  { -- | The response from the last list when returning a list large enough to
    -- need tokening.
    ListDevicesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDevicesResponse -> Int
httpStatus :: Prelude.Int,
    -- | Summary of devices.
    ListDevicesResponse -> [DeviceSummary]
deviceSummaries :: [DeviceSummary]
  }
  deriving (ListDevicesResponse -> ListDevicesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDevicesResponse -> ListDevicesResponse -> Bool
$c/= :: ListDevicesResponse -> ListDevicesResponse -> Bool
== :: ListDevicesResponse -> ListDevicesResponse -> Bool
$c== :: ListDevicesResponse -> ListDevicesResponse -> Bool
Prelude.Eq, ReadPrec [ListDevicesResponse]
ReadPrec ListDevicesResponse
Int -> ReadS ListDevicesResponse
ReadS [ListDevicesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDevicesResponse]
$creadListPrec :: ReadPrec [ListDevicesResponse]
readPrec :: ReadPrec ListDevicesResponse
$creadPrec :: ReadPrec ListDevicesResponse
readList :: ReadS [ListDevicesResponse]
$creadList :: ReadS [ListDevicesResponse]
readsPrec :: Int -> ReadS ListDevicesResponse
$creadsPrec :: Int -> ReadS ListDevicesResponse
Prelude.Read, Int -> ListDevicesResponse -> ShowS
[ListDevicesResponse] -> ShowS
ListDevicesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDevicesResponse] -> ShowS
$cshowList :: [ListDevicesResponse] -> ShowS
show :: ListDevicesResponse -> String
$cshow :: ListDevicesResponse -> String
showsPrec :: Int -> ListDevicesResponse -> ShowS
$cshowsPrec :: Int -> ListDevicesResponse -> ShowS
Prelude.Show, forall x. Rep ListDevicesResponse x -> ListDevicesResponse
forall x. ListDevicesResponse -> Rep ListDevicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDevicesResponse x -> ListDevicesResponse
$cfrom :: forall x. ListDevicesResponse -> Rep ListDevicesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDevicesResponse' 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:
--
-- 'nextToken', 'listDevicesResponse_nextToken' - The response from the last list when returning a list large enough to
-- need tokening.
--
-- 'httpStatus', 'listDevicesResponse_httpStatus' - The response's http status code.
--
-- 'deviceSummaries', 'listDevicesResponse_deviceSummaries' - Summary of devices.
newListDevicesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDevicesResponse
newListDevicesResponse :: Int -> ListDevicesResponse
newListDevicesResponse Int
pHttpStatus_ =
  ListDevicesResponse'
    { $sel:nextToken:ListDevicesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDevicesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:deviceSummaries:ListDevicesResponse' :: [DeviceSummary]
deviceSummaries = forall a. Monoid a => a
Prelude.mempty
    }

-- | The response from the last list when returning a list large enough to
-- need tokening.
listDevicesResponse_nextToken :: Lens.Lens' ListDevicesResponse (Prelude.Maybe Prelude.Text)
listDevicesResponse_nextToken :: Lens' ListDevicesResponse (Maybe Text)
listDevicesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevicesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDevicesResponse' :: ListDevicesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDevicesResponse
s@ListDevicesResponse' {} Maybe Text
a -> ListDevicesResponse
s {$sel:nextToken:ListDevicesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDevicesResponse)

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

-- | Summary of devices.
listDevicesResponse_deviceSummaries :: Lens.Lens' ListDevicesResponse [DeviceSummary]
listDevicesResponse_deviceSummaries :: Lens' ListDevicesResponse [DeviceSummary]
listDevicesResponse_deviceSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevicesResponse' {[DeviceSummary]
deviceSummaries :: [DeviceSummary]
$sel:deviceSummaries:ListDevicesResponse' :: ListDevicesResponse -> [DeviceSummary]
deviceSummaries} -> [DeviceSummary]
deviceSummaries) (\s :: ListDevicesResponse
s@ListDevicesResponse' {} [DeviceSummary]
a -> ListDevicesResponse
s {$sel:deviceSummaries:ListDevicesResponse' :: [DeviceSummary]
deviceSummaries = [DeviceSummary]
a} :: ListDevicesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListDevicesResponse where
  rnf :: ListDevicesResponse -> ()
rnf ListDevicesResponse' {Int
[DeviceSummary]
Maybe Text
deviceSummaries :: [DeviceSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:deviceSummaries:ListDevicesResponse' :: ListDevicesResponse -> [DeviceSummary]
$sel:httpStatus:ListDevicesResponse' :: ListDevicesResponse -> Int
$sel:nextToken:ListDevicesResponse' :: ListDevicesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [DeviceSummary]
deviceSummaries