{-# 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.AmplifyBackend.Types.DeliveryMethod
-- 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.AmplifyBackend.Types.DeliveryMethod
  ( DeliveryMethod
      ( ..,
        DeliveryMethod_EMAIL,
        DeliveryMethod_SMS
      ),
  )
where

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

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

pattern DeliveryMethod_EMAIL :: DeliveryMethod
pattern $bDeliveryMethod_EMAIL :: DeliveryMethod
$mDeliveryMethod_EMAIL :: forall r. DeliveryMethod -> (Void# -> r) -> (Void# -> r) -> r
DeliveryMethod_EMAIL = DeliveryMethod' "EMAIL"

pattern DeliveryMethod_SMS :: DeliveryMethod
pattern $bDeliveryMethod_SMS :: DeliveryMethod
$mDeliveryMethod_SMS :: forall r. DeliveryMethod -> (Void# -> r) -> (Void# -> r) -> r
DeliveryMethod_SMS = DeliveryMethod' "SMS"

{-# COMPLETE
  DeliveryMethod_EMAIL,
  DeliveryMethod_SMS,
  DeliveryMethod'
  #-}