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