{-# 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.VirtualInterface
-- 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.VirtualInterface where

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

-- | Information about a virtual interface.
--
-- /See:/ 'newVirtualInterface' smart constructor.
data VirtualInterface = VirtualInterface'
  { -- | The BGP peers configured on this virtual interface.
    VirtualInterface -> Maybe [BGPPeer]
bgpPeers :: Prelude.Maybe [BGPPeer],
    -- | The ID of the virtual private gateway. Applies only to private virtual
    -- interfaces.
    VirtualInterface -> 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.
    VirtualInterface -> Maybe Int
mtu :: Prelude.Maybe Prelude.Int,
    -- | The routes to be advertised to the Amazon Web Services network in this
    -- Region. Applies to public virtual interfaces.
    VirtualInterface -> Maybe [RouteFilterPrefix]
routeFilterPrefixes :: Prelude.Maybe [RouteFilterPrefix],
    -- | The IP address assigned to the customer interface.
    VirtualInterface -> Maybe Text
customerAddress :: Prelude.Maybe Prelude.Text,
    -- | The ID of the VLAN.
    VirtualInterface -> Maybe Int
vlan :: Prelude.Maybe Prelude.Int,
    -- | The location of the connection.
    VirtualInterface -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
    -- | The IP address assigned to the Amazon interface.
    VirtualInterface -> Maybe Text
amazonAddress :: Prelude.Maybe Prelude.Text,
    -- | The address family for the BGP peer.
    VirtualInterface -> Maybe AddressFamily
addressFamily :: Prelude.Maybe AddressFamily,
    -- | The state of the virtual interface. The following are the possible
    -- values:
    --
    -- -   @confirming@: The creation of the virtual interface is pending
    --     confirmation from the virtual interface owner. If the owner of the
    --     virtual interface is different from the owner of the connection on
    --     which it is provisioned, then the virtual interface will remain in
    --     this state until it is confirmed by the virtual interface owner.
    --
    -- -   @verifying@: This state only applies to public virtual interfaces.
    --     Each public virtual interface needs validation before the virtual
    --     interface can be created.
    --
    -- -   @pending@: A virtual interface is in this state from the time that
    --     it is created until the virtual interface is ready to forward
    --     traffic.
    --
    -- -   @available@: A virtual interface that is able to forward traffic.
    --
    -- -   @down@: A virtual interface that is BGP down.
    --
    -- -   @deleting@: A virtual interface is in this state immediately after
    --     calling DeleteVirtualInterface until it can no longer forward
    --     traffic.
    --
    -- -   @deleted@: A virtual interface that cannot forward traffic.
    --
    -- -   @rejected@: The virtual interface owner has declined creation of the
    --     virtual interface. If a virtual interface in the @Confirming@ state
    --     is deleted by the virtual interface owner, the virtual interface
    --     enters the @Rejected@ state.
    --
    -- -   @unknown@: The state of the virtual interface is not available.
    VirtualInterface -> Maybe VirtualInterfaceState
virtualInterfaceState :: Prelude.Maybe VirtualInterfaceState,
    -- | The ID of the connection.
    VirtualInterface -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
    -- | The Direct Connect endpoint that terminates the logical connection. This
    -- device might be different than the device that terminates the physical
    -- connection.
    VirtualInterface -> Maybe Text
awsLogicalDeviceId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Direct Connect gateway.
    VirtualInterface -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The autonomous system number (ASN) for the Amazon side of the
    -- connection.
    VirtualInterface -> Maybe Integer
amazonSideAsn :: Prelude.Maybe Prelude.Integer,
    -- | The type of virtual interface. The possible values are @private@ and
    -- @public@.
    VirtualInterface -> Maybe Text
virtualInterfaceType :: Prelude.Maybe Prelude.Text,
    -- | The autonomous system (AS) number for Border Gateway Protocol (BGP)
    -- configuration.
    --
    -- The valid values are 1-2147483647.
    VirtualInterface -> 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.
    VirtualInterface -> Maybe Text
authKey :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether jumbo frames (9001 MTU) are supported.
    VirtualInterface -> Maybe Bool
jumboFrameCapable :: Prelude.Maybe Prelude.Bool,
    -- | The customer router configuration.
    VirtualInterface -> Maybe Text
customerRouterConfig :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Web Services account that owns the virtual
    -- interface.
    VirtualInterface -> Maybe Text
ownerAccount :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services Region where the virtual interface is located.
    VirtualInterface -> Maybe Text
region :: 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 (-).
    VirtualInterface -> Maybe Text
virtualInterfaceName :: Prelude.Maybe Prelude.Text,
    -- | The Direct Connect endpoint that terminates the physical connection.
    VirtualInterface -> Maybe Text
awsDeviceV2 :: Prelude.Maybe Prelude.Text,
    -- | The ID of the virtual interface.
    VirtualInterface -> Maybe Text
virtualInterfaceId :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with the virtual interface.
    VirtualInterface -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag)
  }
  deriving (VirtualInterface -> VirtualInterface -> Bool
(VirtualInterface -> VirtualInterface -> Bool)
-> (VirtualInterface -> VirtualInterface -> Bool)
-> Eq VirtualInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualInterface -> VirtualInterface -> Bool
$c/= :: VirtualInterface -> VirtualInterface -> Bool
== :: VirtualInterface -> VirtualInterface -> Bool
$c== :: VirtualInterface -> VirtualInterface -> Bool
Prelude.Eq, ReadPrec [VirtualInterface]
ReadPrec VirtualInterface
Int -> ReadS VirtualInterface
ReadS [VirtualInterface]
(Int -> ReadS VirtualInterface)
-> ReadS [VirtualInterface]
-> ReadPrec VirtualInterface
-> ReadPrec [VirtualInterface]
-> Read VirtualInterface
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualInterface]
$creadListPrec :: ReadPrec [VirtualInterface]
readPrec :: ReadPrec VirtualInterface
$creadPrec :: ReadPrec VirtualInterface
readList :: ReadS [VirtualInterface]
$creadList :: ReadS [VirtualInterface]
readsPrec :: Int -> ReadS VirtualInterface
$creadsPrec :: Int -> ReadS VirtualInterface
Prelude.Read, Int -> VirtualInterface -> ShowS
[VirtualInterface] -> ShowS
VirtualInterface -> String
(Int -> VirtualInterface -> ShowS)
-> (VirtualInterface -> String)
-> ([VirtualInterface] -> ShowS)
-> Show VirtualInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualInterface] -> ShowS
$cshowList :: [VirtualInterface] -> ShowS
show :: VirtualInterface -> String
$cshow :: VirtualInterface -> String
showsPrec :: Int -> VirtualInterface -> ShowS
$cshowsPrec :: Int -> VirtualInterface -> ShowS
Prelude.Show, (forall x. VirtualInterface -> Rep VirtualInterface x)
-> (forall x. Rep VirtualInterface x -> VirtualInterface)
-> Generic VirtualInterface
forall x. Rep VirtualInterface x -> VirtualInterface
forall x. VirtualInterface -> Rep VirtualInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VirtualInterface x -> VirtualInterface
$cfrom :: forall x. VirtualInterface -> Rep VirtualInterface x
Prelude.Generic)

