{-# 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.CloudWatchLogs.Types.OrderBy
-- 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.CloudWatchLogs.Types.OrderBy
  ( OrderBy
      ( ..,
        OrderBy_LastEventTime,
        OrderBy_LogStreamName
      ),
  )
where

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

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

pattern OrderBy_LastEventTime :: OrderBy
pattern $bOrderBy_LastEventTime :: OrderBy
$mOrderBy_LastEventTime :: forall r. OrderBy -> (Void# -> r) -> (Void# -> r) -> r
OrderBy_LastEventTime = OrderBy' "LastEventTime"

pattern OrderBy_LogStreamName :: OrderBy
pattern $bOrderBy_LogStreamName :: OrderBy
$mOrderBy_LogStreamName :: forall r. OrderBy -> (Void# -> r) -> (Void# -> r) -> r
OrderBy_LogStreamName = OrderBy' "LogStreamName"

{-# COMPLETE
  OrderBy_LastEventTime,
  OrderBy_LogStreamName,
  OrderBy'
  #-}