{-# 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.NetworkManager.GetDevices
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about one or more of your devices in a global network.
--
-- This operation returns paginated results.
module Amazonka.NetworkManager.GetDevices
  ( -- * Creating a Request
    GetDevices (..),
    newGetDevices,

    -- * Request Lenses
    getDevices_deviceIds,
    getDevices_maxResults,
    getDevices_nextToken,
    getDevices_siteId,
    getDevices_globalNetworkId,

    -- * Destructuring the Response
    GetDevicesResponse (..),
    newGetDevicesResponse,

    -- * Response Lenses
    getDevicesResponse_devices,
    getDevicesResponse_nextToken,
    getDevicesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetDevices' smart constructor.
data GetDevices = GetDevices'
  { -- | One or more device IDs. The maximum is 10.
    GetDevices -> Maybe [Text]
deviceIds :: Prelude.Maybe [Prelude.Text],
    -- | The maximum number of results to return.
    GetDevices -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next page of results.
    GetDevices -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the site.
    GetDevices -> Maybe Text
siteId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the global network.
    GetDevices -> Text
globalNetworkId :: Prelude.Text
  }
  deriving (GetDevices -> GetDevices -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevices -> GetDevices -> Bool
$c/= :: GetDevices -> GetDevices -> Bool
== :: GetDevices -> GetDevices -> Bool
$c== :: GetDevices -> GetDevices -> Bool
Prelude.Eq, ReadPrec [GetDevices]
ReadPrec GetDevices
Int -> ReadS GetDevices
ReadS [GetDevices]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDevices]
$creadListPrec :: ReadPrec [GetDevices]
readPrec :: ReadPrec GetDevices
$creadPrec :: ReadPrec GetDevices
readList :: ReadS [GetDevices]
$creadList :: ReadS [GetDevices]
readsPrec :: Int -> ReadS GetDevices
$creadsPrec :: Int -> ReadS GetDevices
Prelude.Read, Int -> GetDevices -> ShowS
[GetDevices] -> ShowS
GetDevices -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevices] -> ShowS
$cshowList :: [GetDevices] -> ShowS
show :: GetDevices -> String
$cshow :: GetDevices -> String
showsPrec :: Int -> GetDevices -> ShowS
$cshowsPrec :: Int -> GetDevices -> ShowS
Prelude.Show, forall x. Rep GetDevices x -> GetDevices
forall x. GetDevices -> Rep GetDevices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDevices x -> GetDevices
$cfrom :: forall x. GetDevices -> Rep GetDevices x
Prelude.Generic)

-- |
-- Create a value of 'GetDevices' 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:
--
-- 'deviceIds', 'getDevices_deviceIds' - One or more device IDs. The maximum is 10.
--
-- 'maxResults', 'getDevices_maxResults' - The maximum number of results to return.
--
-- 'nextToken', 'getDevices_nextToken' - The token for the next page of results.
--
-- 'siteId', 'getDevices_siteId' - The ID of the site.
--
-- 'globalNetworkId', 'getDevices_globalNetworkId' - The ID of the global network.
newGetDevices ::
  -- | 'globalNetworkId'
  Prelude.Text ->
  GetDevices
newGetDevices :: Text -> GetDevices
newGetDevices Text
pGlobalNetworkId_ =
  GetDevices'
    { $sel:deviceIds:GetDevices' :: Maybe [Text]
deviceIds = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetDevices' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetDevices' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:siteId:GetDevices' :: Maybe Text
siteId = forall a. Maybe a
Prelude.Nothing,
      $sel:globalNetworkId:GetDevices' :: Text
globalNetworkId = Text
pGlobalNetworkId_
    }

-- | One or more device IDs. The maximum is 10.
getDevices_deviceIds :: Lens.Lens' GetDevices (Prelude.Maybe [Prelude.Text])
getDevices_deviceIds :: Lens' GetDevices (Maybe [Text])
getDevices_deviceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevices' {Maybe [Text]
deviceIds :: Maybe [Text]
$sel:deviceIds:GetDevices' :: GetDevices -> Maybe [Text]
deviceIds} -> Maybe [Text]
deviceIds) (\s :: GetDevices
s@GetDevices' {} Maybe [Text]
a -> GetDevices
s {$sel:deviceIds:GetDevices' :: Maybe [Text]
deviceIds = Maybe [Text]
a} :: GetDevices) 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 maximum number of results to return.
getDevices_maxResults :: Lens.Lens' GetDevices (Prelude.Maybe Prelude.Natural)
getDevices_maxResults :: Lens' GetDevices (Maybe Natural)
getDevices_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevices' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetDevices' :: GetDevices -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetDevices
s@GetDevices' {} Maybe Natural
a -> GetDevices
s {$sel:maxResults:GetDevices' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetDevices)

-- | The token for the next page of results.
getDevices_nextToken :: Lens.Lens' GetDevices (Prelude.Maybe Prelude.Text)
getDevices_nextToken :: Lens' GetDevices (Maybe Text)
getDevices_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevices' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDevices' :: GetDevices -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDevices
s@GetDevices' {} Maybe Text
a -> GetDevices
s {$sel:nextToken:GetDevices' :: Maybe Text
nextToken = Maybe Text
a} :: GetDevices)

