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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The VPN tunnel options.
--
-- /See:/ 'newAwsEc2VpnConnectionOptionsTunnelOptionsDetails' smart constructor.
data AwsEc2VpnConnectionOptionsTunnelOptionsDetails = AwsEc2VpnConnectionOptionsTunnelOptionsDetails'
  { -- | The external IP address of the VPN tunnel.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
outsideIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The number of packets in an IKE replay window.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
replayWindowSize :: Prelude.Maybe Prelude.Int,
    -- | The percentage of the rekey window, which is determined by
    -- @RekeyMarginTimeSeconds@ during which the rekey time is randomly
    -- selected.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
rekeyFuzzPercentage :: Prelude.Maybe Prelude.Int,
    -- | The lifetime for phase 1 of the IKE negotiation, in seconds.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
phase1LifetimeSeconds :: Prelude.Maybe Prelude.Int,
    -- | The Internet Key Exchange (IKE) versions that are permitted for the VPN
    -- tunnel.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
ikeVersions :: Prelude.Maybe [Prelude.Text],
    -- | The permitted integrity algorithms for the VPN tunnel for phase 2 IKE
    -- negotiations.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase2IntegrityAlgorithms :: Prelude.Maybe [Prelude.Text],
    -- | The lifetime for phase 2 of the IKE negotiation, in seconds.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
phase2LifetimeSeconds :: Prelude.Maybe Prelude.Int,
    -- | The permitted encryption algorithms for the VPN tunnel for phase 1 IKE
    -- negotiations.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase1EncryptionAlgorithms :: Prelude.Maybe [Prelude.Text],
    -- | The permitted Diffie-Hellman group numbers for the VPN tunnel for phase
    -- 1 IKE negotiations.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int]
phase1DhGroupNumbers :: Prelude.Maybe [Prelude.Int],
    -- | The permitted integrity algorithms for the VPN tunnel for phase 1 IKE
    -- negotiations.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase1IntegrityAlgorithms :: Prelude.Maybe [Prelude.Text],
    -- | The margin time, in seconds, before the phase 2 lifetime expires, during
    -- which the Amazon Web Services side of the VPN connection performs an IKE
    -- rekey.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
rekeyMarginTimeSeconds :: Prelude.Maybe Prelude.Int,
    -- | The number of seconds after which a Dead Peer Detection (DPD) timeout
    -- occurs.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
dpdTimeoutSeconds :: Prelude.Maybe Prelude.Int,
    -- | The range of inside IPv4 addresses for the tunnel.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
tunnelInsideCidr :: Prelude.Maybe Prelude.Text,
    -- | The permitted encryption algorithms for the VPN tunnel for phase 2 IKE
    -- negotiations.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase2EncryptionAlgorithms :: Prelude.Maybe [Prelude.Text],
    -- | The permitted Diffie-Hellman group numbers for the VPN tunnel for phase
    -- 2 IKE negotiations.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int]
