{-# 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.Lambda.Types.TracingConfigResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.Types.TracingMode
import qualified Amazonka.Prelude as Prelude
data TracingConfigResponse = TracingConfigResponse'
{
TracingConfigResponse -> Maybe TracingMode
mode :: Prelude.Maybe TracingMode
}
deriving (TracingConfigResponse -> TracingConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TracingConfigResponse -> TracingConfigResponse -> Bool
$c/= :: TracingConfigResponse -> TracingConfigResponse -> Bool
== :: TracingConfigResponse -> TracingConfigResponse -> Bool
$c== :: TracingConfigResponse -> TracingConfigResponse -> Bool
Prelude.Eq, ReadPrec [TracingConfigResponse]
ReadPrec TracingConfigResponse
Int -> ReadS TracingConfigResponse
ReadS [TracingConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TracingConfigResponse]
$creadListPrec :: ReadPrec [TracingConfigResponse]
readPrec :: ReadPrec TracingConfigResponse
$creadPrec :: ReadPrec TracingConfigResponse
readList :: ReadS [TracingConfigResponse]
$creadList :: ReadS [TracingConfigResponse]
readsPrec :: Int -> ReadS TracingConfigResponse
$creadsPrec :: Int -> ReadS TracingConfigResponse
Prelude.Read, Int -> TracingConfigResponse -> ShowS
[TracingConfigResponse] -> ShowS
TracingConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TracingConfigResponse] -> ShowS
$cshowList :: [TracingConfigResponse] -> ShowS
show :: TracingConfigResponse -> String
$cshow :: TracingConfigResponse -> String
showsPrec :: Int -> TracingConfigResponse -> ShowS
$cshowsPrec :: Int -> TracingConfigResponse -> ShowS
Prelude.Show, forall x. Rep TracingConfigResponse x -> TracingConfigResponse
forall x. TracingConfigResponse -> Rep TracingConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TracingConfigResponse x -> TracingConfigResponse
$cfrom :: forall x. TracingConfigResponse -> Rep TracingConfigResponse x
Prelude.Generic)
newTracingConfigResponse ::
TracingConfigResponse
newTracingConfigResponse :: TracingConfigResponse
newTracingConfigResponse =
TracingConfigResponse' {$sel:mode:TracingConfigResponse' :: Maybe TracingMode
mode = forall a. Maybe a
Prelude.Nothing}
tracingConfigResponse_mode :: Lens.Lens' TracingConfigResponse (Prelude.Maybe TracingMode)
tracingConfigResponse_mode :: Lens' TracingConfigResponse (Maybe TracingMode)
tracingConfigResponse_mode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TracingConfigResponse' {Maybe TracingMode
mode :: Maybe TracingMode
$sel:mode:TracingConfigResponse' :: TracingConfigResponse -> Maybe TracingMode
mode} -> Maybe TracingMode
mode) (\s :: TracingConfigResponse
s@TracingConfigResponse' {} Maybe TracingMode
a -> TracingConfigResponse
s {$sel:mode:TracingConfigResponse' :: Maybe TracingMode
mode = Maybe TracingMode
a} :: TracingConfigResponse)
instance Data.FromJSON TracingConfigResponse where
parseJSON :: Value -> Parser TracingConfigResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TracingConfigResponse"
( \Object
x ->
Maybe TracingMode -> TracingConfigResponse
TracingConfigResponse'
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
"Mode")
)
instance Prelude.Hashable TracingConfigResponse where
hashWithSalt :: Int -> TracingConfigResponse -> Int
hashWithSalt Int
_salt TracingConfigResponse' {Maybe TracingMode
mode :: Maybe TracingMode
$sel:mode:TracingConfigResponse' :: TracingConfigResponse -> Maybe TracingMode
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TracingMode
mode
instance Prelude.NFData TracingConfigResponse where
rnf :: TracingConfigResponse -> ()
rnf TracingConfigResponse' {Maybe TracingMode
mode :: Maybe TracingMode
$sel:mode:TracingConfigResponse' :: TracingConfigResponse -> Maybe TracingMode
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe TracingMode
mode