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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.ClientVpnConnectionStatus
import qualified Amazonka.Prelude as Prelude

-- | Describes a client connection.
--
-- /See:/ 'newClientVpnConnection' smart constructor.
data ClientVpnConnection = ClientVpnConnection'
  { -- | The IP address of the client.
    ClientVpnConnection -> Maybe Text
clientIp :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Client VPN endpoint to which the client is connected.
    ClientVpnConnection -> Maybe Text
clientVpnEndpointId :: Prelude.Maybe Prelude.Text,
    -- | The common name associated with the client. This is either the name of
    -- the client certificate, or the Active Directory user name.
    ClientVpnConnection -> Maybe Text
commonName :: Prelude.Maybe Prelude.Text,
    -- | The date and time the client connection was terminated.
    ClientVpnConnection -> Maybe Text
connectionEndTime :: Prelude.Maybe Prelude.Text,
    -- | The date and time the client connection was established.
    ClientVpnConnection -> Maybe Text
connectionEstablishedTime :: Prelude.Maybe Prelude.Text,
    -- | The ID of the client connection.
    ClientVpnConnection -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
    -- | The number of bytes received by the client.
    ClientVpnConnection -> Maybe Text
egressBytes :: Prelude.Maybe Prelude.Text,
    -- | The number of packets received by the client.
    ClientVpnConnection -> Maybe Text
egressPackets :: Prelude.Maybe Prelude.Text,
    -- | The number of bytes sent by the client.
    ClientVpnConnection -> Maybe Text
ingressBytes :: Prelude.Maybe Prelude.Text,
    -- | The number of packets sent by the client.
    ClientVpnConnection -> Maybe Text
ingressPackets :: Prelude.Maybe Prelude.Text,
    -- | The statuses returned by the client connect handler for posture
    -- compliance, if applicable.
    ClientVpnConnection -> Maybe [Text]
postureComplianceStatuses :: Prelude.Maybe [Prelude.Text],
    -- | The current state of the client connection.
    ClientVpnConnection -> Maybe ClientVpnConnectionStatus
status :: Prelude.Maybe ClientVpnConnectionStatus,
    -- | The current date and time.
    ClientVpnConnection -> Maybe Text
timestamp :: Prelude.Maybe Prelude.Text,
    -- | The username of the client who established the client connection. This
    -- information is only provided if Active Directory client authentication
    -- is used.
    ClientVpnConnection -> Maybe Text
username :: Prelude.Maybe Prelude.Text
  }
  deriving (ClientVpnConnection -> ClientVpnConnection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClientVpnConnection -> ClientVpnConnection -> Bool
$c/= :: ClientVpnConnection -> ClientVpnConnection -> Bool
== :: ClientVpnConnection -> ClientVpnConnection -> Bool
$c== :: ClientVpnConnection -> ClientVpnConnection -> Bool
Prelude.Eq, ReadPrec [ClientVpnConnection]
ReadPrec ClientVpnConnection
Int -> ReadS ClientVpnConnection
ReadS [ClientVpnConnection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClientVpnConnection]
$creadListPrec :: ReadPrec [ClientVpnConnection]
readPrec :: ReadPrec ClientVpnConnection
$creadPrec :: ReadPrec ClientVpnConnection
readList :: ReadS [ClientVpnConnection]
$creadList :: ReadS [ClientVpnConnection]
readsPrec :: Int -> ReadS ClientVpnConnection
$creadsPrec :: Int -> ReadS ClientVpnConnection
Prelude.Read, Int -> ClientVpnConnection -> ShowS
[ClientVpnConnection] -> ShowS
ClientVpnConnection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClientVpnConnection] -> ShowS
$cshowList :: [ClientVpnConnection] -> ShowS
show :: ClientVpnConnection -> String
$cshow :: ClientVpnConnection -> String
showsPrec :: Int -> ClientVpnConnection -> ShowS
$cshowsPrec :: Int -> ClientVpnConnection -> ShowS
Prelude.Show, forall x. Rep ClientVpnConnection x -> ClientVpnConnection
forall x. ClientVpnConnection -> Rep ClientVpnConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClientVpnConnection x -> ClientVpnConnection
$cfrom :: forall x. ClientVpnConnection -> Rep ClientVpnConnection x
Prelude.Generic)

