{-# 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.CloudWatchEvents.Types.PutEventsRequestEntry
-- 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.CloudWatchEvents.Types.PutEventsRequestEntry where

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

-- | Represents an event to be submitted.
--
-- /See:/ 'newPutEventsRequestEntry' smart constructor.
data PutEventsRequestEntry = PutEventsRequestEntry'
  { -- | The time stamp of the event, per
    -- <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339>. If no time stamp
    -- is provided, the time stamp of the
    -- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>
    -- call is used.
    PutEventsRequestEntry -> Maybe POSIX
time :: Prelude.Maybe Core.POSIX,
    -- | Free-form string used to decide what fields to expect in the event
    -- detail.
    PutEventsRequestEntry -> Maybe Text
detailType :: Prelude.Maybe Prelude.Text,
    -- | Amazon Web Services resources, identified by Amazon Resource Name (ARN),
    -- which the event primarily concerns. Any number, including zero, may be
    -- present.
    PutEventsRequestEntry -> Maybe [Text]
resources :: Prelude.Maybe [Prelude.Text],
    -- | The name or ARN of the event bus to receive the event. Only the rules
    -- that are associated with this event bus are used to match the event. If
    -- you omit this, the default event bus is used.
    PutEventsRequestEntry -> Maybe Text
eventBusName :: Prelude.Maybe Prelude.Text,
    -- | The source of the event.
    PutEventsRequestEntry -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | An X-Ray trade header, which is an http header (X-Amzn-Trace-Id) that
    -- contains the trace-id associated with the event.
    --
    -- To learn more about X-Ray trace headers, see
    -- <https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader Tracing header>
    -- in the X-Ray Developer Guide.
    PutEventsRequestEntry -> Maybe Text
traceHeader :: Prelude.Maybe Prelude.Text,
    -- | A valid JSON string. There is no other schema imposed. The JSON string
    -- may contain fields and nested subobjects.
    PutEventsRequestEntry -> Maybe Text
detail :: Prelude.Maybe Prelude.Text
  }
  deriving (PutEventsRequestEntry -> PutEventsRequestEntry -> Bool
(PutEventsRequestEntry -> PutEventsRequestEntry -> Bool)
-> (PutEventsRequestEntry -> PutEventsRequestEntry -> Bool)
-> Eq PutEventsRequestEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutEventsRequestEntry -> PutEventsRequestEntry -> Bool
$c/= :: PutEventsRequestEntry -> PutEventsRequestEntry -> Bool
== :: PutEventsRequestEntry -> PutEventsRequestEntry -> Bool
$c== :: PutEventsRequestEntry -> PutEventsRequestEntry -> Bool
Prelude.Eq, ReadPrec [PutEventsRequestEntry]
ReadPrec PutEventsRequestEntry
Int -> ReadS PutEventsRequestEntry
ReadS [PutEventsRequestEntry]
(Int -> ReadS PutEventsRequestEntry)
-> ReadS [PutEventsRequestEntry]
-> ReadPrec PutEventsRequestEntry
-> ReadPrec [PutEventsRequestEntry]
-> Read PutEventsRequestEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutEventsRequestEntry]
$creadListPrec :: ReadPrec [PutEventsRequestEntry]
readPrec :: ReadPrec PutEventsRequestEntry
$creadPrec :: ReadPrec PutEventsRequestEntry
readList :: ReadS [PutEventsRequestEntry]
$creadList :: ReadS [PutEventsRequestEntry]
readsPrec :: Int -> ReadS PutEventsRequestEntry
$creadsPrec :: Int -> ReadS PutEventsRequestEntry
Prelude.Read, Int -> PutEventsRequestEntry -> ShowS
[PutEventsRequestEntry] -> ShowS
PutEventsRequestEntry -> String
(Int -> PutEventsRequestEntry -> ShowS)
-> (PutEventsRequestEntry -> String)
-> ([PutEventsRequestEntry] -> ShowS)
-> Show PutEventsRequestEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutEventsRequestEntry] -> ShowS
$cshowList :: [PutEventsRequestEntry] -> ShowS
show :: PutEventsRequestEntry -> String
$cshow :: PutEventsRequestEntry -> String
showsPrec :: Int -> PutEventsRequestEntry -> ShowS
$cshowsPrec :: Int -> PutEventsRequestEntry -> ShowS
Prelude.Show, (forall x. PutEventsRequestEntry -> Rep PutEventsRequestEntry x)
-> (forall x. Rep PutEventsRequestEntry x -> PutEventsRequestEntry)
-> Generic PutEventsRequestEntry
forall x. Rep PutEventsRequestEntry x -> PutEventsRequestEntry
forall x. PutEventsRequestEntry -> Rep PutEventsRequestEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutEventsRequestEntry x -> PutEventsRequestEntry
$cfrom :: forall x. PutEventsRequestEntry -> Rep PutEventsRequestEntry x
Prelude.Generic)

