{-# 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.SageMaker.Types.RedshiftResultFormat
-- 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.SageMaker.Types.RedshiftResultFormat
  ( RedshiftResultFormat
      ( ..,
        RedshiftResultFormat_CSV,
        RedshiftResultFormat_PARQUET
      ),
  )
where

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

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

pattern RedshiftResultFormat_CSV :: RedshiftResultFormat
pattern $bRedshiftResultFormat_CSV :: RedshiftResultFormat
$mRedshiftResultFormat_CSV :: forall r. RedshiftResultFormat -> (Void# -> r) -> (Void# -> r) -> r
RedshiftResultFormat_CSV = RedshiftResultFormat' "CSV"

pattern RedshiftResultFormat_PARQUET :: RedshiftResultFormat
pattern $bRedshiftResultFormat_PARQUET :: RedshiftResultFormat
$mRedshiftResultFormat_PARQUET :: forall r. RedshiftResultFormat -> (Void# -> r) -> (Void# -> r) -> r
RedshiftResultFormat_PARQUET = RedshiftResultFormat' "PARQUET"

{-# COMPLETE
  RedshiftResultFormat_CSV,
  RedshiftResultFormat_PARQUET,
  RedshiftResultFormat'
  #-}