-- |
-- Create a value of 'ClientVpnConnection' 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:
--
-- 'clientIp', 'clientVpnConnection_clientIp' - The IP address of the client.
--
-- 'clientVpnEndpointId', 'clientVpnConnection_clientVpnEndpointId' - The ID of the Client VPN endpoint to which the client is connected.
--
-- 'commonName', 'clientVpnConnection_commonName' - The common name associated with the client. This is either the name of
-- the client certificate, or the Active Directory user name.
--
-- 'connectionEndTime', 'clientVpnConnection_connectionEndTime' - The date and time the client connection was terminated.
--
-- 'connectionEstablishedTime', 'clientVpnConnection_connectionEstablishedTime' - The date and time the client connection was established.
--
-- 'connectionId', 'clientVpnConnection_connectionId' - The ID of the client connection.
--
-- 'egressBytes', 'clientVpnConnection_egressBytes' - The number of bytes received by the client.
--
-- 'egressPackets', 'clientVpnConnection_egressPackets' - The number of packets received by the client.
--
-- 'ingressBytes', 'clientVpnConnection_ingressBytes' - The number of bytes sent by the client.
--
-- 'ingressPackets', 'clientVpnConnection_ingressPackets' - The number of packets sent by the client.
--
-- 'postureComplianceStatuses', 'clientVpnConnection_postureComplianceStatuses' - The statuses returned by the client connect handler for posture
-- compliance, if applicable.
--
-- 'status', 'clientVpnConnection_status' - The current state of the client connection.
--
-- 'timestamp', 'clientVpnConnection_timestamp' - The current date and time.
--
-- 'username', 'clientVpnConnection_username' - The username of the client who established the client connection. This
-- information is only provided if Active Directory client authentication
-- is used.
newClientVpnConnection ::
  ClientVpnConnection
newClientVpnConnection :: ClientVpnConnection
newClientVpnConnection =
  ClientVpnConnection'
    { $sel:clientIp:ClientVpnConnection' :: Maybe Text
clientIp = forall a. Maybe a
Prelude.Nothing,
      $sel:clientVpnEndpointId:ClientVpnConnection' :: Maybe Text
clientVpnEndpointId = forall a. Maybe a
Prelude.Nothing,
      $sel:commonName:ClientVpnConnection' :: Maybe Text
commonName = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionEndTime:ClientVpnConnection' :: Maybe Text
connectionEndTime = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionEstablishedTime:ClientVpnConnection' :: Maybe Text
connectionEstablishedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:ClientVpnConnection' :: Maybe Text
connectionId = forall a. Maybe a
Prelude.Nothing,
      $sel:egressBytes:ClientVpnConnection' :: Maybe Text
egressBytes = forall a. Maybe a
Prelude.Nothing,
      $sel:egressPackets:ClientVpnConnection' :: Maybe Text
egressPackets = forall a. Maybe a
Prelude.Nothing,
      $sel:ingressBytes:ClientVpnConnection' :: Maybe Text
ingressBytes = forall a. Maybe a
Prelude.Nothing,
      $sel:ingressPackets:ClientVpnConnection' :: Maybe Text
ingressPackets = forall a. Maybe a
Prelude.Nothing,
      $sel:postureComplianceStatuses:ClientVpnConnection' :: Maybe [Text]
postureComplianceStatuses = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ClientVpnConnection' :: Maybe ClientVpnConnectionStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:timestamp:ClientVpnConnection' :: Maybe Text
timestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:username:ClientVpnConnection' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
    }

-- | The IP address of the client.
clientVpnConnection_clientIp :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_clientIp :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_clientIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
clientIp :: Maybe Text
$sel:clientIp:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
clientIp} -> Maybe Text
clientIp) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:clientIp:ClientVpnConnection' :: Maybe Text
clientIp = Maybe Text
a} :: ClientVpnConnection)

-- | The ID of the Client VPN endpoint to which the client is connected.
clientVpnConnection_clientVpnEndpointId :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_clientVpnEndpointId :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_clientVpnEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
clientVpnEndpointId :: Maybe Text
$sel:clientVpnEndpointId:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
clientVpnEndpointId} -> Maybe Text
clientVpnEndpointId) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:clientVpnEndpointId:ClientVpnConnection' :: Maybe Text
clientVpnEndpointId = Maybe Text
a} :: ClientVpnConnection)

-- | The common name associated with the client. This is either the name of
-- the client certificate, or the Active Directory user name.
clientVpnConnection_commonName :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_commonName :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_commonName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
commonName :: Maybe Text
$sel:commonName:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
commonName} -> Maybe Text
commonName) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:commonName:ClientVpnConnection' :: Maybe Text
commonName = Maybe Text
a} :: ClientVpnConnection)

-- | The date and time the client connection was terminated.
clientVpnConnection_connectionEndTime :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_connectionEndTime :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_connectionEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
connectionEndTime :: Maybe Text
$sel:connectionEndTime:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
connectionEndTime} -> Maybe Text
connectionEndTime) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:connectionEndTime:ClientVpnConnection' :: Maybe Text
connectionEndTime = Maybe Text
a} :: ClientVpnConnection)

-- | The date and time the client connection was established.
clientVpnConnection_connectionEstablishedTime :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_connectionEstablishedTime :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_connectionEstablishedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
connectionEstablishedTime :: Maybe Text
$sel:connectionEstablishedTime:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
connectionEstablishedTime} -> Maybe Text
connectionEstablishedTime) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:connectionEstablishedTime:ClientVpnConnection' :: Maybe Text
connectionEstablishedTime = Maybe Text
a} :: ClientVpnConnection)

-- | The ID of the client connection.
clientVpnConnection_connectionId :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_connectionId :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_connectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:connectionId:ClientVpnConnection' :: Maybe Text
connectionId = Maybe Text
a} :: ClientVpnConnection)

-- | The number of bytes received by the client.
clientVpnConnection_egressBytes :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_egressBytes :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_egressBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
egressBytes :: Maybe Text
$sel:egressBytes:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
egressBytes} -> Maybe Text
egressBytes) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:egressBytes:ClientVpnConnection' :: Maybe Text
egressBytes = Maybe Text
a} :: ClientVpnConnection)

-- | The number of packets received by the client.
clientVpnConnection_egressPackets :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_egressPackets :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_egressPackets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
egressPackets :: Maybe Text
$sel:egressPackets:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
egressPackets} -> Maybe Text
egressPackets) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:egressPackets:ClientVpnConnection' :: Maybe Text
egressPackets = Maybe Text
a} :: ClientVpnConnection)

-- | The number of bytes sent by the client.
clientVpnConnection_ingressBytes :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_ingressBytes :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_ingressBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
ingressBytes :: Maybe Text
$sel:ingressBytes:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
ingressBytes} -> Maybe Text
ingressBytes) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:ingressBytes:ClientVpnConnection' :: Maybe Text
ingressBytes = Maybe Text
a} :: ClientVpnConnection)

-- | The number of packets sent by the client.
clientVpnConnection_ingressPackets :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_ingressPackets :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_ingressPackets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
ingressPackets :: Maybe Text
$sel:ingressPackets:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
ingressPackets} -> Maybe Text
ingressPackets) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:ingressPackets:ClientVpnConnection' :: Maybe Text
ingressPackets = Maybe Text
a} :: ClientVpnConnection)

-- | The statuses returned by the client connect handler for posture
-- compliance, if applicable.
clientVpnConnection_postureComplianceStatuses :: Lens.Lens' ClientVpnConnection (Prelude.Maybe [Prelude.Text])
clientVpnConnection_postureComplianceStatuses :: Lens' ClientVpnConnection (Maybe [Text])
clientVpnConnection_postureComplianceStatuses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe [Text]
postureComplianceStatuses :: Maybe [Text]
$sel:postureComplianceStatuses:ClientVpnConnection' :: ClientVpnConnection -> Maybe [Text]
postureComplianceStatuses} -> Maybe [Text]
postureComplianceStatuses) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe [Text]
a -> ClientVpnConnection
s {$sel:postureComplianceStatuses:ClientVpnConnection' :: Maybe [Text]
postureComplianceStatuses = Maybe [Text]
a} :: ClientVpnConnection) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The current state of the client connection.
clientVpnConnection_status :: Lens.Lens' ClientVpnConnection (Prelude.Maybe ClientVpnConnectionStatus)
clientVpnConnection_status :: Lens' ClientVpnConnection (Maybe ClientVpnConnectionStatus)
clientVpnConnection_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe ClientVpnConnectionStatus
status :: Maybe ClientVpnConnectionStatus
$sel:status:ClientVpnConnection' :: ClientVpnConnection -> Maybe ClientVpnConnectionStatus
status} -> Maybe ClientVpnConnectionStatus
status) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe ClientVpnConnectionStatus
a -> ClientVpnConnection
s {$sel:status:ClientVpnConnection' :: Maybe ClientVpnConnectionStatus
status = Maybe ClientVpnConnectionStatus
a} :: ClientVpnConnection)

