{-# 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.SubnetMapping where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SubnetMapping = SubnetMapping'
{
SubnetMapping -> Maybe Text
iPv6Address :: Prelude.Maybe Prelude.Text,
SubnetMapping -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
SubnetMapping -> Maybe Text
privateIPv4Address :: Prelude.Maybe Prelude.Text,
SubnetMapping -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text
}
deriving (SubnetMapping -> SubnetMapping -> Bool
(SubnetMapping -> SubnetMapping -> Bool)
-> (SubnetMapping -> SubnetMapping -> Bool) -> Eq SubnetMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubnetMapping -> SubnetMapping -> Bool
$c/= :: SubnetMapping -> SubnetMapping -> Bool
== :: SubnetMapping -> SubnetMapping -> Bool
$c== :: SubnetMapping -> SubnetMapping -> Bool
Prelude.Eq, ReadPrec [SubnetMapping]
ReadPrec SubnetMapping
Int -> ReadS SubnetMapping
ReadS [SubnetMapping]
(Int -> ReadS SubnetMapping)
-> ReadS [SubnetMapping]
-> ReadPrec SubnetMapping
-> ReadPrec [SubnetMapping]
-> Read SubnetMapping
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubnetMapping]
$creadListPrec :: ReadPrec [SubnetMapping]
readPrec :: ReadPrec SubnetMapping
$creadPrec :: ReadPrec SubnetMapping
readList :: ReadS [SubnetMapping]
$creadList :: ReadS [SubnetMapping]
readsPrec :: Int -> ReadS SubnetMapping
$creadsPrec :: Int -> ReadS SubnetMapping
Prelude.Read, Int -> SubnetMapping -> ShowS
[SubnetMapping] -> ShowS
SubnetMapping -> String
(Int -> SubnetMapping -> ShowS)
-> (SubnetMapping -> String)
-> ([SubnetMapping] -> ShowS)
-> Show SubnetMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubnetMapping] -> ShowS
$cshowList :: [SubnetMapping] -> ShowS
show :: SubnetMapping -> String
$cshow :: SubnetMapping -> String
showsPrec :: Int -> SubnetMapping -> ShowS
$cshowsPrec :: Int -> SubnetMapping -> ShowS
Prelude.Show, (forall x. SubnetMapping -> Rep SubnetMapping x)
-> (forall x. Rep SubnetMapping x -> SubnetMapping)
-> Generic SubnetMapping
forall x. Rep SubnetMapping x -> SubnetMapping
forall x. SubnetMapping -> Rep SubnetMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SubnetMapping x -> SubnetMapping
$cfrom :: forall x. SubnetMapping -> Rep SubnetMapping x
Prelude.Generic)
newSubnetMapping ::
SubnetMapping
newSubnetMapping :: SubnetMapping
newSubnetMapping =
SubnetMapping' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> SubnetMapping
SubnetMapping'
{ $sel:iPv6Address:SubnetMapping' :: Maybe Text
iPv6Address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allocationId:SubnetMapping' :: Maybe Text
allocationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateIPv4Address:SubnetMapping' :: Maybe Text
privateIPv4Address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:SubnetMapping' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
subnetMapping_iPv6Address :: Lens.Lens' SubnetMapping (Prelude.Maybe Prelude.Text)
subnetMapping_iPv6Address :: (Maybe Text -> f (Maybe Text)) -> SubnetMapping -> f SubnetMapping
subnetMapping_iPv6Address = (SubnetMapping -> Maybe Text)
-> (SubnetMapping -> Maybe Text -> SubnetMapping)
-> Lens SubnetMapping SubnetMapping (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubnetMapping' {Maybe Text
iPv6Address :: Maybe Text
$sel:iPv6Address:SubnetMapping' :: SubnetMapping -> Maybe Text
iPv6Address} -> Maybe Text
iPv6Address) (\s :: SubnetMapping
s@SubnetMapping' {} Maybe Text
a -> SubnetMapping
s {$sel:iPv6Address:SubnetMapping' :: Maybe Text
iPv6Address = Maybe Text
a} :: SubnetMapping)
subnetMapping_allocationId :: Lens.Lens' SubnetMapping (Prelude.Maybe Prelude.Text)
subnetMapping_allocationId :: (Maybe Text -> f (Maybe Text)) -> SubnetMapping -> f SubnetMapping
subnetMapping_allocationId = (SubnetMapping -> Maybe Text)
-> (SubnetMapping -> Maybe Text -> SubnetMapping)
-> Lens SubnetMapping SubnetMapping (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubnetMapping' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:SubnetMapping' :: SubnetMapping -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: SubnetMapping
s@SubnetMapping' {} Maybe Text
a -> SubnetMapping
s {$sel:allocationId:SubnetMapping' :: Maybe Text
allocationId = Maybe Text
a} :: SubnetMapping)
subnetMapping_privateIPv4Address :: Lens.Lens' SubnetMapping (Prelude.Maybe Prelude.Text)
subnetMapping_privateIPv4Address :: (Maybe Text -> f (Maybe Text)) -> SubnetMapping -> f SubnetMapping
subnetMapping_privateIPv4Address = (SubnetMapping -> Maybe Text)
-> (SubnetMapping -> Maybe Text -> SubnetMapping)
-> Lens SubnetMapping SubnetMapping (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubnetMapping' {Maybe Text
privateIPv4Address :: Maybe Text
$sel:privateIPv4Address:SubnetMapping' :: SubnetMapping -> Maybe Text
privateIPv4Address} -> Maybe Text
privateIPv4Address) (\s :: SubnetMapping
s@SubnetMapping' {} Maybe Text
a -> SubnetMapping
s {$sel:privateIPv4Address:SubnetMapping' :: Maybe Text
privateIPv4Address = Maybe Text
a} :: SubnetMapping)
subnetMapping_subnetId :: Lens.Lens' SubnetMapping (Prelude.Maybe Prelude.Text)
subnetMapping_subnetId :: (Maybe Text -> f (Maybe Text)) -> SubnetMapping -> f SubnetMapping
subnetMapping_subnetId = (SubnetMapping -> Maybe Text)
-> (SubnetMapping -> Maybe Text -> SubnetMapping)
-> Lens SubnetMapping SubnetMapping (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubnetMapping' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:SubnetMapping' :: SubnetMapping -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: SubnetMapping
s@SubnetMapping' {} Maybe Text
a -> SubnetMapping
s {$sel:subnetId:SubnetMapping' :: Maybe Text
subnetId = Maybe Text
a} :: SubnetMapping)
instance Prelude.Hashable SubnetMapping
instance Prelude.NFData SubnetMapping
instance Core.ToQuery SubnetMapping where
toQuery :: SubnetMapping -> QueryString
toQuery SubnetMapping' {Maybe Text
subnetId :: Maybe Text
privateIPv4Address :: Maybe Text
allocationId :: Maybe Text
iPv6Address :: Maybe Text
$sel:subnetId:SubnetMapping' :: SubnetMapping -> Maybe Text
$sel:privateIPv4Address:SubnetMapping' :: SubnetMapping -> Maybe Text
$sel:allocationId:SubnetMapping' :: SubnetMapping -> Maybe Text
$sel:iPv6Address:SubnetMapping' :: SubnetMapping -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"IPv6Address" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
iPv6Address,
ByteString
"AllocationId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
allocationId,
ByteString
"PrivateIPv4Address" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
privateIPv4Address,
ByteString
"SubnetId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
subnetId
]