{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTWireless.Types.LoRaWANDeviceProfile
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTWireless.Types.LoRaWANDeviceProfile where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | LoRaWANDeviceProfile object.
--
-- /See:/ 'newLoRaWANDeviceProfile' smart constructor.
data LoRaWANDeviceProfile = LoRaWANDeviceProfile'
  { -- | The frequency band (RFRegion) value.
    LoRaWANDeviceProfile -> Maybe Text
rfRegion :: Prelude.Maybe Prelude.Text,
    -- | The PingSlotFreq value.
    LoRaWANDeviceProfile -> Maybe Natural
pingSlotFreq :: Prelude.Maybe Prelude.Natural,
    -- | The ClassBTimeout value.
    LoRaWANDeviceProfile -> Maybe Natural
classBTimeout :: Prelude.Maybe Prelude.Natural,
    -- | The MaxEIRP value.
    LoRaWANDeviceProfile -> Maybe Natural
maxEirp :: Prelude.Maybe Prelude.Natural,
    -- | The RXDataRate2 value.
    LoRaWANDeviceProfile -> Maybe Natural
rxDataRate2 :: Prelude.Maybe Prelude.Natural,
    -- | The MAC version (such as OTAA 1.1 or OTAA 1.0.3) to use with this device
    -- profile.
    LoRaWANDeviceProfile -> Maybe Text
macVersion :: Prelude.Maybe Prelude.Text,
    -- | The list of values that make up the FactoryPresetFreqs value.
    LoRaWANDeviceProfile -> Maybe [Natural]
factoryPresetFreqsList :: Prelude.Maybe [Prelude.Natural],
    -- | The RXFreq2 value.
    LoRaWANDeviceProfile -> Maybe Natural
rxFreq2 :: Prelude.Maybe Prelude.Natural,
    -- | The ClassCTimeout value.
    LoRaWANDeviceProfile -> Maybe Natural
classCTimeout :: Prelude.Maybe Prelude.Natural,
    -- | The version of regional parameters.
    LoRaWANDeviceProfile -> Maybe Text
regParamsRevision :: Prelude.Maybe Prelude.Text,
    -- | The PingSlotDR value.
    LoRaWANDeviceProfile -> Maybe Natural
pingSlotDr :: Prelude.Maybe Prelude.Natural,
    -- | The Supports32BitFCnt value.
    LoRaWANDeviceProfile -> Maybe Bool
supports32BitFCnt :: Prelude.Maybe Prelude.Bool,
    -- | The MaxDutyCycle value.
    LoRaWANDeviceProfile -> Maybe Natural
maxDutyCycle :: Prelude.Maybe Prelude.Natural,
    -- | The RXDROffset1 value.
    LoRaWANDeviceProfile -> Maybe Natural
rxDrOffset1 :: Prelude.Maybe Prelude.Natural,
    -- | The SupportsClassB value.
    LoRaWANDeviceProfile -> Maybe Bool
supportsClassB :: Prelude.Maybe Prelude.Bool,
    -- | The SupportsJoin value.
    LoRaWANDeviceProfile -> Maybe Bool
supportsJoin :: Prelude.Maybe Prelude.Bool,
    -- | The RXDelay1 value.
    LoRaWANDeviceProfile -> Maybe Natural
rxDelay1 :: Prelude.Maybe Prelude.Natural,
    -- | The SupportsClassC value.
    LoRaWANDeviceProfile -> Maybe Bool
supportsClassC :: Prelude.Maybe Prelude.Bool,
    -- | The PingSlotPeriod value.
    LoRaWANDeviceProfile -> Maybe Natural
pingSlotPeriod :: Prelude.Maybe Prelude.Natural
  }
  deriving (LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool
(LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool)
-> (LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool)
-> Eq LoRaWANDeviceProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool
$c/= :: LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool
== :: LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool
$c== :: LoRaWANDeviceProfile -> LoRaWANDeviceProfile -> Bool
Prelude.Eq, ReadPrec [LoRaWANDeviceProfile]
ReadPrec LoRaWANDeviceProfile
Int -> ReadS LoRaWANDeviceProfile
ReadS [LoRaWANDeviceProfile]
(Int -> ReadS LoRaWANDeviceProfile)
-> ReadS [LoRaWANDeviceProfile]
-> ReadPrec LoRaWANDeviceProfile
-> ReadPrec [LoRaWANDeviceProfile]
-> Read LoRaWANDeviceProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANDeviceProfile]
$creadListPrec :: ReadPrec [LoRaWANDeviceProfile]
readPrec :: ReadPrec LoRaWANDeviceProfile
$creadPrec :: ReadPrec LoRaWANDeviceProfile
readList :: ReadS [LoRaWANDeviceProfile]
$creadList :: ReadS [LoRaWANDeviceProfile]
readsPrec :: Int -> ReadS LoRaWANDeviceProfile
$creadsPrec :: Int -> ReadS LoRaWANDeviceProfile
Prelude.Read, Int -> LoRaWANDeviceProfile -> ShowS
[LoRaWANDeviceProfile] -> ShowS
LoRaWANDeviceProfile -> String
(Int -> LoRaWANDeviceProfile -> ShowS)
-> (LoRaWANDeviceProfile -> String)
-> ([LoRaWANDeviceProfile] -> ShowS)
-> Show LoRaWANDeviceProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANDeviceProfile] -> ShowS
$cshowList :: [LoRaWANDeviceProfile] -> ShowS
show :: LoRaWANDeviceProfile -> String
$cshow :: LoRaWANDeviceProfile -> String
showsPrec :: Int -> LoRaWANDeviceProfile -> ShowS
$cshowsPrec :: Int -> LoRaWANDeviceProfile -> ShowS
Prelude.Show, (forall x. LoRaWANDeviceProfile -> Rep LoRaWANDeviceProfile x)
-> (forall x. Rep LoRaWANDeviceProfile x -> LoRaWANDeviceProfile)
-> Generic LoRaWANDeviceProfile
forall x. Rep LoRaWANDeviceProfile x -> LoRaWANDeviceProfile
forall x. LoRaWANDeviceProfile -> Rep LoRaWANDeviceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LoRaWANDeviceProfile x -> LoRaWANDeviceProfile
$cfrom :: forall x. LoRaWANDeviceProfile -> Rep LoRaWANDeviceProfile x
Prelude.Generic)

