{-# 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.QuickSight.Types.ComparisonMethod
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.QuickSight.Types.ComparisonMethod
  ( ComparisonMethod
      ( ..,
        ComparisonMethod_DIFFERENCE,
        ComparisonMethod_PERCENT,
        ComparisonMethod_PERCENT_DIFFERENCE
      ),
  )
where

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

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

pattern ComparisonMethod_DIFFERENCE :: ComparisonMethod
pattern $bComparisonMethod_DIFFERENCE :: ComparisonMethod
$mComparisonMethod_DIFFERENCE :: forall {r}. ComparisonMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ComparisonMethod_DIFFERENCE = ComparisonMethod' "DIFFERENCE"

pattern ComparisonMethod_PERCENT :: ComparisonMethod
pattern $bComparisonMethod_PERCENT :: ComparisonMethod
$mComparisonMethod_PERCENT :: forall {r}. ComparisonMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ComparisonMethod_PERCENT = ComparisonMethod' "PERCENT"

pattern ComparisonMethod_PERCENT_DIFFERENCE :: ComparisonMethod
pattern $bComparisonMethod_PERCENT_DIFFERENCE :: ComparisonMethod
$mComparisonMethod_PERCENT_DIFFERENCE :: forall {r}. ComparisonMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ComparisonMethod_PERCENT_DIFFERENCE = ComparisonMethod' "PERCENT_DIFFERENCE"

{-# COMPLETE
  ComparisonMethod_DIFFERENCE,
  ComparisonMethod_PERCENT,
  ComparisonMethod_PERCENT_DIFFERENCE,
  ComparisonMethod'
  #-}