{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DirectConnect.Types.VirtualInterface where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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.Prelude as Prelude

-- | Information about a virtual interface.
--
-- /See:/ 'newVirtualInterface' smart constructor.
data VirtualInterface = VirtualInterface'
  { -- | The address family for the BGP peer.
    VirtualInterface -> Maybe AddressFamily
addressFamily :: Prelude.Maybe AddressFamily,
    -- | The IP address assigned to the Amazon interface.
    VirtualInterface -> Maybe Text
amazonAddress :: 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 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,
    -- | The Direct Connect endpoint that terminates the physical connection.
    VirtualInterface -> Maybe Text
awsDeviceV2 :: 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 BGP peers configured on this virtual interface.
    VirtualInterface -> Maybe [BGPPeer]
bgpPeers :: Prelude.Maybe [BGPPeer],
    -- | The ID of the connection.
    VirtualInterface -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
    -- | The IP address assigned to the customer interface.
    VirtualInterface -> Maybe Text
customerAddress :: Prelude.Maybe Prelude.Text,
    -- | The customer router configuration.
    VirtualInterface -> Maybe Text
customerRouterConfig :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Direct Connect gateway.
    VirtualInterface -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether jumbo frames (9001 MTU) are supported.
    VirtualInterface -> Maybe Bool
jumboFrameCapable :: Prelude.Maybe Prelude.Bool,
    -- | The location of the connection.
    VirtualInterface -> Maybe Text
location :: 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 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 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],
    -- | Indicates whether SiteLink is enabled.
    VirtualInterface -> Maybe Bool
siteLinkEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The tags associated with the virtual interface.
    VirtualInterface -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The ID of the virtual private gateway. Applies only to private virtual
    -- interfaces.
    VirtualInterface -> Maybe Text
virtualGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the virtual interface.
    VirtualInterface -> Maybe Text
virtualInterfaceId :: 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 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 type of virtual interface. The possible values are @private@ and
    -- @public@.
    VirtualInterface -> Maybe Text
virtualInterfaceType :: Prelude.Maybe Prelude.Text,
    -- | The ID of the VLAN.
    VirtualInterface -> Maybe Int
vlan :: Prelude.Maybe Prelude.Int
  }
  deriving (VirtualInterface -> VirtualInterface -> Bool
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]
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
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. 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:
--
-- 'addressFamily', 'virtualInterface_addressFamily' - The address family for the BGP peer.
--
-- 'amazonAddress', 'virtualInterface_amazonAddress' - The IP address assigned to the Amazon interface.
--
-- 'amazonSideAsn', 'virtualInterface_amazonSideAsn' - The autonomous system number (ASN) for the Amazon side of the
-- connection.
--
-- '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.
--
-- 'awsDeviceV2', 'virtualInterface_awsDeviceV2' - The Direct Connect endpoint that terminates the physical 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.
--
-- 'bgpPeers', 'virtualInterface_bgpPeers' - The BGP peers configured on this virtual interface.
--
-- 'connectionId', 'virtualInterface_connectionId' - The ID of the connection.
--
-- 'customerAddress', 'virtualInterface_customerAddress' - The IP address assigned to the customer interface.
--
-- 'customerRouterConfig', 'virtualInterface_customerRouterConfig' - The customer router configuration.
--
-- 'directConnectGatewayId', 'virtualInterface_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'jumboFrameCapable', 'virtualInterface_jumboFrameCapable' - Indicates whether jumbo frames (9001 MTU) are supported.
--
-- 'location', 'virtualInterface_location' - The location of the connection.
--
-- 'mtu', 'virtualInterface_mtu' - The maximum transmission unit (MTU), in bytes. The supported values are
-- 1500 and 9001. The default value is 1500.
--
-- '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.
--
-- 'routeFilterPrefixes', 'virtualInterface_routeFilterPrefixes' - The routes to be advertised to the Amazon Web Services network in this
-- Region. Applies to public virtual interfaces.
--
-- 'siteLinkEnabled', 'virtualInterface_siteLinkEnabled' - Indicates whether SiteLink is enabled.
--
-- 'tags', 'virtualInterface_tags' - The tags associated with the virtual interface.
--
-- 'virtualGatewayId', 'virtualInterface_virtualGatewayId' - The ID of the virtual private gateway. Applies only to private virtual
-- interfaces.
--
-- 'virtualInterfaceId', 'virtualInterface_virtualInterfaceId' - The ID of the virtual interface.
--
-- '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 (-).
--
-- '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.
--
-- 'virtualInterfaceType', 'virtualInterface_virtualInterfaceType' - The type of virtual interface. The possible values are @private@ and
-- @public@.
--
-- 'vlan', 'virtualInterface_vlan' - The ID of the VLAN.
newVirtualInterface ::
  VirtualInterface
