{-# 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.LoRaWANDevice
-- 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.LoRaWANDevice where

import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.Types.AbpV1_0_x
import Amazonka.IoTWireless.Types.AbpV1_1
import Amazonka.IoTWireless.Types.OtaaV1_0_x
import Amazonka.IoTWireless.Types.OtaaV1_1
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | LoRaWAN object for create functions.
--
-- /See:/ 'newLoRaWANDevice' smart constructor.
data LoRaWANDevice = LoRaWANDevice'
  { -- | LoRaWAN object for create APIs
    LoRaWANDevice -> Maybe AbpV1_0_x
abpV1_0_x :: Prelude.Maybe AbpV1_0_x,
    -- | OTAA device object for v1.1 for create APIs
    LoRaWANDevice -> Maybe OtaaV1_1
otaaV1_1 :: Prelude.Maybe OtaaV1_1,
    -- | The ID of the service profile.
    LoRaWANDevice -> Maybe Text
serviceProfileId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the device profile for the new wireless device.
    LoRaWANDevice -> Maybe Text
deviceProfileId :: Prelude.Maybe Prelude.Text,
    -- | OTAA device object for create APIs for v1.0.x
    LoRaWANDevice -> Maybe OtaaV1_0_x
otaaV1_0_x :: Prelude.Maybe OtaaV1_0_x,
    -- | ABP device object for create APIs for v1.1
    LoRaWANDevice -> Maybe AbpV1_1
abpV1_1 :: Prelude.Maybe AbpV1_1,
    -- | The DevEUI value.
    LoRaWANDevice -> Maybe Text
devEui :: Prelude.Maybe Prelude.Text
  }
  deriving (LoRaWANDevice -> LoRaWANDevice -> Bool
(LoRaWANDevice -> LoRaWANDevice -> Bool)
-> (LoRaWANDevice -> LoRaWANDevice -> Bool) -> Eq LoRaWANDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANDevice -> LoRaWANDevice -> Bool
$c/= :: LoRaWANDevice -> LoRaWANDevice -> Bool
== :: LoRaWANDevice -> LoRaWANDevice -> Bool
$c== :: LoRaWANDevice -> LoRaWANDevice -> Bool
Prelude.Eq, ReadPrec [LoRaWANDevice]
ReadPrec LoRaWANDevice
Int -> ReadS LoRaWANDevice
ReadS [LoRaWANDevice]
(Int -> ReadS LoRaWANDevice)
-> ReadS [LoRaWANDevice]
-> ReadPrec LoRaWANDevice
-> ReadPrec [LoRaWANDevice]
-> Read LoRaWANDevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANDevice]
$creadListPrec :: ReadPrec [LoRaWANDevice]
readPrec :: ReadPrec LoRaWANDevice
$creadPrec :: ReadPrec LoRaWANDevice
readList :: ReadS [LoRaWANDevice]
$creadList :: ReadS [LoRaWANDevice]
readsPrec :: Int -> ReadS LoRaWANDevice
$creadsPrec :: Int -> ReadS LoRaWANDevice
Prelude.Read, Int -> LoRaWANDevice -> ShowS
[LoRaWANDevice] -> ShowS
LoRaWANDevice -> String
(Int -> LoRaWANDevice -> ShowS)
-> (LoRaWANDevice -> String)
-> ([LoRaWANDevice] -> ShowS)
-> Show LoRaWANDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANDevice] -> ShowS
$cshowList :: [LoRaWANDevice] -> ShowS
show :: LoRaWANDevice -> String
$cshow :: LoRaWANDevice -> String
showsPrec :: Int -> LoRaWANDevice -> ShowS
$cshowsPrec :: Int -> LoRaWANDevice -> ShowS
Prelude.Show, (forall x. LoRaWANDevice -> Rep LoRaWANDevice x)
-> (forall x. Rep LoRaWANDevice x -> LoRaWANDevice)
-> Generic LoRaWANDevice
forall x. Rep LoRaWANDevice x -> LoRaWANDevice
forall x. LoRaWANDevice -> Rep LoRaWANDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LoRaWANDevice x -> LoRaWANDevice
$cfrom :: forall x. LoRaWANDevice -> Rep LoRaWANDevice x
Prelude.Generic)

