{-# 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.SESV2.Types.EventDestinationDefinition
-- 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.SESV2.Types.EventDestinationDefinition where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.CloudWatchDestination
import Amazonka.SESV2.Types.EventType
import Amazonka.SESV2.Types.KinesisFirehoseDestination
import Amazonka.SESV2.Types.PinpointDestination
import Amazonka.SESV2.Types.SnsDestination

-- | An object that defines the event destination. Specifically, it defines
-- which services receive events from emails sent using the configuration
-- set that the event destination is associated with. Also defines the
-- types of events that are sent to the event destination.
--
-- /See:/ 'newEventDestinationDefinition' smart constructor.
data EventDestinationDefinition = EventDestinationDefinition'
  { -- | An array that specifies which events the Amazon SES API v2 should send
    -- to the destinations in this @EventDestinationDefinition@.
    EventDestinationDefinition -> Maybe [EventType]
matchingEventTypes :: Prelude.Maybe [EventType],
    -- | An object that defines an Amazon Pinpoint project destination for email
    -- events. You can send email event data to a Amazon Pinpoint project to
    -- view metrics using the Transactional Messaging dashboards that are built
    -- in to Amazon Pinpoint. For more information, see
    -- <https://docs.aws.amazon.com/pinpoint/latest/userguide/analytics-transactional-messages.html Transactional Messaging Charts>
    -- in the /Amazon Pinpoint User Guide/.
    EventDestinationDefinition -> Maybe PinpointDestination
pinpointDestination :: Prelude.Maybe PinpointDestination,
    -- | If @true@, the event destination is enabled. When the event destination
    -- is enabled, the specified event types are sent to the destinations in
    -- this @EventDestinationDefinition@.
    --
    -- If @false@, the event destination is disabled. When the event
    -- destination is disabled, events aren\'t sent to the specified
    -- destinations.
    EventDestinationDefinition -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | An object that defines an Amazon Kinesis Data Firehose destination for
    -- email events. You can use Amazon Kinesis Data Firehose to stream data to
    -- other services, such as Amazon S3 and Amazon Redshift.
    EventDestinationDefinition -> Maybe KinesisFirehoseDestination
kinesisFirehoseDestination :: Prelude.Maybe KinesisFirehoseDestination,
    -- | An object that defines an Amazon CloudWatch destination for email
    -- events. You can use Amazon CloudWatch to monitor and gain insights on
    -- your email sending metrics.
    EventDestinationDefinition -> Maybe CloudWatchDestination
cloudWatchDestination :: Prelude.Maybe CloudWatchDestination,
    -- | An object that defines an Amazon SNS destination for email events. You
    -- can use Amazon SNS to send notification when certain email events occur.
    EventDestinationDefinition -> Maybe SnsDestination
snsDestination :: Prelude.Maybe SnsDestination
  }
  deriving (EventDestinationDefinition -> EventDestinationDefinition -> Bool
(EventDestinationDefinition -> EventDestinationDefinition -> Bool)
-> (EventDestinationDefinition
    -> EventDestinationDefinition -> Bool)
-> Eq EventDestinationDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventDestinationDefinition -> EventDestinationDefinition -> Bool
$c/= :: EventDestinationDefinition -> EventDestinationDefinition -> Bool
== :: EventDestinationDefinition -> EventDestinationDefinition -> Bool
$c== :: EventDestinationDefinition -> EventDestinationDefinition -> Bool
Prelude.Eq, ReadPrec [EventDestinationDefinition]
ReadPrec EventDestinationDefinition
Int -> ReadS EventDestinationDefinition
ReadS [EventDestinationDefinition]
(Int -> ReadS EventDestinationDefinition)
-> ReadS [EventDestinationDefinition]
-> ReadPrec EventDestinationDefinition
-> ReadPrec [EventDestinationDefinition]
-> Read EventDestinationDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventDestinationDefinition]
$creadListPrec :: ReadPrec [EventDestinationDefinition]
readPrec :: ReadPrec EventDestinationDefinition
$creadPrec :: ReadPrec EventDestinationDefinition
readList :: ReadS [EventDestinationDefinition]
$creadList :: ReadS [EventDestinationDefinition]
readsPrec :: Int -> ReadS EventDestinationDefinition
$creadsPrec :: Int -> ReadS EventDestinationDefinition
Prelude.Read, Int -> EventDestinationDefinition -> ShowS
[EventDestinationDefinition] -> ShowS
EventDestinationDefinition -> String
(Int -> EventDestinationDefinition -> ShowS)
-> (EventDestinationDefinition -> String)
-> ([EventDestinationDefinition] -> ShowS)
-> Show EventDestinationDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventDestinationDefinition] -> ShowS
$cshowList :: [EventDestinationDefinition] -> ShowS
show :: EventDestinationDefinition -> String
$cshow :: EventDestinationDefinition -> String
showsPrec :: Int -> EventDestinationDefinition -> ShowS
$cshowsPrec :: Int -> EventDestinationDefinition -> ShowS
Prelude.Show, (forall x.
 EventDestinationDefinition -> Rep EventDestinationDefinition x)