-- |
-- Create a value of 'LoRaWANDeviceProfile' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'rfRegion', 'loRaWANDeviceProfile_rfRegion' - The frequency band (RFRegion) value.
--
-- 'pingSlotFreq', 'loRaWANDeviceProfile_pingSlotFreq' - The PingSlotFreq value.
--
-- 'classBTimeout', 'loRaWANDeviceProfile_classBTimeout' - The ClassBTimeout value.
--
-- 'maxEirp', 'loRaWANDeviceProfile_maxEirp' - The MaxEIRP value.
--
-- 'rxDataRate2', 'loRaWANDeviceProfile_rxDataRate2' - The RXDataRate2 value.
--
-- 'macVersion', 'loRaWANDeviceProfile_macVersion' - The MAC version (such as OTAA 1.1 or OTAA 1.0.3) to use with this device
-- profile.
--
-- 'factoryPresetFreqsList', 'loRaWANDeviceProfile_factoryPresetFreqsList' - The list of values that make up the FactoryPresetFreqs value.
--
-- 'rxFreq2', 'loRaWANDeviceProfile_rxFreq2' - The RXFreq2 value.
--
-- 'classCTimeout', 'loRaWANDeviceProfile_classCTimeout' - The ClassCTimeout value.
--
-- 'regParamsRevision', 'loRaWANDeviceProfile_regParamsRevision' - The version of regional parameters.
--
-- 'pingSlotDr', 'loRaWANDeviceProfile_pingSlotDr' - The PingSlotDR value.
--
-- 'supports32BitFCnt', 'loRaWANDeviceProfile_supports32BitFCnt' - The Supports32BitFCnt value.
--
-- 'maxDutyCycle', 'loRaWANDeviceProfile_maxDutyCycle' - The MaxDutyCycle value.
--
-- 'rxDrOffset1', 'loRaWANDeviceProfile_rxDrOffset1' - The RXDROffset1 value.
--
-- 'supportsClassB', 'loRaWANDeviceProfile_supportsClassB' - The SupportsClassB value.
--
-- 'supportsJoin', 'loRaWANDeviceProfile_supportsJoin' - The SupportsJoin value.
--
-- 'rxDelay1', 'loRaWANDeviceProfile_rxDelay1' - The RXDelay1 value.
--
-- 'supportsClassC', 'loRaWANDeviceProfile_supportsClassC' - The SupportsClassC value.
--
-- 'pingSlotPeriod', 'loRaWANDeviceProfile_pingSlotPeriod' - The PingSlotPeriod value.
newLoRaWANDeviceProfile ::
  LoRaWANDeviceProfile
