{-# 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.PinpointEmail.Types.EventType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.PinpointEmail.Types.EventType
  ( EventType
      ( ..,
        EventType_BOUNCE,
        EventType_CLICK,
        EventType_COMPLAINT,
        EventType_DELIVERY,
        EventType_OPEN,
        EventType_REJECT,
        EventType_RENDERING_FAILURE,
        EventType_SEND
      ),
  )
where

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

-- | An email sending event type. For example, email sends, opens, and
-- bounces are all email events.
newtype EventType = EventType'
  { EventType -> Text
fromEventType ::
      Data.Text
  }
  deriving stock
    ( Int -> EventType -> ShowS
[EventType] -> ShowS
EventType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventType] -> ShowS
$cshowList :: [EventType] -> ShowS
show :: EventType -> String
$cshow :: EventType -> String
showsPrec :: Int -> EventType -> ShowS
$cshowsPrec :: Int -> EventType -> ShowS
Prelude.Show,
      ReadPrec [EventType]
ReadPrec EventType
Int -> ReadS EventType
ReadS [EventType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventType]
$creadListPrec :: ReadPrec [EventType]
readPrec :: ReadPrec EventType
$creadPrec :: ReadPrec EventType
readList :: ReadS [EventType]
$creadList :: ReadS [EventType]
readsPrec :: Int -> ReadS EventType
$creadsPrec :: Int -> ReadS EventType
Prelude.Read,
      EventType -> EventType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventType -> EventType -> Bool
$c/= :: EventType -> EventType -> Bool
== :: EventType -> EventType -> Bool
$c== :: EventType -> EventType -> Bool
Prelude.Eq,
      Eq EventType
EventType -> EventType -> Bool
EventType -> EventType -> Ordering
EventType -> EventType -> EventType
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 :: EventType -> EventType -> EventType
$cmin :: EventType -> EventType -> EventType
max :: EventType -> EventType -> EventType
$cmax :: EventType -> EventType -> EventType
>= :: EventType -> EventType -> Bool
$c>= :: EventType -> EventType -> Bool
> :: EventType -> EventType -> Bool
$c> :: EventType -> EventType -> Bool
<= :: EventType -> EventType -> Bool
$c<= :: EventType -> EventType -> Bool
< :: EventType -> EventType -> Bool
$c< :: EventType -> EventType -> Bool
compare :: EventType -> EventType -> Ordering
$ccompare :: EventType -> EventType -> Ordering
Prelude.Ord,
      forall x. Rep EventType x -> EventType
forall x. EventType -> Rep EventType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventType x -> EventType
$cfrom :: forall x. EventType -> Rep EventType x
Prelude.Generic
    )
  deriving newtype
    ( Eq EventType
Int -> EventType -> Int
EventType -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: EventType -> Int
$chash :: EventType -> Int
hashWithSalt :: Int -> EventType -> Int
$chashWithSalt :: Int -> EventType -> Int
Prelude.Hashable,
      EventType -> ()
forall a. (a -> ()) -> NFData a
rnf :: EventType -> ()
$crnf :: EventType -> ()
Prelude.NFData,
      Text -> Either String EventType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String EventType
$cfromText :: Text -> Either String EventType
Data.FromText,
      EventType -> Text
forall a. (a -> Text) -> ToText a
toText :: EventType -> Text
$ctoText :: EventType -> Text
Data.ToText,
      EventType -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: EventType -> ByteString
$ctoBS :: EventType -> ByteString
Data.ToByteString,
      EventType -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: EventType -> ByteStringBuilder
$cbuild :: EventType -> ByteStringBuilder
Data.ToLog,
      HeaderName -> EventType -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> EventType -> [Header]
$ctoHeader :: HeaderName -> EventType -> [Header]
Data.ToHeader,
      EventType -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: EventType -> QueryString
$ctoQuery :: EventType -> QueryString
Data.ToQuery,
      Value -> Parser [EventType]
Value -> Parser EventType
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [EventType]
$cparseJSONList :: Value -> Parser [EventType]
parseJSON :: Value -> Parser EventType
$cparseJSON :: Value -> Parser EventType
Data.FromJSON,
      FromJSONKeyFunction [EventType]
FromJSONKeyFunction EventType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [EventType]
$cfromJSONKeyList :: FromJSONKeyFunction [EventType]
fromJSONKey :: FromJSONKeyFunction EventType
$cfromJSONKey :: FromJSONKeyFunction EventType
Data.FromJSONKey,
      [EventType] -> Encoding
[EventType] -> Value
EventType -> Encoding
EventType -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [EventType] -> Encoding
$ctoEncodingList :: [EventType] -> Encoding
toJSONList :: [EventType] -> Value
$ctoJSONList :: [EventType] -> Value
toEncoding :: EventType -> Encoding
$ctoEncoding :: EventType -> Encoding
toJSON :: EventType -> Value
$ctoJSON :: EventType -> Value
Data.ToJSON,
      ToJSONKeyFunction [EventType]
ToJSONKeyFunction EventType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [EventType]
$ctoJSONKeyList :: ToJSONKeyFunction [EventType]
toJSONKey :: ToJSONKeyFunction EventType
$ctoJSONKey :: ToJSONKeyFunction EventType
Data.ToJSONKey,
      [Node] -> Either String EventType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String EventType
$cparseXML :: [Node] -> Either String EventType
Data.FromXML,
      EventType -> XML
forall a. (a -> XML) -> ToXML a
toXML :: EventType -> XML
$ctoXML :: EventType -> XML
Data.ToXML
    )

pattern EventType_BOUNCE :: EventType
pattern $bEventType_BOUNCE :: EventType
$mEventType_BOUNCE :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_BOUNCE = EventType' "BOUNCE"

pattern EventType_CLICK :: EventType
pattern $bEventType_CLICK :: EventType
$mEventType_CLICK :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_CLICK = EventType' "CLICK"

pattern EventType_COMPLAINT :: EventType
pattern $bEventType_COMPLAINT :: EventType
$mEventType_COMPLAINT :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_COMPLAINT = EventType' "COMPLAINT"

pattern EventType_DELIVERY :: EventType
pattern $bEventType_DELIVERY :: EventType
$mEventType_DELIVERY :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_DELIVERY = EventType' "DELIVERY"

pattern EventType_OPEN :: EventType
pattern $bEventType_OPEN :: EventType
$mEventType_OPEN :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_OPEN = EventType' "OPEN"

pattern EventType_REJECT :: EventType
pattern $bEventType_REJECT :: EventType
$mEventType_REJECT :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_REJECT = EventType' "REJECT"

pattern EventType_RENDERING_FAILURE :: EventType
pattern $bEventType_RENDERING_FAILURE :: EventType
$mEventType_RENDERING_FAILURE :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_RENDERING_FAILURE = EventType' "RENDERING_FAILURE"

pattern EventType_SEND :: EventType
pattern $bEventType_SEND :: EventType
$mEventType_SEND :: forall {r}. EventType -> ((# #) -> r) -> ((# #) -> r) -> r
EventType_SEND = EventType' "SEND"

{-# COMPLETE
  EventType_BOUNCE,
  EventType_CLICK,
  EventType_COMPLAINT,
  EventType_DELIVERY,
  EventType_OPEN,
  EventType_REJECT,
  EventType_RENDERING_FAILURE,
  EventType_SEND,
  EventType'
  #-}