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