{-# 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.SecurityHub.Types.AwsEc2VpnConnectionDetails
-- 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.SecurityHub.Types.AwsEc2VpnConnectionDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEc2VpnConnectionOptionsDetails
import Amazonka.SecurityHub.Types.AwsEc2VpnConnectionRoutesDetails
import Amazonka.SecurityHub.Types.AwsEc2VpnConnectionVgwTelemetryDetails

-- | Details about an Amazon EC2 VPN connection.
--
-- /See:/ 'newAwsEc2VpnConnectionDetails' smart constructor.
data AwsEc2VpnConnectionDetails = AwsEc2VpnConnectionDetails'
  { -- | The configuration information for the VPN connection\'s customer
    -- gateway, in the native XML format.
    AwsEc2VpnConnectionDetails -> Maybe Text
customerGatewayConfiguration :: Prelude.Maybe Prelude.Text,
    -- | The current state of the VPN connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
    -- | The static routes that are associated with the VPN connection.
    AwsEc2VpnConnectionDetails
-> Maybe [AwsEc2VpnConnectionRoutesDetails]
routes :: Prelude.Maybe [AwsEc2VpnConnectionRoutesDetails],
    -- | The identifier of the virtual private gateway that is at the Amazon Web
    -- Services side of the VPN connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
vpnGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The category of the VPN connection. @VPN@ indicates an Amazon Web
    -- Services VPN connection. @VPN-Classic@ indicates an Amazon Web Services
    -- Classic VPN connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the customer gateway that is at your end of the VPN
    -- connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
customerGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the transit gateway that is associated with the VPN
    -- connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
transitGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The type of VPN connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | The VPN connection options.
    AwsEc2VpnConnectionDetails
-> Maybe AwsEc2VpnConnectionOptionsDetails
options :: Prelude.Maybe AwsEc2VpnConnectionOptionsDetails,
    -- | The identifier of the VPN connection.
    AwsEc2VpnConnectionDetails -> Maybe Text
vpnConnectionId :: Prelude.Maybe Prelude.Text,
    -- | Information about the VPN tunnel.
    AwsEc2VpnConnectionDetails
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry :: Prelude.Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
  }
  deriving (AwsEc2VpnConnectionDetails -> AwsEc2VpnConnectionDetails -> Bool
(AwsEc2VpnConnectionDetails -> AwsEc2VpnConnectionDetails -> Bool)
-> (AwsEc2VpnConnectionDetails
    -> AwsEc2VpnConnectionDetails -> Bool)
-> Eq AwsEc2VpnConnectionDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEc2VpnConnectionDetails -> AwsEc2VpnConnectionDetails -> Bool
$c/= :: AwsEc2VpnConnectionDetails -> AwsEc2VpnConnectionDetails -> Bool
== :: AwsEc2VpnConnectionDetails -> AwsEc2VpnConnectionDetails -> Bool
$c== :: AwsEc2VpnConnectionDetails -> AwsEc2VpnConnectionDetails -> Bool
Prelude.Eq, ReadPrec [AwsEc2VpnConnectionDetails]
ReadPrec AwsEc2VpnConnectionDetails
Int -> ReadS AwsEc2VpnConnectionDetails
ReadS [AwsEc2VpnConnectionDetails]
(Int -> ReadS AwsEc2VpnConnectionDetails)
-> ReadS [AwsEc2VpnConnectionDetails]
-> ReadPrec AwsEc2VpnConnectionDetails
-> ReadPrec [AwsEc2VpnConnectionDetails]
-> Read AwsEc2VpnConnectionDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEc2VpnConnectionDetails]
$creadListPrec :: ReadPrec [AwsEc2VpnConnectionDetails]
readPrec :: ReadPrec AwsEc2VpnConnectionDetails
$creadPrec :: ReadPrec AwsEc2VpnConnectionDetails
readList :: ReadS [AwsEc2VpnConnectionDetails]
$creadList :: ReadS [AwsEc2VpnConnectionDetails]
readsPrec :: Int -> ReadS AwsEc2VpnConnectionDetails
$creadsPrec :: Int -> ReadS AwsEc2VpnConnectionDetails
Prelude.Read, Int -> AwsEc2VpnConnectionDetails -> ShowS
[AwsEc2VpnConnectionDetails] -> ShowS
AwsEc2VpnConnectionDetails -> String
(Int -> AwsEc2VpnConnectionDetails -> ShowS)
-> (AwsEc2VpnConnectionDetails -> String)
-> ([AwsEc2VpnConnectionDetails] -> ShowS)
-> Show AwsEc2VpnConnectionDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEc2VpnConnectionDetails] -> ShowS
$cshowList :: [AwsEc2VpnConnectionDetails] -> ShowS
show :: AwsEc2VpnConnectionDetails -> String
$cshow :: AwsEc2VpnConnectionDetails -> String
showsPrec :: Int -> AwsEc2VpnConnectionDetails -> ShowS
$cshowsPrec :: Int -> AwsEc2VpnConnectionDetails -> ShowS
Prelude.Show, (forall x.
 AwsEc2VpnConnectionDetails -> Rep AwsEc2VpnConnectionDetails x)
