{-# 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.LoRaWANServiceProfile where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LoRaWANServiceProfile = LoRaWANServiceProfile'
{
LoRaWANServiceProfile -> Maybe Bool
addGwMetadata :: Prelude.Maybe Prelude.Bool
}
deriving (LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool
(LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool)
-> (LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool)
-> Eq LoRaWANServiceProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool
$c/= :: LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool
== :: LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool
$c== :: LoRaWANServiceProfile -> LoRaWANServiceProfile -> Bool
Prelude.Eq, ReadPrec [LoRaWANServiceProfile]
ReadPrec LoRaWANServiceProfile
Int -> ReadS LoRaWANServiceProfile
ReadS [LoRaWANServiceProfile]
(Int -> ReadS LoRaWANServiceProfile)
-> ReadS [LoRaWANServiceProfile]
-> ReadPrec LoRaWANServiceProfile
-> ReadPrec [LoRaWANServiceProfile]
-> Read LoRaWANServiceProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANServiceProfile]
$creadListPrec :: ReadPrec [LoRaWANServiceProfile]
readPrec :: ReadPrec LoRaWANServiceProfile
$creadPrec :: ReadPrec LoRaWANServiceProfile
readList :: ReadS [LoRaWANServiceProfile]
$creadList :: ReadS [LoRaWANServiceProfile]
readsPrec :: Int -> ReadS LoRaWANServiceProfile
$creadsPrec :: Int -> ReadS LoRaWANServiceProfile
Prelude.Read, Int -> LoRaWANServiceProfile -> ShowS
[LoRaWANServiceProfile] -> ShowS
LoRaWANServiceProfile -> String
(Int -> LoRaWANServiceProfile -> ShowS)
-> (LoRaWANServiceProfile -> String)
-> ([LoRaWANServiceProfile] -> ShowS)
-> Show LoRaWANServiceProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANServiceProfile] -> ShowS
$cshowList :: [LoRaWANServiceProfile] -> ShowS
show :: LoRaWANServiceProfile -> String
$cshow :: LoRaWANServiceProfile -> String
showsPrec :: Int -> LoRaWANServiceProfile -> ShowS
$cshowsPrec :: Int -> LoRaWANServiceProfile -> ShowS
Prelude.Show, (forall x. LoRaWANServiceProfile -> Rep LoRaWANServiceProfile x)
-> (forall x. Rep LoRaWANServiceProfile x -> LoRaWANServiceProfile)
-> Generic LoRaWANServiceProfile
forall x. Rep LoRaWANServiceProfile x -> LoRaWANServiceProfile
forall x. LoRaWANServiceProfile -> Rep LoRaWANServiceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LoRaWANServiceProfile x -> LoRaWANServiceProfile
$cfrom :: forall x. LoRaWANServiceProfile -> Rep LoRaWANServiceProfile x
Prelude.Generic)
newLoRaWANServiceProfile ::
LoRaWANServiceProfile
newLoRaWANServiceProfile :: LoRaWANServiceProfile
newLoRaWANServiceProfile =
LoRaWANServiceProfile' :: Maybe Bool -> LoRaWANServiceProfile
LoRaWANServiceProfile'
{ $sel:addGwMetadata:LoRaWANServiceProfile' :: Maybe Bool
addGwMetadata =
Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
loRaWANServiceProfile_addGwMetadata :: Lens.Lens' LoRaWANServiceProfile (Prelude.Maybe Prelude.Bool)
loRaWANServiceProfile_addGwMetadata :: (Maybe Bool -> f (Maybe Bool))
-> LoRaWANServiceProfile -> f LoRaWANServiceProfile
loRaWANServiceProfile_addGwMetadata = (LoRaWANServiceProfile -> Maybe Bool)
-> (LoRaWANServiceProfile -> Maybe Bool -> LoRaWANServiceProfile)
-> Lens
LoRaWANServiceProfile
LoRaWANServiceProfile
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANServiceProfile' {Maybe Bool
addGwMetadata :: Maybe Bool
$sel:addGwMetadata:LoRaWANServiceProfile' :: LoRaWANServiceProfile -> Maybe Bool
addGwMetadata} -> Maybe Bool
addGwMetadata) (\s :: LoRaWANServiceProfile
s@LoRaWANServiceProfile' {} Maybe Bool
a -> LoRaWANServiceProfile
s {$sel:addGwMetadata:LoRaWANServiceProfile' :: Maybe Bool
addGwMetadata = Maybe Bool
a} :: LoRaWANServiceProfile)
instance Prelude.Hashable LoRaWANServiceProfile
instance Prelude.NFData LoRaWANServiceProfile
instance Core.ToJSON LoRaWANServiceProfile where
toJSON :: LoRaWANServiceProfile -> Value
toJSON LoRaWANServiceProfile' {Maybe Bool
addGwMetadata :: Maybe Bool
$sel:addGwMetadata:LoRaWANServiceProfile' :: LoRaWANServiceProfile -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AddGwMetadata" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
addGwMetadata
]
)