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