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

import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.Types.LoRaWANUpdateGatewayTaskEntry
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | UpdateWirelessGatewayTaskEntry object.
--
-- /See:/ 'newUpdateWirelessGatewayTaskEntry' smart constructor.
data UpdateWirelessGatewayTaskEntry = UpdateWirelessGatewayTaskEntry'
  { -- | The Amazon Resource Name of the resource.
    UpdateWirelessGatewayTaskEntry -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The properties that relate to the LoRaWAN wireless gateway.
    UpdateWirelessGatewayTaskEntry
-> Maybe LoRaWANUpdateGatewayTaskEntry
loRaWAN :: Prelude.Maybe LoRaWANUpdateGatewayTaskEntry,
    -- | The ID of the new wireless gateway task entry.
    UpdateWirelessGatewayTaskEntry -> Maybe Text
id :: Prelude.Maybe Prelude.Text
  }
  deriving (UpdateWirelessGatewayTaskEntry
-> UpdateWirelessGatewayTaskEntry -> Bool
(UpdateWirelessGatewayTaskEntry
 -> UpdateWirelessGatewayTaskEntry -> Bool)
-> (UpdateWirelessGatewayTaskEntry
    -> UpdateWirelessGatewayTaskEntry -> Bool)
-> Eq UpdateWirelessGatewayTaskEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWirelessGatewayTaskEntry
-> UpdateWirelessGatewayTaskEntry -> Bool
$c/= :: UpdateWirelessGatewayTaskEntry
-> UpdateWirelessGatewayTaskEntry -> Bool
== :: UpdateWirelessGatewayTaskEntry
-> UpdateWirelessGatewayTaskEntry -> Bool
$c== :: UpdateWirelessGatewayTaskEntry
-> UpdateWirelessGatewayTaskEntry -> Bool
Prelude.Eq, ReadPrec [UpdateWirelessGatewayTaskEntry]
ReadPrec UpdateWirelessGatewayTaskEntry
Int -> ReadS UpdateWirelessGatewayTaskEntry
ReadS [UpdateWirelessGatewayTaskEntry]
(Int -> ReadS UpdateWirelessGatewayTaskEntry)
-> ReadS [UpdateWirelessGatewayTaskEntry]
-> ReadPrec UpdateWirelessGatewayTaskEntry
-> ReadPrec [UpdateWirelessGatewayTaskEntry]
-> Read UpdateWirelessGatewayTaskEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWirelessGatewayTaskEntry]
$creadListPrec :: ReadPrec [UpdateWirelessGatewayTaskEntry]
readPrec :: ReadPrec UpdateWirelessGatewayTaskEntry
$creadPrec :: ReadPrec UpdateWirelessGatewayTaskEntry
readList :: ReadS [UpdateWirelessGatewayTaskEntry]
$creadList :: ReadS [UpdateWirelessGatewayTaskEntry]
readsPrec :: Int -> ReadS UpdateWirelessGatewayTaskEntry
$creadsPrec :: Int -> ReadS UpdateWirelessGatewayTaskEntry
Prelude.Read, Int -> UpdateWirelessGatewayTaskEntry -> ShowS
[UpdateWirelessGatewayTaskEntry] -> ShowS
UpdateWirelessGatewayTaskEntry -> String
(Int -> UpdateWirelessGatewayTaskEntry -> ShowS)
-> (UpdateWirelessGatewayTaskEntry -> String)
-> ([UpdateWirelessGatewayTaskEntry] -> ShowS)
-> Show UpdateWirelessGatewayTaskEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWirelessGatewayTaskEntry] -> ShowS
$cshowList :: [UpdateWirelessGatewayTaskEntry] -> ShowS
show :: UpdateWirelessGatewayTaskEntry -> String
$cshow :: UpdateWirelessGatewayTaskEntry -> String
showsPrec :: Int -> UpdateWirelessGatewayTaskEntry -> ShowS
$cshowsPrec :: Int -> UpdateWirelessGatewayTaskEntry -> ShowS
Prelude.Show, (forall x.
 UpdateWirelessGatewayTaskEntry
 -> Rep UpdateWirelessGatewayTaskEntry x)
-> (forall x.
    Rep UpdateWirelessGatewayTaskEntry x
    -> UpdateWirelessGatewayTaskEntry)