-> (forall x.
    Rep AwsEc2VpnConnectionDetails x -> AwsEc2VpnConnectionDetails)
-> Generic AwsEc2VpnConnectionDetails
forall x.
Rep AwsEc2VpnConnectionDetails x -> AwsEc2VpnConnectionDetails
forall x.
AwsEc2VpnConnectionDetails -> Rep AwsEc2VpnConnectionDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEc2VpnConnectionDetails x -> AwsEc2VpnConnectionDetails
$cfrom :: forall x.
AwsEc2VpnConnectionDetails -> Rep AwsEc2VpnConnectionDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEc2VpnConnectionDetails' 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:
--
-- 'customerGatewayConfiguration', 'awsEc2VpnConnectionDetails_customerGatewayConfiguration' - The configuration information for the VPN connection\'s customer
-- gateway, in the native XML format.
--
-- 'state', 'awsEc2VpnConnectionDetails_state' - The current state of the VPN connection.
--
-- 'routes', 'awsEc2VpnConnectionDetails_routes' - The static routes that are associated with the VPN connection.
--
-- 'vpnGatewayId', 'awsEc2VpnConnectionDetails_vpnGatewayId' - The identifier of the virtual private gateway that is at the Amazon Web
-- Services side of the VPN connection.
--
-- 'category', 'awsEc2VpnConnectionDetails_category' - The category of the VPN connection. @VPN@ indicates an Amazon Web
-- Services VPN connection. @VPN-Classic@ indicates an Amazon Web Services
-- Classic VPN connection.
--
-- 'customerGatewayId', 'awsEc2VpnConnectionDetails_customerGatewayId' - The identifier of the customer gateway that is at your end of the VPN
-- connection.
--
-- 'transitGatewayId', 'awsEc2VpnConnectionDetails_transitGatewayId' - The identifier of the transit gateway that is associated with the VPN
-- connection.
--
-- 'type'', 'awsEc2VpnConnectionDetails_type' - The type of VPN connection.
--
-- 'options', 'awsEc2VpnConnectionDetails_options' - The VPN connection options.
--
-- 'vpnConnectionId', 'awsEc2VpnConnectionDetails_vpnConnectionId' - The identifier of the VPN connection.
--
-- 'vgwTelemetry', 'awsEc2VpnConnectionDetails_vgwTelemetry' - Information about the VPN tunnel.
newAwsEc2VpnConnectionDetails ::
  AwsEc2VpnConnectionDetails
newAwsEc2VpnConnectionDetails :: AwsEc2VpnConnectionDetails
newAwsEc2VpnConnectionDetails =
  AwsEc2VpnConnectionDetails' :: Maybe Text
