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