phase2DhGroupNumbers :: Prelude.Maybe [Prelude.Int],
    -- | The preshared key to establish initial authentication between the
    -- virtual private gateway and the customer gateway.
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
preSharedKey :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool
(AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool)
-> Eq AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool
$c/= :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool
== :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool
$c== :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Bool
Prelude.Eq, ReadPrec [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
ReadPrec AwsEc2VpnConnectionOptionsTunnelOptionsDetails
Int -> ReadS AwsEc2VpnConnectionOptionsTunnelOptionsDetails
ReadS [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
(Int -> ReadS AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ReadS [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
-> ReadPrec AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> ReadPrec [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
-> Read AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
$creadListPrec :: ReadPrec [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
readPrec :: ReadPrec AwsEc2VpnConnectionOptionsTunnelOptionsDetails
$creadPrec :: ReadPrec AwsEc2VpnConnectionOptionsTunnelOptionsDetails
readList :: ReadS [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
$creadList :: ReadS [AwsEc2VpnConnectionOptionsTunnelOptionsDetails]
readsPrec :: Int -> ReadS AwsEc2VpnConnectionOptionsTunnelOptionsDetails
$creadsPrec :: Int -> ReadS AwsEc2VpnConnectionOptionsTunnelOptionsDetails
Prelude.Read, Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> ShowS
[AwsEc2VpnConnectionOptionsTunnelOptionsDetails] -> ShowS
AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> String
(Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> ShowS)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> String)
-> ([AwsEc2VpnConnectionOptionsTunnelOptionsDetails] -> ShowS)
-> Show AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEc2VpnConnectionOptionsTunnelOptionsDetails] -> ShowS
$cshowList :: [AwsEc2VpnConnectionOptionsTunnelOptionsDetails] -> ShowS
show :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> String
$cshow :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> String
showsPrec :: Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> ShowS
$cshowsPrec :: Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> ShowS
Prelude.Show, (forall x.
 AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> Rep AwsEc2VpnConnectionOptionsTunnelOptionsDetails x)
-> (forall x.
    Rep AwsEc2VpnConnectionOptionsTunnelOptionsDetails x
    -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Generic AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall x.
Rep AwsEc2VpnConnectionOptionsTunnelOptionsDetails x
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall x.
AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> Rep AwsEc2VpnConnectionOptionsTunnelOptionsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEc2VpnConnectionOptionsTunnelOptionsDetails x
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
$cfrom :: forall x.
AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> Rep AwsEc2VpnConnectionOptionsTunnelOptionsDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEc2VpnConnectionOptionsTunnelOptionsDetails' 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:
--
-- 'outsideIpAddress', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_outsideIpAddress' - The external IP address of the VPN tunnel.
--
-- 'replayWindowSize', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_replayWindowSize' - The number of packets in an IKE replay window.
--
-- 'rekeyFuzzPercentage', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyFuzzPercentage' - The percentage of the rekey window, which is determined by
-- @RekeyMarginTimeSeconds@ during which the rekey time is randomly
-- selected.
--
-- 'phase1LifetimeSeconds', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1LifetimeSeconds' - The lifetime for phase 1 of the IKE negotiation, in seconds.
--
-- 'ikeVersions', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_ikeVersions' - The Internet Key Exchange (IKE) versions that are permitted for the VPN
-- tunnel.
--
-- 'phase2IntegrityAlgorithms', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2IntegrityAlgorithms' - The permitted integrity algorithms for the VPN tunnel for phase 2 IKE
-- negotiations.
--
-- 'phase2LifetimeSeconds', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2LifetimeSeconds' - The lifetime for phase 2 of the IKE negotiation, in seconds.
--
-- 'phase1EncryptionAlgorithms', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1EncryptionAlgorithms' - The permitted encryption algorithms for the VPN tunnel for phase 1 IKE
-- negotiations.
--
-- 'phase1DhGroupNumbers', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1DhGroupNumbers' - The permitted Diffie-Hellman group numbers for the VPN tunnel for phase
-- 1 IKE negotiations.
--
-- 'phase1IntegrityAlgorithms', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1IntegrityAlgorithms' - The permitted integrity algorithms for the VPN tunnel for phase 1 IKE
-- negotiations.
--
-- 'rekeyMarginTimeSeconds', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyMarginTimeSeconds' - The margin time, in seconds, before the phase 2 lifetime expires, during
-- which the Amazon Web Services side of the VPN connection performs an IKE
-- rekey.
--
-- 'dpdTimeoutSeconds', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_dpdTimeoutSeconds' - The number of seconds after which a Dead Peer Detection (DPD) timeout
-- occurs.
--
-- 'tunnelInsideCidr', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_tunnelInsideCidr' - The range of inside IPv4 addresses for the tunnel.
--
-- 'phase2EncryptionAlgorithms', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2EncryptionAlgorithms' - The permitted encryption algorithms for the VPN tunnel for phase 2 IKE
-- negotiations.
--
-- 'phase2DhGroupNumbers', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2DhGroupNumbers' - The permitted Diffie-Hellman group numbers for the VPN tunnel for phase
-- 2 IKE negotiations.
--
-- 'preSharedKey', 'awsEc2VpnConnectionOptionsTunnelOptionsDetails_preSharedKey' - The preshared key to establish initial authentication between the
-- virtual private gateway and the customer gateway.
newAwsEc2VpnConnectionOptionsTunnelOptionsDetails ::
  AwsEc2VpnConnectionOptionsTunnelOptionsDetails
newAwsEc2VpnConnectionOptionsTunnelOptionsDetails :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
newAwsEc2VpnConnectionOptionsTunnelOptionsDetails =
  AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Int
-> Maybe [Text]
-> Maybe [Int]
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe [Int]
-> Maybe Text
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
AwsEc2VpnConnectionOptionsTunnelOptionsDetails'
    { $sel:outsideIpAddress:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
outsideIpAddress =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replayWindowSize:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
replayWindowSize =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:rekeyFuzzPercentage:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
rekeyFuzzPercentage =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:phase1LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
phase1LifetimeSeconds =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:ikeVersions:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
ikeVersions =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:phase2IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase2IntegrityAlgorithms =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:phase2LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
phase2LifetimeSeconds =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:phase1EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase1EncryptionAlgorithms =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:phase1DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Int]
phase1DhGroupNumbers =
        Maybe [Int]
forall a. Maybe a
Prelude.Nothing,
      $sel:phase1IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase1IntegrityAlgorithms =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:rekeyMarginTimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
rekeyMarginTimeSeconds =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:dpdTimeoutSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
dpdTimeoutSeconds =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:tunnelInsideCidr:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
tunnelInsideCidr =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:phase2EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase2EncryptionAlgorithms =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:phase2DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Int]
phase2DhGroupNumbers =
        Maybe [Int]
forall a. Maybe a
Prelude.Nothing,
      $sel:preSharedKey:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
preSharedKey =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The external IP address of the VPN tunnel.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_outsideIpAddress :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_outsideIpAddress :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_outsideIpAddress = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Text
outsideIpAddress :: Maybe Text
$sel:outsideIpAddress:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
outsideIpAddress} -> Maybe Text
outsideIpAddress) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Text
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:outsideIpAddress:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
outsideIpAddress = Maybe Text
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The number of packets in an IKE replay window.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_replayWindowSize :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Int)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_replayWindowSize :: (Maybe Int -> f (Maybe Int))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_replayWindowSize = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
replayWindowSize :: Maybe Int
$sel:replayWindowSize:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
replayWindowSize} -> Maybe Int
replayWindowSize) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Int
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:replayWindowSize:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
replayWindowSize = Maybe Int
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The percentage of the rekey window, which is determined by
-- @RekeyMarginTimeSeconds@ during which the rekey time is randomly
-- selected.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyFuzzPercentage :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Int)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyFuzzPercentage :: (Maybe Int -> f (Maybe Int))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyFuzzPercentage = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
rekeyFuzzPercentage :: Maybe Int
$sel:rekeyFuzzPercentage:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
rekeyFuzzPercentage} -> Maybe Int
rekeyFuzzPercentage) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Int
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:rekeyFuzzPercentage:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
rekeyFuzzPercentage = Maybe Int
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The lifetime for phase 1 of the IKE negotiation, in seconds.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1LifetimeSeconds :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Int)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1LifetimeSeconds :: (Maybe Int -> f (Maybe Int))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1LifetimeSeconds = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
phase1LifetimeSeconds :: Maybe Int
$sel:phase1LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
phase1LifetimeSeconds} -> Maybe Int
phase1LifetimeSeconds) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Int
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase1LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
phase1LifetimeSeconds = Maybe Int
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The Internet Key Exchange (IKE) versions that are permitted for the VPN
-- tunnel.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_ikeVersions :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_ikeVersions :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_ikeVersions = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Text] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Text]
ikeVersions :: Maybe [Text]
$sel:ikeVersions:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
ikeVersions} -> Maybe [Text]
ikeVersions) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Text]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:ikeVersions:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
ikeVersions = Maybe [Text]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The permitted integrity algorithms for the VPN tunnel for phase 2 IKE
-- negotiations.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2IntegrityAlgorithms :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2IntegrityAlgorithms :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2IntegrityAlgorithms = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Text] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Text]
phase2IntegrityAlgorithms :: Maybe [Text]
$sel:phase2IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase2IntegrityAlgorithms} -> Maybe [Text]
phase2IntegrityAlgorithms) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Text]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase2IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase2IntegrityAlgorithms = Maybe [Text]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The lifetime for phase 2 of the IKE negotiation, in seconds.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2LifetimeSeconds :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Int)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2LifetimeSeconds :: (Maybe Int -> f (Maybe Int))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2LifetimeSeconds = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
phase2LifetimeSeconds :: Maybe Int
$sel:phase2LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
phase2LifetimeSeconds} -> Maybe Int
phase2LifetimeSeconds) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Int
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase2LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
phase2LifetimeSeconds = Maybe Int
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The permitted encryption algorithms for the VPN tunnel for phase 1 IKE
-- negotiations.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1EncryptionAlgorithms :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1EncryptionAlgorithms :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1EncryptionAlgorithms = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Text] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Text]
phase1EncryptionAlgorithms :: Maybe [Text]
$sel:phase1EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase1EncryptionAlgorithms} -> Maybe [Text]
phase1EncryptionAlgorithms) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Text]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase1EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase1EncryptionAlgorithms = Maybe [Text]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The permitted Diffie-Hellman group numbers for the VPN tunnel for phase
-- 1 IKE negotiations.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1DhGroupNumbers :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Int])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1DhGroupNumbers :: (Maybe [Int] -> f (Maybe [Int]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1DhGroupNumbers = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Int] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Int])
     (Maybe [Int])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Int]