-- |
-- Create a value of 'PutEventsRequestEntry' 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:
--
-- 'time', 'putEventsRequestEntry_time' - The time stamp of the event, per
-- <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339>. If no time stamp
-- is provided, the time stamp of the
-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>
-- call is used.
--
-- 'detailType', 'putEventsRequestEntry_detailType' - Free-form string used to decide what fields to expect in the event
-- detail.
--
-- 'resources', 'putEventsRequestEntry_resources' - Amazon Web Services resources, identified by Amazon Resource Name (ARN),
-- which the event primarily concerns. Any number, including zero, may be
-- present.
--
-- 'eventBusName', 'putEventsRequestEntry_eventBusName' - The name or ARN of the event bus to receive the event. Only the rules
-- that are associated with this event bus are used to match the event. If
-- you omit this, the default event bus is used.
--
-- 'source', 'putEventsRequestEntry_source' - The source of the event.
--
-- 'traceHeader', 'putEventsRequestEntry_traceHeader' - An X-Ray trade header, which is an http header (X-Amzn-Trace-Id) that
-- contains the trace-id associated with the event.
--
-- To learn more about X-Ray trace headers, see
-- <https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader Tracing header>
-- in the X-Ray Developer Guide.
--
-- 'detail', 'putEventsRequestEntry_detail' - A valid JSON string. There is no other schema imposed. The JSON string
-- may contain fields and nested subobjects.
newPutEventsRequestEntry ::
  PutEventsRequestEntry
newPutEventsRequestEntry :: PutEventsRequestEntry
newPutEventsRequestEntry =
  PutEventsRequestEntry' :: Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PutEventsRequestEntry
PutEventsRequestEntry'
    { $sel:time:PutEventsRequestEntry' :: Maybe POSIX
time = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:detailType:PutEventsRequestEntry' :: Maybe Text
detailType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resources:PutEventsRequestEntry' :: Maybe [Text]
resources = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:eventBusName:PutEventsRequestEntry' :: Maybe Text
eventBusName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:PutEventsRequestEntry' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:traceHeader:PutEventsRequestEntry' :: Maybe Text
traceHeader = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detail:PutEventsRequestEntry' :: Maybe Text
detail = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The time stamp of the event, per
-- <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339>. If no time stamp
-- is provided, the time stamp of the
-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>
-- call is used.
putEventsRequestEntry_time :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe Prelude.UTCTime)
putEventsRequestEntry_time :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_time = (PutEventsRequestEntry -> Maybe POSIX)
-> (PutEventsRequestEntry -> Maybe POSIX -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe POSIX
time :: Maybe POSIX
$sel:time:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe POSIX
time} -> Maybe POSIX
time) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe POSIX
a -> PutEventsRequestEntry
s {$sel:time:PutEventsRequestEntry' :: Maybe POSIX
time = Maybe POSIX
a} :: PutEventsRequestEntry) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutEventsRequestEntry -> f PutEventsRequestEntry)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutEventsRequestEntry
-> f PutEventsRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Free-form string used to decide what fields to expect in the event
-- detail.
putEventsRequestEntry_detailType :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe Prelude.Text)
putEventsRequestEntry_detailType :: (Maybe Text -> f (Maybe Text))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_detailType = (PutEventsRequestEntry -> Maybe Text)
-> (PutEventsRequestEntry -> Maybe Text -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe Text
detailType :: Maybe Text
$sel:detailType:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
detailType} -> Maybe Text
detailType) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe Text
a -> PutEventsRequestEntry
s {$sel:detailType:PutEventsRequestEntry' :: Maybe Text
detailType = Maybe Text
a} :: PutEventsRequestEntry)

-- | Amazon Web Services resources, identified by Amazon Resource Name (ARN),
-- which the event primarily concerns. Any number, including zero, may be
-- present.
putEventsRequestEntry_resources :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe [Prelude.Text])
putEventsRequestEntry_resources :: (Maybe [Text] -> f (Maybe [Text]))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_resources = (PutEventsRequestEntry -> Maybe [Text])
-> (PutEventsRequestEntry -> Maybe [Text] -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe [Text]
resources :: Maybe [Text]
$sel:resources:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe [Text]
resources} -> Maybe [Text]
resources) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe [Text]
a -> PutEventsRequestEntry
s {$sel:resources:PutEventsRequestEntry' :: Maybe [Text]
resources = Maybe [Text]
a} :: PutEventsRequestEntry) ((Maybe [Text] -> f (Maybe [Text]))
 -> PutEventsRequestEntry -> f PutEventsRequestEntry)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PutEventsRequestEntry