-- |
-- Create a value of 'LoRaWANDevice' 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:
--
-- 'abpV1_0_x', 'loRaWANDevice_abpV1_0_x' - LoRaWAN object for create APIs
--
-- 'otaaV1_1', 'loRaWANDevice_otaaV1_1' - OTAA device object for v1.1 for create APIs
--
-- 'serviceProfileId', 'loRaWANDevice_serviceProfileId' - The ID of the service profile.
--
-- 'deviceProfileId', 'loRaWANDevice_deviceProfileId' - The ID of the device profile for the new wireless device.
--
-- 'otaaV1_0_x', 'loRaWANDevice_otaaV1_0_x' - OTAA device object for create APIs for v1.0.x
--
-- 'abpV1_1', 'loRaWANDevice_abpV1_1' - ABP device object for create APIs for v1.1
--
-- 'devEui', 'loRaWANDevice_devEui' - The DevEUI value.
newLoRaWANDevice ::
  LoRaWANDevice
newLoRaWANDevice :: LoRaWANDevice
newLoRaWANDevice =
  LoRaWANDevice' :: Maybe AbpV1_0_x
-> Maybe OtaaV1_1
-> Maybe Text
-> Maybe Text
-> Maybe OtaaV1_0_x
-> Maybe AbpV1_1
-> Maybe Text
-> LoRaWANDevice
LoRaWANDevice'
    { $sel:abpV1_0_x:LoRaWANDevice' :: Maybe AbpV1_0_x
abpV1_0_x = Maybe AbpV1_0_x
forall a. Maybe a
Prelude.Nothing,
      $sel:otaaV1_1:LoRaWANDevice' :: Maybe OtaaV1_1
otaaV1_1 = Maybe OtaaV1_1
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceProfileId:LoRaWANDevice' :: Maybe Text
serviceProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceProfileId:LoRaWANDevice' :: Maybe Text
deviceProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:otaaV1_0_x:LoRaWANDevice' :: Maybe OtaaV1_0_x
otaaV1_0_x = Maybe OtaaV1_0_x
forall a. Maybe a
Prelude.Nothing,
      $sel:abpV1_1:LoRaWANDevice' :: Maybe AbpV1_1
abpV1_1 = Maybe AbpV1_1
forall a. Maybe a
Prelude.Nothing,
      $sel:devEui:LoRaWANDevice' :: Maybe Text
devEui = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | LoRaWAN object for create APIs
loRaWANDevice_abpV1_0_x :: Lens.Lens' LoRaWANDevice (Prelude.Maybe AbpV1_0_x)
loRaWANDevice_abpV1_0_x :: (Maybe AbpV1_0_x -> f (Maybe AbpV1_0_x))
-> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_abpV1_0_x = (LoRaWANDevice -> Maybe AbpV1_0_x)
-> (LoRaWANDevice -> Maybe AbpV1_0_x -> LoRaWANDevice)
-> Lens
     LoRaWANDevice LoRaWANDevice (Maybe AbpV1_0_x) (Maybe AbpV1_0_x)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe AbpV1_0_x
abpV1_0_x :: Maybe AbpV1_0_x
$sel:abpV1_0_x:LoRaWANDevice' :: LoRaWANDevice -> Maybe AbpV1_0_x
abpV1_0_x} -> Maybe AbpV1_0_x
abpV1_0_x) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe AbpV1_0_x
a -> LoRaWANDevice
s {$sel:abpV1_0_x:LoRaWANDevice' :: Maybe AbpV1_0_x
abpV1_0_x = Maybe AbpV1_0_x
a} :: LoRaWANDevice)

-- | OTAA device object for v1.1 for create APIs
loRaWANDevice_otaaV1_1 :: Lens.Lens' LoRaWANDevice (Prelude.Maybe OtaaV1_1)
loRaWANDevice_otaaV1_1 :: (Maybe OtaaV1_1 -> f (Maybe OtaaV1_1))
-> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_otaaV1_1 = (LoRaWANDevice -> Maybe OtaaV1_1)
-> (LoRaWANDevice -> Maybe OtaaV1_1 -> LoRaWANDevice)
-> Lens
     LoRaWANDevice LoRaWANDevice (Maybe OtaaV1_1) (Maybe OtaaV1_1)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe OtaaV1_1
otaaV1_1 :: Maybe OtaaV1_1
$sel:otaaV1_1:LoRaWANDevice' :: LoRaWANDevice -> Maybe OtaaV1_1
otaaV1_1} -> Maybe OtaaV1_1
otaaV1_1) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe OtaaV1_1
a -> LoRaWANDevice
s {$sel:otaaV1_1:LoRaWANDevice' :: Maybe OtaaV1_1
otaaV1_1 = Maybe OtaaV1_1
a} :: LoRaWANDevice)

-- | The ID of the service profile.
loRaWANDevice_serviceProfileId :: Lens.Lens' LoRaWANDevice (Prelude.Maybe Prelude.Text)
loRaWANDevice_serviceProfileId :: (Maybe Text -> f (Maybe Text)) -> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_serviceProfileId = (LoRaWANDevice -> Maybe Text)
-> (LoRaWANDevice -> Maybe Text -> LoRaWANDevice)
-> Lens LoRaWANDevice LoRaWANDevice (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe Text
serviceProfileId :: Maybe Text
$sel:serviceProfileId:LoRaWANDevice' :: LoRaWANDevice -> Maybe Text
serviceProfileId} -> Maybe Text
serviceProfileId) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe Text
a -> LoRaWANDevice
s {$sel:serviceProfileId:LoRaWANDevice' :: Maybe Text
serviceProfileId = Maybe Text
a} :: LoRaWANDevice)

-- | The ID of the device profile for the new wireless device.
loRaWANDevice_deviceProfileId :: Lens.Lens' LoRaWANDevice (Prelude.Maybe Prelude.Text)
loRaWANDevice_deviceProfileId :: (Maybe Text -> f (Maybe Text)) -> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_deviceProfileId = (LoRaWANDevice -> Maybe Text)
-> (LoRaWANDevice -> Maybe Text -> LoRaWANDevice)
-> Lens LoRaWANDevice LoRaWANDevice (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe Text
deviceProfileId :: Maybe Text
$sel:deviceProfileId:LoRaWANDevice' :: LoRaWANDevice -> Maybe Text
deviceProfileId} -> Maybe Text
deviceProfileId) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe Text
a -> LoRaWANDevice
s {$sel:deviceProfileId:LoRaWANDevice' :: Maybe Text
deviceProfileId = Maybe Text
a} :: LoRaWANDevice)

-- | OTAA device object for create APIs for v1.0.x
loRaWANDevice_otaaV1_0_x :: Lens.Lens' LoRaWANDevice (Prelude.Maybe OtaaV1_0_x)
loRaWANDevice_otaaV1_0_x :: (Maybe OtaaV1_0_x -> f (Maybe OtaaV1_0_x))
-> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_otaaV1_0_x = (LoRaWANDevice -> Maybe OtaaV1_0_x)
-> (LoRaWANDevice -> Maybe OtaaV1_0_x -> LoRaWANDevice)
-> Lens
     LoRaWANDevice LoRaWANDevice (Maybe OtaaV1_0_x) (Maybe OtaaV1_0_x)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe OtaaV1_0_x
otaaV1_0_x :: Maybe OtaaV1_0_x
$sel:otaaV1_0_x:LoRaWANDevice' :: LoRaWANDevice -> Maybe OtaaV1_0_x
otaaV1_0_x} -> Maybe OtaaV1_0_x
otaaV1_0_x) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe OtaaV1_0_x
a -> LoRaWANDevice
s {$sel:otaaV1_0_x:LoRaWANDevice' :: Maybe OtaaV1_0_x
otaaV1_0_x = Maybe OtaaV1_0_x
a} :: LoRaWANDevice)

