{-# 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.Shield.Types.ProtectionGroupAggregation
-- 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.Shield.Types.ProtectionGroupAggregation
  ( ProtectionGroupAggregation
      ( ..,
        ProtectionGroupAggregation_MAX,
        ProtectionGroupAggregation_MEAN,
        ProtectionGroupAggregation_SUM
      ),
  )
where

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

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

pattern ProtectionGroupAggregation_MAX :: ProtectionGroupAggregation
pattern $bProtectionGroupAggregation_MAX :: ProtectionGroupAggregation
$mProtectionGroupAggregation_MAX :: forall r.
ProtectionGroupAggregation -> (Void# -> r) -> (Void# -> r) -> r
ProtectionGroupAggregation_MAX = ProtectionGroupAggregation' "MAX"

pattern ProtectionGroupAggregation_MEAN :: ProtectionGroupAggregation
pattern $bProtectionGroupAggregation_MEAN :: ProtectionGroupAggregation
$mProtectionGroupAggregation_MEAN :: forall r.
ProtectionGroupAggregation -> (Void# -> r) -> (Void# -> r) -> r
ProtectionGroupAggregation_MEAN = ProtectionGroupAggregation' "MEAN"

pattern ProtectionGroupAggregation_SUM :: ProtectionGroupAggregation
pattern $bProtectionGroupAggregation_SUM :: ProtectionGroupAggregation
$mProtectionGroupAggregation_SUM :: forall r.
ProtectionGroupAggregation -> (Void# -> r) -> (Void# -> r) -> r
ProtectionGroupAggregation_SUM = ProtectionGroupAggregation' "SUM"

{-# COMPLETE
  ProtectionGroupAggregation_MAX,
  ProtectionGroupAggregation_MEAN,
  ProtectionGroupAggregation_SUM,
  ProtectionGroupAggregation'
  #-}