-> Maybe Text
-> Maybe [AwsEc2VpnConnectionRoutesDetails]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsEc2VpnConnectionOptionsDetails
-> Maybe Text
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
-> AwsEc2VpnConnectionDetails
AwsEc2VpnConnectionDetails'
    { $sel:customerGatewayConfiguration:AwsEc2VpnConnectionDetails' :: Maybe Text
customerGatewayConfiguration =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:AwsEc2VpnConnectionDetails' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:routes:AwsEc2VpnConnectionDetails' :: Maybe [AwsEc2VpnConnectionRoutesDetails]
routes = Maybe [AwsEc2VpnConnectionRoutesDetails]
forall a. Maybe a
Prelude.Nothing,
      $sel:vpnGatewayId:AwsEc2VpnConnectionDetails' :: Maybe Text
vpnGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:category:AwsEc2VpnConnectionDetails' :: Maybe Text
category = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customerGatewayId:AwsEc2VpnConnectionDetails' :: Maybe Text
customerGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:transitGatewayId:AwsEc2VpnConnectionDetails' :: Maybe Text
transitGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':AwsEc2VpnConnectionDetails' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:options:AwsEc2VpnConnectionDetails' :: Maybe AwsEc2VpnConnectionOptionsDetails
options = Maybe AwsEc2VpnConnectionOptionsDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:vpnConnectionId:AwsEc2VpnConnectionDetails' :: Maybe Text
vpnConnectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vgwTelemetry:AwsEc2VpnConnectionDetails' :: Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry = Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
forall a. Maybe a
Prelude.Nothing
    }

-- | The configuration information for the VPN connection\'s customer
-- gateway, in the native XML format.
awsEc2VpnConnectionDetails_customerGatewayConfiguration :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_customerGatewayConfiguration :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_customerGatewayConfiguration = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
customerGatewayConfiguration :: Maybe Text
$sel:customerGatewayConfiguration:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
customerGatewayConfiguration} -> Maybe Text
customerGatewayConfiguration) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:customerGatewayConfiguration:AwsEc2VpnConnectionDetails' :: Maybe Text
customerGatewayConfiguration = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The current state of the VPN connection.
awsEc2VpnConnectionDetails_state :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_state :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_state = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
state :: Maybe Text
$sel:state:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
state} -> Maybe Text
state) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:state:AwsEc2VpnConnectionDetails' :: Maybe Text
state = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The static routes that are associated with the VPN connection.
awsEc2VpnConnectionDetails_routes :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe [AwsEc2VpnConnectionRoutesDetails])
awsEc2VpnConnectionDetails_routes :: (Maybe [AwsEc2VpnConnectionRoutesDetails]
 -> f (Maybe [AwsEc2VpnConnectionRoutesDetails]))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_routes = (AwsEc2VpnConnectionDetails
 -> Maybe [AwsEc2VpnConnectionRoutesDetails])
-> (AwsEc2VpnConnectionDetails
    -> Maybe [AwsEc2VpnConnectionRoutesDetails]
    -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe [AwsEc2VpnConnectionRoutesDetails])
     (Maybe [AwsEc2VpnConnectionRoutesDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe [AwsEc2VpnConnectionRoutesDetails]
routes :: Maybe [AwsEc2VpnConnectionRoutesDetails]
$sel:routes:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails
-> Maybe [AwsEc2VpnConnectionRoutesDetails]
routes} -> Maybe [AwsEc2VpnConnectionRoutesDetails]
routes) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe [AwsEc2VpnConnectionRoutesDetails]
a -> AwsEc2VpnConnectionDetails
s {$sel:routes:AwsEc2VpnConnectionDetails' :: Maybe [AwsEc2VpnConnectionRoutesDetails]
routes = Maybe [AwsEc2VpnConnectionRoutesDetails]
a} :: AwsEc2VpnConnectionDetails) ((Maybe [AwsEc2VpnConnectionRoutesDetails]
  -> f (Maybe [AwsEc2VpnConnectionRoutesDetails]))
 -> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails)
-> ((Maybe [AwsEc2VpnConnectionRoutesDetails]
     -> f (Maybe [AwsEc2VpnConnectionRoutesDetails]))
    -> Maybe [AwsEc2VpnConnectionRoutesDetails]
    -> f (Maybe [AwsEc2VpnConnectionRoutesDetails]))