phase1DhGroupNumbers :: Maybe [Int]
$sel:phase1DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int]
phase1DhGroupNumbers} -> Maybe [Int]
phase1DhGroupNumbers) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Int]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase1DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Int]
phase1DhGroupNumbers = Maybe [Int]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Int] -> f (Maybe [Int]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Int] -> f (Maybe [Int]))
    -> Maybe [Int] -> f (Maybe [Int]))
-> (Maybe [Int] -> f (Maybe [Int]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Int] [Int] [Int] [Int]
-> Iso (Maybe [Int]) (Maybe [Int]) (Maybe [Int]) (Maybe [Int])
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 [Int] [Int] [Int] [Int]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The permitted integrity algorithms for the VPN tunnel for phase 1 IKE
-- negotiations.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1IntegrityAlgorithms :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1IntegrityAlgorithms :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase1IntegrityAlgorithms = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Text] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Text]
phase1IntegrityAlgorithms :: Maybe [Text]
$sel:phase1IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase1IntegrityAlgorithms} -> Maybe [Text]
phase1IntegrityAlgorithms) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Text]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase1IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase1IntegrityAlgorithms = Maybe [Text]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The margin time, in seconds, before the phase 2 lifetime expires, during
-- which the Amazon Web Services side of the VPN connection performs an IKE
-- rekey.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyMarginTimeSeconds :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Int)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyMarginTimeSeconds :: (Maybe Int -> f (Maybe Int))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_rekeyMarginTimeSeconds = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
rekeyMarginTimeSeconds :: Maybe Int
$sel:rekeyMarginTimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
rekeyMarginTimeSeconds} -> Maybe Int
rekeyMarginTimeSeconds) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Int
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:rekeyMarginTimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
rekeyMarginTimeSeconds = Maybe Int
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The number of seconds after which a Dead Peer Detection (DPD) timeout
-- occurs.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_dpdTimeoutSeconds :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Int)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_dpdTimeoutSeconds :: (Maybe Int -> f (Maybe Int))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_dpdTimeoutSeconds = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Int -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
dpdTimeoutSeconds :: Maybe Int
$sel:dpdTimeoutSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
dpdTimeoutSeconds} -> Maybe Int
dpdTimeoutSeconds) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Int
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:dpdTimeoutSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Int
dpdTimeoutSeconds = Maybe Int
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The range of inside IPv4 addresses for the tunnel.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_tunnelInsideCidr :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_tunnelInsideCidr :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_tunnelInsideCidr = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Text
tunnelInsideCidr :: Maybe Text
$sel:tunnelInsideCidr:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
tunnelInsideCidr} -> Maybe Text
tunnelInsideCidr) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Text
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:tunnelInsideCidr:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
tunnelInsideCidr = Maybe Text
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

