{-# 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.IoTWireless.ListWirelessDevices
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the wireless devices registered to your AWS account.
module Amazonka.IoTWireless.ListWirelessDevices
  ( -- * Creating a Request
    ListWirelessDevices (..),
    newListWirelessDevices,

    -- * Request Lenses
    listWirelessDevices_destinationName,
    listWirelessDevices_deviceProfileId,
    listWirelessDevices_fuotaTaskId,
    listWirelessDevices_maxResults,
    listWirelessDevices_multicastGroupId,
    listWirelessDevices_nextToken,
    listWirelessDevices_serviceProfileId,
    listWirelessDevices_wirelessDeviceType,

    -- * Destructuring the Response
    ListWirelessDevicesResponse (..),
    newListWirelessDevicesResponse,

    -- * Response Lenses
    listWirelessDevicesResponse_nextToken,
    listWirelessDevicesResponse_wirelessDeviceList,
    listWirelessDevicesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListWirelessDevices' smart constructor.
data ListWirelessDevices = ListWirelessDevices'
  { -- | A filter to list only the wireless devices that use this destination.
    ListWirelessDevices -> Maybe Text
destinationName :: Prelude.Maybe Prelude.Text,
    -- | A filter to list only the wireless devices that use this device profile.
    ListWirelessDevices -> Maybe Text
deviceProfileId :: Prelude.Maybe Prelude.Text,
    ListWirelessDevices -> Maybe Text
fuotaTaskId :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in this operation.
    ListWirelessDevices -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    ListWirelessDevices -> Maybe Text
multicastGroupId :: Prelude.Maybe Prelude.Text,
    -- | To retrieve the next set of results, the @nextToken@ value from a
    -- previous response; otherwise __null__ to receive the first set of
    -- results.
    ListWirelessDevices -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A filter to list only the wireless devices that use this service
    -- profile.
    ListWirelessDevices -> Maybe Text
serviceProfileId :: Prelude.Maybe Prelude.Text,
    -- | A filter to list only the wireless devices that use this wireless device
    -- type.
    ListWirelessDevices -> Maybe WirelessDeviceType
wirelessDeviceType :: Prelude.Maybe WirelessDeviceType
  }
  deriving (ListWirelessDevices -> ListWirelessDevices -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWirelessDevices -> ListWirelessDevices -> Bool
$c/= :: ListWirelessDevices -> ListWirelessDevices -> Bool
== :: ListWirelessDevices -> ListWirelessDevices -> Bool
$c== :: ListWirelessDevices -> ListWirelessDevices -> Bool
Prelude.Eq, ReadPrec [ListWirelessDevices]
ReadPrec ListWirelessDevices
Int -> ReadS ListWirelessDevices
ReadS [ListWirelessDevices]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWirelessDevices]
$creadListPrec :: ReadPrec [ListWirelessDevices]
readPrec :: ReadPrec ListWirelessDevices
$creadPrec :: ReadPrec ListWirelessDevices
readList :: ReadS [ListWirelessDevices]
$creadList :: ReadS [ListWirelessDevices]
readsPrec :: Int -> ReadS ListWirelessDevices
$creadsPrec :: Int -> ReadS ListWirelessDevices
Prelude.Read, Int -> ListWirelessDevices -> ShowS
[ListWirelessDevices] -> ShowS
ListWirelessDevices -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWirelessDevices] -> ShowS
$cshowList :: [ListWirelessDevices] -> ShowS
show :: ListWirelessDevices -> String
$cshow :: ListWirelessDevices -> String
showsPrec :: Int -> ListWirelessDevices -> ShowS
$cshowsPrec :: Int -> ListWirelessDevices -> ShowS
Prelude.Show, forall x. Rep ListWirelessDevices x -> ListWirelessDevices
forall x. ListWirelessDevices -> Rep ListWirelessDevices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWirelessDevices x -> ListWirelessDevices
$cfrom :: forall x. ListWirelessDevices -> Rep ListWirelessDevices x
Prelude.Generic)

