{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SQS.DeleteMessageBatch
-- 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)
--
-- Deletes up to ten messages from the specified queue. This is a batch
-- version of @ DeleteMessage.@ The result of the action on each message is
-- reported individually in the response.
--
-- Because the batch request can result in a combination of successful and
-- unsuccessful actions, you should check for batch errors even when the
-- call returns an HTTP status code of @200@.
--
-- Some actions take lists of parameters. These lists are specified using
-- the @param.n@ notation. Values of @n@ are integers starting from 1. For
-- example, a parameter list with two elements looks like this:
--
-- @&AttributeName.1=first@
--
-- @&AttributeName.2=second@
module Amazonka.SQS.DeleteMessageBatch
  ( -- * Creating a Request
    DeleteMessageBatch (..),
    newDeleteMessageBatch,

    -- * Request Lenses
    deleteMessageBatch_queueUrl,
    deleteMessageBatch_entries,

    -- * Destructuring the Response
    DeleteMessageBatchResponse (..),
    newDeleteMessageBatchResponse,

    -- * Response Lenses
    deleteMessageBatchResponse_httpStatus,
    deleteMessageBatchResponse_successful,
    deleteMessageBatchResponse_failed,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SQS.Types

-- |
--
-- /See:/ 'newDeleteMessageBatch' smart constructor.
data DeleteMessageBatch = DeleteMessageBatch'
  { -- | The URL of the Amazon SQS queue from which messages are deleted.
    --
    -- Queue URLs and names are case-sensitive.
    DeleteMessageBatch -> Text
queueUrl :: Prelude.Text,
    -- | A list of receipt handles for the messages to be deleted.
    DeleteMessageBatch -> [DeleteMessageBatchRequestEntry]
entries :: [DeleteMessageBatchRequestEntry]
  }
  deriving (DeleteMessageBatch -> DeleteMessageBatch -> Bool
(DeleteMessageBatch -> DeleteMessageBatch -> Bool)
-> (DeleteMessageBatch -> DeleteMessageBatch -> Bool)
-> Eq DeleteMessageBatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMessageBatch -> DeleteMessageBatch -> Bool
$c/= :: DeleteMessageBatch -> DeleteMessageBatch -> Bool
== :: DeleteMessageBatch -> DeleteMessageBatch -> Bool
$c== :: DeleteMessageBatch -> DeleteMessageBatch -> Bool
Prelude.Eq, ReadPrec [DeleteMessageBatch]
ReadPrec DeleteMessageBatch
Int -> ReadS DeleteMessageBatch
ReadS [DeleteMessageBatch]
(Int -> ReadS DeleteMessageBatch)
-> ReadS [DeleteMessageBatch]
-> ReadPrec DeleteMessageBatch
-> ReadPrec [DeleteMessageBatch]
-> Read DeleteMessageBatch
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMessageBatch]
$creadListPrec :: ReadPrec [DeleteMessageBatch]
readPrec :: ReadPrec DeleteMessageBatch
$creadPrec :: ReadPrec DeleteMessageBatch
readList :: ReadS [DeleteMessageBatch]
$creadList :: ReadS [DeleteMessageBatch]
readsPrec :: Int -> ReadS DeleteMessageBatch
$creadsPrec :: Int -> ReadS DeleteMessageBatch
Prelude.Read, Int -> DeleteMessageBatch -> ShowS
[DeleteMessageBatch] -> ShowS
DeleteMessageBatch -> String
(Int -> DeleteMessageBatch -> ShowS)
-> (DeleteMessageBatch -> String)
-> ([DeleteMessageBatch] -> ShowS)
-> Show DeleteMessageBatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMessageBatch] -> ShowS
$cshowList :: [DeleteMessageBatch] -> ShowS
show :: DeleteMessageBatch -> String
$cshow :: DeleteMessageBatch -> String
showsPrec :: Int -> DeleteMessageBatch -> ShowS
$cshowsPrec :: Int -> DeleteMessageBatch -> ShowS
Prelude.Show, (forall x. DeleteMessageBatch -> Rep DeleteMessageBatch x)
-> (forall x. Rep DeleteMessageBatch x -> DeleteMessageBatch)
-> Generic DeleteMessageBatch
forall x. Rep DeleteMessageBatch x -> DeleteMessageBatch
forall x. DeleteMessageBatch -> Rep DeleteMessageBatch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteMessageBatch x -> DeleteMessageBatch
$cfrom :: forall x. DeleteMessageBatch -> Rep DeleteMessageBatch x
Prelude.Generic)