-> (forall x.
    Rep EventDestinationDefinition x -> EventDestinationDefinition)
-> Generic EventDestinationDefinition
forall x.
Rep EventDestinationDefinition x -> EventDestinationDefinition
forall x.
EventDestinationDefinition -> Rep EventDestinationDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EventDestinationDefinition x -> EventDestinationDefinition
$cfrom :: forall x.
EventDestinationDefinition -> Rep EventDestinationDefinition x
Prelude.Generic)

-- |
-- Create a value of 'EventDestinationDefinition' 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:
--
-- 'matchingEventTypes', 'eventDestinationDefinition_matchingEventTypes' - An array that specifies which events the Amazon SES API v2 should send
-- to the destinations in this @EventDestinationDefinition@.
--
-- 'pinpointDestination', 'eventDestinationDefinition_pinpointDestination' - An object that defines an Amazon Pinpoint project destination for email
-- events. You can send email event data to a Amazon Pinpoint project to
-- view metrics using the Transactional Messaging dashboards that are built
-- in to Amazon Pinpoint. For more information, see
-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/analytics-transactional-messages.html Transactional Messaging Charts>
-- in the /Amazon Pinpoint User Guide/.
--
-- 'enabled', 'eventDestinationDefinition_enabled' - If @true@, the event destination is enabled. When the event destination
-- is enabled, the specified event types are sent to the destinations in
-- this @EventDestinationDefinition@.
--
-- If @false@, the event destination is disabled. When the event
-- destination is disabled, events aren\'t sent to the specified
-- destinations.
--
-- 'kinesisFirehoseDestination', 'eventDestinationDefinition_kinesisFirehoseDestination' - An object that defines an Amazon Kinesis Data Firehose destination for
-- email events. You can use Amazon Kinesis Data Firehose to stream data to
-- other services, such as Amazon S3 and Amazon Redshift.
--
-- 'cloudWatchDestination', 'eventDestinationDefinition_cloudWatchDestination' - An object that defines an Amazon CloudWatch destination for email
-- events. You can use Amazon CloudWatch to monitor and gain insights on
-- your email sending metrics.
--
-- 'snsDestination', 'eventDestinationDefinition_snsDestination' - An object that defines an Amazon SNS destination for email events. You
-- can use Amazon SNS to send notification when certain email events occur.
newEventDestinationDefinition ::
  EventDestinationDefinition
newEventDestinationDefinition :: EventDestinationDefinition
newEventDestinationDefinition =
  EventDestinationDefinition' :: Maybe [EventType]
