{-# 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.ProximityResourceTypeEventConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTWireless.Types.SidewalkResourceTypeEventConfiguration
import qualified Amazonka.Prelude as Prelude
data ProximityResourceTypeEventConfiguration = ProximityResourceTypeEventConfiguration'
{
ProximityResourceTypeEventConfiguration
-> Maybe SidewalkResourceTypeEventConfiguration
sidewalk :: Prelude.Maybe SidewalkResourceTypeEventConfiguration
}
deriving (ProximityResourceTypeEventConfiguration
-> ProximityResourceTypeEventConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProximityResourceTypeEventConfiguration
-> ProximityResourceTypeEventConfiguration -> Bool
$c/= :: ProximityResourceTypeEventConfiguration
-> ProximityResourceTypeEventConfiguration -> Bool
== :: ProximityResourceTypeEventConfiguration
-> ProximityResourceTypeEventConfiguration -> Bool
$c== :: ProximityResourceTypeEventConfiguration
-> ProximityResourceTypeEventConfiguration -> Bool
Prelude.Eq, ReadPrec [ProximityResourceTypeEventConfiguration]
ReadPrec ProximityResourceTypeEventConfiguration
Int -> ReadS ProximityResourceTypeEventConfiguration
ReadS [ProximityResourceTypeEventConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProximityResourceTypeEventConfiguration]
$creadListPrec :: ReadPrec [ProximityResourceTypeEventConfiguration]
readPrec :: ReadPrec ProximityResourceTypeEventConfiguration
$creadPrec :: ReadPrec ProximityResourceTypeEventConfiguration
readList :: ReadS [ProximityResourceTypeEventConfiguration]
$creadList :: ReadS [ProximityResourceTypeEventConfiguration]
readsPrec :: Int -> ReadS ProximityResourceTypeEventConfiguration
$creadsPrec :: Int -> ReadS ProximityResourceTypeEventConfiguration
Prelude.Read, Int -> ProximityResourceTypeEventConfiguration -> ShowS
[ProximityResourceTypeEventConfiguration] -> ShowS
ProximityResourceTypeEventConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProximityResourceTypeEventConfiguration] -> ShowS
$cshowList :: [ProximityResourceTypeEventConfiguration] -> ShowS
show :: ProximityResourceTypeEventConfiguration -> String
$cshow :: ProximityResourceTypeEventConfiguration -> String
showsPrec :: Int -> ProximityResourceTypeEventConfiguration -> ShowS
$cshowsPrec :: Int -> ProximityResourceTypeEventConfiguration -> ShowS
Prelude.Show, forall x.
Rep ProximityResourceTypeEventConfiguration x
-> ProximityResourceTypeEventConfiguration
forall x.
ProximityResourceTypeEventConfiguration
-> Rep ProximityResourceTypeEventConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProximityResourceTypeEventConfiguration x
-> ProximityResourceTypeEventConfiguration
$cfrom :: forall x.
ProximityResourceTypeEventConfiguration
-> Rep ProximityResourceTypeEventConfiguration x
Prelude.Generic)
newProximityResourceTypeEventConfiguration ::
ProximityResourceTypeEventConfiguration
newProximityResourceTypeEventConfiguration :: ProximityResourceTypeEventConfiguration
newProximityResourceTypeEventConfiguration =
ProximityResourceTypeEventConfiguration'
{ $sel:sidewalk:ProximityResourceTypeEventConfiguration' :: Maybe SidewalkResourceTypeEventConfiguration
sidewalk =
forall a. Maybe a
Prelude.Nothing
}
proximityResourceTypeEventConfiguration_sidewalk :: Lens.Lens' ProximityResourceTypeEventConfiguration (Prelude.Maybe SidewalkResourceTypeEventConfiguration)
proximityResourceTypeEventConfiguration_sidewalk :: Lens'
ProximityResourceTypeEventConfiguration
(Maybe SidewalkResourceTypeEventConfiguration)
proximityResourceTypeEventConfiguration_sidewalk = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProximityResourceTypeEventConfiguration' {Maybe SidewalkResourceTypeEventConfiguration
sidewalk :: Maybe SidewalkResourceTypeEventConfiguration
$sel:sidewalk:ProximityResourceTypeEventConfiguration' :: ProximityResourceTypeEventConfiguration
-> Maybe SidewalkResourceTypeEventConfiguration
sidewalk} -> Maybe SidewalkResourceTypeEventConfiguration
sidewalk) (\s :: ProximityResourceTypeEventConfiguration
s@ProximityResourceTypeEventConfiguration' {} Maybe SidewalkResourceTypeEventConfiguration
a -> ProximityResourceTypeEventConfiguration
s {$sel:sidewalk:ProximityResourceTypeEventConfiguration' :: Maybe SidewalkResourceTypeEventConfiguration
sidewalk = Maybe SidewalkResourceTypeEventConfiguration
a} :: ProximityResourceTypeEventConfiguration)
instance
Data.FromJSON
ProximityResourceTypeEventConfiguration
where
parseJSON :: Value -> Parser ProximityResourceTypeEventConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProximityResourceTypeEventConfiguration"
( \Object
x ->
Maybe SidewalkResourceTypeEventConfiguration
-> ProximityResourceTypeEventConfiguration
ProximityResourceTypeEventConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Sidewalk")
)
instance
Prelude.Hashable
ProximityResourceTypeEventConfiguration
where
hashWithSalt :: Int -> ProximityResourceTypeEventConfiguration -> Int
hashWithSalt
Int
_salt
ProximityResourceTypeEventConfiguration' {Maybe SidewalkResourceTypeEventConfiguration
sidewalk :: Maybe SidewalkResourceTypeEventConfiguration
$sel:sidewalk:ProximityResourceTypeEventConfiguration' :: ProximityResourceTypeEventConfiguration
-> Maybe SidewalkResourceTypeEventConfiguration
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SidewalkResourceTypeEventConfiguration
sidewalk
instance
Prelude.NFData
ProximityResourceTypeEventConfiguration
where
rnf :: ProximityResourceTypeEventConfiguration -> ()
rnf ProximityResourceTypeEventConfiguration' {Maybe SidewalkResourceTypeEventConfiguration
sidewalk :: Maybe SidewalkResourceTypeEventConfiguration
$sel:sidewalk:ProximityResourceTypeEventConfiguration' :: ProximityResourceTypeEventConfiguration
-> Maybe SidewalkResourceTypeEventConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SidewalkResourceTypeEventConfiguration
sidewalk
instance
Data.ToJSON
ProximityResourceTypeEventConfiguration
where
toJSON :: ProximityResourceTypeEventConfiguration -> Value
toJSON ProximityResourceTypeEventConfiguration' {Maybe SidewalkResourceTypeEventConfiguration
sidewalk :: Maybe SidewalkResourceTypeEventConfiguration
$sel:sidewalk:ProximityResourceTypeEventConfiguration' :: ProximityResourceTypeEventConfiguration
-> Maybe SidewalkResourceTypeEventConfiguration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"Sidewalk" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SidewalkResourceTypeEventConfiguration
sidewalk]
)