-- |
-- Create a value of 'VirtualInterface' 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:
--
-- 'bgpPeers', 'virtualInterface_bgpPeers' - The BGP peers configured on this virtual interface.
--
-- 'virtualGatewayId', 'virtualInterface_virtualGatewayId' - The ID of the virtual private gateway. Applies only to private virtual
-- interfaces.
--
-- 'mtu', 'virtualInterface_mtu' - The maximum transmission unit (MTU), in bytes. The supported values are
-- 1500 and 9001. The default value is 1500.
--
-- 'routeFilterPrefixes', 'virtualInterface_routeFilterPrefixes' - The routes to be advertised to the Amazon Web Services network in this
-- Region. Applies to public virtual interfaces.
--
-- 'customerAddress', 'virtualInterface_customerAddress' - The IP address assigned to the customer interface.
--
-- 'vlan', 'virtualInterface_vlan' - The ID of the VLAN.
--
-- 'location', 'virtualInterface_location' - The location of the connection.
--
-- 'amazonAddress', 'virtualInterface_amazonAddress' - The IP address assigned to the Amazon interface.
--
-- 'addressFamily', 'virtualInterface_addressFamily' - The address family for the BGP peer.
--
-- 'virtualInterfaceState', 'virtualInterface_virtualInterfaceState' - The state of the virtual interface. The following are the possible
-- values:
--
-- -   @confirming@: The creation of the virtual interface is pending
--     confirmation from the virtual interface owner. If the owner of the
--     virtual interface is different from the owner of the connection on
--     which it is provisioned, then the virtual interface will remain in
--     this state until it is confirmed by the virtual interface owner.
--
-- -   @verifying@: This state only applies to public virtual interfaces.
--     Each public virtual interface needs validation before the virtual
--     interface can be created.
--
-- -   @pending@: A virtual interface is in this state from the time that
--     it is created until the virtual interface is ready to forward
--     traffic.
--
-- -   @available@: A virtual interface that is able to forward traffic.
--
-- -   @down@: A virtual interface that is BGP down.
--
-- -   @deleting@: A virtual interface is in this state immediately after
--     calling DeleteVirtualInterface until it can no longer forward
--     traffic.
--
-- -   @deleted@: A virtual interface that cannot forward traffic.
--
-- -   @rejected@: The virtual interface owner has declined creation of the
--     virtual interface. If a virtual interface in the @Confirming@ state
--     is deleted by the virtual interface owner, the virtual interface
--     enters the @Rejected@ state.
--
-- -   @unknown@: The state of the virtual interface is not available.
--
-- 'connectionId', 'virtualInterface_connectionId' - The ID of the connection.
--
-- 'awsLogicalDeviceId', 'virtualInterface_awsLogicalDeviceId' - The Direct Connect endpoint that terminates the logical connection. This
-- device might be different than the device that terminates the physical
-- connection.
--
-- 'directConnectGatewayId', 'virtualInterface_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'amazonSideAsn', 'virtualInterface_amazonSideAsn' - The autonomous system number (ASN) for the Amazon side of the
-- connection.
--
-- 'virtualInterfaceType', 'virtualInterface_virtualInterfaceType' - The type of virtual interface. The possible values are @private@ and
-- @public@.
--
-- 'asn', 'virtualInterface_asn' - The autonomous system (AS) number for Border Gateway Protocol (BGP)
-- configuration.
--
-- The valid values are 1-2147483647.
--
-- 'authKey', 'virtualInterface_authKey' - The authentication key for BGP configuration. This string has a minimum
-- length of 6 characters and and a maximun lenth of 80 characters.
--
-- 'jumboFrameCapable', 'virtualInterface_jumboFrameCapable' - Indicates whether jumbo frames (9001 MTU) are supported.
--
-- 'customerRouterConfig', 'virtualInterface_customerRouterConfig' - The customer router configuration.
--
-- 'ownerAccount', 'virtualInterface_ownerAccount' - The ID of the Amazon Web Services account that owns the virtual
-- interface.
--
-- 'region', 'virtualInterface_region' - The Amazon Web Services Region where the virtual interface is located.
--
-- 'virtualInterfaceName', 'virtualInterface_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 (-).
--
-- 'awsDeviceV2', 'virtualInterface_awsDeviceV2' - The Direct Connect endpoint that terminates the physical connection.
--
-- 'virtualInterfaceId', 'virtualInterface_virtualInterfaceId' - The ID of the virtual interface.
--
-- 'tags', 'virtualInterface_tags' - The tags associated with the virtual interface.
newVirtualInterface ::
  VirtualInterface
newVirtualInterface :: VirtualInterface
newVirtualInterface =
  VirtualInterface' :: Maybe [BGPPeer]
-> Maybe Text
-> Maybe Int
-> Maybe [RouteFilterPrefix]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe AddressFamily
-> Maybe VirtualInterfaceState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> VirtualInterface
VirtualInterface'
    { $sel:bgpPeers:VirtualInterface' :: Maybe [BGPPeer]
bgpPeers = Maybe [BGPPeer]
forall a. Maybe a
Prelude.Nothing,
      $sel:virtualGatewayId:VirtualInterface' :: Maybe Text
virtualGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mtu:VirtualInterface' :: Maybe Int
mtu = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:routeFilterPrefixes:VirtualInterface' :: Maybe [RouteFilterPrefix]
routeFilterPrefixes = Maybe [RouteFilterPrefix]
forall a. Maybe a
Prelude.Nothing,
      $sel:customerAddress:VirtualInterface' :: Maybe Text
customerAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vlan:VirtualInterface' :: Maybe Int
vlan = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:location:VirtualInterface' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:amazonAddress:VirtualInterface' :: Maybe Text
amazonAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:addressFamily:VirtualInterface' :: Maybe AddressFamily
addressFamily = Maybe AddressFamily
forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceState:VirtualInterface' :: Maybe VirtualInterfaceState
virtualInterfaceState = Maybe VirtualInterfaceState
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:VirtualInterface' :: Maybe Text
connectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsLogicalDeviceId:VirtualInterface' :: Maybe Text
awsLogicalDeviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:VirtualInterface' :: Maybe Text
directConnectGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:amazonSideAsn:VirtualInterface' :: Maybe Integer
amazonSideAsn = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceType:VirtualInterface' :: Maybe Text
virtualInterfaceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:asn:VirtualInterface' :: Maybe Int
asn = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:authKey:VirtualInterface' :: Maybe Text
authKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jumboFrameCapable:VirtualInterface' :: Maybe Bool
jumboFrameCapable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:customerRouterConfig:VirtualInterface' :: Maybe Text
customerRouterConfig = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccount:VirtualInterface' :: Maybe Text
ownerAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:VirtualInterface' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceName:VirtualInterface' :: Maybe Text
virtualInterfaceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsDeviceV2:VirtualInterface' :: Maybe Text
awsDeviceV2 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceId:VirtualInterface' :: Maybe Text
virtualInterfaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:VirtualInterface' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing
    }