-> Maybe PinpointDestination
-> Maybe Bool
-> Maybe KinesisFirehoseDestination
-> Maybe CloudWatchDestination
-> Maybe SnsDestination
-> EventDestinationDefinition
EventDestinationDefinition'
    { $sel:matchingEventTypes:EventDestinationDefinition' :: Maybe [EventType]
matchingEventTypes =
        Maybe [EventType]
forall a. Maybe a
Prelude.Nothing,
      $sel:pinpointDestination:EventDestinationDefinition' :: Maybe PinpointDestination
pinpointDestination = Maybe PinpointDestination
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:EventDestinationDefinition' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisFirehoseDestination:EventDestinationDefinition' :: Maybe KinesisFirehoseDestination
kinesisFirehoseDestination = Maybe KinesisFirehoseDestination
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchDestination:EventDestinationDefinition' :: Maybe CloudWatchDestination
cloudWatchDestination = Maybe CloudWatchDestination
forall a. Maybe a
Prelude.Nothing,
      $sel:snsDestination:EventDestinationDefinition' :: Maybe SnsDestination
snsDestination = Maybe SnsDestination
forall a. Maybe a
Prelude.Nothing
    }

-- | An array that specifies which events the Amazon SES API v2 should send
-- to the destinations in this @EventDestinationDefinition@.
eventDestinationDefinition_matchingEventTypes :: Lens.Lens' EventDestinationDefinition (Prelude.Maybe [EventType])
eventDestinationDefinition_matchingEventTypes :: (Maybe [EventType] -> f (Maybe [EventType]))
-> EventDestinationDefinition -> f EventDestinationDefinition
eventDestinationDefinition_matchingEventTypes = (EventDestinationDefinition -> Maybe [EventType])
-> (EventDestinationDefinition
    -> Maybe [EventType] -> EventDestinationDefinition)
-> Lens
     EventDestinationDefinition
     EventDestinationDefinition
     (Maybe [EventType])
     (Maybe [EventType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDestinationDefinition' {Maybe [EventType]
matchingEventTypes :: Maybe [EventType]
$sel:matchingEventTypes:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe [EventType]
matchingEventTypes} -> Maybe [EventType]
matchingEventTypes) (\s :: EventDestinationDefinition
s@EventDestinationDefinition' {} Maybe [EventType]
a -> EventDestinationDefinition
s {$sel:matchingEventTypes:EventDestinationDefinition' :: Maybe [EventType]
matchingEventTypes = Maybe [EventType]
a} :: EventDestinationDefinition) ((Maybe [EventType] -> f (Maybe [EventType]))
 -> EventDestinationDefinition -> f EventDestinationDefinition)
-> ((Maybe [EventType] -> f (Maybe [EventType]))
    -> Maybe [EventType] -> f (Maybe [EventType]))
-> (Maybe [EventType] -> f (Maybe [EventType]))
-> EventDestinationDefinition
-> f EventDestinationDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [EventType] [EventType] [EventType] [EventType]
-> Iso
     (Maybe [EventType])
     (Maybe [EventType])
     (Maybe [EventType])
     (Maybe [EventType])
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 [EventType] [EventType] [EventType] [EventType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An object that defines an Amazon Pinpoint project destination for email
-- events. You can send email event data to a Amazon Pinpoint project to
-- view metrics using the Transactional Messaging dashboards that are built
-- in to Amazon Pinpoint. For more information, see
-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/analytics-transactional-messages.html Transactional Messaging Charts>
-- in the /Amazon Pinpoint User Guide/.
eventDestinationDefinition_pinpointDestination :: Lens.Lens' EventDestinationDefinition (Prelude.Maybe PinpointDestination)
eventDestinationDefinition_pinpointDestination :: (Maybe PinpointDestination -> f (Maybe PinpointDestination))
-> EventDestinationDefinition -> f EventDestinationDefinition
eventDestinationDefinition_pinpointDestination = (EventDestinationDefinition -> Maybe PinpointDestination)
-> (EventDestinationDefinition
    -> Maybe PinpointDestination -> EventDestinationDefinition)
-> Lens
     EventDestinationDefinition
     EventDestinationDefinition
     (Maybe PinpointDestination)
     (Maybe PinpointDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDestinationDefinition' {Maybe PinpointDestination
pinpointDestination :: Maybe PinpointDestination
$sel:pinpointDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe PinpointDestination
pinpointDestination} -> Maybe PinpointDestination
pinpointDestination) (\s :: EventDestinationDefinition
s@EventDestinationDefinition' {} Maybe PinpointDestination
a -> EventDestinationDefinition
s {$sel:pinpointDestination:EventDestinationDefinition' :: Maybe PinpointDestination
pinpointDestination = Maybe PinpointDestination
a} :: EventDestinationDefinition)

