{-# 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.Sort
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Glue.Types.Sort
  ( Sort
      ( ..,
        Sort_ASC,
        Sort_DESC
      ),
  )
where

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

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

pattern Sort_ASC :: Sort
pattern $bSort_ASC :: Sort
$mSort_ASC :: forall {r}. Sort -> ((# #) -> r) -> ((# #) -> r) -> r
Sort_ASC = Sort' "ASC"

pattern Sort_DESC :: Sort
pattern $bSort_DESC :: Sort
$mSort_DESC :: forall {r}. Sort -> ((# #) -> r) -> ((# #) -> r) -> r
Sort_DESC = Sort' "DESC"

{-# COMPLETE
  Sort_ASC,
  Sort_DESC,
  Sort'
  #-}