{-# 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.LoRaWANGatewayCurrentVersion where
import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.Types.LoRaWANGatewayVersion
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LoRaWANGatewayCurrentVersion = LoRaWANGatewayCurrentVersion'
{
LoRaWANGatewayCurrentVersion -> Maybe LoRaWANGatewayVersion
currentVersion :: Prelude.Maybe LoRaWANGatewayVersion
}
deriving (LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool
(LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool)
-> (LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool)
-> Eq LoRaWANGatewayCurrentVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool
$c/= :: LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool
== :: LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool
$c== :: LoRaWANGatewayCurrentVersion
-> LoRaWANGatewayCurrentVersion -> Bool
Prelude.Eq, ReadPrec [LoRaWANGatewayCurrentVersion]
ReadPrec LoRaWANGatewayCurrentVersion
Int -> ReadS LoRaWANGatewayCurrentVersion
ReadS [LoRaWANGatewayCurrentVersion]
(Int -> ReadS LoRaWANGatewayCurrentVersion)
-> ReadS [LoRaWANGatewayCurrentVersion]
-> ReadPrec LoRaWANGatewayCurrentVersion
-> ReadPrec [LoRaWANGatewayCurrentVersion]
-> Read LoRaWANGatewayCurrentVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANGatewayCurrentVersion]
$creadListPrec :: ReadPrec [LoRaWANGatewayCurrentVersion]
readPrec :: ReadPrec LoRaWANGatewayCurrentVersion
$creadPrec :: ReadPrec LoRaWANGatewayCurrentVersion
readList :: ReadS [LoRaWANGatewayCurrentVersion]
$creadList :: ReadS [LoRaWANGatewayCurrentVersion]
readsPrec :: Int -> ReadS LoRaWANGatewayCurrentVersion
$creadsPrec :: Int -> ReadS LoRaWANGatewayCurrentVersion
Prelude.Read, Int -> LoRaWANGatewayCurrentVersion -> ShowS
[LoRaWANGatewayCurrentVersion] -> ShowS
LoRaWANGatewayCurrentVersion -> String
(Int -> LoRaWANGatewayCurrentVersion -> ShowS)
-> (LoRaWANGatewayCurrentVersion -> String)
-> ([LoRaWANGatewayCurrentVersion] -> ShowS)
-> Show LoRaWANGatewayCurrentVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANGatewayCurrentVersion] -> ShowS
$cshowList :: [LoRaWANGatewayCurrentVersion] -> ShowS
show :: LoRaWANGatewayCurrentVersion -> String
$cshow :: LoRaWANGatewayCurrentVersion -> String
showsPrec :: Int -> LoRaWANGatewayCurrentVersion -> ShowS
$cshowsPrec :: Int -> LoRaWANGatewayCurrentVersion -> ShowS
Prelude.Show, (forall x.
LoRaWANGatewayCurrentVersion -> Rep LoRaWANGatewayCurrentVersion x)
-> (forall x.
Rep LoRaWANGatewayCurrentVersion x -> LoRaWANGatewayCurrentVersion)
-> Generic LoRaWANGatewayCurrentVersion
forall x.
Rep LoRaWANGatewayCurrentVersion x -> LoRaWANGatewayCurrentVersion
forall x.
LoRaWANGatewayCurrentVersion -> Rep LoRaWANGatewayCurrentVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LoRaWANGatewayCurrentVersion x -> LoRaWANGatewayCurrentVersion
$cfrom :: forall x.
LoRaWANGatewayCurrentVersion -> Rep LoRaWANGatewayCurrentVersion x
Prelude.Generic)
newLoRaWANGatewayCurrentVersion ::
LoRaWANGatewayCurrentVersion
newLoRaWANGatewayCurrentVersion :: LoRaWANGatewayCurrentVersion
newLoRaWANGatewayCurrentVersion =
LoRaWANGatewayCurrentVersion' :: Maybe LoRaWANGatewayVersion -> LoRaWANGatewayCurrentVersion
LoRaWANGatewayCurrentVersion'
{ $sel:currentVersion:LoRaWANGatewayCurrentVersion' :: Maybe LoRaWANGatewayVersion
currentVersion =
Maybe LoRaWANGatewayVersion
forall a. Maybe a
Prelude.Nothing
}
loRaWANGatewayCurrentVersion_currentVersion :: Lens.Lens' LoRaWANGatewayCurrentVersion (Prelude.Maybe LoRaWANGatewayVersion)
loRaWANGatewayCurrentVersion_currentVersion :: (Maybe LoRaWANGatewayVersion -> f (Maybe LoRaWANGatewayVersion))
-> LoRaWANGatewayCurrentVersion -> f LoRaWANGatewayCurrentVersion
loRaWANGatewayCurrentVersion_currentVersion = (LoRaWANGatewayCurrentVersion -> Maybe LoRaWANGatewayVersion)
-> (LoRaWANGatewayCurrentVersion
-> Maybe LoRaWANGatewayVersion -> LoRaWANGatewayCurrentVersion)
-> Lens
LoRaWANGatewayCurrentVersion
LoRaWANGatewayCurrentVersion
(Maybe LoRaWANGatewayVersion)
(Maybe LoRaWANGatewayVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANGatewayCurrentVersion' {Maybe LoRaWANGatewayVersion
currentVersion :: Maybe LoRaWANGatewayVersion
$sel:currentVersion:LoRaWANGatewayCurrentVersion' :: LoRaWANGatewayCurrentVersion -> Maybe LoRaWANGatewayVersion
currentVersion} -> Maybe LoRaWANGatewayVersion
currentVersion) (\s :: LoRaWANGatewayCurrentVersion
s@LoRaWANGatewayCurrentVersion' {} Maybe LoRaWANGatewayVersion
a -> LoRaWANGatewayCurrentVersion
s {$sel:currentVersion:LoRaWANGatewayCurrentVersion' :: Maybe LoRaWANGatewayVersion
currentVersion = Maybe LoRaWANGatewayVersion
a} :: LoRaWANGatewayCurrentVersion)
instance Core.FromJSON LoRaWANGatewayCurrentVersion where
parseJSON :: Value -> Parser LoRaWANGatewayCurrentVersion
parseJSON =
String
-> (Object -> Parser LoRaWANGatewayCurrentVersion)
-> Value
-> Parser LoRaWANGatewayCurrentVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LoRaWANGatewayCurrentVersion"
( \Object
x ->
Maybe LoRaWANGatewayVersion -> LoRaWANGatewayCurrentVersion
LoRaWANGatewayCurrentVersion'
(Maybe LoRaWANGatewayVersion -> LoRaWANGatewayCurrentVersion)
-> Parser (Maybe LoRaWANGatewayVersion)
-> Parser LoRaWANGatewayCurrentVersion
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LoRaWANGatewayVersion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentVersion")
)
instance
Prelude.Hashable
LoRaWANGatewayCurrentVersion
instance Prelude.NFData LoRaWANGatewayCurrentVersion