{-# 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.Greengrass.Types.EncodingType
-- 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.Greengrass.Types.EncodingType
  ( EncodingType
      ( ..,
        EncodingType_Binary,
        EncodingType_Json
      ),
  )
where

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

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

pattern EncodingType_Binary :: EncodingType
pattern $bEncodingType_Binary :: EncodingType
$mEncodingType_Binary :: forall r. EncodingType -> (Void# -> r) -> (Void# -> r) -> r
EncodingType_Binary = EncodingType' "binary"

pattern EncodingType_Json :: EncodingType
pattern $bEncodingType_Json :: EncodingType
$mEncodingType_Json :: forall r. EncodingType -> (Void# -> r) -> (Void# -> r) -> r
EncodingType_Json = EncodingType' "json"

{-# COMPLETE
  EncodingType_Binary,
  EncodingType_Json,
  EncodingType'
  #-}