{-# 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.S3Outposts.Types.NetworkInterface where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NetworkInterface = NetworkInterface'
{
NetworkInterface -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text
}
deriving (NetworkInterface -> NetworkInterface -> Bool
(NetworkInterface -> NetworkInterface -> Bool)
-> (NetworkInterface -> NetworkInterface -> Bool)
-> Eq NetworkInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkInterface -> NetworkInterface -> Bool
$c/= :: NetworkInterface -> NetworkInterface -> Bool
== :: NetworkInterface -> NetworkInterface -> Bool
$c== :: NetworkInterface -> NetworkInterface -> Bool
Prelude.Eq, ReadPrec [NetworkInterface]
ReadPrec NetworkInterface
Int -> ReadS NetworkInterface
ReadS [NetworkInterface]
(Int -> ReadS NetworkInterface)
-> ReadS [NetworkInterface]
-> ReadPrec NetworkInterface
-> ReadPrec [NetworkInterface]
-> Read NetworkInterface
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkInterface]
$creadListPrec :: ReadPrec [NetworkInterface]
readPrec :: ReadPrec NetworkInterface
$creadPrec :: ReadPrec NetworkInterface
readList :: ReadS [NetworkInterface]
$creadList :: ReadS [NetworkInterface]
readsPrec :: Int -> ReadS NetworkInterface
$creadsPrec :: Int -> ReadS NetworkInterface
Prelude.Read, Int -> NetworkInterface -> ShowS
[NetworkInterface] -> ShowS
NetworkInterface -> String
(Int -> NetworkInterface -> ShowS)
-> (NetworkInterface -> String)
-> ([NetworkInterface] -> ShowS)
-> Show NetworkInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkInterface] -> ShowS
$cshowList :: [NetworkInterface] -> ShowS
show :: NetworkInterface -> String
$cshow :: NetworkInterface -> String
showsPrec :: Int -> NetworkInterface -> ShowS
$cshowsPrec :: Int -> NetworkInterface -> ShowS
Prelude.Show, (forall x. NetworkInterface -> Rep NetworkInterface x)
-> (forall x. Rep NetworkInterface x -> NetworkInterface)
-> Generic NetworkInterface
forall x. Rep NetworkInterface x -> NetworkInterface
forall x. NetworkInterface -> Rep NetworkInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NetworkInterface x -> NetworkInterface
$cfrom :: forall x. NetworkInterface -> Rep NetworkInterface x
Prelude.Generic)
newNetworkInterface ::
NetworkInterface
newNetworkInterface :: NetworkInterface
newNetworkInterface =
NetworkInterface' :: Maybe Text -> NetworkInterface
NetworkInterface'
{ $sel:networkInterfaceId:NetworkInterface' :: Maybe Text
networkInterfaceId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
networkInterface_networkInterfaceId :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_networkInterfaceId :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_networkInterfaceId = (NetworkInterface -> Maybe Text)
-> (NetworkInterface -> Maybe Text -> NetworkInterface)
-> Lens NetworkInterface NetworkInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterface' {Maybe Text
networkInterfaceId :: Maybe Text
$sel:networkInterfaceId:NetworkInterface' :: NetworkInterface -> Maybe Text
networkInterfaceId} -> Maybe Text
networkInterfaceId) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:networkInterfaceId:NetworkInterface' :: Maybe Text
networkInterfaceId = Maybe Text
a} :: NetworkInterface)
instance Core.FromJSON NetworkInterface where
parseJSON :: Value -> Parser NetworkInterface
parseJSON =
String
-> (Object -> Parser NetworkInterface)
-> Value
-> Parser NetworkInterface
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NetworkInterface"
( \Object
x ->
Maybe Text -> NetworkInterface
NetworkInterface'
(Maybe Text -> NetworkInterface)
-> Parser (Maybe Text) -> Parser NetworkInterface
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
"NetworkInterfaceId")
)
instance Prelude.Hashable NetworkInterface
instance Prelude.NFData NetworkInterface