-- | If @true@, the event destination is enabled. When the event destination
-- is enabled, the specified event types are sent to the destinations in
-- this @EventDestinationDefinition@.
--
-- If @false@, the event destination is disabled. When the event
-- destination is disabled, events aren\'t sent to the specified
-- destinations.
eventDestinationDefinition_enabled :: Lens.Lens' EventDestinationDefinition (Prelude.Maybe Prelude.Bool)
eventDestinationDefinition_enabled :: (Maybe Bool -> f (Maybe Bool))
-> EventDestinationDefinition -> f EventDestinationDefinition
eventDestinationDefinition_enabled = (EventDestinationDefinition -> Maybe Bool)
-> (EventDestinationDefinition
    -> Maybe Bool -> EventDestinationDefinition)
-> Lens
     EventDestinationDefinition
     EventDestinationDefinition
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDestinationDefinition' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: EventDestinationDefinition
s@EventDestinationDefinition' {} Maybe Bool
a -> EventDestinationDefinition
s {$sel:enabled:EventDestinationDefinition' :: Maybe Bool
enabled = Maybe Bool
a} :: EventDestinationDefinition)

-- | An object that defines an Amazon Kinesis Data Firehose destination for
-- email events. You can use Amazon Kinesis Data Firehose to stream data to
-- other services, such as Amazon S3 and Amazon Redshift.
eventDestinationDefinition_kinesisFirehoseDestination :: Lens.Lens' EventDestinationDefinition (Prelude.Maybe KinesisFirehoseDestination)
eventDestinationDefinition_kinesisFirehoseDestination :: (Maybe KinesisFirehoseDestination
 -> f (Maybe KinesisFirehoseDestination))
-> EventDestinationDefinition -> f EventDestinationDefinition
eventDestinationDefinition_kinesisFirehoseDestination = (EventDestinationDefinition -> Maybe KinesisFirehoseDestination)
-> (EventDestinationDefinition
    -> Maybe KinesisFirehoseDestination -> EventDestinationDefinition)
-> Lens
     EventDestinationDefinition
     EventDestinationDefinition
     (Maybe KinesisFirehoseDestination)
     (Maybe KinesisFirehoseDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDestinationDefinition' {Maybe KinesisFirehoseDestination
kinesisFirehoseDestination :: Maybe KinesisFirehoseDestination
$sel:kinesisFirehoseDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe KinesisFirehoseDestination
kinesisFirehoseDestination} -> Maybe KinesisFirehoseDestination
kinesisFirehoseDestination) (\s :: EventDestinationDefinition
s@EventDestinationDefinition' {} Maybe KinesisFirehoseDestination
a -> EventDestinationDefinition
s {$sel:kinesisFirehoseDestination:EventDestinationDefinition' :: Maybe KinesisFirehoseDestination
kinesisFirehoseDestination = Maybe KinesisFirehoseDestination
a} :: EventDestinationDefinition)

-- | An object that defines an Amazon CloudWatch destination for email
-- events. You can use Amazon CloudWatch to monitor and gain insights on
-- your email sending metrics.
eventDestinationDefinition_cloudWatchDestination :: Lens.Lens' EventDestinationDefinition (Prelude.Maybe CloudWatchDestination)
eventDestinationDefinition_cloudWatchDestination :: (Maybe CloudWatchDestination -> f (Maybe CloudWatchDestination))
-> EventDestinationDefinition -> f EventDestinationDefinition
eventDestinationDefinition_cloudWatchDestination = (EventDestinationDefinition -> Maybe CloudWatchDestination)
-> (EventDestinationDefinition
    -> Maybe CloudWatchDestination -> EventDestinationDefinition)
