{-# 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.SQS.Types.ChangeMessageVisibilityBatchResultEntry
-- 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.SQS.Types.ChangeMessageVisibilityBatchResultEntry where

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

-- | Encloses the @Id@ of an entry in @ ChangeMessageVisibilityBatch.@
--
-- /See:/ 'newChangeMessageVisibilityBatchResultEntry' smart constructor.
data ChangeMessageVisibilityBatchResultEntry = ChangeMessageVisibilityBatchResultEntry'
  { -- | Represents a message whose visibility timeout has been changed
    -- successfully.
    ChangeMessageVisibilityBatchResultEntry -> Text
id :: Prelude.Text
  }
  deriving (ChangeMessageVisibilityBatchResultEntry
-> ChangeMessageVisibilityBatchResultEntry -> Bool
(ChangeMessageVisibilityBatchResultEntry
 -> ChangeMessageVisibilityBatchResultEntry -> Bool)
-> (ChangeMessageVisibilityBatchResultEntry
    -> ChangeMessageVisibilityBatchResultEntry -> Bool)
-> Eq ChangeMessageVisibilityBatchResultEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangeMessageVisibilityBatchResultEntry
-> ChangeMessageVisibilityBatchResultEntry -> Bool
$c/= :: ChangeMessageVisibilityBatchResultEntry
-> ChangeMessageVisibilityBatchResultEntry -> Bool
== :: ChangeMessageVisibilityBatchResultEntry
-> ChangeMessageVisibilityBatchResultEntry -> Bool
$c== :: ChangeMessageVisibilityBatchResultEntry
-> ChangeMessageVisibilityBatchResultEntry -> Bool
Prelude.Eq, ReadPrec [ChangeMessageVisibilityBatchResultEntry]
ReadPrec ChangeMessageVisibilityBatchResultEntry
Int -> ReadS ChangeMessageVisibilityBatchResultEntry
ReadS [ChangeMessageVisibilityBatchResultEntry]
(Int -> ReadS ChangeMessageVisibilityBatchResultEntry)
-> ReadS [ChangeMessageVisibilityBatchResultEntry]
-> ReadPrec ChangeMessageVisibilityBatchResultEntry
-> ReadPrec [ChangeMessageVisibilityBatchResultEntry]
-> Read ChangeMessageVisibilityBatchResultEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChangeMessageVisibilityBatchResultEntry]
$creadListPrec :: ReadPrec [ChangeMessageVisibilityBatchResultEntry]
readPrec :: ReadPrec ChangeMessageVisibilityBatchResultEntry
$creadPrec :: ReadPrec ChangeMessageVisibilityBatchResultEntry
readList :: ReadS [ChangeMessageVisibilityBatchResultEntry]
$creadList :: ReadS [ChangeMessageVisibilityBatchResultEntry]
readsPrec :: Int -> ReadS ChangeMessageVisibilityBatchResultEntry
$creadsPrec :: Int -> ReadS ChangeMessageVisibilityBatchResultEntry
Prelude.Read, Int -> ChangeMessageVisibilityBatchResultEntry -> ShowS
[ChangeMessageVisibilityBatchResultEntry] -> ShowS
ChangeMessageVisibilityBatchResultEntry -> String
(Int -> ChangeMessageVisibilityBatchResultEntry -> ShowS)
-> (ChangeMessageVisibilityBatchResultEntry -> String)
-> ([ChangeMessageVisibilityBatchResultEntry] -> ShowS)
-> Show ChangeMessageVisibilityBatchResultEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChangeMessageVisibilityBatchResultEntry] -> ShowS
$cshowList :: [ChangeMessageVisibilityBatchResultEntry] -> ShowS
show :: ChangeMessageVisibilityBatchResultEntry -> String
$cshow :: ChangeMessageVisibilityBatchResultEntry -> String
showsPrec :: Int -> ChangeMessageVisibilityBatchResultEntry -> ShowS
$cshowsPrec :: Int -> ChangeMessageVisibilityBatchResultEntry -> ShowS
Prelude.Show, (forall x.
 ChangeMessageVisibilityBatchResultEntry
 -> Rep ChangeMessageVisibilityBatchResultEntry x)