-- | ABP device object for create APIs for v1.1
loRaWANDevice_abpV1_1 :: Lens.Lens' LoRaWANDevice (Prelude.Maybe AbpV1_1)
loRaWANDevice_abpV1_1 :: (Maybe AbpV1_1 -> f (Maybe AbpV1_1))
-> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_abpV1_1 = (LoRaWANDevice -> Maybe AbpV1_1)
-> (LoRaWANDevice -> Maybe AbpV1_1 -> LoRaWANDevice)
-> Lens LoRaWANDevice LoRaWANDevice (Maybe AbpV1_1) (Maybe AbpV1_1)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe AbpV1_1
abpV1_1 :: Maybe AbpV1_1
$sel:abpV1_1:LoRaWANDevice' :: LoRaWANDevice -> Maybe AbpV1_1
abpV1_1} -> Maybe AbpV1_1
abpV1_1) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe AbpV1_1
a -> LoRaWANDevice
s {$sel:abpV1_1:LoRaWANDevice' :: Maybe AbpV1_1
abpV1_1 = Maybe AbpV1_1
a} :: LoRaWANDevice)

-- | The DevEUI value.
loRaWANDevice_devEui :: Lens.Lens' LoRaWANDevice (Prelude.Maybe Prelude.Text)
loRaWANDevice_devEui :: (Maybe Text -> f (Maybe Text)) -> LoRaWANDevice -> f LoRaWANDevice
loRaWANDevice_devEui = (LoRaWANDevice -> Maybe Text)
-> (LoRaWANDevice -> Maybe Text -> LoRaWANDevice)
-> Lens LoRaWANDevice LoRaWANDevice (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoRaWANDevice' {Maybe Text
devEui :: Maybe Text
$sel:devEui:LoRaWANDevice' :: LoRaWANDevice -> Maybe Text
devEui} -> Maybe Text
devEui) (\s :: LoRaWANDevice
s@LoRaWANDevice' {} Maybe Text
a -> LoRaWANDevice
s {$sel:devEui:LoRaWANDevice' :: Maybe Text
devEui = Maybe Text
a} :: LoRaWANDevice)

instance Core.FromJSON LoRaWANDevice where
  parseJSON :: Value -> Parser LoRaWANDevice
parseJSON =
    String
-> (Object -> Parser LoRaWANDevice)
-> Value
-> Parser LoRaWANDevice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LoRaWANDevice"
      ( \Object
x ->
          Maybe AbpV1_0_x
-> Maybe OtaaV1_1
-> Maybe Text
-> Maybe Text
-> Maybe OtaaV1_0_x
-> Maybe AbpV1_1
-> Maybe Text
-> LoRaWANDevice
LoRaWANDevice'
            (Maybe AbpV1_0_x
 -> Maybe OtaaV1_1
 -> Maybe Text
 -> Maybe Text
 -> Maybe OtaaV1_0_x
 -> Maybe AbpV1_1
 -> Maybe Text
 -> LoRaWANDevice)
-> Parser (Maybe AbpV1_0_x)
-> Parser
     (Maybe OtaaV1_1
      -> Maybe Text
      -> Maybe Text
      -> Maybe OtaaV1_0_x
      -> Maybe AbpV1_1
      -> Maybe Text
      -> LoRaWANDevice)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AbpV1_0_x)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AbpV1_0_x")
            Parser
  (Maybe OtaaV1_1
   -> Maybe Text
   -> Maybe Text
   -> Maybe OtaaV1_0_x
   -> Maybe AbpV1_1
   -> Maybe Text
   -> LoRaWANDevice)