-> Lens
     EventDestinationDefinition
     EventDestinationDefinition
     (Maybe CloudWatchDestination)
     (Maybe CloudWatchDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDestinationDefinition' {Maybe CloudWatchDestination
cloudWatchDestination :: Maybe CloudWatchDestination
$sel:cloudWatchDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe CloudWatchDestination
cloudWatchDestination} -> Maybe CloudWatchDestination
cloudWatchDestination) (\s :: EventDestinationDefinition
s@EventDestinationDefinition' {} Maybe CloudWatchDestination
a -> EventDestinationDefinition
s {$sel:cloudWatchDestination:EventDestinationDefinition' :: Maybe CloudWatchDestination
cloudWatchDestination = Maybe CloudWatchDestination
a} :: EventDestinationDefinition)

-- | An object that defines an Amazon SNS destination for email events. You
-- can use Amazon SNS to send notification when certain email events occur.
eventDestinationDefinition_snsDestination :: Lens.Lens' EventDestinationDefinition (Prelude.Maybe SnsDestination)
eventDestinationDefinition_snsDestination :: (Maybe SnsDestination -> f (Maybe SnsDestination))
-> EventDestinationDefinition -> f EventDestinationDefinition
eventDestinationDefinition_snsDestination = (EventDestinationDefinition -> Maybe SnsDestination)
-> (EventDestinationDefinition
    -> Maybe SnsDestination -> EventDestinationDefinition)
-> Lens
     EventDestinationDefinition
     EventDestinationDefinition
     (Maybe SnsDestination)
     (Maybe SnsDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventDestinationDefinition' {Maybe SnsDestination
snsDestination :: Maybe SnsDestination
$sel:snsDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe SnsDestination
snsDestination} -> Maybe SnsDestination
snsDestination) (\s :: EventDestinationDefinition
s@EventDestinationDefinition' {} Maybe SnsDestination
a -> EventDestinationDefinition
s {$sel:snsDestination:EventDestinationDefinition' :: Maybe SnsDestination
snsDestination = Maybe SnsDestination
a} :: EventDestinationDefinition)

instance Prelude.Hashable EventDestinationDefinition

instance Prelude.NFData EventDestinationDefinition

instance Core.ToJSON EventDestinationDefinition where
  toJSON :: EventDestinationDefinition -> Value
toJSON EventDestinationDefinition' {Maybe Bool
Maybe [EventType]
Maybe CloudWatchDestination
Maybe KinesisFirehoseDestination
Maybe PinpointDestination
Maybe SnsDestination
snsDestination :: Maybe SnsDestination
cloudWatchDestination :: Maybe CloudWatchDestination
kinesisFirehoseDestination :: Maybe KinesisFirehoseDestination
enabled :: Maybe Bool
pinpointDestination :: Maybe PinpointDestination
matchingEventTypes :: Maybe [EventType]
$sel:snsDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe SnsDestination
$sel:cloudWatchDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe CloudWatchDestination
$sel:kinesisFirehoseDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe KinesisFirehoseDestination
$sel:enabled:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe Bool
$sel:pinpointDestination:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe PinpointDestination
$sel:matchingEventTypes:EventDestinationDefinition' :: EventDestinationDefinition -> Maybe [EventType]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MatchingEventTypes" Text -> [EventType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([EventType] -> Pair) -> Maybe [EventType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EventType]
matchingEventTypes,
            (Text
"PinpointDestination" Text -> PinpointDestination -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (PinpointDestination -> Pair)
-> Maybe PinpointDestination -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PinpointDestination
pinpointDestination,
            (Text
"Enabled" 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
enabled,
            (Text
"KinesisFirehoseDestination" Text -> KinesisFirehoseDestination -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (KinesisFirehoseDestination -> Pair)
-> Maybe KinesisFirehoseDestination -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisFirehoseDestination
kinesisFirehoseDestination,
            (Text
"CloudWatchDestination" Text -> CloudWatchDestination -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CloudWatchDestination -> Pair)
-> Maybe CloudWatchDestination -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchDestination
cloudWatchDestination,
            (Text
"SnsDestination" Text -> SnsDestination -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SnsDestination -> Pair) -> Maybe SnsDestination -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnsDestination
snsDestination
          ]
      )