-- | The ID of the site.
getDevices_siteId :: Lens.Lens' GetDevices (Prelude.Maybe Prelude.Text)
getDevices_siteId :: Lens' GetDevices (Maybe Text)
getDevices_siteId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevices' {Maybe Text
siteId :: Maybe Text
$sel:siteId:GetDevices' :: GetDevices -> Maybe Text
siteId} -> Maybe Text
siteId) (\s :: GetDevices
s@GetDevices' {} Maybe Text
a -> GetDevices
s {$sel:siteId:GetDevices' :: Maybe Text
siteId = Maybe Text
a} :: GetDevices)

-- | The ID of the global network.
getDevices_globalNetworkId :: Lens.Lens' GetDevices Prelude.Text
getDevices_globalNetworkId :: Lens' GetDevices Text
getDevices_globalNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevices' {Text
globalNetworkId :: Text
$sel:globalNetworkId:GetDevices' :: GetDevices -> Text
globalNetworkId} -> Text
globalNetworkId) (\s :: GetDevices
s@GetDevices' {} Text
a -> GetDevices
s {$sel:globalNetworkId:GetDevices' :: Text
globalNetworkId = Text
a} :: GetDevices)

instance Core.AWSPager GetDevices where
  page :: GetDevices -> AWSResponse GetDevices -> Maybe GetDevices
page GetDevices
rq AWSResponse GetDevices
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetDevices
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetDevicesResponse (Maybe Text)
getDevicesResponse_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 GetDevices
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetDevicesResponse (Maybe [Device])
getDevicesResponse_devices
            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
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetDevices
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetDevices (Maybe Text)
getDevices_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetDevices
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetDevicesResponse (Maybe Text)
getDevicesResponse_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 GetDevices where
  type AWSResponse GetDevices = GetDevicesResponse
  request :: (Service -> Service) -> GetDevices -> Request GetDevices
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetDevices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDevices)))
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 [Device] -> Maybe Text -> Int -> GetDevicesResponse
GetDevicesResponse'
            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
"Devices" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"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))
      )

instance Prelude.Hashable GetDevices where
  hashWithSalt :: Int -> GetDevices -> Int
hashWithSalt Int
_salt GetDevices' {Maybe Natural
Maybe [Text]
Maybe Text
Text
globalNetworkId :: Text
siteId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceIds :: Maybe [Text]
$sel:globalNetworkId:GetDevices' :: GetDevices -> Text
$sel:siteId:GetDevices' :: GetDevices -> Maybe Text
$sel:nextToken:GetDevices' :: GetDevices -> Maybe Text
$sel:maxResults:GetDevices' :: GetDevices -> Maybe Natural
$sel:deviceIds:GetDevices' :: GetDevices -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
deviceIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
siteId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
globalNetworkId

instance Prelude.NFData GetDevices where
  rnf :: GetDevices -> ()
rnf GetDevices' {Maybe Natural
Maybe [Text]
Maybe Text
Text
globalNetworkId :: Text
siteId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceIds :: Maybe [Text]
$sel:globalNetworkId:GetDevices' :: GetDevices -> Text
$sel:siteId:GetDevices' :: GetDevices -> Maybe Text
$sel:nextToken:GetDevices' :: GetDevices -> Maybe Text
$sel:maxResults:GetDevices' :: GetDevices -> Maybe Natural
$sel:deviceIds:GetDevices' :: GetDevices -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
deviceIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Maybe Text
siteId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
globalNetworkId

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

instance Data.ToPath GetDevices where
  toPath :: GetDevices -> ByteString
toPath GetDevices' {Maybe Natural
Maybe [Text]
Maybe Text
Text
globalNetworkId :: Text
siteId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceIds :: Maybe [Text]
$sel:globalNetworkId:GetDevices' :: GetDevices -> Text
$sel:siteId:GetDevices' :: GetDevices -> Maybe Text
$sel:nextToken:GetDevices' :: GetDevices -> Maybe Text
$sel:maxResults:GetDevices' :: GetDevices -> Maybe Natural
$sel:deviceIds:GetDevices' :: GetDevices -> Maybe [Text]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/global-networks/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
globalNetworkId,
        ByteString