-- | The BGP peers configured on this virtual interface.
virtualInterface_bgpPeers :: Lens.Lens' VirtualInterface (Prelude.Maybe [BGPPeer])
virtualInterface_bgpPeers :: (Maybe [BGPPeer] -> f (Maybe [BGPPeer]))
-> VirtualInterface -> f VirtualInterface
virtualInterface_bgpPeers = (VirtualInterface -> Maybe [BGPPeer])
-> (VirtualInterface -> Maybe [BGPPeer] -> VirtualInterface)
-> Lens
     VirtualInterface
     VirtualInterface
     (Maybe [BGPPeer])
     (Maybe [BGPPeer])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe [BGPPeer]
bgpPeers :: Maybe [BGPPeer]
$sel:bgpPeers:VirtualInterface' :: VirtualInterface -> Maybe [BGPPeer]
bgpPeers} -> Maybe [BGPPeer]
bgpPeers) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe [BGPPeer]
a -> VirtualInterface
s {$sel:bgpPeers:VirtualInterface' :: Maybe [BGPPeer]
bgpPeers = Maybe [BGPPeer]
a} :: VirtualInterface) ((Maybe [BGPPeer] -> f (Maybe [BGPPeer]))
 -> VirtualInterface -> f VirtualInterface)
-> ((Maybe [BGPPeer] -> f (Maybe [BGPPeer]))
    -> Maybe [BGPPeer] -> f (Maybe [BGPPeer]))
-> (Maybe [BGPPeer] -> f (Maybe [BGPPeer]))
-> VirtualInterface
-> f VirtualInterface
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [BGPPeer] [BGPPeer] [BGPPeer] [BGPPeer]
-> Iso
     (Maybe [BGPPeer])
     (Maybe [BGPPeer])
     (Maybe [BGPPeer])
     (Maybe [BGPPeer])
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 [BGPPeer] [BGPPeer] [BGPPeer] [BGPPeer]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | The routes to be advertised to the Amazon Web Services network in this
-- Region. Applies to public virtual interfaces.
virtualInterface_routeFilterPrefixes :: Lens.Lens' VirtualInterface (Prelude.Maybe [RouteFilterPrefix])
virtualInterface_routeFilterPrefixes :: (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> VirtualInterface -> f VirtualInterface
virtualInterface_routeFilterPrefixes = (VirtualInterface -> Maybe [RouteFilterPrefix])
-> (VirtualInterface
    -> Maybe [RouteFilterPrefix] -> VirtualInterface)
-> Lens
     VirtualInterface
     VirtualInterface
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe [RouteFilterPrefix]
routeFilterPrefixes :: Maybe [RouteFilterPrefix]
$sel:routeFilterPrefixes:VirtualInterface' :: VirtualInterface -> Maybe [RouteFilterPrefix]
routeFilterPrefixes} -> Maybe [RouteFilterPrefix]
routeFilterPrefixes) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe [RouteFilterPrefix]
a -> VirtualInterface
s {$sel:routeFilterPrefixes:VirtualInterface' :: Maybe [RouteFilterPrefix]
routeFilterPrefixes = Maybe [RouteFilterPrefix]
a} :: VirtualInterface) ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
 -> VirtualInterface -> f VirtualInterface)
-> ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
    -> Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> VirtualInterface
-> f VirtualInterface
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

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

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

-- | The location of the connection.
virtualInterface_location :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_location :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_location = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
location :: Maybe Text
$sel:location:VirtualInterface' :: VirtualInterface -> Maybe Text
location} -> Maybe Text
location) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:location:VirtualInterface' :: Maybe Text
location = Maybe Text
a} :: VirtualInterface)

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

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

-- | The state of the virtual interface. The following are the possible
-- values:
--
-- -   @confirming@: The creation of the virtual interface is pending
--     confirmation from the virtual interface owner. If the owner of the
--     virtual interface is different from the owner of the connection on
--     which it is provisioned, then the virtual interface will remain in
--     this state until it is confirmed by the virtual interface owner.
--
-- -   @verifying@: This state only applies to public virtual interfaces.
--     Each public virtual interface needs validation before the virtual
--     interface can be created.
--
-- -   @pending@: A virtual interface is in this state from the time that
--     it is created until the virtual interface is ready to forward
--     traffic.
--
-- -   @available@: A virtual interface that is able to forward traffic.
--
-- -   @down@: A virtual interface that is BGP down.
--
-- -   @deleting@: A virtual interface is in this state immediately after
--     calling DeleteVirtualInterface until it can no longer forward
--     traffic.
--
-- -   @deleted@: A virtual interface that cannot forward traffic.
--
-- -   @rejected@: The virtual interface owner has declined creation of the
--     virtual interface. If a virtual interface in the @Confirming@ state
--     is deleted by the virtual interface owner, the virtual interface
--     enters the @Rejected@ state.
--
-- -   @unknown@: The state of the virtual interface is not available.
virtualInterface_virtualInterfaceState :: Lens.Lens' VirtualInterface (Prelude.Maybe VirtualInterfaceState)
virtualInterface_virtualInterfaceState :: (Maybe VirtualInterfaceState -> f (Maybe VirtualInterfaceState))
-> VirtualInterface -> f VirtualInterface
virtualInterface_virtualInterfaceState = (VirtualInterface -> Maybe VirtualInterfaceState)
-> (VirtualInterface
    -> Maybe VirtualInterfaceState -> VirtualInterface)
-> Lens
     VirtualInterface
     VirtualInterface
     (Maybe VirtualInterfaceState)
     (Maybe VirtualInterfaceState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe VirtualInterfaceState
virtualInterfaceState :: Maybe VirtualInterfaceState
$sel:virtualInterfaceState:VirtualInterface' :: VirtualInterface -> Maybe VirtualInterfaceState
virtualInterfaceState} -> Maybe VirtualInterfaceState
virtualInterfaceState) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe VirtualInterfaceState
a -> VirtualInterface
s {$sel:virtualInterfaceState:VirtualInterface' :: Maybe VirtualInterfaceState
virtualInterfaceState = Maybe VirtualInterfaceState
a} :: VirtualInterface)

-- | The ID of the connection.
virtualInterface_connectionId :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_connectionId :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_connectionId = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:VirtualInterface' :: VirtualInterface -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:connectionId:VirtualInterface' :: Maybe Text
connectionId = Maybe Text
a} :: VirtualInterface)

-- | The Direct Connect endpoint that terminates the logical connection. This
-- device might be different than the device that terminates the physical
-- connection.
virtualInterface_awsLogicalDeviceId :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_awsLogicalDeviceId :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_awsLogicalDeviceId = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
awsLogicalDeviceId :: Maybe Text
$sel:awsLogicalDeviceId:VirtualInterface' :: VirtualInterface -> Maybe Text
awsLogicalDeviceId} -> Maybe Text
awsLogicalDeviceId) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:awsLogicalDeviceId:VirtualInterface' :: Maybe Text
awsLogicalDeviceId = Maybe Text
a} :: VirtualInterface)

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

