{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Environment = Environment'
{
Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text (Core.Sensitive Prelude.Text)))
}
deriving (Environment -> Environment -> Bool
(Environment -> Environment -> Bool)
-> (Environment -> Environment -> Bool) -> Eq Environment
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
(Int -> Environment -> ShowS)
-> (Environment -> String)
-> ([Environment] -> ShowS)
-> Show Environment
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. Environment -> Rep Environment x)
-> (forall x. Rep Environment x -> Environment)
-> Generic Environment
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' :: Maybe (Sensitive (HashMap Text (Sensitive Text))) -> Environment
Environment' {$sel:variables:Environment' :: Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables = Maybe (Sensitive (HashMap Text (Sensitive Text)))
forall a. Maybe a
Prelude.Nothing}
environment_variables :: Lens.Lens' Environment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
environment_variables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Environment -> f Environment
environment_variables = (Environment -> Maybe (Sensitive (HashMap Text (Sensitive Text))))
-> (Environment
-> Maybe (Sensitive (HashMap Text (Sensitive Text)))
-> Environment)
-> Lens
Environment
Environment
(Maybe (Sensitive (HashMap Text (Sensitive Text))))
(Maybe (Sensitive (HashMap Text (Sensitive Text))))
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) ((Maybe (Sensitive (HashMap Text (Sensitive Text)))
-> f (Maybe (Sensitive (HashMap Text (Sensitive Text)))))
-> Environment -> f Environment)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (Sensitive (HashMap Text (Sensitive Text)))
-> f (Maybe (Sensitive (HashMap Text (Sensitive Text)))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Environment
-> f Environment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (HashMap Text (Sensitive Text)))
(Sensitive (HashMap Text (Sensitive Text)))
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (Sensitive (HashMap Text (Sensitive Text))))
(Maybe (Sensitive (HashMap Text (Sensitive Text))))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text (Sensitive Text))
(Identity (HashMap Text (Sensitive Text)))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(Sensitive (HashMap Text (Sensitive Text)))
(Identity (Sensitive (HashMap Text (Sensitive Text))))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text (Sensitive Text))
(Identity (HashMap Text (Sensitive Text)))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(Sensitive (HashMap Text (Sensitive Text)))
(Identity (Sensitive (HashMap Text (Sensitive Text)))))
-> (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text (Sensitive Text))
(Identity (HashMap Text (Sensitive Text))))
-> AnIso
(Sensitive (HashMap Text (Sensitive Text)))
(Sensitive (HashMap Text (Sensitive Text)))
(HashMap Text Text)
(HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text (Sensitive Text))
(Identity (HashMap Text (Sensitive Text)))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
instance Prelude.Hashable Environment
instance Prelude.NFData Environment
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"Variables" Text -> Sensitive (HashMap Text (Sensitive Text)) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive (HashMap Text (Sensitive Text)) -> Pair)
-> Maybe (Sensitive (HashMap Text (Sensitive Text))) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text (Sensitive Text)))
variables]
)