newVirtualInterface :: VirtualInterface
newVirtualInterface =
  VirtualInterface'
    { $sel:addressFamily:VirtualInterface' :: Maybe AddressFamily
addressFamily = forall a. Maybe a
Prelude.Nothing,
      $sel:amazonAddress:VirtualInterface' :: Maybe Text
amazonAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:amazonSideAsn:VirtualInterface' :: Maybe Integer
amazonSideAsn = forall a. Maybe a
Prelude.Nothing,
      $sel:asn:VirtualInterface' :: Maybe Int
asn = forall a. Maybe a
Prelude.Nothing,
      $sel:authKey:VirtualInterface' :: Maybe Text
authKey = forall a. Maybe a
Prelude.Nothing,
      $sel:awsDeviceV2:VirtualInterface' :: Maybe Text
awsDeviceV2 = forall a. Maybe a
Prelude.Nothing,
      $sel:awsLogicalDeviceId:VirtualInterface' :: Maybe Text
awsLogicalDeviceId = forall a. Maybe a
Prelude.Nothing,
      $sel:bgpPeers:VirtualInterface' :: Maybe [BGPPeer]
bgpPeers = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:VirtualInterface' :: Maybe Text
connectionId = forall a. Maybe a
Prelude.Nothing,
      $sel:customerAddress:VirtualInterface' :: Maybe Text
customerAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:customerRouterConfig:VirtualInterface' :: Maybe Text
customerRouterConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:VirtualInterface' :: Maybe Text
directConnectGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:jumboFrameCapable:VirtualInterface' :: Maybe Bool
jumboFrameCapable = forall a. Maybe a
Prelude.Nothing,
      $sel:location:VirtualInterface' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
      $sel:mtu:VirtualInterface' :: Maybe Int
mtu = forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccount:VirtualInterface' :: Maybe Text
ownerAccount = forall a. Maybe a
Prelude.Nothing,
      $sel:region:VirtualInterface' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
      $sel:routeFilterPrefixes:VirtualInterface' :: Maybe [RouteFilterPrefix]
routeFilterPrefixes = forall a. Maybe a
Prelude.Nothing,
      $sel:siteLinkEnabled:VirtualInterface' :: Maybe Bool
siteLinkEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:VirtualInterface' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualGatewayId:VirtualInterface' :: Maybe Text
virtualGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceId:VirtualInterface' :: Maybe Text
virtualInterfaceId = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceName:VirtualInterface' :: Maybe Text
virtualInterfaceName = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceState:VirtualInterface' :: Maybe VirtualInterfaceState
virtualInterfaceState = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualInterfaceType:VirtualInterface' :: Maybe Text
virtualInterfaceType = forall a. Maybe a
Prelude.Nothing,
      $sel:vlan:VirtualInterface' :: Maybe Int
vlan = forall a. Maybe a
Prelude.Nothing
    }

-- | The address family for the BGP peer.
virtualInterface_addressFamily :: Lens.Lens' VirtualInterface (Prelude.Maybe AddressFamily)
virtualInterface_addressFamily :: Lens' VirtualInterface (Maybe AddressFamily)
virtualInterface_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 IP address assigned to the Amazon interface.
virtualInterface_amazonAddress :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_amazonAddress :: Lens' VirtualInterface (Maybe Text)
virtualInterface_amazonAddress = 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 autonomous system number (ASN) for the Amazon side of the
-- connection.
virtualInterface_amazonSideAsn :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Integer)
virtualInterface_amazonSideAsn :: Lens' VirtualInterface (Maybe Integer)
virtualInterface_amazonSideAsn = 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 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 :: Lens' VirtualInterface (Maybe Int)
virtualInterface_asn = 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 :: Lens' VirtualInterface (Maybe Text)
virtualInterface_authKey = 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)

-- | The Direct Connect endpoint that terminates the physical connection.
virtualInterface_awsDeviceV2 :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_awsDeviceV2 :: Lens' VirtualInterface (Maybe Text)
virtualInterface_awsDeviceV2 = 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 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 :: Lens' VirtualInterface (Maybe Text)
virtualInterface_awsLogicalDeviceId = 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 BGP peers configured on this virtual interface.
virtualInterface_bgpPeers :: Lens.Lens' VirtualInterface (Prelude.Maybe [BGPPeer])
virtualInterface_bgpPeers :: Lens' VirtualInterface (Maybe [BGPPeer])
virtualInterface_bgpPeers = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the connection.
virtualInterface_connectionId :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_connectionId :: Lens' VirtualInterface (Maybe Text)
virtualInterface_connectionId = 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 IP address assigned to the customer interface.
virtualInterface_customerAddress :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_customerAddress :: Lens' VirtualInterface (Maybe Text)
virtualInterface_customerAddress = 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 customer router configuration.
virtualInterface_customerRouterConfig :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_customerRouterConfig :: Lens' VirtualInterface (Maybe Text)
virtualInterface_customerRouterConfig = 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 Direct Connect gateway.
virtualInterface_directConnectGatewayId :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_directConnectGatewayId :: Lens' VirtualInterface (Maybe Text)
virtualInterface_directConnectGatewayId = 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)

-- | Indicates whether jumbo frames (9001 MTU) are supported.
virtualInterface_jumboFrameCapable :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Bool)
virtualInterface_jumboFrameCapable :: Lens' VirtualInterface (Maybe Bool)
virtualInterface_jumboFrameCapable = 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 location of the connection.
virtualInterface_location :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_location :: Lens' VirtualInterface (Maybe Text)
virtualInterface_location = 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 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 :: Lens' VirtualInterface (Maybe Int)
virtualInterface_mtu = 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 ID of the Amazon Web Services account that owns the virtual
-- interface.
virtualInterface_ownerAccount :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_ownerAccount :: Lens' VirtualInterface (Maybe Text)
virtualInterface_ownerAccount = 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 :: Lens' VirtualInterface (Maybe Text)
virtualInterface_region = 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 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 :: Lens' VirtualInterface (Maybe [RouteFilterPrefix])
virtualInterface_routeFilterPrefixes = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Indicates whether SiteLink is enabled.
virtualInterface_siteLinkEnabled :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Bool)
virtualInterface_siteLinkEnabled :: Lens' VirtualInterface (Maybe Bool)
virtualInterface_siteLinkEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualInterface' {Maybe Bool
siteLinkEnabled :: Maybe Bool
$sel:siteLinkEnabled:VirtualInterface' :: VirtualInterface -> Maybe Bool
siteLinkEnabled} -> Maybe Bool
siteLinkEnabled) (\s :: VirtualInterface
s@VirtualInterface' {} Maybe Bool
a -> VirtualInterface
s {$sel:siteLinkEnabled:VirtualInterface' :: Maybe Bool
siteLinkEnabled = Maybe Bool
a} :: VirtualInterface)

-- | The tags associated with the virtual interface.
virtualInterface_tags :: Lens.Lens' VirtualInterface (Prelude.Maybe (Prelude.NonEmpty Tag))
virtualInterface_tags :: Lens' VirtualInterface (Maybe (NonEmpty Tag))
virtualInterface_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' VirtualInterface (Maybe Text)
virtualInterface_virtualGatewayId = 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 ID of the virtual interface.
virtualInterface_virtualInterfaceId :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_virtualInterfaceId :: Lens' VirtualInterface (Maybe Text)
virtualInterface_virtualInterfaceId = 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 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 :: Lens' VirtualInterface (Maybe Text)
virtualInterface_virtualInterfaceName = 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 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 :: Lens' VirtualInterface (Maybe VirtualInterfaceState)
virtualInterface_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 type of virtual interface. The possible values are @private@ and
-- @public@.
virtualInterface_virtualInterfaceType :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Text)
virtualInterface_virtualInterfaceType :: Lens' VirtualInterface (Maybe Text)
virtualInterface_virtualInterfaceType = 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 ID of the VLAN.
virtualInterface_vlan :: Lens.Lens' VirtualInterface (Prelude.Maybe Prelude.Int)
virtualInterface_vlan :: Lens' VirtualInterface (Maybe Int)
virtualInterface_vlan = 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)

instance Data.FromJSON VirtualInterface where
  parseJSON :: Value -> Parser VirtualInterface
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"VirtualInterface"
      ( \Object
x ->
          Maybe AddressFamily
-> Maybe Text
-> Maybe Integer
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [BGPPeer]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [RouteFilterPrefix]
-> Maybe Bool
-> Maybe (NonEmpty Tag)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe VirtualInterfaceState
-> Maybe Text
-> Maybe Int
-> VirtualInterface
VirtualInterface'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"addressFamily")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"amazonAddress")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"amazonSideAsn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"asn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"authKey")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"awsDeviceV2")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"awsLogicalDeviceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"bgpPeers" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"connectionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"customerAddress")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"customerRouterConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"directConnectGatewayId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"jumboFrameCapable")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"location")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mtu")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ownerAccount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"region")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"routeFilterPrefixes"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"siteLinkEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"virtualGatewayId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"virtualInterfaceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"virtualInterfaceName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"virtualInterfaceState")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"virtualInterfaceType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vlan")
      )

instance Prelude.Hashable VirtualInterface where
  hashWithSalt :: Int -> VirtualInterface -> Int
hashWithSalt Int
_salt VirtualInterface' {Maybe Bool
Maybe Int
Maybe Integer
Maybe [BGPPeer]
Maybe [RouteFilterPrefix]
Maybe (NonEmpty Tag)
Maybe Text
Maybe AddressFamily
Maybe VirtualInterfaceState
vlan :: Maybe Int
virtualInterfaceType :: Maybe Text
virtualInterfaceState :: Maybe VirtualInterfaceState
virtualInterfaceName :: Maybe Text
virtualInterfaceId :: Maybe Text
virtualGatewayId :: Maybe Text
tags :: Maybe (NonEmpty Tag)
siteLinkEnabled :: Maybe Bool
routeFilterPrefixes :: Maybe [RouteFilterPrefix]
region :: Maybe Text
ownerAccount :: Maybe Text
mtu :: Maybe Int
location :: Maybe Text
jumboFrameCapable :: Maybe Bool
directConnectGatewayId :: Maybe Text
customerRouterConfig :: Maybe Text
customerAddress :: Maybe Text
connectionId :: Maybe Text
bgpPeers :: Maybe [BGPPeer]
awsLogicalDeviceId :: Maybe Text
awsDeviceV2 :: Maybe Text
authKey :: Maybe Text
asn :: Maybe Int
amazonSideAsn :: Maybe Integer
amazonAddress :: Maybe Text
addressFamily :: Maybe AddressFamily
$sel:vlan:VirtualInterface' :: VirtualInterface -> Maybe Int
$sel:virtualInterfaceType:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:virtualInterfaceState:VirtualInterface' :: VirtualInterface -> Maybe VirtualInterfaceState
$sel:virtualInterfaceName:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:virtualInterfaceId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:virtualGatewayId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:tags:VirtualInterface' :: VirtualInterface -> Maybe (NonEmpty Tag)
$sel:siteLinkEnabled:VirtualInterface' :: VirtualInterface -> Maybe Bool
$sel:routeFilterPrefixes:VirtualInterface' :: VirtualInterface -> Maybe [RouteFilterPrefix]
$sel:region:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:ownerAccount:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:mtu:VirtualInterface' :: VirtualInterface -> Maybe Int
$sel:location:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:jumboFrameCapable:VirtualInterface' :: VirtualInterface -> Maybe Bool
$sel:directConnectGatewayId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:customerRouterConfig:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:customerAddress:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:connectionId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:bgpPeers:VirtualInterface' :: VirtualInterface -> Maybe [BGPPeer]
$sel:awsLogicalDeviceId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:awsDeviceV2:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:authKey:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:asn:VirtualInterface' :: VirtualInterface -> Maybe Int
$sel:amazonSideAsn:VirtualInterface' :: VirtualInterface -> Maybe Integer
$sel:amazonAddress:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:addressFamily:VirtualInterface' :: VirtualInterface -> Maybe AddressFamily
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AddressFamily
addressFamily
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
amazonAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
amazonSideAsn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
asn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
authKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsDeviceV2
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsLogicalDeviceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [BGPPeer]
bgpPeers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customerAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customerRouterConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
directConnectGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
jumboFrameCapable
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
mtu
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerAccount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RouteFilterPrefix]
routeFilterPrefixes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
siteLinkEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
virtualGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
virtualInterfaceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
virtualInterfaceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VirtualInterfaceState
virtualInterfaceState
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
virtualInterfaceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
vlan

