{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ModuleInfo = ModuleInfo'
{
ModuleInfo -> Maybe Text
logicalIdHierarchy :: Prelude.Maybe Prelude.Text,
ModuleInfo -> Maybe Text
typeHierarchy :: Prelude.Maybe Prelude.Text
}
deriving (ModuleInfo -> ModuleInfo -> Bool
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]
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
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. 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'
{ $sel:logicalIdHierarchy:ModuleInfo' :: Maybe Text
logicalIdHierarchy = forall a. Maybe a
Prelude.Nothing,
$sel:typeHierarchy:ModuleInfo' :: Maybe Text
typeHierarchy = forall a. Maybe a
Prelude.Nothing
}
moduleInfo_logicalIdHierarchy :: Lens.Lens' ModuleInfo (Prelude.Maybe Prelude.Text)
moduleInfo_logicalIdHierarchy :: Lens' ModuleInfo (Maybe Text)
moduleInfo_logicalIdHierarchy = 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)
moduleInfo_typeHierarchy :: Lens.Lens' ModuleInfo (Prelude.Maybe Prelude.Text)
moduleInfo_typeHierarchy :: Lens' ModuleInfo (Maybe Text)
moduleInfo_typeHierarchy = 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)
instance Data.FromXML ModuleInfo where
parseXML :: [Node] -> Either String ModuleInfo
parseXML [Node]
x =
Maybe Text -> Maybe Text -> ModuleInfo
ModuleInfo'
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
"LogicalIdHierarchy")
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
"TypeHierarchy")
instance Prelude.Hashable ModuleInfo where
hashWithSalt :: Int -> ModuleInfo -> Int
hashWithSalt Int
_salt ModuleInfo' {Maybe Text
typeHierarchy :: Maybe Text
logicalIdHierarchy :: Maybe Text
$sel:typeHierarchy:ModuleInfo' :: ModuleInfo -> Maybe Text
$sel:logicalIdHierarchy:ModuleInfo' :: ModuleInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logicalIdHierarchy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeHierarchy
instance Prelude.NFData ModuleInfo where
rnf :: ModuleInfo -> ()
rnf ModuleInfo' {Maybe Text
typeHierarchy :: Maybe Text
logicalIdHierarchy :: Maybe Text
$sel:typeHierarchy:ModuleInfo' :: ModuleInfo -> Maybe Text
$sel:logicalIdHierarchy:ModuleInfo' :: ModuleInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logicalIdHierarchy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeHierarchy