{-# 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 #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.ManagedBlockChain.Types.NodeEthereumAttributes -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.ManagedBlockChain.Types.NodeEthereumAttributes 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 -- | Attributes of an Ethereum node. -- -- /See:/ 'newNodeEthereumAttributes' smart constructor. data NodeEthereumAttributes = NodeEthereumAttributes' { -- | The endpoint on which the Ethereum node listens to run Ethereum API -- methods over HTTP connections from a client. Use this endpoint in client -- code for smart contracts when using an HTTP connection. Connections to -- this endpoint are authenticated using -- . httpEndpoint :: Prelude.Maybe Prelude.Text, -- | The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC -- methods over WebSocket connections from a client. Use this endpoint in -- client code for smart contracts when using a WebSocket connection. -- Connections to this endpoint are authenticated using -- . webSocketEndpoint :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'NodeEthereumAttributes' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'httpEndpoint', 'nodeEthereumAttributes_httpEndpoint' - The endpoint on which the Ethereum node listens to run Ethereum API -- methods over HTTP connections from a client. Use this endpoint in client -- code for smart contracts when using an HTTP connection. Connections to -- this endpoint are authenticated using -- . -- -- 'webSocketEndpoint', 'nodeEthereumAttributes_webSocketEndpoint' - The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC -- methods over WebSocket connections from a client. Use this endpoint in -- client code for smart contracts when using a WebSocket connection. -- Connections to this endpoint are authenticated using -- . newNodeEthereumAttributes :: NodeEthereumAttributes newNodeEthereumAttributes = NodeEthereumAttributes' { httpEndpoint = Prelude.Nothing, webSocketEndpoint = Prelude.Nothing } -- | The endpoint on which the Ethereum node listens to run Ethereum API -- methods over HTTP connections from a client. Use this endpoint in client -- code for smart contracts when using an HTTP connection. Connections to -- this endpoint are authenticated using -- . nodeEthereumAttributes_httpEndpoint :: Lens.Lens' NodeEthereumAttributes (Prelude.Maybe Prelude.Text) nodeEthereumAttributes_httpEndpoint = Lens.lens (\NodeEthereumAttributes' {httpEndpoint} -> httpEndpoint) (\s@NodeEthereumAttributes' {} a -> s {httpEndpoint = a} :: NodeEthereumAttributes) -- | The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC -- methods over WebSocket connections from a client. Use this endpoint in -- client code for smart contracts when using a WebSocket connection. -- Connections to this endpoint are authenticated using -- . nodeEthereumAttributes_webSocketEndpoint :: Lens.Lens' NodeEthereumAttributes (Prelude.Maybe Prelude.Text) nodeEthereumAttributes_webSocketEndpoint = Lens.lens (\NodeEthereumAttributes' {webSocketEndpoint} -> webSocketEndpoint) (\s@NodeEthereumAttributes' {} a -> s {webSocketEndpoint = a} :: NodeEthereumAttributes) instance Data.FromJSON NodeEthereumAttributes where parseJSON = Data.withObject "NodeEthereumAttributes" ( \x -> NodeEthereumAttributes' Prelude.<$> (x Data..:? "HttpEndpoint") Prelude.<*> (x Data..:? "WebSocketEndpoint") ) instance Prelude.Hashable NodeEthereumAttributes where hashWithSalt _salt NodeEthereumAttributes' {..} = _salt `Prelude.hashWithSalt` httpEndpoint `Prelude.hashWithSalt` webSocketEndpoint instance Prelude.NFData NodeEthereumAttributes where rnf NodeEthereumAttributes' {..} = Prelude.rnf httpEndpoint `Prelude.seq` Prelude.rnf webSocketEndpoint