{-# 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.Connect.Types.Statistic
-- 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.Connect.Types.Statistic
  ( Statistic
      ( ..,
        Statistic_AVG,
        Statistic_MAX,
        Statistic_SUM
      ),
  )
where

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

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

pattern Statistic_AVG :: Statistic
pattern $bStatistic_AVG :: Statistic
$mStatistic_AVG :: forall r. Statistic -> (Void# -> r) -> (Void# -> r) -> r
Statistic_AVG = Statistic' "AVG"

pattern Statistic_MAX :: Statistic
pattern $bStatistic_MAX :: Statistic
$mStatistic_MAX :: forall r. Statistic -> (Void# -> r) -> (Void# -> r) -> r
Statistic_MAX = Statistic' "MAX"

pattern Statistic_SUM :: Statistic
pattern $bStatistic_SUM :: Statistic
$mStatistic_SUM :: forall r. Statistic -> (Void# -> r) -> (Void# -> r) -> r
Statistic_SUM = Statistic' "SUM"

{-# COMPLETE
  Statistic_AVG,
  Statistic_MAX,
  Statistic_SUM,
  Statistic'
  #-}