{-# 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.IoTWireless.Types.WirelessGatewayStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTWireless.Types.LoRaWANGateway
import qualified Amazonka.Prelude as Prelude
data WirelessGatewayStatistics = WirelessGatewayStatistics'
{
WirelessGatewayStatistics -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe Text
lastUplinkReceivedAt :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe LoRaWANGateway
loRaWAN :: Prelude.Maybe LoRaWANGateway,
WirelessGatewayStatistics -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool
$c/= :: WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool
== :: WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool
$c== :: WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool
Prelude.Eq, ReadPrec [WirelessGatewayStatistics]
ReadPrec WirelessGatewayStatistics
Int -> ReadS WirelessGatewayStatistics
ReadS [WirelessGatewayStatistics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WirelessGatewayStatistics]
$creadListPrec :: ReadPrec [WirelessGatewayStatistics]
readPrec :: ReadPrec WirelessGatewayStatistics
$creadPrec :: ReadPrec WirelessGatewayStatistics
readList :: ReadS [WirelessGatewayStatistics]
$creadList :: ReadS [WirelessGatewayStatistics]
readsPrec :: Int -> ReadS WirelessGatewayStatistics
$creadsPrec :: Int -> ReadS WirelessGatewayStatistics
Prelude.Read, Int -> WirelessGatewayStatistics -> ShowS
[WirelessGatewayStatistics] -> ShowS
WirelessGatewayStatistics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WirelessGatewayStatistics] -> ShowS
$cshowList :: [WirelessGatewayStatistics] -> ShowS
show :: WirelessGatewayStatistics -> String
$cshow :: WirelessGatewayStatistics -> String
showsPrec :: Int -> WirelessGatewayStatistics -> ShowS
$cshowsPrec :: Int -> WirelessGatewayStatistics -> ShowS
Prelude.Show, forall x.
Rep WirelessGatewayStatistics x -> WirelessGatewayStatistics
forall x.
WirelessGatewayStatistics -> Rep WirelessGatewayStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WirelessGatewayStatistics x -> WirelessGatewayStatistics
$cfrom :: forall x.
WirelessGatewayStatistics -> Rep WirelessGatewayStatistics x
Prelude.Generic)
newWirelessGatewayStatistics ::
WirelessGatewayStatistics
newWirelessGatewayStatistics :: WirelessGatewayStatistics
newWirelessGatewayStatistics =
WirelessGatewayStatistics'
{ $sel:arn:WirelessGatewayStatistics' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:description:WirelessGatewayStatistics' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:id:WirelessGatewayStatistics' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:lastUplinkReceivedAt:WirelessGatewayStatistics' :: Maybe Text
lastUplinkReceivedAt = forall a. Maybe a
Prelude.Nothing,
$sel:loRaWAN:WirelessGatewayStatistics' :: Maybe LoRaWANGateway
loRaWAN = forall a. Maybe a
Prelude.Nothing,
$sel:name:WirelessGatewayStatistics' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
wirelessGatewayStatistics_arn :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_arn :: Lens' WirelessGatewayStatistics (Maybe Text)
wirelessGatewayStatistics_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WirelessGatewayStatistics' {Maybe Text
arn :: Maybe Text
$sel:arn:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
arn} -> Maybe Text
arn) (\s :: WirelessGatewayStatistics
s@WirelessGatewayStatistics' {} Maybe Text
a -> WirelessGatewayStatistics
s {$sel:arn:WirelessGatewayStatistics' :: Maybe Text
arn = Maybe Text
a} :: WirelessGatewayStatistics)
wirelessGatewayStatistics_description :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_description :: Lens' WirelessGatewayStatistics (Maybe Text)
wirelessGatewayStatistics_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WirelessGatewayStatistics' {Maybe Text
description :: Maybe Text
$sel:description:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
description} -> Maybe Text
description) (\s :: WirelessGatewayStatistics
s@WirelessGatewayStatistics' {} Maybe Text
a -> WirelessGatewayStatistics
s {$sel:description:WirelessGatewayStatistics' :: Maybe Text
description = Maybe Text
a} :: WirelessGatewayStatistics)
wirelessGatewayStatistics_id :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_id :: Lens' WirelessGatewayStatistics (Maybe Text)
wirelessGatewayStatistics_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WirelessGatewayStatistics' {Maybe Text
id :: Maybe Text
$sel:id:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
id} -> Maybe Text
id) (\s :: WirelessGatewayStatistics
s@WirelessGatewayStatistics' {} Maybe Text
a -> WirelessGatewayStatistics
s {$sel:id:WirelessGatewayStatistics' :: Maybe Text
id = Maybe Text
a} :: WirelessGatewayStatistics)
wirelessGatewayStatistics_lastUplinkReceivedAt :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_lastUplinkReceivedAt :: Lens' WirelessGatewayStatistics (Maybe Text)
wirelessGatewayStatistics_lastUplinkReceivedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WirelessGatewayStatistics' {Maybe Text
lastUplinkReceivedAt :: Maybe Text
$sel:lastUplinkReceivedAt:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
lastUplinkReceivedAt} -> Maybe Text
lastUplinkReceivedAt) (\s :: WirelessGatewayStatistics
s@WirelessGatewayStatistics' {} Maybe Text
a -> WirelessGatewayStatistics
s {$sel:lastUplinkReceivedAt:WirelessGatewayStatistics' :: Maybe Text
lastUplinkReceivedAt = Maybe Text
a} :: WirelessGatewayStatistics)
wirelessGatewayStatistics_loRaWAN :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe LoRaWANGateway)
wirelessGatewayStatistics_loRaWAN :: Lens' WirelessGatewayStatistics (Maybe LoRaWANGateway)
wirelessGatewayStatistics_loRaWAN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WirelessGatewayStatistics' {Maybe LoRaWANGateway
loRaWAN :: Maybe LoRaWANGateway
$sel:loRaWAN:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe LoRaWANGateway
loRaWAN} -> Maybe LoRaWANGateway
loRaWAN) (\s :: WirelessGatewayStatistics
s@WirelessGatewayStatistics' {} Maybe LoRaWANGateway
a -> WirelessGatewayStatistics
s {$sel:loRaWAN:WirelessGatewayStatistics' :: Maybe LoRaWANGateway
loRaWAN = Maybe LoRaWANGateway
a} :: WirelessGatewayStatistics)
wirelessGatewayStatistics_name :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_name :: Lens' WirelessGatewayStatistics (Maybe Text)
wirelessGatewayStatistics_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WirelessGatewayStatistics' {Maybe Text
name :: Maybe Text
$sel:name:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
name} -> Maybe Text
name) (\s :: WirelessGatewayStatistics
s@WirelessGatewayStatistics' {} Maybe Text
a -> WirelessGatewayStatistics
s {$sel:name:WirelessGatewayStatistics' :: Maybe Text
name = Maybe Text
a} :: WirelessGatewayStatistics)
instance Data.FromJSON WirelessGatewayStatistics where
parseJSON :: Value -> Parser WirelessGatewayStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WirelessGatewayStatistics"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LoRaWANGateway
-> Maybe Text
-> WirelessGatewayStatistics
WirelessGatewayStatistics'
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
"Arn")
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
"Description")
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
"Id")
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
"LastUplinkReceivedAt")
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
"LoRaWAN")
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
"Name")
)
instance Prelude.Hashable WirelessGatewayStatistics where
hashWithSalt :: Int -> WirelessGatewayStatistics -> Int
hashWithSalt Int
_salt WirelessGatewayStatistics' {Maybe Text
Maybe LoRaWANGateway
name :: Maybe Text
loRaWAN :: Maybe LoRaWANGateway
lastUplinkReceivedAt :: Maybe Text
id :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:name:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:loRaWAN:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe LoRaWANGateway
$sel:lastUplinkReceivedAt:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:id:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:description:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:arn:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastUplinkReceivedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LoRaWANGateway
loRaWAN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData WirelessGatewayStatistics where
rnf :: WirelessGatewayStatistics -> ()
rnf WirelessGatewayStatistics' {Maybe Text
Maybe LoRaWANGateway
name :: Maybe Text
loRaWAN :: Maybe LoRaWANGateway
lastUplinkReceivedAt :: Maybe Text
id :: Maybe Text
description :: Maybe Text
arn :: Maybe Text
$sel:name:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:loRaWAN:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe LoRaWANGateway
$sel:lastUplinkReceivedAt:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:id:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:description:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
$sel:arn:WirelessGatewayStatistics' :: WirelessGatewayStatistics -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
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
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastUplinkReceivedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LoRaWANGateway
loRaWAN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name