{-# 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.SnowDeviceManagement.Types.PhysicalNetworkInterface where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SnowDeviceManagement.Types.IpAddressAssignment
import Amazonka.SnowDeviceManagement.Types.PhysicalConnectorType
data PhysicalNetworkInterface = PhysicalNetworkInterface'
{
PhysicalNetworkInterface -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
PhysicalNetworkInterface -> Maybe Text
macAddress :: Prelude.Maybe Prelude.Text,
PhysicalNetworkInterface -> Maybe IpAddressAssignment
ipAddressAssignment :: Prelude.Maybe IpAddressAssignment,
PhysicalNetworkInterface -> Maybe Text
defaultGateway :: Prelude.Maybe Prelude.Text,
PhysicalNetworkInterface -> Maybe Text
physicalNetworkInterfaceId :: Prelude.Maybe Prelude.Text,
PhysicalNetworkInterface -> Maybe Text
netmask :: Prelude.Maybe Prelude.Text,
PhysicalNetworkInterface -> Maybe PhysicalConnectorType
physicalConnectorType :: Prelude.Maybe PhysicalConnectorType
}
deriving (PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool
(PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool)
-> (PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool)
-> Eq PhysicalNetworkInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool
$c/= :: PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool
== :: PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool
$c== :: PhysicalNetworkInterface -> PhysicalNetworkInterface -> Bool
Prelude.Eq, ReadPrec [PhysicalNetworkInterface]
ReadPrec PhysicalNetworkInterface
Int -> ReadS PhysicalNetworkInterface
ReadS [PhysicalNetworkInterface]
(Int -> ReadS PhysicalNetworkInterface)
-> ReadS [PhysicalNetworkInterface]
-> ReadPrec PhysicalNetworkInterface
-> ReadPrec [PhysicalNetworkInterface]
-> Read PhysicalNetworkInterface
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PhysicalNetworkInterface]
$creadListPrec :: ReadPrec [PhysicalNetworkInterface]
readPrec :: ReadPrec PhysicalNetworkInterface
$creadPrec :: ReadPrec PhysicalNetworkInterface
readList :: ReadS [PhysicalNetworkInterface]
$creadList :: ReadS [PhysicalNetworkInterface]
readsPrec :: Int -> ReadS PhysicalNetworkInterface
$creadsPrec :: Int -> ReadS PhysicalNetworkInterface
Prelude.Read, Int -> PhysicalNetworkInterface -> ShowS
[PhysicalNetworkInterface] -> ShowS
PhysicalNetworkInterface -> String
(Int -> PhysicalNetworkInterface -> ShowS)
-> (PhysicalNetworkInterface -> String)
-> ([PhysicalNetworkInterface] -> ShowS)
-> Show PhysicalNetworkInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PhysicalNetworkInterface] -> ShowS
$cshowList :: [PhysicalNetworkInterface] -> ShowS
show :: PhysicalNetworkInterface -> String
$cshow :: PhysicalNetworkInterface -> String
showsPrec :: Int -> PhysicalNetworkInterface -> ShowS
$cshowsPrec :: Int -> PhysicalNetworkInterface -> ShowS
Prelude.Show, (forall x.
PhysicalNetworkInterface -> Rep PhysicalNetworkInterface x)
-> (forall x.
Rep PhysicalNetworkInterface x -> PhysicalNetworkInterface)
-> Generic PhysicalNetworkInterface
forall x.
Rep PhysicalNetworkInterface x -> PhysicalNetworkInterface
forall x.
PhysicalNetworkInterface -> Rep PhysicalNetworkInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PhysicalNetworkInterface x -> PhysicalNetworkInterface
$cfrom :: forall x.
PhysicalNetworkInterface -> Rep PhysicalNetworkInterface x
Prelude.Generic)
newPhysicalNetworkInterface ::
PhysicalNetworkInterface
newPhysicalNetworkInterface :: PhysicalNetworkInterface
newPhysicalNetworkInterface =
PhysicalNetworkInterface' :: Maybe Text
-> Maybe Text
-> Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface
PhysicalNetworkInterface'
{ $sel:ipAddress:PhysicalNetworkInterface' :: Maybe Text
ipAddress =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:macAddress:PhysicalNetworkInterface' :: Maybe Text
macAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressAssignment:PhysicalNetworkInterface' :: Maybe IpAddressAssignment
ipAddressAssignment = Maybe IpAddressAssignment
forall a. Maybe a
Prelude.Nothing,
$sel:defaultGateway:PhysicalNetworkInterface' :: Maybe Text
defaultGateway = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:physicalNetworkInterfaceId:PhysicalNetworkInterface' :: Maybe Text
physicalNetworkInterfaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:netmask:PhysicalNetworkInterface' :: Maybe Text
netmask = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:physicalConnectorType:PhysicalNetworkInterface' :: Maybe PhysicalConnectorType
physicalConnectorType = Maybe PhysicalConnectorType
forall a. Maybe a
Prelude.Nothing
}
physicalNetworkInterface_ipAddress :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe Prelude.Text)
physicalNetworkInterface_ipAddress :: (Maybe Text -> f (Maybe Text))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_ipAddress = (PhysicalNetworkInterface -> Maybe Text)
-> (PhysicalNetworkInterface
-> Maybe Text -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe Text
a -> PhysicalNetworkInterface
s {$sel:ipAddress:PhysicalNetworkInterface' :: Maybe Text
ipAddress = Maybe Text
a} :: PhysicalNetworkInterface)
physicalNetworkInterface_macAddress :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe Prelude.Text)
physicalNetworkInterface_macAddress :: (Maybe Text -> f (Maybe Text))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_macAddress = (PhysicalNetworkInterface -> Maybe Text)
-> (PhysicalNetworkInterface
-> Maybe Text -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe Text
macAddress :: Maybe Text
$sel:macAddress:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe Text
macAddress} -> Maybe Text
macAddress) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe Text
a -> PhysicalNetworkInterface
s {$sel:macAddress:PhysicalNetworkInterface' :: Maybe Text
macAddress = Maybe Text
a} :: PhysicalNetworkInterface)
physicalNetworkInterface_ipAddressAssignment :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe IpAddressAssignment)
physicalNetworkInterface_ipAddressAssignment :: (Maybe IpAddressAssignment -> f (Maybe IpAddressAssignment))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_ipAddressAssignment = (PhysicalNetworkInterface -> Maybe IpAddressAssignment)
-> (PhysicalNetworkInterface
-> Maybe IpAddressAssignment -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe IpAddressAssignment)
(Maybe IpAddressAssignment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe IpAddressAssignment
ipAddressAssignment :: Maybe IpAddressAssignment
$sel:ipAddressAssignment:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe IpAddressAssignment
ipAddressAssignment} -> Maybe IpAddressAssignment
ipAddressAssignment) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe IpAddressAssignment
a -> PhysicalNetworkInterface
s {$sel:ipAddressAssignment:PhysicalNetworkInterface' :: Maybe IpAddressAssignment
ipAddressAssignment = Maybe IpAddressAssignment
a} :: PhysicalNetworkInterface)
physicalNetworkInterface_defaultGateway :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe Prelude.Text)
physicalNetworkInterface_defaultGateway :: (Maybe Text -> f (Maybe Text))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_defaultGateway = (PhysicalNetworkInterface -> Maybe Text)
-> (PhysicalNetworkInterface
-> Maybe Text -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe Text
defaultGateway :: Maybe Text
$sel:defaultGateway:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe Text
defaultGateway} -> Maybe Text
defaultGateway) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe Text
a -> PhysicalNetworkInterface
s {$sel:defaultGateway:PhysicalNetworkInterface' :: Maybe Text
defaultGateway = Maybe Text
a} :: PhysicalNetworkInterface)
physicalNetworkInterface_physicalNetworkInterfaceId :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe Prelude.Text)
physicalNetworkInterface_physicalNetworkInterfaceId :: (Maybe Text -> f (Maybe Text))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_physicalNetworkInterfaceId = (PhysicalNetworkInterface -> Maybe Text)
-> (PhysicalNetworkInterface
-> Maybe Text -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe Text
physicalNetworkInterfaceId :: Maybe Text
$sel:physicalNetworkInterfaceId:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe Text
physicalNetworkInterfaceId} -> Maybe Text
physicalNetworkInterfaceId) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe Text
a -> PhysicalNetworkInterface
s {$sel:physicalNetworkInterfaceId:PhysicalNetworkInterface' :: Maybe Text
physicalNetworkInterfaceId = Maybe Text
a} :: PhysicalNetworkInterface)
physicalNetworkInterface_netmask :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe Prelude.Text)
physicalNetworkInterface_netmask :: (Maybe Text -> f (Maybe Text))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_netmask = (PhysicalNetworkInterface -> Maybe Text)
-> (PhysicalNetworkInterface
-> Maybe Text -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe Text
netmask :: Maybe Text
$sel:netmask:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe Text
netmask} -> Maybe Text
netmask) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe Text
a -> PhysicalNetworkInterface
s {$sel:netmask:PhysicalNetworkInterface' :: Maybe Text
netmask = Maybe Text
a} :: PhysicalNetworkInterface)
physicalNetworkInterface_physicalConnectorType :: Lens.Lens' PhysicalNetworkInterface (Prelude.Maybe PhysicalConnectorType)
physicalNetworkInterface_physicalConnectorType :: (Maybe PhysicalConnectorType -> f (Maybe PhysicalConnectorType))
-> PhysicalNetworkInterface -> f PhysicalNetworkInterface
physicalNetworkInterface_physicalConnectorType = (PhysicalNetworkInterface -> Maybe PhysicalConnectorType)
-> (PhysicalNetworkInterface
-> Maybe PhysicalConnectorType -> PhysicalNetworkInterface)
-> Lens
PhysicalNetworkInterface
PhysicalNetworkInterface
(Maybe PhysicalConnectorType)
(Maybe PhysicalConnectorType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalNetworkInterface' {Maybe PhysicalConnectorType
physicalConnectorType :: Maybe PhysicalConnectorType
$sel:physicalConnectorType:PhysicalNetworkInterface' :: PhysicalNetworkInterface -> Maybe PhysicalConnectorType
physicalConnectorType} -> Maybe PhysicalConnectorType
physicalConnectorType) (\s :: PhysicalNetworkInterface
s@PhysicalNetworkInterface' {} Maybe PhysicalConnectorType
a -> PhysicalNetworkInterface
s {$sel:physicalConnectorType:PhysicalNetworkInterface' :: Maybe PhysicalConnectorType
physicalConnectorType = Maybe PhysicalConnectorType
a} :: PhysicalNetworkInterface)
instance Core.FromJSON PhysicalNetworkInterface where
parseJSON :: Value -> Parser PhysicalNetworkInterface
parseJSON =
String
-> (Object -> Parser PhysicalNetworkInterface)
-> Value
-> Parser PhysicalNetworkInterface
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PhysicalNetworkInterface"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface
PhysicalNetworkInterface'
(Maybe Text
-> Maybe Text
-> Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
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
"ipAddress")
Parser
(Maybe Text
-> Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
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
"macAddress")
Parser
(Maybe IpAddressAssignment
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
-> Parser (Maybe IpAddressAssignment)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IpAddressAssignment)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipAddressAssignment")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
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
"defaultGateway")
Parser
(Maybe Text
-> Maybe Text
-> Maybe PhysicalConnectorType
-> PhysicalNetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe PhysicalConnectorType -> PhysicalNetworkInterface)
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
"physicalNetworkInterfaceId")
Parser
(Maybe Text
-> Maybe PhysicalConnectorType -> PhysicalNetworkInterface)
-> Parser (Maybe Text)
-> Parser (Maybe PhysicalConnectorType -> PhysicalNetworkInterface)
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
"netmask")
Parser (Maybe PhysicalConnectorType -> PhysicalNetworkInterface)
-> Parser (Maybe PhysicalConnectorType)
-> Parser PhysicalNetworkInterface
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PhysicalConnectorType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"physicalConnectorType")
)
instance Prelude.Hashable PhysicalNetworkInterface
instance Prelude.NFData PhysicalNetworkInterface