{-# 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.SNS.Types.RouteType
-- 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.SNS.Types.RouteType
  ( RouteType
      ( ..,
        RouteType_Premium,
        RouteType_Promotional,
        RouteType_Transactional
      ),
  )
where

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

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

pattern RouteType_Premium :: RouteType
pattern $bRouteType_Premium :: RouteType
$mRouteType_Premium :: forall r. RouteType -> (Void# -> r) -> (Void# -> r) -> r
RouteType_Premium = RouteType' "Premium"

pattern RouteType_Promotional :: RouteType
pattern $bRouteType_Promotional :: RouteType
$mRouteType_Promotional :: forall r. RouteType -> (Void# -> r) -> (Void# -> r) -> r
RouteType_Promotional = RouteType' "Promotional"

pattern RouteType_Transactional :: RouteType
pattern $bRouteType_Transactional :: RouteType
$mRouteType_Transactional :: forall r. RouteType -> (Void# -> r) -> (Void# -> r) -> r
RouteType_Transactional = RouteType' "Transactional"

{-# COMPLETE
  RouteType_Premium,
  RouteType_Promotional,
  RouteType_Transactional,
  RouteType'
  #-}