{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.DescribeDevice
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the device.
module Amazonka.SageMaker.DescribeDevice
  ( -- * Creating a Request
    DescribeDevice (..),
    newDescribeDevice,

    -- * Request Lenses
    describeDevice_nextToken,
    describeDevice_deviceName,
    describeDevice_deviceFleetName,

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

    -- * Response Lenses
    describeDeviceResponse_agentVersion,
    describeDeviceResponse_description,
    describeDeviceResponse_deviceArn,
    describeDeviceResponse_iotThingName,
    describeDeviceResponse_latestHeartbeat,
    describeDeviceResponse_maxModels,
    describeDeviceResponse_models,
    describeDeviceResponse_nextToken,
    describeDeviceResponse_httpStatus,
    describeDeviceResponse_deviceName,
    describeDeviceResponse_deviceFleetName,
    describeDeviceResponse_registrationTime,
  )
where

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

-- | /See:/ 'newDescribeDevice' smart constructor.
data DescribeDevice = DescribeDevice'
  { -- | Next token of device description.
    DescribeDevice -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique ID of the device.
    DescribeDevice -> Text
deviceName :: Prelude.Text,
    -- | The name of the fleet the devices belong to.
    DescribeDevice -> Text
deviceFleetName :: Prelude.Text
  }
  deriving (DescribeDevice -> DescribeDevice -> Bool
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]
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
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. 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:
--
-- 'nextToken', 'describeDevice_nextToken' - Next token of device description.
--
-- 'deviceName', 'describeDevice_deviceName' - The unique ID of the device.
--
-- 'deviceFleetName', 'describeDevice_deviceFleetName' - The name of the fleet the devices belong to.
newDescribeDevice ::
  -- | 'deviceName'
  Prelude.Text ->
  -- | 'deviceFleetName'
  Prelude.Text ->
  DescribeDevice
newDescribeDevice :: Text -> Text -> DescribeDevice
newDescribeDevice Text
pDeviceName_ Text
pDeviceFleetName_ =
  DescribeDevice'
    { $sel:nextToken:DescribeDevice' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:deviceName:DescribeDevice' :: Text
deviceName = Text
pDeviceName_,
      $sel:deviceFleetName:DescribeDevice' :: Text
deviceFleetName = Text
pDeviceFleetName_
    }

-- | Next token of device description.
describeDevice_nextToken :: Lens.Lens' DescribeDevice (Prelude.Maybe Prelude.Text)
describeDevice_nextToken :: Lens' DescribeDevice (Maybe Text)
describeDevice_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDevice' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDevice' :: DescribeDevice -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDevice
s@DescribeDevice' {} Maybe Text
a -> DescribeDevice
s {$sel:nextToken:DescribeDevice' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDevice)

-- | The unique ID of the device.
describeDevice_deviceName :: Lens.Lens' DescribeDevice Prelude.Text
describeDevice_deviceName :: Lens' DescribeDevice Text
describeDevice_deviceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDevice' {Text
deviceName :: Text
$sel:deviceName:DescribeDevice' :: DescribeDevice -> Text
deviceName} -> Text
deviceName) (\s :: DescribeDevice
s@DescribeDevice' {} Text
a -> DescribeDevice
s {$sel:deviceName:DescribeDevice' :: Text
deviceName = Text
a} :: DescribeDevice)

-- | The name of the fleet the devices belong to.
describeDevice_deviceFleetName :: Lens.Lens' DescribeDevice Prelude.Text
describeDevice_deviceFleetName :: Lens' DescribeDevice Text
describeDevice_deviceFleetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDevice' {Text
deviceFleetName :: Text
$sel:deviceFleetName:DescribeDevice' :: DescribeDevice -> Text
deviceFleetName} -> Text
deviceFleetName) (\s :: DescribeDevice
s@DescribeDevice' {} Text
a -> DescribeDevice
s {$sel:deviceFleetName:DescribeDevice' :: Text
deviceFleetName = Text
a} :: DescribeDevice)

instance Core.AWSRequest DescribeDevice where
  type
    AWSResponse DescribeDevice =
      DescribeDeviceResponse
  request :: (Service -> Service) -> DescribeDevice -> Request DescribeDevice
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeDevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDevice)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe [EdgeModel]
-> Maybe Text
-> Int
-> Text
-> Text
-> POSIX
-> DescribeDeviceResponse
DescribeDeviceResponse'
            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
"AgentVersion")
            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
"Description")
            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
"DeviceArn")
            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
"IotThingName")
            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
"LatestHeartbeat")
            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
"MaxModels")
            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
"Models" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"DeviceName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"DeviceFleetName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"RegistrationTime")
      )