-- | The autonomous system number (ASN) for the Amazon side of the
-- connection.
virtualInterface_amazonSideAsn :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Integer)
virtualInterface_amazonSideAsn :: (Maybe Integer -> f (Maybe Integer))
-> VirtualInterface -> f VirtualInterface
virtualInterface_amazonSideAsn = (VirtualInterface -> Maybe Integer)
-> (VirtualInterface -> Maybe Integer -> VirtualInterface)
-> Lens
     VirtualInterface VirtualInterface (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Integer
amazonSideAsn :: Maybe Integer
$sel:amazonSideAsn:VirtualInterface' :: VirtualInterface -> Maybe Integer
amazonSideAsn} -> Maybe Integer
amazonSideAsn) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Integer
a -> VirtualInterface
s {$sel:amazonSideAsn:VirtualInterface' :: Maybe Integer
amazonSideAsn = Maybe Integer
a} :: VirtualInterface)

-- | The type of virtual interface. The possible values are @private@ and
-- @public@.
virtualInterface_virtualInterfaceType :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_virtualInterfaceType :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_virtualInterfaceType = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
virtualInterfaceType :: Maybe Text
$sel:virtualInterfaceType:VirtualInterface' :: VirtualInterface -> Maybe Text
virtualInterfaceType} -> Maybe Text
virtualInterfaceType) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:virtualInterfaceType:VirtualInterface' :: Maybe Text
virtualInterfaceType = Maybe Text
a} :: VirtualInterface)

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

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

-- | Indicates whether jumbo frames (9001 MTU) are supported.
virtualInterface_jumboFrameCapable :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Bool)
virtualInterface_jumboFrameCapable :: (Maybe Bool -> f (Maybe Bool))
-> VirtualInterface -> f VirtualInterface
virtualInterface_jumboFrameCapable = (VirtualInterface -> Maybe Bool)
-> (VirtualInterface -> Maybe Bool -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Bool
jumboFrameCapable :: Maybe Bool
$sel:jumboFrameCapable:VirtualInterface' :: VirtualInterface -> Maybe Bool
jumboFrameCapable} -> Maybe Bool
jumboFrameCapable) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Bool
a -> VirtualInterface
s {$sel:jumboFrameCapable:VirtualInterface' :: Maybe Bool
jumboFrameCapable = Maybe Bool
a} :: VirtualInterface)

-- | The customer router configuration.
virtualInterface_customerRouterConfig :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_customerRouterConfig :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_customerRouterConfig = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
customerRouterConfig :: Maybe Text
$sel:customerRouterConfig:VirtualInterface' :: VirtualInterface -> Maybe Text
customerRouterConfig} -> Maybe Text
customerRouterConfig) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:customerRouterConfig:VirtualInterface' :: Maybe Text
customerRouterConfig = Maybe Text
a} :: VirtualInterface)

-- | The ID of the Amazon Web Services account that owns the virtual
-- interface.
virtualInterface_ownerAccount :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_ownerAccount :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_ownerAccount = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
ownerAccount :: Maybe Text
$sel:ownerAccount:VirtualInterface' :: VirtualInterface -> Maybe Text
ownerAccount} -> Maybe Text
ownerAccount) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:ownerAccount:VirtualInterface' :: Maybe Text
ownerAccount = Maybe Text
a} :: VirtualInterface)

-- | The Amazon Web Services Region where the virtual interface is located.
virtualInterface_region :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_region :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_region = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
region :: Maybe Text
$sel:region:VirtualInterface' :: VirtualInterface -> Maybe Text
region} -> Maybe Text
region) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:region:VirtualInterface' :: Maybe Text
region = Maybe Text
a} :: VirtualInterface)

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

-- | The Direct Connect endpoint that terminates the physical connection.
virtualInterface_awsDeviceV2 :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_awsDeviceV2 :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_awsDeviceV2 = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
awsDeviceV2 :: Maybe Text
$sel:awsDeviceV2:VirtualInterface' :: VirtualInterface -> Maybe Text
awsDeviceV2} -> Maybe Text
awsDeviceV2) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:awsDeviceV2:VirtualInterface' :: Maybe Text
awsDeviceV2 = Maybe Text
a} :: VirtualInterface)

