{-# 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.SageMakerA2IRuntime.Types.SortOrder
-- 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.SageMakerA2IRuntime.Types.SortOrder
  ( SortOrder
      ( ..,
        SortOrder_Ascending,
        SortOrder_Descending
      ),
  )
where

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

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

pattern SortOrder_Ascending :: SortOrder
pattern $bSortOrder_Ascending :: SortOrder
$mSortOrder_Ascending :: forall r. SortOrder -> (Void# -> r) -> (Void# -> r) -> r
SortOrder_Ascending = SortOrder' "Ascending"

pattern SortOrder_Descending :: SortOrder
pattern $bSortOrder_Descending :: SortOrder
$mSortOrder_Descending :: forall r. SortOrder -> (Void# -> r) -> (Void# -> r) -> r
SortOrder_Descending = SortOrder' "Descending"

{-# COMPLETE
  SortOrder_Ascending,
  SortOrder_Descending,
  SortOrder'
  #-}