{-# 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.SortDirectionType
-- 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.Glue.Types.SortDirectionType
  ( SortDirectionType
      ( ..,
        SortDirectionType_ASCENDING,
        SortDirectionType_DESCENDING
      ),
  )
where

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

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

pattern SortDirectionType_ASCENDING :: SortDirectionType
pattern $bSortDirectionType_ASCENDING :: SortDirectionType
$mSortDirectionType_ASCENDING :: forall r. SortDirectionType -> (Void# -> r) -> (Void# -> r) -> r
SortDirectionType_ASCENDING = SortDirectionType' "ASCENDING"

pattern SortDirectionType_DESCENDING :: SortDirectionType
pattern $bSortDirectionType_DESCENDING :: SortDirectionType
$mSortDirectionType_DESCENDING :: forall r. SortDirectionType -> (Void# -> r) -> (Void# -> r) -> r
SortDirectionType_DESCENDING = SortDirectionType' "DESCENDING"

{-# COMPLETE
  SortDirectionType_ASCENDING,
  SortDirectionType_DESCENDING,
  SortDirectionType'
  #-}