-- | The ID of the virtual interface.
virtualInterface_virtualInterfaceId :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_virtualInterfaceId :: (Maybe Text -> f (Maybe Text))
-> VirtualInterface -> f VirtualInterface
virtualInterface_virtualInterfaceId = (VirtualInterface -> Maybe Text)
-> (VirtualInterface -> Maybe Text -> VirtualInterface)
-> Lens VirtualInterface VirtualInterface (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Text
virtualInterfaceId :: Maybe Text
$sel:virtualInterfaceId:VirtualInterface' :: VirtualInterface -> Maybe Text
virtualInterfaceId} -> Maybe Text
virtualInterfaceId) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Text
a -> VirtualInterface
s {$sel:virtualInterfaceId:VirtualInterface' :: Maybe Text
virtualInterfaceId = Maybe Text
a} :: VirtualInterface)

-- | The tags associated with the virtual interface.
virtualInterface_tags :: Lens.Lens' VirtualInterface (Prelude.Maybe (Prelude.NonEmpty Tag))
virtualInterface_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> VirtualInterface -> f VirtualInterface
virtualInterface_tags = (VirtualInterface -> Maybe (NonEmpty Tag))
-> (VirtualInterface -> Maybe (NonEmpty Tag) -> VirtualInterface)
-> Lens
     VirtualInterface
     VirtualInterface
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:VirtualInterface' :: VirtualInterface -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe (NonEmpty Tag)
a -> VirtualInterface
s {$sel:tags:VirtualInterface' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: VirtualInterface) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> VirtualInterface -> f VirtualInterface)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> VirtualInterface
-> f VirtualInterface
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 Core.FromJSON VirtualInterface where
  parseJSON :: Value -> Parser VirtualInterface
parseJSON =
    String
-> (Object -> Parser VirtualInterface)
-> Value
-> Parser VirtualInterface
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VirtualInterface"
      ( \Object
x ->
          Maybe [BGPPeer]
-> Maybe Text
-> Maybe Int
-> Maybe [RouteFilterPrefix]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe AddressFamily
-> Maybe VirtualInterfaceState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> VirtualInterface
VirtualInterface'
            (Maybe [BGPPeer]
 -> Maybe Text
 -> Maybe Int
 -> Maybe [RouteFilterPrefix]
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe AddressFamily
 -> Maybe VirtualInterfaceState
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty Tag)
 -> VirtualInterface)
-> Parser (Maybe [BGPPeer])
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe [RouteFilterPrefix]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [BGPPeer]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bgpPeers" Parser (Maybe (Maybe [BGPPeer]))
-> Maybe [BGPPeer] -> Parser (Maybe [BGPPeer])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [BGPPeer]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe [RouteFilterPrefix]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe [RouteFilterPrefix]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualGatewayId")
            Parser
  (Maybe Int
   -> Maybe [RouteFilterPrefix]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Int)
-> Parser
     (Maybe [RouteFilterPrefix]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mtu")
            Parser
  (Maybe [RouteFilterPrefix]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe [RouteFilterPrefix])
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [RouteFilterPrefix]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"routeFilterPrefixes"
                            Parser (Maybe (Maybe [RouteFilterPrefix]))
-> Maybe [RouteFilterPrefix] -> Parser (Maybe [RouteFilterPrefix])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RouteFilterPrefix]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customerAddress")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vlan")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
            Parser
  (Maybe Text
   -> Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe AddressFamily
      -> Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"amazonAddress")
            Parser
  (Maybe AddressFamily
   -> Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe AddressFamily)
-> Parser
     (Maybe VirtualInterfaceState
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AddressFamily)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"addressFamily")
            Parser
  (Maybe VirtualInterfaceState
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe VirtualInterfaceState)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VirtualInterfaceState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceState")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"connectionId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"awsLogicalDeviceId")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"directConnectGatewayId")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"amazonSideAsn")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceType")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"asn")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authKey")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jumboFrameCapable")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customerRouterConfig")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ownerAccount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"region")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe (NonEmpty Tag) -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceName")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe (NonEmpty Tag) -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe (NonEmpty Tag) -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"awsDeviceV2")
            Parser (Maybe Text -> Maybe (NonEmpty Tag) -> VirtualInterface)
-> Parser (Maybe Text)
-> Parser (Maybe (NonEmpty Tag) -> VirtualInterface)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceId")
            Parser (Maybe (NonEmpty Tag) -> VirtualInterface)
-> Parser (Maybe (NonEmpty Tag)) -> Parser VirtualInterface
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Tag))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags")
      )

instance Prelude.Hashable VirtualInterface

instance Prelude.NFData VirtualInterface