{-# 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 Amazonka.IoTWireless.Types.LoRaWANGateway
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WirelessGatewayStatistics = WirelessGatewayStatistics'
{
WirelessGatewayStatistics -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe LoRaWANGateway
loRaWAN :: Prelude.Maybe LoRaWANGateway,
WirelessGatewayStatistics -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe Text
lastUplinkReceivedAt :: Prelude.Maybe Prelude.Text,
WirelessGatewayStatistics -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool
(WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool)
-> (WirelessGatewayStatistics -> WirelessGatewayStatistics -> Bool)
-> Eq WirelessGatewayStatistics
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]
(Int -> ReadS WirelessGatewayStatistics)
-> ReadS [WirelessGatewayStatistics]
-> ReadPrec WirelessGatewayStatistics
-> ReadPrec [WirelessGatewayStatistics]
-> Read 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
(Int -> WirelessGatewayStatistics -> ShowS)
-> (WirelessGatewayStatistics -> String)
-> ([WirelessGatewayStatistics] -> ShowS)
-> Show WirelessGatewayStatistics
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.
WirelessGatewayStatistics -> Rep WirelessGatewayStatistics x)
-> (forall x.
Rep WirelessGatewayStatistics x -> WirelessGatewayStatistics)
-> Generic WirelessGatewayStatistics
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' :: Maybe Text
-> Maybe LoRaWANGateway
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics
WirelessGatewayStatistics'
{ $sel:arn:WirelessGatewayStatistics' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:loRaWAN:WirelessGatewayStatistics' :: Maybe LoRaWANGateway
loRaWAN = Maybe LoRaWANGateway
forall a. Maybe a
Prelude.Nothing,
$sel:name:WirelessGatewayStatistics' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:WirelessGatewayStatistics' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUplinkReceivedAt:WirelessGatewayStatistics' :: Maybe Text
lastUplinkReceivedAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:WirelessGatewayStatistics' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
wirelessGatewayStatistics_arn :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_arn :: (Maybe Text -> f (Maybe Text))
-> WirelessGatewayStatistics -> f WirelessGatewayStatistics
wirelessGatewayStatistics_arn = (WirelessGatewayStatistics -> Maybe Text)
-> (WirelessGatewayStatistics
-> Maybe Text -> WirelessGatewayStatistics)
-> Lens
WirelessGatewayStatistics
WirelessGatewayStatistics
(Maybe Text)
(Maybe Text)
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_loRaWAN :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe LoRaWANGateway)
wirelessGatewayStatistics_loRaWAN :: (Maybe LoRaWANGateway -> f (Maybe LoRaWANGateway))
-> WirelessGatewayStatistics -> f WirelessGatewayStatistics
wirelessGatewayStatistics_loRaWAN = (WirelessGatewayStatistics -> Maybe LoRaWANGateway)
-> (WirelessGatewayStatistics
-> Maybe LoRaWANGateway -> WirelessGatewayStatistics)
-> Lens
WirelessGatewayStatistics
WirelessGatewayStatistics
(Maybe LoRaWANGateway)
(Maybe LoRaWANGateway)
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 :: (Maybe Text -> f (Maybe Text))
-> WirelessGatewayStatistics -> f WirelessGatewayStatistics
wirelessGatewayStatistics_name = (WirelessGatewayStatistics -> Maybe Text)
-> (WirelessGatewayStatistics
-> Maybe Text -> WirelessGatewayStatistics)
-> Lens
WirelessGatewayStatistics
WirelessGatewayStatistics
(Maybe Text)
(Maybe Text)
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)
wirelessGatewayStatistics_id :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_id :: (Maybe Text -> f (Maybe Text))
-> WirelessGatewayStatistics -> f WirelessGatewayStatistics
wirelessGatewayStatistics_id = (WirelessGatewayStatistics -> Maybe Text)
-> (WirelessGatewayStatistics
-> Maybe Text -> WirelessGatewayStatistics)
-> Lens
WirelessGatewayStatistics
WirelessGatewayStatistics
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> WirelessGatewayStatistics -> f WirelessGatewayStatistics
wirelessGatewayStatistics_lastUplinkReceivedAt = (WirelessGatewayStatistics -> Maybe Text)
-> (WirelessGatewayStatistics
-> Maybe Text -> WirelessGatewayStatistics)
-> Lens
WirelessGatewayStatistics
WirelessGatewayStatistics
(Maybe Text)
(Maybe Text)
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_description :: Lens.Lens' WirelessGatewayStatistics (Prelude.Maybe Prelude.Text)
wirelessGatewayStatistics_description :: (Maybe Text -> f (Maybe Text))
-> WirelessGatewayStatistics -> f WirelessGatewayStatistics
wirelessGatewayStatistics_description = (WirelessGatewayStatistics -> Maybe Text)
-> (WirelessGatewayStatistics
-> Maybe Text -> WirelessGatewayStatistics)
-> Lens
WirelessGatewayStatistics
WirelessGatewayStatistics
(Maybe Text)
(Maybe Text)
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)
instance Core.FromJSON WirelessGatewayStatistics where
parseJSON :: Value -> Parser WirelessGatewayStatistics
parseJSON =
String
-> (Object -> Parser WirelessGatewayStatistics)
-> Value
-> Parser WirelessGatewayStatistics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WirelessGatewayStatistics"
( \Object
x ->
Maybe Text
-> Maybe LoRaWANGateway
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics
WirelessGatewayStatistics'
(Maybe Text
-> Maybe LoRaWANGateway
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics)
-> Parser (Maybe Text)
-> Parser
(Maybe LoRaWANGateway
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics)
forall (f :: * -> *) a b. Functor 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
"Arn")
Parser
(Maybe LoRaWANGateway
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics)
-> Parser (Maybe LoRaWANGateway)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoRaWANGateway)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoRaWAN")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WirelessGatewayStatistics)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> WirelessGatewayStatistics)
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
"Name")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> WirelessGatewayStatistics)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> WirelessGatewayStatistics)
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
"Id")
Parser (Maybe Text -> Maybe Text -> WirelessGatewayStatistics)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> WirelessGatewayStatistics)
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
"LastUplinkReceivedAt")
Parser (Maybe Text -> WirelessGatewayStatistics)
-> Parser (Maybe Text) -> Parser WirelessGatewayStatistics
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
"Description")
)
instance Prelude.Hashable WirelessGatewayStatistics
instance Prelude.NFData WirelessGatewayStatistics