{-# 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 #-}
module Amazonka.RDS.Types.VpnDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpnDetails = VpnDetails'
{
VpnDetails -> Maybe Text
vpnName :: Prelude.Maybe Prelude.Text,
VpnDetails -> Maybe Text
vpnTunnelOriginatorIP :: Prelude.Maybe Prelude.Text,
VpnDetails -> Maybe Text
vpnId :: Prelude.Maybe Prelude.Text,
VpnDetails -> Maybe Text
vpnState :: Prelude.Maybe Prelude.Text,
VpnDetails -> Maybe (Sensitive Text)
vpnPSK :: Prelude.Maybe (Core.Sensitive Prelude.Text),
VpnDetails -> Maybe Text
vpnGatewayIp :: Prelude.Maybe Prelude.Text
}
deriving (VpnDetails -> VpnDetails -> Bool
(VpnDetails -> VpnDetails -> Bool)
-> (VpnDetails -> VpnDetails -> Bool) -> Eq VpnDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpnDetails -> VpnDetails -> Bool
$c/= :: VpnDetails -> VpnDetails -> Bool
== :: VpnDetails -> VpnDetails -> Bool
$c== :: VpnDetails -> VpnDetails -> Bool
Prelude.Eq, Int -> VpnDetails -> ShowS
[VpnDetails] -> ShowS
VpnDetails -> String
(Int -> VpnDetails -> ShowS)
-> (VpnDetails -> String)
-> ([VpnDetails] -> ShowS)
-> Show VpnDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpnDetails] -> ShowS
$cshowList :: [VpnDetails] -> ShowS
show :: VpnDetails -> String
$cshow :: VpnDetails -> String
showsPrec :: Int -> VpnDetails -> ShowS
$cshowsPrec :: Int -> VpnDetails -> ShowS
Prelude.Show, (forall x. VpnDetails -> Rep VpnDetails x)
-> (forall x. Rep VpnDetails x -> VpnDetails) -> Generic VpnDetails
forall x. Rep VpnDetails x -> VpnDetails
forall x. VpnDetails -> Rep VpnDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpnDetails x -> VpnDetails
$cfrom :: forall x. VpnDetails -> Rep VpnDetails x
Prelude.Generic)
newVpnDetails ::
VpnDetails
newVpnDetails :: VpnDetails
newVpnDetails =
VpnDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails
VpnDetails'
{ $sel:vpnName:VpnDetails' :: Maybe Text
vpnName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpnTunnelOriginatorIP:VpnDetails' :: Maybe Text
vpnTunnelOriginatorIP = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpnId:VpnDetails' :: Maybe Text
vpnId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpnState:VpnDetails' :: Maybe Text
vpnState = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpnPSK:VpnDetails' :: Maybe (Sensitive Text)
vpnPSK = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:vpnGatewayIp:VpnDetails' :: Maybe Text
vpnGatewayIp = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
vpnDetails_vpnName :: Lens.Lens' VpnDetails (Prelude.Maybe Prelude.Text)
vpnDetails_vpnName :: (Maybe Text -> f (Maybe Text)) -> VpnDetails -> f VpnDetails
vpnDetails_vpnName = (VpnDetails -> Maybe Text)
-> (VpnDetails -> Maybe Text -> VpnDetails)
-> Lens VpnDetails VpnDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnDetails' {Maybe Text
vpnName :: Maybe Text
$sel:vpnName:VpnDetails' :: VpnDetails -> Maybe Text
vpnName} -> Maybe Text
vpnName) (\s :: VpnDetails
s@VpnDetails' {} Maybe Text
a -> VpnDetails
s {$sel:vpnName:VpnDetails' :: Maybe Text
vpnName = Maybe Text
a} :: VpnDetails)
vpnDetails_vpnTunnelOriginatorIP :: Lens.Lens' VpnDetails (Prelude.Maybe Prelude.Text)
vpnDetails_vpnTunnelOriginatorIP :: (Maybe Text -> f (Maybe Text)) -> VpnDetails -> f VpnDetails
vpnDetails_vpnTunnelOriginatorIP = (VpnDetails -> Maybe Text)
-> (VpnDetails -> Maybe Text -> VpnDetails)
-> Lens VpnDetails VpnDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnDetails' {Maybe Text
vpnTunnelOriginatorIP :: Maybe Text
$sel:vpnTunnelOriginatorIP:VpnDetails' :: VpnDetails -> Maybe Text
vpnTunnelOriginatorIP} -> Maybe Text
vpnTunnelOriginatorIP) (\s :: VpnDetails
s@VpnDetails' {} Maybe Text
a -> VpnDetails
s {$sel:vpnTunnelOriginatorIP:VpnDetails' :: Maybe Text
vpnTunnelOriginatorIP = Maybe Text
a} :: VpnDetails)
vpnDetails_vpnId :: Lens.Lens' VpnDetails (Prelude.Maybe Prelude.Text)
vpnDetails_vpnId :: (Maybe Text -> f (Maybe Text)) -> VpnDetails -> f VpnDetails
vpnDetails_vpnId = (VpnDetails -> Maybe Text)
-> (VpnDetails -> Maybe Text -> VpnDetails)
-> Lens VpnDetails VpnDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnDetails' {Maybe Text
vpnId :: Maybe Text
$sel:vpnId:VpnDetails' :: VpnDetails -> Maybe Text
vpnId} -> Maybe Text
vpnId) (\s :: VpnDetails
s@VpnDetails' {} Maybe Text
a -> VpnDetails
s {$sel:vpnId:VpnDetails' :: Maybe Text
vpnId = Maybe Text
a} :: VpnDetails)
vpnDetails_vpnState :: Lens.Lens' VpnDetails (Prelude.Maybe Prelude.Text)
vpnDetails_vpnState :: (Maybe Text -> f (Maybe Text)) -> VpnDetails -> f VpnDetails
vpnDetails_vpnState = (VpnDetails -> Maybe Text)
-> (VpnDetails -> Maybe Text -> VpnDetails)
-> Lens VpnDetails VpnDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnDetails' {Maybe Text
vpnState :: Maybe Text
$sel:vpnState:VpnDetails' :: VpnDetails -> Maybe Text
vpnState} -> Maybe Text
vpnState) (\s :: VpnDetails
s@VpnDetails' {} Maybe Text
a -> VpnDetails
s {$sel:vpnState:VpnDetails' :: Maybe Text
vpnState = Maybe Text
a} :: VpnDetails)
vpnDetails_vpnPSK :: Lens.Lens' VpnDetails (Prelude.Maybe Prelude.Text)
vpnDetails_vpnPSK :: (Maybe Text -> f (Maybe Text)) -> VpnDetails -> f VpnDetails
vpnDetails_vpnPSK = (VpnDetails -> Maybe (Sensitive Text))
-> (VpnDetails -> Maybe (Sensitive Text) -> VpnDetails)
-> Lens
VpnDetails
VpnDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnDetails' {Maybe (Sensitive Text)
vpnPSK :: Maybe (Sensitive Text)
$sel:vpnPSK:VpnDetails' :: VpnDetails -> Maybe (Sensitive Text)
vpnPSK} -> Maybe (Sensitive Text)
vpnPSK) (\s :: VpnDetails
s@VpnDetails' {} Maybe (Sensitive Text)
a -> VpnDetails
s {$sel:vpnPSK:VpnDetails' :: Maybe (Sensitive Text)
vpnPSK = Maybe (Sensitive Text)
a} :: VpnDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> VpnDetails -> f VpnDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> VpnDetails
-> f VpnDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
vpnDetails_vpnGatewayIp :: Lens.Lens' VpnDetails (Prelude.Maybe Prelude.Text)
vpnDetails_vpnGatewayIp :: (Maybe Text -> f (Maybe Text)) -> VpnDetails -> f VpnDetails
vpnDetails_vpnGatewayIp = (VpnDetails -> Maybe Text)
-> (VpnDetails -> Maybe Text -> VpnDetails)
-> Lens VpnDetails VpnDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnDetails' {Maybe Text
vpnGatewayIp :: Maybe Text
$sel:vpnGatewayIp:VpnDetails' :: VpnDetails -> Maybe Text
vpnGatewayIp} -> Maybe Text
vpnGatewayIp) (\s :: VpnDetails
s@VpnDetails' {} Maybe Text
a -> VpnDetails
s {$sel:vpnGatewayIp:VpnDetails' :: Maybe Text
vpnGatewayIp = Maybe Text
a} :: VpnDetails)
instance Core.FromXML VpnDetails where
parseXML :: [Node] -> Either String VpnDetails
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails
VpnDetails'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnTunnelOriginatorIP")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> VpnDetails)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> VpnDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnId")
Either
String
(Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> VpnDetails)
-> Either String (Maybe Text)
-> Either
String (Maybe (Sensitive Text) -> Maybe Text -> VpnDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnState")
Either String (Maybe (Sensitive Text) -> Maybe Text -> VpnDetails)
-> Either String (Maybe (Sensitive Text))
-> Either String (Maybe Text -> VpnDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnPSK")
Either String (Maybe Text -> VpnDetails)
-> Either String (Maybe Text) -> Either String VpnDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VpnGatewayIp")
instance Prelude.Hashable VpnDetails
instance Prelude.NFData VpnDetails