{-# 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.Discovery.Types.OrderString
-- 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.Discovery.Types.OrderString
  ( OrderString
      ( ..,
        OrderString_ASC,
        OrderString_DESC
      ),
  )
where

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

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

pattern OrderString_ASC :: OrderString
pattern $bOrderString_ASC :: OrderString
$mOrderString_ASC :: forall r. OrderString -> (Void# -> r) -> (Void# -> r) -> r
OrderString_ASC = OrderString' "ASC"

pattern OrderString_DESC :: OrderString
pattern $bOrderString_DESC :: OrderString
$mOrderString_DESC :: forall r. OrderString -> (Void# -> r) -> (Void# -> r) -> r
OrderString_DESC = OrderString' "DESC"

{-# COMPLETE
  OrderString_ASC,
  OrderString_DESC,
  OrderString'
  #-}