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

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

newtype MailType = MailType'
  { MailType -> Text
fromMailType ::
      Core.Text
  }
  deriving stock
    ( Int -> MailType -> ShowS
[MailType] -> ShowS
MailType -> String
(Int -> MailType -> ShowS)
-> (MailType -> String) -> ([MailType] -> ShowS) -> Show MailType
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]
(Int -> ReadS MailType)
-> ReadS [MailType]
-> ReadPrec MailType
-> ReadPrec [MailType]
-> Read 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
(MailType -> MailType -> Bool)
-> (MailType -> MailType -> Bool) -> Eq MailType
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
Eq MailType
-> (MailType -> MailType -> Ordering)
-> (MailType -> MailType -> Bool)
-> (MailType -> MailType -> Bool)
-> (MailType -> MailType -> Bool)
-> (MailType -> MailType -> Bool)
-> (MailType -> MailType -> MailType)
-> (MailType -> MailType -> MailType)
-> Ord 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
$cp1Ord :: Eq MailType
Prelude.Ord,
      (forall x. MailType -> Rep MailType x)
-> (forall x. Rep MailType x -> MailType) -> Generic MailType
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
    ( Int -> MailType -> Int
MailType -> Int
(Int -> MailType -> Int) -> (MailType -> Int) -> Hashable MailType
forall 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 -> ()
(MailType -> ()) -> NFData MailType
forall a. (a -> ()) -> NFData a
rnf :: MailType -> ()
$crnf :: MailType -> ()
Prelude.NFData,
      Text -> Either String MailType
(Text -> Either String MailType) -> FromText MailType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String MailType
$cfromText :: Text -> Either String MailType
Core.FromText,
      MailType -> Text
(MailType -> Text) -> ToText MailType
forall a. (a -> Text) -> ToText a
toText :: MailType -> Text
$ctoText :: MailType -> Text
Core.ToText,
      MailType -> ByteString
(MailType -> ByteString) -> ToByteString MailType
forall a. (a -> ByteString) -> ToByteString a
toBS :: MailType -> ByteString
$ctoBS :: MailType -> ByteString
Core.ToByteString,
      MailType -> ByteStringBuilder
(MailType -> ByteStringBuilder) -> ToLog MailType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: MailType -> ByteStringBuilder
$cbuild :: MailType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> MailType -> [Header]
(HeaderName -> MailType -> [Header]) -> ToHeader MailType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> MailType -> [Header]
$ctoHeader :: HeaderName -> MailType -> [Header]
Core.ToHeader,
      MailType -> QueryString
(MailType -> QueryString) -> ToQuery MailType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: MailType -> QueryString
$ctoQuery :: MailType -> QueryString
Core.ToQuery,
      Value -> Parser [MailType]
Value -> Parser MailType
(Value -> Parser MailType)
-> (Value -> Parser [MailType]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [MailType]
FromJSONKeyFunction MailType
FromJSONKeyFunction MailType
-> FromJSONKeyFunction [MailType] -> FromJSONKey MailType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [MailType]
$cfromJSONKeyList :: FromJSONKeyFunction [MailType]
fromJSONKey :: FromJSONKeyFunction MailType
$cfromJSONKey :: FromJSONKeyFunction MailType
Core.FromJSONKey,
      [MailType] -> Encoding
[MailType] -> Value
MailType -> Encoding
MailType -> Value
(MailType -> Value)
-> (MailType -> Encoding)
-> ([MailType] -> Value)
-> ([MailType] -> Encoding)
-> ToJSON MailType
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
Core.ToJSON,
      ToJSONKeyFunction [MailType]
ToJSONKeyFunction MailType
ToJSONKeyFunction MailType
-> ToJSONKeyFunction [MailType] -> ToJSONKey MailType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [MailType]
$ctoJSONKeyList :: ToJSONKeyFunction [MailType]
toJSONKey :: ToJSONKeyFunction MailType
$ctoJSONKey :: ToJSONKeyFunction MailType
Core.ToJSONKey,
      [Node] -> Either String MailType
([Node] -> Either String MailType) -> FromXML MailType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String MailType
$cparseXML :: [Node] -> Either String MailType
Core.FromXML,
      MailType -> XML
(MailType -> XML) -> ToXML MailType
forall a. (a -> XML) -> ToXML a
toXML :: MailType -> XML
$ctoXML :: MailType -> XML
Core.ToXML
    )

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

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

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