{-# 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.MailType
-- 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.SESV2.Types.MailType
  ( MailType
      ( ..,
        MailType_MARKETING,
        MailType_TRANSACTIONAL
      ),
  )
where

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

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

pattern MailType_MARKETING :: MailType
pattern $bMailType_MARKETING :: MailType
$mMailType_MARKETING :: forall {r}. MailType -> ((# #) -> r) -> ((# #) -> r) -> r
MailType_MARKETING = MailType' "MARKETING"

pattern MailType_TRANSACTIONAL :: MailType
pattern $bMailType_TRANSACTIONAL :: MailType
$mMailType_TRANSACTIONAL :: forall {r}. MailType -> ((# #) -> r) -> ((# #) -> r) -> r
MailType_TRANSACTIONAL = MailType' "TRANSACTIONAL"

{-# COMPLETE
  MailType_MARKETING,
  MailType_TRANSACTIONAL,
  MailType'
  #-}