{-# 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.ManagedBlockChain.Types.NodeFrameworkAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ManagedBlockChain.Types.NodeEthereumAttributes
import Amazonka.ManagedBlockChain.Types.NodeFabricAttributes
import qualified Amazonka.Prelude as Prelude
data NodeFrameworkAttributes = NodeFrameworkAttributes'
{
NodeFrameworkAttributes -> Maybe NodeEthereumAttributes
ethereum :: Prelude.Maybe NodeEthereumAttributes,
NodeFrameworkAttributes -> Maybe NodeFabricAttributes
fabric :: Prelude.Maybe NodeFabricAttributes
}
deriving (NodeFrameworkAttributes -> NodeFrameworkAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeFrameworkAttributes -> NodeFrameworkAttributes -> Bool
$c/= :: NodeFrameworkAttributes -> NodeFrameworkAttributes -> Bool
== :: NodeFrameworkAttributes -> NodeFrameworkAttributes -> Bool
$c== :: NodeFrameworkAttributes -> NodeFrameworkAttributes -> Bool
Prelude.Eq, ReadPrec [NodeFrameworkAttributes]
ReadPrec NodeFrameworkAttributes
Int -> ReadS NodeFrameworkAttributes
ReadS [NodeFrameworkAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeFrameworkAttributes]
$creadListPrec :: ReadPrec [NodeFrameworkAttributes]
readPrec :: ReadPrec NodeFrameworkAttributes
$creadPrec :: ReadPrec NodeFrameworkAttributes
readList :: ReadS [NodeFrameworkAttributes]
$creadList :: ReadS [NodeFrameworkAttributes]
readsPrec :: Int -> ReadS NodeFrameworkAttributes
$creadsPrec :: Int -> ReadS NodeFrameworkAttributes
Prelude.Read, Int -> NodeFrameworkAttributes -> ShowS
[NodeFrameworkAttributes] -> ShowS
NodeFrameworkAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeFrameworkAttributes] -> ShowS
$cshowList :: [NodeFrameworkAttributes] -> ShowS
show :: NodeFrameworkAttributes -> String
$cshow :: NodeFrameworkAttributes -> String
showsPrec :: Int -> NodeFrameworkAttributes -> ShowS
$cshowsPrec :: Int -> NodeFrameworkAttributes -> ShowS
Prelude.Show, forall x. Rep NodeFrameworkAttributes x -> NodeFrameworkAttributes
forall x. NodeFrameworkAttributes -> Rep NodeFrameworkAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeFrameworkAttributes x -> NodeFrameworkAttributes
$cfrom :: forall x. NodeFrameworkAttributes -> Rep NodeFrameworkAttributes x
Prelude.Generic)
newNodeFrameworkAttributes ::
NodeFrameworkAttributes
newNodeFrameworkAttributes :: NodeFrameworkAttributes
newNodeFrameworkAttributes =
NodeFrameworkAttributes'
{ $sel:ethereum:NodeFrameworkAttributes' :: Maybe NodeEthereumAttributes
ethereum =
forall a. Maybe a
Prelude.Nothing,
$sel:fabric:NodeFrameworkAttributes' :: Maybe NodeFabricAttributes
fabric = forall a. Maybe a
Prelude.Nothing
}
nodeFrameworkAttributes_ethereum :: Lens.Lens' NodeFrameworkAttributes (Prelude.Maybe NodeEthereumAttributes)
nodeFrameworkAttributes_ethereum :: Lens' NodeFrameworkAttributes (Maybe NodeEthereumAttributes)
nodeFrameworkAttributes_ethereum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFrameworkAttributes' {Maybe NodeEthereumAttributes
ethereum :: Maybe NodeEthereumAttributes
$sel:ethereum:NodeFrameworkAttributes' :: NodeFrameworkAttributes -> Maybe NodeEthereumAttributes
ethereum} -> Maybe NodeEthereumAttributes
ethereum) (\s :: NodeFrameworkAttributes
s@NodeFrameworkAttributes' {} Maybe NodeEthereumAttributes
a -> NodeFrameworkAttributes
s {$sel:ethereum:NodeFrameworkAttributes' :: Maybe NodeEthereumAttributes
ethereum = Maybe NodeEthereumAttributes
a} :: NodeFrameworkAttributes)
nodeFrameworkAttributes_fabric :: Lens.Lens' NodeFrameworkAttributes (Prelude.Maybe NodeFabricAttributes)
nodeFrameworkAttributes_fabric :: Lens' NodeFrameworkAttributes (Maybe NodeFabricAttributes)
nodeFrameworkAttributes_fabric = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFrameworkAttributes' {Maybe NodeFabricAttributes
fabric :: Maybe NodeFabricAttributes
$sel:fabric:NodeFrameworkAttributes' :: NodeFrameworkAttributes -> Maybe NodeFabricAttributes
fabric} -> Maybe NodeFabricAttributes
fabric) (\s :: NodeFrameworkAttributes
s@NodeFrameworkAttributes' {} Maybe NodeFabricAttributes
a -> NodeFrameworkAttributes
s {$sel:fabric:NodeFrameworkAttributes' :: Maybe NodeFabricAttributes
fabric = Maybe NodeFabricAttributes
a} :: NodeFrameworkAttributes)
instance Data.FromJSON NodeFrameworkAttributes where
parseJSON :: Value -> Parser NodeFrameworkAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NodeFrameworkAttributes"
( \Object
x ->
Maybe NodeEthereumAttributes
-> Maybe NodeFabricAttributes -> NodeFrameworkAttributes
NodeFrameworkAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Ethereum")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Fabric")
)
instance Prelude.Hashable NodeFrameworkAttributes where
hashWithSalt :: Int -> NodeFrameworkAttributes -> Int
hashWithSalt Int
_salt NodeFrameworkAttributes' {Maybe NodeEthereumAttributes
Maybe NodeFabricAttributes
fabric :: Maybe NodeFabricAttributes
ethereum :: Maybe NodeEthereumAttributes
$sel:fabric:NodeFrameworkAttributes' :: NodeFrameworkAttributes -> Maybe NodeFabricAttributes
$sel:ethereum:NodeFrameworkAttributes' :: NodeFrameworkAttributes -> Maybe NodeEthereumAttributes
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NodeEthereumAttributes
ethereum
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NodeFabricAttributes
fabric
instance Prelude.NFData NodeFrameworkAttributes where
rnf :: NodeFrameworkAttributes -> ()
rnf NodeFrameworkAttributes' {Maybe NodeEthereumAttributes
Maybe NodeFabricAttributes
fabric :: Maybe NodeFabricAttributes
ethereum :: Maybe NodeEthereumAttributes
$sel:fabric:NodeFrameworkAttributes' :: NodeFrameworkAttributes -> Maybe NodeFabricAttributes
$sel:ethereum:NodeFrameworkAttributes' :: NodeFrameworkAttributes -> Maybe NodeEthereumAttributes
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe NodeEthereumAttributes
ethereum
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NodeFabricAttributes
fabric