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

-- |
-- Create a value of 'NewTransitVirtualInterface' 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:
--
-- 'mtu', 'newTransitVirtualInterface_mtu' - The maximum transmission unit (MTU), in bytes. The supported values are
-- 1500 and 9001. The default value is 1500.
--
-- 'customerAddress', 'newTransitVirtualInterface_customerAddress' - The IP address assigned to the customer interface.
--
-- 'vlan', 'newTransitVirtualInterface_vlan' - The ID of the VLAN.
--
-- 'amazonAddress', 'newTransitVirtualInterface_amazonAddress' - The IP address assigned to the Amazon interface.
--
-- 'addressFamily', 'newTransitVirtualInterface_addressFamily' - The address family for the BGP peer.
--
-- 'directConnectGatewayId', 'newTransitVirtualInterface_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'asn', 'newTransitVirtualInterface_asn' - The autonomous system (AS) number for Border Gateway Protocol (BGP)
-- configuration.
--
-- The valid values are 1-2147483647.
--
-- 'authKey', 'newTransitVirtualInterface_authKey' - The authentication key for BGP configuration. This string has a minimum
-- length of 6 characters and and a maximun lenth of 80 characters.
--
-- 'virtualInterfaceName', 'newTransitVirtualInterface_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 (-).
--
-- 'tags', 'newTransitVirtualInterface_tags' - The tags associated with the transitive virtual interface.
newNewTransitVirtualInterface ::
  NewTransitVirtualInterface
newNewTransitVirtualInterface :: NewTransitVirtualInterface
newNewTransitVirtualInterface =
  NewTransitVirtualInterface' :: Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe AddressFamily
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> NewTransitVirtualInterface
NewTransitVirtualInterface'
    { $sel:mtu:NewTransitVirtualInterface' :: Maybe Int
mtu = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:customerAddress:NewTransitVirtualInterface' :: Maybe Text
customerAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vlan:NewTransitVirtualInterface' :: Maybe Int
vlan = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:amazonAddress:NewTransitVirtualInterface' :: Maybe Text
amazonAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:addressFamily:NewTransitVirtualInterface' :: Maybe AddressFamily
addressFamily = Maybe AddressFamily
forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:NewTransitVirtualInterface' :: Maybe Text
directConnectGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:asn:NewTransitVirtualInterface' :: Maybe Int
asn = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:authKey:NewTransitVirtualInterface' :: Maybe Text
authKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceName:NewTransitVirtualInterface' :: Maybe Text
virtualInterfaceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:NewTransitVirtualInterface' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

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

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

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

-- | 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 (-).
newTransitVirtualInterface_virtualInterfaceName :: Lens.Lens' NewTransitVirtualInterface (Prelude.Maybe Prelude.Text)
newTransitVirtualInterface_virtualInterfaceName :: (Maybe Text -> f (Maybe Text))
-> NewTransitVirtualInterface -> f NewTransitVirtualInterface
newTransitVirtualInterface_virtualInterfaceName = (NewTransitVirtualInterface -> Maybe Text)
-> (NewTransitVirtualInterface
    -> Maybe Text -> NewTransitVirtualInterface)
-> Lens
     NewTransitVirtualInterface
     NewTransitVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewTransitVirtualInterface' {Maybe Text
virtualInterfaceName :: Maybe Text
$sel:virtualInterfaceName:NewTransitVirtualInterface' :: NewTransitVirtualInterface -> Maybe Text
virtualInterfaceName} -> Maybe Text
virtualInterfaceName) (\s :: NewTransitVirtualInterface
s@NewTransitVirtualInterface' {} Maybe Text
a -> NewTransitVirtualInterface
s {$sel:virtualInterfaceName:NewTransitVirtualInterface' :: Maybe Text
virtualInterfaceName = Maybe Text
a} :: NewTransitVirtualInterface)

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

instance Prelude.Hashable NewTransitVirtualInterface

instance Prelude.NFData NewTransitVirtualInterface

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