newLoRaWANDeviceProfile :: LoRaWANDeviceProfile
newLoRaWANDeviceProfile =
  LoRaWANDeviceProfile' :: Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe [Natural]
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Bool
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> LoRaWANDeviceProfile
LoRaWANDeviceProfile'
    { $sel:rfRegion:LoRaWANDeviceProfile' :: Maybe Text
rfRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pingSlotFreq:LoRaWANDeviceProfile' :: Maybe Natural
pingSlotFreq = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:classBTimeout:LoRaWANDeviceProfile' :: Maybe Natural
classBTimeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:maxEirp:LoRaWANDeviceProfile' :: Maybe Natural
maxEirp = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:rxDataRate2:LoRaWANDeviceProfile' :: Maybe Natural
rxDataRate2 = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:macVersion:LoRaWANDeviceProfile' :: Maybe Text
macVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:factoryPresetFreqsList:LoRaWANDeviceProfile' :: Maybe [Natural]
factoryPresetFreqsList = Maybe [Natural]
forall a. Maybe a
Prelude.Nothing,
      $sel:rxFreq2:LoRaWANDeviceProfile' :: Maybe Natural
rxFreq2 = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:classCTimeout:LoRaWANDeviceProfile' :: Maybe Natural
classCTimeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:regParamsRevision:LoRaWANDeviceProfile' :: Maybe Text
regParamsRevision = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pingSlotDr:LoRaWANDeviceProfile' :: Maybe Natural
pingSlotDr = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:supports32BitFCnt:LoRaWANDeviceProfile' :: Maybe Bool
supports32BitFCnt = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maxDutyCycle:LoRaWANDeviceProfile' :: Maybe Natural
maxDutyCycle = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:rxDrOffset1:LoRaWANDeviceProfile' :: Maybe Natural
rxDrOffset1 = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:supportsClassB:LoRaWANDeviceProfile' :: Maybe Bool
supportsClassB = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:supportsJoin:LoRaWANDeviceProfile' :: Maybe Bool
supportsJoin = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:rxDelay1:LoRaWANDeviceProfile' :: Maybe Natural
rxDelay1 = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:supportsClassC:LoRaWANDeviceProfile' :: Maybe Bool
supportsClassC = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:pingSlotPeriod:LoRaWANDeviceProfile' :: Maybe Natural
pingSlotPeriod = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The frequency band (RFRegion) value.
loRaWANDeviceProfile_rfRegion :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Text)
loRaWANDeviceProfile_rfRegion :: (Maybe Text -> f (Maybe Text))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_rfRegion = (LoRaWANDeviceProfile -> Maybe Text)
-> (LoRaWANDeviceProfile -> Maybe Text -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Text
rfRegion :: Maybe Text
$sel:rfRegion:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Text
rfRegion} -> Maybe Text
rfRegion) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Text
a -> LoRaWANDeviceProfile
s {$sel:rfRegion:LoRaWANDeviceProfile' :: Maybe Text
rfRegion = Maybe Text
a} :: LoRaWANDeviceProfile)

-- | The PingSlotFreq value.
loRaWANDeviceProfile_pingSlotFreq :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_pingSlotFreq :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_pingSlotFreq = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
pingSlotFreq :: Maybe Natural
$sel:pingSlotFreq:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
pingSlotFreq} -> Maybe Natural
pingSlotFreq) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:pingSlotFreq:LoRaWANDeviceProfile' :: Maybe Natural
pingSlotFreq = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The ClassBTimeout value.
loRaWANDeviceProfile_classBTimeout :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_classBTimeout :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_classBTimeout = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
classBTimeout :: Maybe Natural
$sel:classBTimeout:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
classBTimeout} -> Maybe Natural
classBTimeout) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:classBTimeout:LoRaWANDeviceProfile' :: Maybe Natural
classBTimeout = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The MaxEIRP value.
loRaWANDeviceProfile_maxEirp :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_maxEirp :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_maxEirp = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
maxEirp :: Maybe Natural
$sel:maxEirp:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
maxEirp} -> Maybe Natural
maxEirp) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:maxEirp:LoRaWANDeviceProfile' :: Maybe Natural
maxEirp = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The RXDataRate2 value.
loRaWANDeviceProfile_rxDataRate2 :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_rxDataRate2 :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_rxDataRate2 = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
rxDataRate2 :: Maybe Natural
$sel:rxDataRate2:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
rxDataRate2} -> Maybe Natural
rxDataRate2) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:rxDataRate2:LoRaWANDeviceProfile' :: Maybe Natural
rxDataRate2 = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The MAC version (such as OTAA 1.1 or OTAA 1.0.3) to use with this device
-- profile.
loRaWANDeviceProfile_macVersion :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Text)
loRaWANDeviceProfile_macVersion :: (Maybe Text -> f (Maybe Text))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_macVersion = (LoRaWANDeviceProfile -> Maybe Text)
-> (LoRaWANDeviceProfile -> Maybe Text -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Text
macVersion :: Maybe Text
$sel:macVersion:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Text
macVersion} -> Maybe Text
macVersion) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Text
a -> LoRaWANDeviceProfile
s {$sel:macVersion:LoRaWANDeviceProfile' :: Maybe Text
macVersion = Maybe Text
a} :: LoRaWANDeviceProfile)

-- | The list of values that make up the FactoryPresetFreqs value.
loRaWANDeviceProfile_factoryPresetFreqsList :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe [Prelude.Natural])
loRaWANDeviceProfile_factoryPresetFreqsList :: (Maybe [Natural] -> f (Maybe [Natural]))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_factoryPresetFreqsList = (LoRaWANDeviceProfile -> Maybe [Natural])
-> (LoRaWANDeviceProfile
    -> Maybe [Natural] -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe [Natural])
     (Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe [Natural]
factoryPresetFreqsList :: Maybe [Natural]
$sel:factoryPresetFreqsList:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe [Natural]
factoryPresetFreqsList} -> Maybe [Natural]
factoryPresetFreqsList) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe [Natural]
a -> LoRaWANDeviceProfile
s {$sel:factoryPresetFreqsList:LoRaWANDeviceProfile' :: Maybe [Natural]
factoryPresetFreqsList = Maybe [Natural]
a} :: LoRaWANDeviceProfile) ((Maybe [Natural] -> f (Maybe [Natural]))
 -> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
    -> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> LoRaWANDeviceProfile
-> f LoRaWANDeviceProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
     (Maybe [Natural])
     (Maybe [Natural])
     (Maybe [Natural])
     (Maybe [Natural])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The RXFreq2 value.
loRaWANDeviceProfile_rxFreq2 :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_rxFreq2 :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_rxFreq2 = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
rxFreq2 :: Maybe Natural
$sel:rxFreq2:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
rxFreq2} -> Maybe Natural
rxFreq2) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:rxFreq2:LoRaWANDeviceProfile' :: Maybe Natural
rxFreq2 = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The ClassCTimeout value.
loRaWANDeviceProfile_classCTimeout :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_classCTimeout :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_classCTimeout = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
classCTimeout :: Maybe Natural
$sel:classCTimeout:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
classCTimeout} -> Maybe Natural
classCTimeout) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:classCTimeout:LoRaWANDeviceProfile' :: Maybe Natural
classCTimeout = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The version of regional parameters.
loRaWANDeviceProfile_regParamsRevision :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Text)
loRaWANDeviceProfile_regParamsRevision :: (Maybe Text -> f (Maybe Text))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_regParamsRevision = (LoRaWANDeviceProfile -> Maybe Text)
-> (LoRaWANDeviceProfile -> Maybe Text -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Text
regParamsRevision :: Maybe Text
$sel:regParamsRevision:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Text
regParamsRevision} -> Maybe Text
regParamsRevision) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Text
a -> LoRaWANDeviceProfile
s {$sel:regParamsRevision:LoRaWANDeviceProfile' :: Maybe Text
regParamsRevision = Maybe Text
a} :: LoRaWANDeviceProfile)

