{-# 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.UpdateWirelessGatewayTaskCreate where
import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.Types.LoRaWANUpdateGatewayTaskCreate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateWirelessGatewayTaskCreate = UpdateWirelessGatewayTaskCreate'
{
UpdateWirelessGatewayTaskCreate -> Maybe Text
updateDataSource :: Prelude.Maybe Prelude.Text,
UpdateWirelessGatewayTaskCreate -> Maybe Text
updateDataRole :: Prelude.Maybe Prelude.Text,
UpdateWirelessGatewayTaskCreate
-> Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN :: Prelude.Maybe LoRaWANUpdateGatewayTaskCreate
}
deriving (UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool
(UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool)
-> (UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool)
-> Eq UpdateWirelessGatewayTaskCreate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool
$c/= :: UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool
== :: UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool
$c== :: UpdateWirelessGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate -> Bool
Prelude.Eq, ReadPrec [UpdateWirelessGatewayTaskCreate]
ReadPrec UpdateWirelessGatewayTaskCreate
Int -> ReadS UpdateWirelessGatewayTaskCreate
ReadS [UpdateWirelessGatewayTaskCreate]
(Int -> ReadS UpdateWirelessGatewayTaskCreate)
-> ReadS [UpdateWirelessGatewayTaskCreate]
-> ReadPrec UpdateWirelessGatewayTaskCreate
-> ReadPrec [UpdateWirelessGatewayTaskCreate]
-> Read UpdateWirelessGatewayTaskCreate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWirelessGatewayTaskCreate]
$creadListPrec :: ReadPrec [UpdateWirelessGatewayTaskCreate]
readPrec :: ReadPrec UpdateWirelessGatewayTaskCreate
$creadPrec :: ReadPrec UpdateWirelessGatewayTaskCreate
readList :: ReadS [UpdateWirelessGatewayTaskCreate]
$creadList :: ReadS [UpdateWirelessGatewayTaskCreate]
readsPrec :: Int -> ReadS UpdateWirelessGatewayTaskCreate
$creadsPrec :: Int -> ReadS UpdateWirelessGatewayTaskCreate
Prelude.Read, Int -> UpdateWirelessGatewayTaskCreate -> ShowS
[UpdateWirelessGatewayTaskCreate] -> ShowS
UpdateWirelessGatewayTaskCreate -> String
(Int -> UpdateWirelessGatewayTaskCreate -> ShowS)
-> (UpdateWirelessGatewayTaskCreate -> String)
-> ([UpdateWirelessGatewayTaskCreate] -> ShowS)
-> Show UpdateWirelessGatewayTaskCreate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWirelessGatewayTaskCreate] -> ShowS
$cshowList :: [UpdateWirelessGatewayTaskCreate] -> ShowS
show :: UpdateWirelessGatewayTaskCreate -> String
$cshow :: UpdateWirelessGatewayTaskCreate -> String
showsPrec :: Int -> UpdateWirelessGatewayTaskCreate -> ShowS
$cshowsPrec :: Int -> UpdateWirelessGatewayTaskCreate -> ShowS
Prelude.Show, (forall x.
UpdateWirelessGatewayTaskCreate
-> Rep UpdateWirelessGatewayTaskCreate x)
-> (forall x.
Rep UpdateWirelessGatewayTaskCreate x
-> UpdateWirelessGatewayTaskCreate)
-> Generic UpdateWirelessGatewayTaskCreate
forall x.
Rep UpdateWirelessGatewayTaskCreate x
-> UpdateWirelessGatewayTaskCreate
forall x.
UpdateWirelessGatewayTaskCreate
-> Rep UpdateWirelessGatewayTaskCreate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateWirelessGatewayTaskCreate x
-> UpdateWirelessGatewayTaskCreate
$cfrom :: forall x.
UpdateWirelessGatewayTaskCreate
-> Rep UpdateWirelessGatewayTaskCreate x
Prelude.Generic)
newUpdateWirelessGatewayTaskCreate ::
UpdateWirelessGatewayTaskCreate
newUpdateWirelessGatewayTaskCreate :: UpdateWirelessGatewayTaskCreate
newUpdateWirelessGatewayTaskCreate =
UpdateWirelessGatewayTaskCreate' :: Maybe Text
-> Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate
UpdateWirelessGatewayTaskCreate'
{ $sel:updateDataSource:UpdateWirelessGatewayTaskCreate' :: Maybe Text
updateDataSource =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updateDataRole:UpdateWirelessGatewayTaskCreate' :: Maybe Text
updateDataRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:loRaWAN:UpdateWirelessGatewayTaskCreate' :: Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN = Maybe LoRaWANUpdateGatewayTaskCreate
forall a. Maybe a
Prelude.Nothing
}
updateWirelessGatewayTaskCreate_updateDataSource :: Lens.Lens' UpdateWirelessGatewayTaskCreate (Prelude.Maybe Prelude.Text)
updateWirelessGatewayTaskCreate_updateDataSource :: (Maybe Text -> f (Maybe Text))
-> UpdateWirelessGatewayTaskCreate
-> f UpdateWirelessGatewayTaskCreate
updateWirelessGatewayTaskCreate_updateDataSource = (UpdateWirelessGatewayTaskCreate -> Maybe Text)
-> (UpdateWirelessGatewayTaskCreate
-> Maybe Text -> UpdateWirelessGatewayTaskCreate)
-> Lens
UpdateWirelessGatewayTaskCreate
UpdateWirelessGatewayTaskCreate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWirelessGatewayTaskCreate' {Maybe Text
updateDataSource :: Maybe Text
$sel:updateDataSource:UpdateWirelessGatewayTaskCreate' :: UpdateWirelessGatewayTaskCreate -> Maybe Text
updateDataSource} -> Maybe Text
updateDataSource) (\s :: UpdateWirelessGatewayTaskCreate
s@UpdateWirelessGatewayTaskCreate' {} Maybe Text
a -> UpdateWirelessGatewayTaskCreate
s {$sel:updateDataSource:UpdateWirelessGatewayTaskCreate' :: Maybe Text
updateDataSource = Maybe Text
a} :: UpdateWirelessGatewayTaskCreate)
updateWirelessGatewayTaskCreate_updateDataRole :: Lens.Lens' UpdateWirelessGatewayTaskCreate (Prelude.Maybe Prelude.Text)
updateWirelessGatewayTaskCreate_updateDataRole :: (Maybe Text -> f (Maybe Text))
-> UpdateWirelessGatewayTaskCreate
-> f UpdateWirelessGatewayTaskCreate
updateWirelessGatewayTaskCreate_updateDataRole = (UpdateWirelessGatewayTaskCreate -> Maybe Text)
-> (UpdateWirelessGatewayTaskCreate
-> Maybe Text -> UpdateWirelessGatewayTaskCreate)
-> Lens
UpdateWirelessGatewayTaskCreate
UpdateWirelessGatewayTaskCreate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWirelessGatewayTaskCreate' {Maybe Text
updateDataRole :: Maybe Text
$sel:updateDataRole:UpdateWirelessGatewayTaskCreate' :: UpdateWirelessGatewayTaskCreate -> Maybe Text
updateDataRole} -> Maybe Text
updateDataRole) (\s :: UpdateWirelessGatewayTaskCreate
s@UpdateWirelessGatewayTaskCreate' {} Maybe Text
a -> UpdateWirelessGatewayTaskCreate
s {$sel:updateDataRole:UpdateWirelessGatewayTaskCreate' :: Maybe Text
updateDataRole = Maybe Text
a} :: UpdateWirelessGatewayTaskCreate)
updateWirelessGatewayTaskCreate_loRaWAN :: Lens.Lens' UpdateWirelessGatewayTaskCreate (Prelude.Maybe LoRaWANUpdateGatewayTaskCreate)
updateWirelessGatewayTaskCreate_loRaWAN :: (Maybe LoRaWANUpdateGatewayTaskCreate
-> f (Maybe LoRaWANUpdateGatewayTaskCreate))
-> UpdateWirelessGatewayTaskCreate
-> f UpdateWirelessGatewayTaskCreate
updateWirelessGatewayTaskCreate_loRaWAN = (UpdateWirelessGatewayTaskCreate
-> Maybe LoRaWANUpdateGatewayTaskCreate)
-> (UpdateWirelessGatewayTaskCreate
-> Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate)
-> Lens
UpdateWirelessGatewayTaskCreate
UpdateWirelessGatewayTaskCreate
(Maybe LoRaWANUpdateGatewayTaskCreate)
(Maybe LoRaWANUpdateGatewayTaskCreate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWirelessGatewayTaskCreate' {Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN :: Maybe LoRaWANUpdateGatewayTaskCreate
$sel:loRaWAN:UpdateWirelessGatewayTaskCreate' :: UpdateWirelessGatewayTaskCreate
-> Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN} -> Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN) (\s :: UpdateWirelessGatewayTaskCreate
s@UpdateWirelessGatewayTaskCreate' {} Maybe LoRaWANUpdateGatewayTaskCreate
a -> UpdateWirelessGatewayTaskCreate
s {$sel:loRaWAN:UpdateWirelessGatewayTaskCreate' :: Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN = Maybe LoRaWANUpdateGatewayTaskCreate
a} :: UpdateWirelessGatewayTaskCreate)
instance
Core.FromJSON
UpdateWirelessGatewayTaskCreate
where
parseJSON :: Value -> Parser UpdateWirelessGatewayTaskCreate
parseJSON =
String
-> (Object -> Parser UpdateWirelessGatewayTaskCreate)
-> Value
-> Parser UpdateWirelessGatewayTaskCreate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UpdateWirelessGatewayTaskCreate"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate
UpdateWirelessGatewayTaskCreate'
(Maybe Text
-> Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate)
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
"UpdateDataSource")
Parser
(Maybe Text
-> Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate)
-> Parser (Maybe Text)
-> Parser
(Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate)
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
"UpdateDataRole")
Parser
(Maybe LoRaWANUpdateGatewayTaskCreate
-> UpdateWirelessGatewayTaskCreate)
-> Parser (Maybe LoRaWANUpdateGatewayTaskCreate)
-> Parser UpdateWirelessGatewayTaskCreate
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoRaWANUpdateGatewayTaskCreate)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoRaWAN")
)
instance
Prelude.Hashable
UpdateWirelessGatewayTaskCreate
instance
Prelude.NFData
UpdateWirelessGatewayTaskCreate
instance Core.ToJSON UpdateWirelessGatewayTaskCreate where
toJSON :: UpdateWirelessGatewayTaskCreate -> Value
toJSON UpdateWirelessGatewayTaskCreate' {Maybe Text
Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN :: Maybe LoRaWANUpdateGatewayTaskCreate
updateDataRole :: Maybe Text
updateDataSource :: Maybe Text
$sel:loRaWAN:UpdateWirelessGatewayTaskCreate' :: UpdateWirelessGatewayTaskCreate
-> Maybe LoRaWANUpdateGatewayTaskCreate
$sel:updateDataRole:UpdateWirelessGatewayTaskCreate' :: UpdateWirelessGatewayTaskCreate -> Maybe Text
$sel:updateDataSource:UpdateWirelessGatewayTaskCreate' :: UpdateWirelessGatewayTaskCreate -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"UpdateDataSource" 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
updateDataSource,
(Text
"UpdateDataRole" 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
updateDataRole,
(Text
"LoRaWAN" Text -> LoRaWANUpdateGatewayTaskCreate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LoRaWANUpdateGatewayTaskCreate -> Pair)
-> Maybe LoRaWANUpdateGatewayTaskCreate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoRaWANUpdateGatewayTaskCreate
loRaWAN
]
)