-> (forall x.
    Rep ChangeMessageVisibilityBatchResultEntry x
    -> ChangeMessageVisibilityBatchResultEntry)
-> Generic ChangeMessageVisibilityBatchResultEntry
forall x.
Rep ChangeMessageVisibilityBatchResultEntry x
-> ChangeMessageVisibilityBatchResultEntry
forall x.
ChangeMessageVisibilityBatchResultEntry
-> Rep ChangeMessageVisibilityBatchResultEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChangeMessageVisibilityBatchResultEntry x
-> ChangeMessageVisibilityBatchResultEntry
$cfrom :: forall x.
ChangeMessageVisibilityBatchResultEntry
-> Rep ChangeMessageVisibilityBatchResultEntry x
Prelude.Generic)

-- |
-- Create a value of 'ChangeMessageVisibilityBatchResultEntry' 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:
--
-- 'id', 'changeMessageVisibilityBatchResultEntry_id' - Represents a message whose visibility timeout has been changed
-- successfully.
newChangeMessageVisibilityBatchResultEntry ::
  -- | 'id'
  Prelude.Text ->
  ChangeMessageVisibilityBatchResultEntry
newChangeMessageVisibilityBatchResultEntry :: Text -> ChangeMessageVisibilityBatchResultEntry
newChangeMessageVisibilityBatchResultEntry Text
pId_ =
  ChangeMessageVisibilityBatchResultEntry' :: Text -> ChangeMessageVisibilityBatchResultEntry
ChangeMessageVisibilityBatchResultEntry' {$sel:id:ChangeMessageVisibilityBatchResultEntry' :: Text
id = Text
pId_}

-- | Represents a message whose visibility timeout has been changed
-- successfully.
changeMessageVisibilityBatchResultEntry_id :: Lens.Lens' ChangeMessageVisibilityBatchResultEntry Prelude.Text
changeMessageVisibilityBatchResultEntry_id :: (Text -> f Text)
-> ChangeMessageVisibilityBatchResultEntry
-> f ChangeMessageVisibilityBatchResultEntry
changeMessageVisibilityBatchResultEntry_id = (ChangeMessageVisibilityBatchResultEntry -> Text)
-> (ChangeMessageVisibilityBatchResultEntry
    -> Text -> ChangeMessageVisibilityBatchResultEntry)
-> Lens
     ChangeMessageVisibilityBatchResultEntry
     ChangeMessageVisibilityBatchResultEntry
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangeMessageVisibilityBatchResultEntry' {Text
id :: Text
$sel:id:ChangeMessageVisibilityBatchResultEntry' :: ChangeMessageVisibilityBatchResultEntry -> Text
id} -> Text
id) (\s :: ChangeMessageVisibilityBatchResultEntry
s@ChangeMessageVisibilityBatchResultEntry' {} Text
a -> ChangeMessageVisibilityBatchResultEntry
s {$sel:id:ChangeMessageVisibilityBatchResultEntry' :: Text
id = Text
a} :: ChangeMessageVisibilityBatchResultEntry)

instance
  Core.FromXML
    ChangeMessageVisibilityBatchResultEntry
  where
  parseXML :: [Node] -> Either String ChangeMessageVisibilityBatchResultEntry
parseXML [Node]
x =
    Text -> ChangeMessageVisibilityBatchResultEntry
ChangeMessageVisibilityBatchResultEntry'
      (Text -> ChangeMessageVisibilityBatchResultEntry)
-> Either String Text
-> Either String ChangeMessageVisibilityBatchResultEntry
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Id")

instance
  Prelude.Hashable
    ChangeMessageVisibilityBatchResultEntry

instance
  Prelude.NFData
    ChangeMessageVisibilityBatchResultEntry