{-# 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.WorkDocs.Types.OrderType
-- 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.WorkDocs.Types.OrderType
  ( OrderType
      ( ..,
        OrderType_ASCENDING,
        OrderType_DESCENDING
      ),
  )
where

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

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

pattern OrderType_ASCENDING :: OrderType
pattern $bOrderType_ASCENDING :: OrderType
$mOrderType_ASCENDING :: forall r. OrderType -> (Void# -> r) -> (Void# -> r) -> r
OrderType_ASCENDING = OrderType' "ASCENDING"

pattern OrderType_DESCENDING :: OrderType
pattern $bOrderType_DESCENDING :: OrderType
$mOrderType_DESCENDING :: forall r. OrderType -> (Void# -> r) -> (Void# -> r) -> r
OrderType_DESCENDING = OrderType' "DESCENDING"

{-# COMPLETE
  OrderType_ASCENDING,
  OrderType_DESCENDING,
  OrderType'
  #-}