{-# 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.AppFlow.Types.FileType
-- 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.AppFlow.Types.FileType
  ( FileType
      ( ..,
        FileType_CSV,
        FileType_JSON,
        FileType_PARQUET
      ),
  )
where

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

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

pattern FileType_CSV :: FileType
pattern $bFileType_CSV :: FileType
$mFileType_CSV :: forall r. FileType -> (Void# -> r) -> (Void# -> r) -> r
FileType_CSV = FileType' "CSV"

pattern FileType_JSON :: FileType
pattern $bFileType_JSON :: FileType
$mFileType_JSON :: forall r. FileType -> (Void# -> r) -> (Void# -> r) -> r
FileType_JSON = FileType' "JSON"

pattern FileType_PARQUET :: FileType
pattern $bFileType_PARQUET :: FileType
$mFileType_PARQUET :: forall r. FileType -> (Void# -> r) -> (Void# -> r) -> r
FileType_PARQUET = FileType' "PARQUET"

{-# COMPLETE
  FileType_CSV,
  FileType_JSON,
  FileType_PARQUET,
  FileType'
  #-}