{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Export = Export'
{
Export -> Maybe Text
exportingStackId :: Prelude.Maybe Prelude.Text,
Export -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Export -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (Export -> Export -> Bool
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]
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
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. 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'
{ $sel:exportingStackId:Export' :: Maybe Text
exportingStackId = forall a. Maybe a
Prelude.Nothing,
$sel:name:Export' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:value:Export' :: Maybe Text
value = forall a. Maybe a
Prelude.Nothing
}
export_exportingStackId :: Lens.Lens' Export (Prelude.Maybe Prelude.Text)
export_exportingStackId :: Lens' Export (Maybe Text)
export_exportingStackId = 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 :: Lens' Export (Maybe Text)
export_name = 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)
export_value :: Lens.Lens' Export (Prelude.Maybe Prelude.Text)
export_value :: Lens' Export (Maybe Text)
export_value = 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)
instance Data.FromXML Export where
parseXML :: [Node] -> Either String Export
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> Export
Export'
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
"ExportingStackId")
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
"Name")
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
"Value")
instance Prelude.Hashable Export where
hashWithSalt :: Int -> Export -> Int
hashWithSalt Int
_salt Export' {Maybe Text
value :: Maybe Text
name :: Maybe Text
exportingStackId :: Maybe Text
$sel:value:Export' :: Export -> Maybe Text
$sel:name:Export' :: Export -> Maybe Text
$sel:exportingStackId:Export' :: Export -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
exportingStackId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
value
instance Prelude.NFData Export where
rnf :: Export -> ()
rnf Export' {Maybe Text
value :: Maybe Text
name :: Maybe Text
exportingStackId :: Maybe Text
$sel:value:Export' :: Export -> Maybe Text
$sel:name:Export' :: Export -> Maybe Text
$sel:exportingStackId:Export' :: Export -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
exportingStackId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
value