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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.ActionLocalPortDetails
import Amazonka.SecurityHub.Types.ActionRemoteIpDetails
import Amazonka.SecurityHub.Types.ActionRemotePortDetails

-- | Provided if @ActionType@ is @NETWORK_CONNECTION@. It provides details
-- about the attempted network connection that was detected.
--
-- /See:/ 'newNetworkConnectionAction' smart constructor.
data NetworkConnectionAction = NetworkConnectionAction'
  { -- | Information about the remote IP address that issued the network
    -- connection request.
    NetworkConnectionAction -> Maybe ActionRemoteIpDetails
remoteIpDetails :: Prelude.Maybe ActionRemoteIpDetails,
    -- | The protocol used to make the network connection request.
    NetworkConnectionAction -> Maybe Text
protocol :: Prelude.Maybe Prelude.Text,
    -- | Information about the port on the remote IP address.
    NetworkConnectionAction -> Maybe ActionRemotePortDetails
remotePortDetails :: Prelude.Maybe ActionRemotePortDetails,
    -- | Indicates whether the network connection attempt was blocked.
    NetworkConnectionAction -> Maybe Bool
blocked :: Prelude.Maybe Prelude.Bool,
    -- | The direction of the network connection request (@IN@ or @OUT@).
    NetworkConnectionAction -> Maybe Text
connectionDirection :: Prelude.Maybe Prelude.Text,
    -- | Information about the port on the EC2 instance.
    NetworkConnectionAction -> Maybe ActionLocalPortDetails
localPortDetails :: Prelude.Maybe ActionLocalPortDetails
  }
  deriving (NetworkConnectionAction -> NetworkConnectionAction -> Bool
(NetworkConnectionAction -> NetworkConnectionAction -> Bool)
-> (NetworkConnectionAction -> NetworkConnectionAction -> Bool)
-> Eq NetworkConnectionAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkConnectionAction -> NetworkConnectionAction -> Bool
$c/= :: NetworkConnectionAction -> NetworkConnectionAction -> Bool
== :: NetworkConnectionAction -> NetworkConnectionAction -> Bool
$c== :: NetworkConnectionAction -> NetworkConnectionAction -> Bool
Prelude.Eq, ReadPrec [NetworkConnectionAction]
ReadPrec NetworkConnectionAction
Int -> ReadS NetworkConnectionAction
ReadS [NetworkConnectionAction]
(Int -> ReadS NetworkConnectionAction)
-> ReadS [NetworkConnectionAction]
-> ReadPrec NetworkConnectionAction
-> ReadPrec [NetworkConnectionAction]
-> Read NetworkConnectionAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkConnectionAction]
$creadListPrec :: ReadPrec [NetworkConnectionAction]
readPrec :: ReadPrec NetworkConnectionAction
$creadPrec :: ReadPrec NetworkConnectionAction
readList :: ReadS [NetworkConnectionAction]
$creadList :: ReadS [NetworkConnectionAction]
readsPrec :: Int -> ReadS NetworkConnectionAction
$creadsPrec :: Int -> ReadS NetworkConnectionAction
Prelude.Read, Int -> NetworkConnectionAction -> ShowS
[NetworkConnectionAction] -> ShowS
NetworkConnectionAction -> String
(Int -> NetworkConnectionAction -> ShowS)
-> (NetworkConnectionAction -> String)
-> ([NetworkConnectionAction] -> ShowS)
-> Show NetworkConnectionAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkConnectionAction] -> ShowS
$cshowList :: [NetworkConnectionAction] -> ShowS
show :: NetworkConnectionAction -> String
$cshow :: NetworkConnectionAction -> String
showsPrec :: Int -> NetworkConnectionAction -> ShowS
$cshowsPrec :: Int -> NetworkConnectionAction -> ShowS
Prelude.Show, (forall x.
 NetworkConnectionAction -> Rep NetworkConnectionAction x)
-> (forall x.
    Rep NetworkConnectionAction x -> NetworkConnectionAction)
-> Generic NetworkConnectionAction
forall x. Rep NetworkConnectionAction x -> NetworkConnectionAction
forall x. NetworkConnectionAction -> Rep NetworkConnectionAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NetworkConnectionAction x -> NetworkConnectionAction
$cfrom :: forall x. NetworkConnectionAction -> Rep NetworkConnectionAction x
Prelude.Generic)

