{-# 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.CategoricalAggregationFunction
-- 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.CategoricalAggregationFunction
  ( CategoricalAggregationFunction
      ( ..,
        CategoricalAggregationFunction_COUNT,
        CategoricalAggregationFunction_DISTINCT_COUNT
      ),
  )
where

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

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

pattern CategoricalAggregationFunction_COUNT :: CategoricalAggregationFunction
pattern $bCategoricalAggregationFunction_COUNT :: CategoricalAggregationFunction
$mCategoricalAggregationFunction_COUNT :: forall {r}.
CategoricalAggregationFunction -> ((# #) -> r) -> ((# #) -> r) -> r
CategoricalAggregationFunction_COUNT = CategoricalAggregationFunction' "COUNT"

pattern CategoricalAggregationFunction_DISTINCT_COUNT :: CategoricalAggregationFunction
pattern $bCategoricalAggregationFunction_DISTINCT_COUNT :: CategoricalAggregationFunction
$mCategoricalAggregationFunction_DISTINCT_COUNT :: forall {r}.
CategoricalAggregationFunction -> ((# #) -> r) -> ((# #) -> r) -> r
CategoricalAggregationFunction_DISTINCT_COUNT = CategoricalAggregationFunction' "DISTINCT_COUNT"

{-# COMPLETE
  CategoricalAggregationFunction_COUNT,
  CategoricalAggregationFunction_DISTINCT_COUNT,
  CategoricalAggregationFunction'
  #-}