{-# 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.Inspector.Types.NetworkInterface where
import qualified Amazonka.Core as Core
import Amazonka.Inspector.Types.PrivateIp
import Amazonka.Inspector.Types.SecurityGroup
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NetworkInterface = NetworkInterface'
{
NetworkInterface -> Maybe [PrivateIp]
privateIpAddresses :: Prelude.Maybe [PrivateIp],
NetworkInterface -> Maybe Text
publicDnsName :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe [SecurityGroup]
securityGroups :: Prelude.Maybe [SecurityGroup],
NetworkInterface -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe Text
publicIp :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe Text
privateDnsName :: Prelude.Maybe Prelude.Text,
NetworkInterface -> Maybe [Text]
ipv6Addresses :: 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 [PrivateIp]
-> Maybe Text
-> Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface
NetworkInterface'
{ $sel:privateIpAddresses:NetworkInterface' :: Maybe [PrivateIp]
privateIpAddresses =
Maybe [PrivateIp]
forall a. Maybe a
Prelude.Nothing,
$sel:publicDnsName:NetworkInterface' :: Maybe Text
publicDnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroups:NetworkInterface' :: Maybe [SecurityGroup]
securityGroups = Maybe [SecurityGroup]
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:NetworkInterface' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:NetworkInterface' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkInterfaceId:NetworkInterface' :: Maybe Text
networkInterfaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateIpAddress:NetworkInterface' :: Maybe Text
privateIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:publicIp:NetworkInterface' :: Maybe Text
publicIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateDnsName:NetworkInterface' :: Maybe Text
privateDnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipv6Addresses:NetworkInterface' :: Maybe [Text]
ipv6Addresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
networkInterface_privateIpAddresses :: Lens.Lens' NetworkInterface (Prelude.Maybe [PrivateIp])
networkInterface_privateIpAddresses :: (Maybe [PrivateIp] -> f (Maybe [PrivateIp]))
-> NetworkInterface -> f NetworkInterface
networkInterface_privateIpAddresses = (NetworkInterface -> Maybe [PrivateIp])
-> (NetworkInterface -> Maybe [PrivateIp] -> NetworkInterface)
-> Lens
NetworkInterface
NetworkInterface
(Maybe [PrivateIp])
(Maybe [PrivateIp])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterface' {Maybe [PrivateIp]
privateIpAddresses :: Maybe [PrivateIp]
$sel:privateIpAddresses:NetworkInterface' :: NetworkInterface -> Maybe [PrivateIp]
privateIpAddresses} -> Maybe [PrivateIp]
privateIpAddresses) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe [PrivateIp]
a -> NetworkInterface
s {$sel:privateIpAddresses:NetworkInterface' :: Maybe [PrivateIp]
privateIpAddresses = Maybe [PrivateIp]
a} :: NetworkInterface) ((Maybe [PrivateIp] -> f (Maybe [PrivateIp]))
-> NetworkInterface -> f NetworkInterface)
-> ((Maybe [PrivateIp] -> f (Maybe [PrivateIp]))
-> Maybe [PrivateIp] -> f (Maybe [PrivateIp]))
-> (Maybe [PrivateIp] -> f (Maybe [PrivateIp]))
-> NetworkInterface
-> f NetworkInterface
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PrivateIp] [PrivateIp] [PrivateIp] [PrivateIp]
-> Iso
(Maybe [PrivateIp])
(Maybe [PrivateIp])
(Maybe [PrivateIp])
(Maybe [PrivateIp])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [PrivateIp] [PrivateIp] [PrivateIp] [PrivateIp]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
networkInterface_publicDnsName :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_publicDnsName :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_publicDnsName = (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
publicDnsName :: Maybe Text
$sel:publicDnsName:NetworkInterface' :: NetworkInterface -> Maybe Text
publicDnsName} -> Maybe Text
publicDnsName) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:publicDnsName:NetworkInterface' :: Maybe Text
publicDnsName = Maybe Text
a} :: NetworkInterface)
networkInterface_securityGroups :: Lens.Lens' NetworkInterface (Prelude.Maybe [SecurityGroup])
networkInterface_securityGroups :: (Maybe [SecurityGroup] -> f (Maybe [SecurityGroup]))
-> NetworkInterface -> f NetworkInterface
networkInterface_securityGroups = (NetworkInterface -> Maybe [SecurityGroup])
-> (NetworkInterface -> Maybe [SecurityGroup] -> NetworkInterface)
-> Lens
NetworkInterface
NetworkInterface
(Maybe [SecurityGroup])
(Maybe [SecurityGroup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterface' {Maybe [SecurityGroup]
securityGroups :: Maybe [SecurityGroup]
$sel:securityGroups:NetworkInterface' :: NetworkInterface -> Maybe [SecurityGroup]
securityGroups} -> Maybe [SecurityGroup]
securityGroups) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe [SecurityGroup]
a -> NetworkInterface
s {$sel:securityGroups:NetworkInterface' :: Maybe [SecurityGroup]
securityGroups = Maybe [SecurityGroup]
a} :: NetworkInterface) ((Maybe [SecurityGroup] -> f (Maybe [SecurityGroup]))
-> NetworkInterface -> f NetworkInterface)
-> ((Maybe [SecurityGroup] -> f (Maybe [SecurityGroup]))
-> Maybe [SecurityGroup] -> f (Maybe [SecurityGroup]))
-> (Maybe [SecurityGroup] -> f (Maybe [SecurityGroup]))
-> NetworkInterface
-> f NetworkInterface
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SecurityGroup] [SecurityGroup] [SecurityGroup] [SecurityGroup]
-> Iso
(Maybe [SecurityGroup])
(Maybe [SecurityGroup])
(Maybe [SecurityGroup])
(Maybe [SecurityGroup])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[SecurityGroup] [SecurityGroup] [SecurityGroup] [SecurityGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
networkInterface_vpcId :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_vpcId :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_vpcId = (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
vpcId :: Maybe Text
$sel:vpcId:NetworkInterface' :: NetworkInterface -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:vpcId:NetworkInterface' :: Maybe Text
vpcId = Maybe Text
a} :: NetworkInterface)
networkInterface_subnetId :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_subnetId :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_subnetId = (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
subnetId :: Maybe Text
$sel:subnetId:NetworkInterface' :: NetworkInterface -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:subnetId:NetworkInterface' :: Maybe Text
subnetId = Maybe Text
a} :: NetworkInterface)
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)
networkInterface_privateIpAddress :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_privateIpAddress :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_privateIpAddress = (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
privateIpAddress :: Maybe Text
$sel:privateIpAddress:NetworkInterface' :: NetworkInterface -> Maybe Text
privateIpAddress} -> Maybe Text
privateIpAddress) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:privateIpAddress:NetworkInterface' :: Maybe Text
privateIpAddress = Maybe Text
a} :: NetworkInterface)
networkInterface_publicIp :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_publicIp :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_publicIp = (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
publicIp :: Maybe Text
$sel:publicIp:NetworkInterface' :: NetworkInterface -> Maybe Text
publicIp} -> Maybe Text
publicIp) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:publicIp:NetworkInterface' :: Maybe Text
publicIp = Maybe Text
a} :: NetworkInterface)
networkInterface_privateDnsName :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)
networkInterface_privateDnsName :: (Maybe Text -> f (Maybe Text))
-> NetworkInterface -> f NetworkInterface
networkInterface_privateDnsName = (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
privateDnsName :: Maybe Text
$sel:privateDnsName:NetworkInterface' :: NetworkInterface -> Maybe Text
privateDnsName} -> Maybe Text
privateDnsName) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe Text
a -> NetworkInterface
s {$sel:privateDnsName:NetworkInterface' :: Maybe Text
privateDnsName = Maybe Text
a} :: NetworkInterface)
networkInterface_ipv6Addresses :: Lens.Lens' NetworkInterface (Prelude.Maybe [Prelude.Text])
networkInterface_ipv6Addresses :: (Maybe [Text] -> f (Maybe [Text]))
-> NetworkInterface -> f NetworkInterface
networkInterface_ipv6Addresses = (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]
ipv6Addresses :: Maybe [Text]
$sel:ipv6Addresses:NetworkInterface' :: NetworkInterface -> Maybe [Text]
ipv6Addresses} -> Maybe [Text]
ipv6Addresses) (\s :: NetworkInterface
s@NetworkInterface' {} Maybe [Text]
a -> NetworkInterface
s {$sel:ipv6Addresses:NetworkInterface' :: Maybe [Text]
ipv6Addresses = Maybe [Text]
a} :: NetworkInterface) ((Maybe [Text] -> f (Maybe [Text]))
-> NetworkInterface -> f NetworkInterface)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> NetworkInterface
-> f NetworkInterface
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
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 [PrivateIp]
-> Maybe Text
-> Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface
NetworkInterface'
(Maybe [PrivateIp]
-> Maybe Text
-> Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
-> Parser (Maybe [PrivateIp])
-> Parser
(Maybe Text
-> Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PrivateIp]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"privateIpAddresses"
Parser (Maybe (Maybe [PrivateIp]))
-> Maybe [PrivateIp] -> Parser (Maybe [PrivateIp])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PrivateIp]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
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
"publicDnsName")
Parser
(Maybe [SecurityGroup]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
-> Parser (Maybe [SecurityGroup])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [SecurityGroup]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"securityGroups" Parser (Maybe (Maybe [SecurityGroup]))
-> Maybe [SecurityGroup] -> Parser (Maybe [SecurityGroup])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SecurityGroup]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
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
"vpcId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
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
"subnetId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> NetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe [Text] -> NetworkInterface)
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
"networkInterfaceId")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe [Text] -> NetworkInterface)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe [Text] -> NetworkInterface)
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
"privateIpAddress")
Parser
(Maybe Text -> Maybe Text -> Maybe [Text] -> NetworkInterface)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Text] -> NetworkInterface)
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
"publicIp")
Parser (Maybe Text -> Maybe [Text] -> NetworkInterface)
-> Parser (Maybe Text) -> Parser (Maybe [Text] -> NetworkInterface)
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
"privateDnsName")
Parser (Maybe [Text] -> NetworkInterface)
-> Parser (Maybe [Text]) -> Parser NetworkInterface
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipv6Addresses" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable NetworkInterface
instance Prelude.NFData NetworkInterface