{-# 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.Lambda.Types.Environment 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 Environment = Environment'
{
Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text)))
}
deriving (Environment -> Environment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Environment -> Environment -> Bool
$c/= :: Environment -> Environment -> Bool
== :: Environment -> Environment -> Bool
$c== :: Environment -> Environment -> Bool
Prelude.Eq, Int -> Environment -> ShowS
[Environment] -> ShowS
Environment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Environment] -> ShowS
$cshowList :: [Environment] -> ShowS
show :: Environment -> String
$cshow :: Environment -> String
showsPrec :: Int -> Environment -> ShowS
$cshowsPrec :: Int -> Environment -> ShowS
Prelude.Show, forall x. Rep Environment x -> Environment
forall x. Environment -> Rep Environment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Environment x -> Environment
$cfrom :: forall x. Environment -> Rep Environment x
Prelude.Generic)
newEnvironment ::
Environment
newEnvironment :: Environment
newEnvironment =
Environment' {$sel:variables:Environment' :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables = forall a. Maybe a
Prelude.Nothing}
environment_variables :: Lens.Lens' Environment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
environment_variables :: Lens' Environment (Maybe (HashMap Text Text))
environment_variables = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Environment' {Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$sel:variables:Environment' :: Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables} -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables) (\s :: Environment
s@Environment' {} Maybe (Sensitive (HashMap Text (Sensitive Text)))
a -> Environment
s {$sel:variables:Environment' :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables = Maybe (Sensitive (HashMap Text (Sensitive Text)))
a} :: Environment) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
instance Prelude.Hashable Environment where
hashWithSalt :: Int -> Environment -> Int
hashWithSalt Int
_salt Environment' {Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$sel:variables:Environment' :: Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables
instance Prelude.NFData Environment where
rnf :: Environment -> ()
rnf Environment' {Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$sel:variables:Environment' :: Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables
instance Data.ToJSON Environment where
toJSON :: Environment -> Value
toJSON Environment' {Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
$sel:variables:Environment' :: Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"Variables" 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 (Sensitive (HashMap Text (Sensitive Text)))
variables]
)