{-# 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.CodeCommit.Types.OrderEnum
-- 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.CodeCommit.Types.OrderEnum
  ( OrderEnum
      ( ..,
        OrderEnum_Ascending,
        OrderEnum_Descending
      ),
  )
where

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

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

pattern OrderEnum_Ascending :: OrderEnum
pattern $bOrderEnum_Ascending :: OrderEnum
$mOrderEnum_Ascending :: forall r. OrderEnum -> (Void# -> r) -> (Void# -> r) -> r
OrderEnum_Ascending = OrderEnum' "ascending"

pattern OrderEnum_Descending :: OrderEnum
pattern $bOrderEnum_Descending :: OrderEnum
$mOrderEnum_Descending :: forall r. OrderEnum -> (Void# -> r) -> (Void# -> r) -> r
OrderEnum_Descending = OrderEnum' "descending"

{-# COMPLETE
  OrderEnum_Ascending,
  OrderEnum_Descending,
  OrderEnum'
  #-}