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

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

-- | LoRaWAN object for list functions.
--
-- /See:/ 'newLoRaWANListDevice' smart constructor.
data LoRaWANListDevice = LoRaWANListDevice'
  { -- | The DevEUI value.
    LoRaWANListDevice -> Maybe Text
devEui :: Prelude.Maybe Prelude.Text
  }
  deriving (LoRaWANListDevice -> LoRaWANListDevice -> Bool
(LoRaWANListDevice -> LoRaWANListDevice -> Bool)
-> (LoRaWANListDevice -> LoRaWANListDevice -> Bool)
-> Eq LoRaWANListDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoRaWANListDevice -> LoRaWANListDevice -> Bool
$c/= :: LoRaWANListDevice -> LoRaWANListDevice -> Bool
== :: LoRaWANListDevice -> LoRaWANListDevice -> Bool
$c== :: LoRaWANListDevice -> LoRaWANListDevice -> Bool
Prelude.Eq, ReadPrec [LoRaWANListDevice]
ReadPrec LoRaWANListDevice
Int -> ReadS LoRaWANListDevice
ReadS [LoRaWANListDevice]
(Int -> ReadS LoRaWANListDevice)
-> ReadS [LoRaWANListDevice]
-> ReadPrec LoRaWANListDevice
-> ReadPrec [LoRaWANListDevice]
-> Read LoRaWANListDevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoRaWANListDevice]
$creadListPrec :: ReadPrec [LoRaWANListDevice]
readPrec :: ReadPrec LoRaWANListDevice
$creadPrec :: ReadPrec LoRaWANListDevice
readList :: ReadS [LoRaWANListDevice]
$creadList :: ReadS [LoRaWANListDevice]
readsPrec :: Int -> ReadS LoRaWANListDevice
$creadsPrec :: Int -> ReadS LoRaWANListDevice
Prelude.Read, Int -> LoRaWANListDevice -> ShowS
[LoRaWANListDevice] -> ShowS
LoRaWANListDevice -> String
(Int -> LoRaWANListDevice -> ShowS)
-> (LoRaWANListDevice -> String)
-> ([LoRaWANListDevice] -> ShowS)
-> Show LoRaWANListDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoRaWANListDevice] -> ShowS
$cshowList :: [LoRaWANListDevice] -> ShowS
show :: LoRaWANListDevice -> String
$cshow :: LoRaWANListDevice -> String
showsPrec :: Int -> LoRaWANListDevice -> ShowS
$cshowsPrec :: Int -> LoRaWANListDevice -> ShowS
Prelude.Show, (forall x. LoRaWANListDevice -> Rep LoRaWANListDevice x)
-> (forall x. Rep LoRaWANListDevice x -> LoRaWANListDevice)
-> Generic LoRaWANListDevice
forall x. Rep LoRaWANListDevice x -> LoRaWANListDevice
forall x. LoRaWANListDevice -> Rep LoRaWANListDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LoRaWANListDevice x -> LoRaWANListDevice
$cfrom :: forall x. LoRaWANListDevice -> Rep LoRaWANListDevice x
Prelude.Generic)

-- |
-- Create a value of 'LoRaWANListDevice' 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:
--
-- 'devEui', 'loRaWANListDevice_devEui' - The DevEUI value.
newLoRaWANListDevice ::
  LoRaWANListDevice
newLoRaWANListDevice :: LoRaWANListDevice
newLoRaWANListDevice =
  LoRaWANListDevice' :: Maybe Text -> LoRaWANListDevice
LoRaWANListDevice' {$sel:devEui:LoRaWANListDevice' :: Maybe Text
devEui = Maybe Text
forall a. Maybe a
Prelude.Nothing}

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

instance Core.FromJSON LoRaWANListDevice where
  parseJSON :: Value -> Parser LoRaWANListDevice
parseJSON =
    String
-> (Object -> Parser LoRaWANListDevice)
-> Value
-> Parser LoRaWANListDevice
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LoRaWANListDevice"
      ( \Object
x ->
          Maybe Text -> LoRaWANListDevice
LoRaWANListDevice' (Maybe Text -> LoRaWANListDevice)
-> Parser (Maybe Text) -> Parser LoRaWANListDevice
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
"DevEui")
      )

instance Prelude.Hashable LoRaWANListDevice

instance Prelude.NFData LoRaWANListDevice