{-# 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.MigrationHubReFactorSpaces.Types.LambdaEndpointSummary
-- 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.MigrationHubReFactorSpaces.Types.LambdaEndpointSummary where

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

-- | The summary for the Lambda endpoint type.
--
-- /See:/ 'newLambdaEndpointSummary' smart constructor.
data LambdaEndpointSummary = LambdaEndpointSummary'
  { -- | The Amazon Resource Name (ARN) of the Lambda endpoint.
    LambdaEndpointSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text
  }
  deriving (LambdaEndpointSummary -> LambdaEndpointSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaEndpointSummary -> LambdaEndpointSummary -> Bool
$c/= :: LambdaEndpointSummary -> LambdaEndpointSummary -> Bool
== :: LambdaEndpointSummary -> LambdaEndpointSummary -> Bool
$c== :: LambdaEndpointSummary -> LambdaEndpointSummary -> Bool
Prelude.Eq, ReadPrec [LambdaEndpointSummary]
ReadPrec LambdaEndpointSummary
Int -> ReadS LambdaEndpointSummary
ReadS [LambdaEndpointSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaEndpointSummary]
$creadListPrec :: ReadPrec [LambdaEndpointSummary]
readPrec :: ReadPrec LambdaEndpointSummary
$creadPrec :: ReadPrec LambdaEndpointSummary
readList :: ReadS [LambdaEndpointSummary]
$creadList :: ReadS [LambdaEndpointSummary]
readsPrec :: Int -> ReadS LambdaEndpointSummary
$creadsPrec :: Int -> ReadS LambdaEndpointSummary
Prelude.Read, Int -> LambdaEndpointSummary -> ShowS
[LambdaEndpointSummary] -> ShowS
LambdaEndpointSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaEndpointSummary] -> ShowS
$cshowList :: [LambdaEndpointSummary] -> ShowS
show :: LambdaEndpointSummary -> String
$cshow :: LambdaEndpointSummary -> String
showsPrec :: Int -> LambdaEndpointSummary -> ShowS
$cshowsPrec :: Int -> LambdaEndpointSummary -> ShowS
Prelude.Show, forall x. Rep LambdaEndpointSummary x -> LambdaEndpointSummary
forall x. LambdaEndpointSummary -> Rep LambdaEndpointSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LambdaEndpointSummary x -> LambdaEndpointSummary
$cfrom :: forall x. LambdaEndpointSummary -> Rep LambdaEndpointSummary x
Prelude.Generic)

-- |
-- Create a value of 'LambdaEndpointSummary' 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:
--
-- 'arn', 'lambdaEndpointSummary_arn' - The Amazon Resource Name (ARN) of the Lambda endpoint.
newLambdaEndpointSummary ::
  LambdaEndpointSummary
newLambdaEndpointSummary :: LambdaEndpointSummary
newLambdaEndpointSummary =
  LambdaEndpointSummary' {$sel:arn:LambdaEndpointSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing}

-- | The Amazon Resource Name (ARN) of the Lambda endpoint.
lambdaEndpointSummary_arn :: Lens.Lens' LambdaEndpointSummary (Prelude.Maybe Prelude.Text)
lambdaEndpointSummary_arn :: Lens' LambdaEndpointSummary (Maybe Text)
lambdaEndpointSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaEndpointSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:LambdaEndpointSummary' :: LambdaEndpointSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: LambdaEndpointSummary
s@LambdaEndpointSummary' {} Maybe Text
a -> LambdaEndpointSummary
s {$sel:arn:LambdaEndpointSummary' :: Maybe Text
arn = Maybe Text
a} :: LambdaEndpointSummary)

instance Data.FromJSON LambdaEndpointSummary where
  parseJSON :: Value -> Parser LambdaEndpointSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LambdaEndpointSummary"
      ( \Object
x ->
          Maybe Text -> LambdaEndpointSummary
LambdaEndpointSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
      )

instance Prelude.Hashable LambdaEndpointSummary where
  hashWithSalt :: Int -> LambdaEndpointSummary -> Int
hashWithSalt Int
_salt LambdaEndpointSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:LambdaEndpointSummary' :: LambdaEndpointSummary -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn

instance Prelude.NFData LambdaEndpointSummary where
  rnf :: LambdaEndpointSummary -> ()
rnf LambdaEndpointSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:LambdaEndpointSummary' :: LambdaEndpointSummary -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn