{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.DirectConnect.Types.NewPrivateVirtualInterface
-- Copyright   : (c) 2013-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.NewPrivateVirtualInterface 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.Tag
import qualified Amazonka.Prelude as Prelude

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

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

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

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

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

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

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

-- | Indicates whether to enable or disable SiteLink.
newPrivateVirtualInterface_enableSiteLink :: Lens.Lens' NewPrivateVirtualInterface (Prelude.Maybe Prelude.Bool)
newPrivateVirtualInterface_enableSiteLink :: Lens' NewPrivateVirtualInterface (Maybe Bool)
newPrivateVirtualInterface_enableSiteLink = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewPrivateVirtualInterface' {Maybe Bool
enableSiteLink :: Maybe Bool
$sel:enableSiteLink:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Bool
enableSiteLink} -> Maybe Bool
enableSiteLink) (\s :: NewPrivateVirtualInterface
s@NewPrivateVirtualInterface' {} Maybe Bool
a -> NewPrivateVirtualInterface
s {$sel:enableSiteLink:NewPrivateVirtualInterface' :: Maybe Bool
enableSiteLink = Maybe Bool
a} :: NewPrivateVirtualInterface)

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

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

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

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

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

instance Prelude.Hashable NewPrivateVirtualInterface where
  hashWithSalt :: Int -> NewPrivateVirtualInterface -> Int
hashWithSalt Int
_salt NewPrivateVirtualInterface' {Int
Maybe Bool
Maybe Int
Maybe (NonEmpty Tag)
Maybe Text
Maybe AddressFamily
Text
asn :: Int
vlan :: Int
virtualInterfaceName :: Text
virtualGatewayId :: Maybe Text
tags :: Maybe (NonEmpty Tag)
mtu :: Maybe Int
enableSiteLink :: Maybe Bool
directConnectGatewayId :: Maybe Text
customerAddress :: Maybe Text
authKey :: Maybe Text
amazonAddress :: Maybe Text
addressFamily :: Maybe AddressFamily
$sel:asn:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
$sel:vlan:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
$sel:virtualInterfaceName:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Text
$sel:virtualGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:tags:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe (NonEmpty Tag)
$sel:mtu:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Int
$sel:enableSiteLink:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Bool
$sel:directConnectGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:customerAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:authKey:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:amazonAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:addressFamily:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> 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 Text
authKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customerAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
directConnectGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableSiteLink
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
mtu
      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` Text
virtualInterfaceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
vlan
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
asn

instance Prelude.NFData NewPrivateVirtualInterface where
  rnf :: NewPrivateVirtualInterface -> ()
rnf NewPrivateVirtualInterface' {Int
Maybe Bool
Maybe Int
Maybe (NonEmpty Tag)
Maybe Text
Maybe AddressFamily
Text
asn :: Int
vlan :: Int
virtualInterfaceName :: Text
virtualGatewayId :: Maybe Text
tags :: Maybe (NonEmpty Tag)
mtu :: Maybe Int
enableSiteLink :: Maybe Bool
directConnectGatewayId :: Maybe Text
customerAddress :: Maybe Text
authKey :: Maybe Text
amazonAddress :: Maybe Text
addressFamily :: Maybe AddressFamily
$sel:asn:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
$sel:vlan:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Int
$sel:virtualInterfaceName:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Text
$sel:virtualGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:tags:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe (NonEmpty Tag)
$sel:mtu:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Int
$sel:enableSiteLink:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Bool
$sel:directConnectGatewayId:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:customerAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:authKey:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:amazonAddress:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> Maybe Text
$sel:addressFamily:NewPrivateVirtualInterface' :: NewPrivateVirtualInterface -> 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 Text
authKey
      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
directConnectGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableSiteLink
      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 (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 Text
virtualInterfaceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
vlan
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
asn

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