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

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

-- |
-- Module      : Amazonka.AlexaBusiness.Types.Device
-- 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)
module Amazonka.AlexaBusiness.Types.Device where

import Amazonka.AlexaBusiness.Types.DeviceNetworkProfileInfo
import Amazonka.AlexaBusiness.Types.DeviceStatus
import Amazonka.AlexaBusiness.Types.DeviceStatusInfo
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A device with attributes.
--
-- /See:/ 'newDevice' smart constructor.
data Device = Device'
  { -- | The status of a device. If the status is not READY, check the
    -- DeviceStatusInfo value for details.
    Device -> Maybe DeviceStatus
deviceStatus :: Prelude.Maybe DeviceStatus,
    -- | Detailed information about a device\'s status.
    Device -> Maybe DeviceStatusInfo
deviceStatusInfo :: Prelude.Maybe DeviceStatusInfo,
    -- | The ARN of a device.
    Device -> Maybe Text
deviceArn :: Prelude.Maybe Prelude.Text,
    -- | The MAC address of a device.
    Device -> Maybe Text
macAddress :: Prelude.Maybe Prelude.Text,
    -- | The name of a device.
    Device -> Maybe Text
deviceName :: Prelude.Maybe Prelude.Text,
    -- | The room ARN of a device.
    Device -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
    -- | The software version of a device.
    Device -> Maybe Text
softwareVersion :: Prelude.Maybe Prelude.Text,
    -- | The type of a device.
    Device -> Maybe Text
deviceType :: Prelude.Maybe Prelude.Text,
    -- | Detailed information about a device\'s network profile.
    Device -> Maybe DeviceNetworkProfileInfo
networkProfileInfo :: Prelude.Maybe DeviceNetworkProfileInfo,
    -- | The serial number of a device.
    Device -> Maybe Text
deviceSerialNumber :: Prelude.Maybe Prelude.Text
  }
  deriving (Device -> Device -> Bool
(Device -> Device -> Bool)
-> (Device -> Device -> Bool) -> Eq Device
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Device -> Device -> Bool
$c/= :: Device -> Device -> Bool
== :: Device -> Device -> Bool
$c== :: Device -> Device -> Bool
Prelude.Eq, ReadPrec [Device]
ReadPrec Device
Int -> ReadS Device
ReadS [Device]
(Int -> ReadS Device)
-> ReadS [Device]
-> ReadPrec Device
-> ReadPrec [Device]
-> Read Device
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Device]
$creadListPrec :: ReadPrec [Device]
readPrec :: ReadPrec Device
$creadPrec :: ReadPrec Device
readList :: ReadS [Device]
$creadList :: ReadS [Device]
readsPrec :: Int -> ReadS Device
$creadsPrec :: Int -> ReadS Device
Prelude.Read, Int -> Device -> ShowS
[Device] -> ShowS
Device -> String
(Int -> Device -> ShowS)
-> (Device -> String) -> ([Device] -> ShowS) -> Show Device
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Device] -> ShowS
$cshowList :: [Device] -> ShowS
show :: Device -> String
$cshow :: Device -> String
showsPrec :: Int -> Device -> ShowS
$cshowsPrec :: Int -> Device -> ShowS
Prelude.Show, (forall x. Device -> Rep Device x)
-> (forall x. Rep Device x -> Device) -> Generic Device
forall x. Rep Device x -> Device
forall x. Device -> Rep Device x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Device x -> Device
$cfrom :: forall x. Device -> Rep Device x
Prelude.Generic)

-- |
-- Create a value of 'Device' 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:
--
-- 'deviceStatus', 'device_deviceStatus' - The status of a device. If the status is not READY, check the
-- DeviceStatusInfo value for details.
--
-- 'deviceStatusInfo', 'device_deviceStatusInfo' - Detailed information about a device\'s status.
--
-- 'deviceArn', 'device_deviceArn' - The ARN of a device.
--
-- 'macAddress', 'device_macAddress' - The MAC address of a device.
--
-- 'deviceName', 'device_deviceName' - The name of a device.
--
-- 'roomArn', 'device_roomArn' - The room ARN of a device.
--
-- 'softwareVersion', 'device_softwareVersion' - The software version of a device.
--
-- 'deviceType', 'device_deviceType' - The type of a device.
--
-- 'networkProfileInfo', 'device_networkProfileInfo' - Detailed information about a device\'s network profile.
--
-- 'deviceSerialNumber', 'device_deviceSerialNumber' - The serial number of a device.
newDevice ::
  Device