instance Prelude.NFData VirtualInterface where
  rnf :: VirtualInterface -> ()
rnf VirtualInterface' {Maybe Bool
Maybe Int
Maybe Integer
Maybe [BGPPeer]
Maybe [RouteFilterPrefix]
Maybe (NonEmpty Tag)
Maybe Text
Maybe AddressFamily
Maybe VirtualInterfaceState
vlan :: Maybe Int
virtualInterfaceType :: Maybe Text
virtualInterfaceState :: Maybe VirtualInterfaceState
virtualInterfaceName :: Maybe Text
virtualInterfaceId :: Maybe Text
virtualGatewayId :: Maybe Text
tags :: Maybe (NonEmpty Tag)
siteLinkEnabled :: Maybe Bool
routeFilterPrefixes :: Maybe [RouteFilterPrefix]
region :: Maybe Text
ownerAccount :: Maybe Text
mtu :: Maybe Int
location :: Maybe Text
jumboFrameCapable :: Maybe Bool
directConnectGatewayId :: Maybe Text
customerRouterConfig :: Maybe Text
customerAddress :: Maybe Text
connectionId :: Maybe Text
bgpPeers :: Maybe [BGPPeer]
awsLogicalDeviceId :: Maybe Text
awsDeviceV2 :: Maybe Text
authKey :: Maybe Text
asn :: Maybe Int
amazonSideAsn :: Maybe Integer
amazonAddress :: Maybe Text
addressFamily :: Maybe AddressFamily
$sel:vlan:VirtualInterface' :: VirtualInterface -> Maybe Int
$sel:virtualInterfaceType:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:virtualInterfaceState:VirtualInterface' :: VirtualInterface -> Maybe VirtualInterfaceState
$sel:virtualInterfaceName:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:virtualInterfaceId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:virtualGatewayId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:tags:VirtualInterface' :: VirtualInterface -> Maybe (NonEmpty Tag)
$sel:siteLinkEnabled:VirtualInterface' :: VirtualInterface -> Maybe Bool
$sel:routeFilterPrefixes:VirtualInterface' :: VirtualInterface -> Maybe [RouteFilterPrefix]
$sel:region:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:ownerAccount:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:mtu:VirtualInterface' :: VirtualInterface -> Maybe Int
$sel:location:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:jumboFrameCapable:VirtualInterface' :: VirtualInterface -> Maybe Bool
$sel:directConnectGatewayId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:customerRouterConfig:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:customerAddress:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:connectionId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:bgpPeers:VirtualInterface' :: VirtualInterface -> Maybe [BGPPeer]
$sel:awsLogicalDeviceId:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:awsDeviceV2:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:authKey:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:asn:VirtualInterface' :: VirtualInterface -> Maybe Int
$sel:amazonSideAsn:VirtualInterface' :: VirtualInterface -> Maybe Integer
$sel:amazonAddress:VirtualInterface' :: VirtualInterface -> Maybe Text
$sel:addressFamily:VirtualInterface' :: VirtualInterface -> Maybe AddressFamily
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AddressFamily
addressFamily
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
amazonAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
amazonSideAsn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
asn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
authKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsDeviceV2
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsLogicalDeviceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [BGPPeer]
bgpPeers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customerAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customerRouterConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
directConnectGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
jumboFrameCapable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
mtu
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerAccount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RouteFilterPrefix]
routeFilterPrefixes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
siteLinkEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
virtualGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
virtualInterfaceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
virtualInterfaceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe VirtualInterfaceState
virtualInterfaceState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
virtualInterfaceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
vlan