{-# 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.SES.Types.RecipientDsnFields
-- 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.SES.Types.RecipientDsnFields where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SES.Types.DsnAction
import Amazonka.SES.Types.ExtensionField

-- | Recipient-related information to include in the Delivery Status
-- Notification (DSN) when an email that Amazon SES receives on your behalf
-- bounces.
--
-- For information about receiving email through Amazon SES, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html Amazon SES Developer Guide>.
--
-- /See:/ 'newRecipientDsnFields' smart constructor.
data RecipientDsnFields = RecipientDsnFields'
  { -- | An extended explanation of what went wrong; this is usually an SMTP
    -- response. See <https://tools.ietf.org/html/rfc3463 RFC 3463> for the
    -- correct formatting of this parameter.
    RecipientDsnFields -> Maybe Text
diagnosticCode :: Prelude.Maybe Prelude.Text,
    -- | The MTA to which the remote MTA attempted to deliver the message,
    -- formatted as specified in <https://tools.ietf.org/html/rfc3464 RFC 3464>
    -- (@mta-name-type; mta-name@). This parameter typically applies only to
    -- propagating synchronous bounces.
    RecipientDsnFields -> Maybe Text
remoteMta :: Prelude.Maybe Prelude.Text,
    -- | The email address that the message was ultimately delivered to. This
    -- corresponds to the @Final-Recipient@ in the DSN. If not specified,
    -- @FinalRecipient@ will be set to the @Recipient@ specified in the
    -- @BouncedRecipientInfo@ structure. Either @FinalRecipient@ or the
    -- recipient in @BouncedRecipientInfo@ must be a recipient of the original
    -- bounced message.
    --
    -- Do not prepend the @FinalRecipient@ email address with @rfc 822;@, as
    -- described in <https://tools.ietf.org/html/rfc3798 RFC 3798>.
    RecipientDsnFields -> Maybe Text
finalRecipient :: Prelude.Maybe Prelude.Text,
    -- | Additional X-headers to include in the DSN.
    RecipientDsnFields -> Maybe [ExtensionField]
extensionFields :: Prelude.Maybe [ExtensionField],
    -- | The time the final delivery attempt was made, in
    -- <https://www.ietf.org/rfc/rfc0822.txt RFC 822> date-time format.
    RecipientDsnFields -> Maybe ISO8601
lastAttemptDate :: Prelude.Maybe Core.ISO8601,
    -- | The action performed by the reporting mail transfer agent (MTA) as a
    -- result of its attempt to deliver the message to the recipient address.
    -- This is required by <https://tools.ietf.org/html/rfc3464 RFC 3464>.
    RecipientDsnFields -> DsnAction
action :: DsnAction,
    -- | The status code that indicates what went wrong. This is required by
    -- <https://tools.ietf.org/html/rfc3464 RFC 3464>.
    RecipientDsnFields -> Text
status :: Prelude.Text
  }
  deriving (RecipientDsnFields -> RecipientDsnFields -> Bool
(RecipientDsnFields -> RecipientDsnFields -> Bool)
-> (RecipientDsnFields -> RecipientDsnFields -> Bool)
-> Eq RecipientDsnFields
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientDsnFields -> RecipientDsnFields -> Bool
$c/= :: RecipientDsnFields -> RecipientDsnFields -> Bool
== :: RecipientDsnFields -> RecipientDsnFields -> Bool
$c== :: RecipientDsnFields -> RecipientDsnFields -> Bool
Prelude.Eq, ReadPrec [RecipientDsnFields]
ReadPrec RecipientDsnFields
Int -> ReadS RecipientDsnFields
ReadS [RecipientDsnFields]
(Int -> ReadS RecipientDsnFields)
-> ReadS [RecipientDsnFields]
-> ReadPrec RecipientDsnFields
-> ReadPrec [RecipientDsnFields]
-> Read RecipientDsnFields
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecipientDsnFields]
$creadListPrec :: ReadPrec [RecipientDsnFields]
readPrec :: ReadPrec RecipientDsnFields
$creadPrec :: ReadPrec RecipientDsnFields
readList :: ReadS [RecipientDsnFields]
$creadList :: ReadS [RecipientDsnFields]
readsPrec :: Int -> ReadS RecipientDsnFields
$creadsPrec :: Int -> ReadS RecipientDsnFields
Prelude.Read, Int -> RecipientDsnFields -> ShowS
[RecipientDsnFields] -> ShowS
RecipientDsnFields -> String
(Int -> RecipientDsnFields -> ShowS)
-> (RecipientDsnFields -> String)
-> ([RecipientDsnFields] -> ShowS)
-> Show RecipientDsnFields
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientDsnFields] -> ShowS
$cshowList :: [RecipientDsnFields] -> ShowS
show :: RecipientDsnFields -> String
$cshow :: RecipientDsnFields -> String
showsPrec :: Int -> RecipientDsnFields -> ShowS
$cshowsPrec :: Int -> RecipientDsnFields -> ShowS
Prelude.Show, (forall x. RecipientDsnFields -> Rep RecipientDsnFields x)
-> (forall x. Rep RecipientDsnFields x -> RecipientDsnFields)
-> Generic RecipientDsnFields
forall x. Rep RecipientDsnFields x -> RecipientDsnFields
forall x. RecipientDsnFields -> Rep RecipientDsnFields x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RecipientDsnFields x -> RecipientDsnFields
$cfrom :: forall x. RecipientDsnFields -> Rep RecipientDsnFields x
Prelude.Generic)

