{-# 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.RobOMaker.Types.NetworkInterface -- 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.RobOMaker.Types.NetworkInterface 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 -- | Describes a network interface. -- -- /See:/ 'newNetworkInterface' smart constructor. data NetworkInterface = NetworkInterface' { -- | The ID of the network interface. networkInterfaceId :: Prelude.Maybe Prelude.Text, -- | The IPv4 address of the network interface within the subnet. privateIpAddress :: Prelude.Maybe Prelude.Text, -- | The IPv4 public address of the network interface. publicIpAddress :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'NetworkInterface' 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: -- -- 'networkInterfaceId', 'networkInterface_networkInterfaceId' - The ID of the network interface. -- -- 'privateIpAddress', 'networkInterface_privateIpAddress' - The IPv4 address of the network interface within the subnet. -- -- 'publicIpAddress', 'networkInterface_publicIpAddress' - The IPv4 public address of the network interface. newNetworkInterface :: NetworkInterface newNetworkInterface = NetworkInterface' { networkInterfaceId = Prelude.Nothing, privateIpAddress = Prelude.Nothing, publicIpAddress = Prelude.Nothing } -- | The ID of the network interface. networkInterface_networkInterfaceId :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text) networkInterface_networkInterfaceId = Lens.lens (\NetworkInterface' {networkInterfaceId} -> networkInterfaceId) (\s@NetworkInterface' {} a -> s {networkInterfaceId = a} :: NetworkInterface) -- | The IPv4 address of the network interface within the subnet. networkInterface_privateIpAddress :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text) networkInterface_privateIpAddress = Lens.lens (\NetworkInterface' {privateIpAddress} -> privateIpAddress) (\s@NetworkInterface' {} a -> s {privateIpAddress = a} :: NetworkInterface) -- | The IPv4 public address of the network interface. networkInterface_publicIpAddress :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text) networkInterface_publicIpAddress = Lens.lens (\NetworkInterface' {publicIpAddress} -> publicIpAddress) (\s@NetworkInterface' {} a -> s {publicIpAddress = a} :: NetworkInterface) instance Data.FromJSON NetworkInterface where parseJSON = Data.withObject "NetworkInterface" ( \x -> NetworkInterface' Prelude.<$> (x Data..:? "networkInterfaceId") Prelude.<*> (x Data..:? "privateIpAddress") Prelude.<*> (x Data..:? "publicIpAddress") ) instance Prelude.Hashable NetworkInterface where hashWithSalt _salt NetworkInterface' {..} = _salt `Prelude.hashWithSalt` networkInterfaceId `Prelude.hashWithSalt` privateIpAddress `Prelude.hashWithSalt` publicIpAddress instance Prelude.NFData NetworkInterface where rnf NetworkInterface' {..} = Prelude.rnf networkInterfaceId `Prelude.seq` Prelude.rnf privateIpAddress `Prelude.seq` Prelude.rnf publicIpAddress