{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

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

-- |
-- Module      : Amazonka.SESV2.Types.SuppressionListReason
-- 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.SuppressionListReason
  ( SuppressionListReason
      ( ..,
        SuppressionListReason_BOUNCE,
        SuppressionListReason_COMPLAINT
      ),
  )
where

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

-- | The reason that the address was added to the suppression list for your
-- account. The value can be one of the following:
--
-- -   @COMPLAINT@ – Amazon SES added an email address to the suppression
--     list for your account because a message sent to that address results
--     in a complaint.
--
-- -   @BOUNCE@ – Amazon SES added an email address to the suppression list
--     for your account because a message sent to that address results in a
--     hard bounce.
newtype SuppressionListReason = SuppressionListReason'
  { SuppressionListReason -> Text
fromSuppressionListReason ::
      Core.Text
  }
  deriving stock
    ( Int -> SuppressionListReason -> ShowS
[SuppressionListReason] -> ShowS
SuppressionListReason -> String
(Int -> SuppressionListReason -> ShowS)
-> (SuppressionListReason -> String)
-> ([SuppressionListReason] -> ShowS)
-> Show SuppressionListReason
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuppressionListReason] -> ShowS
$cshowList :: [SuppressionListReason] -> ShowS
show :: SuppressionListReason -> String
$cshow :: SuppressionListReason -> String
showsPrec :: Int -> SuppressionListReason -> ShowS
$cshowsPrec :: Int -> SuppressionListReason -> ShowS
Prelude.Show,
      ReadPrec [SuppressionListReason]
ReadPrec SuppressionListReason
Int -> ReadS SuppressionListReason
ReadS [SuppressionListReason]
(Int -> ReadS SuppressionListReason)
-> ReadS [SuppressionListReason]
-> ReadPrec SuppressionListReason
-> ReadPrec [SuppressionListReason]
-> Read SuppressionListReason
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuppressionListReason]
$creadListPrec :: ReadPrec [SuppressionListReason]
readPrec :: ReadPrec SuppressionListReason
$creadPrec :: ReadPrec SuppressionListReason
readList :: ReadS [SuppressionListReason]
$creadList :: ReadS [SuppressionListReason]
readsPrec :: Int -> ReadS SuppressionListReason
$creadsPrec :: Int -> ReadS SuppressionListReason
Prelude.Read,
      SuppressionListReason -> SuppressionListReason -> Bool
(SuppressionListReason -> SuppressionListReason -> Bool)
-> (SuppressionListReason -> SuppressionListReason -> Bool)
-> Eq SuppressionListReason
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuppressionListReason -> SuppressionListReason -> Bool
$c/= :: SuppressionListReason -> SuppressionListReason -> Bool
== :: SuppressionListReason -> SuppressionListReason -> Bool
$c== :: SuppressionListReason -> SuppressionListReason -> Bool
Prelude.Eq,
      Eq SuppressionListReason
Eq SuppressionListReason
-> (SuppressionListReason -> SuppressionListReason -> Ordering)
-> (SuppressionListReason -> SuppressionListReason -> Bool)
-> (SuppressionListReason -> SuppressionListReason -> Bool)
-> (SuppressionListReason -> SuppressionListReason -> Bool)
-> (SuppressionListReason -> SuppressionListReason -> Bool)
-> (SuppressionListReason
    -> SuppressionListReason -> SuppressionListReason)
-> (SuppressionListReason
    -> SuppressionListReason -> SuppressionListReason)
