{-# 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.CloudFormation.Types.TemplateParameter 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 TemplateParameter = TemplateParameter'
{
TemplateParameter -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
TemplateParameter -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
TemplateParameter -> Maybe Bool
noEcho :: Prelude.Maybe Prelude.Bool,
TemplateParameter -> Maybe Text
parameterKey :: Prelude.Maybe Prelude.Text
}
deriving (TemplateParameter -> TemplateParameter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateParameter -> TemplateParameter -> Bool
$c/= :: TemplateParameter -> TemplateParameter -> Bool
== :: TemplateParameter -> TemplateParameter -> Bool
$c== :: TemplateParameter -> TemplateParameter -> Bool
Prelude.Eq, ReadPrec [TemplateParameter]
ReadPrec TemplateParameter
Int -> ReadS TemplateParameter
ReadS [TemplateParameter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateParameter]
$creadListPrec :: ReadPrec [TemplateParameter]
readPrec :: ReadPrec TemplateParameter
$creadPrec :: ReadPrec TemplateParameter
readList :: ReadS [TemplateParameter]
$creadList :: ReadS [TemplateParameter]
readsPrec :: Int -> ReadS TemplateParameter
$creadsPrec :: Int -> ReadS TemplateParameter
Prelude.Read, Int -> TemplateParameter -> ShowS
[TemplateParameter] -> ShowS
TemplateParameter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateParameter] -> ShowS
$cshowList :: [TemplateParameter] -> ShowS
show :: TemplateParameter -> String
$cshow :: TemplateParameter -> String
showsPrec :: Int -> TemplateParameter -> ShowS
$cshowsPrec :: Int -> TemplateParameter -> ShowS
Prelude.Show, forall x. Rep TemplateParameter x -> TemplateParameter
forall x. TemplateParameter -> Rep TemplateParameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TemplateParameter x -> TemplateParameter
$cfrom :: forall x. TemplateParameter -> Rep TemplateParameter x
Prelude.Generic)
newTemplateParameter ::
TemplateParameter
newTemplateParameter :: TemplateParameter
newTemplateParameter =
TemplateParameter'
{ $sel:defaultValue:TemplateParameter' :: Maybe Text
defaultValue = forall a. Maybe a
Prelude.Nothing,
$sel:description:TemplateParameter' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:noEcho:TemplateParameter' :: Maybe Bool
noEcho = forall a. Maybe a
Prelude.Nothing,
$sel:parameterKey:TemplateParameter' :: Maybe Text
parameterKey = forall a. Maybe a
Prelude.Nothing
}
templateParameter_defaultValue :: Lens.Lens' TemplateParameter (Prelude.Maybe Prelude.Text)
templateParameter_defaultValue :: Lens' TemplateParameter (Maybe Text)
templateParameter_defaultValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateParameter' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:TemplateParameter' :: TemplateParameter -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: TemplateParameter
s@TemplateParameter' {} Maybe Text
a -> TemplateParameter
s {$sel:defaultValue:TemplateParameter' :: Maybe Text
defaultValue = Maybe Text
a} :: TemplateParameter)
templateParameter_description :: Lens.Lens' TemplateParameter (Prelude.Maybe Prelude.Text)
templateParameter_description :: Lens' TemplateParameter (Maybe Text)
templateParameter_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateParameter' {Maybe Text
description :: Maybe Text
$sel:description:TemplateParameter' :: TemplateParameter -> Maybe Text
description} -> Maybe Text
description) (\s :: TemplateParameter
s@TemplateParameter' {} Maybe Text
a -> TemplateParameter
s {$sel:description:TemplateParameter' :: Maybe Text
description = Maybe Text
a} :: TemplateParameter)
templateParameter_noEcho :: Lens.Lens' TemplateParameter (Prelude.Maybe Prelude.Bool)
templateParameter_noEcho :: Lens' TemplateParameter (Maybe Bool)
templateParameter_noEcho = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateParameter' {Maybe Bool
noEcho :: Maybe Bool
$sel:noEcho:TemplateParameter' :: TemplateParameter -> Maybe Bool
noEcho} -> Maybe Bool
noEcho) (\s :: TemplateParameter
s@TemplateParameter' {} Maybe Bool
a -> TemplateParameter
s {$sel:noEcho:TemplateParameter' :: Maybe Bool
noEcho = Maybe Bool
a} :: TemplateParameter)
templateParameter_parameterKey :: Lens.Lens' TemplateParameter (Prelude.Maybe Prelude.Text)
templateParameter_parameterKey :: Lens' TemplateParameter (Maybe Text)
templateParameter_parameterKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateParameter' {Maybe Text
parameterKey :: Maybe Text
$sel:parameterKey:TemplateParameter' :: TemplateParameter -> Maybe Text
parameterKey} -> Maybe Text
parameterKey) (\s :: TemplateParameter
s@TemplateParameter' {} Maybe Text
a -> TemplateParameter
s {$sel:parameterKey:TemplateParameter' :: Maybe Text
parameterKey = Maybe Text
a} :: TemplateParameter)
instance Data.FromXML TemplateParameter where
parseXML :: [Node] -> Either String TemplateParameter
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe Bool -> Maybe Text -> TemplateParameter
TemplateParameter'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DefaultValue")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NoEcho")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ParameterKey")
instance Prelude.Hashable TemplateParameter where
hashWithSalt :: Int -> TemplateParameter -> Int
hashWithSalt Int
_salt TemplateParameter' {Maybe Bool
Maybe Text
parameterKey :: Maybe Text
noEcho :: Maybe Bool
description :: Maybe Text
defaultValue :: Maybe Text
$sel:parameterKey:TemplateParameter' :: TemplateParameter -> Maybe Text
$sel:noEcho:TemplateParameter' :: TemplateParameter -> Maybe Bool
$sel:description:TemplateParameter' :: TemplateParameter -> Maybe Text
$sel:defaultValue:TemplateParameter' :: TemplateParameter -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
noEcho
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parameterKey
instance Prelude.NFData TemplateParameter where
rnf :: TemplateParameter -> ()
rnf TemplateParameter' {Maybe Bool
Maybe Text
parameterKey :: Maybe Text
noEcho :: Maybe Bool
description :: Maybe Text
defaultValue :: Maybe Text
$sel:parameterKey:TemplateParameter' :: TemplateParameter -> Maybe Text
$sel:noEcho:TemplateParameter' :: TemplateParameter -> Maybe Bool
$sel:description:TemplateParameter' :: TemplateParameter -> Maybe Text
$sel:defaultValue:TemplateParameter' :: TemplateParameter -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
noEcho
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parameterKey