-- | The PingSlotDR value.
loRaWANDeviceProfile_pingSlotDr :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_pingSlotDr :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_pingSlotDr = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
pingSlotDr :: Maybe Natural
$sel:pingSlotDr:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
pingSlotDr} -> Maybe Natural
pingSlotDr) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:pingSlotDr:LoRaWANDeviceProfile' :: Maybe Natural
pingSlotDr = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The Supports32BitFCnt value.
loRaWANDeviceProfile_supports32BitFCnt :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Bool)
loRaWANDeviceProfile_supports32BitFCnt :: (Maybe Bool -> f (Maybe Bool))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_supports32BitFCnt = (LoRaWANDeviceProfile -> Maybe Bool)
-> (LoRaWANDeviceProfile -> Maybe Bool -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Bool
supports32BitFCnt :: Maybe Bool
$sel:supports32BitFCnt:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
supports32BitFCnt} -> Maybe Bool
supports32BitFCnt) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Bool
a -> LoRaWANDeviceProfile
s {$sel:supports32BitFCnt:LoRaWANDeviceProfile' :: Maybe Bool
supports32BitFCnt = Maybe Bool
a} :: LoRaWANDeviceProfile)

-- | The MaxDutyCycle value.
loRaWANDeviceProfile_maxDutyCycle :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_maxDutyCycle :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_maxDutyCycle = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
maxDutyCycle :: Maybe Natural
$sel:maxDutyCycle:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
maxDutyCycle} -> Maybe Natural
maxDutyCycle) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:maxDutyCycle:LoRaWANDeviceProfile' :: Maybe Natural
maxDutyCycle = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The RXDROffset1 value.
loRaWANDeviceProfile_rxDrOffset1 :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_rxDrOffset1 :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_rxDrOffset1 = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
rxDrOffset1 :: Maybe Natural
$sel:rxDrOffset1:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
rxDrOffset1} -> Maybe Natural
rxDrOffset1) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:rxDrOffset1:LoRaWANDeviceProfile' :: Maybe Natural
rxDrOffset1 = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The SupportsClassB value.
loRaWANDeviceProfile_supportsClassB :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Bool)
loRaWANDeviceProfile_supportsClassB :: (Maybe Bool -> f (Maybe Bool))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_supportsClassB = (LoRaWANDeviceProfile -> Maybe Bool)
-> (LoRaWANDeviceProfile -> Maybe Bool -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Bool
supportsClassB :: Maybe Bool
$sel:supportsClassB:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
supportsClassB} -> Maybe Bool
supportsClassB) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Bool
a -> LoRaWANDeviceProfile
s {$sel:supportsClassB:LoRaWANDeviceProfile' :: Maybe Bool
supportsClassB = Maybe Bool
a} :: LoRaWANDeviceProfile)

-- | The SupportsJoin value.
loRaWANDeviceProfile_supportsJoin :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Bool)
loRaWANDeviceProfile_supportsJoin :: (Maybe Bool -> f (Maybe Bool))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_supportsJoin = (LoRaWANDeviceProfile -> Maybe Bool)
-> (LoRaWANDeviceProfile -> Maybe Bool -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Bool
supportsJoin :: Maybe Bool
$sel:supportsJoin:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
supportsJoin} -> Maybe Bool
supportsJoin) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Bool
a -> LoRaWANDeviceProfile
s {$sel:supportsJoin:LoRaWANDeviceProfile' :: Maybe Bool
supportsJoin = Maybe Bool
a} :: LoRaWANDeviceProfile)

