{-# 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.StepFunctions.Types.TracingConfiguration 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
data TracingConfiguration = TracingConfiguration'
{
TracingConfiguration -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool
}
deriving (TracingConfiguration -> TracingConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TracingConfiguration -> TracingConfiguration -> Bool
$c/= :: TracingConfiguration -> TracingConfiguration -> Bool
== :: TracingConfiguration -> TracingConfiguration -> Bool
$c== :: TracingConfiguration -> TracingConfiguration -> Bool
Prelude.Eq, ReadPrec [TracingConfiguration]
ReadPrec TracingConfiguration
Int -> ReadS TracingConfiguration
ReadS [TracingConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TracingConfiguration]
$creadListPrec :: ReadPrec [TracingConfiguration]
readPrec :: ReadPrec TracingConfiguration
$creadPrec :: ReadPrec TracingConfiguration
readList :: ReadS [TracingConfiguration]
$creadList :: ReadS [TracingConfiguration]
readsPrec :: Int -> ReadS TracingConfiguration
$creadsPrec :: Int -> ReadS TracingConfiguration
Prelude.Read, Int -> TracingConfiguration -> ShowS
[TracingConfiguration] -> ShowS
TracingConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TracingConfiguration] -> ShowS
$cshowList :: [TracingConfiguration] -> ShowS
show :: TracingConfiguration -> String
$cshow :: TracingConfiguration -> String
showsPrec :: Int -> TracingConfiguration -> ShowS
$cshowsPrec :: Int -> TracingConfiguration -> ShowS
Prelude.Show, forall x. Rep TracingConfiguration x -> TracingConfiguration
forall x. TracingConfiguration -> Rep TracingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TracingConfiguration x -> TracingConfiguration
$cfrom :: forall x. TracingConfiguration -> Rep TracingConfiguration x
Prelude.Generic)
newTracingConfiguration ::
TracingConfiguration
newTracingConfiguration :: TracingConfiguration
newTracingConfiguration =
TracingConfiguration' {$sel:enabled:TracingConfiguration' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing}
tracingConfiguration_enabled :: Lens.Lens' TracingConfiguration (Prelude.Maybe Prelude.Bool)
tracingConfiguration_enabled :: Lens' TracingConfiguration (Maybe Bool)
tracingConfiguration_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TracingConfiguration' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:TracingConfiguration' :: TracingConfiguration -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: TracingConfiguration
s@TracingConfiguration' {} Maybe Bool
a -> TracingConfiguration
s {$sel:enabled:TracingConfiguration' :: Maybe Bool
enabled = Maybe Bool
a} :: TracingConfiguration)
instance Data.FromJSON TracingConfiguration where
parseJSON :: Value -> Parser TracingConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TracingConfiguration"
( \Object
x ->
Maybe Bool -> TracingConfiguration
TracingConfiguration'
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
"enabled")
)
instance Prelude.Hashable TracingConfiguration where
hashWithSalt :: Int -> TracingConfiguration -> Int
hashWithSalt Int
_salt TracingConfiguration' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:TracingConfiguration' :: TracingConfiguration -> Maybe Bool
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
instance Prelude.NFData TracingConfiguration where
rnf :: TracingConfiguration -> ()
rnf TracingConfiguration' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:TracingConfiguration' :: TracingConfiguration -> Maybe Bool
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
instance Data.ToJSON TracingConfiguration where
toJSON :: TracingConfiguration -> Value
toJSON TracingConfiguration' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:TracingConfiguration' :: TracingConfiguration -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"enabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enabled]
)