instance Prelude.Hashable DescribeDevice where
  hashWithSalt :: Int -> DescribeDevice -> Int
hashWithSalt Int
_salt DescribeDevice' {Maybe Text
Text
deviceFleetName :: Text
deviceName :: Text
nextToken :: Maybe Text
$sel:deviceFleetName:DescribeDevice' :: DescribeDevice -> Text
$sel:deviceName:DescribeDevice' :: DescribeDevice -> Text
$sel:nextToken:DescribeDevice' :: DescribeDevice -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceFleetName

instance Prelude.NFData DescribeDevice where
  rnf :: DescribeDevice -> ()
rnf DescribeDevice' {Maybe Text
Text
deviceFleetName :: Text
deviceName :: Text
nextToken :: Maybe Text
$sel:deviceFleetName:DescribeDevice' :: DescribeDevice -> Text
$sel:deviceName:DescribeDevice' :: DescribeDevice -> Text
$sel:nextToken:DescribeDevice' :: DescribeDevice -> 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 Text
deviceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
deviceFleetName

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

instance Data.ToJSON DescribeDevice where
  toJSON :: DescribeDevice -> Value
toJSON DescribeDevice' {Maybe Text
Text
deviceFleetName :: Text
deviceName :: Text
nextToken :: Maybe Text
$sel:deviceFleetName:DescribeDevice' :: DescribeDevice -> Text
$sel:deviceName:DescribeDevice' :: DescribeDevice -> Text
$sel:nextToken:DescribeDevice' :: DescribeDevice -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"DeviceName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
deviceName),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"DeviceFleetName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
deviceFleetName)
          ]
      )

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

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

-- | /See:/ 'newDescribeDeviceResponse' smart constructor.
data DescribeDeviceResponse = DescribeDeviceResponse'
  { -- | Edge Manager agent version.
    DescribeDeviceResponse -> Maybe Text
agentVersion :: Prelude.Maybe Prelude.Text,
    -- | A description of the device.
    DescribeDeviceResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the device.
    DescribeDeviceResponse -> Maybe Text
deviceArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services Internet of Things (IoT) object thing name
    -- associated with the device.
    DescribeDeviceResponse -> Maybe Text
iotThingName :: Prelude.Maybe Prelude.Text,
    -- | The last heartbeat received from the device.
    DescribeDeviceResponse -> Maybe POSIX
latestHeartbeat :: Prelude.Maybe Data.POSIX,
    -- | The maximum number of models.
    DescribeDeviceResponse -> Maybe Int
maxModels :: Prelude.Maybe Prelude.Int,
    -- | Models on the device.
    DescribeDeviceResponse -> Maybe [EdgeModel]
models :: Prelude.Maybe [EdgeModel],
    -- | The response from the last list when returning a list large enough to
    -- need tokening.
    DescribeDeviceResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDeviceResponse -> Int
httpStatus :: Prelude.Int,
    -- | The unique identifier of the device.
    DescribeDeviceResponse -> Text
deviceName :: Prelude.Text,
    -- | The name of the fleet the device belongs to.
    DescribeDeviceResponse -> Text
deviceFleetName :: Prelude.Text,
    -- | The timestamp of the last registration or de-reregistration.
    DescribeDeviceResponse -> POSIX
registrationTime :: Data.POSIX
  }
  deriving (DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
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]
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
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. 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:
--
-- 'agentVersion', 'describeDeviceResponse_agentVersion' - Edge Manager agent version.
--
-- 'description', 'describeDeviceResponse_description' - A description of the device.
--
-- 'deviceArn', 'describeDeviceResponse_deviceArn' - The Amazon Resource Name (ARN) of the device.
--
-- 'iotThingName', 'describeDeviceResponse_iotThingName' - The Amazon Web Services Internet of Things (IoT) object thing name
-- associated with the device.
--
-- 'latestHeartbeat', 'describeDeviceResponse_latestHeartbeat' - The last heartbeat received from the device.
--
-- 'maxModels', 'describeDeviceResponse_maxModels' - The maximum number of models.
--
-- 'models', 'describeDeviceResponse_models' - Models on the device.
--
-- 'nextToken', 'describeDeviceResponse_nextToken' - The response from the last list when returning a list large enough to
-- need tokening.
--
-- 'httpStatus', 'describeDeviceResponse_httpStatus' - The response's http status code.
--
-- 'deviceName', 'describeDeviceResponse_deviceName' - The unique identifier of the device.
--
-- 'deviceFleetName', 'describeDeviceResponse_deviceFleetName' - The name of the fleet the device belongs to.
--
-- 'registrationTime', 'describeDeviceResponse_registrationTime' - The timestamp of the last registration or de-reregistration.
newDescribeDeviceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'deviceName'
  Prelude.Text ->
  -- | 'deviceFleetName'
  Prelude.Text ->
  -- | 'registrationTime'
  Prelude.UTCTime ->
  DescribeDeviceResponse
