{-# 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.ConnectParticipant.Types.SortKey
-- 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.ConnectParticipant.Types.SortKey
  ( SortKey
      ( ..,
        SortKey_ASCENDING,
        SortKey_DESCENDING
      ),
  )
where

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

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

pattern SortKey_ASCENDING :: SortKey
pattern $bSortKey_ASCENDING :: SortKey
$mSortKey_ASCENDING :: forall {r}. SortKey -> ((# #) -> r) -> ((# #) -> r) -> r
SortKey_ASCENDING = SortKey' "ASCENDING"

pattern SortKey_DESCENDING :: SortKey
pattern $bSortKey_DESCENDING :: SortKey
$mSortKey_DESCENDING :: forall {r}. SortKey -> ((# #) -> r) -> ((# #) -> r) -> r
SortKey_DESCENDING = SortKey' "DESCENDING"

{-# COMPLETE
  SortKey_ASCENDING,
  SortKey_DESCENDING,
  SortKey'
  #-}