{-# 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.KinesisAnalytics.Types.RecordFormatType
-- 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.KinesisAnalytics.Types.RecordFormatType
  ( RecordFormatType
      ( ..,
        RecordFormatType_CSV,
        RecordFormatType_JSON
      ),
  )
where

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

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

pattern RecordFormatType_CSV :: RecordFormatType
pattern $bRecordFormatType_CSV :: RecordFormatType
$mRecordFormatType_CSV :: forall r. RecordFormatType -> (Void# -> r) -> (Void# -> r) -> r
RecordFormatType_CSV = RecordFormatType' "CSV"

pattern RecordFormatType_JSON :: RecordFormatType
pattern $bRecordFormatType_JSON :: RecordFormatType
$mRecordFormatType_JSON :: forall r. RecordFormatType -> (Void# -> r) -> (Void# -> r) -> r
RecordFormatType_JSON = RecordFormatType' "JSON"

{-# COMPLETE
  RecordFormatType_CSV,
  RecordFormatType_JSON,
  RecordFormatType'
  #-}