{-# 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.CostExplorer.Types.SubscriberType
-- 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.CostExplorer.Types.SubscriberType
  ( SubscriberType
      ( ..,
        SubscriberType_EMAIL,
        SubscriberType_SNS
      ),
  )
where

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

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

pattern SubscriberType_EMAIL :: SubscriberType
pattern $bSubscriberType_EMAIL :: SubscriberType
$mSubscriberType_EMAIL :: forall r. SubscriberType -> (Void# -> r) -> (Void# -> r) -> r
SubscriberType_EMAIL = SubscriberType' "EMAIL"

pattern SubscriberType_SNS :: SubscriberType
pattern $bSubscriberType_SNS :: SubscriberType
$mSubscriberType_SNS :: forall r. SubscriberType -> (Void# -> r) -> (Void# -> r) -> r
SubscriberType_SNS = SubscriberType' "SNS"

{-# COMPLETE
  SubscriberType_EMAIL,
  SubscriberType_SNS,
  SubscriberType'
  #-}