-> Ord SuppressionListReason
SuppressionListReason -> SuppressionListReason -> Bool
SuppressionListReason -> SuppressionListReason -> Ordering
SuppressionListReason
-> SuppressionListReason -> SuppressionListReason
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SuppressionListReason
-> SuppressionListReason -> SuppressionListReason
$cmin :: SuppressionListReason
-> SuppressionListReason -> SuppressionListReason
max :: SuppressionListReason
-> SuppressionListReason -> SuppressionListReason
$cmax :: SuppressionListReason
-> SuppressionListReason -> SuppressionListReason
>= :: SuppressionListReason -> SuppressionListReason -> Bool
$c>= :: SuppressionListReason -> SuppressionListReason -> Bool
> :: SuppressionListReason -> SuppressionListReason -> Bool
$c> :: SuppressionListReason -> SuppressionListReason -> Bool
<= :: SuppressionListReason -> SuppressionListReason -> Bool
$c<= :: SuppressionListReason -> SuppressionListReason -> Bool
< :: SuppressionListReason -> SuppressionListReason -> Bool
$c< :: SuppressionListReason -> SuppressionListReason -> Bool
compare :: SuppressionListReason -> SuppressionListReason -> Ordering
$ccompare :: SuppressionListReason -> SuppressionListReason -> Ordering
$cp1Ord :: Eq SuppressionListReason
Prelude.Ord,
      (forall x. SuppressionListReason -> Rep SuppressionListReason x)
-> (forall x. Rep SuppressionListReason x -> SuppressionListReason)
-> Generic SuppressionListReason
forall x. Rep SuppressionListReason x -> SuppressionListReason
forall x. SuppressionListReason -> Rep SuppressionListReason x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SuppressionListReason x -> SuppressionListReason
$cfrom :: forall x. SuppressionListReason -> Rep SuppressionListReason x
Prelude.Generic
    )
  deriving newtype
    ( Int -> SuppressionListReason -> Int
SuppressionListReason -> Int
(Int -> SuppressionListReason -> Int)
-> (SuppressionListReason -> Int) -> Hashable SuppressionListReason
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SuppressionListReason -> Int
$chash :: SuppressionListReason -> Int
hashWithSalt :: Int -> SuppressionListReason -> Int
$chashWithSalt :: Int -> SuppressionListReason -> Int
Prelude.Hashable,
      SuppressionListReason -> ()
(SuppressionListReason -> ()) -> NFData SuppressionListReason
forall a. (a -> ()) -> NFData a
rnf :: SuppressionListReason -> ()
$crnf :: SuppressionListReason -> ()
Prelude.NFData,
      Text -> Either String SuppressionListReason
(Text -> Either String SuppressionListReason)
-> FromText SuppressionListReason
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String SuppressionListReason
$cfromText :: Text -> Either String SuppressionListReason
Core.FromText,
      SuppressionListReason -> Text
(SuppressionListReason -> Text) -> ToText SuppressionListReason
forall a. (a -> Text) -> ToText a
toText :: SuppressionListReason -> Text
$ctoText :: SuppressionListReason -> Text
Core.ToText,
      SuppressionListReason -> ByteString
(SuppressionListReason -> ByteString)
-> ToByteString SuppressionListReason
forall a. (a -> ByteString) -> ToByteString a
toBS :: SuppressionListReason -> ByteString
$ctoBS :: SuppressionListReason -> ByteString
Core.ToByteString,
      SuppressionListReason -> ByteStringBuilder
(SuppressionListReason -> ByteStringBuilder)
-> ToLog SuppressionListReason
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: SuppressionListReason -> ByteStringBuilder
$cbuild :: SuppressionListReason -> ByteStringBuilder
Core.ToLog,
      HeaderName -> SuppressionListReason -> [Header]
(HeaderName -> SuppressionListReason -> [Header])
-> ToHeader SuppressionListReason
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> SuppressionListReason -> [Header]
$ctoHeader :: HeaderName -> SuppressionListReason -> [Header]
Core.ToHeader,
      SuppressionListReason -> QueryString
(SuppressionListReason -> QueryString)
-> ToQuery SuppressionListReason
forall a. (a -> QueryString) -> ToQuery a
toQuery :: SuppressionListReason -> QueryString
$ctoQuery :: SuppressionListReason -> QueryString
Core.ToQuery,
      Value -> Parser [SuppressionListReason]
Value -> Parser SuppressionListReason
(Value -> Parser SuppressionListReason)
-> (Value -> Parser [SuppressionListReason])
-> FromJSON SuppressionListReason
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SuppressionListReason]
$cparseJSONList :: Value -> Parser [SuppressionListReason]
parseJSON :: Value -> Parser SuppressionListReason
$cparseJSON :: Value -> Parser SuppressionListReason
Core.FromJSON,
      FromJSONKeyFunction [SuppressionListReason]