-- |
-- Create a value of 'DeleteMessageBatch' 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:
--
-- 'queueUrl', 'deleteMessageBatch_queueUrl' - The URL of the Amazon SQS queue from which messages are deleted.
--
-- Queue URLs and names are case-sensitive.
--
-- 'entries', 'deleteMessageBatch_entries' - A list of receipt handles for the messages to be deleted.
newDeleteMessageBatch ::
  -- | 'queueUrl'
  Prelude.Text ->
  DeleteMessageBatch
newDeleteMessageBatch :: Text -> DeleteMessageBatch
newDeleteMessageBatch Text
pQueueUrl_ =
  DeleteMessageBatch' :: Text -> [DeleteMessageBatchRequestEntry] -> DeleteMessageBatch
DeleteMessageBatch'
    { $sel:queueUrl:DeleteMessageBatch' :: Text
queueUrl = Text
pQueueUrl_,
      $sel:entries:DeleteMessageBatch' :: [DeleteMessageBatchRequestEntry]
entries = [DeleteMessageBatchRequestEntry]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The URL of the Amazon SQS queue from which messages are deleted.
--
-- Queue URLs and names are case-sensitive.
deleteMessageBatch_queueUrl :: Lens.Lens' DeleteMessageBatch Prelude.Text
deleteMessageBatch_queueUrl :: (Text -> f Text) -> DeleteMessageBatch -> f DeleteMessageBatch
deleteMessageBatch_queueUrl = (DeleteMessageBatch -> Text)
-> (DeleteMessageBatch -> Text -> DeleteMessageBatch)
-> Lens DeleteMessageBatch DeleteMessageBatch Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMessageBatch' {Text
queueUrl :: Text
$sel:queueUrl:DeleteMessageBatch' :: DeleteMessageBatch -> Text
queueUrl} -> Text
queueUrl) (\s :: DeleteMessageBatch
s@DeleteMessageBatch' {} Text
a -> DeleteMessageBatch
s {$sel:queueUrl:DeleteMessageBatch' :: Text
queueUrl = Text
a} :: DeleteMessageBatch)

-- | A list of receipt handles for the messages to be deleted.
deleteMessageBatch_entries :: Lens.Lens' DeleteMessageBatch [DeleteMessageBatchRequestEntry]
deleteMessageBatch_entries :: ([DeleteMessageBatchRequestEntry]
 -> f [DeleteMessageBatchRequestEntry])
-> DeleteMessageBatch -> f DeleteMessageBatch
deleteMessageBatch_entries = (DeleteMessageBatch -> [DeleteMessageBatchRequestEntry])
-> (DeleteMessageBatch
    -> [DeleteMessageBatchRequestEntry] -> DeleteMessageBatch)
-> Lens
     DeleteMessageBatch
     DeleteMessageBatch
     [DeleteMessageBatchRequestEntry]
     [DeleteMessageBatchRequestEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMessageBatch' {[DeleteMessageBatchRequestEntry]
entries :: [DeleteMessageBatchRequestEntry]
$sel:entries:DeleteMessageBatch' :: DeleteMessageBatch -> [DeleteMessageBatchRequestEntry]
entries} -> [DeleteMessageBatchRequestEntry]
entries) (\s :: DeleteMessageBatch
s@DeleteMessageBatch' {} [DeleteMessageBatchRequestEntry]
a -> DeleteMessageBatch
s {$sel:entries:DeleteMessageBatch' :: [DeleteMessageBatchRequestEntry]
entries = [DeleteMessageBatchRequestEntry]
a} :: DeleteMessageBatch) (([DeleteMessageBatchRequestEntry]
  -> f [DeleteMessageBatchRequestEntry])
 -> DeleteMessageBatch -> f DeleteMessageBatch)
-> (([DeleteMessageBatchRequestEntry]
     -> f [DeleteMessageBatchRequestEntry])
    -> [DeleteMessageBatchRequestEntry]
    -> f [DeleteMessageBatchRequestEntry])
-> ([DeleteMessageBatchRequestEntry]
    -> f [DeleteMessageBatchRequestEntry])
-> DeleteMessageBatch
-> f DeleteMessageBatch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DeleteMessageBatchRequestEntry]
 -> f [DeleteMessageBatchRequestEntry])
-> [DeleteMessageBatchRequestEntry]
-> f [DeleteMessageBatchRequestEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest DeleteMessageBatch where
  type
    AWSResponse DeleteMessageBatch =
      DeleteMessageBatchResponse
  request :: DeleteMessageBatch -> Request DeleteMessageBatch
request = Service -> DeleteMessageBatch -> Request DeleteMessageBatch
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteMessageBatch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteMessageBatch)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DeleteMessageBatch))
-> Logger
-> Service
-> Proxy DeleteMessageBatch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteMessageBatch)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DeleteMessageBatchResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int
-> [DeleteMessageBatchResultEntry]
-> [BatchResultErrorEntry]
-> DeleteMessageBatchResponse
DeleteMessageBatchResponse'
            (Int
 -> [DeleteMessageBatchResultEntry]
 -> [BatchResultErrorEntry]
 -> DeleteMessageBatchResponse)
-> Either String Int
-> Either
     String
     ([DeleteMessageBatchResultEntry]
      -> [BatchResultErrorEntry] -> DeleteMessageBatchResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([DeleteMessageBatchResultEntry]
   -> [BatchResultErrorEntry] -> DeleteMessageBatchResponse)
-> Either String [DeleteMessageBatchResultEntry]
-> Either
     String ([BatchResultErrorEntry] -> DeleteMessageBatchResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Text -> [Node] -> Either String [DeleteMessageBatchResultEntry]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DeleteMessageBatchResultEntry" [Node]
x)
            Either
  String ([BatchResultErrorEntry] -> DeleteMessageBatchResponse)
-> Either String [BatchResultErrorEntry]
-> Either String DeleteMessageBatchResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Text -> [Node] -> Either String [BatchResultErrorEntry]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"BatchResultErrorEntry" [Node]
x)
      )

instance Prelude.Hashable DeleteMessageBatch

instance Prelude.NFData DeleteMessageBatch

instance Core.ToHeaders DeleteMessageBatch where
  toHeaders :: DeleteMessageBatch -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteMessageBatch -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DeleteMessageBatch where
  toPath :: DeleteMessageBatch -> ByteString
toPath = ByteString -> DeleteMessageBatch -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DeleteMessageBatch where
  toQuery :: DeleteMessageBatch -> QueryString
toQuery DeleteMessageBatch' {[DeleteMessageBatchRequestEntry]
Text
entries :: [DeleteMessageBatchRequestEntry]
queueUrl :: Text
$sel:entries:DeleteMessageBatch' :: DeleteMessageBatch -> [DeleteMessageBatchRequestEntry]
$sel:queueUrl:DeleteMessageBatch' :: DeleteMessageBatch -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteMessageBatch" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-11-05" :: Prelude.ByteString),
        ByteString
"QueueUrl" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
queueUrl,
        ByteString -> [DeleteMessageBatchRequestEntry] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList
          ByteString
"DeleteMessageBatchRequestEntry"
          [DeleteMessageBatchRequestEntry]
entries
      ]

