{-# 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.Panorama.DescribeDevice
-- 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)
--
-- Returns information about a device.
module Amazonka.Panorama.DescribeDevice
  ( -- * Creating a Request
    DescribeDevice (..),
    newDescribeDevice,

    -- * Request Lenses
    describeDevice_deviceId,

    -- * Destructuring the Response
    DescribeDeviceResponse (..),
    newDescribeDeviceResponse,

    -- * Response Lenses
    describeDeviceResponse_latestSoftware,
    describeDeviceResponse_provisioningStatus,
    describeDeviceResponse_arn,
    describeDeviceResponse_createdTime,
    describeDeviceResponse_currentSoftware,
    describeDeviceResponse_name,
    describeDeviceResponse_deviceConnectionStatus,
    describeDeviceResponse_deviceId,
    describeDeviceResponse_type,
    describeDeviceResponse_leaseExpirationTime,
    describeDeviceResponse_serialNumber,
    describeDeviceResponse_currentNetworkingStatus,
    describeDeviceResponse_description,
    describeDeviceResponse_networkingConfiguration,
    describeDeviceResponse_tags,
    describeDeviceResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeDevice' smart constructor.
data DescribeDevice = DescribeDevice'
  { -- | The device\'s ID.
    DescribeDevice -> Text
deviceId :: Prelude.Text
  }
  deriving (DescribeDevice -> DescribeDevice -> Bool
(DescribeDevice -> DescribeDevice -> Bool)
-> (DescribeDevice -> DescribeDevice -> Bool) -> Eq DescribeDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDevice -> DescribeDevice -> Bool
$c/= :: DescribeDevice -> DescribeDevice -> Bool
== :: DescribeDevice -> DescribeDevice -> Bool
$c== :: DescribeDevice -> DescribeDevice -> Bool
Prelude.Eq, ReadPrec [DescribeDevice]
ReadPrec DescribeDevice
Int -> ReadS DescribeDevice
ReadS [DescribeDevice]
(Int -> ReadS DescribeDevice)
-> ReadS [DescribeDevice]
-> ReadPrec DescribeDevice
-> ReadPrec [DescribeDevice]
-> Read DescribeDevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDevice]
$creadListPrec :: ReadPrec [DescribeDevice]
readPrec :: ReadPrec DescribeDevice
$creadPrec :: ReadPrec DescribeDevice
readList :: ReadS [DescribeDevice]
$creadList :: ReadS [DescribeDevice]
readsPrec :: Int -> ReadS DescribeDevice
$creadsPrec :: Int -> ReadS DescribeDevice
Prelude.Read, Int -> DescribeDevice -> ShowS
[DescribeDevice] -> ShowS
DescribeDevice -> String
(Int -> DescribeDevice -> ShowS)
-> (DescribeDevice -> String)
-> ([DescribeDevice] -> ShowS)
-> Show DescribeDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDevice] -> ShowS
$cshowList :: [DescribeDevice] -> ShowS
show :: DescribeDevice -> String
$cshow :: DescribeDevice -> String
showsPrec :: Int -> DescribeDevice -> ShowS
$cshowsPrec :: Int -> DescribeDevice -> ShowS
Prelude.Show, (forall x. DescribeDevice -> Rep DescribeDevice x)
-> (forall x. Rep DescribeDevice x -> DescribeDevice)
-> Generic DescribeDevice
forall x. Rep DescribeDevice x -> DescribeDevice
forall x. DescribeDevice -> Rep DescribeDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDevice x -> DescribeDevice
$cfrom :: forall x. DescribeDevice -> Rep DescribeDevice x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDevice' 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:
--
-- 'deviceId', 'describeDevice_deviceId' - The device\'s ID.
newDescribeDevice ::
  -- | 'deviceId'
  Prelude.Text ->
  DescribeDevice
newDescribeDevice :: Text -> DescribeDevice
newDescribeDevice Text
pDeviceId_ =
  DescribeDevice' :: Text -> DescribeDevice
