{-# 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.Output where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Output = Output'
{
Output -> Maybe Text
outputValue :: Prelude.Maybe Prelude.Text,
Output -> Maybe Text
outputKey :: Prelude.Maybe Prelude.Text,
Output -> Maybe Text
exportName :: Prelude.Maybe Prelude.Text,
Output -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Output -> Output -> Bool
(Output -> Output -> Bool)
-> (Output -> Output -> Bool) -> Eq Output
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Output -> Output -> Bool
$c/= :: Output -> Output -> Bool
== :: Output -> Output -> Bool
$c== :: Output -> Output -> Bool
Prelude.Eq, ReadPrec [Output]
ReadPrec Output
Int -> ReadS Output
ReadS [Output]
(Int -> ReadS Output)
-> ReadS [Output]
-> ReadPrec Output
-> ReadPrec [Output]
-> Read Output
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Output]
$creadListPrec :: ReadPrec [Output]
readPrec :: ReadPrec Output
$creadPrec :: ReadPrec Output
readList :: ReadS [Output]
$creadList :: ReadS [Output]
readsPrec :: Int -> ReadS Output
$creadsPrec :: Int -> ReadS Output
Prelude.Read, Int -> Output -> ShowS
[Output] -> ShowS
Output -> String
(Int -> Output -> ShowS)
-> (Output -> String) -> ([Output] -> ShowS) -> Show Output
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Output] -> ShowS
$cshowList :: [Output] -> ShowS
show :: Output -> String
$cshow :: Output -> String
showsPrec :: Int -> Output -> ShowS
$cshowsPrec :: Int -> Output -> ShowS
Prelude.Show, (forall x. Output -> Rep Output x)
-> (forall x. Rep Output x -> Output) -> Generic Output
forall x. Rep Output x -> Output
forall x. Output -> Rep Output x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Output x -> Output
$cfrom :: forall x. Output -> Rep Output x
Prelude.Generic)
newOutput ::
Output
newOutput :: Output
newOutput =
Output' :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Output
Output'
{ $sel:outputValue:Output' :: Maybe Text
outputValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputKey:Output' :: Maybe Text
outputKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:exportName:Output' :: Maybe Text
exportName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Output' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
output_outputValue :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_outputValue :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_outputValue = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
outputValue :: Maybe Text
$sel:outputValue:Output' :: Output -> Maybe Text
outputValue} -> Maybe Text
outputValue) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:outputValue:Output' :: Maybe Text
outputValue = Maybe Text
a} :: Output)
output_outputKey :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_outputKey :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_outputKey = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
outputKey :: Maybe Text
$sel:outputKey:Output' :: Output -> Maybe Text
outputKey} -> Maybe Text
outputKey) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:outputKey:Output' :: Maybe Text
outputKey = Maybe Text
a} :: Output)
output_exportName :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_exportName :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_exportName = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
exportName :: Maybe Text
$sel:exportName:Output' :: Output -> Maybe Text
exportName} -> Maybe Text
exportName) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:exportName:Output' :: Maybe Text
exportName = Maybe Text
a} :: Output)
output_description :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_description :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_description = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
description :: Maybe Text
$sel:description:Output' :: Output -> Maybe Text
description} -> Maybe Text
description) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:description:Output' :: Maybe Text
description = Maybe Text
a} :: Output)
instance Core.FromXML Output where
parseXML :: [Node] -> Either String Output
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Output
Output'
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Output)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> Maybe Text -> Output)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OutputValue")
Either String (Maybe Text -> Maybe Text -> Maybe Text -> Output)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OutputKey")
Either String (Maybe Text -> Maybe Text -> Output)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ExportName")
Either String (Maybe Text -> Output)
-> Either String (Maybe Text) -> Either String Output
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Description")
instance Prelude.Hashable Output
instance Prelude.NFData Output