{-# 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.NatGatewayAddress 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 NatGatewayAddress = NatGatewayAddress'
{
NatGatewayAddress -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
NatGatewayAddress -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text,
NatGatewayAddress -> Maybe Text
privateIp :: Prelude.Maybe Prelude.Text,
NatGatewayAddress -> Maybe Text
publicIp :: Prelude.Maybe Prelude.Text
}
deriving (NatGatewayAddress -> NatGatewayAddress -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NatGatewayAddress -> NatGatewayAddress -> Bool
$c/= :: NatGatewayAddress -> NatGatewayAddress -> Bool
== :: NatGatewayAddress -> NatGatewayAddress -> Bool
$c== :: NatGatewayAddress -> NatGatewayAddress -> Bool
Prelude.Eq, ReadPrec [NatGatewayAddress]
ReadPrec NatGatewayAddress
Int -> ReadS NatGatewayAddress
ReadS [NatGatewayAddress]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NatGatewayAddress]
$creadListPrec :: ReadPrec [NatGatewayAddress]
readPrec :: ReadPrec NatGatewayAddress
$creadPrec :: ReadPrec NatGatewayAddress
readList :: ReadS [NatGatewayAddress]
$creadList :: ReadS [NatGatewayAddress]
readsPrec :: Int -> ReadS NatGatewayAddress
$creadsPrec :: Int -> ReadS NatGatewayAddress
Prelude.Read, Int -> NatGatewayAddress -> ShowS
[NatGatewayAddress] -> ShowS
NatGatewayAddress -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NatGatewayAddress] -> ShowS
$cshowList :: [NatGatewayAddress] -> ShowS
show :: NatGatewayAddress -> String
$cshow :: NatGatewayAddress -> String
showsPrec :: Int -> NatGatewayAddress -> ShowS
$cshowsPrec :: Int -> NatGatewayAddress -> ShowS
Prelude.Show, forall x. Rep NatGatewayAddress x -> NatGatewayAddress
forall x. NatGatewayAddress -> Rep NatGatewayAddress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NatGatewayAddress x -> NatGatewayAddress
$cfrom :: forall x. NatGatewayAddress -> Rep NatGatewayAddress x
Prelude.Generic)
newNatGatewayAddress ::
NatGatewayAddress
newNatGatewayAddress :: NatGatewayAddress
newNatGatewayAddress =
NatGatewayAddress'
{ $sel:allocationId:NatGatewayAddress' :: Maybe Text
allocationId = forall a. Maybe a
Prelude.Nothing,
$sel:networkInterfaceId:NatGatewayAddress' :: Maybe Text
networkInterfaceId = forall a. Maybe a
Prelude.Nothing,
$sel:privateIp:NatGatewayAddress' :: Maybe Text
privateIp = forall a. Maybe a
Prelude.Nothing,
$sel:publicIp:NatGatewayAddress' :: Maybe Text
publicIp = forall a. Maybe a
Prelude.Nothing
}
natGatewayAddress_allocationId :: Lens.Lens' NatGatewayAddress (Prelude.Maybe Prelude.Text)
natGatewayAddress_allocationId :: Lens' NatGatewayAddress (Maybe Text)
natGatewayAddress_allocationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NatGatewayAddress' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: NatGatewayAddress
s@NatGatewayAddress' {} Maybe Text
a -> NatGatewayAddress
s {$sel:allocationId:NatGatewayAddress' :: Maybe Text
allocationId = Maybe Text
a} :: NatGatewayAddress)
natGatewayAddress_networkInterfaceId :: Lens.Lens' NatGatewayAddress (Prelude.Maybe Prelude.Text)
natGatewayAddress_networkInterfaceId :: Lens' NatGatewayAddress (Maybe Text)
natGatewayAddress_networkInterfaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NatGatewayAddress' {Maybe Text
networkInterfaceId :: Maybe Text
$sel:networkInterfaceId:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
networkInterfaceId} -> Maybe Text
networkInterfaceId) (\s :: NatGatewayAddress
s@NatGatewayAddress' {} Maybe Text
a -> NatGatewayAddress
s {$sel:networkInterfaceId:NatGatewayAddress' :: Maybe Text
networkInterfaceId = Maybe Text
a} :: NatGatewayAddress)
natGatewayAddress_privateIp :: Lens.Lens' NatGatewayAddress (Prelude.Maybe Prelude.Text)
natGatewayAddress_privateIp :: Lens' NatGatewayAddress (Maybe Text)
natGatewayAddress_privateIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NatGatewayAddress' {Maybe Text
privateIp :: Maybe Text
$sel:privateIp:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
privateIp} -> Maybe Text
privateIp) (\s :: NatGatewayAddress
s@NatGatewayAddress' {} Maybe Text
a -> NatGatewayAddress
s {$sel:privateIp:NatGatewayAddress' :: Maybe Text
privateIp = Maybe Text
a} :: NatGatewayAddress)
natGatewayAddress_publicIp :: Lens.Lens' NatGatewayAddress (Prelude.Maybe Prelude.Text)
natGatewayAddress_publicIp :: Lens' NatGatewayAddress (Maybe Text)
natGatewayAddress_publicIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NatGatewayAddress' {Maybe Text
publicIp :: Maybe Text
$sel:publicIp:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
publicIp} -> Maybe Text
publicIp) (\s :: NatGatewayAddress
s@NatGatewayAddress' {} Maybe Text
a -> NatGatewayAddress
s {$sel:publicIp:NatGatewayAddress' :: Maybe Text
publicIp = Maybe Text
a} :: NatGatewayAddress)
instance Data.FromXML NatGatewayAddress where
parseXML :: [Node] -> Either String NatGatewayAddress
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> NatGatewayAddress
NatGatewayAddress'
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
"networkInterfaceId")
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
"privateIp")
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 NatGatewayAddress where
hashWithSalt :: Int -> NatGatewayAddress -> Int
hashWithSalt Int
_salt NatGatewayAddress' {Maybe Text
publicIp :: Maybe Text
privateIp :: Maybe Text
networkInterfaceId :: Maybe Text
allocationId :: Maybe Text
$sel:publicIp:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
$sel:privateIp:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
$sel:networkInterfaceId:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
$sel:allocationId:NatGatewayAddress' :: NatGatewayAddress -> 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
networkInterfaceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
privateIp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicIp
instance Prelude.NFData NatGatewayAddress where
rnf :: NatGatewayAddress -> ()
rnf NatGatewayAddress' {Maybe Text
publicIp :: Maybe Text
privateIp :: Maybe Text
networkInterfaceId :: Maybe Text
allocationId :: Maybe Text
$sel:publicIp:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
$sel:privateIp:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
$sel:networkInterfaceId:NatGatewayAddress' :: NatGatewayAddress -> Maybe Text
$sel:allocationId:NatGatewayAddress' :: NatGatewayAddress -> 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
networkInterfaceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
privateIp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicIp