{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
import qualified Amazonka.Prelude as Prelude

newtype EncodingType = EncodingType'
  { EncodingType -> Text
fromEncodingType ::
      Data.Text
  }
  deriving stock
    ( Int -> EncodingType -> ShowS
[EncodingType] -> ShowS
EncodingType -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq EncodingType
Int -> EncodingType -> Int
EncodingType -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: EncodingType -> ()
$crnf :: EncodingType -> ()
Prelude.NFData,
      Text -> Either String EncodingType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String EncodingType
$cfromText :: Text -> Either String EncodingType
Data.FromText,
      EncodingType -> Text
forall a. (a -> Text) -> ToText a
toText :: EncodingType -> Text
$ctoText :: EncodingType -> Text
Data.ToText,
      EncodingType -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: EncodingType -> ByteString
$ctoBS :: EncodingType -> ByteString
Data.ToByteString,
      EncodingType -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: EncodingType -> ByteStringBuilder
$cbuild :: EncodingType -> ByteStringBuilder
Data.ToLog,
      HeaderName -> EncodingType -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> EncodingType -> [Header]
$ctoHeader :: HeaderName -> EncodingType -> [Header]
Data.ToHeader,
      EncodingType -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: EncodingType -> QueryString
$ctoQuery :: EncodingType -> QueryString
Data.ToQuery,
      Value -> Parser [EncodingType]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [EncodingType]
FromJSONKeyFunction EncodingType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [EncodingType]
$cfromJSONKeyList :: FromJSONKeyFunction [EncodingType]
fromJSONKey :: FromJSONKeyFunction EncodingType
$cfromJSONKey :: FromJSONKeyFunction EncodingType
Data.FromJSONKey,
      [EncodingType] -> Encoding
[EncodingType] -> Value
EncodingType -> Encoding
EncodingType -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [EncodingType]
ToJSONKeyFunction EncodingType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [EncodingType]
$ctoJSONKeyList :: ToJSONKeyFunction [EncodingType]
toJSONKey :: ToJSONKeyFunction EncodingType
$ctoJSONKey :: ToJSONKeyFunction EncodingType
Data.ToJSONKey,
      [Node] -> Either String EncodingType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String EncodingType
$cparseXML :: [Node] -> Either String EncodingType
Data.FromXML,
      EncodingType -> XML
forall a. (a -> XML) -> ToXML a
toXML :: EncodingType -> XML
$ctoXML :: EncodingType -> XML
Data.ToXML
    )

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

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

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