{-# 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.IoTEvents.Types.PayloadType
-- 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.IoTEvents.Types.PayloadType
  ( PayloadType
      ( ..,
        PayloadType_JSON,
        PayloadType_STRING
      ),
  )
where

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

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

pattern PayloadType_JSON :: PayloadType
pattern $bPayloadType_JSON :: PayloadType
$mPayloadType_JSON :: forall r. PayloadType -> (Void# -> r) -> (Void# -> r) -> r
PayloadType_JSON = PayloadType' "JSON"

pattern PayloadType_STRING :: PayloadType
pattern $bPayloadType_STRING :: PayloadType
$mPayloadType_STRING :: forall r. PayloadType -> (Void# -> r) -> (Void# -> r) -> r
PayloadType_STRING = PayloadType' "STRING"

{-# COMPLETE
  PayloadType_JSON,
  PayloadType_STRING,
  PayloadType'
  #-}