{-# 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.LoRaWANUpdateGatewayTaskEntry 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.LoRaWANGatewayVersion
import qualified Amazonka.Prelude as Prelude
data LoRaWANUpdateGatewayTaskEntry = LoRaWANUpdateGatewayTaskEntry'
{
LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
currentVersion :: Prelude.Maybe LoRaWANGatewayVersion,
LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
updateVersion :: Prelude.Maybe LoRaWANGatewayVersion
}
deriving (LoRaWANUpdateGatewayTaskEntry
-> LoRaWANUpdateGatewayTaskEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANUpdateGatewayTaskEntry
-> LoRaWANUpdateGatewayTaskEntry -> Bool
$c/= :: LoRaWANUpdateGatewayTaskEntry
-> LoRaWANUpdateGatewayTaskEntry -> Bool
== :: LoRaWANUpdateGatewayTaskEntry
-> LoRaWANUpdateGatewayTaskEntry -> Bool
$c== :: LoRaWANUpdateGatewayTaskEntry
-> LoRaWANUpdateGatewayTaskEntry -> Bool
Prelude.Eq, ReadPrec [LoRaWANUpdateGatewayTaskEntry]
ReadPrec LoRaWANUpdateGatewayTaskEntry
Int -> ReadS LoRaWANUpdateGatewayTaskEntry
ReadS [LoRaWANUpdateGatewayTaskEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANUpdateGatewayTaskEntry]
$creadListPrec :: ReadPrec [LoRaWANUpdateGatewayTaskEntry]
readPrec :: ReadPrec LoRaWANUpdateGatewayTaskEntry
$creadPrec :: ReadPrec LoRaWANUpdateGatewayTaskEntry
readList :: ReadS [LoRaWANUpdateGatewayTaskEntry]
$creadList :: ReadS [LoRaWANUpdateGatewayTaskEntry]
readsPrec :: Int -> ReadS LoRaWANUpdateGatewayTaskEntry
$creadsPrec :: Int -> ReadS LoRaWANUpdateGatewayTaskEntry
Prelude.Read, Int -> LoRaWANUpdateGatewayTaskEntry -> ShowS
[LoRaWANUpdateGatewayTaskEntry] -> ShowS
LoRaWANUpdateGatewayTaskEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANUpdateGatewayTaskEntry] -> ShowS
$cshowList :: [LoRaWANUpdateGatewayTaskEntry] -> ShowS
show :: LoRaWANUpdateGatewayTaskEntry -> String
$cshow :: LoRaWANUpdateGatewayTaskEntry -> String
showsPrec :: Int -> LoRaWANUpdateGatewayTaskEntry -> ShowS
$cshowsPrec :: Int -> LoRaWANUpdateGatewayTaskEntry -> ShowS
Prelude.Show, forall x.
Rep LoRaWANUpdateGatewayTaskEntry x
-> LoRaWANUpdateGatewayTaskEntry
forall x.
LoRaWANUpdateGatewayTaskEntry
-> Rep LoRaWANUpdateGatewayTaskEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LoRaWANUpdateGatewayTaskEntry x
-> LoRaWANUpdateGatewayTaskEntry
$cfrom :: forall x.
LoRaWANUpdateGatewayTaskEntry
-> Rep LoRaWANUpdateGatewayTaskEntry x
Prelude.Generic)
newLoRaWANUpdateGatewayTaskEntry ::
LoRaWANUpdateGatewayTaskEntry
newLoRaWANUpdateGatewayTaskEntry :: LoRaWANUpdateGatewayTaskEntry
newLoRaWANUpdateGatewayTaskEntry =
LoRaWANUpdateGatewayTaskEntry'
{ $sel:currentVersion:LoRaWANUpdateGatewayTaskEntry' :: Maybe LoRaWANGatewayVersion
currentVersion =
forall a. Maybe a
Prelude.Nothing,
$sel:updateVersion:LoRaWANUpdateGatewayTaskEntry' :: Maybe LoRaWANGatewayVersion
updateVersion = forall a. Maybe a
Prelude.Nothing
}
loRaWANUpdateGatewayTaskEntry_currentVersion :: Lens.Lens' LoRaWANUpdateGatewayTaskEntry (Prelude.Maybe LoRaWANGatewayVersion)
loRaWANUpdateGatewayTaskEntry_currentVersion :: Lens' LoRaWANUpdateGatewayTaskEntry (Maybe LoRaWANGatewayVersion)
loRaWANUpdateGatewayTaskEntry_currentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANUpdateGatewayTaskEntry' {Maybe LoRaWANGatewayVersion
currentVersion :: Maybe LoRaWANGatewayVersion
$sel:currentVersion:LoRaWANUpdateGatewayTaskEntry' :: LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
currentVersion} -> Maybe LoRaWANGatewayVersion
currentVersion) (\s :: LoRaWANUpdateGatewayTaskEntry
s@LoRaWANUpdateGatewayTaskEntry' {} Maybe LoRaWANGatewayVersion
a -> LoRaWANUpdateGatewayTaskEntry
s {$sel:currentVersion:LoRaWANUpdateGatewayTaskEntry' :: Maybe LoRaWANGatewayVersion
currentVersion = Maybe LoRaWANGatewayVersion
a} :: LoRaWANUpdateGatewayTaskEntry)
loRaWANUpdateGatewayTaskEntry_updateVersion :: Lens.Lens' LoRaWANUpdateGatewayTaskEntry (Prelude.Maybe LoRaWANGatewayVersion)
loRaWANUpdateGatewayTaskEntry_updateVersion :: Lens' LoRaWANUpdateGatewayTaskEntry (Maybe LoRaWANGatewayVersion)
loRaWANUpdateGatewayTaskEntry_updateVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANUpdateGatewayTaskEntry' {Maybe LoRaWANGatewayVersion
updateVersion :: Maybe LoRaWANGatewayVersion
$sel:updateVersion:LoRaWANUpdateGatewayTaskEntry' :: LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
updateVersion} -> Maybe LoRaWANGatewayVersion
updateVersion) (\s :: LoRaWANUpdateGatewayTaskEntry
s@LoRaWANUpdateGatewayTaskEntry' {} Maybe LoRaWANGatewayVersion
a -> LoRaWANUpdateGatewayTaskEntry
s {$sel:updateVersion:LoRaWANUpdateGatewayTaskEntry' :: Maybe LoRaWANGatewayVersion
updateVersion = Maybe LoRaWANGatewayVersion
a} :: LoRaWANUpdateGatewayTaskEntry)
instance Data.FromJSON LoRaWANUpdateGatewayTaskEntry where
parseJSON :: Value -> Parser LoRaWANUpdateGatewayTaskEntry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LoRaWANUpdateGatewayTaskEntry"
( \Object
x ->
Maybe LoRaWANGatewayVersion
-> Maybe LoRaWANGatewayVersion -> LoRaWANUpdateGatewayTaskEntry
LoRaWANUpdateGatewayTaskEntry'
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
"CurrentVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UpdateVersion")
)
instance
Prelude.Hashable
LoRaWANUpdateGatewayTaskEntry
where
hashWithSalt :: Int -> LoRaWANUpdateGatewayTaskEntry -> Int
hashWithSalt Int
_salt LoRaWANUpdateGatewayTaskEntry' {Maybe LoRaWANGatewayVersion
updateVersion :: Maybe LoRaWANGatewayVersion
currentVersion :: Maybe LoRaWANGatewayVersion
$sel:updateVersion:LoRaWANUpdateGatewayTaskEntry' :: LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
$sel:currentVersion:LoRaWANUpdateGatewayTaskEntry' :: LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LoRaWANGatewayVersion
currentVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LoRaWANGatewayVersion
updateVersion
instance Prelude.NFData LoRaWANUpdateGatewayTaskEntry where
rnf :: LoRaWANUpdateGatewayTaskEntry -> ()
rnf LoRaWANUpdateGatewayTaskEntry' {Maybe LoRaWANGatewayVersion
updateVersion :: Maybe LoRaWANGatewayVersion
currentVersion :: Maybe LoRaWANGatewayVersion
$sel:updateVersion:LoRaWANUpdateGatewayTaskEntry' :: LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
$sel:currentVersion:LoRaWANUpdateGatewayTaskEntry' :: LoRaWANUpdateGatewayTaskEntry -> Maybe LoRaWANGatewayVersion
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LoRaWANGatewayVersion
currentVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LoRaWANGatewayVersion
updateVersion