{-# 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.IoT.Types.MessageFormat
-- 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.IoT.Types.MessageFormat
  ( MessageFormat
      ( ..,
        MessageFormat_JSON,
        MessageFormat_RAW
      ),
  )
where

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

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

pattern MessageFormat_JSON :: MessageFormat
pattern $bMessageFormat_JSON :: MessageFormat
$mMessageFormat_JSON :: forall r. MessageFormat -> (Void# -> r) -> (Void# -> r) -> r
MessageFormat_JSON = MessageFormat' "JSON"

pattern MessageFormat_RAW :: MessageFormat
pattern $bMessageFormat_RAW :: MessageFormat
$mMessageFormat_RAW :: forall r. MessageFormat -> (Void# -> r) -> (Void# -> r) -> r
MessageFormat_RAW = MessageFormat' "RAW"

{-# COMPLETE
  MessageFormat_JSON,
  MessageFormat_RAW,
  MessageFormat'
  #-}