-> (Maybe [AwsEc2VpnConnectionRoutesDetails]
    -> f (Maybe [AwsEc2VpnConnectionRoutesDetails]))
-> AwsEc2VpnConnectionDetails
-> f AwsEc2VpnConnectionDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AwsEc2VpnConnectionRoutesDetails]
  [AwsEc2VpnConnectionRoutesDetails]
  [AwsEc2VpnConnectionRoutesDetails]
  [AwsEc2VpnConnectionRoutesDetails]
-> Iso
     (Maybe [AwsEc2VpnConnectionRoutesDetails])
     (Maybe [AwsEc2VpnConnectionRoutesDetails])
     (Maybe [AwsEc2VpnConnectionRoutesDetails])
     (Maybe [AwsEc2VpnConnectionRoutesDetails])
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
  [AwsEc2VpnConnectionRoutesDetails]
  [AwsEc2VpnConnectionRoutesDetails]
  [AwsEc2VpnConnectionRoutesDetails]
  [AwsEc2VpnConnectionRoutesDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier of the virtual private gateway that is at the Amazon Web
-- Services side of the VPN connection.
awsEc2VpnConnectionDetails_vpnGatewayId :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_vpnGatewayId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_vpnGatewayId = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
vpnGatewayId :: Maybe Text
$sel:vpnGatewayId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
vpnGatewayId} -> Maybe Text
vpnGatewayId) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:vpnGatewayId:AwsEc2VpnConnectionDetails' :: Maybe Text
vpnGatewayId = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The category of the VPN connection. @VPN@ indicates an Amazon Web
-- Services VPN connection. @VPN-Classic@ indicates an Amazon Web Services
-- Classic VPN connection.
awsEc2VpnConnectionDetails_category :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_category :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_category = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
category :: Maybe Text
$sel:category:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
category} -> Maybe Text
category) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:category:AwsEc2VpnConnectionDetails' :: Maybe Text
category = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The identifier of the customer gateway that is at your end of the VPN
-- connection.
awsEc2VpnConnectionDetails_customerGatewayId :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_customerGatewayId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_customerGatewayId = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
customerGatewayId :: Maybe Text
$sel:customerGatewayId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
customerGatewayId} -> Maybe Text
customerGatewayId) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:customerGatewayId:AwsEc2VpnConnectionDetails' :: Maybe Text
customerGatewayId = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The identifier of the transit gateway that is associated with the VPN
-- connection.
awsEc2VpnConnectionDetails_transitGatewayId :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_transitGatewayId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_transitGatewayId = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
transitGatewayId :: Maybe Text
$sel:transitGatewayId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
transitGatewayId} -> Maybe Text
transitGatewayId) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:transitGatewayId:AwsEc2VpnConnectionDetails' :: Maybe Text
transitGatewayId = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The type of VPN connection.
awsEc2VpnConnectionDetails_type :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_type :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_type = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
type' :: Maybe Text
$sel:type':AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
type'} -> Maybe Text
type') (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:type':AwsEc2VpnConnectionDetails' :: Maybe Text
type' = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | The VPN connection options.
awsEc2VpnConnectionDetails_options :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe AwsEc2VpnConnectionOptionsDetails)
awsEc2VpnConnectionDetails_options :: (Maybe AwsEc2VpnConnectionOptionsDetails
 -> f (Maybe AwsEc2VpnConnectionOptionsDetails))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_options = (AwsEc2VpnConnectionDetails
 -> Maybe AwsEc2VpnConnectionOptionsDetails)
-> (AwsEc2VpnConnectionDetails
    -> Maybe AwsEc2VpnConnectionOptionsDetails
    -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe AwsEc2VpnConnectionOptionsDetails)
     (Maybe AwsEc2VpnConnectionOptionsDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe AwsEc2VpnConnectionOptionsDetails
options :: Maybe AwsEc2VpnConnectionOptionsDetails
$sel:options:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails
-> Maybe AwsEc2VpnConnectionOptionsDetails
options} -> Maybe AwsEc2VpnConnectionOptionsDetails
options) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe AwsEc2VpnConnectionOptionsDetails
a -> AwsEc2VpnConnectionDetails
s {$sel:options:AwsEc2VpnConnectionDetails' :: Maybe AwsEc2VpnConnectionOptionsDetails
options = Maybe AwsEc2VpnConnectionOptionsDetails
a} :: AwsEc2VpnConnectionDetails)

