{-# 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.LexV2Models.Types.SearchOrder
-- 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.LexV2Models.Types.SearchOrder
  ( SearchOrder
      ( ..,
        SearchOrder_Ascending,
        SearchOrder_Descending
      ),
  )
where

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

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

pattern SearchOrder_Ascending :: SearchOrder
pattern $bSearchOrder_Ascending :: SearchOrder
$mSearchOrder_Ascending :: forall {r}. SearchOrder -> ((# #) -> r) -> ((# #) -> r) -> r
SearchOrder_Ascending = SearchOrder' "Ascending"

pattern SearchOrder_Descending :: SearchOrder
pattern $bSearchOrder_Descending :: SearchOrder
$mSearchOrder_Descending :: forall {r}. SearchOrder -> ((# #) -> r) -> ((# #) -> r) -> r
SearchOrder_Descending = SearchOrder' "Descending"

{-# COMPLETE
  SearchOrder_Ascending,
  SearchOrder_Descending,
  SearchOrder'
  #-}