newDescribeDeviceResponse :: Int -> Text -> Text -> UTCTime -> DescribeDeviceResponse
newDescribeDeviceResponse
  Int
pHttpStatus_
  Text
pDeviceName_
  Text
pDeviceFleetName_
  UTCTime
pRegistrationTime_ =
    DescribeDeviceResponse'
      { $sel:agentVersion:DescribeDeviceResponse' :: Maybe Text
agentVersion =
          forall a. Maybe a
Prelude.Nothing,
        $sel:description:DescribeDeviceResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:deviceArn:DescribeDeviceResponse' :: Maybe Text
deviceArn = forall a. Maybe a
Prelude.Nothing,
        $sel:iotThingName:DescribeDeviceResponse' :: Maybe Text
iotThingName = forall a. Maybe a
Prelude.Nothing,
        $sel:latestHeartbeat:DescribeDeviceResponse' :: Maybe POSIX
latestHeartbeat = forall a. Maybe a
Prelude.Nothing,
        $sel:maxModels:DescribeDeviceResponse' :: Maybe Int
maxModels = forall a. Maybe a
Prelude.Nothing,
        $sel:models:DescribeDeviceResponse' :: Maybe [EdgeModel]
models = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeDeviceResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeDeviceResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:deviceName:DescribeDeviceResponse' :: Text
deviceName = Text
pDeviceName_,
        $sel:deviceFleetName:DescribeDeviceResponse' :: Text
deviceFleetName = Text
pDeviceFleetName_,
        $sel:registrationTime:DescribeDeviceResponse' :: POSIX
registrationTime =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pRegistrationTime_
      }

-- | Edge Manager agent version.
describeDeviceResponse_agentVersion :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_agentVersion :: Lens' DescribeDeviceResponse (Maybe Text)
describeDeviceResponse_agentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
agentVersion :: Maybe Text
$sel:agentVersion:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
agentVersion} -> Maybe Text
agentVersion) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:agentVersion:DescribeDeviceResponse' :: Maybe Text
agentVersion = Maybe Text
a} :: DescribeDeviceResponse)

-- | A description of the device.
describeDeviceResponse_description :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_description :: Lens' DescribeDeviceResponse (Maybe Text)
describeDeviceResponse_description = 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 Amazon Resource Name (ARN) of the device.
describeDeviceResponse_deviceArn :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_deviceArn :: Lens' DescribeDeviceResponse (Maybe Text)
describeDeviceResponse_deviceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
deviceArn :: Maybe Text
$sel:deviceArn:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
deviceArn} -> Maybe Text
deviceArn) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:deviceArn:DescribeDeviceResponse' :: Maybe Text
deviceArn = Maybe Text
a} :: DescribeDeviceResponse)

-- | The Amazon Web Services Internet of Things (IoT) object thing name
-- associated with the device.
describeDeviceResponse_iotThingName :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_iotThingName :: Lens' DescribeDeviceResponse (Maybe Text)
describeDeviceResponse_iotThingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
iotThingName :: Maybe Text
$sel:iotThingName:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
iotThingName} -> Maybe Text
iotThingName) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:iotThingName:DescribeDeviceResponse' :: Maybe Text
iotThingName = Maybe Text
a} :: DescribeDeviceResponse)

-- | The last heartbeat received from the device.
describeDeviceResponse_latestHeartbeat :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.UTCTime)
describeDeviceResponse_latestHeartbeat :: Lens' DescribeDeviceResponse (Maybe UTCTime)
describeDeviceResponse_latestHeartbeat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe POSIX
latestHeartbeat :: Maybe POSIX
$sel:latestHeartbeat:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe POSIX
latestHeartbeat} -> Maybe POSIX
latestHeartbeat) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe POSIX
a -> DescribeDeviceResponse
s {$sel:latestHeartbeat:DescribeDeviceResponse' :: Maybe POSIX
latestHeartbeat = Maybe POSIX
a} :: DescribeDeviceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The maximum number of models.
describeDeviceResponse_maxModels :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Int)
describeDeviceResponse_maxModels :: Lens' DescribeDeviceResponse (Maybe Int)
describeDeviceResponse_maxModels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Int
maxModels :: Maybe Int
$sel:maxModels:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Int
maxModels} -> Maybe Int
maxModels) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Int
a -> DescribeDeviceResponse
s {$sel:maxModels:DescribeDeviceResponse' :: Maybe Int
maxModels = Maybe Int
a} :: DescribeDeviceResponse)