-> Generic UpdateWirelessGatewayTaskEntry
forall x.
Rep UpdateWirelessGatewayTaskEntry x
-> UpdateWirelessGatewayTaskEntry
forall x.
UpdateWirelessGatewayTaskEntry
-> Rep UpdateWirelessGatewayTaskEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateWirelessGatewayTaskEntry x
-> UpdateWirelessGatewayTaskEntry
$cfrom :: forall x.
UpdateWirelessGatewayTaskEntry
-> Rep UpdateWirelessGatewayTaskEntry x
Prelude.Generic)

-- |
-- Create a value of 'UpdateWirelessGatewayTaskEntry' 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:
--
-- 'arn', 'updateWirelessGatewayTaskEntry_arn' - The Amazon Resource Name of the resource.
--
-- 'loRaWAN', 'updateWirelessGatewayTaskEntry_loRaWAN' - The properties that relate to the LoRaWAN wireless gateway.
--
-- 'id', 'updateWirelessGatewayTaskEntry_id' - The ID of the new wireless gateway task entry.
newUpdateWirelessGatewayTaskEntry ::
  UpdateWirelessGatewayTaskEntry
newUpdateWirelessGatewayTaskEntry :: UpdateWirelessGatewayTaskEntry
newUpdateWirelessGatewayTaskEntry =
  UpdateWirelessGatewayTaskEntry' :: Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskEntry
-> Maybe Text
-> UpdateWirelessGatewayTaskEntry
UpdateWirelessGatewayTaskEntry'
    { $sel:arn:UpdateWirelessGatewayTaskEntry' :: Maybe Text
arn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:loRaWAN:UpdateWirelessGatewayTaskEntry' :: Maybe LoRaWANUpdateGatewayTaskEntry
loRaWAN = Maybe LoRaWANUpdateGatewayTaskEntry
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdateWirelessGatewayTaskEntry' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name of the resource.
updateWirelessGatewayTaskEntry_arn :: Lens.Lens' UpdateWirelessGatewayTaskEntry (Prelude.Maybe Prelude.Text)
updateWirelessGatewayTaskEntry_arn :: (Maybe Text -> f (Maybe Text))
-> UpdateWirelessGatewayTaskEntry
-> f UpdateWirelessGatewayTaskEntry
updateWirelessGatewayTaskEntry_arn = (UpdateWirelessGatewayTaskEntry -> Maybe Text)
-> (UpdateWirelessGatewayTaskEntry
    -> Maybe Text -> UpdateWirelessGatewayTaskEntry)
-> Lens
     UpdateWirelessGatewayTaskEntry
     UpdateWirelessGatewayTaskEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWirelessGatewayTaskEntry' {Maybe Text
arn :: Maybe Text
$sel:arn:UpdateWirelessGatewayTaskEntry' :: UpdateWirelessGatewayTaskEntry -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UpdateWirelessGatewayTaskEntry
s@UpdateWirelessGatewayTaskEntry' {} Maybe Text
a -> UpdateWirelessGatewayTaskEntry
s {$sel:arn:UpdateWirelessGatewayTaskEntry' :: Maybe Text
arn = Maybe Text
a} :: UpdateWirelessGatewayTaskEntry)

-- | The properties that relate to the LoRaWAN wireless gateway.
updateWirelessGatewayTaskEntry_loRaWAN :: Lens.Lens' UpdateWirelessGatewayTaskEntry (Prelude.Maybe LoRaWANUpdateGatewayTaskEntry)
updateWirelessGatewayTaskEntry_loRaWAN :: (Maybe LoRaWANUpdateGatewayTaskEntry
 -> f (Maybe LoRaWANUpdateGatewayTaskEntry))
-> UpdateWirelessGatewayTaskEntry
-> f UpdateWirelessGatewayTaskEntry
updateWirelessGatewayTaskEntry_loRaWAN = (UpdateWirelessGatewayTaskEntry
 -> Maybe LoRaWANUpdateGatewayTaskEntry)
-> (UpdateWirelessGatewayTaskEntry
    -> Maybe LoRaWANUpdateGatewayTaskEntry
    -> UpdateWirelessGatewayTaskEntry)
-> Lens
     UpdateWirelessGatewayTaskEntry
     UpdateWirelessGatewayTaskEntry
     (Maybe LoRaWANUpdateGatewayTaskEntry)
     (Maybe LoRaWANUpdateGatewayTaskEntry)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWirelessGatewayTaskEntry' {Maybe LoRaWANUpdateGatewayTaskEntry
loRaWAN :: Maybe LoRaWANUpdateGatewayTaskEntry
$sel:loRaWAN:UpdateWirelessGatewayTaskEntry' :: UpdateWirelessGatewayTaskEntry
-> Maybe LoRaWANUpdateGatewayTaskEntry
loRaWAN} -> Maybe LoRaWANUpdateGatewayTaskEntry
loRaWAN) (\s :: UpdateWirelessGatewayTaskEntry
s@UpdateWirelessGatewayTaskEntry' {} Maybe LoRaWANUpdateGatewayTaskEntry
a -> UpdateWirelessGatewayTaskEntry
s {$sel:loRaWAN:UpdateWirelessGatewayTaskEntry' :: Maybe LoRaWANUpdateGatewayTaskEntry
loRaWAN = Maybe LoRaWANUpdateGatewayTaskEntry
a} :: UpdateWirelessGatewayTaskEntry)

-- | The ID of the new wireless gateway task entry.
updateWirelessGatewayTaskEntry_id :: Lens.Lens' UpdateWirelessGatewayTaskEntry (Prelude.Maybe Prelude.Text)
updateWirelessGatewayTaskEntry_id :: (Maybe Text -> f (Maybe Text))
-> UpdateWirelessGatewayTaskEntry
-> f UpdateWirelessGatewayTaskEntry
updateWirelessGatewayTaskEntry_id = (UpdateWirelessGatewayTaskEntry -> Maybe Text)
-> (UpdateWirelessGatewayTaskEntry
    -> Maybe Text -> UpdateWirelessGatewayTaskEntry)
-> Lens
     UpdateWirelessGatewayTaskEntry
     UpdateWirelessGatewayTaskEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWirelessGatewayTaskEntry' {Maybe Text
id :: Maybe Text
$sel:id:UpdateWirelessGatewayTaskEntry' :: UpdateWirelessGatewayTaskEntry -> Maybe Text
id} -> Maybe Text
id) (\s :: UpdateWirelessGatewayTaskEntry
s@UpdateWirelessGatewayTaskEntry' {} Maybe Text
a -> UpdateWirelessGatewayTaskEntry
s {$sel:id:UpdateWirelessGatewayTaskEntry' :: Maybe Text
id = Maybe Text
a} :: UpdateWirelessGatewayTaskEntry)

instance Core.FromJSON UpdateWirelessGatewayTaskEntry where
  parseJSON :: Value -> Parser UpdateWirelessGatewayTaskEntry
parseJSON =
    String
-> (Object -> Parser UpdateWirelessGatewayTaskEntry)
-> Value
-> Parser UpdateWirelessGatewayTaskEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"UpdateWirelessGatewayTaskEntry"
      ( \Object
x ->
          Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskEntry
-> Maybe Text
-> UpdateWirelessGatewayTaskEntry
UpdateWirelessGatewayTaskEntry'
            (Maybe Text
 -> Maybe LoRaWANUpdateGatewayTaskEntry
 -> Maybe Text
 -> UpdateWirelessGatewayTaskEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe LoRaWANUpdateGatewayTaskEntry
      -> Maybe Text -> UpdateWirelessGatewayTaskEntry)
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
"Arn")
            Parser
  (Maybe LoRaWANUpdateGatewayTaskEntry
   -> Maybe Text -> UpdateWirelessGatewayTaskEntry)
-> Parser (Maybe LoRaWANUpdateGatewayTaskEntry)
-> Parser (Maybe Text -> UpdateWirelessGatewayTaskEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoRaWANUpdateGatewayTaskEntry)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoRaWAN")
            Parser (Maybe Text -> UpdateWirelessGatewayTaskEntry)
-> Parser (Maybe Text) -> Parser UpdateWirelessGatewayTaskEntry
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
"Id")
      )

instance
  Prelude.Hashable
    UpdateWirelessGatewayTaskEntry

instance
  Prelude.NFData
    UpdateWirelessGatewayTaskEntry