newDevice :: Device
newDevice =
  Device' :: Maybe DeviceStatus
-> Maybe DeviceStatusInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DeviceNetworkProfileInfo
-> Maybe Text
-> Device
Device'
    { $sel:deviceStatus:Device' :: Maybe DeviceStatus
deviceStatus = Maybe DeviceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceStatusInfo:Device' :: Maybe DeviceStatusInfo
deviceStatusInfo = Maybe DeviceStatusInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceArn:Device' :: Maybe Text
deviceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:macAddress:Device' :: Maybe Text
macAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceName:Device' :: Maybe Text
deviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roomArn:Device' :: Maybe Text
roomArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:softwareVersion:Device' :: Maybe Text
softwareVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceType:Device' :: Maybe Text
deviceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:networkProfileInfo:Device' :: Maybe DeviceNetworkProfileInfo
networkProfileInfo = Maybe DeviceNetworkProfileInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceSerialNumber:Device' :: Maybe Text
deviceSerialNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of a device. If the status is not READY, check the
-- DeviceStatusInfo value for details.
device_deviceStatus :: Lens.Lens' Device (Prelude.Maybe DeviceStatus)
device_deviceStatus :: (Maybe DeviceStatus -> f (Maybe DeviceStatus))
-> Device -> f Device
device_deviceStatus = (Device -> Maybe DeviceStatus)
-> (Device -> Maybe DeviceStatus -> Device)
-> Lens Device Device (Maybe DeviceStatus) (Maybe DeviceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe DeviceStatus
deviceStatus :: Maybe DeviceStatus
$sel:deviceStatus:Device' :: Device -> Maybe DeviceStatus
deviceStatus} -> Maybe DeviceStatus
deviceStatus) (\s :: Device
s@Device' {} Maybe DeviceStatus
a -> Device
s {$sel:deviceStatus:Device' :: Maybe DeviceStatus
deviceStatus = Maybe DeviceStatus
a} :: Device)

-- | Detailed information about a device\'s status.
device_deviceStatusInfo :: Lens.Lens' Device (Prelude.Maybe DeviceStatusInfo)
device_deviceStatusInfo :: (Maybe DeviceStatusInfo -> f (Maybe DeviceStatusInfo))
-> Device -> f Device
device_deviceStatusInfo = (Device -> Maybe DeviceStatusInfo)
-> (Device -> Maybe DeviceStatusInfo -> Device)
-> Lens
     Device Device (Maybe DeviceStatusInfo) (Maybe DeviceStatusInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe DeviceStatusInfo
deviceStatusInfo :: Maybe DeviceStatusInfo
$sel:deviceStatusInfo:Device' :: Device -> Maybe DeviceStatusInfo
deviceStatusInfo} -> Maybe DeviceStatusInfo
deviceStatusInfo) (\s :: Device
s@Device' {} Maybe DeviceStatusInfo
a -> Device
s {$sel:deviceStatusInfo:Device' :: Maybe DeviceStatusInfo
deviceStatusInfo = Maybe DeviceStatusInfo
a} :: Device)

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

-- | The MAC address of a device.
device_macAddress :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_macAddress :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_macAddress = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
macAddress :: Maybe Text
$sel:macAddress:Device' :: Device -> Maybe Text
macAddress} -> Maybe Text
macAddress) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:macAddress:Device' :: Maybe Text
macAddress = Maybe Text
a} :: Device)

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

-- | The room ARN of a device.
device_roomArn :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_roomArn :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_roomArn = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
roomArn :: Maybe Text
$sel:roomArn:Device' :: Device -> Maybe Text
roomArn} -> Maybe Text
roomArn) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:roomArn:Device' :: Maybe Text
roomArn = Maybe Text
a} :: Device)

-- | The software version of a device.
device_softwareVersion :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_softwareVersion :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_softwareVersion = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
softwareVersion :: Maybe Text
$sel:softwareVersion:Device' :: Device -> Maybe Text
softwareVersion} -> Maybe Text
softwareVersion) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:softwareVersion:Device' :: Maybe Text
softwareVersion = Maybe Text
a} :: Device)

-- | The type of a device.
device_deviceType :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_deviceType :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_deviceType = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
deviceType :: Maybe Text
$sel:deviceType:Device' :: Device -> Maybe Text
deviceType} -> Maybe Text
deviceType) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:deviceType:Device' :: Maybe Text
deviceType = Maybe Text
a} :: Device)

-- | Detailed information about a device\'s network profile.
device_networkProfileInfo :: Lens.Lens' Device (Prelude.Maybe DeviceNetworkProfileInfo)
device_networkProfileInfo :: (Maybe DeviceNetworkProfileInfo
 -> f (Maybe DeviceNetworkProfileInfo))
-> Device -> f Device
device_networkProfileInfo = (Device -> Maybe DeviceNetworkProfileInfo)
-> (Device -> Maybe DeviceNetworkProfileInfo -> Device)
-> Lens
     Device
     Device
     (Maybe DeviceNetworkProfileInfo)
     (Maybe DeviceNetworkProfileInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe DeviceNetworkProfileInfo
networkProfileInfo :: Maybe DeviceNetworkProfileInfo
$sel:networkProfileInfo:Device' :: Device -> Maybe DeviceNetworkProfileInfo
networkProfileInfo} -> Maybe DeviceNetworkProfileInfo
networkProfileInfo) (\s :: Device
s@Device' {} Maybe DeviceNetworkProfileInfo
a -> Device
s {$sel:networkProfileInfo:Device' :: Maybe DeviceNetworkProfileInfo
networkProfileInfo = Maybe DeviceNetworkProfileInfo
a} :: Device)

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

instance Core.FromJSON Device where
  parseJSON :: Value -> Parser Device
parseJSON =
    String -> (Object -> Parser Device) -> Value -> Parser Device
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Device"
      ( \Object
x ->
          Maybe DeviceStatus
-> Maybe DeviceStatusInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DeviceNetworkProfileInfo
-> Maybe Text
-> Device
Device'
            (Maybe DeviceStatus
 -> Maybe DeviceStatusInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe DeviceNetworkProfileInfo
 -> Maybe Text
 -> Device)
-> Parser (Maybe DeviceStatus)
-> Parser
     (Maybe DeviceStatusInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceNetworkProfileInfo
      -> Maybe Text
      -> Device)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DeviceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceStatus")
            Parser
  (Maybe DeviceStatusInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceNetworkProfileInfo
   -> Maybe Text
   -> Device)
-> Parser (Maybe DeviceStatusInfo)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceNetworkProfileInfo
      -> Maybe Text
      -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeviceStatusInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceStatusInfo")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceNetworkProfileInfo
   -> Maybe Text
   -> Device)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceNetworkProfileInfo
      -> Maybe Text
      -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceNetworkProfileInfo
   -> Maybe Text
   -> Device)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceNetworkProfileInfo
      -> Maybe Text
      -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MacAddress")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceNetworkProfileInfo
   -> Maybe Text
   -> Device)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeviceNetworkProfileInfo
      -> Maybe Text
      -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeviceNetworkProfileInfo
   -> Maybe Text
   -> Device)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe DeviceNetworkProfileInfo
      -> Maybe Text
      -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoomArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe DeviceNetworkProfileInfo
   -> Maybe Text
   -> Device)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe DeviceNetworkProfileInfo -> Maybe Text -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SoftwareVersion")
            Parser
  (Maybe Text
   -> Maybe DeviceNetworkProfileInfo -> Maybe Text -> Device)
-> Parser (Maybe Text)
-> Parser (Maybe DeviceNetworkProfileInfo -> Maybe Text -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceType")
            Parser (Maybe DeviceNetworkProfileInfo -> Maybe Text -> Device)
-> Parser (Maybe DeviceNetworkProfileInfo)
-> Parser (Maybe Text -> Device)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeviceNetworkProfileInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NetworkProfileInfo")
            Parser (Maybe Text -> Device)
-> Parser (Maybe Text) -> Parser Device
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceSerialNumber")
      )

instance Prelude.Hashable Device

instance Prelude.NFData Device