-- | For each message in the batch, the response contains a
-- @ DeleteMessageBatchResultEntry @ tag if the message is deleted or a
-- @ BatchResultErrorEntry @ tag if the message can\'t be deleted.
--
-- /See:/ 'newDeleteMessageBatchResponse' smart constructor.
data DeleteMessageBatchResponse = DeleteMessageBatchResponse'
  { -- | The response's http status code.
    DeleteMessageBatchResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of @ DeleteMessageBatchResultEntry @ items.
    DeleteMessageBatchResponse -> [DeleteMessageBatchResultEntry]
successful :: [DeleteMessageBatchResultEntry],
    -- | A list of @ BatchResultErrorEntry @ items.
    DeleteMessageBatchResponse -> [BatchResultErrorEntry]
failed :: [BatchResultErrorEntry]
  }
  deriving (DeleteMessageBatchResponse -> DeleteMessageBatchResponse -> Bool
(DeleteMessageBatchResponse -> DeleteMessageBatchResponse -> Bool)
-> (DeleteMessageBatchResponse
    -> DeleteMessageBatchResponse -> Bool)
-> Eq DeleteMessageBatchResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMessageBatchResponse -> DeleteMessageBatchResponse -> Bool
$c/= :: DeleteMessageBatchResponse -> DeleteMessageBatchResponse -> Bool
== :: DeleteMessageBatchResponse -> DeleteMessageBatchResponse -> Bool
$c== :: DeleteMessageBatchResponse -> DeleteMessageBatchResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMessageBatchResponse]
ReadPrec DeleteMessageBatchResponse
Int -> ReadS DeleteMessageBatchResponse
ReadS [DeleteMessageBatchResponse]
(Int -> ReadS DeleteMessageBatchResponse)
-> ReadS [DeleteMessageBatchResponse]
-> ReadPrec DeleteMessageBatchResponse
-> ReadPrec [DeleteMessageBatchResponse]
-> Read DeleteMessageBatchResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMessageBatchResponse]
$creadListPrec :: ReadPrec [DeleteMessageBatchResponse]
readPrec :: ReadPrec DeleteMessageBatchResponse
$creadPrec :: ReadPrec DeleteMessageBatchResponse
readList :: ReadS [DeleteMessageBatchResponse]
$creadList :: ReadS [DeleteMessageBatchResponse]
readsPrec :: Int -> ReadS DeleteMessageBatchResponse
$creadsPrec :: Int -> ReadS DeleteMessageBatchResponse
Prelude.Read, Int -> DeleteMessageBatchResponse -> ShowS
[DeleteMessageBatchResponse] -> ShowS
DeleteMessageBatchResponse -> String
(Int -> DeleteMessageBatchResponse -> ShowS)
-> (DeleteMessageBatchResponse -> String)
-> ([DeleteMessageBatchResponse] -> ShowS)
-> Show DeleteMessageBatchResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMessageBatchResponse] -> ShowS
$cshowList :: [DeleteMessageBatchResponse] -> ShowS
show :: DeleteMessageBatchResponse -> String
$cshow :: DeleteMessageBatchResponse -> String
showsPrec :: Int -> DeleteMessageBatchResponse -> ShowS
$cshowsPrec :: Int -> DeleteMessageBatchResponse -> ShowS
Prelude.Show, (forall x.
 DeleteMessageBatchResponse -> Rep DeleteMessageBatchResponse x)
-> (forall x.
    Rep DeleteMessageBatchResponse x -> DeleteMessageBatchResponse)
-> Generic DeleteMessageBatchResponse
forall x.
Rep DeleteMessageBatchResponse x -> DeleteMessageBatchResponse
forall x.
DeleteMessageBatchResponse -> Rep DeleteMessageBatchResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMessageBatchResponse x -> DeleteMessageBatchResponse
$cfrom :: forall x.
DeleteMessageBatchResponse -> Rep DeleteMessageBatchResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteMessageBatchResponse' 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:
--
-- 'httpStatus', 'deleteMessageBatchResponse_httpStatus' - The response's http status code.
--
-- 'successful', 'deleteMessageBatchResponse_successful' - A list of @ DeleteMessageBatchResultEntry @ items.
--
-- 'failed', 'deleteMessageBatchResponse_failed' - A list of @ BatchResultErrorEntry @ items.
newDeleteMessageBatchResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteMessageBatchResponse
newDeleteMessageBatchResponse :: Int -> DeleteMessageBatchResponse
newDeleteMessageBatchResponse Int
pHttpStatus_ =
  DeleteMessageBatchResponse' :: Int
-> [DeleteMessageBatchResultEntry]
-> [BatchResultErrorEntry]
-> DeleteMessageBatchResponse
DeleteMessageBatchResponse'
    { $sel:httpStatus:DeleteMessageBatchResponse' :: Int
httpStatus =
        Int
pHttpStatus_,
      $sel:successful:DeleteMessageBatchResponse' :: [DeleteMessageBatchResultEntry]
successful = [DeleteMessageBatchResultEntry]
forall a. Monoid a => a
Prelude.mempty,
      $sel:failed:DeleteMessageBatchResponse' :: [BatchResultErrorEntry]
failed = [BatchResultErrorEntry]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The response's http status code.
deleteMessageBatchResponse_httpStatus :: Lens.Lens' DeleteMessageBatchResponse Prelude.Int
deleteMessageBatchResponse_httpStatus :: (Int -> f Int)
-> DeleteMessageBatchResponse -> f DeleteMessageBatchResponse
deleteMessageBatchResponse_httpStatus = (DeleteMessageBatchResponse -> Int)
-> (DeleteMessageBatchResponse
    -> Int -> DeleteMessageBatchResponse)
-> Lens
     DeleteMessageBatchResponse DeleteMessageBatchResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMessageBatchResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteMessageBatchResponse' :: DeleteMessageBatchResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteMessageBatchResponse
s@DeleteMessageBatchResponse' {} Int
a -> DeleteMessageBatchResponse
s {$sel:httpStatus:DeleteMessageBatchResponse' :: Int
httpStatus = Int
a} :: DeleteMessageBatchResponse)