-- |
-- Create a value of 'RecipientDsnFields' 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:
--
-- 'diagnosticCode', 'recipientDsnFields_diagnosticCode' - An extended explanation of what went wrong; this is usually an SMTP
-- response. See <https://tools.ietf.org/html/rfc3463 RFC 3463> for the
-- correct formatting of this parameter.
--
-- 'remoteMta', 'recipientDsnFields_remoteMta' - The MTA to which the remote MTA attempted to deliver the message,
-- formatted as specified in <https://tools.ietf.org/html/rfc3464 RFC 3464>
-- (@mta-name-type; mta-name@). This parameter typically applies only to
-- propagating synchronous bounces.
--
-- 'finalRecipient', 'recipientDsnFields_finalRecipient' - The email address that the message was ultimately delivered to. This
-- corresponds to the @Final-Recipient@ in the DSN. If not specified,
-- @FinalRecipient@ will be set to the @Recipient@ specified in the
-- @BouncedRecipientInfo@ structure. Either @FinalRecipient@ or the
-- recipient in @BouncedRecipientInfo@ must be a recipient of the original
-- bounced message.
--
-- Do not prepend the @FinalRecipient@ email address with @rfc 822;@, as
-- described in <https://tools.ietf.org/html/rfc3798 RFC 3798>.
--
-- 'extensionFields', 'recipientDsnFields_extensionFields' - Additional X-headers to include in the DSN.
--
-- 'lastAttemptDate', 'recipientDsnFields_lastAttemptDate' - The time the final delivery attempt was made, in
-- <https://www.ietf.org/rfc/rfc0822.txt RFC 822> date-time format.
--
-- 'action', 'recipientDsnFields_action' - The action performed by the reporting mail transfer agent (MTA) as a
-- result of its attempt to deliver the message to the recipient address.
-- This is required by <https://tools.ietf.org/html/rfc3464 RFC 3464>.
--
-- 'status', 'recipientDsnFields_status' - The status code that indicates what went wrong. This is required by
-- <https://tools.ietf.org/html/rfc3464 RFC 3464>.
newRecipientDsnFields ::
  -- | 'action'
  DsnAction ->
  -- | 'status'
  Prelude.Text ->
  RecipientDsnFields
newRecipientDsnFields :: DsnAction -> Text -> RecipientDsnFields
newRecipientDsnFields DsnAction
pAction_ Text
pStatus_ =
  RecipientDsnFields' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExtensionField]
-> Maybe ISO8601
-> DsnAction
-> Text
-> RecipientDsnFields
RecipientDsnFields'
    { $sel:diagnosticCode:RecipientDsnFields' :: Maybe Text
diagnosticCode =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteMta:RecipientDsnFields' :: Maybe Text
remoteMta = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:finalRecipient:RecipientDsnFields' :: Maybe Text
finalRecipient = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:extensionFields:RecipientDsnFields' :: Maybe [ExtensionField]
extensionFields = Maybe [ExtensionField]
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAttemptDate:RecipientDsnFields' :: Maybe ISO8601
lastAttemptDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:action:RecipientDsnFields' :: DsnAction
action = DsnAction
pAction_,
      $sel:status:RecipientDsnFields' :: Text
status = Text
pStatus_
    }

