{-# 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.Redshift.Types.Mode
-- 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.Redshift.Types.Mode
  ( Mode
      ( ..,
        Mode_High_performance,
        Mode_Standard
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal

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

pattern Mode_High_performance :: Mode
pattern $bMode_High_performance :: Mode
$mMode_High_performance :: forall r. Mode -> (Void# -> r) -> (Void# -> r) -> r
Mode_High_performance = Mode' "high-performance"

pattern Mode_Standard :: Mode
pattern $bMode_Standard :: Mode
$mMode_Standard :: forall r. Mode -> (Void# -> r) -> (Void# -> r) -> r
Mode_Standard = Mode' "standard"

{-# COMPLETE
  Mode_High_performance,
  Mode_Standard,
  Mode'
  #-}