-- | The current date and time.
clientVpnConnection_timestamp :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_timestamp :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_timestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
timestamp :: Maybe Text
$sel:timestamp:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
timestamp} -> Maybe Text
timestamp) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:timestamp:ClientVpnConnection' :: Maybe Text
timestamp = Maybe Text
a} :: ClientVpnConnection)

-- | The username of the client who established the client connection. This
-- information is only provided if Active Directory client authentication
-- is used.
clientVpnConnection_username :: Lens.Lens' ClientVpnConnection (Prelude.Maybe Prelude.Text)
clientVpnConnection_username :: Lens' ClientVpnConnection (Maybe Text)
clientVpnConnection_username = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnConnection' {Maybe Text
username :: Maybe Text
$sel:username:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
username} -> Maybe Text
username) (\s :: ClientVpnConnection
s@ClientVpnConnection' {} Maybe Text
a -> ClientVpnConnection
s {$sel:username:ClientVpnConnection' :: Maybe Text
username = Maybe Text
a} :: ClientVpnConnection)

instance Data.FromXML ClientVpnConnection where
  parseXML :: [Node] -> Either String ClientVpnConnection
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe ClientVpnConnectionStatus
-> Maybe Text
-> Maybe Text
-> ClientVpnConnection
ClientVpnConnection'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"clientIp")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"clientVpnEndpointId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"commonName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"connectionEndTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"connectionEstablishedTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"connectionId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"egressBytes")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"egressPackets")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ingressBytes")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ingressPackets")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"postureComplianceStatusSet"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"status")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"timestamp")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"username")

instance Prelude.Hashable ClientVpnConnection where
  hashWithSalt :: Int -> ClientVpnConnection -> Int
hashWithSalt Int
_salt ClientVpnConnection' {Maybe [Text]
Maybe Text
Maybe ClientVpnConnectionStatus
username :: Maybe Text
timestamp :: Maybe Text
status :: Maybe ClientVpnConnectionStatus
postureComplianceStatuses :: Maybe [Text]
ingressPackets :: Maybe Text
ingressBytes :: Maybe Text
egressPackets :: Maybe Text
egressBytes :: Maybe Text
connectionId :: Maybe Text
connectionEstablishedTime :: Maybe Text
connectionEndTime :: Maybe Text
commonName :: Maybe Text
clientVpnEndpointId :: Maybe Text
clientIp :: Maybe Text
$sel:username:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:timestamp:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:status:ClientVpnConnection' :: ClientVpnConnection -> Maybe ClientVpnConnectionStatus
$sel:postureComplianceStatuses:ClientVpnConnection' :: ClientVpnConnection -> Maybe [Text]
$sel:ingressPackets:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:ingressBytes:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:egressPackets:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:egressBytes:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:connectionId:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:connectionEstablishedTime:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:connectionEndTime:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:commonName:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:clientVpnEndpointId:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:clientIp:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientIp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientVpnEndpointId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
commonName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectionEndTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectionEstablishedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
egressBytes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
egressPackets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ingressBytes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ingressPackets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
postureComplianceStatuses
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ClientVpnConnectionStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
timestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username

instance Prelude.NFData ClientVpnConnection where
  rnf :: ClientVpnConnection -> ()
rnf ClientVpnConnection' {Maybe [Text]
Maybe Text
Maybe ClientVpnConnectionStatus
username :: Maybe Text
timestamp :: Maybe Text
status :: Maybe ClientVpnConnectionStatus
postureComplianceStatuses :: Maybe [Text]
ingressPackets :: Maybe Text
ingressBytes :: Maybe Text
egressPackets :: Maybe Text
egressBytes :: Maybe Text
connectionId :: Maybe Text
connectionEstablishedTime :: Maybe Text
connectionEndTime :: Maybe Text
commonName :: Maybe Text
clientVpnEndpointId :: Maybe Text
clientIp :: Maybe Text
$sel:username:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:timestamp:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:status:ClientVpnConnection' :: ClientVpnConnection -> Maybe ClientVpnConnectionStatus
$sel:postureComplianceStatuses:ClientVpnConnection' :: ClientVpnConnection -> Maybe [Text]
$sel:ingressPackets:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:ingressBytes:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:egressPackets:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:egressBytes:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:connectionId:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:connectionEstablishedTime:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:connectionEndTime:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:commonName:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:clientVpnEndpointId:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
$sel:clientIp:ClientVpnConnection' :: ClientVpnConnection -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientIp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientVpnEndpointId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
commonName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionEndTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionEstablishedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
egressBytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
egressPackets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ingressBytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ingressPackets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
postureComplianceStatuses
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ClientVpnConnectionStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
timestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username