{-# 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.AutoScalingPlans.Types.ScalingMetricType
-- 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.AutoScalingPlans.Types.ScalingMetricType
  ( ScalingMetricType
      ( ..,
        ScalingMetricType_ALBRequestCountPerTarget,
        ScalingMetricType_ASGAverageCPUUtilization,
        ScalingMetricType_ASGAverageNetworkIn,
        ScalingMetricType_ASGAverageNetworkOut,
        ScalingMetricType_DynamoDBReadCapacityUtilization,
        ScalingMetricType_DynamoDBWriteCapacityUtilization,
        ScalingMetricType_EC2SpotFleetRequestAverageCPUUtilization,
        ScalingMetricType_EC2SpotFleetRequestAverageNetworkIn,
        ScalingMetricType_EC2SpotFleetRequestAverageNetworkOut,
        ScalingMetricType_ECSServiceAverageCPUUtilization,
        ScalingMetricType_ECSServiceAverageMemoryUtilization,
        ScalingMetricType_RDSReaderAverageCPUUtilization,
        ScalingMetricType_RDSReaderAverageDatabaseConnections
      ),
  )
where

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

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

pattern ScalingMetricType_ALBRequestCountPerTarget :: ScalingMetricType
pattern $bScalingMetricType_ALBRequestCountPerTarget :: ScalingMetricType
$mScalingMetricType_ALBRequestCountPerTarget :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_ALBRequestCountPerTarget = ScalingMetricType' "ALBRequestCountPerTarget"

pattern ScalingMetricType_ASGAverageCPUUtilization :: ScalingMetricType
pattern $bScalingMetricType_ASGAverageCPUUtilization :: ScalingMetricType
$mScalingMetricType_ASGAverageCPUUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_ASGAverageCPUUtilization = ScalingMetricType' "ASGAverageCPUUtilization"

pattern ScalingMetricType_ASGAverageNetworkIn :: ScalingMetricType
pattern $bScalingMetricType_ASGAverageNetworkIn :: ScalingMetricType
$mScalingMetricType_ASGAverageNetworkIn :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_ASGAverageNetworkIn = ScalingMetricType' "ASGAverageNetworkIn"

pattern ScalingMetricType_ASGAverageNetworkOut :: ScalingMetricType
pattern $bScalingMetricType_ASGAverageNetworkOut :: ScalingMetricType
$mScalingMetricType_ASGAverageNetworkOut :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_ASGAverageNetworkOut = ScalingMetricType' "ASGAverageNetworkOut"

pattern ScalingMetricType_DynamoDBReadCapacityUtilization :: ScalingMetricType
pattern $bScalingMetricType_DynamoDBReadCapacityUtilization :: ScalingMetricType
$mScalingMetricType_DynamoDBReadCapacityUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_DynamoDBReadCapacityUtilization = ScalingMetricType' "DynamoDBReadCapacityUtilization"

pattern ScalingMetricType_DynamoDBWriteCapacityUtilization :: ScalingMetricType
pattern $bScalingMetricType_DynamoDBWriteCapacityUtilization :: ScalingMetricType
$mScalingMetricType_DynamoDBWriteCapacityUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_DynamoDBWriteCapacityUtilization = ScalingMetricType' "DynamoDBWriteCapacityUtilization"

pattern ScalingMetricType_EC2SpotFleetRequestAverageCPUUtilization :: ScalingMetricType
pattern $bScalingMetricType_EC2SpotFleetRequestAverageCPUUtilization :: ScalingMetricType
$mScalingMetricType_EC2SpotFleetRequestAverageCPUUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_EC2SpotFleetRequestAverageCPUUtilization = ScalingMetricType' "EC2SpotFleetRequestAverageCPUUtilization"

pattern ScalingMetricType_EC2SpotFleetRequestAverageNetworkIn :: ScalingMetricType
pattern $bScalingMetricType_EC2SpotFleetRequestAverageNetworkIn :: ScalingMetricType
$mScalingMetricType_EC2SpotFleetRequestAverageNetworkIn :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_EC2SpotFleetRequestAverageNetworkIn = ScalingMetricType' "EC2SpotFleetRequestAverageNetworkIn"

pattern ScalingMetricType_EC2SpotFleetRequestAverageNetworkOut :: ScalingMetricType
pattern $bScalingMetricType_EC2SpotFleetRequestAverageNetworkOut :: ScalingMetricType
$mScalingMetricType_EC2SpotFleetRequestAverageNetworkOut :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_EC2SpotFleetRequestAverageNetworkOut = ScalingMetricType' "EC2SpotFleetRequestAverageNetworkOut"

pattern ScalingMetricType_ECSServiceAverageCPUUtilization :: ScalingMetricType
pattern $bScalingMetricType_ECSServiceAverageCPUUtilization :: ScalingMetricType
$mScalingMetricType_ECSServiceAverageCPUUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_ECSServiceAverageCPUUtilization = ScalingMetricType' "ECSServiceAverageCPUUtilization"

pattern ScalingMetricType_ECSServiceAverageMemoryUtilization :: ScalingMetricType
pattern $bScalingMetricType_ECSServiceAverageMemoryUtilization :: ScalingMetricType
$mScalingMetricType_ECSServiceAverageMemoryUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_ECSServiceAverageMemoryUtilization = ScalingMetricType' "ECSServiceAverageMemoryUtilization"

pattern ScalingMetricType_RDSReaderAverageCPUUtilization :: ScalingMetricType
pattern $bScalingMetricType_RDSReaderAverageCPUUtilization :: ScalingMetricType
$mScalingMetricType_RDSReaderAverageCPUUtilization :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_RDSReaderAverageCPUUtilization = ScalingMetricType' "RDSReaderAverageCPUUtilization"

pattern ScalingMetricType_RDSReaderAverageDatabaseConnections :: ScalingMetricType
pattern $bScalingMetricType_RDSReaderAverageDatabaseConnections :: ScalingMetricType
$mScalingMetricType_RDSReaderAverageDatabaseConnections :: forall r. ScalingMetricType -> (Void# -> r) -> (Void# -> r) -> r
ScalingMetricType_RDSReaderAverageDatabaseConnections = ScalingMetricType' "RDSReaderAverageDatabaseConnections"

{-# COMPLETE
  ScalingMetricType_ALBRequestCountPerTarget,
  ScalingMetricType_ASGAverageCPUUtilization,
  ScalingMetricType_ASGAverageNetworkIn,
  ScalingMetricType_ASGAverageNetworkOut,
  ScalingMetricType_DynamoDBReadCapacityUtilization,
  ScalingMetricType_DynamoDBWriteCapacityUtilization,
  ScalingMetricType_EC2SpotFleetRequestAverageCPUUtilization,
  ScalingMetricType_EC2SpotFleetRequestAverageNetworkIn,
  ScalingMetricType_EC2SpotFleetRequestAverageNetworkOut,
  ScalingMetricType_ECSServiceAverageCPUUtilization,
  ScalingMetricType_ECSServiceAverageMemoryUtilization,
  ScalingMetricType_RDSReaderAverageCPUUtilization,
  ScalingMetricType_RDSReaderAverageDatabaseConnections,
  ScalingMetricType'
  #-}