-- | An extended explanation of what went wrong; this is usually an SMTP
-- response. See <https://tools.ietf.org/html/rfc3463 RFC 3463> for the
-- correct formatting of this parameter.
recipientDsnFields_diagnosticCode :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.Text)
recipientDsnFields_diagnosticCode :: (Maybe Text -> f (Maybe Text))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_diagnosticCode = (RecipientDsnFields -> Maybe Text)
-> (RecipientDsnFields -> Maybe Text -> RecipientDsnFields)
-> Lens
     RecipientDsnFields RecipientDsnFields (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe Text
diagnosticCode :: Maybe Text
$sel:diagnosticCode:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
diagnosticCode} -> Maybe Text
diagnosticCode) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe Text
a -> RecipientDsnFields
s {$sel:diagnosticCode:RecipientDsnFields' :: Maybe Text
diagnosticCode = Maybe Text
a} :: RecipientDsnFields)

-- | The MTA to which the remote MTA attempted to deliver the message,
-- formatted as specified in <https://tools.ietf.org/html/rfc3464 RFC 3464>
-- (@mta-name-type; mta-name@). This parameter typically applies only to
-- propagating synchronous bounces.
recipientDsnFields_remoteMta :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.Text)
recipientDsnFields_remoteMta :: (Maybe Text -> f (Maybe Text))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_remoteMta = (RecipientDsnFields -> Maybe Text)
-> (RecipientDsnFields -> Maybe Text -> RecipientDsnFields)
-> Lens
     RecipientDsnFields RecipientDsnFields (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe Text
remoteMta :: Maybe Text
$sel:remoteMta:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
remoteMta} -> Maybe Text
remoteMta) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe Text
a -> RecipientDsnFields
s {$sel:remoteMta:RecipientDsnFields' :: Maybe Text
remoteMta = Maybe Text
a} :: RecipientDsnFields)

-- | The email address that the message was ultimately delivered to. This
-- corresponds to the @Final-Recipient@ in the DSN. If not specified,
-- @FinalRecipient@ will be set to the @Recipient@ specified in the
-- @BouncedRecipientInfo@ structure. Either @FinalRecipient@ or the
-- recipient in @BouncedRecipientInfo@ must be a recipient of the original
-- bounced message.
--
-- Do not prepend the @FinalRecipient@ email address with @rfc 822;@, as
-- described in <https://tools.ietf.org/html/rfc3798 RFC 3798>.
recipientDsnFields_finalRecipient :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.Text)
recipientDsnFields_finalRecipient :: (Maybe Text -> f (Maybe Text))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_finalRecipient = (RecipientDsnFields -> Maybe Text)
-> (RecipientDsnFields -> Maybe Text -> RecipientDsnFields)
-> Lens
     RecipientDsnFields RecipientDsnFields (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe Text
finalRecipient :: Maybe Text
$sel:finalRecipient:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
finalRecipient} -> Maybe Text
finalRecipient) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe Text
a -> RecipientDsnFields
s {$sel:finalRecipient:RecipientDsnFields' :: Maybe Text
finalRecipient = Maybe Text
a} :: RecipientDsnFields)

