{-# 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.Glue.Types.DataFormat
-- 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.Glue.Types.DataFormat
  ( DataFormat
      ( ..,
        DataFormat_AVRO,
        DataFormat_JSON
      ),
  )
where

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

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

pattern DataFormat_AVRO :: DataFormat
pattern $bDataFormat_AVRO :: DataFormat
$mDataFormat_AVRO :: forall r. DataFormat -> (Void# -> r) -> (Void# -> r) -> r
DataFormat_AVRO = DataFormat' "AVRO"

pattern DataFormat_JSON :: DataFormat
pattern $bDataFormat_JSON :: DataFormat
$mDataFormat_JSON :: forall r. DataFormat -> (Void# -> r) -> (Void# -> r) -> r
DataFormat_JSON = DataFormat' "JSON"

{-# COMPLETE
  DataFormat_AVRO,
  DataFormat_JSON,
  DataFormat'
  #-}