-- | The RXDelay1 value.
loRaWANDeviceProfile_rxDelay1 :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_rxDelay1 :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_rxDelay1 = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
rxDelay1 :: Maybe Natural
$sel:rxDelay1:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
rxDelay1} -> Maybe Natural
rxDelay1) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:rxDelay1:LoRaWANDeviceProfile' :: Maybe Natural
rxDelay1 = Maybe Natural
a} :: LoRaWANDeviceProfile)

-- | The SupportsClassC value.
loRaWANDeviceProfile_supportsClassC :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Bool)
loRaWANDeviceProfile_supportsClassC :: (Maybe Bool -> f (Maybe Bool))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_supportsClassC = (LoRaWANDeviceProfile -> Maybe Bool)
-> (LoRaWANDeviceProfile -> Maybe Bool -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile LoRaWANDeviceProfile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Bool
supportsClassC :: Maybe Bool
$sel:supportsClassC:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
supportsClassC} -> Maybe Bool
supportsClassC) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Bool
a -> LoRaWANDeviceProfile
s {$sel:supportsClassC:LoRaWANDeviceProfile' :: Maybe Bool
supportsClassC = Maybe Bool
a} :: LoRaWANDeviceProfile)

-- | The PingSlotPeriod value.
loRaWANDeviceProfile_pingSlotPeriod :: Lens.Lens' LoRaWANDeviceProfile (Prelude.Maybe Prelude.Natural)
loRaWANDeviceProfile_pingSlotPeriod :: (Maybe Natural -> f (Maybe Natural))
-> LoRaWANDeviceProfile -> f LoRaWANDeviceProfile
loRaWANDeviceProfile_pingSlotPeriod = (LoRaWANDeviceProfile -> Maybe Natural)
-> (LoRaWANDeviceProfile -> Maybe Natural -> LoRaWANDeviceProfile)
-> Lens
     LoRaWANDeviceProfile
     LoRaWANDeviceProfile
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDeviceProfile' {Maybe Natural
pingSlotPeriod :: Maybe Natural
$sel:pingSlotPeriod:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
pingSlotPeriod} -> Maybe Natural
pingSlotPeriod) (\s :: LoRaWANDeviceProfile
s@LoRaWANDeviceProfile' {} Maybe Natural
a -> LoRaWANDeviceProfile
s {$sel:pingSlotPeriod:LoRaWANDeviceProfile' :: Maybe Natural
pingSlotPeriod = Maybe Natural
a} :: LoRaWANDeviceProfile)

instance Core.FromJSON LoRaWANDeviceProfile where
  parseJSON :: Value -> Parser LoRaWANDeviceProfile
parseJSON =
    String