-- | Additional X-headers to include in the DSN.
recipientDsnFields_extensionFields :: Lens.Lens' RecipientDsnFields (Prelude.Maybe [ExtensionField])
recipientDsnFields_extensionFields :: (Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_extensionFields = (RecipientDsnFields -> Maybe [ExtensionField])
-> (RecipientDsnFields
    -> Maybe [ExtensionField] -> RecipientDsnFields)
-> Lens
     RecipientDsnFields
     RecipientDsnFields
     (Maybe [ExtensionField])
     (Maybe [ExtensionField])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe [ExtensionField]
extensionFields :: Maybe [ExtensionField]
$sel:extensionFields:RecipientDsnFields' :: RecipientDsnFields -> Maybe [ExtensionField]
extensionFields} -> Maybe [ExtensionField]
extensionFields) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe [ExtensionField]
a -> RecipientDsnFields
s {$sel:extensionFields:RecipientDsnFields' :: Maybe [ExtensionField]
extensionFields = Maybe [ExtensionField]
a} :: RecipientDsnFields) ((Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
 -> RecipientDsnFields -> f RecipientDsnFields)
-> ((Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
    -> Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> (Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> RecipientDsnFields
-> f RecipientDsnFields
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ExtensionField] [ExtensionField] [ExtensionField] [ExtensionField]
-> Iso
     (Maybe [ExtensionField])
     (Maybe [ExtensionField])
     (Maybe [ExtensionField])
     (Maybe [ExtensionField])
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
  [ExtensionField] [ExtensionField] [ExtensionField] [ExtensionField]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time the final delivery attempt was made, in
-- <https://www.ietf.org/rfc/rfc0822.txt RFC 822> date-time format.
recipientDsnFields_lastAttemptDate :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.UTCTime)
recipientDsnFields_lastAttemptDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_lastAttemptDate = (RecipientDsnFields -> Maybe ISO8601)
-> (RecipientDsnFields -> Maybe ISO8601 -> RecipientDsnFields)
-> Lens
     RecipientDsnFields
     RecipientDsnFields
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe ISO8601
lastAttemptDate :: Maybe ISO8601
$sel:lastAttemptDate:RecipientDsnFields' :: RecipientDsnFields -> Maybe ISO8601
lastAttemptDate} -> Maybe ISO8601
lastAttemptDate) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe ISO8601
a -> RecipientDsnFields
s {$sel:lastAttemptDate:RecipientDsnFields' :: Maybe ISO8601
lastAttemptDate = Maybe ISO8601
a} :: RecipientDsnFields) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> RecipientDsnFields -> f RecipientDsnFields)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RecipientDsnFields
-> f RecipientDsnFields
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The action performed by the reporting mail transfer agent (MTA) as a
-- result of its attempt to deliver the message to the recipient address.
-- This is required by <https://tools.ietf.org/html/rfc3464 RFC 3464>.
recipientDsnFields_action :: Lens.Lens' RecipientDsnFields DsnAction
recipientDsnFields_action :: (DsnAction -> f DsnAction)
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_action = (RecipientDsnFields -> DsnAction)
-> (RecipientDsnFields -> DsnAction -> RecipientDsnFields)
-> Lens RecipientDsnFields RecipientDsnFields DsnAction DsnAction
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {DsnAction
action :: DsnAction
$sel:action:RecipientDsnFields' :: RecipientDsnFields -> DsnAction
action} -> DsnAction
action) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} DsnAction
a -> RecipientDsnFields
s {$sel:action:RecipientDsnFields' :: DsnAction
action = DsnAction
a} :: RecipientDsnFields)

-- | The status code that indicates what went wrong. This is required by
-- <https://tools.ietf.org/html/rfc3464 RFC 3464>.
recipientDsnFields_status :: Lens.Lens' RecipientDsnFields Prelude.Text
recipientDsnFields_status :: (Text -> f Text) -> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_status = (RecipientDsnFields -> Text)
-> (RecipientDsnFields -> Text -> RecipientDsnFields)
-> Lens RecipientDsnFields RecipientDsnFields Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Text
status :: Text
$sel:status:RecipientDsnFields' :: RecipientDsnFields -> Text
status} -> Text
status) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Text
a -> RecipientDsnFields
s {$sel:status:RecipientDsnFields' :: Text
status = Text
a} :: RecipientDsnFields)

instance Prelude.Hashable RecipientDsnFields

instance Prelude.NFData RecipientDsnFields

instance Core.ToQuery RecipientDsnFields where
  toQuery :: RecipientDsnFields -> QueryString
toQuery RecipientDsnFields' {Maybe [ExtensionField]
Maybe Text
Maybe ISO8601
Text
DsnAction
status :: Text
action :: DsnAction
lastAttemptDate :: Maybe ISO8601
extensionFields :: Maybe [ExtensionField]
finalRecipient :: Maybe Text
remoteMta :: Maybe Text
diagnosticCode :: Maybe Text
$sel:status:RecipientDsnFields' :: RecipientDsnFields -> Text
$sel:action:RecipientDsnFields' :: RecipientDsnFields -> DsnAction
$sel:lastAttemptDate:RecipientDsnFields' :: RecipientDsnFields -> Maybe ISO8601
$sel:extensionFields:RecipientDsnFields' :: RecipientDsnFields -> Maybe [ExtensionField]
$sel:finalRecipient:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
$sel:remoteMta:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
$sel:diagnosticCode:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"DiagnosticCode" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
diagnosticCode,
        ByteString
"RemoteMta" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
remoteMta,
        ByteString
"FinalRecipient" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
finalRecipient,
        ByteString
"ExtensionFields"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [ExtensionField] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([ExtensionField] -> QueryString)
-> Maybe [ExtensionField] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExtensionField]
extensionFields
            ),
        ByteString
"LastAttemptDate" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
lastAttemptDate,
        ByteString
"Action" ByteString -> DsnAction -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: DsnAction
action,
        ByteString
"Status" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
status
      ]