{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DirectConnect.Types.NewPrivateVirtualInterface
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DirectConnect.Types.NewPrivateVirtualInterface where

import qualified Amazonka.Core as Core
import Amazonka.DirectConnect.Types.AddressFamily
import Amazonka.DirectConnect.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about a private virtual interface.
--
-- /See:/ 'newNewPrivateVirtualInterface' smart constructor.
data NewPrivateVirtualInterface = NewPrivateVirtualInterface'
  { -- | The ID of the virtual private gateway.
    NewPrivateVirtualInterface -> Maybe Text
virtualGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The maximum transmission unit (MTU), in bytes. The supported values are
    -- 1500 and 9001. The default value is 1500.
    NewPrivateVirtualInterface -> Maybe Int
mtu :: Prelude.Maybe Prelude.Int,
    -- | The IP address assigned to the customer interface.
    NewPrivateVirtualInterface -> Maybe Text
customerAddress :: Prelude.Maybe Prelude.Text,
    -- | The IP address assigned to the Amazon interface.
    NewPrivateVirtualInterface -> Maybe Text
amazonAddress :: Prelude.Maybe Prelude.Text,
    -- | The address family for the BGP peer.
    NewPrivateVirtualInterface -> Maybe AddressFamily
addressFamily :: Prelude.Maybe AddressFamily,
    -- | The ID of the Direct Connect gateway.
    NewPrivateVirtualInterface -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The authentication key for BGP configuration. This string has a minimum
    -- length of 6 characters and and a maximun lenth of 80 characters.
    NewPrivateVirtualInterface -> Maybe Text
authKey :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with the private virtual interface.
    NewPrivateVirtualInterface -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The name of the virtual interface assigned by the customer network. The
    -- name has a maximum of 100 characters. The following are valid
    -- characters: a-z, 0-9 and a hyphen (-).
    NewPrivateVirtualInterface -> Text
virtualInterfaceName :: Prelude.Text,
    -- | The ID of the VLAN.
    NewPrivateVirtualInterface -> Int
vlan :: Prelude.Int,
    -- | The autonomous system (AS) number for Border Gateway Protocol (BGP)
    -- configuration.
    --
    -- The valid values are 1-2147483647.
    NewPrivateVirtualInterface -> Int
asn :: Prelude.Int
  }
  deriving (NewPrivateVirtualInterface -> NewPrivateVirtualInterface -> Bool
(NewPrivateVirtualInterface -> NewPrivateVirtualInterface -> Bool)
-> (NewPrivateVirtualInterface
    -> NewPrivateVirtualInterface -> Bool)
-> Eq NewPrivateVirtualInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NewPrivateVirtualInterface -> NewPrivateVirtualInterface -> Bool
$c/= :: NewPrivateVirtualInterface -> NewPrivateVirtualInterface -> Bool
== :: NewPrivateVirtualInterface -> NewPrivateVirtualInterface -> Bool
$c== :: NewPrivateVirtualInterface -> NewPrivateVirtualInterface -> Bool
Prelude.Eq, ReadPrec [NewPrivateVirtualInterface]
ReadPrec NewPrivateVirtualInterface
Int -> ReadS NewPrivateVirtualInterface
ReadS [NewPrivateVirtualInterface]
(Int -> ReadS NewPrivateVirtualInterface)
-> ReadS [NewPrivateVirtualInterface]
-> ReadPrec NewPrivateVirtualInterface
-> ReadPrec [NewPrivateVirtualInterface]
-> Read NewPrivateVirtualInterface
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NewPrivateVirtualInterface]
$creadListPrec :: ReadPrec [NewPrivateVirtualInterface]
readPrec :: ReadPrec NewPrivateVirtualInterface
$creadPrec :: ReadPrec NewPrivateVirtualInterface
readList :: ReadS [NewPrivateVirtualInterface]
$creadList :: ReadS [NewPrivateVirtualInterface]
readsPrec :: Int -> ReadS NewPrivateVirtualInterface
$creadsPrec :: Int -> ReadS NewPrivateVirtualInterface
Prelude.Read, Int -> NewPrivateVirtualInterface -> ShowS
[NewPrivateVirtualInterface] -> ShowS
NewPrivateVirtualInterface -> String
(Int -> NewPrivateVirtualInterface -> ShowS)
-> (NewPrivateVirtualInterface -> String)
-> ([NewPrivateVirtualInterface] -> ShowS)
-> Show NewPrivateVirtualInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NewPrivateVirtualInterface] -> ShowS
$cshowList :: [NewPrivateVirtualInterface] -> ShowS
show :: NewPrivateVirtualInterface -> String
$cshow :: NewPrivateVirtualInterface -> String
showsPrec :: Int -> NewPrivateVirtualInterface -> ShowS
$cshowsPrec :: Int -> NewPrivateVirtualInterface -> ShowS
Prelude.Show, (forall x.
 NewPrivateVirtualInterface -> Rep NewPrivateVirtualInterface x)
