{-# 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.ApplicationAutoScaling.Types.MetricAggregationType
-- 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.ApplicationAutoScaling.Types.MetricAggregationType
  ( MetricAggregationType
      ( ..,
        MetricAggregationType_Average,
        MetricAggregationType_Maximum,
        MetricAggregationType_Minimum
      ),
  )
where

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

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

pattern MetricAggregationType_Average :: MetricAggregationType
pattern $bMetricAggregationType_Average :: MetricAggregationType
$mMetricAggregationType_Average :: forall r.
MetricAggregationType -> (Void# -> r) -> (Void# -> r) -> r
MetricAggregationType_Average = MetricAggregationType' "Average"

pattern MetricAggregationType_Maximum :: MetricAggregationType
pattern $bMetricAggregationType_Maximum :: MetricAggregationType
$mMetricAggregationType_Maximum :: forall r.
MetricAggregationType -> (Void# -> r) -> (Void# -> r) -> r
MetricAggregationType_Maximum = MetricAggregationType' "Maximum"

pattern MetricAggregationType_Minimum :: MetricAggregationType
pattern $bMetricAggregationType_Minimum :: MetricAggregationType
$mMetricAggregationType_Minimum :: forall r.
MetricAggregationType -> (Void# -> r) -> (Void# -> r) -> r
MetricAggregationType_Minimum = MetricAggregationType' "Minimum"

{-# COMPLETE
  MetricAggregationType_Average,
  MetricAggregationType_Maximum,
  MetricAggregationType_Minimum,
  MetricAggregationType'
  #-}