-- | The permitted encryption algorithms for the VPN tunnel for phase 2 IKE
-- negotiations.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2EncryptionAlgorithms :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Text])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2EncryptionAlgorithms :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2EncryptionAlgorithms = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Text] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Text]
phase2EncryptionAlgorithms :: Maybe [Text]
$sel:phase2EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
phase2EncryptionAlgorithms} -> Maybe [Text]
phase2EncryptionAlgorithms) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Text]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase2EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Text]
phase2EncryptionAlgorithms = Maybe [Text]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The permitted Diffie-Hellman group numbers for the VPN tunnel for phase
-- 2 IKE negotiations.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2DhGroupNumbers :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe [Prelude.Int])
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2DhGroupNumbers :: (Maybe [Int] -> f (Maybe [Int]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_phase2DhGroupNumbers = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int])
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe [Int] -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe [Int])
     (Maybe [Int])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe [Int]
phase2DhGroupNumbers :: Maybe [Int]
$sel:phase2DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int]
phase2DhGroupNumbers} -> Maybe [Int]
phase2DhGroupNumbers) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe [Int]
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:phase2DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe [Int]
phase2DhGroupNumbers = Maybe [Int]
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails) ((Maybe [Int] -> f (Maybe [Int]))
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
 -> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> ((Maybe [Int] -> f (Maybe [Int]))
    -> Maybe [Int] -> f (Maybe [Int]))
-> (Maybe [Int] -> f (Maybe [Int]))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Int] [Int] [Int] [Int]
-> Iso (Maybe [Int]) (Maybe [Int]) (Maybe [Int]) (Maybe [Int])
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 [Int] [Int] [Int] [Int]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The preshared key to establish initial authentication between the
-- virtual private gateway and the customer gateway.
awsEc2VpnConnectionOptionsTunnelOptionsDetails_preSharedKey :: Lens.Lens' AwsEc2VpnConnectionOptionsTunnelOptionsDetails (Prelude.Maybe Prelude.Text)
awsEc2VpnConnectionOptionsTunnelOptionsDetails_preSharedKey :: (Maybe Text -> f (Maybe Text))
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
-> f AwsEc2VpnConnectionOptionsTunnelOptionsDetails
awsEc2VpnConnectionOptionsTunnelOptionsDetails_preSharedKey = (AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text)
-> (AwsEc2VpnConnectionOptionsTunnelOptionsDetails
    -> Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Lens
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     AwsEc2VpnConnectionOptionsTunnelOptionsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Text
preSharedKey :: Maybe Text
$sel:preSharedKey:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
preSharedKey} -> Maybe Text
preSharedKey) (\s :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s@AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {} Maybe Text
a -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
s {$sel:preSharedKey:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: Maybe Text
preSharedKey = Maybe Text
a} :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails)