-- |
-- Create a value of 'ListWirelessDevices' 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:
--
-- 'destinationName', 'listWirelessDevices_destinationName' - A filter to list only the wireless devices that use this destination.
--
-- 'deviceProfileId', 'listWirelessDevices_deviceProfileId' - A filter to list only the wireless devices that use this device profile.
--
-- 'fuotaTaskId', 'listWirelessDevices_fuotaTaskId' - Undocumented member.
--
-- 'maxResults', 'listWirelessDevices_maxResults' - The maximum number of results to return in this operation.
--
-- 'multicastGroupId', 'listWirelessDevices_multicastGroupId' - Undocumented member.
--
-- 'nextToken', 'listWirelessDevices_nextToken' - To retrieve the next set of results, the @nextToken@ value from a
-- previous response; otherwise __null__ to receive the first set of
-- results.
--
-- 'serviceProfileId', 'listWirelessDevices_serviceProfileId' - A filter to list only the wireless devices that use this service
-- profile.
--
-- 'wirelessDeviceType', 'listWirelessDevices_wirelessDeviceType' - A filter to list only the wireless devices that use this wireless device
-- type.
newListWirelessDevices ::
  ListWirelessDevices
newListWirelessDevices :: ListWirelessDevices
newListWirelessDevices =
  ListWirelessDevices'
    { $sel:destinationName:ListWirelessDevices' :: Maybe Text
destinationName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:deviceProfileId:ListWirelessDevices' :: Maybe Text
deviceProfileId = forall a. Maybe a
Prelude.Nothing,
      $sel:fuotaTaskId:ListWirelessDevices' :: Maybe Text
fuotaTaskId = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListWirelessDevices' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:multicastGroupId:ListWirelessDevices' :: Maybe Text
multicastGroupId = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListWirelessDevices' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceProfileId:ListWirelessDevices' :: Maybe Text
serviceProfileId = forall a. Maybe a
Prelude.Nothing,
      $sel:wirelessDeviceType:ListWirelessDevices' :: Maybe WirelessDeviceType
wirelessDeviceType = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter to list only the wireless devices that use this destination.
listWirelessDevices_destinationName :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Text)
listWirelessDevices_destinationName :: Lens' ListWirelessDevices (Maybe Text)
listWirelessDevices_destinationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Text
destinationName :: Maybe Text
$sel:destinationName:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
destinationName} -> Maybe Text
destinationName) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Text
a -> ListWirelessDevices
s {$sel:destinationName:ListWirelessDevices' :: Maybe Text
destinationName = Maybe Text
a} :: ListWirelessDevices)

-- | A filter to list only the wireless devices that use this device profile.
listWirelessDevices_deviceProfileId :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Text)
listWirelessDevices_deviceProfileId :: Lens' ListWirelessDevices (Maybe Text)
listWirelessDevices_deviceProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Text
deviceProfileId :: Maybe Text
$sel:deviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
deviceProfileId} -> Maybe Text
deviceProfileId) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Text
a -> ListWirelessDevices
s {$sel:deviceProfileId:ListWirelessDevices' :: Maybe Text
deviceProfileId = Maybe Text
a} :: ListWirelessDevices)

-- | Undocumented member.
listWirelessDevices_fuotaTaskId :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Text)
listWirelessDevices_fuotaTaskId :: Lens' ListWirelessDevices (Maybe Text)
listWirelessDevices_fuotaTaskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Text
fuotaTaskId :: Maybe Text
$sel:fuotaTaskId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
fuotaTaskId} -> Maybe Text
fuotaTaskId) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Text
a -> ListWirelessDevices
s {$sel:fuotaTaskId:ListWirelessDevices' :: Maybe Text
fuotaTaskId = Maybe Text
a} :: ListWirelessDevices)

-- | The maximum number of results to return in this operation.
listWirelessDevices_maxResults :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Natural)
listWirelessDevices_maxResults :: Lens' ListWirelessDevices (Maybe Natural)
listWirelessDevices_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListWirelessDevices' :: ListWirelessDevices -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Natural
a -> ListWirelessDevices
s {$sel:maxResults:ListWirelessDevices' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListWirelessDevices)

-- | Undocumented member.
listWirelessDevices_multicastGroupId :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Text)
listWirelessDevices_multicastGroupId :: Lens' ListWirelessDevices (Maybe Text)
listWirelessDevices_multicastGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Text
multicastGroupId :: Maybe Text
$sel:multicastGroupId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
multicastGroupId} -> Maybe Text
multicastGroupId) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Text
a -> ListWirelessDevices
s {$sel:multicastGroupId:ListWirelessDevices' :: Maybe Text
multicastGroupId = Maybe Text
a} :: ListWirelessDevices)

