{-# 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.AlexaBusiness.Types.SortValue
-- 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.AlexaBusiness.Types.SortValue
  ( SortValue
      ( ..,
        SortValue_ASC,
        SortValue_DESC
      ),
  )
where

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

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

pattern SortValue_ASC :: SortValue
pattern $bSortValue_ASC :: SortValue
$mSortValue_ASC :: forall r. SortValue -> (Void# -> r) -> (Void# -> r) -> r
SortValue_ASC = SortValue' "ASC"

pattern SortValue_DESC :: SortValue
pattern $bSortValue_DESC :: SortValue
$mSortValue_DESC :: forall r. SortValue -> (Void# -> r) -> (Void# -> r) -> r
SortValue_DESC = SortValue' "DESC"

{-# COMPLETE
  SortValue_ASC,
  SortValue_DESC,
  SortValue'
  #-}