{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NodeFabricAttributes = NodeFabricAttributes'
{
NodeFabricAttributes -> Maybe Text
peerEventEndpoint :: Prelude.Maybe Prelude.Text,
NodeFabricAttributes -> Maybe Text
peerEndpoint :: Prelude.Maybe Prelude.Text
}
deriving (NodeFabricAttributes -> NodeFabricAttributes -> Bool
(NodeFabricAttributes -> NodeFabricAttributes -> Bool)
-> (NodeFabricAttributes -> NodeFabricAttributes -> Bool)
-> Eq NodeFabricAttributes
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]
(Int -> ReadS NodeFabricAttributes)
-> ReadS [NodeFabricAttributes]
-> ReadPrec NodeFabricAttributes
-> ReadPrec [NodeFabricAttributes]
-> Read 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
(Int -> NodeFabricAttributes -> ShowS)
-> (NodeFabricAttributes -> String)
-> ([NodeFabricAttributes] -> ShowS)
-> Show NodeFabricAttributes
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. NodeFabricAttributes -> Rep NodeFabricAttributes x)
-> (forall x. Rep NodeFabricAttributes x -> NodeFabricAttributes)
-> Generic NodeFabricAttributes
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' :: Maybe Text -> Maybe Text -> NodeFabricAttributes
NodeFabricAttributes'
{ $sel:peerEventEndpoint:NodeFabricAttributes' :: Maybe Text
peerEventEndpoint =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:peerEndpoint:NodeFabricAttributes' :: Maybe Text
peerEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
nodeFabricAttributes_peerEventEndpoint :: Lens.Lens' NodeFabricAttributes (Prelude.Maybe Prelude.Text)
nodeFabricAttributes_peerEventEndpoint :: (Maybe Text -> f (Maybe Text))
-> NodeFabricAttributes -> f NodeFabricAttributes
nodeFabricAttributes_peerEventEndpoint = (NodeFabricAttributes -> Maybe Text)
-> (NodeFabricAttributes -> Maybe Text -> NodeFabricAttributes)
-> Lens
NodeFabricAttributes NodeFabricAttributes (Maybe Text) (Maybe Text)
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)
nodeFabricAttributes_peerEndpoint :: Lens.Lens' NodeFabricAttributes (Prelude.Maybe Prelude.Text)
nodeFabricAttributes_peerEndpoint :: (Maybe Text -> f (Maybe Text))
-> NodeFabricAttributes -> f NodeFabricAttributes
nodeFabricAttributes_peerEndpoint = (NodeFabricAttributes -> Maybe Text)
-> (NodeFabricAttributes -> Maybe Text -> NodeFabricAttributes)
-> Lens
NodeFabricAttributes NodeFabricAttributes (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON NodeFabricAttributes where
parseJSON :: Value -> Parser NodeFabricAttributes
parseJSON =
String
-> (Object -> Parser NodeFabricAttributes)
-> Value
-> Parser NodeFabricAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NodeFabricAttributes"
( \Object
x ->
Maybe Text -> Maybe Text -> NodeFabricAttributes
NodeFabricAttributes'
(Maybe Text -> Maybe Text -> NodeFabricAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NodeFabricAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PeerEventEndpoint")
Parser (Maybe Text -> NodeFabricAttributes)
-> Parser (Maybe Text) -> Parser NodeFabricAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PeerEndpoint")
)
instance Prelude.Hashable NodeFabricAttributes
instance Prelude.NFData NodeFabricAttributes