-- | The identifier of the VPN connection.
awsEc2VpnConnectionDetails_vpnConnectionId :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionDetails_vpnConnectionId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_vpnConnectionId = (AwsEc2VpnConnectionDetails -> Maybe Text)
-> (AwsEc2VpnConnectionDetails
    -> Maybe Text -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe Text
vpnConnectionId :: Maybe Text
$sel:vpnConnectionId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
vpnConnectionId} -> Maybe Text
vpnConnectionId) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe Text
a -> AwsEc2VpnConnectionDetails
s {$sel:vpnConnectionId:AwsEc2VpnConnectionDetails' :: Maybe Text
vpnConnectionId = Maybe Text
a} :: AwsEc2VpnConnectionDetails)

-- | Information about the VPN tunnel.
awsEc2VpnConnectionDetails_vgwTelemetry :: Lens.Lens' AwsEc2VpnConnectionDetails (Prelude.Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
awsEc2VpnConnectionDetails_vgwTelemetry :: (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
 -> f (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
-> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails
awsEc2VpnConnectionDetails_vgwTelemetry = (AwsEc2VpnConnectionDetails
 -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
-> (AwsEc2VpnConnectionDetails
    -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
    -> AwsEc2VpnConnectionDetails)
-> Lens
     AwsEc2VpnConnectionDetails
     AwsEc2VpnConnectionDetails
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionDetails' {Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry :: Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
$sel:vgwTelemetry:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry} -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry) (\s :: AwsEc2VpnConnectionDetails
s@AwsEc2VpnConnectionDetails' {} Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
a -> AwsEc2VpnConnectionDetails
s {$sel:vgwTelemetry:AwsEc2VpnConnectionDetails' :: Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry = Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
a} :: AwsEc2VpnConnectionDetails) ((Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
  -> f (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
 -> AwsEc2VpnConnectionDetails -> f AwsEc2VpnConnectionDetails)
-> ((Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
     -> f (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
    -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
    -> f (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
-> (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
    -> f (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
-> AwsEc2VpnConnectionDetails
-> f AwsEc2VpnConnectionDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AwsEc2VpnConnectionVgwTelemetryDetails]
  [AwsEc2VpnConnectionVgwTelemetryDetails]
  [AwsEc2VpnConnectionVgwTelemetryDetails]
  [AwsEc2VpnConnectionVgwTelemetryDetails]
-> Iso
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
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
  [AwsEc2VpnConnectionVgwTelemetryDetails]
  [AwsEc2VpnConnectionVgwTelemetryDetails]
  [AwsEc2VpnConnectionVgwTelemetryDetails]
  [AwsEc2VpnConnectionVgwTelemetryDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON AwsEc2VpnConnectionDetails where
  parseJSON :: Value -> Parser AwsEc2VpnConnectionDetails
parseJSON =
    String
-> (Object -> Parser AwsEc2VpnConnectionDetails)
-> Value
-> Parser AwsEc2VpnConnectionDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEc2VpnConnectionDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [AwsEc2VpnConnectionRoutesDetails]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsEc2VpnConnectionOptionsDetails
-> Maybe Text
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
-> AwsEc2VpnConnectionDetails
AwsEc2VpnConnectionDetails'
            (Maybe Text
 -> Maybe Text
 -> Maybe [AwsEc2VpnConnectionRoutesDetails]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe AwsEc2VpnConnectionOptionsDetails
 -> Maybe Text
 -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
 -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [AwsEc2VpnConnectionRoutesDetails]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
forall (f :: * -> *) a b. Functor 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
"CustomerGatewayConfiguration")
            Parser
  (Maybe Text
   -> Maybe [AwsEc2VpnConnectionRoutesDetails]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AwsEc2VpnConnectionRoutesDetails]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"State")
            Parser
  (Maybe [AwsEc2VpnConnectionRoutesDetails]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe [AwsEc2VpnConnectionRoutesDetails])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe (Maybe [AwsEc2VpnConnectionRoutesDetails]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Routes" Parser (Maybe (Maybe [AwsEc2VpnConnectionRoutesDetails]))
-> Maybe [AwsEc2VpnConnectionRoutesDetails]
-> Parser (Maybe [AwsEc2VpnConnectionRoutesDetails])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2VpnConnectionRoutesDetails]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"VpnGatewayId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"Category")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"CustomerGatewayId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"TransitGatewayId")
            Parser
  (Maybe Text
   -> Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe AwsEc2VpnConnectionOptionsDetails
      -> Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"Type")
            Parser
  (Maybe AwsEc2VpnConnectionOptionsDetails
   -> Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe AwsEc2VpnConnectionOptionsDetails)
-> Parser
     (Maybe Text
      -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsEc2VpnConnectionOptionsDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Options")
            Parser
  (Maybe Text
   -> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
      -> AwsEc2VpnConnectionDetails)
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
"VpnConnectionId")
            Parser
  (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
   -> AwsEc2VpnConnectionDetails)
-> Parser (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
-> Parser AwsEc2VpnConnectionDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VgwTelemetry" Parser (Maybe (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]))
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
-> Parser (Maybe [AwsEc2VpnConnectionVgwTelemetryDetails])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable AwsEc2VpnConnectionDetails

instance Prelude.NFData AwsEc2VpnConnectionDetails

instance Core.ToJSON AwsEc2VpnConnectionDetails where
  toJSON :: AwsEc2VpnConnectionDetails -> Value
toJSON AwsEc2VpnConnectionDetails' {Maybe [AwsEc2VpnConnectionRoutesDetails]
Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
Maybe Text
Maybe AwsEc2VpnConnectionOptionsDetails
vgwTelemetry :: Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vpnConnectionId :: Maybe Text
options :: Maybe AwsEc2VpnConnectionOptionsDetails
type' :: Maybe Text
transitGatewayId :: Maybe Text
customerGatewayId :: Maybe Text
category :: Maybe Text
vpnGatewayId :: Maybe Text
routes :: Maybe [AwsEc2VpnConnectionRoutesDetails]
state :: Maybe Text
customerGatewayConfiguration :: Maybe Text
$sel:vgwTelemetry:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
$sel:vpnConnectionId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:options:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails
-> Maybe AwsEc2VpnConnectionOptionsDetails
$sel:type':AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:transitGatewayId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:customerGatewayId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:category:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:vpnGatewayId:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:routes:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails
-> Maybe [AwsEc2VpnConnectionRoutesDetails]
$sel:state:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
$sel:customerGatewayConfiguration:AwsEc2VpnConnectionDetails' :: AwsEc2VpnConnectionDetails -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CustomerGatewayConfiguration" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customerGatewayConfiguration,
            (Text
"State" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
state,
            (Text
"Routes" Text -> [AwsEc2VpnConnectionRoutesDetails] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2VpnConnectionRoutesDetails] -> Pair)
-> Maybe [AwsEc2VpnConnectionRoutesDetails] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2VpnConnectionRoutesDetails]
routes,
            (Text
"VpnGatewayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpnGatewayId,
            (Text
"Category" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
category,
            (Text
"CustomerGatewayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customerGatewayId,
            (Text
"TransitGatewayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
transitGatewayId,
            (Text
"Type" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
type',
            (Text
"Options" Text -> AwsEc2VpnConnectionOptionsDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsEc2VpnConnectionOptionsDetails -> Pair)
-> Maybe AwsEc2VpnConnectionOptionsDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEc2VpnConnectionOptionsDetails
options,
            (Text
"VpnConnectionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpnConnectionId,
            (Text
"VgwTelemetry" Text -> [AwsEc2VpnConnectionVgwTelemetryDetails] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2VpnConnectionVgwTelemetryDetails] -> Pair)
-> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2VpnConnectionVgwTelemetryDetails]
vgwTelemetry
          ]
      )