FromJSONKeyFunction SuppressionListReason
FromJSONKeyFunction SuppressionListReason
-> FromJSONKeyFunction [SuppressionListReason]
-> FromJSONKey SuppressionListReason
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [SuppressionListReason]
$cfromJSONKeyList :: FromJSONKeyFunction [SuppressionListReason]
fromJSONKey :: FromJSONKeyFunction SuppressionListReason
$cfromJSONKey :: FromJSONKeyFunction SuppressionListReason
Core.FromJSONKey,
      [SuppressionListReason] -> Encoding
[SuppressionListReason] -> Value
SuppressionListReason -> Encoding
SuppressionListReason -> Value
(SuppressionListReason -> Value)
-> (SuppressionListReason -> Encoding)
-> ([SuppressionListReason] -> Value)
-> ([SuppressionListReason] -> Encoding)
-> ToJSON SuppressionListReason
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SuppressionListReason] -> Encoding
$ctoEncodingList :: [SuppressionListReason] -> Encoding
toJSONList :: [SuppressionListReason] -> Value
$ctoJSONList :: [SuppressionListReason] -> Value
toEncoding :: SuppressionListReason -> Encoding
$ctoEncoding :: SuppressionListReason -> Encoding
toJSON :: SuppressionListReason -> Value
$ctoJSON :: SuppressionListReason -> Value
Core.ToJSON,
      ToJSONKeyFunction [SuppressionListReason]
ToJSONKeyFunction SuppressionListReason
ToJSONKeyFunction SuppressionListReason
-> ToJSONKeyFunction [SuppressionListReason]
-> ToJSONKey SuppressionListReason
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [SuppressionListReason]
$ctoJSONKeyList :: ToJSONKeyFunction [SuppressionListReason]
toJSONKey :: ToJSONKeyFunction SuppressionListReason
$ctoJSONKey :: ToJSONKeyFunction SuppressionListReason
Core.ToJSONKey,
      [Node] -> Either String SuppressionListReason
([Node] -> Either String SuppressionListReason)
-> FromXML SuppressionListReason
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String SuppressionListReason
$cparseXML :: [Node] -> Either String SuppressionListReason
Core.FromXML,
      SuppressionListReason -> XML
(SuppressionListReason -> XML) -> ToXML SuppressionListReason
forall a. (a -> XML) -> ToXML a
toXML :: SuppressionListReason -> XML
$ctoXML :: SuppressionListReason -> XML
Core.ToXML
    )

pattern SuppressionListReason_BOUNCE :: SuppressionListReason
pattern $bSuppressionListReason_BOUNCE :: SuppressionListReason
$mSuppressionListReason_BOUNCE :: forall r.
SuppressionListReason -> (Void# -> r) -> (Void# -> r) -> r
SuppressionListReason_BOUNCE = SuppressionListReason' "BOUNCE"

pattern SuppressionListReason_COMPLAINT :: SuppressionListReason
pattern $bSuppressionListReason_COMPLAINT :: SuppressionListReason
$mSuppressionListReason_COMPLAINT :: forall r.
SuppressionListReason -> (Void# -> r) -> (Void# -> r) -> r
SuppressionListReason_COMPLAINT = SuppressionListReason' "COMPLAINT"

{-# COMPLETE
  SuppressionListReason_BOUNCE,
  SuppressionListReason_COMPLAINT,
  SuppressionListReason'
  #-}