-- | To retrieve the next set of results, the @nextToken@ value from a
-- previous response; otherwise __null__ to receive the first set of
-- results.
listWirelessDevices_nextToken :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Text)
listWirelessDevices_nextToken :: Lens' ListWirelessDevices (Maybe Text)
listWirelessDevices_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Text
a -> ListWirelessDevices
s {$sel:nextToken:ListWirelessDevices' :: Maybe Text
nextToken = Maybe Text
a} :: ListWirelessDevices)

-- | A filter to list only the wireless devices that use this service
-- profile.
listWirelessDevices_serviceProfileId :: Lens.Lens' ListWirelessDevices (Prelude.Maybe Prelude.Text)
listWirelessDevices_serviceProfileId :: Lens' ListWirelessDevices (Maybe Text)
listWirelessDevices_serviceProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe Text
serviceProfileId :: Maybe Text
$sel:serviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
serviceProfileId} -> Maybe Text
serviceProfileId) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe Text
a -> ListWirelessDevices
s {$sel:serviceProfileId:ListWirelessDevices' :: Maybe Text
serviceProfileId = Maybe Text
a} :: ListWirelessDevices)

-- | A filter to list only the wireless devices that use this wireless device
-- type.
listWirelessDevices_wirelessDeviceType :: Lens.Lens' ListWirelessDevices (Prelude.Maybe WirelessDeviceType)
listWirelessDevices_wirelessDeviceType :: Lens' ListWirelessDevices (Maybe WirelessDeviceType)
listWirelessDevices_wirelessDeviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevices' {Maybe WirelessDeviceType
wirelessDeviceType :: Maybe WirelessDeviceType
$sel:wirelessDeviceType:ListWirelessDevices' :: ListWirelessDevices -> Maybe WirelessDeviceType
wirelessDeviceType} -> Maybe WirelessDeviceType
wirelessDeviceType) (\s :: ListWirelessDevices
s@ListWirelessDevices' {} Maybe WirelessDeviceType
a -> ListWirelessDevices
s {$sel:wirelessDeviceType:ListWirelessDevices' :: Maybe WirelessDeviceType
wirelessDeviceType = Maybe WirelessDeviceType
a} :: ListWirelessDevices)

instance Core.AWSRequest ListWirelessDevices where
  type
    AWSResponse ListWirelessDevices =
      ListWirelessDevicesResponse
  request :: (Service -> Service)
-> ListWirelessDevices -> Request ListWirelessDevices
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 ListWirelessDevices
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListWirelessDevices)))
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
-> Maybe [WirelessDeviceStatistics]
-> Int
-> ListWirelessDevicesResponse
ListWirelessDevicesResponse'
            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.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"WirelessDeviceList"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListWirelessDevices where
  hashWithSalt :: Int -> ListWirelessDevices -> Int
hashWithSalt Int
_salt ListWirelessDevices' {Maybe Natural
Maybe Text
Maybe WirelessDeviceType
wirelessDeviceType :: Maybe WirelessDeviceType
serviceProfileId :: Maybe Text
nextToken :: Maybe Text
multicastGroupId :: Maybe Text
maxResults :: Maybe Natural
fuotaTaskId :: Maybe Text
deviceProfileId :: Maybe Text
destinationName :: Maybe Text
$sel:wirelessDeviceType:ListWirelessDevices' :: ListWirelessDevices -> Maybe WirelessDeviceType
$sel:serviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:nextToken:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:multicastGroupId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:maxResults:ListWirelessDevices' :: ListWirelessDevices -> Maybe Natural
$sel:fuotaTaskId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:deviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:destinationName:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceProfileId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fuotaTaskId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
multicastGroupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceProfileId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WirelessDeviceType
wirelessDeviceType

instance Prelude.NFData ListWirelessDevices where
  rnf :: ListWirelessDevices -> ()
rnf ListWirelessDevices' {Maybe Natural
Maybe Text
Maybe WirelessDeviceType
wirelessDeviceType :: Maybe WirelessDeviceType
serviceProfileId :: Maybe Text
nextToken :: Maybe Text
multicastGroupId :: Maybe Text
maxResults :: Maybe Natural
fuotaTaskId :: Maybe Text
deviceProfileId :: Maybe Text
destinationName :: Maybe Text
$sel:wirelessDeviceType:ListWirelessDevices' :: ListWirelessDevices -> Maybe WirelessDeviceType
$sel:serviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:nextToken:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:multicastGroupId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:maxResults:ListWirelessDevices' :: ListWirelessDevices -> Maybe Natural
$sel:fuotaTaskId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:deviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:destinationName:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceProfileId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fuotaTaskId
      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
multicastGroupId
      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
serviceProfileId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WirelessDeviceType
wirelessDeviceType

instance Data.ToHeaders ListWirelessDevices where
  toHeaders :: ListWirelessDevices -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery ListWirelessDevices where
  toQuery :: ListWirelessDevices -> QueryString
toQuery ListWirelessDevices' {Maybe Natural
Maybe Text
Maybe WirelessDeviceType
wirelessDeviceType :: Maybe WirelessDeviceType
serviceProfileId :: Maybe Text
nextToken :: Maybe Text
multicastGroupId :: Maybe Text
maxResults :: Maybe Natural
fuotaTaskId :: Maybe Text
deviceProfileId :: Maybe Text
destinationName :: Maybe Text
$sel:wirelessDeviceType:ListWirelessDevices' :: ListWirelessDevices -> Maybe WirelessDeviceType
$sel:serviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:nextToken:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:multicastGroupId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:maxResults:ListWirelessDevices' :: ListWirelessDevices -> Maybe Natural
$sel:fuotaTaskId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:deviceProfileId:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
$sel:destinationName:ListWirelessDevices' :: ListWirelessDevices -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"destinationName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
destinationName,
        ByteString
"deviceProfileId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
deviceProfileId,
        ByteString
"fuotaTaskId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
fuotaTaskId,
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"multicastGroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
multicastGroupId,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"serviceProfileId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
serviceProfileId,
        ByteString
"wirelessDeviceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe WirelessDeviceType
wirelessDeviceType
      ]

