{-# 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.CodeBuild.Types.ExportedEnvironmentVariable where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExportedEnvironmentVariable = ExportedEnvironmentVariable'
{
ExportedEnvironmentVariable -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
ExportedEnvironmentVariable -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (ExportedEnvironmentVariable -> ExportedEnvironmentVariable -> Bool
(ExportedEnvironmentVariable
-> ExportedEnvironmentVariable -> Bool)
-> (ExportedEnvironmentVariable
-> ExportedEnvironmentVariable -> Bool)
-> Eq ExportedEnvironmentVariable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportedEnvironmentVariable -> ExportedEnvironmentVariable -> Bool
$c/= :: ExportedEnvironmentVariable -> ExportedEnvironmentVariable -> Bool
== :: ExportedEnvironmentVariable -> ExportedEnvironmentVariable -> Bool
$c== :: ExportedEnvironmentVariable -> ExportedEnvironmentVariable -> Bool
Prelude.Eq, ReadPrec [ExportedEnvironmentVariable]
ReadPrec ExportedEnvironmentVariable
Int -> ReadS ExportedEnvironmentVariable
ReadS [ExportedEnvironmentVariable]
(Int -> ReadS ExportedEnvironmentVariable)
-> ReadS [ExportedEnvironmentVariable]
-> ReadPrec ExportedEnvironmentVariable
-> ReadPrec [ExportedEnvironmentVariable]
-> Read ExportedEnvironmentVariable
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportedEnvironmentVariable]
$creadListPrec :: ReadPrec [ExportedEnvironmentVariable]
readPrec :: ReadPrec ExportedEnvironmentVariable
$creadPrec :: ReadPrec ExportedEnvironmentVariable
readList :: ReadS [ExportedEnvironmentVariable]
$creadList :: ReadS [ExportedEnvironmentVariable]
readsPrec :: Int -> ReadS ExportedEnvironmentVariable
$creadsPrec :: Int -> ReadS ExportedEnvironmentVariable
Prelude.Read, Int -> ExportedEnvironmentVariable -> ShowS
[ExportedEnvironmentVariable] -> ShowS
ExportedEnvironmentVariable -> String
(Int -> ExportedEnvironmentVariable -> ShowS)
-> (ExportedEnvironmentVariable -> String)
-> ([ExportedEnvironmentVariable] -> ShowS)
-> Show ExportedEnvironmentVariable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportedEnvironmentVariable] -> ShowS
$cshowList :: [ExportedEnvironmentVariable] -> ShowS
show :: ExportedEnvironmentVariable -> String
$cshow :: ExportedEnvironmentVariable -> String
showsPrec :: Int -> ExportedEnvironmentVariable -> ShowS
$cshowsPrec :: Int -> ExportedEnvironmentVariable -> ShowS
Prelude.Show, (forall x.
ExportedEnvironmentVariable -> Rep ExportedEnvironmentVariable x)
-> (forall x.
Rep ExportedEnvironmentVariable x -> ExportedEnvironmentVariable)
-> Generic ExportedEnvironmentVariable
forall x.
Rep ExportedEnvironmentVariable x -> ExportedEnvironmentVariable
forall x.
ExportedEnvironmentVariable -> Rep ExportedEnvironmentVariable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportedEnvironmentVariable x -> ExportedEnvironmentVariable
$cfrom :: forall x.
ExportedEnvironmentVariable -> Rep ExportedEnvironmentVariable x
Prelude.Generic)
newExportedEnvironmentVariable ::
ExportedEnvironmentVariable
newExportedEnvironmentVariable :: ExportedEnvironmentVariable
newExportedEnvironmentVariable =
ExportedEnvironmentVariable' :: Maybe Text -> Maybe Text -> ExportedEnvironmentVariable
ExportedEnvironmentVariable'
{ $sel:value:ExportedEnvironmentVariable' :: Maybe Text
value =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ExportedEnvironmentVariable' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
exportedEnvironmentVariable_value :: Lens.Lens' ExportedEnvironmentVariable (Prelude.Maybe Prelude.Text)
exportedEnvironmentVariable_value :: (Maybe Text -> f (Maybe Text))
-> ExportedEnvironmentVariable -> f ExportedEnvironmentVariable
exportedEnvironmentVariable_value = (ExportedEnvironmentVariable -> Maybe Text)
-> (ExportedEnvironmentVariable
-> Maybe Text -> ExportedEnvironmentVariable)
-> Lens
ExportedEnvironmentVariable
ExportedEnvironmentVariable
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportedEnvironmentVariable' {Maybe Text
value :: Maybe Text
$sel:value:ExportedEnvironmentVariable' :: ExportedEnvironmentVariable -> Maybe Text
value} -> Maybe Text
value) (\s :: ExportedEnvironmentVariable
s@ExportedEnvironmentVariable' {} Maybe Text
a -> ExportedEnvironmentVariable
s {$sel:value:ExportedEnvironmentVariable' :: Maybe Text
value = Maybe Text
a} :: ExportedEnvironmentVariable)
exportedEnvironmentVariable_name :: Lens.Lens' ExportedEnvironmentVariable (Prelude.Maybe Prelude.Text)
exportedEnvironmentVariable_name :: (Maybe Text -> f (Maybe Text))
-> ExportedEnvironmentVariable -> f ExportedEnvironmentVariable
exportedEnvironmentVariable_name = (ExportedEnvironmentVariable -> Maybe Text)
-> (ExportedEnvironmentVariable
-> Maybe Text -> ExportedEnvironmentVariable)
-> Lens
ExportedEnvironmentVariable
ExportedEnvironmentVariable
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportedEnvironmentVariable' {Maybe Text
name :: Maybe Text
$sel:name:ExportedEnvironmentVariable' :: ExportedEnvironmentVariable -> Maybe Text
name} -> Maybe Text
name) (\s :: ExportedEnvironmentVariable
s@ExportedEnvironmentVariable' {} Maybe Text
a -> ExportedEnvironmentVariable
s {$sel:name:ExportedEnvironmentVariable' :: Maybe Text
name = Maybe Text
a} :: ExportedEnvironmentVariable)
instance Core.FromJSON ExportedEnvironmentVariable where
parseJSON :: Value -> Parser ExportedEnvironmentVariable
parseJSON =
String
-> (Object -> Parser ExportedEnvironmentVariable)
-> Value
-> Parser ExportedEnvironmentVariable
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExportedEnvironmentVariable"
( \Object
x ->
Maybe Text -> Maybe Text -> ExportedEnvironmentVariable
ExportedEnvironmentVariable'
(Maybe Text -> Maybe Text -> ExportedEnvironmentVariable)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ExportedEnvironmentVariable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"value") Parser (Maybe Text -> ExportedEnvironmentVariable)
-> Parser (Maybe Text) -> Parser ExportedEnvironmentVariable
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
)
instance Prelude.Hashable ExportedEnvironmentVariable
instance Prelude.NFData ExportedEnvironmentVariable