-- | Models on the device.
describeDeviceResponse_models :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe [EdgeModel])
describeDeviceResponse_models :: Lens' DescribeDeviceResponse (Maybe [EdgeModel])
describeDeviceResponse_models = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe [EdgeModel]
models :: Maybe [EdgeModel]
$sel:models:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe [EdgeModel]
models} -> Maybe [EdgeModel]
models) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe [EdgeModel]
a -> DescribeDeviceResponse
s {$sel:models:DescribeDeviceResponse' :: Maybe [EdgeModel]
models = Maybe [EdgeModel]
a} :: DescribeDeviceResponse) 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 from the last list when returning a list large enough to
-- need tokening.
describeDeviceResponse_nextToken :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_nextToken :: Lens' DescribeDeviceResponse (Maybe Text)
describeDeviceResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:nextToken:DescribeDeviceResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDeviceResponse)

-- | The response's http status code.
describeDeviceResponse_httpStatus :: Lens.Lens' DescribeDeviceResponse Prelude.Int
describeDeviceResponse_httpStatus :: Lens' DescribeDeviceResponse Int
describeDeviceResponse_httpStatus = 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)

-- | The unique identifier of the device.
describeDeviceResponse_deviceName :: Lens.Lens' DescribeDeviceResponse Prelude.Text
describeDeviceResponse_deviceName :: Lens' DescribeDeviceResponse Text
describeDeviceResponse_deviceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Text
deviceName :: Text
$sel:deviceName:DescribeDeviceResponse' :: DescribeDeviceResponse -> Text
deviceName} -> Text
deviceName) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Text
a -> DescribeDeviceResponse
s {$sel:deviceName:DescribeDeviceResponse' :: Text
deviceName = Text
a} :: DescribeDeviceResponse)

-- | The name of the fleet the device belongs to.
describeDeviceResponse_deviceFleetName :: Lens.Lens' DescribeDeviceResponse Prelude.Text
describeDeviceResponse_deviceFleetName :: Lens' DescribeDeviceResponse Text
describeDeviceResponse_deviceFleetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Text
deviceFleetName :: Text
$sel:deviceFleetName:DescribeDeviceResponse' :: DescribeDeviceResponse -> Text
deviceFleetName} -> Text
deviceFleetName) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Text
a -> DescribeDeviceResponse
s {$sel:deviceFleetName:DescribeDeviceResponse' :: Text
deviceFleetName = Text
a} :: DescribeDeviceResponse)

-- | The timestamp of the last registration or de-reregistration.
describeDeviceResponse_registrationTime :: Lens.Lens' DescribeDeviceResponse Prelude.UTCTime
describeDeviceResponse_registrationTime :: Lens' DescribeDeviceResponse UTCTime
describeDeviceResponse_registrationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {POSIX
registrationTime :: POSIX
$sel:registrationTime:DescribeDeviceResponse' :: DescribeDeviceResponse -> POSIX
registrationTime} -> POSIX
registrationTime) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} POSIX
a -> DescribeDeviceResponse
s {$sel:registrationTime:DescribeDeviceResponse' :: POSIX
registrationTime = POSIX
a} :: DescribeDeviceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Prelude.NFData DescribeDeviceResponse where
  rnf :: DescribeDeviceResponse -> ()
rnf DescribeDeviceResponse' {Int
Maybe Int
Maybe [EdgeModel]
Maybe Text
Maybe POSIX
Text
POSIX
registrationTime :: POSIX
deviceFleetName :: Text
deviceName :: Text
httpStatus :: Int
nextToken :: Maybe Text
models :: Maybe [EdgeModel]
maxModels :: Maybe Int
latestHeartbeat :: Maybe POSIX
iotThingName :: Maybe Text
deviceArn :: Maybe Text
description :: Maybe Text
agentVersion :: Maybe Text
$sel:registrationTime:DescribeDeviceResponse' :: DescribeDeviceResponse -> POSIX
$sel:deviceFleetName:DescribeDeviceResponse' :: DescribeDeviceResponse -> Text
$sel:deviceName:DescribeDeviceResponse' :: DescribeDeviceResponse -> Text
$sel:httpStatus:DescribeDeviceResponse' :: DescribeDeviceResponse -> Int
$sel:nextToken:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
$sel:models:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe [EdgeModel]
$sel:maxModels:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Int
$sel:latestHeartbeat:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe POSIX
$sel:iotThingName:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
$sel:deviceArn:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
$sel:description:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
$sel:agentVersion:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
agentVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iotThingName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
latestHeartbeat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxModels
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [EdgeModel]
models
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
deviceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
deviceFleetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
registrationTime