-> f PutEventsRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name or ARN of the event bus to receive the event. Only the rules
-- that are associated with this event bus are used to match the event. If
-- you omit this, the default event bus is used.
putEventsRequestEntry_eventBusName :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe Prelude.Text)
putEventsRequestEntry_eventBusName :: (Maybe Text -> f (Maybe Text))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_eventBusName = (PutEventsRequestEntry -> Maybe Text)
-> (PutEventsRequestEntry -> Maybe Text -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe Text
eventBusName :: Maybe Text
$sel:eventBusName:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
eventBusName} -> Maybe Text
eventBusName) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe Text
a -> PutEventsRequestEntry
s {$sel:eventBusName:PutEventsRequestEntry' :: Maybe Text
eventBusName = Maybe Text
a} :: PutEventsRequestEntry)

-- | The source of the event.
putEventsRequestEntry_source :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe Prelude.Text)
putEventsRequestEntry_source :: (Maybe Text -> f (Maybe Text))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_source = (PutEventsRequestEntry -> Maybe Text)
-> (PutEventsRequestEntry -> Maybe Text -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe Text
source :: Maybe Text
$sel:source:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
source} -> Maybe Text
source) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe Text
a -> PutEventsRequestEntry
s {$sel:source:PutEventsRequestEntry' :: Maybe Text
source = Maybe Text
a} :: PutEventsRequestEntry)

-- | An X-Ray trade header, which is an http header (X-Amzn-Trace-Id) that
-- contains the trace-id associated with the event.
--
-- To learn more about X-Ray trace headers, see
-- <https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader Tracing header>
-- in the X-Ray Developer Guide.
putEventsRequestEntry_traceHeader :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe Prelude.Text)
putEventsRequestEntry_traceHeader :: (Maybe Text -> f (Maybe Text))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_traceHeader = (PutEventsRequestEntry -> Maybe Text)
-> (PutEventsRequestEntry -> Maybe Text -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe Text
traceHeader :: Maybe Text
$sel:traceHeader:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
traceHeader} -> Maybe Text
traceHeader) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe Text
a -> PutEventsRequestEntry
s {$sel:traceHeader:PutEventsRequestEntry' :: Maybe Text
traceHeader = Maybe Text
a} :: PutEventsRequestEntry)

-- | A valid JSON string. There is no other schema imposed. The JSON string
-- may contain fields and nested subobjects.
putEventsRequestEntry_detail :: Lens.Lens' PutEventsRequestEntry (Prelude.Maybe Prelude.Text)
putEventsRequestEntry_detail :: (Maybe Text -> f (Maybe Text))
-> PutEventsRequestEntry -> f PutEventsRequestEntry
putEventsRequestEntry_detail = (PutEventsRequestEntry -> Maybe Text)
-> (PutEventsRequestEntry -> Maybe Text -> PutEventsRequestEntry)
-> Lens
     PutEventsRequestEntry
     PutEventsRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEventsRequestEntry' {Maybe Text
detail :: Maybe Text
$sel:detail:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
detail} -> Maybe Text
detail) (\s :: PutEventsRequestEntry
s@PutEventsRequestEntry' {} Maybe Text
a -> PutEventsRequestEntry
s {$sel:detail:PutEventsRequestEntry' :: Maybe Text
detail = Maybe Text
a} :: PutEventsRequestEntry)

instance Prelude.Hashable PutEventsRequestEntry

instance Prelude.NFData PutEventsRequestEntry

instance Core.ToJSON PutEventsRequestEntry where
  toJSON :: PutEventsRequestEntry -> Value
toJSON PutEventsRequestEntry' {Maybe [Text]
Maybe Text
Maybe POSIX
detail :: Maybe Text
traceHeader :: Maybe Text
source :: Maybe Text
eventBusName :: Maybe Text
resources :: Maybe [Text]
detailType :: Maybe Text
time :: Maybe POSIX
$sel:detail:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
$sel:traceHeader:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
$sel:source:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
$sel:eventBusName:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
$sel:resources:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe [Text]
$sel:detailType:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe Text
$sel:time:PutEventsRequestEntry' :: PutEventsRequestEntry -> Maybe POSIX
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Time" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
time,
            (Text
"DetailType" 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
detailType,
            (Text
"Resources" 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]
resources,
            (Text
"EventBusName" 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
eventBusName,
            (Text
"Source" 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
source,
            (Text
"TraceHeader" 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
traceHeader,
            (Text
"Detail" 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
detail
          ]
      )