{-# 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.ELBV2.Types.LoadBalancerAddress where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LoadBalancerAddress = LoadBalancerAddress'
{
LoadBalancerAddress -> Maybe Text
iPv6Address :: Prelude.Maybe Prelude.Text,
LoadBalancerAddress -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
LoadBalancerAddress -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
LoadBalancerAddress -> Maybe Text
privateIPv4Address :: Prelude.Maybe Prelude.Text
}
deriving (LoadBalancerAddress -> LoadBalancerAddress -> Bool
(LoadBalancerAddress -> LoadBalancerAddress -> Bool)
-> (LoadBalancerAddress -> LoadBalancerAddress -> Bool)
-> Eq LoadBalancerAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoadBalancerAddress -> LoadBalancerAddress -> Bool
$c/= :: LoadBalancerAddress -> LoadBalancerAddress -> Bool
== :: LoadBalancerAddress -> LoadBalancerAddress -> Bool
$c== :: LoadBalancerAddress -> LoadBalancerAddress -> Bool
Prelude.Eq, ReadPrec [LoadBalancerAddress]
ReadPrec LoadBalancerAddress
Int -> ReadS LoadBalancerAddress
ReadS [LoadBalancerAddress]
(Int -> ReadS LoadBalancerAddress)
-> ReadS [LoadBalancerAddress]
-> ReadPrec LoadBalancerAddress
-> ReadPrec [LoadBalancerAddress]
-> Read LoadBalancerAddress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LoadBalancerAddress]
$creadListPrec :: ReadPrec [LoadBalancerAddress]
readPrec :: ReadPrec LoadBalancerAddress
$creadPrec :: ReadPrec LoadBalancerAddress
readList :: ReadS [LoadBalancerAddress]
$creadList :: ReadS [LoadBalancerAddress]
readsPrec :: Int -> ReadS LoadBalancerAddress
$creadsPrec :: Int -> ReadS LoadBalancerAddress
Prelude.Read, Int -> LoadBalancerAddress -> ShowS
[LoadBalancerAddress] -> ShowS
LoadBalancerAddress -> String
(Int -> LoadBalancerAddress -> ShowS)
-> (LoadBalancerAddress -> String)
-> ([LoadBalancerAddress] -> ShowS)
-> Show LoadBalancerAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoadBalancerAddress] -> ShowS
$cshowList :: [LoadBalancerAddress] -> ShowS
show :: LoadBalancerAddress -> String
$cshow :: LoadBalancerAddress -> String
showsPrec :: Int -> LoadBalancerAddress -> ShowS
$cshowsPrec :: Int -> LoadBalancerAddress -> ShowS
Prelude.Show, (forall x. LoadBalancerAddress -> Rep LoadBalancerAddress x)
-> (forall x. Rep LoadBalancerAddress x -> LoadBalancerAddress)
-> Generic LoadBalancerAddress
forall x. Rep LoadBalancerAddress x -> LoadBalancerAddress
forall x. LoadBalancerAddress -> Rep LoadBalancerAddress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LoadBalancerAddress x -> LoadBalancerAddress
$cfrom :: forall x. LoadBalancerAddress -> Rep LoadBalancerAddress x
Prelude.Generic)
newLoadBalancerAddress ::
LoadBalancerAddress
newLoadBalancerAddress :: LoadBalancerAddress
newLoadBalancerAddress =
LoadBalancerAddress' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> LoadBalancerAddress
LoadBalancerAddress'
{ $sel:iPv6Address:LoadBalancerAddress' :: Maybe Text
iPv6Address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddress:LoadBalancerAddress' :: Maybe Text
ipAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allocationId:LoadBalancerAddress' :: Maybe Text
allocationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateIPv4Address:LoadBalancerAddress' :: Maybe Text
privateIPv4Address = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
loadBalancerAddress_iPv6Address :: Lens.Lens' LoadBalancerAddress (Prelude.Maybe Prelude.Text)
loadBalancerAddress_iPv6Address :: (Maybe Text -> f (Maybe Text))
-> LoadBalancerAddress -> f LoadBalancerAddress
loadBalancerAddress_iPv6Address = (LoadBalancerAddress -> Maybe Text)
-> (LoadBalancerAddress -> Maybe Text -> LoadBalancerAddress)
-> Lens
LoadBalancerAddress LoadBalancerAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancerAddress' {Maybe Text
iPv6Address :: Maybe Text
$sel:iPv6Address:LoadBalancerAddress' :: LoadBalancerAddress -> Maybe Text
iPv6Address} -> Maybe Text
iPv6Address) (\s :: LoadBalancerAddress
s@LoadBalancerAddress' {} Maybe Text
a -> LoadBalancerAddress
s {$sel:iPv6Address:LoadBalancerAddress' :: Maybe Text
iPv6Address = Maybe Text
a} :: LoadBalancerAddress)
loadBalancerAddress_ipAddress :: Lens.Lens' LoadBalancerAddress (Prelude.Maybe Prelude.Text)
loadBalancerAddress_ipAddress :: (Maybe Text -> f (Maybe Text))
-> LoadBalancerAddress -> f LoadBalancerAddress
loadBalancerAddress_ipAddress = (LoadBalancerAddress -> Maybe Text)
-> (LoadBalancerAddress -> Maybe Text -> LoadBalancerAddress)
-> Lens
LoadBalancerAddress LoadBalancerAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancerAddress' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:LoadBalancerAddress' :: LoadBalancerAddress -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: LoadBalancerAddress
s@LoadBalancerAddress' {} Maybe Text
a -> LoadBalancerAddress
s {$sel:ipAddress:LoadBalancerAddress' :: Maybe Text
ipAddress = Maybe Text
a} :: LoadBalancerAddress)
loadBalancerAddress_allocationId :: Lens.Lens' LoadBalancerAddress (Prelude.Maybe Prelude.Text)
loadBalancerAddress_allocationId :: (Maybe Text -> f (Maybe Text))
-> LoadBalancerAddress -> f LoadBalancerAddress
loadBalancerAddress_allocationId = (LoadBalancerAddress -> Maybe Text)
-> (LoadBalancerAddress -> Maybe Text -> LoadBalancerAddress)
-> Lens
LoadBalancerAddress LoadBalancerAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancerAddress' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:LoadBalancerAddress' :: LoadBalancerAddress -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: LoadBalancerAddress
s@LoadBalancerAddress' {} Maybe Text
a -> LoadBalancerAddress
s {$sel:allocationId:LoadBalancerAddress' :: Maybe Text
allocationId = Maybe Text
a} :: LoadBalancerAddress)
loadBalancerAddress_privateIPv4Address :: Lens.Lens' LoadBalancerAddress (Prelude.Maybe Prelude.Text)
loadBalancerAddress_privateIPv4Address :: (Maybe Text -> f (Maybe Text))
-> LoadBalancerAddress -> f LoadBalancerAddress
loadBalancerAddress_privateIPv4Address = (LoadBalancerAddress -> Maybe Text)
-> (LoadBalancerAddress -> Maybe Text -> LoadBalancerAddress)
-> Lens
LoadBalancerAddress LoadBalancerAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LoadBalancerAddress' {Maybe Text
privateIPv4Address :: Maybe Text
$sel:privateIPv4Address:LoadBalancerAddress' :: LoadBalancerAddress -> Maybe Text
privateIPv4Address} -> Maybe Text
privateIPv4Address) (\s :: LoadBalancerAddress
s@LoadBalancerAddress' {} Maybe Text
a -> LoadBalancerAddress
s {$sel:privateIPv4Address:LoadBalancerAddress' :: Maybe Text
privateIPv4Address = Maybe Text
a} :: LoadBalancerAddress)
instance Core.FromXML LoadBalancerAddress where
parseXML :: [Node] -> Either String LoadBalancerAddress
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> LoadBalancerAddress
LoadBalancerAddress'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> LoadBalancerAddress)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> LoadBalancerAddress)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IPv6Address")
Either
String
(Maybe Text -> Maybe Text -> Maybe Text -> LoadBalancerAddress)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> LoadBalancerAddress)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IpAddress")
Either String (Maybe Text -> Maybe Text -> LoadBalancerAddress)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> LoadBalancerAddress)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AllocationId")
Either String (Maybe Text -> LoadBalancerAddress)
-> Either String (Maybe Text) -> Either String LoadBalancerAddress
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PrivateIPv4Address")
instance Prelude.Hashable LoadBalancerAddress
instance Prelude.NFData LoadBalancerAddress