"/devices"
      ]

instance Data.ToQuery GetDevices where
  toQuery :: GetDevices -> QueryString
toQuery GetDevices' {Maybe Natural
Maybe [Text]
Maybe Text
Text
globalNetworkId :: Text
siteId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceIds :: Maybe [Text]
$sel:globalNetworkId:GetDevices' :: GetDevices -> Text
$sel:siteId:GetDevices' :: GetDevices -> Maybe Text
$sel:nextToken:GetDevices' :: GetDevices -> Maybe Text
$sel:maxResults:GetDevices' :: GetDevices -> Maybe Natural
$sel:deviceIds:GetDevices' :: GetDevices -> Maybe [Text]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"deviceIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
deviceIds),
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"siteId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
siteId
      ]

-- | /See:/ 'newGetDevicesResponse' smart constructor.
data GetDevicesResponse = GetDevicesResponse'
  { -- | The devices.
    GetDevicesResponse -> Maybe [Device]
devices :: Prelude.Maybe [Device],
    -- | The token for the next page of results.
    GetDevicesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetDevicesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDevicesResponse -> GetDevicesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevicesResponse -> GetDevicesResponse -> Bool
$c/= :: GetDevicesResponse -> GetDevicesResponse -> Bool
== :: GetDevicesResponse -> GetDevicesResponse -> Bool
$c== :: GetDevicesResponse -> GetDevicesResponse -> Bool
Prelude.Eq, Int -> GetDevicesResponse -> ShowS
[GetDevicesResponse] -> ShowS
GetDevicesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevicesResponse] -> ShowS
$cshowList :: [GetDevicesResponse] -> ShowS
show :: GetDevicesResponse -> String
$cshow :: GetDevicesResponse -> String
showsPrec :: Int -> GetDevicesResponse -> ShowS
$cshowsPrec :: Int -> GetDevicesResponse -> ShowS
Prelude.Show, forall x. Rep GetDevicesResponse x -> GetDevicesResponse
forall x. GetDevicesResponse -> Rep GetDevicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDevicesResponse x -> GetDevicesResponse
$cfrom :: forall x. GetDevicesResponse -> Rep GetDevicesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDevicesResponse' 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:
--
-- 'devices', 'getDevicesResponse_devices' - The devices.
--
-- 'nextToken', 'getDevicesResponse_nextToken' - The token for the next page of results.
--
-- 'httpStatus', 'getDevicesResponse_httpStatus' - The response's http status code.
newGetDevicesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDevicesResponse
newGetDevicesResponse :: Int -> GetDevicesResponse
newGetDevicesResponse Int
pHttpStatus_ =
  GetDevicesResponse'
    { $sel:devices:GetDevicesResponse' :: Maybe [Device]
devices = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetDevicesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDevicesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The devices.
getDevicesResponse_devices :: Lens.Lens' GetDevicesResponse (Prelude.Maybe [Device])
getDevicesResponse_devices :: Lens' GetDevicesResponse (Maybe [Device])
getDevicesResponse_devices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicesResponse' {Maybe [Device]
devices :: Maybe [Device]
$sel:devices:GetDevicesResponse' :: GetDevicesResponse -> Maybe [Device]
devices} -> Maybe [Device]
devices) (\s :: GetDevicesResponse
s@GetDevicesResponse' {} Maybe [Device]
a -> GetDevicesResponse
s {$sel:devices:GetDevicesResponse' :: Maybe [Device]
devices = Maybe [Device]
a} :: GetDevicesResponse) 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 token for the next page of results.
getDevicesResponse_nextToken :: Lens.Lens' GetDevicesResponse (Prelude.Maybe Prelude.Text)
getDevicesResponse_nextToken :: Lens' GetDevicesResponse (Maybe Text)
getDevicesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDevicesResponse' :: GetDevicesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDevicesResponse
s@GetDevicesResponse' {} Maybe Text
a -> GetDevicesResponse
s {$sel:nextToken:GetDevicesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetDevicesResponse)

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

instance Prelude.NFData GetDevicesResponse where
  rnf :: GetDevicesResponse -> ()
rnf GetDevicesResponse' {Int
Maybe [Device]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
devices :: Maybe [Device]
$sel:httpStatus:GetDevicesResponse' :: GetDevicesResponse -> Int
$sel:nextToken:GetDevicesResponse' :: GetDevicesResponse -> Maybe Text
$sel:devices:GetDevicesResponse' :: GetDevicesResponse -> Maybe [Device]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Device]
devices
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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