-- |
-- Create a value of 'NetworkConnectionAction' 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:
--
-- 'remoteIpDetails', 'networkConnectionAction_remoteIpDetails' - Information about the remote IP address that issued the network
-- connection request.
--
-- 'protocol', 'networkConnectionAction_protocol' - The protocol used to make the network connection request.
--
-- 'remotePortDetails', 'networkConnectionAction_remotePortDetails' - Information about the port on the remote IP address.
--
-- 'blocked', 'networkConnectionAction_blocked' - Indicates whether the network connection attempt was blocked.
--
-- 'connectionDirection', 'networkConnectionAction_connectionDirection' - The direction of the network connection request (@IN@ or @OUT@).
--
-- 'localPortDetails', 'networkConnectionAction_localPortDetails' - Information about the port on the EC2 instance.
newNetworkConnectionAction ::
  NetworkConnectionAction
newNetworkConnectionAction :: NetworkConnectionAction
newNetworkConnectionAction =
  NetworkConnectionAction' :: Maybe ActionRemoteIpDetails
-> Maybe Text
-> Maybe ActionRemotePortDetails
-> Maybe Bool
-> Maybe Text
-> Maybe ActionLocalPortDetails
-> NetworkConnectionAction
NetworkConnectionAction'
    { $sel:remoteIpDetails:NetworkConnectionAction' :: Maybe ActionRemoteIpDetails
remoteIpDetails =
        Maybe ActionRemoteIpDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:NetworkConnectionAction' :: Maybe Text
protocol = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remotePortDetails:NetworkConnectionAction' :: Maybe ActionRemotePortDetails
remotePortDetails = Maybe ActionRemotePortDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:blocked:NetworkConnectionAction' :: Maybe Bool
blocked = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionDirection:NetworkConnectionAction' :: Maybe Text
connectionDirection = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:localPortDetails:NetworkConnectionAction' :: Maybe ActionLocalPortDetails
localPortDetails = Maybe ActionLocalPortDetails
forall a. Maybe a
Prelude.Nothing
    }

-- | Information about the remote IP address that issued the network
-- connection request.
networkConnectionAction_remoteIpDetails :: Lens.Lens' NetworkConnectionAction (Prelude.Maybe ActionRemoteIpDetails)
networkConnectionAction_remoteIpDetails :: (Maybe ActionRemoteIpDetails -> f (Maybe ActionRemoteIpDetails))
-> NetworkConnectionAction -> f NetworkConnectionAction
networkConnectionAction_remoteIpDetails = (NetworkConnectionAction -> Maybe ActionRemoteIpDetails)
-> (NetworkConnectionAction
    -> Maybe ActionRemoteIpDetails -> NetworkConnectionAction)
-> Lens
     NetworkConnectionAction
     NetworkConnectionAction
     (Maybe ActionRemoteIpDetails)
     (Maybe ActionRemoteIpDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkConnectionAction' {Maybe ActionRemoteIpDetails
remoteIpDetails :: Maybe ActionRemoteIpDetails
$sel:remoteIpDetails:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe ActionRemoteIpDetails
remoteIpDetails} -> Maybe ActionRemoteIpDetails
remoteIpDetails) (\s :: NetworkConnectionAction
s@NetworkConnectionAction' {} Maybe ActionRemoteIpDetails
a -> NetworkConnectionAction
s {$sel:remoteIpDetails:NetworkConnectionAction' :: Maybe ActionRemoteIpDetails
remoteIpDetails = Maybe ActionRemoteIpDetails
a} :: NetworkConnectionAction)

-- | The protocol used to make the network connection request.
networkConnectionAction_protocol :: Lens.Lens' NetworkConnectionAction (Prelude.Maybe Prelude.Text)
networkConnectionAction_protocol :: (Maybe Text -> f (Maybe Text))
-> NetworkConnectionAction -> f NetworkConnectionAction
networkConnectionAction_protocol = (NetworkConnectionAction -> Maybe Text)
-> (NetworkConnectionAction
    -> Maybe Text -> NetworkConnectionAction)
-> Lens
     NetworkConnectionAction
     NetworkConnectionAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkConnectionAction' {Maybe Text
protocol :: Maybe Text
$sel:protocol:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe Text
protocol} -> Maybe Text
protocol) (\s :: NetworkConnectionAction
s@NetworkConnectionAction' {} Maybe Text
a -> NetworkConnectionAction
s {$sel:protocol:NetworkConnectionAction' :: Maybe Text
protocol = Maybe Text
a} :: NetworkConnectionAction)

-- | Information about the port on the remote IP address.
networkConnectionAction_remotePortDetails :: Lens.Lens' NetworkConnectionAction (Prelude.Maybe ActionRemotePortDetails)
networkConnectionAction_remotePortDetails :: (Maybe ActionRemotePortDetails
 -> f (Maybe ActionRemotePortDetails))
-> NetworkConnectionAction -> f NetworkConnectionAction
networkConnectionAction_remotePortDetails = (NetworkConnectionAction -> Maybe ActionRemotePortDetails)
-> (NetworkConnectionAction
    -> Maybe ActionRemotePortDetails -> NetworkConnectionAction)
-> Lens
     NetworkConnectionAction
     NetworkConnectionAction
     (Maybe ActionRemotePortDetails)
     (Maybe ActionRemotePortDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkConnectionAction' {Maybe ActionRemotePortDetails
remotePortDetails :: Maybe ActionRemotePortDetails
$sel:remotePortDetails:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe ActionRemotePortDetails
remotePortDetails} -> Maybe ActionRemotePortDetails
remotePortDetails) (\s :: NetworkConnectionAction
s@NetworkConnectionAction' {} Maybe ActionRemotePortDetails
a -> NetworkConnectionAction
s {$sel:remotePortDetails:NetworkConnectionAction' :: Maybe ActionRemotePortDetails
remotePortDetails = Maybe ActionRemotePortDetails
a} :: NetworkConnectionAction)

-- | Indicates whether the network connection attempt was blocked.
networkConnectionAction_blocked :: Lens.Lens' NetworkConnectionAction (Prelude.Maybe Prelude.Bool)
networkConnectionAction_blocked :: (Maybe Bool -> f (Maybe Bool))
-> NetworkConnectionAction -> f NetworkConnectionAction
networkConnectionAction_blocked = (NetworkConnectionAction -> Maybe Bool)
-> (NetworkConnectionAction
    -> Maybe Bool -> NetworkConnectionAction)
-> Lens
     NetworkConnectionAction
     NetworkConnectionAction
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkConnectionAction' {Maybe Bool
blocked :: Maybe Bool
$sel:blocked:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe Bool
blocked} -> Maybe Bool
blocked) (\s :: NetworkConnectionAction
s@NetworkConnectionAction' {} Maybe Bool
a -> NetworkConnectionAction
s {$sel:blocked:NetworkConnectionAction' :: Maybe Bool
blocked = Maybe Bool
a} :: NetworkConnectionAction)

-- | The direction of the network connection request (@IN@ or @OUT@).
networkConnectionAction_connectionDirection :: Lens.Lens' NetworkConnectionAction (Prelude.Maybe Prelude.Text)
networkConnectionAction_connectionDirection :: (Maybe Text -> f (Maybe Text))
-> NetworkConnectionAction -> f NetworkConnectionAction
networkConnectionAction_connectionDirection = (NetworkConnectionAction -> Maybe Text)
-> (NetworkConnectionAction
    -> Maybe Text -> NetworkConnectionAction)
-> Lens
     NetworkConnectionAction
     NetworkConnectionAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkConnectionAction' {Maybe Text
connectionDirection :: Maybe Text
$sel:connectionDirection:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe Text
connectionDirection} -> Maybe Text
connectionDirection) (\s :: NetworkConnectionAction
s@NetworkConnectionAction' {} Maybe Text
a -> NetworkConnectionAction
s {$sel:connectionDirection:NetworkConnectionAction' :: Maybe Text
connectionDirection = Maybe Text
a} :: NetworkConnectionAction)

-- | Information about the port on the EC2 instance.
networkConnectionAction_localPortDetails :: Lens.Lens' NetworkConnectionAction (Prelude.Maybe ActionLocalPortDetails)
networkConnectionAction_localPortDetails :: (Maybe ActionLocalPortDetails -> f (Maybe ActionLocalPortDetails))
-> NetworkConnectionAction -> f NetworkConnectionAction
networkConnectionAction_localPortDetails = (NetworkConnectionAction -> Maybe ActionLocalPortDetails)
-> (NetworkConnectionAction
    -> Maybe ActionLocalPortDetails -> NetworkConnectionAction)
-> Lens
     NetworkConnectionAction
     NetworkConnectionAction
     (Maybe ActionLocalPortDetails)
     (Maybe ActionLocalPortDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkConnectionAction' {Maybe ActionLocalPortDetails
localPortDetails :: Maybe ActionLocalPortDetails
$sel:localPortDetails:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe ActionLocalPortDetails
localPortDetails} -> Maybe ActionLocalPortDetails
localPortDetails) (\s :: NetworkConnectionAction
s@NetworkConnectionAction' {} Maybe ActionLocalPortDetails
a -> NetworkConnectionAction
s {$sel:localPortDetails:NetworkConnectionAction' :: Maybe ActionLocalPortDetails
localPortDetails = Maybe ActionLocalPortDetails
a} :: NetworkConnectionAction)