-> (forall x.
    Rep NewPrivateVirtualInterface x -> NewPrivateVirtualInterface)
-> Generic NewPrivateVirtualInterface
forall x.
Rep NewPrivateVirtualInterface x -> NewPrivateVirtualInterface
forall x.
NewPrivateVirtualInterface -> Rep NewPrivateVirtualInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NewPrivateVirtualInterface x -> NewPrivateVirtualInterface
$cfrom :: forall x.
NewPrivateVirtualInterface -> Rep NewPrivateVirtualInterface x
Prelude.Generic)

-- |
-- Create a value of 'NewPrivateVirtualInterface' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'virtualGatewayId', 'newPrivateVirtualInterface_virtualGatewayId' - The ID of the virtual private gateway.
--
-- 'mtu', 'newPrivateVirtualInterface_mtu' - The maximum transmission unit (MTU), in bytes. The supported values are
-- 1500 and 9001. The default value is 1500.
--
-- 'customerAddress', 'newPrivateVirtualInterface_customerAddress' - The IP address assigned to the customer interface.
--
-- 'amazonAddress', 'newPrivateVirtualInterface_amazonAddress' - The IP address assigned to the Amazon interface.
--
-- 'addressFamily', 'newPrivateVirtualInterface_addressFamily' - The address family for the BGP peer.
--
-- 'directConnectGatewayId', 'newPrivateVirtualInterface_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'authKey', 'newPrivateVirtualInterface_authKey' - The authentication key for BGP configuration. This string has a minimum
-- length of 6 characters and and a maximun lenth of 80 characters.
--
-- 'tags', 'newPrivateVirtualInterface_tags' - The tags associated with the private virtual interface.
--
-- 'virtualInterfaceName', 'newPrivateVirtualInterface_virtualInterfaceName' - The name of the virtual interface assigned by the customer network. The
-- name has a maximum of 100 characters. The following are valid
-- characters: a-z, 0-9 and a hyphen (-).
--
-- 'vlan', 'newPrivateVirtualInterface_vlan' - The ID of the VLAN.
--
-- 'asn', 'newPrivateVirtualInterface_asn' - The autonomous system (AS) number for Border Gateway Protocol (BGP)
-- configuration.
--
-- The valid values are 1-2147483647.
newNewPrivateVirtualInterface ::
  -- | 'virtualInterfaceName'
  Prelude.Text ->
  -- | 'vlan'
  Prelude.Int ->
  -- | 'asn'
  Prelude.Int ->
  NewPrivateVirtualInterface
newNewPrivateVirtualInterface :: Text -> Int -> Int -> NewPrivateVirtualInterface
newNewPrivateVirtualInterface
  Text
pVirtualInterfaceName_
  Int
pVlan_
  Int
pAsn_ =
    NewPrivateVirtualInterface' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe AddressFamily
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> Int
-> Int
-> NewPrivateVirtualInterface
NewPrivateVirtualInterface'
      { $sel:virtualGatewayId:NewPrivateVirtualInterface' :: Maybe Text
virtualGatewayId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:mtu:NewPrivateVirtualInterface' :: Maybe Int
mtu = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:customerAddress:NewPrivateVirtualInterface' :: Maybe Text
customerAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:amazonAddress:NewPrivateVirtualInterface' :: Maybe Text
amazonAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:addressFamily:NewPrivateVirtualInterface' :: Maybe AddressFamily
addressFamily = Maybe AddressFamily
forall a. Maybe a
Prelude.Nothing,
        $sel:directConnectGatewayId:NewPrivateVirtualInterface' :: Maybe Text
directConnectGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:authKey:NewPrivateVirtualInterface' :: Maybe Text
authKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:NewPrivateVirtualInterface' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
        $sel:virtualInterfaceName:NewPrivateVirtualInterface' :: Text
virtualInterfaceName = Text
pVirtualInterfaceName_,
        $sel:vlan:NewPrivateVirtualInterface' :: Int
vlan = Int
pVlan_,
        $sel:asn:NewPrivateVirtualInterface' :: Int
asn = Int
pAsn_
      }