DescribeDevice' {$sel:deviceId:DescribeDevice' :: Text
deviceId = Text
pDeviceId_}

-- | The device\'s ID.
describeDevice_deviceId :: Lens.Lens' DescribeDevice Prelude.Text
describeDevice_deviceId :: (Text -> f Text) -> DescribeDevice -> f DescribeDevice
describeDevice_deviceId = (DescribeDevice -> Text)
-> (DescribeDevice -> Text -> DescribeDevice)
-> Lens DescribeDevice DescribeDevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDevice' {Text
deviceId :: Text
$sel:deviceId:DescribeDevice' :: DescribeDevice -> Text
deviceId} -> Text
deviceId) (\s :: DescribeDevice
s@DescribeDevice' {} Text
a -> DescribeDevice
s {$sel:deviceId:DescribeDevice' :: Text
deviceId = Text
a} :: DescribeDevice)

instance Core.AWSRequest DescribeDevice where
  type
    AWSResponse DescribeDevice =
      DescribeDeviceResponse
  request :: DescribeDevice -> Request DescribeDevice
request = Service -> DescribeDevice -> Request DescribeDevice
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDevice)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDevice))
-> Logger
-> Service
-> Proxy DescribeDevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDevice)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe DeviceStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe DeviceConnectionStatus
-> Maybe Text
-> Maybe DeviceType
-> Maybe POSIX
-> Maybe Text
-> Maybe NetworkStatus
-> Maybe Text
-> Maybe NetworkPayload
-> Maybe (HashMap Text Text)
-> Int
-> DescribeDeviceResponse
DescribeDeviceResponse'
            (Maybe Text
 -> Maybe DeviceStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe DeviceConnectionStatus
 -> Maybe Text
 -> Maybe DeviceType
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe NetworkStatus
 -> Maybe Text
 -> Maybe NetworkPayload
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DeviceStatus
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceConnectionStatus
      -> Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
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
"LatestSoftware")
            Either
  String
  (Maybe DeviceStatus
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceConnectionStatus
   -> Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe DeviceStatus)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceConnectionStatus
      -> Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeviceStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProvisioningStatus")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceConnectionStatus
   -> Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceConnectionStatus
      -> Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Arn")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceConnectionStatus
   -> Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe DeviceConnectionStatus
      -> Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe DeviceConnectionStatus
   -> Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe DeviceConnectionStatus
      -> Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => 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