instance Core.FromJSON NetworkConnectionAction where
  parseJSON :: Value -> Parser NetworkConnectionAction
parseJSON =
    String
-> (Object -> Parser NetworkConnectionAction)
-> Value
-> Parser NetworkConnectionAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NetworkConnectionAction"
      ( \Object
x ->
          Maybe ActionRemoteIpDetails
-> Maybe Text
-> Maybe ActionRemotePortDetails
-> Maybe Bool
-> Maybe Text
-> Maybe ActionLocalPortDetails
-> NetworkConnectionAction
NetworkConnectionAction'
            (Maybe ActionRemoteIpDetails
 -> Maybe Text
 -> Maybe ActionRemotePortDetails
 -> Maybe Bool
 -> Maybe Text
 -> Maybe ActionLocalPortDetails
 -> NetworkConnectionAction)
-> Parser (Maybe ActionRemoteIpDetails)
-> Parser
     (Maybe Text
      -> Maybe ActionRemotePortDetails
      -> Maybe Bool
      -> Maybe Text
      -> Maybe ActionLocalPortDetails
      -> NetworkConnectionAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ActionRemoteIpDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RemoteIpDetails")
            Parser
  (Maybe Text
   -> Maybe ActionRemotePortDetails
   -> Maybe Bool
   -> Maybe Text
   -> Maybe ActionLocalPortDetails
   -> NetworkConnectionAction)
-> Parser (Maybe Text)
-> Parser
     (Maybe ActionRemotePortDetails
      -> Maybe Bool
      -> Maybe Text
      -> Maybe ActionLocalPortDetails
      -> NetworkConnectionAction)
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
"Protocol")
            Parser
  (Maybe ActionRemotePortDetails
   -> Maybe Bool
   -> Maybe Text
   -> Maybe ActionLocalPortDetails
   -> NetworkConnectionAction)
-> Parser (Maybe ActionRemotePortDetails)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe ActionLocalPortDetails
      -> NetworkConnectionAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionRemotePortDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RemotePortDetails")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe ActionLocalPortDetails
   -> NetworkConnectionAction)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe ActionLocalPortDetails -> NetworkConnectionAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Blocked")
            Parser
  (Maybe Text
   -> Maybe ActionLocalPortDetails -> NetworkConnectionAction)
-> Parser (Maybe Text)
-> Parser (Maybe ActionLocalPortDetails -> NetworkConnectionAction)
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
"ConnectionDirection")
            Parser (Maybe ActionLocalPortDetails -> NetworkConnectionAction)
-> Parser (Maybe ActionLocalPortDetails)
-> Parser NetworkConnectionAction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionLocalPortDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocalPortDetails")
      )

instance Prelude.Hashable NetworkConnectionAction

instance Prelude.NFData NetworkConnectionAction

instance Core.ToJSON NetworkConnectionAction where
  toJSON :: NetworkConnectionAction -> Value
toJSON NetworkConnectionAction' {Maybe Bool
Maybe Text
Maybe ActionLocalPortDetails
Maybe ActionRemotePortDetails
Maybe ActionRemoteIpDetails
localPortDetails :: Maybe ActionLocalPortDetails
connectionDirection :: Maybe Text
blocked :: Maybe Bool
remotePortDetails :: Maybe ActionRemotePortDetails
protocol :: Maybe Text
remoteIpDetails :: Maybe ActionRemoteIpDetails
$sel:localPortDetails:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe ActionLocalPortDetails
$sel:connectionDirection:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe Text
$sel:blocked:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe Bool
$sel:remotePortDetails:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe ActionRemotePortDetails
$sel:protocol:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe Text
$sel:remoteIpDetails:NetworkConnectionAction' :: NetworkConnectionAction -> Maybe ActionRemoteIpDetails
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RemoteIpDetails" Text -> ActionRemoteIpDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ActionRemoteIpDetails -> Pair)
-> Maybe ActionRemoteIpDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActionRemoteIpDetails
remoteIpDetails,
            (Text
"Protocol" 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
protocol,
            (Text
"RemotePortDetails" Text -> ActionRemotePortDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ActionRemotePortDetails -> Pair)
-> Maybe ActionRemotePortDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActionRemotePortDetails
remotePortDetails,
            (Text
"Blocked" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
blocked,
            (Text
"ConnectionDirection" 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
connectionDirection,
            (Text
"LocalPortDetails" Text -> ActionLocalPortDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ActionLocalPortDetails -> Pair)
-> Maybe ActionLocalPortDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActionLocalPortDetails
localPortDetails
          ]
      )