-- | The ID of the virtual private gateway.
newPrivateVirtualInterface_virtualGatewayId :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
newPrivateVirtualInterface_virtualGatewayId :: (Maybe Text -> f (Maybe Text))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_virtualGatewayId = (NewPrivateVirtualInterface -> Maybe Text)
-> (NewPrivateVirtualInterface
    -> Maybe Text -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Text
virtualGatewayId :: Maybe Text
$sel:virtualGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
virtualGatewayId} -> Maybe Text
virtualGatewayId) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Text
a -> NewPrivateVirtualInterface
s {$sel:virtualGatewayId:NewPrivateVirtualInterface' :: Maybe Text
virtualGatewayId = Maybe Text
a} :: NewPrivateVirtualInterface)

-- | The maximum transmission unit (MTU), in bytes. The supported values are
-- 1500 and 9001. The default value is 1500.
newPrivateVirtualInterface_mtu :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Int)
newPrivateVirtualInterface_mtu :: (Maybe Int -> f (Maybe Int))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_mtu = (NewPrivateVirtualInterface -> Maybe Int)
-> (NewPrivateVirtualInterface
    -> Maybe Int -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Int
mtu :: Maybe Int
$sel:mtu:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Int
mtu} -> Maybe Int
mtu) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Int
a -> NewPrivateVirtualInterface
s {$sel:mtu:NewPrivateVirtualInterface' :: Maybe Int
mtu = Maybe Int
a} :: NewPrivateVirtualInterface)

-- | The IP address assigned to the customer interface.
newPrivateVirtualInterface_customerAddress :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
newPrivateVirtualInterface_customerAddress :: (Maybe Text -> f (Maybe Text))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_customerAddress = (NewPrivateVirtualInterface -> Maybe Text)
-> (NewPrivateVirtualInterface
    -> Maybe Text -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Text
customerAddress :: Maybe Text
$sel:customerAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
customerAddress} -> Maybe Text
customerAddress) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Text
a -> NewPrivateVirtualInterface
s {$sel:customerAddress:NewPrivateVirtualInterface' :: Maybe Text
customerAddress = Maybe Text
a} :: NewPrivateVirtualInterface)

-- | The IP address assigned to the Amazon interface.
newPrivateVirtualInterface_amazonAddress :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
newPrivateVirtualInterface_amazonAddress :: (Maybe Text -> f (Maybe Text))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_amazonAddress = (NewPrivateVirtualInterface -> Maybe Text)
-> (NewPrivateVirtualInterface
    -> Maybe Text -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Text
amazonAddress :: Maybe Text
$sel:amazonAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
amazonAddress} -> Maybe Text
amazonAddress) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Text
a -> NewPrivateVirtualInterface
s {$sel:amazonAddress:NewPrivateVirtualInterface' :: Maybe Text
amazonAddress = Maybe Text
a} :: NewPrivateVirtualInterface)

-- | The address family for the BGP peer.
newPrivateVirtualInterface_addressFamily :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe AddressFamily)
newPrivateVirtualInterface_addressFamily :: (Maybe AddressFamily -> f (Maybe AddressFamily))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_addressFamily = (NewPrivateVirtualInterface -> Maybe AddressFamily)
-> (NewPrivateVirtualInterface
    -> Maybe AddressFamily -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe AddressFamily)
     (Maybe AddressFamily)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe AddressFamily
addressFamily :: Maybe AddressFamily
$sel:addressFamily:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe AddressFamily
addressFamily} -> Maybe AddressFamily
addressFamily) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe AddressFamily
a -> NewPrivateVirtualInterface
s {$sel:addressFamily:NewPrivateVirtualInterface' :: Maybe AddressFamily
addressFamily = Maybe AddressFamily
a} :: NewPrivateVirtualInterface)

-- | The ID of the Direct Connect gateway.
newPrivateVirtualInterface_directConnectGatewayId :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
newPrivateVirtualInterface_directConnectGatewayId :: (Maybe Text -> f (Maybe Text))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_directConnectGatewayId = (NewPrivateVirtualInterface -> Maybe Text)
-> (NewPrivateVirtualInterface
    -> Maybe Text -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Text
directConnectGatewayId :: Maybe Text
$sel:directConnectGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
directConnectGatewayId} -> Maybe Text
directConnectGatewayId) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Text
a -> NewPrivateVirtualInterface
s {$sel:directConnectGatewayId:NewPrivateVirtualInterface' :: Maybe Text
directConnectGatewayId = Maybe Text
a} :: NewPrivateVirtualInterface)

-- | The authentication key for BGP configuration. This string has a minimum
-- length of 6 characters and and a maximun lenth of 80 characters.
newPrivateVirtualInterface_authKey :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
newPrivateVirtualInterface_authKey :: (Maybe Text -> f (Maybe Text))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_authKey = (NewPrivateVirtualInterface -> Maybe Text)
-> (NewPrivateVirtualInterface
    -> Maybe Text -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Text
authKey :: Maybe Text
$sel:authKey:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
authKey} -> Maybe Text
authKey) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Text
a -> NewPrivateVirtualInterface
s {$sel:authKey:NewPrivateVirtualInterface' :: Maybe Text
authKey = Maybe Text
a} :: NewPrivateVirtualInterface)