"CurrentSoftware")
            Either
  String
  (Maybe Text
   -> Maybe DeviceConnectionStatus
   -> Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DeviceConnectionStatus
      -> Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Name")
            Either
  String
  (Maybe DeviceConnectionStatus
   -> Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe DeviceConnectionStatus)
-> Either
     String
     (Maybe Text
      -> Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeviceConnectionStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DeviceConnectionStatus")
            Either
  String
  (Maybe Text
   -> Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DeviceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => 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
"DeviceId")
            Either
  String
  (Maybe DeviceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe DeviceType)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeviceType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Type")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LeaseExpirationTime")
            Either
  String
  (Maybe Text
   -> Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe NetworkStatus
      -> Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SerialNumber")
            Either
  String
  (Maybe NetworkStatus
   -> Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe NetworkStatus)
-> Either
     String
     (Maybe Text
      -> Maybe NetworkPayload
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe NetworkStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CurrentNetworkingStatus")
            Either
  String
  (Maybe Text
   -> Maybe NetworkPayload
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe NetworkPayload
      -> Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Description")
            Either
  String
  (Maybe NetworkPayload
   -> Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
-> Either String (Maybe NetworkPayload)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe NetworkPayload)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NetworkingConfiguration")
            Either
  String (Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeDeviceResponse)
-> Either String Int -> Either String DescribeDeviceResponse
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 DescribeDevice

instance Prelude.NFData DescribeDevice

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

instance Core.ToPath DescribeDevice where
  toPath :: DescribeDevice -> ByteString
toPath DescribeDevice' {Text
deviceId :: Text
$sel:deviceId:DescribeDevice' :: DescribeDevice -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/devices/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
deviceId]

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

-- | /See:/ 'newDescribeDeviceResponse' smart constructor.
data DescribeDeviceResponse = DescribeDeviceResponse'
  { -- | The latest software version available for the device.
    DescribeDeviceResponse -> Maybe Text
latestSoftware :: Prelude.Maybe Prelude.Text,
    -- | The device\'s provisioning status.
    DescribeDeviceResponse -> Maybe DeviceStatus
provisioningStatus :: Prelude.Maybe DeviceStatus,
    -- | The device\'s ARN.
    DescribeDeviceResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | When the device was created.
    DescribeDeviceResponse -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The device\'s current software version.
    DescribeDeviceResponse -> Maybe Text
currentSoftware :: Prelude.Maybe Prelude.Text,
    -- | The device\'s name.
    DescribeDeviceResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The device\'s connection status.
    DescribeDeviceResponse -> Maybe DeviceConnectionStatus
deviceConnectionStatus :: Prelude.Maybe DeviceConnectionStatus,
    -- | The device\'s ID.
    DescribeDeviceResponse -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
    -- | The device\'s type.
    DescribeDeviceResponse -> Maybe DeviceType
type' :: Prelude.Maybe DeviceType,
    -- | The device\'s lease expiration time.
    DescribeDeviceResponse -> Maybe POSIX
leaseExpirationTime :: Prelude.Maybe Core.POSIX,
    -- | The device\'s serial number.
    DescribeDeviceResponse -> Maybe Text
serialNumber :: Prelude.Maybe Prelude.Text,
    -- | The device\'s networking status.
    DescribeDeviceResponse -> Maybe NetworkStatus
currentNetworkingStatus :: Prelude.Maybe NetworkStatus,
    -- | The device\'s description.
    DescribeDeviceResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The device\'s networking configuration.
    DescribeDeviceResponse -> Maybe NetworkPayload
networkingConfiguration :: Prelude.Maybe NetworkPayload,
    -- | The device\'s tags.
    DescribeDeviceResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeDeviceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
(DescribeDeviceResponse -> DescribeDeviceResponse -> Bool)
-> (DescribeDeviceResponse -> DescribeDeviceResponse -> Bool)
-> Eq DescribeDeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
$c/= :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
== :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
$c== :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDeviceResponse]
ReadPrec DescribeDeviceResponse
Int -> ReadS DescribeDeviceResponse
ReadS [DescribeDeviceResponse]
(Int -> ReadS DescribeDeviceResponse)
-> ReadS [DescribeDeviceResponse]
-> ReadPrec DescribeDeviceResponse
-> ReadPrec [DescribeDeviceResponse]
-> Read DescribeDeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDeviceResponse]
$creadListPrec :: ReadPrec [DescribeDeviceResponse]
readPrec :: ReadPrec DescribeDeviceResponse
$creadPrec :: ReadPrec DescribeDeviceResponse
readList :: ReadS [DescribeDeviceResponse]
$creadList :: ReadS [DescribeDeviceResponse]
readsPrec :: Int -> ReadS DescribeDeviceResponse
$creadsPrec :: Int -> ReadS DescribeDeviceResponse
Prelude.Read, Int -> DescribeDeviceResponse -> ShowS
[DescribeDeviceResponse] -> ShowS
DescribeDeviceResponse -> String
(Int -> DescribeDeviceResponse -> ShowS)
-> (DescribeDeviceResponse -> String)
-> ([DescribeDeviceResponse] -> ShowS)
-> Show DescribeDeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDeviceResponse] -> ShowS
$cshowList :: [DescribeDeviceResponse] -> ShowS
show :: DescribeDeviceResponse -> String
$cshow :: DescribeDeviceResponse -> String
showsPrec :: Int -> DescribeDeviceResponse -> ShowS
$cshowsPrec :: Int -> DescribeDeviceResponse -> ShowS
Prelude.Show, (forall x. DescribeDeviceResponse -> Rep DescribeDeviceResponse x)
-> (forall x.
    Rep DescribeDeviceResponse x -> DescribeDeviceResponse)
-> Generic DescribeDeviceResponse
forall x. Rep DescribeDeviceResponse x -> DescribeDeviceResponse
forall x. DescribeDeviceResponse -> Rep DescribeDeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDeviceResponse x -> DescribeDeviceResponse
$cfrom :: forall x. DescribeDeviceResponse -> Rep DescribeDeviceResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDeviceResponse' 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:
--
-- 'latestSoftware', 'describeDeviceResponse_latestSoftware' - The latest software version available for the device.
--
-- 'provisioningStatus', 'describeDeviceResponse_provisioningStatus' - The device\'s provisioning status.
--
-- 'arn', 'describeDeviceResponse_arn' - The device\'s ARN.
--
-- 'createdTime', 'describeDeviceResponse_createdTime' - When the device was created.
--
-- 'currentSoftware', 'describeDeviceResponse_currentSoftware' - The device\'s current software version.
--
-- 'name', 'describeDeviceResponse_name' - The device\'s name.
--
-- 'deviceConnectionStatus', 'describeDeviceResponse_deviceConnectionStatus' - The device\'s connection status.
--
-- 'deviceId', 'describeDeviceResponse_deviceId' - The device\'s ID.
--
-- 'type'', 'describeDeviceResponse_type' - The device\'s type.
--
-- 'leaseExpirationTime', 'describeDeviceResponse_leaseExpirationTime' - The device\'s lease expiration time.
--
-- 'serialNumber', 'describeDeviceResponse_serialNumber' - The device\'s serial number.
--
-- 'currentNetworkingStatus', 'describeDeviceResponse_currentNetworkingStatus' - The device\'s networking status.
--
-- 'description', 'describeDeviceResponse_description' - The device\'s description.
--
-- 'networkingConfiguration', 'describeDeviceResponse_networkingConfiguration' - The device\'s networking configuration.
--
-- 'tags', 'describeDeviceResponse_tags' - The device\'s tags.
--
-- 'httpStatus', 'describeDeviceResponse_httpStatus' - The response's http status code.
newDescribeDeviceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDeviceResponse
newDescribeDeviceResponse :: Int -> DescribeDeviceResponse
newDescribeDeviceResponse Int
pHttpStatus_ =
  DescribeDeviceResponse' :: Maybe Text
-> Maybe DeviceStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe DeviceConnectionStatus
-> Maybe Text
-> Maybe DeviceType
-> Maybe POSIX
-> Maybe Text
-> Maybe NetworkStatus
-> Maybe Text
-> Maybe NetworkPayload
-> Maybe (HashMap Text Text)
-> Int
-> DescribeDeviceResponse
DescribeDeviceResponse'
    { $sel:latestSoftware:DescribeDeviceResponse' :: Maybe Text
latestSoftware =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:provisioningStatus:DescribeDeviceResponse' :: Maybe DeviceStatus
provisioningStatus = Maybe DeviceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeDeviceResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:DescribeDeviceResponse' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:currentSoftware:DescribeDeviceResponse' :: Maybe Text
currentSoftware = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeDeviceResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceConnectionStatus:DescribeDeviceResponse' :: Maybe DeviceConnectionStatus
deviceConnectionStatus = Maybe DeviceConnectionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceId:DescribeDeviceResponse' :: Maybe Text
deviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':DescribeDeviceResponse' :: Maybe DeviceType
type' = Maybe DeviceType
forall a. Maybe a
Prelude.Nothing,
      $sel:leaseExpirationTime:DescribeDeviceResponse' :: Maybe POSIX
leaseExpirationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:serialNumber:DescribeDeviceResponse' :: Maybe Text
serialNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentNetworkingStatus:DescribeDeviceResponse' :: Maybe NetworkStatus
currentNetworkingStatus = Maybe NetworkStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeDeviceResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:networkingConfiguration:DescribeDeviceResponse' :: Maybe NetworkPayload
networkingConfiguration = Maybe NetworkPayload
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeDeviceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDeviceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The latest software version available for the device.
describeDeviceResponse_latestSoftware :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_latestSoftware :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_latestSoftware = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
latestSoftware :: Maybe Text
$sel:latestSoftware:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
latestSoftware} -> Maybe Text
latestSoftware) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:latestSoftware:DescribeDeviceResponse' :: Maybe Text
latestSoftware = Maybe Text
a} :: DescribeDeviceResponse)

