{-# 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.EC2.Types.NetworkInterfaceAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data NetworkInterfaceAssociation = NetworkInterfaceAssociation'
{
NetworkInterfaceAssociation -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
NetworkInterfaceAssociation -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
NetworkInterfaceAssociation -> Maybe Text
carrierIp :: Prelude.Maybe Prelude.Text,
NetworkInterfaceAssociation -> Maybe Text
customerOwnedIp :: Prelude.Maybe Prelude.Text,
NetworkInterfaceAssociation -> Maybe Text
ipOwnerId :: Prelude.Maybe Prelude.Text,
NetworkInterfaceAssociation -> Maybe Text
publicDnsName :: Prelude.Maybe Prelude.Text,
NetworkInterfaceAssociation -> Maybe Text
publicIp :: Prelude.Maybe Prelude.Text
}
deriving (NetworkInterfaceAssociation -> NetworkInterfaceAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkInterfaceAssociation -> NetworkInterfaceAssociation -> Bool
$c/= :: NetworkInterfaceAssociation -> NetworkInterfaceAssociation -> Bool
== :: NetworkInterfaceAssociation -> NetworkInterfaceAssociation -> Bool
$c== :: NetworkInterfaceAssociation -> NetworkInterfaceAssociation -> Bool
Prelude.Eq, ReadPrec [NetworkInterfaceAssociation]
ReadPrec NetworkInterfaceAssociation
Int -> ReadS NetworkInterfaceAssociation
ReadS [NetworkInterfaceAssociation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkInterfaceAssociation]
$creadListPrec :: ReadPrec [NetworkInterfaceAssociation]
readPrec :: ReadPrec NetworkInterfaceAssociation
$creadPrec :: ReadPrec NetworkInterfaceAssociation
readList :: ReadS [NetworkInterfaceAssociation]
$creadList :: ReadS [NetworkInterfaceAssociation]
readsPrec :: Int -> ReadS NetworkInterfaceAssociation
$creadsPrec :: Int -> ReadS NetworkInterfaceAssociation
Prelude.Read, Int -> NetworkInterfaceAssociation -> ShowS
[NetworkInterfaceAssociation] -> ShowS
NetworkInterfaceAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkInterfaceAssociation] -> ShowS
$cshowList :: [NetworkInterfaceAssociation] -> ShowS
show :: NetworkInterfaceAssociation -> String
$cshow :: NetworkInterfaceAssociation -> String
showsPrec :: Int -> NetworkInterfaceAssociation -> ShowS
$cshowsPrec :: Int -> NetworkInterfaceAssociation -> ShowS
Prelude.Show, forall x.
Rep NetworkInterfaceAssociation x -> NetworkInterfaceAssociation
forall x.
NetworkInterfaceAssociation -> Rep NetworkInterfaceAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkInterfaceAssociation x -> NetworkInterfaceAssociation
$cfrom :: forall x.
NetworkInterfaceAssociation -> Rep NetworkInterfaceAssociation x
Prelude.Generic)
newNetworkInterfaceAssociation ::
NetworkInterfaceAssociation
newNetworkInterfaceAssociation :: NetworkInterfaceAssociation
newNetworkInterfaceAssociation =
NetworkInterfaceAssociation'
{ $sel:allocationId:NetworkInterfaceAssociation' :: Maybe Text
allocationId =
forall a. Maybe a
Prelude.Nothing,
$sel:associationId:NetworkInterfaceAssociation' :: Maybe Text
associationId = forall a. Maybe a
Prelude.Nothing,
$sel:carrierIp:NetworkInterfaceAssociation' :: Maybe Text
carrierIp = forall a. Maybe a
Prelude.Nothing,
$sel:customerOwnedIp:NetworkInterfaceAssociation' :: Maybe Text
customerOwnedIp = forall a. Maybe a
Prelude.Nothing,
$sel:ipOwnerId:NetworkInterfaceAssociation' :: Maybe Text
ipOwnerId = forall a. Maybe a
Prelude.Nothing,
$sel:publicDnsName:NetworkInterfaceAssociation' :: Maybe Text
publicDnsName = forall a. Maybe a
Prelude.Nothing,
$sel:publicIp:NetworkInterfaceAssociation' :: Maybe Text
publicIp = forall a. Maybe a
Prelude.Nothing
}
networkInterfaceAssociation_allocationId :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_allocationId :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_allocationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:allocationId:NetworkInterfaceAssociation' :: Maybe Text
allocationId = Maybe Text
a} :: NetworkInterfaceAssociation)
networkInterfaceAssociation_associationId :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_associationId :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_associationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
associationId :: Maybe Text
$sel:associationId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:associationId:NetworkInterfaceAssociation' :: Maybe Text
associationId = Maybe Text
a} :: NetworkInterfaceAssociation)
networkInterfaceAssociation_carrierIp :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_carrierIp :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_carrierIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
carrierIp :: Maybe Text
$sel:carrierIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
carrierIp} -> Maybe Text
carrierIp) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:carrierIp:NetworkInterfaceAssociation' :: Maybe Text
carrierIp = Maybe Text
a} :: NetworkInterfaceAssociation)
networkInterfaceAssociation_customerOwnedIp :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_customerOwnedIp :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_customerOwnedIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
customerOwnedIp :: Maybe Text
$sel:customerOwnedIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
customerOwnedIp} -> Maybe Text
customerOwnedIp) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:customerOwnedIp:NetworkInterfaceAssociation' :: Maybe Text
customerOwnedIp = Maybe Text
a} :: NetworkInterfaceAssociation)
networkInterfaceAssociation_ipOwnerId :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_ipOwnerId :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_ipOwnerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
ipOwnerId :: Maybe Text
$sel:ipOwnerId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
ipOwnerId} -> Maybe Text
ipOwnerId) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:ipOwnerId:NetworkInterfaceAssociation' :: Maybe Text
ipOwnerId = Maybe Text
a} :: NetworkInterfaceAssociation)
networkInterfaceAssociation_publicDnsName :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_publicDnsName :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_publicDnsName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
publicDnsName :: Maybe Text
$sel:publicDnsName:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
publicDnsName} -> Maybe Text
publicDnsName) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:publicDnsName:NetworkInterfaceAssociation' :: Maybe Text
publicDnsName = Maybe Text
a} :: NetworkInterfaceAssociation)
networkInterfaceAssociation_publicIp :: Lens.Lens' NetworkInterfaceAssociation (Prelude.Maybe Prelude.Text)
networkInterfaceAssociation_publicIp :: Lens' NetworkInterfaceAssociation (Maybe Text)
networkInterfaceAssociation_publicIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkInterfaceAssociation' {Maybe Text
publicIp :: Maybe Text
$sel:publicIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
publicIp} -> Maybe Text
publicIp) (\s :: NetworkInterfaceAssociation
s@NetworkInterfaceAssociation' {} Maybe Text
a -> NetworkInterfaceAssociation
s {$sel:publicIp:NetworkInterfaceAssociation' :: Maybe Text
publicIp = Maybe Text
a} :: NetworkInterfaceAssociation)
instance Data.FromXML NetworkInterfaceAssociation where
parseXML :: [Node] -> Either String NetworkInterfaceAssociation
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkInterfaceAssociation
NetworkInterfaceAssociation'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"allocationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"associationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"carrierIp")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"customerOwnedIp")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ipOwnerId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"publicDnsName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"publicIp")
instance Prelude.Hashable NetworkInterfaceAssociation where
hashWithSalt :: Int -> NetworkInterfaceAssociation -> Int
hashWithSalt Int
_salt NetworkInterfaceAssociation' {Maybe Text
publicIp :: Maybe Text
publicDnsName :: Maybe Text
ipOwnerId :: Maybe Text
customerOwnedIp :: Maybe Text
carrierIp :: Maybe Text
associationId :: Maybe Text
allocationId :: Maybe Text
$sel:publicIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:publicDnsName:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:ipOwnerId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:customerOwnedIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:carrierIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:associationId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:allocationId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
allocationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
associationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
carrierIp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customerOwnedIp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipOwnerId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicDnsName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicIp
instance Prelude.NFData NetworkInterfaceAssociation where
rnf :: NetworkInterfaceAssociation -> ()
rnf NetworkInterfaceAssociation' {Maybe Text
publicIp :: Maybe Text
publicDnsName :: Maybe Text
ipOwnerId :: Maybe Text
customerOwnedIp :: Maybe Text
carrierIp :: Maybe Text
associationId :: Maybe Text
allocationId :: Maybe Text
$sel:publicIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:publicDnsName:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:ipOwnerId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:customerOwnedIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:carrierIp:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:associationId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
$sel:allocationId:NetworkInterfaceAssociation' :: NetworkInterfaceAssociation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
allocationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
associationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
carrierIp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customerOwnedIp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipOwnerId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicDnsName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicIp