{-# 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.Connect.Types.SortOrder
-- 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.Connect.Types.SortOrder
  ( SortOrder
      ( ..,
        SortOrder_ASCENDING,
        SortOrder_DESCENDING
      ),
  )
where

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

newtype SortOrder = SortOrder'
  { SortOrder -> Text
fromSortOrder ::
      Data.Text
  }
  deriving stock
    ( Int -> SortOrder -> ShowS
[SortOrder] -> ShowS
SortOrder -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq SortOrder
Int -> SortOrder -> Int
SortOrder -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: SortOrder -> ()
$crnf :: SortOrder -> ()
Prelude.NFData,
      Text -> Either String SortOrder
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String SortOrder
$cfromText :: Text -> Either String SortOrder
Data.FromText,
      SortOrder -> Text
forall a. (a -> Text) -> ToText a
toText :: SortOrder -> Text
$ctoText :: SortOrder -> Text
Data.ToText,
      SortOrder -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: SortOrder -> ByteString
$ctoBS :: SortOrder -> ByteString
Data.ToByteString,
      SortOrder -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: SortOrder -> ByteStringBuilder
$cbuild :: SortOrder -> ByteStringBuilder
Data.ToLog,
      HeaderName -> SortOrder -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> SortOrder -> [Header]
$ctoHeader :: HeaderName -> SortOrder -> [Header]
Data.ToHeader,
      SortOrder -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: SortOrder -> QueryString
$ctoQuery :: SortOrder -> QueryString
Data.ToQuery,
      Value -> Parser [SortOrder]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [SortOrder]
FromJSONKeyFunction SortOrder
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [SortOrder]
$cfromJSONKeyList :: FromJSONKeyFunction [SortOrder]
fromJSONKey :: FromJSONKeyFunction SortOrder
$cfromJSONKey :: FromJSONKeyFunction SortOrder
Data.FromJSONKey,
      [SortOrder] -> Encoding
[SortOrder] -> Value
SortOrder -> Encoding
SortOrder -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [SortOrder]
ToJSONKeyFunction SortOrder
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [SortOrder]
$ctoJSONKeyList :: ToJSONKeyFunction [SortOrder]
toJSONKey :: ToJSONKeyFunction SortOrder
$ctoJSONKey :: ToJSONKeyFunction SortOrder
Data.ToJSONKey,
      [Node] -> Either String SortOrder
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String SortOrder
$cparseXML :: [Node] -> Either String SortOrder
Data.FromXML,
      SortOrder -> XML
forall a. (a -> XML) -> ToXML a
toXML :: SortOrder -> XML
$ctoXML :: SortOrder -> XML
Data.ToXML
    )

pattern SortOrder_ASCENDING :: SortOrder
pattern $bSortOrder_ASCENDING :: SortOrder
$mSortOrder_ASCENDING :: forall {r}. SortOrder -> ((# #) -> r) -> ((# #) -> r) -> r
SortOrder_ASCENDING = SortOrder' "ASCENDING"

pattern SortOrder_DESCENDING :: SortOrder
pattern $bSortOrder_DESCENDING :: SortOrder
$mSortOrder_DESCENDING :: forall {r}. SortOrder -> ((# #) -> r) -> ((# #) -> r) -> r
SortOrder_DESCENDING = SortOrder' "DESCENDING"

{-# COMPLETE
  SortOrder_ASCENDING,
  SortOrder_DESCENDING,
  SortOrder'
  #-}