-- | The device\'s provisioning status.
describeDeviceResponse_provisioningStatus :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe DeviceStatus)
describeDeviceResponse_provisioningStatus :: (Maybe DeviceStatus -> f (Maybe DeviceStatus))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_provisioningStatus = (DescribeDeviceResponse -> Maybe DeviceStatus)
-> (DescribeDeviceResponse
    -> Maybe DeviceStatus -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe DeviceStatus)
     (Maybe DeviceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe DeviceStatus
provisioningStatus :: Maybe DeviceStatus
$sel:provisioningStatus:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe DeviceStatus
provisioningStatus} -> Maybe DeviceStatus
provisioningStatus) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe DeviceStatus
a -> DescribeDeviceResponse
s {$sel:provisioningStatus:DescribeDeviceResponse' :: Maybe DeviceStatus
provisioningStatus = Maybe DeviceStatus
a} :: DescribeDeviceResponse)

-- | The device\'s ARN.
describeDeviceResponse_arn :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_arn = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:arn:DescribeDeviceResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeDeviceResponse)

-- | When the device was created.
describeDeviceResponse_createdTime :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.UTCTime)
describeDeviceResponse_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_createdTime = (DescribeDeviceResponse -> Maybe POSIX)
-> (DescribeDeviceResponse
    -> Maybe POSIX -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe POSIX
a -> DescribeDeviceResponse
s {$sel:createdTime:DescribeDeviceResponse' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DescribeDeviceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The device\'s current software version.
describeDeviceResponse_currentSoftware :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_currentSoftware :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_currentSoftware = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
currentSoftware :: Maybe Text
$sel:currentSoftware:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
currentSoftware} -> Maybe Text
currentSoftware) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:currentSoftware:DescribeDeviceResponse' :: Maybe Text
currentSoftware = Maybe Text
a} :: DescribeDeviceResponse)

