{-# 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.DateAggregationFunction
-- 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.DateAggregationFunction
  ( DateAggregationFunction
      ( ..,
        DateAggregationFunction_COUNT,
        DateAggregationFunction_DISTINCT_COUNT,
        DateAggregationFunction_MAX,
        DateAggregationFunction_MIN
      ),
  )
where

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

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

pattern DateAggregationFunction_COUNT :: DateAggregationFunction
pattern $bDateAggregationFunction_COUNT :: DateAggregationFunction
$mDateAggregationFunction_COUNT :: forall {r}.
DateAggregationFunction -> ((# #) -> r) -> ((# #) -> r) -> r
DateAggregationFunction_COUNT = DateAggregationFunction' "COUNT"

pattern DateAggregationFunction_DISTINCT_COUNT :: DateAggregationFunction
pattern $bDateAggregationFunction_DISTINCT_COUNT :: DateAggregationFunction
$mDateAggregationFunction_DISTINCT_COUNT :: forall {r}.
DateAggregationFunction -> ((# #) -> r) -> ((# #) -> r) -> r
DateAggregationFunction_DISTINCT_COUNT = DateAggregationFunction' "DISTINCT_COUNT"

pattern DateAggregationFunction_MAX :: DateAggregationFunction
pattern $bDateAggregationFunction_MAX :: DateAggregationFunction
$mDateAggregationFunction_MAX :: forall {r}.
DateAggregationFunction -> ((# #) -> r) -> ((# #) -> r) -> r
DateAggregationFunction_MAX = DateAggregationFunction' "MAX"

pattern DateAggregationFunction_MIN :: DateAggregationFunction
pattern $bDateAggregationFunction_MIN :: DateAggregationFunction
$mDateAggregationFunction_MIN :: forall {r}.
DateAggregationFunction -> ((# #) -> r) -> ((# #) -> r) -> r
DateAggregationFunction_MIN = DateAggregationFunction' "MIN"

{-# COMPLETE
  DateAggregationFunction_COUNT,
  DateAggregationFunction_DISTINCT_COUNT,
  DateAggregationFunction_MAX,
  DateAggregationFunction_MIN,
  DateAggregationFunction'
  #-}