{-# 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 #-}
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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Device = Device'
{
Device -> Maybe Text
deviceArn :: Prelude.Maybe Prelude.Text,
Device -> Maybe Text
deviceName :: Prelude.Maybe Prelude.Text,
Device -> Maybe Text
deviceSerialNumber :: Prelude.Maybe Prelude.Text,
Device -> Maybe DeviceStatus
deviceStatus :: Prelude.Maybe DeviceStatus,
Device -> Maybe DeviceStatusInfo
deviceStatusInfo :: Prelude.Maybe DeviceStatusInfo,
Device -> Maybe Text
deviceType :: Prelude.Maybe Prelude.Text,
Device -> Maybe Text
macAddress :: Prelude.Maybe Prelude.Text,
Device -> Maybe DeviceNetworkProfileInfo
networkProfileInfo :: Prelude.Maybe DeviceNetworkProfileInfo,
Device -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
Device -> Maybe Text
softwareVersion :: Prelude.Maybe Prelude.Text
}
deriving (Device -> Device -> Bool
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]
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
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. 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)
newDevice ::
Device
newDevice :: Device
newDevice =
Device'
{ $sel:deviceArn:Device' :: Maybe Text
deviceArn = forall a. Maybe a
Prelude.Nothing,
$sel:deviceName:Device' :: Maybe Text
deviceName = forall a. Maybe a
Prelude.Nothing,
$sel:deviceSerialNumber:Device' :: Maybe Text
deviceSerialNumber = forall a. Maybe a
Prelude.Nothing,
$sel:deviceStatus:Device' :: Maybe DeviceStatus
deviceStatus = forall a. Maybe a
Prelude.Nothing,
$sel:deviceStatusInfo:Device' :: Maybe DeviceStatusInfo
deviceStatusInfo = forall a. Maybe a
Prelude.Nothing,
$sel:deviceType:Device' :: Maybe Text
deviceType = forall a. Maybe a
Prelude.Nothing,
$sel:macAddress:Device' :: Maybe Text
macAddress = forall a. Maybe a
Prelude.Nothing,
$sel:networkProfileInfo:Device' :: Maybe DeviceNetworkProfileInfo
networkProfileInfo = forall a. Maybe a
Prelude.Nothing,
$sel:roomArn:Device' :: Maybe Text
roomArn = forall a. Maybe a
Prelude.Nothing,
$sel:softwareVersion:Device' :: Maybe Text
softwareVersion = forall a. Maybe a
Prelude.Nothing
}
device_deviceArn :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_deviceArn :: Lens' Device (Maybe Text)
device_deviceArn = 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)
device_deviceName :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_deviceName :: Lens' Device (Maybe Text)
device_deviceName = 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)
device_deviceSerialNumber :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_deviceSerialNumber :: Lens' Device (Maybe Text)
device_deviceSerialNumber = 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)
device_deviceStatus :: Lens.Lens' Device (Prelude.Maybe DeviceStatus)
device_deviceStatus :: Lens' Device (Maybe DeviceStatus)
device_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)
device_deviceStatusInfo :: Lens.Lens' Device (Prelude.Maybe DeviceStatusInfo)
device_deviceStatusInfo :: Lens' Device (Maybe DeviceStatusInfo)
device_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)
device_deviceType :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_deviceType :: Lens' Device (Maybe Text)
device_deviceType = 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)
device_macAddress :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_macAddress :: Lens' Device (Maybe Text)
device_macAddress = 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)
device_networkProfileInfo :: Lens.Lens' Device (Prelude.Maybe DeviceNetworkProfileInfo)
device_networkProfileInfo :: Lens' Device (Maybe DeviceNetworkProfileInfo)
device_networkProfileInfo = 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)
device_roomArn :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_roomArn :: Lens' Device (Maybe Text)
device_roomArn = 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)
device_softwareVersion :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_softwareVersion :: Lens' Device (Maybe Text)
device_softwareVersion = 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)
instance Data.FromJSON Device where
parseJSON :: Value -> Parser Device
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Device"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DeviceStatus
-> Maybe DeviceStatusInfo
-> Maybe Text
-> Maybe Text
-> Maybe DeviceNetworkProfileInfo
-> Maybe Text
-> Maybe Text
-> Device
Device'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe 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 -> Parser (Maybe a)
Data..:? Key
"DeviceSerialNumber")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DeviceStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DeviceStatusInfo")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DeviceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MacAddress")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetworkProfileInfo")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RoomArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SoftwareVersion")
)
instance Prelude.Hashable Device where
hashWithSalt :: Int -> Device -> Int
hashWithSalt Int
_salt Device' {Maybe Text
Maybe DeviceNetworkProfileInfo
Maybe DeviceStatus
Maybe DeviceStatusInfo
softwareVersion :: Maybe Text
roomArn :: Maybe Text
networkProfileInfo :: Maybe DeviceNetworkProfileInfo
macAddress :: Maybe Text
deviceType :: Maybe Text
deviceStatusInfo :: Maybe DeviceStatusInfo
deviceStatus :: Maybe DeviceStatus
deviceSerialNumber :: Maybe Text
deviceName :: Maybe Text
deviceArn :: Maybe Text
$sel:softwareVersion:Device' :: Device -> Maybe Text
$sel:roomArn:Device' :: Device -> Maybe Text
$sel:networkProfileInfo:Device' :: Device -> Maybe DeviceNetworkProfileInfo
$sel:macAddress:Device' :: Device -> Maybe Text
$sel:deviceType:Device' :: Device -> Maybe Text
$sel:deviceStatusInfo:Device' :: Device -> Maybe DeviceStatusInfo
$sel:deviceStatus:Device' :: Device -> Maybe DeviceStatus
$sel:deviceSerialNumber:Device' :: Device -> Maybe Text
$sel:deviceName:Device' :: Device -> Maybe Text
$sel:deviceArn:Device' :: Device -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceSerialNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceStatus
deviceStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceStatusInfo
deviceStatusInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
macAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceNetworkProfileInfo
networkProfileInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roomArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
softwareVersion
instance Prelude.NFData Device where
rnf :: Device -> ()
rnf Device' {Maybe Text
Maybe DeviceNetworkProfileInfo
Maybe DeviceStatus
Maybe DeviceStatusInfo
softwareVersion :: Maybe Text
roomArn :: Maybe Text
networkProfileInfo :: Maybe DeviceNetworkProfileInfo
macAddress :: Maybe Text
deviceType :: Maybe Text
deviceStatusInfo :: Maybe DeviceStatusInfo
deviceStatus :: Maybe DeviceStatus
deviceSerialNumber :: Maybe Text
deviceName :: Maybe Text
deviceArn :: Maybe Text
$sel:softwareVersion:Device' :: Device -> Maybe Text
$sel:roomArn:Device' :: Device -> Maybe Text
$sel:networkProfileInfo:Device' :: Device -> Maybe DeviceNetworkProfileInfo
$sel:macAddress:Device' :: Device -> Maybe Text
$sel:deviceType:Device' :: Device -> Maybe Text
$sel:deviceStatusInfo:Device' :: Device -> Maybe DeviceStatusInfo
$sel:deviceStatus:Device' :: Device -> Maybe DeviceStatus
$sel:deviceSerialNumber:Device' :: Device -> Maybe Text
$sel:deviceName:Device' :: Device -> Maybe Text
$sel:deviceArn:Device' :: Device -> Maybe Text
..} =
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
deviceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceSerialNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeviceStatus
deviceStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeviceStatusInfo
deviceStatusInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
macAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeviceNetworkProfileInfo
networkProfileInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roomArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
softwareVersion