-- | The device\'s name.
describeDeviceResponse_name :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_name = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:name:DescribeDeviceResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeDeviceResponse)

-- | The device\'s connection status.
describeDeviceResponse_deviceConnectionStatus :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe DeviceConnectionStatus)
describeDeviceResponse_deviceConnectionStatus :: (Maybe DeviceConnectionStatus -> f (Maybe DeviceConnectionStatus))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_deviceConnectionStatus = (DescribeDeviceResponse -> Maybe DeviceConnectionStatus)
-> (DescribeDeviceResponse
    -> Maybe DeviceConnectionStatus -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe DeviceConnectionStatus)
     (Maybe DeviceConnectionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe DeviceConnectionStatus
deviceConnectionStatus :: Maybe DeviceConnectionStatus
$sel:deviceConnectionStatus:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe DeviceConnectionStatus
deviceConnectionStatus} -> Maybe DeviceConnectionStatus
deviceConnectionStatus) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe DeviceConnectionStatus
a -> DescribeDeviceResponse
s {$sel:deviceConnectionStatus:DescribeDeviceResponse' :: Maybe DeviceConnectionStatus
deviceConnectionStatus = Maybe DeviceConnectionStatus
a} :: DescribeDeviceResponse)

-- | The device\'s ID.
describeDeviceResponse_deviceId :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_deviceId :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_deviceId = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:deviceId:DescribeDeviceResponse' :: Maybe Text
deviceId = Maybe Text
a} :: DescribeDeviceResponse)

-- | The device\'s type.
describeDeviceResponse_type :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe DeviceType)
describeDeviceResponse_type :: (Maybe DeviceType -> f (Maybe DeviceType))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_type = (DescribeDeviceResponse -> Maybe DeviceType)
-> (DescribeDeviceResponse
    -> Maybe DeviceType -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe DeviceType)
     (Maybe DeviceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe DeviceType
type' :: Maybe DeviceType
$sel:type':DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe DeviceType
type'} -> Maybe DeviceType
type') (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe DeviceType
a -> DescribeDeviceResponse
s {$sel:type':DescribeDeviceResponse' :: Maybe DeviceType
type' = Maybe DeviceType
a} :: DescribeDeviceResponse)

-- | The device\'s lease expiration time.
describeDeviceResponse_leaseExpirationTime :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.UTCTime)
describeDeviceResponse_leaseExpirationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_leaseExpirationTime = (DescribeDeviceResponse -> Maybe POSIX)
-> (DescribeDeviceResponse
    -> Maybe POSIX -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe POSIX
leaseExpirationTime :: Maybe POSIX
$sel:leaseExpirationTime:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe POSIX
leaseExpirationTime} -> Maybe POSIX
leaseExpirationTime) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe POSIX
a -> DescribeDeviceResponse
s {$sel:leaseExpirationTime:DescribeDeviceResponse' :: Maybe POSIX
leaseExpirationTime = Maybe POSIX
a} :: DescribeDeviceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The device\'s serial number.
describeDeviceResponse_serialNumber :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_serialNumber :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_serialNumber = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
serialNumber :: Maybe Text
$sel:serialNumber:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
serialNumber} -> Maybe Text
serialNumber) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:serialNumber:DescribeDeviceResponse' :: Maybe Text
serialNumber = Maybe Text
a} :: DescribeDeviceResponse)

-- | The device\'s networking status.
describeDeviceResponse_currentNetworkingStatus :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe NetworkStatus)
describeDeviceResponse_currentNetworkingStatus :: (Maybe NetworkStatus -> f (Maybe NetworkStatus))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_currentNetworkingStatus = (DescribeDeviceResponse -> Maybe NetworkStatus)
-> (DescribeDeviceResponse
    -> Maybe NetworkStatus -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe NetworkStatus)
     (Maybe NetworkStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe NetworkStatus
currentNetworkingStatus :: Maybe NetworkStatus
$sel:currentNetworkingStatus:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe NetworkStatus
currentNetworkingStatus} -> Maybe NetworkStatus
currentNetworkingStatus) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe NetworkStatus
a -> DescribeDeviceResponse
s {$sel:currentNetworkingStatus:DescribeDeviceResponse' :: Maybe NetworkStatus
currentNetworkingStatus = Maybe NetworkStatus
a} :: DescribeDeviceResponse)

-- | The device\'s description.
describeDeviceResponse_description :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_description = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:description:DescribeDeviceResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeDeviceResponse)

-- | The device\'s networking configuration.
describeDeviceResponse_networkingConfiguration :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe NetworkPayload)
describeDeviceResponse_networkingConfiguration :: (Maybe NetworkPayload -> f (Maybe NetworkPayload))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_networkingConfiguration = (DescribeDeviceResponse -> Maybe NetworkPayload)
-> (DescribeDeviceResponse
    -> Maybe NetworkPayload -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe NetworkPayload)
     (Maybe NetworkPayload)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe NetworkPayload
networkingConfiguration :: Maybe NetworkPayload
$sel:networkingConfiguration:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe NetworkPayload
networkingConfiguration} -> Maybe NetworkPayload
networkingConfiguration) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe NetworkPayload
a -> DescribeDeviceResponse
s {$sel:networkingConfiguration:DescribeDeviceResponse' :: Maybe NetworkPayload
networkingConfiguration = Maybe NetworkPayload
a} :: DescribeDeviceResponse)

-- | The device\'s tags.
describeDeviceResponse_tags :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeDeviceResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_tags = (DescribeDeviceResponse -> Maybe (HashMap Text Text))
-> (DescribeDeviceResponse
    -> Maybe (HashMap Text Text) -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe (HashMap Text Text)
a -> DescribeDeviceResponse
s {$sel:tags:DescribeDeviceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeDeviceResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeDeviceResponse