{-# 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.IoTSiteWise.Types.AggregateType
-- 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.IoTSiteWise.Types.AggregateType
  ( AggregateType
      ( ..,
        AggregateType_AVERAGE,
        AggregateType_COUNT,
        AggregateType_MAXIMUM,
        AggregateType_MINIMUM,
        AggregateType_STANDARD_DEVIATION,
        AggregateType_SUM
      ),
  )
where

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

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

pattern AggregateType_AVERAGE :: AggregateType
pattern $bAggregateType_AVERAGE :: AggregateType
$mAggregateType_AVERAGE :: forall r. AggregateType -> (Void# -> r) -> (Void# -> r) -> r
AggregateType_AVERAGE = AggregateType' "AVERAGE"

pattern AggregateType_COUNT :: AggregateType
pattern $bAggregateType_COUNT :: AggregateType
$mAggregateType_COUNT :: forall r. AggregateType -> (Void# -> r) -> (Void# -> r) -> r
AggregateType_COUNT = AggregateType' "COUNT"

pattern AggregateType_MAXIMUM :: AggregateType
pattern $bAggregateType_MAXIMUM :: AggregateType
$mAggregateType_MAXIMUM :: forall r. AggregateType -> (Void# -> r) -> (Void# -> r) -> r
AggregateType_MAXIMUM = AggregateType' "MAXIMUM"

pattern AggregateType_MINIMUM :: AggregateType
pattern $bAggregateType_MINIMUM :: AggregateType
$mAggregateType_MINIMUM :: forall r. AggregateType -> (Void# -> r) -> (Void# -> r) -> r
AggregateType_MINIMUM = AggregateType' "MINIMUM"

pattern AggregateType_STANDARD_DEVIATION :: AggregateType
pattern $bAggregateType_STANDARD_DEVIATION :: AggregateType
$mAggregateType_STANDARD_DEVIATION :: forall r. AggregateType -> (Void# -> r) -> (Void# -> r) -> r
AggregateType_STANDARD_DEVIATION = AggregateType' "STANDARD_DEVIATION"

pattern AggregateType_SUM :: AggregateType
pattern $bAggregateType_SUM :: AggregateType
$mAggregateType_SUM :: forall r. AggregateType -> (Void# -> r) -> (Void# -> r) -> r
AggregateType_SUM = AggregateType' "SUM"

{-# COMPLETE
  AggregateType_AVERAGE,
  AggregateType_COUNT,
  AggregateType_MAXIMUM,
  AggregateType_MINIMUM,
  AggregateType_STANDARD_DEVIATION,
  AggregateType_SUM,
  AggregateType'
  #-}