instance
  Core.FromJSON
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails
  where
  parseJSON :: Value -> Parser AwsEc2VpnConnectionOptionsTunnelOptionsDetails
parseJSON =
    String
-> (Object
    -> Parser AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Value
-> Parser AwsEc2VpnConnectionOptionsTunnelOptionsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEc2VpnConnectionOptionsTunnelOptionsDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Int
-> Maybe [Text]
-> Maybe [Int]
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [Text]
-> Maybe [Int]
-> Maybe Text
-> AwsEc2VpnConnectionOptionsTunnelOptionsDetails
AwsEc2VpnConnectionOptionsTunnelOptionsDetails'
            (Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe [Int]
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [Int]
 -> Maybe Text
 -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
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
"OutsideIpAddress")
              Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplayWindowSize")
              Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RekeyFuzzPercentage")
              Parser
  (Maybe Int
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase1LifetimeSeconds")
              Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text]
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IkeVersions" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
              Parser
  (Maybe [Text]
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase2IntegrityAlgorithms"
                              Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe Int
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Text]
      -> Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase2LifetimeSeconds")
              Parser
  (Maybe [Text]
   -> Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Int]
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase1EncryptionAlgorithms"
                              Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe [Int]
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Int])
-> Parser
     (Maybe [Text]
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Int]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase1DhGroupNumbers"
                              Parser (Maybe (Maybe [Int])) -> Maybe [Int] -> Parser (Maybe [Int])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Int]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe [Text]
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase1IntegrityAlgorithms"
                              Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RekeyMarginTimeSeconds")
              Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DpdTimeoutSeconds")
              Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [Int]
      -> Maybe Text
      -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
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
"TunnelInsideCidr")
              Parser
  (Maybe [Text]
   -> Maybe [Int]
   -> Maybe Text
   -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Int]
      -> Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase2EncryptionAlgorithms"
                              Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe [Int]
   -> Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe [Int])
-> Parser
     (Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Int]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Phase2DhGroupNumbers"
                              Parser (Maybe (Maybe [Int])) -> Maybe [Int] -> Parser (Maybe [Int])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Int]
forall a. Monoid a => a
Prelude.mempty
                          )
              Parser
  (Maybe Text -> AwsEc2VpnConnectionOptionsTunnelOptionsDetails)
-> Parser (Maybe Text)
-> Parser AwsEc2VpnConnectionOptionsTunnelOptionsDetails
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
"PreSharedKey")
      )

instance
  Prelude.Hashable
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails

instance
  Prelude.NFData
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails

instance
  Core.ToJSON
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails
  where
  toJSON :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Value
toJSON
    AwsEc2VpnConnectionOptionsTunnelOptionsDetails' {Maybe Int
Maybe [Int]
Maybe [Text]
Maybe Text
preSharedKey :: Maybe Text
phase2DhGroupNumbers :: Maybe [Int]
phase2EncryptionAlgorithms :: Maybe [Text]
tunnelInsideCidr :: Maybe Text
dpdTimeoutSeconds :: Maybe Int
rekeyMarginTimeSeconds :: Maybe Int
phase1IntegrityAlgorithms :: Maybe [Text]
phase1DhGroupNumbers :: Maybe [Int]
phase1EncryptionAlgorithms :: Maybe [Text]
phase2LifetimeSeconds :: Maybe Int
phase2IntegrityAlgorithms :: Maybe [Text]
ikeVersions :: Maybe [Text]
phase1LifetimeSeconds :: Maybe Int
rekeyFuzzPercentage :: Maybe Int
replayWindowSize :: Maybe Int
outsideIpAddress :: Maybe Text
$sel:preSharedKey:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
$sel:phase2DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int]
$sel:phase2EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
$sel:tunnelInsideCidr:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
$sel:dpdTimeoutSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
$sel:rekeyMarginTimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
$sel:phase1IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
$sel:phase1DhGroupNumbers:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Int]
$sel:phase1EncryptionAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
$sel:phase2LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
$sel:phase2IntegrityAlgorithms:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
$sel:ikeVersions:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe [Text]
$sel:phase1LifetimeSeconds:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
$sel:rekeyFuzzPercentage:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
$sel:replayWindowSize:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Int
$sel:outsideIpAddress:AwsEc2VpnConnectionOptionsTunnelOptionsDetails' :: AwsEc2VpnConnectionOptionsTunnelOptionsDetails -> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"OutsideIpAddress" 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
outsideIpAddress,
              (Text
"ReplayWindowSize" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
replayWindowSize,
              (Text
"RekeyFuzzPercentage" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
rekeyFuzzPercentage,
              (Text
"Phase1LifetimeSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
phase1LifetimeSeconds,
              (Text
"IkeVersions" 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]
ikeVersions,
              (Text
"Phase2IntegrityAlgorithms" 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]
phase2IntegrityAlgorithms,
              (Text
"Phase2LifetimeSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
phase2LifetimeSeconds,
              (Text
"Phase1EncryptionAlgorithms" 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]
phase1EncryptionAlgorithms,
              (Text
"Phase1DhGroupNumbers" Text -> [Int] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                ([Int] -> Pair) -> Maybe [Int] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Int]
phase1DhGroupNumbers,
              (Text
"Phase1IntegrityAlgorithms" 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]
phase1IntegrityAlgorithms,
              (Text
"RekeyMarginTimeSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
rekeyMarginTimeSeconds,
              (Text
"DpdTimeoutSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
dpdTimeoutSeconds,
              (Text
"TunnelInsideCidr" 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
tunnelInsideCidr,
              (Text
"Phase2EncryptionAlgorithms" 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]
phase2EncryptionAlgorithms,
              (Text
"Phase2DhGroupNumbers" Text -> [Int] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                ([Int] -> Pair) -> Maybe [Int] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Int]
phase2DhGroupNumbers,
              (Text
"PreSharedKey" 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
preSharedKey
            ]
        )