-> (Object -> Parser LoRaWANDeviceProfile)
-> Value
-> Parser LoRaWANDeviceProfile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LoRaWANDeviceProfile"
      ( \Object
x ->
          Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe [Natural]
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Bool
-> Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> LoRaWANDeviceProfile
LoRaWANDeviceProfile'
            (Maybe Text
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe [Natural]
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Bool
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Natural
 -> Maybe Bool
 -> Maybe Natural
 -> LoRaWANDeviceProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe [Natural]
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RfRegion")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe [Natural]
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe [Natural]
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PingSlotFreq")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe [Natural]
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe [Natural]
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClassBTimeout")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe [Natural]
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe [Natural]
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxEirp")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe [Natural]
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe [Natural]
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RxDataRate2")
            Parser
  (Maybe Text
   -> Maybe [Natural]
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Natural]
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MacVersion")
            Parser
  (Maybe [Natural]
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe [Natural])
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Natural]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FactoryPresetFreqsList"
                            Parser (Maybe (Maybe [Natural]))
-> Maybe [Natural] -> Parser (Maybe [Natural])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Natural]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RxFreq2")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClassCTimeout")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RegParamsRevision")
            Parser
  (Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Bool
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PingSlotDr")
            Parser
  (Maybe Bool
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Supports32BitFCnt")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxDutyCycle")
            Parser
  (Maybe Natural
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RxDrOffset1")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe Natural
      -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SupportsClassB")
            Parser
  (Maybe Bool
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe Natural
   -> LoRaWANDeviceProfile)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Natural
      -> Maybe Bool -> Maybe Natural -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SupportsJoin")
            Parser
  (Maybe Natural
   -> Maybe Bool -> Maybe Natural -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural)
-> Parser (Maybe Bool -> Maybe Natural -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RxDelay1")
            Parser (Maybe Bool -> Maybe Natural -> LoRaWANDeviceProfile)
-> Parser (Maybe Bool)
-> Parser (Maybe Natural -> LoRaWANDeviceProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SupportsClassC")
            Parser (Maybe Natural -> LoRaWANDeviceProfile)
-> Parser (Maybe Natural) -> Parser LoRaWANDeviceProfile
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PingSlotPeriod")
      )

instance Prelude.Hashable LoRaWANDeviceProfile

instance Prelude.NFData LoRaWANDeviceProfile

instance Core.ToJSON LoRaWANDeviceProfile where
  toJSON :: LoRaWANDeviceProfile -> Value
toJSON LoRaWANDeviceProfile' {Maybe Bool
Maybe Natural
Maybe [Natural]
Maybe Text
pingSlotPeriod :: Maybe Natural
supportsClassC :: Maybe Bool
rxDelay1 :: Maybe Natural
supportsJoin :: Maybe Bool
supportsClassB :: Maybe Bool
rxDrOffset1 :: Maybe Natural
maxDutyCycle :: Maybe Natural
supports32BitFCnt :: Maybe Bool
pingSlotDr :: Maybe Natural
regParamsRevision :: Maybe Text
classCTimeout :: Maybe Natural
rxFreq2 :: Maybe Natural
factoryPresetFreqsList :: Maybe [Natural]
macVersion :: Maybe Text
rxDataRate2 :: Maybe Natural
maxEirp :: Maybe Natural
classBTimeout :: Maybe Natural
pingSlotFreq :: Maybe Natural
rfRegion :: Maybe Text
$sel:pingSlotPeriod:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:supportsClassC:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
$sel:rxDelay1:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:supportsJoin:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
$sel:supportsClassB:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
$sel:rxDrOffset1:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:maxDutyCycle:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:supports32BitFCnt:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Bool
$sel:pingSlotDr:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:regParamsRevision:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Text
$sel:classCTimeout:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:rxFreq2:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:factoryPresetFreqsList:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe [Natural]
$sel:macVersion:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Text
$sel:rxDataRate2:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:maxEirp:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:classBTimeout:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:pingSlotFreq:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Natural
$sel:rfRegion:LoRaWANDeviceProfile' :: LoRaWANDeviceProfile -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RfRegion" 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
rfRegion,
            (Text
"PingSlotFreq" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pingSlotFreq,
            (Text
"ClassBTimeout" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
classBTimeout,
            (Text
"MaxEirp" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxEirp,
            (Text
"RxDataRate2" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
rxDataRate2,
            (Text
"MacVersion" 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
macVersion,
            (Text
"FactoryPresetFreqsList" Text -> [Natural] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Natural] -> Pair) -> Maybe [Natural] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Natural]
factoryPresetFreqsList,
            (Text
"RxFreq2" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
rxFreq2,
            (Text
"ClassCTimeout" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
classCTimeout,
            (Text
"RegParamsRevision" 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
regParamsRevision,
            (Text
"PingSlotDr" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pingSlotDr,
            (Text
"Supports32BitFCnt" 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
supports32BitFCnt,
            (Text
"MaxDutyCycle" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxDutyCycle,
            (Text
"RxDrOffset1" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
rxDrOffset1,
            (Text
"SupportsClassB" 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
supportsClassB,
            (Text
"SupportsJoin" 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
supportsJoin,
            (Text
"RxDelay1" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
rxDelay1,
            (Text
"SupportsClassC" 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
supportsClassC,
            (Text
"PingSlotPeriod" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pingSlotPeriod
          ]
      )