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