-- | A list of @ DeleteMessageBatchResultEntry @ items.
deleteMessageBatchResponse_successful :: Lens.Lens' DeleteMessageBatchResponse [DeleteMessageBatchResultEntry]
deleteMessageBatchResponse_successful :: ([DeleteMessageBatchResultEntry]
 -> f [DeleteMessageBatchResultEntry])
-> DeleteMessageBatchResponse -> f DeleteMessageBatchResponse
deleteMessageBatchResponse_successful = (DeleteMessageBatchResponse -> [DeleteMessageBatchResultEntry])
-> (DeleteMessageBatchResponse
    -> [DeleteMessageBatchResultEntry] -> DeleteMessageBatchResponse)
-> Lens
     DeleteMessageBatchResponse
     DeleteMessageBatchResponse
     [DeleteMessageBatchResultEntry]
     [DeleteMessageBatchResultEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMessageBatchResponse' {[DeleteMessageBatchResultEntry]
successful :: [DeleteMessageBatchResultEntry]
$sel:successful:DeleteMessageBatchResponse' :: DeleteMessageBatchResponse -> [DeleteMessageBatchResultEntry]
successful} -> [DeleteMessageBatchResultEntry]
successful) (\s :: DeleteMessageBatchResponse
s@DeleteMessageBatchResponse' {} [DeleteMessageBatchResultEntry]
a -> DeleteMessageBatchResponse
s {$sel:successful:DeleteMessageBatchResponse' :: [DeleteMessageBatchResultEntry]
successful = [DeleteMessageBatchResultEntry]
a} :: DeleteMessageBatchResponse) (([DeleteMessageBatchResultEntry]
  -> f [DeleteMessageBatchResultEntry])
 -> DeleteMessageBatchResponse -> f DeleteMessageBatchResponse)
-> (([DeleteMessageBatchResultEntry]
     -> f [DeleteMessageBatchResultEntry])
    -> [DeleteMessageBatchResultEntry]
    -> f [DeleteMessageBatchResultEntry])
-> ([DeleteMessageBatchResultEntry]
    -> f [DeleteMessageBatchResultEntry])
-> DeleteMessageBatchResponse
-> f DeleteMessageBatchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DeleteMessageBatchResultEntry]
 -> f [DeleteMessageBatchResultEntry])
-> [DeleteMessageBatchResultEntry]
-> f [DeleteMessageBatchResultEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of @ BatchResultErrorEntry @ items.
deleteMessageBatchResponse_failed :: Lens.Lens' DeleteMessageBatchResponse [BatchResultErrorEntry]
deleteMessageBatchResponse_failed :: ([BatchResultErrorEntry] -> f [BatchResultErrorEntry])
-> DeleteMessageBatchResponse -> f DeleteMessageBatchResponse
deleteMessageBatchResponse_failed = (DeleteMessageBatchResponse -> [BatchResultErrorEntry])
-> (DeleteMessageBatchResponse
    -> [BatchResultErrorEntry] -> DeleteMessageBatchResponse)
-> Lens
     DeleteMessageBatchResponse
     DeleteMessageBatchResponse
     [BatchResultErrorEntry]
     [BatchResultErrorEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMessageBatchResponse' {[BatchResultErrorEntry]
failed :: [BatchResultErrorEntry]
$sel:failed:DeleteMessageBatchResponse' :: DeleteMessageBatchResponse -> [BatchResultErrorEntry]
failed} -> [BatchResultErrorEntry]
failed) (\s :: DeleteMessageBatchResponse
s@DeleteMessageBatchResponse' {} [BatchResultErrorEntry]
a -> DeleteMessageBatchResponse
s {$sel:failed:DeleteMessageBatchResponse' :: [BatchResultErrorEntry]
failed = [BatchResultErrorEntry]
a} :: DeleteMessageBatchResponse) (([BatchResultErrorEntry] -> f [BatchResultErrorEntry])
 -> DeleteMessageBatchResponse -> f DeleteMessageBatchResponse)
-> (([BatchResultErrorEntry] -> f [BatchResultErrorEntry])
    -> [BatchResultErrorEntry] -> f [BatchResultErrorEntry])
-> ([BatchResultErrorEntry] -> f [BatchResultErrorEntry])
-> DeleteMessageBatchResponse
-> f DeleteMessageBatchResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchResultErrorEntry] -> f [BatchResultErrorEntry])
-> [BatchResultErrorEntry] -> f [BatchResultErrorEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData DeleteMessageBatchResponse