{-# 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.DirectConnect.Types.NewPublicVirtualInterfaceAllocation where
import qualified Amazonka.Core as Core
import Amazonka.DirectConnect.Types.AddressFamily
import Amazonka.DirectConnect.Types.RouteFilterPrefix
import Amazonka.DirectConnect.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NewPublicVirtualInterfaceAllocation = NewPublicVirtualInterfaceAllocation'
{
NewPublicVirtualInterfaceAllocation -> Maybe [RouteFilterPrefix]
routeFilterPrefixes :: Prelude.Maybe [RouteFilterPrefix],
NewPublicVirtualInterfaceAllocation -> Maybe Text
customerAddress :: Prelude.Maybe Prelude.Text,
NewPublicVirtualInterfaceAllocation -> Maybe Text
amazonAddress :: Prelude.Maybe Prelude.Text,
NewPublicVirtualInterfaceAllocation -> Maybe AddressFamily
addressFamily :: Prelude.Maybe AddressFamily,
NewPublicVirtualInterfaceAllocation -> Maybe Text
authKey :: Prelude.Maybe Prelude.Text,
NewPublicVirtualInterfaceAllocation -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
NewPublicVirtualInterfaceAllocation -> Text
virtualInterfaceName :: Prelude.Text,
NewPublicVirtualInterfaceAllocation -> Int
vlan :: Prelude.Int,
NewPublicVirtualInterfaceAllocation -> Int
asn :: Prelude.Int
}
deriving (NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool
(NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool)
-> (NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool)
-> Eq NewPublicVirtualInterfaceAllocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool
$c/= :: NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool
== :: NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool
$c== :: NewPublicVirtualInterfaceAllocation
-> NewPublicVirtualInterfaceAllocation -> Bool
Prelude.Eq, ReadPrec [NewPublicVirtualInterfaceAllocation]
ReadPrec NewPublicVirtualInterfaceAllocation
Int -> ReadS NewPublicVirtualInterfaceAllocation
ReadS [NewPublicVirtualInterfaceAllocation]
(Int -> ReadS NewPublicVirtualInterfaceAllocation)
-> ReadS [NewPublicVirtualInterfaceAllocation]
-> ReadPrec NewPublicVirtualInterfaceAllocation
-> ReadPrec [NewPublicVirtualInterfaceAllocation]
-> Read NewPublicVirtualInterfaceAllocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NewPublicVirtualInterfaceAllocation]
$creadListPrec :: ReadPrec [NewPublicVirtualInterfaceAllocation]
readPrec :: ReadPrec NewPublicVirtualInterfaceAllocation
$creadPrec :: ReadPrec NewPublicVirtualInterfaceAllocation
readList :: ReadS [NewPublicVirtualInterfaceAllocation]
$creadList :: ReadS [NewPublicVirtualInterfaceAllocation]
readsPrec :: Int -> ReadS NewPublicVirtualInterfaceAllocation
$creadsPrec :: Int -> ReadS NewPublicVirtualInterfaceAllocation
Prelude.Read, Int -> NewPublicVirtualInterfaceAllocation -> ShowS
[NewPublicVirtualInterfaceAllocation] -> ShowS
NewPublicVirtualInterfaceAllocation -> String
(Int -> NewPublicVirtualInterfaceAllocation -> ShowS)
-> (NewPublicVirtualInterfaceAllocation -> String)
-> ([NewPublicVirtualInterfaceAllocation] -> ShowS)
-> Show NewPublicVirtualInterfaceAllocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NewPublicVirtualInterfaceAllocation] -> ShowS
$cshowList :: [NewPublicVirtualInterfaceAllocation] -> ShowS
show :: NewPublicVirtualInterfaceAllocation -> String
$cshow :: NewPublicVirtualInterfaceAllocation -> String
showsPrec :: Int -> NewPublicVirtualInterfaceAllocation -> ShowS
$cshowsPrec :: Int -> NewPublicVirtualInterfaceAllocation -> ShowS
Prelude.Show, (forall x.
NewPublicVirtualInterfaceAllocation
-> Rep NewPublicVirtualInterfaceAllocation x)
-> (forall x.
Rep NewPublicVirtualInterfaceAllocation x
-> NewPublicVirtualInterfaceAllocation)
-> Generic NewPublicVirtualInterfaceAllocation
forall x.
Rep NewPublicVirtualInterfaceAllocation x
-> NewPublicVirtualInterfaceAllocation
forall x.
NewPublicVirtualInterfaceAllocation
-> Rep NewPublicVirtualInterfaceAllocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NewPublicVirtualInterfaceAllocation x
-> NewPublicVirtualInterfaceAllocation
$cfrom :: forall x.
NewPublicVirtualInterfaceAllocation
-> Rep NewPublicVirtualInterfaceAllocation x
Prelude.Generic)
newNewPublicVirtualInterfaceAllocation ::
Prelude.Text ->
Prelude.Int ->
Prelude.Int ->
NewPublicVirtualInterfaceAllocation
newNewPublicVirtualInterfaceAllocation :: Text -> Int -> Int -> NewPublicVirtualInterfaceAllocation
newNewPublicVirtualInterfaceAllocation
Text
pVirtualInterfaceName_
Int
pVlan_
Int
pAsn_ =
NewPublicVirtualInterfaceAllocation' :: Maybe [RouteFilterPrefix]
-> Maybe Text
-> Maybe Text
-> Maybe AddressFamily
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> Int
-> Int
-> NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation'
{ $sel:routeFilterPrefixes:NewPublicVirtualInterfaceAllocation' :: Maybe [RouteFilterPrefix]
routeFilterPrefixes =
Maybe [RouteFilterPrefix]
forall a. Maybe a
Prelude.Nothing,
$sel:customerAddress:NewPublicVirtualInterfaceAllocation' :: Maybe Text
customerAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:amazonAddress:NewPublicVirtualInterfaceAllocation' :: Maybe Text
amazonAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:addressFamily:NewPublicVirtualInterfaceAllocation' :: Maybe AddressFamily
addressFamily = Maybe AddressFamily
forall a. Maybe a
Prelude.Nothing,
$sel:authKey:NewPublicVirtualInterfaceAllocation' :: Maybe Text
authKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:NewPublicVirtualInterfaceAllocation' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
$sel:virtualInterfaceName:NewPublicVirtualInterfaceAllocation' :: Text
virtualInterfaceName =
Text
pVirtualInterfaceName_,
$sel:vlan:NewPublicVirtualInterfaceAllocation' :: Int
vlan = Int
pVlan_,
$sel:asn:NewPublicVirtualInterfaceAllocation' :: Int
asn = Int
pAsn_
}
newPublicVirtualInterfaceAllocation_routeFilterPrefixes :: Lens.Lens' NewPublicVirtualInterfaceAllocation (Prelude.Maybe [RouteFilterPrefix])
newPublicVirtualInterfaceAllocation_routeFilterPrefixes :: (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_routeFilterPrefixes = (NewPublicVirtualInterfaceAllocation -> Maybe [RouteFilterPrefix])
-> (NewPublicVirtualInterfaceAllocation
-> Maybe [RouteFilterPrefix]
-> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
(Maybe [RouteFilterPrefix])
(Maybe [RouteFilterPrefix])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Maybe [RouteFilterPrefix]
routeFilterPrefixes :: Maybe [RouteFilterPrefix]
$sel:routeFilterPrefixes:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe [RouteFilterPrefix]
routeFilterPrefixes} -> Maybe [RouteFilterPrefix]
routeFilterPrefixes) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Maybe [RouteFilterPrefix]
a -> NewPublicVirtualInterfaceAllocation
s {$sel:routeFilterPrefixes:NewPublicVirtualInterfaceAllocation' :: Maybe [RouteFilterPrefix]
routeFilterPrefixes = Maybe [RouteFilterPrefix]
a} :: NewPublicVirtualInterfaceAllocation) ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation)
-> ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RouteFilterPrefix]
[RouteFilterPrefix]
[RouteFilterPrefix]
[RouteFilterPrefix]
-> Iso
(Maybe [RouteFilterPrefix])
(Maybe [RouteFilterPrefix])
(Maybe [RouteFilterPrefix])
(Maybe [RouteFilterPrefix])
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
[RouteFilterPrefix]
[RouteFilterPrefix]
[RouteFilterPrefix]
[RouteFilterPrefix]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
newPublicVirtualInterfaceAllocation_customerAddress :: Lens.Lens' NewPublicVirtualInterfaceAllocation (Prelude.Maybe Prelude.Text)
newPublicVirtualInterfaceAllocation_customerAddress :: (Maybe Text -> f (Maybe Text))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_customerAddress = (NewPublicVirtualInterfaceAllocation -> Maybe Text)
-> (NewPublicVirtualInterfaceAllocation
-> Maybe Text -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Maybe Text
customerAddress :: Maybe Text
$sel:customerAddress:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe Text
customerAddress} -> Maybe Text
customerAddress) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Maybe Text
a -> NewPublicVirtualInterfaceAllocation
s {$sel:customerAddress:NewPublicVirtualInterfaceAllocation' :: Maybe Text
customerAddress = Maybe Text
a} :: NewPublicVirtualInterfaceAllocation)
newPublicVirtualInterfaceAllocation_amazonAddress :: Lens.Lens' NewPublicVirtualInterfaceAllocation (Prelude.Maybe Prelude.Text)
newPublicVirtualInterfaceAllocation_amazonAddress :: (Maybe Text -> f (Maybe Text))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_amazonAddress = (NewPublicVirtualInterfaceAllocation -> Maybe Text)
-> (NewPublicVirtualInterfaceAllocation
-> Maybe Text -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Maybe Text
amazonAddress :: Maybe Text
$sel:amazonAddress:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe Text
amazonAddress} -> Maybe Text
amazonAddress) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Maybe Text
a -> NewPublicVirtualInterfaceAllocation
s {$sel:amazonAddress:NewPublicVirtualInterfaceAllocation' :: Maybe Text
amazonAddress = Maybe Text
a} :: NewPublicVirtualInterfaceAllocation)
newPublicVirtualInterfaceAllocation_addressFamily :: Lens.Lens' NewPublicVirtualInterfaceAllocation (Prelude.Maybe AddressFamily)
newPublicVirtualInterfaceAllocation_addressFamily :: (Maybe AddressFamily -> f (Maybe AddressFamily))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_addressFamily = (NewPublicVirtualInterfaceAllocation -> Maybe AddressFamily)
-> (NewPublicVirtualInterfaceAllocation
-> Maybe AddressFamily -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
(Maybe AddressFamily)
(Maybe AddressFamily)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Maybe AddressFamily
addressFamily :: Maybe AddressFamily
$sel:addressFamily:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe AddressFamily
addressFamily} -> Maybe AddressFamily
addressFamily) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Maybe AddressFamily
a -> NewPublicVirtualInterfaceAllocation
s {$sel:addressFamily:NewPublicVirtualInterfaceAllocation' :: Maybe AddressFamily
addressFamily = Maybe AddressFamily
a} :: NewPublicVirtualInterfaceAllocation)
newPublicVirtualInterfaceAllocation_authKey :: Lens.Lens' NewPublicVirtualInterfaceAllocation (Prelude.Maybe Prelude.Text)
newPublicVirtualInterfaceAllocation_authKey :: (Maybe Text -> f (Maybe Text))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_authKey = (NewPublicVirtualInterfaceAllocation -> Maybe Text)
-> (NewPublicVirtualInterfaceAllocation
-> Maybe Text -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Maybe Text
authKey :: Maybe Text
$sel:authKey:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe Text
authKey} -> Maybe Text
authKey) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Maybe Text
a -> NewPublicVirtualInterfaceAllocation
s {$sel:authKey:NewPublicVirtualInterfaceAllocation' :: Maybe Text
authKey = Maybe Text
a} :: NewPublicVirtualInterfaceAllocation)
newPublicVirtualInterfaceAllocation_tags :: Lens.Lens' NewPublicVirtualInterfaceAllocation (Prelude.Maybe (Prelude.NonEmpty Tag))
newPublicVirtualInterfaceAllocation_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_tags = (NewPublicVirtualInterfaceAllocation -> Maybe (NonEmpty Tag))
-> (NewPublicVirtualInterfaceAllocation
-> Maybe (NonEmpty Tag) -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Maybe (NonEmpty Tag)
a -> NewPublicVirtualInterfaceAllocation
s {$sel:tags:NewPublicVirtualInterfaceAllocation' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: NewPublicVirtualInterfaceAllocation) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
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 (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
newPublicVirtualInterfaceAllocation_virtualInterfaceName :: Lens.Lens' NewPublicVirtualInterfaceAllocation Prelude.Text
newPublicVirtualInterfaceAllocation_virtualInterfaceName :: (Text -> f Text)
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_virtualInterfaceName = (NewPublicVirtualInterfaceAllocation -> Text)
-> (NewPublicVirtualInterfaceAllocation
-> Text -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Text
virtualInterfaceName :: Text
$sel:virtualInterfaceName:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Text
virtualInterfaceName} -> Text
virtualInterfaceName) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Text
a -> NewPublicVirtualInterfaceAllocation
s {$sel:virtualInterfaceName:NewPublicVirtualInterfaceAllocation' :: Text
virtualInterfaceName = Text
a} :: NewPublicVirtualInterfaceAllocation)
newPublicVirtualInterfaceAllocation_vlan :: Lens.Lens' NewPublicVirtualInterfaceAllocation Prelude.Int
newPublicVirtualInterfaceAllocation_vlan :: (Int -> f Int)
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_vlan = (NewPublicVirtualInterfaceAllocation -> Int)
-> (NewPublicVirtualInterfaceAllocation
-> Int -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Int
vlan :: Int
$sel:vlan:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Int
vlan} -> Int
vlan) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Int
a -> NewPublicVirtualInterfaceAllocation
s {$sel:vlan:NewPublicVirtualInterfaceAllocation' :: Int
vlan = Int
a} :: NewPublicVirtualInterfaceAllocation)
newPublicVirtualInterfaceAllocation_asn :: Lens.Lens' NewPublicVirtualInterfaceAllocation Prelude.Int
newPublicVirtualInterfaceAllocation_asn :: (Int -> f Int)
-> NewPublicVirtualInterfaceAllocation
-> f NewPublicVirtualInterfaceAllocation
newPublicVirtualInterfaceAllocation_asn = (NewPublicVirtualInterfaceAllocation -> Int)
-> (NewPublicVirtualInterfaceAllocation
-> Int -> NewPublicVirtualInterfaceAllocation)
-> Lens
NewPublicVirtualInterfaceAllocation
NewPublicVirtualInterfaceAllocation
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPublicVirtualInterfaceAllocation' {Int
asn :: Int
$sel:asn:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Int
asn} -> Int
asn) (\s :: NewPublicVirtualInterfaceAllocation
s@NewPublicVirtualInterfaceAllocation' {} Int
a -> NewPublicVirtualInterfaceAllocation
s {$sel:asn:NewPublicVirtualInterfaceAllocation' :: Int
asn = Int
a} :: NewPublicVirtualInterfaceAllocation)
instance
Prelude.Hashable
NewPublicVirtualInterfaceAllocation
instance
Prelude.NFData
NewPublicVirtualInterfaceAllocation
instance
Core.ToJSON
NewPublicVirtualInterfaceAllocation
where
toJSON :: NewPublicVirtualInterfaceAllocation -> Value
toJSON NewPublicVirtualInterfaceAllocation' {Int
Maybe [RouteFilterPrefix]
Maybe (NonEmpty Tag)
Maybe Text
Maybe AddressFamily
Text
asn :: Int
vlan :: Int
virtualInterfaceName :: Text
tags :: Maybe (NonEmpty Tag)
authKey :: Maybe Text
addressFamily :: Maybe AddressFamily
amazonAddress :: Maybe Text
customerAddress :: Maybe Text
routeFilterPrefixes :: Maybe [RouteFilterPrefix]
$sel:asn:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Int
$sel:vlan:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Int
$sel:virtualInterfaceName:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Text
$sel:tags:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe (NonEmpty Tag)
$sel:authKey:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe Text
$sel:addressFamily:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe AddressFamily
$sel:amazonAddress:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe Text
$sel:customerAddress:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe Text
$sel:routeFilterPrefixes:NewPublicVirtualInterfaceAllocation' :: NewPublicVirtualInterfaceAllocation -> Maybe [RouteFilterPrefix]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"routeFilterPrefixes" Text -> [RouteFilterPrefix] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([RouteFilterPrefix] -> Pair)
-> Maybe [RouteFilterPrefix] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RouteFilterPrefix]
routeFilterPrefixes,
(Text
"customerAddress" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customerAddress,
(Text
"amazonAddress" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
amazonAddress,
(Text
"addressFamily" Text -> AddressFamily -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AddressFamily -> Pair) -> Maybe AddressFamily -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AddressFamily
addressFamily,
(Text
"authKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
authKey,
(Text
"tags" Text -> NonEmpty Tag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Tag -> Pair) -> Maybe (NonEmpty Tag) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"virtualInterfaceName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
virtualInterfaceName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"vlan" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
vlan),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"asn" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
asn)
]
)