{-# 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.SendDataToWirelessDevice
-- 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)
--
-- Sends a decrypted application data frame to a device.
module Amazonka.IoTWireless.SendDataToWirelessDevice
  ( -- * Creating a Request
    SendDataToWirelessDevice (..),
    newSendDataToWirelessDevice,

    -- * Request Lenses
    sendDataToWirelessDevice_wirelessMetadata,
    sendDataToWirelessDevice_id,
    sendDataToWirelessDevice_transmitMode,
    sendDataToWirelessDevice_payloadData,

    -- * Destructuring the Response
    SendDataToWirelessDeviceResponse (..),
    newSendDataToWirelessDeviceResponse,

    -- * Response Lenses
    sendDataToWirelessDeviceResponse_messageId,
    sendDataToWirelessDeviceResponse_httpStatus,
  )
where

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

-- | /See:/ 'newSendDataToWirelessDevice' smart constructor.
data SendDataToWirelessDevice = SendDataToWirelessDevice'
  { -- | Metadata about the message request.
    SendDataToWirelessDevice -> Maybe WirelessMetadata
wirelessMetadata :: Prelude.Maybe WirelessMetadata,
    -- | The ID of the wireless device to receive the data.
    SendDataToWirelessDevice -> Text
id :: Prelude.Text,
    -- | The transmit mode to use to send data to the wireless device. Can be:
    -- @0@ for UM (unacknowledge mode) or @1@ for AM (acknowledge mode).
    SendDataToWirelessDevice -> Natural
transmitMode :: Prelude.Natural,
    -- | The binary to be sent to the end device, encoded in base64.
    SendDataToWirelessDevice -> Text
payloadData :: Prelude.Text
  }
  deriving (SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool
(SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool)
-> (SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool)
-> Eq SendDataToWirelessDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool
$c/= :: SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool
== :: SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool
$c== :: SendDataToWirelessDevice -> SendDataToWirelessDevice -> Bool
Prelude.Eq, ReadPrec [SendDataToWirelessDevice]
ReadPrec SendDataToWirelessDevice
Int -> ReadS SendDataToWirelessDevice
ReadS [SendDataToWirelessDevice]
(Int -> ReadS SendDataToWirelessDevice)
-> ReadS [SendDataToWirelessDevice]
-> ReadPrec SendDataToWirelessDevice
-> ReadPrec [SendDataToWirelessDevice]
-> Read SendDataToWirelessDevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendDataToWirelessDevice]
$creadListPrec :: ReadPrec [SendDataToWirelessDevice]
readPrec :: ReadPrec SendDataToWirelessDevice
$creadPrec :: ReadPrec SendDataToWirelessDevice
readList :: ReadS [SendDataToWirelessDevice]
$creadList :: ReadS [SendDataToWirelessDevice]
readsPrec :: Int -> ReadS SendDataToWirelessDevice
$creadsPrec :: Int -> ReadS SendDataToWirelessDevice
Prelude.Read, Int -> SendDataToWirelessDevice -> ShowS
[SendDataToWirelessDevice] -> ShowS
SendDataToWirelessDevice -> String
(Int -> SendDataToWirelessDevice -> ShowS)
-> (SendDataToWirelessDevice -> String)
-> ([SendDataToWirelessDevice] -> ShowS)
-> Show SendDataToWirelessDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendDataToWirelessDevice] -> ShowS
$cshowList :: [SendDataToWirelessDevice] -> ShowS
show :: SendDataToWirelessDevice -> String
$cshow :: SendDataToWirelessDevice -> String
showsPrec :: Int -> SendDataToWirelessDevice -> ShowS
$cshowsPrec :: Int -> SendDataToWirelessDevice -> ShowS
Prelude.Show, (forall x.
 SendDataToWirelessDevice -> Rep SendDataToWirelessDevice x)
-> (forall x.
    Rep SendDataToWirelessDevice x -> SendDataToWirelessDevice)
-> Generic SendDataToWirelessDevice
forall x.
Rep SendDataToWirelessDevice x -> SendDataToWirelessDevice
forall x.
SendDataToWirelessDevice -> Rep SendDataToWirelessDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendDataToWirelessDevice x -> SendDataToWirelessDevice
$cfrom :: forall x.
SendDataToWirelessDevice -> Rep SendDataToWirelessDevice x
Prelude.Generic)

-- |
-- Create a value of 'SendDataToWirelessDevice' 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:
--
-- 'wirelessMetadata', 'sendDataToWirelessDevice_wirelessMetadata' - Metadata about the message request.
--
-- 'id', 'sendDataToWirelessDevice_id' - The ID of the wireless device to receive the data.
--
-- 'transmitMode', 'sendDataToWirelessDevice_transmitMode' - The transmit mode to use to send data to the wireless device. Can be:
-- @0@ for UM (unacknowledge mode) or @1@ for AM (acknowledge mode).
--
-- 'payloadData', 'sendDataToWirelessDevice_payloadData' - The binary to be sent to the end device, encoded in base64.
newSendDataToWirelessDevice ::
  -- | 'id'
  Prelude.Text ->
  -- | 'transmitMode'
  Prelude.Natural ->
  -- | 'payloadData'
  Prelude.Text ->
  SendDataToWirelessDevice
newSendDataToWirelessDevice :: Text -> Natural -> Text -> SendDataToWirelessDevice
newSendDataToWirelessDevice
  Text
pId_
  Natural
pTransmitMode_
  Text
pPayloadData_ =
    SendDataToWirelessDevice' :: Maybe WirelessMetadata
-> Text -> Natural -> Text -> SendDataToWirelessDevice
SendDataToWirelessDevice'
      { $sel:wirelessMetadata:SendDataToWirelessDevice' :: Maybe WirelessMetadata
wirelessMetadata =
          Maybe WirelessMetadata
forall a. Maybe a
Prelude.Nothing,
        $sel:id:SendDataToWirelessDevice' :: Text
id = Text
pId_,
        $sel:transmitMode:SendDataToWirelessDevice' :: Natural
transmitMode = Natural
pTransmitMode_,
        $sel:payloadData:SendDataToWirelessDevice' :: Text
payloadData = Text
pPayloadData_
      }

-- | Metadata about the message request.
sendDataToWirelessDevice_wirelessMetadata :: Lens.Lens' SendDataToWirelessDevice (Prelude.Maybe WirelessMetadata)
sendDataToWirelessDevice_wirelessMetadata :: (Maybe WirelessMetadata -> f (Maybe WirelessMetadata))
-> SendDataToWirelessDevice -> f SendDataToWirelessDevice
sendDataToWirelessDevice_wirelessMetadata = (SendDataToWirelessDevice -> Maybe WirelessMetadata)
-> (SendDataToWirelessDevice
    -> Maybe WirelessMetadata -> SendDataToWirelessDevice)
-> Lens
     SendDataToWirelessDevice
     SendDataToWirelessDevice
     (Maybe WirelessMetadata)
     (Maybe WirelessMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDataToWirelessDevice' {Maybe WirelessMetadata
wirelessMetadata :: Maybe WirelessMetadata
$sel:wirelessMetadata:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Maybe WirelessMetadata
wirelessMetadata} -> Maybe WirelessMetadata
wirelessMetadata) (\s :: SendDataToWirelessDevice
s@SendDataToWirelessDevice' {} Maybe WirelessMetadata
a -> SendDataToWirelessDevice
s {$sel:wirelessMetadata:SendDataToWirelessDevice' :: Maybe WirelessMetadata
wirelessMetadata = Maybe WirelessMetadata
a} :: SendDataToWirelessDevice)

-- | The ID of the wireless device to receive the data.
sendDataToWirelessDevice_id :: Lens.Lens' SendDataToWirelessDevice Prelude.Text
sendDataToWirelessDevice_id :: (Text -> f Text)
-> SendDataToWirelessDevice -> f SendDataToWirelessDevice
sendDataToWirelessDevice_id = (SendDataToWirelessDevice -> Text)
-> (SendDataToWirelessDevice -> Text -> SendDataToWirelessDevice)
-> Lens SendDataToWirelessDevice SendDataToWirelessDevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDataToWirelessDevice' {Text
id :: Text
$sel:id:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Text
id} -> Text
id) (\s :: SendDataToWirelessDevice
s@SendDataToWirelessDevice' {} Text
a -> SendDataToWirelessDevice
s {$sel:id:SendDataToWirelessDevice' :: Text
id = Text
a} :: SendDataToWirelessDevice)

-- | The transmit mode to use to send data to the wireless device. Can be:
-- @0@ for UM (unacknowledge mode) or @1@ for AM (acknowledge mode).
sendDataToWirelessDevice_transmitMode :: Lens.Lens' SendDataToWirelessDevice Prelude.Natural
sendDataToWirelessDevice_transmitMode :: (Natural -> f Natural)
-> SendDataToWirelessDevice -> f SendDataToWirelessDevice
sendDataToWirelessDevice_transmitMode = (SendDataToWirelessDevice -> Natural)
-> (SendDataToWirelessDevice
    -> Natural -> SendDataToWirelessDevice)
-> Lens
     SendDataToWirelessDevice SendDataToWirelessDevice Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDataToWirelessDevice' {Natural
transmitMode :: Natural
$sel:transmitMode:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Natural
transmitMode} -> Natural
transmitMode) (\s :: SendDataToWirelessDevice
s@SendDataToWirelessDevice' {} Natural
a -> SendDataToWirelessDevice
s {$sel:transmitMode:SendDataToWirelessDevice' :: Natural
transmitMode = Natural
a} :: SendDataToWirelessDevice)

-- | The binary to be sent to the end device, encoded in base64.
sendDataToWirelessDevice_payloadData :: Lens.Lens' SendDataToWirelessDevice Prelude.Text
sendDataToWirelessDevice_payloadData :: (Text -> f Text)
-> SendDataToWirelessDevice -> f SendDataToWirelessDevice
sendDataToWirelessDevice_payloadData = (SendDataToWirelessDevice -> Text)
-> (SendDataToWirelessDevice -> Text -> SendDataToWirelessDevice)
-> Lens SendDataToWirelessDevice SendDataToWirelessDevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDataToWirelessDevice' {Text
payloadData :: Text
$sel:payloadData:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Text
payloadData} -> Text
payloadData) (\s :: SendDataToWirelessDevice
s@SendDataToWirelessDevice' {} Text
a -> SendDataToWirelessDevice
s {$sel:payloadData:SendDataToWirelessDevice' :: Text
payloadData = Text
a} :: SendDataToWirelessDevice)

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

instance Prelude.NFData SendDataToWirelessDevice

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

instance Core.ToJSON SendDataToWirelessDevice where
  toJSON :: SendDataToWirelessDevice -> Value
toJSON SendDataToWirelessDevice' {Natural
Maybe WirelessMetadata
Text
payloadData :: Text
transmitMode :: Natural
id :: Text
wirelessMetadata :: Maybe WirelessMetadata
$sel:payloadData:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Text
$sel:transmitMode:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Natural
$sel:id:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Text
$sel:wirelessMetadata:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Maybe WirelessMetadata
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"WirelessMetadata" Text -> WirelessMetadata -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (WirelessMetadata -> Pair) -> Maybe WirelessMetadata -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WirelessMetadata
wirelessMetadata,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TransmitMode" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
transmitMode),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PayloadData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
payloadData)
          ]
      )

instance Core.ToPath SendDataToWirelessDevice where
  toPath :: SendDataToWirelessDevice -> ByteString
toPath SendDataToWirelessDevice' {Natural
Maybe WirelessMetadata
Text
payloadData :: Text
transmitMode :: Natural
id :: Text
wirelessMetadata :: Maybe WirelessMetadata
$sel:payloadData:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Text
$sel:transmitMode:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Natural
$sel:id:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Text
$sel:wirelessMetadata:SendDataToWirelessDevice' :: SendDataToWirelessDevice -> Maybe WirelessMetadata
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/wireless-devices/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id, ByteString
"/data"]

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

-- | /See:/ 'newSendDataToWirelessDeviceResponse' smart constructor.
data SendDataToWirelessDeviceResponse = SendDataToWirelessDeviceResponse'
  { -- | The ID of the message sent to the wireless device.
    SendDataToWirelessDeviceResponse -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    SendDataToWirelessDeviceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SendDataToWirelessDeviceResponse
-> SendDataToWirelessDeviceResponse -> Bool
(SendDataToWirelessDeviceResponse
 -> SendDataToWirelessDeviceResponse -> Bool)
-> (SendDataToWirelessDeviceResponse
    -> SendDataToWirelessDeviceResponse -> Bool)
-> Eq SendDataToWirelessDeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendDataToWirelessDeviceResponse
-> SendDataToWirelessDeviceResponse -> Bool
$c/= :: SendDataToWirelessDeviceResponse
-> SendDataToWirelessDeviceResponse -> Bool
== :: SendDataToWirelessDeviceResponse
-> SendDataToWirelessDeviceResponse -> Bool
$c== :: SendDataToWirelessDeviceResponse
-> SendDataToWirelessDeviceResponse -> Bool
Prelude.Eq, ReadPrec [SendDataToWirelessDeviceResponse]
ReadPrec SendDataToWirelessDeviceResponse
Int -> ReadS SendDataToWirelessDeviceResponse
ReadS [SendDataToWirelessDeviceResponse]
(Int -> ReadS SendDataToWirelessDeviceResponse)
-> ReadS [SendDataToWirelessDeviceResponse]
-> ReadPrec SendDataToWirelessDeviceResponse
-> ReadPrec [SendDataToWirelessDeviceResponse]
-> Read SendDataToWirelessDeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendDataToWirelessDeviceResponse]
$creadListPrec :: ReadPrec [SendDataToWirelessDeviceResponse]
readPrec :: ReadPrec SendDataToWirelessDeviceResponse
$creadPrec :: ReadPrec SendDataToWirelessDeviceResponse
readList :: ReadS [SendDataToWirelessDeviceResponse]
$creadList :: ReadS [SendDataToWirelessDeviceResponse]
readsPrec :: Int -> ReadS SendDataToWirelessDeviceResponse
$creadsPrec :: Int -> ReadS SendDataToWirelessDeviceResponse
Prelude.Read, Int -> SendDataToWirelessDeviceResponse -> ShowS
[SendDataToWirelessDeviceResponse] -> ShowS
SendDataToWirelessDeviceResponse -> String
(Int -> SendDataToWirelessDeviceResponse -> ShowS)
-> (SendDataToWirelessDeviceResponse -> String)
-> ([SendDataToWirelessDeviceResponse] -> ShowS)
-> Show SendDataToWirelessDeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendDataToWirelessDeviceResponse] -> ShowS
$cshowList :: [SendDataToWirelessDeviceResponse] -> ShowS
show :: SendDataToWirelessDeviceResponse -> String
$cshow :: SendDataToWirelessDeviceResponse -> String
showsPrec :: Int -> SendDataToWirelessDeviceResponse -> ShowS
$cshowsPrec :: Int -> SendDataToWirelessDeviceResponse -> ShowS
Prelude.Show, (forall x.
 SendDataToWirelessDeviceResponse
 -> Rep SendDataToWirelessDeviceResponse x)
-> (forall x.
    Rep SendDataToWirelessDeviceResponse x
    -> SendDataToWirelessDeviceResponse)
-> Generic SendDataToWirelessDeviceResponse
forall x.
Rep SendDataToWirelessDeviceResponse x
-> SendDataToWirelessDeviceResponse
forall x.
SendDataToWirelessDeviceResponse
-> Rep SendDataToWirelessDeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendDataToWirelessDeviceResponse x
-> SendDataToWirelessDeviceResponse
$cfrom :: forall x.
SendDataToWirelessDeviceResponse
-> Rep SendDataToWirelessDeviceResponse x
Prelude.Generic)

-- |
-- Create a value of 'SendDataToWirelessDeviceResponse' 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:
--
-- 'messageId', 'sendDataToWirelessDeviceResponse_messageId' - The ID of the message sent to the wireless device.
--
-- 'httpStatus', 'sendDataToWirelessDeviceResponse_httpStatus' - The response's http status code.
newSendDataToWirelessDeviceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SendDataToWirelessDeviceResponse
newSendDataToWirelessDeviceResponse :: Int -> SendDataToWirelessDeviceResponse
newSendDataToWirelessDeviceResponse Int
pHttpStatus_ =
  SendDataToWirelessDeviceResponse' :: Maybe Text -> Int -> SendDataToWirelessDeviceResponse
SendDataToWirelessDeviceResponse'
    { $sel:messageId:SendDataToWirelessDeviceResponse' :: Maybe Text
messageId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SendDataToWirelessDeviceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ID of the message sent to the wireless device.
sendDataToWirelessDeviceResponse_messageId :: Lens.Lens' SendDataToWirelessDeviceResponse (Prelude.Maybe Prelude.Text)
sendDataToWirelessDeviceResponse_messageId :: (Maybe Text -> f (Maybe Text))
-> SendDataToWirelessDeviceResponse
-> f SendDataToWirelessDeviceResponse
sendDataToWirelessDeviceResponse_messageId = (SendDataToWirelessDeviceResponse -> Maybe Text)
-> (SendDataToWirelessDeviceResponse
    -> Maybe Text -> SendDataToWirelessDeviceResponse)
-> Lens
     SendDataToWirelessDeviceResponse
     SendDataToWirelessDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendDataToWirelessDeviceResponse' {Maybe Text
messageId :: Maybe Text
$sel:messageId:SendDataToWirelessDeviceResponse' :: SendDataToWirelessDeviceResponse -> Maybe Text
messageId} -> Maybe Text
messageId) (\s :: SendDataToWirelessDeviceResponse
s@SendDataToWirelessDeviceResponse' {} Maybe Text
a -> SendDataToWirelessDeviceResponse
s {$sel:messageId:SendDataToWirelessDeviceResponse' :: Maybe Text
messageId = Maybe Text
a} :: SendDataToWirelessDeviceResponse)

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

instance
  Prelude.NFData
    SendDataToWirelessDeviceResponse