-- | /See:/ 'newListWirelessDevicesResponse' smart constructor.
data ListWirelessDevicesResponse = ListWirelessDevicesResponse'
  { -- | The token to use to get the next set of results, or __null__ if there
    -- are no additional results.
    ListWirelessDevicesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the wireless device.
    ListWirelessDevicesResponse -> Maybe [WirelessDeviceStatistics]
wirelessDeviceList :: Prelude.Maybe [WirelessDeviceStatistics],
    -- | The response's http status code.
    ListWirelessDevicesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListWirelessDevicesResponse -> ListWirelessDevicesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWirelessDevicesResponse -> ListWirelessDevicesResponse -> Bool
$c/= :: ListWirelessDevicesResponse -> ListWirelessDevicesResponse -> Bool
== :: ListWirelessDevicesResponse -> ListWirelessDevicesResponse -> Bool
$c== :: ListWirelessDevicesResponse -> ListWirelessDevicesResponse -> Bool
Prelude.Eq, ReadPrec [ListWirelessDevicesResponse]
ReadPrec ListWirelessDevicesResponse
Int -> ReadS ListWirelessDevicesResponse
ReadS [ListWirelessDevicesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWirelessDevicesResponse]
$creadListPrec :: ReadPrec [ListWirelessDevicesResponse]
readPrec :: ReadPrec ListWirelessDevicesResponse
$creadPrec :: ReadPrec ListWirelessDevicesResponse
readList :: ReadS [ListWirelessDevicesResponse]
$creadList :: ReadS [ListWirelessDevicesResponse]
readsPrec :: Int -> ReadS ListWirelessDevicesResponse
$creadsPrec :: Int -> ReadS ListWirelessDevicesResponse
Prelude.Read, Int -> ListWirelessDevicesResponse -> ShowS
[ListWirelessDevicesResponse] -> ShowS
ListWirelessDevicesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWirelessDevicesResponse] -> ShowS
$cshowList :: [ListWirelessDevicesResponse] -> ShowS
show :: ListWirelessDevicesResponse -> String
$cshow :: ListWirelessDevicesResponse -> String
showsPrec :: Int -> ListWirelessDevicesResponse -> ShowS
$cshowsPrec :: Int -> ListWirelessDevicesResponse -> ShowS
Prelude.Show, forall x.
Rep ListWirelessDevicesResponse x -> ListWirelessDevicesResponse
forall x.
ListWirelessDevicesResponse -> Rep ListWirelessDevicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListWirelessDevicesResponse x -> ListWirelessDevicesResponse
$cfrom :: forall x.
ListWirelessDevicesResponse -> Rep ListWirelessDevicesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListWirelessDevicesResponse' 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', 'listWirelessDevicesResponse_nextToken' - The token to use to get the next set of results, or __null__ if there
-- are no additional results.
--
-- 'wirelessDeviceList', 'listWirelessDevicesResponse_wirelessDeviceList' - The ID of the wireless device.
--
-- 'httpStatus', 'listWirelessDevicesResponse_httpStatus' - The response's http status code.
newListWirelessDevicesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListWirelessDevicesResponse
newListWirelessDevicesResponse :: Int -> ListWirelessDevicesResponse
newListWirelessDevicesResponse Int
pHttpStatus_ =
  ListWirelessDevicesResponse'
    { $sel:nextToken:ListWirelessDevicesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:wirelessDeviceList:ListWirelessDevicesResponse' :: Maybe [WirelessDeviceStatistics]
wirelessDeviceList = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListWirelessDevicesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to get the next set of results, or __null__ if there
-- are no additional results.
listWirelessDevicesResponse_nextToken :: Lens.Lens' ListWirelessDevicesResponse (Prelude.Maybe Prelude.Text)
listWirelessDevicesResponse_nextToken :: Lens' ListWirelessDevicesResponse (Maybe Text)
listWirelessDevicesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevicesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWirelessDevicesResponse' :: ListWirelessDevicesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWirelessDevicesResponse
s@ListWirelessDevicesResponse' {} Maybe Text
a -> ListWirelessDevicesResponse
s {$sel:nextToken:ListWirelessDevicesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListWirelessDevicesResponse)

-- | The ID of the wireless device.
listWirelessDevicesResponse_wirelessDeviceList :: Lens.Lens' ListWirelessDevicesResponse (Prelude.Maybe [WirelessDeviceStatistics])
listWirelessDevicesResponse_wirelessDeviceList :: Lens'
  ListWirelessDevicesResponse (Maybe [WirelessDeviceStatistics])
listWirelessDevicesResponse_wirelessDeviceList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevicesResponse' {Maybe [WirelessDeviceStatistics]
wirelessDeviceList :: Maybe [WirelessDeviceStatistics]
$sel:wirelessDeviceList:ListWirelessDevicesResponse' :: ListWirelessDevicesResponse -> Maybe [WirelessDeviceStatistics]
wirelessDeviceList} -> Maybe [WirelessDeviceStatistics]
wirelessDeviceList) (\s :: ListWirelessDevicesResponse
s@ListWirelessDevicesResponse' {} Maybe [WirelessDeviceStatistics]
a -> ListWirelessDevicesResponse
s {$sel:wirelessDeviceList:ListWirelessDevicesResponse' :: Maybe [WirelessDeviceStatistics]
wirelessDeviceList = Maybe [WirelessDeviceStatistics]
a} :: ListWirelessDevicesResponse) 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 response's http status code.
listWirelessDevicesResponse_httpStatus :: Lens.Lens' ListWirelessDevicesResponse Prelude.Int
listWirelessDevicesResponse_httpStatus :: Lens' ListWirelessDevicesResponse Int
listWirelessDevicesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWirelessDevicesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListWirelessDevicesResponse' :: ListWirelessDevicesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListWirelessDevicesResponse
s@ListWirelessDevicesResponse' {} Int
a -> ListWirelessDevicesResponse
s {$sel:httpStatus:ListWirelessDevicesResponse' :: Int
httpStatus = Int
a} :: ListWirelessDevicesResponse)

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