{-# 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.LoRaWANConnectionStatusResourceTypeEventConfiguration 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.EventNotificationTopicStatus
import qualified Amazonka.Prelude as Prelude
data LoRaWANConnectionStatusResourceTypeEventConfiguration = LoRaWANConnectionStatusResourceTypeEventConfiguration'
{
LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic :: Prelude.Maybe EventNotificationTopicStatus
}
deriving (LoRaWANConnectionStatusResourceTypeEventConfiguration
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> Bool
$c/= :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> Bool
== :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> Bool
$c== :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> Bool
Prelude.Eq, ReadPrec [LoRaWANConnectionStatusResourceTypeEventConfiguration]
ReadPrec LoRaWANConnectionStatusResourceTypeEventConfiguration
Int -> ReadS LoRaWANConnectionStatusResourceTypeEventConfiguration
ReadS [LoRaWANConnectionStatusResourceTypeEventConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANConnectionStatusResourceTypeEventConfiguration]
$creadListPrec :: ReadPrec [LoRaWANConnectionStatusResourceTypeEventConfiguration]
readPrec :: ReadPrec LoRaWANConnectionStatusResourceTypeEventConfiguration
$creadPrec :: ReadPrec LoRaWANConnectionStatusResourceTypeEventConfiguration
readList :: ReadS [LoRaWANConnectionStatusResourceTypeEventConfiguration]
$creadList :: ReadS [LoRaWANConnectionStatusResourceTypeEventConfiguration]
readsPrec :: Int -> ReadS LoRaWANConnectionStatusResourceTypeEventConfiguration
$creadsPrec :: Int -> ReadS LoRaWANConnectionStatusResourceTypeEventConfiguration
Prelude.Read, Int
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> ShowS
[LoRaWANConnectionStatusResourceTypeEventConfiguration] -> ShowS
LoRaWANConnectionStatusResourceTypeEventConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANConnectionStatusResourceTypeEventConfiguration] -> ShowS
$cshowList :: [LoRaWANConnectionStatusResourceTypeEventConfiguration] -> ShowS
show :: LoRaWANConnectionStatusResourceTypeEventConfiguration -> String
$cshow :: LoRaWANConnectionStatusResourceTypeEventConfiguration -> String
showsPrec :: Int
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> ShowS
$cshowsPrec :: Int
-> LoRaWANConnectionStatusResourceTypeEventConfiguration -> ShowS
Prelude.Show, forall x.
Rep LoRaWANConnectionStatusResourceTypeEventConfiguration x
-> LoRaWANConnectionStatusResourceTypeEventConfiguration
forall x.
LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Rep LoRaWANConnectionStatusResourceTypeEventConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LoRaWANConnectionStatusResourceTypeEventConfiguration x
-> LoRaWANConnectionStatusResourceTypeEventConfiguration
$cfrom :: forall x.
LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Rep LoRaWANConnectionStatusResourceTypeEventConfiguration x
Prelude.Generic)
newLoRaWANConnectionStatusResourceTypeEventConfiguration ::
LoRaWANConnectionStatusResourceTypeEventConfiguration
newLoRaWANConnectionStatusResourceTypeEventConfiguration :: LoRaWANConnectionStatusResourceTypeEventConfiguration
newLoRaWANConnectionStatusResourceTypeEventConfiguration =
LoRaWANConnectionStatusResourceTypeEventConfiguration'
{ $sel:wirelessGatewayEventTopic:LoRaWANConnectionStatusResourceTypeEventConfiguration' :: Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic =
forall a. Maybe a
Prelude.Nothing
}
loRaWANConnectionStatusResourceTypeEventConfiguration_wirelessGatewayEventTopic :: Lens.Lens' LoRaWANConnectionStatusResourceTypeEventConfiguration (Prelude.Maybe EventNotificationTopicStatus)
loRaWANConnectionStatusResourceTypeEventConfiguration_wirelessGatewayEventTopic :: Lens'
LoRaWANConnectionStatusResourceTypeEventConfiguration
(Maybe EventNotificationTopicStatus)
loRaWANConnectionStatusResourceTypeEventConfiguration_wirelessGatewayEventTopic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANConnectionStatusResourceTypeEventConfiguration' {Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic :: Maybe EventNotificationTopicStatus
$sel:wirelessGatewayEventTopic:LoRaWANConnectionStatusResourceTypeEventConfiguration' :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic} -> Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic) (\s :: LoRaWANConnectionStatusResourceTypeEventConfiguration
s@LoRaWANConnectionStatusResourceTypeEventConfiguration' {} Maybe EventNotificationTopicStatus
a -> LoRaWANConnectionStatusResourceTypeEventConfiguration
s {$sel:wirelessGatewayEventTopic:LoRaWANConnectionStatusResourceTypeEventConfiguration' :: Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic = Maybe EventNotificationTopicStatus
a} :: LoRaWANConnectionStatusResourceTypeEventConfiguration)
instance
Data.FromJSON
LoRaWANConnectionStatusResourceTypeEventConfiguration
where
parseJSON :: Value
-> Parser LoRaWANConnectionStatusResourceTypeEventConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LoRaWANConnectionStatusResourceTypeEventConfiguration"
( \Object
x ->
Maybe EventNotificationTopicStatus
-> LoRaWANConnectionStatusResourceTypeEventConfiguration
LoRaWANConnectionStatusResourceTypeEventConfiguration'
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
"WirelessGatewayEventTopic")
)
instance
Prelude.Hashable
LoRaWANConnectionStatusResourceTypeEventConfiguration
where
hashWithSalt :: Int -> LoRaWANConnectionStatusResourceTypeEventConfiguration -> Int
hashWithSalt
Int
_salt
LoRaWANConnectionStatusResourceTypeEventConfiguration' {Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic :: Maybe EventNotificationTopicStatus
$sel:wirelessGatewayEventTopic:LoRaWANConnectionStatusResourceTypeEventConfiguration' :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Maybe EventNotificationTopicStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic
instance
Prelude.NFData
LoRaWANConnectionStatusResourceTypeEventConfiguration
where
rnf :: LoRaWANConnectionStatusResourceTypeEventConfiguration -> ()
rnf
LoRaWANConnectionStatusResourceTypeEventConfiguration' {Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic :: Maybe EventNotificationTopicStatus
$sel:wirelessGatewayEventTopic:LoRaWANConnectionStatusResourceTypeEventConfiguration' :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Maybe EventNotificationTopicStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic
instance
Data.ToJSON
LoRaWANConnectionStatusResourceTypeEventConfiguration
where
toJSON :: LoRaWANConnectionStatusResourceTypeEventConfiguration -> Value
toJSON
LoRaWANConnectionStatusResourceTypeEventConfiguration' {Maybe EventNotificationTopicStatus
wirelessGatewayEventTopic :: Maybe EventNotificationTopicStatus
$sel:wirelessGatewayEventTopic:LoRaWANConnectionStatusResourceTypeEventConfiguration' :: LoRaWANConnectionStatusResourceTypeEventConfiguration
-> Maybe EventNotificationTopicStatus
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"WirelessGatewayEventTopic" 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 EventNotificationTopicStatus
wirelessGatewayEventTopic
]
)