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