{-# 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.Export where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Export = Export'
{
Export -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
Export -> Maybe Text
exportingStackId :: Prelude.Maybe Prelude.Text,
Export -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (Export -> Export -> Bool
(Export -> Export -> Bool)
-> (Export -> Export -> Bool) -> Eq Export
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Export -> Export -> Bool
$c/= :: Export -> Export -> Bool
== :: Export -> Export -> Bool
$c== :: Export -> Export -> Bool
Prelude.Eq, ReadPrec [Export]
ReadPrec Export
Int -> ReadS Export
ReadS [Export]
(Int -> ReadS Export)
-> ReadS [Export]
-> ReadPrec Export
-> ReadPrec [Export]
-> Read Export
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Export]
$creadListPrec :: ReadPrec [Export]
readPrec :: ReadPrec Export
$creadPrec :: ReadPrec Export
readList :: ReadS [Export]
$creadList :: ReadS [Export]
readsPrec :: Int -> ReadS Export
$creadsPrec :: Int -> ReadS Export
Prelude.Read, Int -> Export -> ShowS
[Export] -> ShowS
Export -> String
(Int -> Export -> ShowS)
-> (Export -> String) -> ([Export] -> ShowS) -> Show Export
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Export] -> ShowS
$cshowList :: [Export] -> ShowS
show :: Export -> String
$cshow :: Export -> String
showsPrec :: Int -> Export -> ShowS
$cshowsPrec :: Int -> Export -> ShowS
Prelude.Show, (forall x. Export -> Rep Export x)
-> (forall x. Rep Export x -> Export) -> Generic Export
forall x. Rep Export x -> Export
forall x. Export -> Rep Export x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Export x -> Export
$cfrom :: forall x. Export -> Rep Export x
Prelude.Generic)
newExport ::
Export
newExport :: Export
newExport =
Export' :: Maybe Text -> Maybe Text -> Maybe Text -> Export
Export'
{ $sel:value:Export' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:exportingStackId:Export' :: Maybe Text
exportingStackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Export' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
export_value :: Lens.Lens' Export (Prelude.Maybe Prelude.Text)
export_value :: (Maybe Text -> f (Maybe Text)) -> Export -> f Export
export_value = (Export -> Maybe Text)
-> (Export -> Maybe Text -> Export)
-> Lens Export Export (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Export' {Maybe Text
value :: Maybe Text
$sel:value:Export' :: Export -> Maybe Text
value} -> Maybe Text
value) (\s :: Export
s@Export' {} Maybe Text
a -> Export
s {$sel:value:Export' :: Maybe Text
value = Maybe Text
a} :: Export)
export_exportingStackId :: Lens.Lens' Export (Prelude.Maybe Prelude.Text)
export_exportingStackId :: (Maybe Text -> f (Maybe Text)) -> Export -> f Export
export_exportingStackId = (Export -> Maybe Text)
-> (Export -> Maybe Text -> Export)
-> Lens Export Export (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Export' {Maybe Text
exportingStackId :: Maybe Text
$sel:exportingStackId:Export' :: Export -> Maybe Text
exportingStackId} -> Maybe Text
exportingStackId) (\s :: Export
s@Export' {} Maybe Text
a -> Export
s {$sel:exportingStackId:Export' :: Maybe Text
exportingStackId = Maybe Text
a} :: Export)
export_name :: Lens.Lens' Export (Prelude.Maybe Prelude.Text)
export_name :: (Maybe Text -> f (Maybe Text)) -> Export -> f Export
export_name = (Export -> Maybe Text)
-> (Export -> Maybe Text -> Export)
-> Lens Export Export (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Export' {Maybe Text
name :: Maybe Text
$sel:name:Export' :: Export -> Maybe Text
name} -> Maybe Text
name) (\s :: Export
s@Export' {} Maybe Text
a -> Export
s {$sel:name:Export' :: Maybe Text
name = Maybe Text
a} :: Export)
instance Core.FromXML Export where
parseXML :: [Node] -> Either String Export
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> Export
Export'
(Maybe Text -> Maybe Text -> Maybe Text -> Export)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> Export)
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
"Value")
Either String (Maybe Text -> Maybe Text -> Export)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Export)
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
"ExportingStackId")
Either String (Maybe Text -> Export)
-> Either String (Maybe Text) -> Either String Export
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
"Name")
instance Prelude.Hashable Export
instance Prelude.NFData Export