-- | The tags associated with the private virtual interface.
newPrivateVirtualInterface_tags :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe (Prelude.NonEmpty Tag))
newPrivateVirtualInterface_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_tags = (NewPrivateVirtualInterface -> Maybe (NonEmpty Tag))
-> (NewPrivateVirtualInterface
    -> Maybe (NonEmpty Tag) -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface
     NewPrivateVirtualInterface
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe (NonEmpty Tag)
a -> NewPrivateVirtualInterface
s {$sel:tags:NewPrivateVirtualInterface' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: NewPrivateVirtualInterface) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> NewPrivateVirtualInterface
-> f NewPrivateVirtualInterface
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

-- | The name of the virtual interface assigned by the customer network. The
-- name has a maximum of 100 characters. The following are valid
-- characters: a-z, 0-9 and a hyphen (-).
newPrivateVirtualInterface_virtualInterfaceName :: Lens.Lens' NewPrivateVirtualInterface Prelude.Text
newPrivateVirtualInterface_virtualInterfaceName :: (Text -> f Text)
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_virtualInterfaceName = (NewPrivateVirtualInterface -> Text)
-> (NewPrivateVirtualInterface
    -> Text -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface NewPrivateVirtualInterface Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Text
virtualInterfaceName :: Text
$sel:virtualInterfaceName:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Text
virtualInterfaceName} -> Text
virtualInterfaceName) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Text
a -> NewPrivateVirtualInterface
s {$sel:virtualInterfaceName:NewPrivateVirtualInterface' :: Text
virtualInterfaceName = Text
a} :: NewPrivateVirtualInterface)

-- | The ID of the VLAN.
newPrivateVirtualInterface_vlan :: Lens.Lens' NewPrivateVirtualInterface Prelude.Int
newPrivateVirtualInterface_vlan :: (Int -> f Int)
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_vlan = (NewPrivateVirtualInterface -> Int)
-> (NewPrivateVirtualInterface
    -> Int -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface NewPrivateVirtualInterface Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Int
vlan :: Int
$sel:vlan:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
vlan} -> Int
vlan) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Int
a -> NewPrivateVirtualInterface
s {$sel:vlan:NewPrivateVirtualInterface' :: Int
vlan = Int
a} :: NewPrivateVirtualInterface)

-- | The autonomous system (AS) number for Border Gateway Protocol (BGP)
-- configuration.
--
-- The valid values are 1-2147483647.
newPrivateVirtualInterface_asn :: Lens.Lens' NewPrivateVirtualInterface Prelude.Int
newPrivateVirtualInterface_asn :: (Int -> f Int)
-> NewPrivateVirtualInterface -> f NewPrivateVirtualInterface
newPrivateVirtualInterface_asn = (NewPrivateVirtualInterface -> Int)
-> (NewPrivateVirtualInterface
    -> Int -> NewPrivateVirtualInterface)
-> Lens
     NewPrivateVirtualInterface NewPrivateVirtualInterface Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Int
asn :: Int
$sel:asn:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
asn} -> Int
asn) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Int
a -> NewPrivateVirtualInterface
s {$sel:asn:NewPrivateVirtualInterface' :: Int
asn = Int
a} :: NewPrivateVirtualInterface)

instance Prelude.Hashable NewPrivateVirtualInterface

instance Prelude.NFData NewPrivateVirtualInterface

instance Core.ToJSON NewPrivateVirtualInterface where
  toJSON :: NewPrivateVirtualInterface -> Value
toJSON NewPrivateVirtualInterface' {Int
Maybe Int
Maybe (NonEmpty Tag)
Maybe Text
Maybe AddressFamily
Text
asn :: Int
vlan :: Int
virtualInterfaceName :: Text
tags :: Maybe (NonEmpty Tag)
authKey :: Maybe Text
directConnectGatewayId :: Maybe Text
addressFamily :: Maybe AddressFamily
amazonAddress :: Maybe Text
customerAddress :: Maybe Text
mtu :: Maybe Int
virtualGatewayId :: Maybe Text
$sel:asn:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
$sel:vlan:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
$sel:virtualInterfaceName:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Text
$sel:tags:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe (NonEmpty Tag)
$sel:authKey:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:directConnectGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:addressFamily:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe AddressFamily
$sel:amazonAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:customerAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:mtu:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Int
$sel:virtualGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"virtualGatewayId" 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
virtualGatewayId,
            (Text
"mtu" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
mtu,
            (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
"directConnectGatewayId" 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
directConnectGatewayId,
            (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)
          ]
      )