{-# 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.NodeFabricAttributes 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 NodeFabricAttributes = NodeFabricAttributes'
{
NodeFabricAttributes -> Maybe Text
peerEndpoint :: Prelude.Maybe Prelude.Text,
NodeFabricAttributes -> Maybe Text
peerEventEndpoint :: Prelude.Maybe Prelude.Text
}
deriving (NodeFabricAttributes -> NodeFabricAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeFabricAttributes -> NodeFabricAttributes -> Bool
$c/= :: NodeFabricAttributes -> NodeFabricAttributes -> Bool
== :: NodeFabricAttributes -> NodeFabricAttributes -> Bool
$c== :: NodeFabricAttributes -> NodeFabricAttributes -> Bool
Prelude.Eq, ReadPrec [NodeFabricAttributes]
ReadPrec NodeFabricAttributes
Int -> ReadS NodeFabricAttributes
ReadS [NodeFabricAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeFabricAttributes]
$creadListPrec :: ReadPrec [NodeFabricAttributes]
readPrec :: ReadPrec NodeFabricAttributes
$creadPrec :: ReadPrec NodeFabricAttributes
readList :: ReadS [NodeFabricAttributes]
$creadList :: ReadS [NodeFabricAttributes]
readsPrec :: Int -> ReadS NodeFabricAttributes
$creadsPrec :: Int -> ReadS NodeFabricAttributes
Prelude.Read, Int -> NodeFabricAttributes -> ShowS
[NodeFabricAttributes] -> ShowS
NodeFabricAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeFabricAttributes] -> ShowS
$cshowList :: [NodeFabricAttributes] -> ShowS
show :: NodeFabricAttributes -> String
$cshow :: NodeFabricAttributes -> String
showsPrec :: Int -> NodeFabricAttributes -> ShowS
$cshowsPrec :: Int -> NodeFabricAttributes -> ShowS
Prelude.Show, forall x. Rep NodeFabricAttributes x -> NodeFabricAttributes
forall x. NodeFabricAttributes -> Rep NodeFabricAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeFabricAttributes x -> NodeFabricAttributes
$cfrom :: forall x. NodeFabricAttributes -> Rep NodeFabricAttributes x
Prelude.Generic)
newNodeFabricAttributes ::
NodeFabricAttributes
newNodeFabricAttributes :: NodeFabricAttributes
newNodeFabricAttributes =
NodeFabricAttributes'
{ $sel:peerEndpoint:NodeFabricAttributes' :: Maybe Text
peerEndpoint =
forall a. Maybe a
Prelude.Nothing,
$sel:peerEventEndpoint:NodeFabricAttributes' :: Maybe Text
peerEventEndpoint = forall a. Maybe a
Prelude.Nothing
}
nodeFabricAttributes_peerEndpoint :: Lens.Lens' NodeFabricAttributes (Prelude.Maybe Prelude.Text)
nodeFabricAttributes_peerEndpoint :: Lens' NodeFabricAttributes (Maybe Text)
nodeFabricAttributes_peerEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFabricAttributes' {Maybe Text
peerEndpoint :: Maybe Text
$sel:peerEndpoint:NodeFabricAttributes' :: NodeFabricAttributes -> Maybe Text
peerEndpoint} -> Maybe Text
peerEndpoint) (\s :: NodeFabricAttributes
s@NodeFabricAttributes' {} Maybe Text
a -> NodeFabricAttributes
s {$sel:peerEndpoint:NodeFabricAttributes' :: Maybe Text
peerEndpoint = Maybe Text
a} :: NodeFabricAttributes)
nodeFabricAttributes_peerEventEndpoint :: Lens.Lens' NodeFabricAttributes (Prelude.Maybe Prelude.Text)
nodeFabricAttributes_peerEventEndpoint :: Lens' NodeFabricAttributes (Maybe Text)
nodeFabricAttributes_peerEventEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeFabricAttributes' {Maybe Text
peerEventEndpoint :: Maybe Text
$sel:peerEventEndpoint:NodeFabricAttributes' :: NodeFabricAttributes -> Maybe Text
peerEventEndpoint} -> Maybe Text
peerEventEndpoint) (\s :: NodeFabricAttributes
s@NodeFabricAttributes' {} Maybe Text
a -> NodeFabricAttributes
s {$sel:peerEventEndpoint:NodeFabricAttributes' :: Maybe Text
peerEventEndpoint = Maybe Text
a} :: NodeFabricAttributes)
instance Data.FromJSON NodeFabricAttributes where
parseJSON :: Value -> Parser NodeFabricAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NodeFabricAttributes"
( \Object
x ->
Maybe Text -> Maybe Text -> NodeFabricAttributes
NodeFabricAttributes'
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
"PeerEndpoint")
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
"PeerEventEndpoint")
)
instance Prelude.Hashable NodeFabricAttributes where
hashWithSalt :: Int -> NodeFabricAttributes -> Int
hashWithSalt Int
_salt NodeFabricAttributes' {Maybe Text
peerEventEndpoint :: Maybe Text
peerEndpoint :: Maybe Text
$sel:peerEventEndpoint:NodeFabricAttributes' :: NodeFabricAttributes -> Maybe Text
$sel:peerEndpoint:NodeFabricAttributes' :: NodeFabricAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peerEndpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peerEventEndpoint
instance Prelude.NFData NodeFabricAttributes where
rnf :: NodeFabricAttributes -> ()
rnf NodeFabricAttributes' {Maybe Text
peerEventEndpoint :: Maybe Text
peerEndpoint :: Maybe Text
$sel:peerEventEndpoint:NodeFabricAttributes' :: NodeFabricAttributes -> Maybe Text
$sel:peerEndpoint:NodeFabricAttributes' :: NodeFabricAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
peerEndpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
peerEventEndpoint