-> Parser (Maybe OtaaV1_1)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe OtaaV1_0_x
      -> Maybe AbpV1_1
      -> Maybe Text
      -> LoRaWANDevice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OtaaV1_1)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OtaaV1_1")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe OtaaV1_0_x
   -> Maybe AbpV1_1
   -> Maybe Text
   -> LoRaWANDevice)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe OtaaV1_0_x
      -> Maybe AbpV1_1
      -> Maybe Text
      -> LoRaWANDevice)
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
"ServiceProfileId")
            Parser
  (Maybe Text
   -> Maybe OtaaV1_0_x
   -> Maybe AbpV1_1
   -> Maybe Text
   -> LoRaWANDevice)
-> Parser (Maybe Text)
-> Parser
     (Maybe OtaaV1_0_x -> Maybe AbpV1_1 -> Maybe Text -> LoRaWANDevice)
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
"DeviceProfileId")
            Parser
  (Maybe OtaaV1_0_x -> Maybe AbpV1_1 -> Maybe Text -> LoRaWANDevice)
-> Parser (Maybe OtaaV1_0_x)
-> Parser (Maybe AbpV1_1 -> Maybe Text -> LoRaWANDevice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OtaaV1_0_x)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OtaaV1_0_x")
            Parser (Maybe AbpV1_1 -> Maybe Text -> LoRaWANDevice)
-> Parser (Maybe AbpV1_1) -> Parser (Maybe Text -> LoRaWANDevice)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AbpV1_1)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AbpV1_1")
            Parser (Maybe Text -> LoRaWANDevice)
-> Parser (Maybe Text) -> Parser LoRaWANDevice
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
"DevEui")
      )

instance Prelude.Hashable LoRaWANDevice

instance Prelude.NFData LoRaWANDevice

instance Core.ToJSON LoRaWANDevice where
  toJSON :: LoRaWANDevice -> Value
toJSON LoRaWANDevice' {Maybe Text
Maybe OtaaV1_0_x
Maybe OtaaV1_1
Maybe AbpV1_0_x
Maybe AbpV1_1
devEui :: Maybe Text
abpV1_1 :: Maybe AbpV1_1
otaaV1_0_x :: Maybe OtaaV1_0_x
deviceProfileId :: Maybe Text
serviceProfileId :: Maybe Text
otaaV1_1 :: Maybe OtaaV1_1
abpV1_0_x :: Maybe AbpV1_0_x
$sel:devEui:LoRaWANDevice' :: LoRaWANDevice -> Maybe Text
$sel:abpV1_1:LoRaWANDevice' :: LoRaWANDevice -> Maybe AbpV1_1
$sel:otaaV1_0_x:LoRaWANDevice' :: LoRaWANDevice -> Maybe OtaaV1_0_x
$sel:deviceProfileId:LoRaWANDevice' :: LoRaWANDevice -> Maybe Text
$sel:serviceProfileId:LoRaWANDevice' :: LoRaWANDevice -> Maybe Text
$sel:otaaV1_1:LoRaWANDevice' :: LoRaWANDevice -> Maybe OtaaV1_1
$sel:abpV1_0_x:LoRaWANDevice' :: LoRaWANDevice -> Maybe AbpV1_0_x
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AbpV1_0_x" Text -> AbpV1_0_x -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AbpV1_0_x -> Pair) -> Maybe AbpV1_0_x -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AbpV1_0_x
abpV1_0_x,
            (Text
"OtaaV1_1" Text -> OtaaV1_1 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OtaaV1_1 -> Pair) -> Maybe OtaaV1_1 -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OtaaV1_1
otaaV1_1,
            (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,
            (Text
"OtaaV1_0_x" Text -> OtaaV1_0_x -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OtaaV1_0_x -> Pair) -> Maybe OtaaV1_0_x -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OtaaV1_0_x
otaaV1_0_x,
            (Text
"AbpV1_1" Text -> AbpV1_1 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AbpV1_1 -> Pair) -> Maybe AbpV1_1 -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AbpV1_1
abpV1_1,
            (Text
"DevEui" 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
devEui
          ]
      )