{-# 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.CloudWatch.Types.ScanBy
-- 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.CloudWatch.Types.ScanBy
  ( ScanBy
      ( ..,
        ScanBy_TimestampAscending,
        ScanBy_TimestampDescending
      ),
  )
where

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

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

pattern ScanBy_TimestampAscending :: ScanBy
pattern $bScanBy_TimestampAscending :: ScanBy
$mScanBy_TimestampAscending :: forall r. ScanBy -> (Void# -> r) -> (Void# -> r) -> r
ScanBy_TimestampAscending = ScanBy' "TimestampAscending"

pattern ScanBy_TimestampDescending :: ScanBy
pattern $bScanBy_TimestampDescending :: ScanBy
$mScanBy_TimestampDescending :: forall r. ScanBy -> (Void# -> r) -> (Void# -> r) -> r
ScanBy_TimestampDescending = ScanBy' "TimestampDescending"

{-# COMPLETE
  ScanBy_TimestampAscending,
  ScanBy_TimestampDescending,
  ScanBy'
  #-}