{-# 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.IoTSiteWise.Types.TimeOrdering
-- 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.IoTSiteWise.Types.TimeOrdering
  ( TimeOrdering
      ( ..,
        TimeOrdering_ASCENDING,
        TimeOrdering_DESCENDING
      ),
  )
where

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

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

pattern TimeOrdering_ASCENDING :: TimeOrdering
pattern $bTimeOrdering_ASCENDING :: TimeOrdering
$mTimeOrdering_ASCENDING :: forall r. TimeOrdering -> (Void# -> r) -> (Void# -> r) -> r
TimeOrdering_ASCENDING = TimeOrdering' "ASCENDING"

pattern TimeOrdering_DESCENDING :: TimeOrdering
pattern $bTimeOrdering_DESCENDING :: TimeOrdering
$mTimeOrdering_DESCENDING :: forall r. TimeOrdering -> (Void# -> r) -> (Void# -> r) -> r
TimeOrdering_DESCENDING = TimeOrdering' "DESCENDING"

{-# COMPLETE
  TimeOrdering_ASCENDING,
  TimeOrdering_DESCENDING,
  TimeOrdering'
  #-}