{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Lightsail.Types.MetricUnit
( MetricUnit
( ..,
MetricUnit_Bits,
MetricUnit_Bits_Second,
MetricUnit_Bytes,
MetricUnit_Bytes_Second,
MetricUnit_Count,
MetricUnit_Count_Second,
MetricUnit_Gigabits,
MetricUnit_Gigabits_Second,
MetricUnit_Gigabytes,
MetricUnit_Gigabytes_Second,
MetricUnit_Kilobits,
MetricUnit_Kilobits_Second,
MetricUnit_Kilobytes,
MetricUnit_Kilobytes_Second,
MetricUnit_Megabits,
MetricUnit_Megabits_Second,
MetricUnit_Megabytes,
MetricUnit_Megabytes_Second,
MetricUnit_Microseconds,
MetricUnit_Milliseconds,
MetricUnit_None,
MetricUnit_Percent,
MetricUnit_Seconds,
MetricUnit_Terabits,
MetricUnit_Terabits_Second,
MetricUnit_Terabytes,
MetricUnit_Terabytes_Second
),
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
newtype MetricUnit = MetricUnit'
{ MetricUnit -> Text
fromMetricUnit ::
Core.Text
}
deriving stock
( Int -> MetricUnit -> ShowS
[MetricUnit] -> ShowS
MetricUnit -> String
(Int -> MetricUnit -> ShowS)
-> (MetricUnit -> String)
-> ([MetricUnit] -> ShowS)
-> Show MetricUnit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MetricUnit] -> ShowS
$cshowList :: [MetricUnit] -> ShowS
show :: MetricUnit -> String
$cshow :: MetricUnit -> String
showsPrec :: Int -> MetricUnit -> ShowS
$cshowsPrec :: Int -> MetricUnit -> ShowS
Prelude.Show,
ReadPrec [MetricUnit]
ReadPrec MetricUnit
Int -> ReadS MetricUnit
ReadS [MetricUnit]
(Int -> ReadS MetricUnit)
-> ReadS [MetricUnit]
-> ReadPrec MetricUnit
-> ReadPrec [MetricUnit]
-> Read MetricUnit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MetricUnit]
$creadListPrec :: ReadPrec [MetricUnit]
readPrec :: ReadPrec MetricUnit
$creadPrec :: ReadPrec MetricUnit
readList :: ReadS [MetricUnit]
$creadList :: ReadS [MetricUnit]
readsPrec :: Int -> ReadS MetricUnit
$creadsPrec :: Int -> ReadS MetricUnit
Prelude.Read,
MetricUnit -> MetricUnit -> Bool
(MetricUnit -> MetricUnit -> Bool)
-> (MetricUnit -> MetricUnit -> Bool) -> Eq MetricUnit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetricUnit -> MetricUnit -> Bool
$c/= :: MetricUnit -> MetricUnit -> Bool
== :: MetricUnit -> MetricUnit -> Bool
$c== :: MetricUnit -> MetricUnit -> Bool
Prelude.Eq,
Eq MetricUnit
Eq MetricUnit
-> (MetricUnit -> MetricUnit -> Ordering)
-> (MetricUnit -> MetricUnit -> Bool)
-> (MetricUnit -> MetricUnit -> Bool)
-> (MetricUnit -> MetricUnit -> Bool)
-> (MetricUnit -> MetricUnit -> Bool)
-> (MetricUnit -> MetricUnit -> MetricUnit)
-> (MetricUnit -> MetricUnit -> MetricUnit)
-> Ord MetricUnit
MetricUnit -> MetricUnit -> Bool
MetricUnit -> MetricUnit -> Ordering
MetricUnit -> MetricUnit -> MetricUnit
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 :: MetricUnit -> MetricUnit -> MetricUnit
$cmin :: MetricUnit -> MetricUnit -> MetricUnit
max :: MetricUnit -> MetricUnit -> MetricUnit
$cmax :: MetricUnit -> MetricUnit -> MetricUnit
>= :: MetricUnit -> MetricUnit -> Bool
$c>= :: MetricUnit -> MetricUnit -> Bool
> :: MetricUnit -> MetricUnit -> Bool
$c> :: MetricUnit -> MetricUnit -> Bool
<= :: MetricUnit -> MetricUnit -> Bool
$c<= :: MetricUnit -> MetricUnit -> Bool
< :: MetricUnit -> MetricUnit -> Bool
$c< :: MetricUnit -> MetricUnit -> Bool
compare :: MetricUnit -> MetricUnit -> Ordering
$ccompare :: MetricUnit -> MetricUnit -> Ordering
$cp1Ord :: Eq MetricUnit
Prelude.Ord,
(forall x. MetricUnit -> Rep MetricUnit x)
-> (forall x. Rep MetricUnit x -> MetricUnit) -> Generic MetricUnit
forall x. Rep MetricUnit x -> MetricUnit
forall x. MetricUnit -> Rep MetricUnit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MetricUnit x -> MetricUnit
$cfrom :: forall x. MetricUnit -> Rep MetricUnit x
Prelude.Generic
)
deriving newtype
( Int -> MetricUnit -> Int
MetricUnit -> Int
(Int -> MetricUnit -> Int)
-> (MetricUnit -> Int) -> Hashable MetricUnit
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: MetricUnit -> Int
$chash :: MetricUnit -> Int
hashWithSalt :: Int -> MetricUnit -> Int
$chashWithSalt :: Int -> MetricUnit -> Int
Prelude.Hashable,
MetricUnit -> ()
(MetricUnit -> ()) -> NFData MetricUnit
forall a. (a -> ()) -> NFData a
rnf :: MetricUnit -> ()
$crnf :: MetricUnit -> ()
Prelude.NFData,
Text -> Either String MetricUnit
(Text -> Either String MetricUnit) -> FromText MetricUnit
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String MetricUnit
$cfromText :: Text -> Either String MetricUnit
Core.FromText,
MetricUnit -> Text
(MetricUnit -> Text) -> ToText MetricUnit
forall a. (a -> Text) -> ToText a
toText :: MetricUnit -> Text
$ctoText :: MetricUnit -> Text
Core.ToText,
MetricUnit -> ByteString
(MetricUnit -> ByteString) -> ToByteString MetricUnit
forall a. (a -> ByteString) -> ToByteString a
toBS :: MetricUnit -> ByteString
$ctoBS :: MetricUnit -> ByteString
Core.ToByteString,
MetricUnit -> ByteStringBuilder
(MetricUnit -> ByteStringBuilder) -> ToLog MetricUnit
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: MetricUnit -> ByteStringBuilder
$cbuild :: MetricUnit -> ByteStringBuilder
Core.ToLog,
HeaderName -> MetricUnit -> [Header]
(HeaderName -> MetricUnit -> [Header]) -> ToHeader MetricUnit
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> MetricUnit -> [Header]
$ctoHeader :: HeaderName -> MetricUnit -> [Header]
Core.ToHeader,
MetricUnit -> QueryString
(MetricUnit -> QueryString) -> ToQuery MetricUnit
forall a. (a -> QueryString) -> ToQuery a
toQuery :: MetricUnit -> QueryString
$ctoQuery :: MetricUnit -> QueryString
Core.ToQuery,
Value -> Parser [MetricUnit]
Value -> Parser MetricUnit
(Value -> Parser MetricUnit)
-> (Value -> Parser [MetricUnit]) -> FromJSON MetricUnit
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [MetricUnit]
$cparseJSONList :: Value -> Parser [MetricUnit]
parseJSON :: Value -> Parser MetricUnit
$cparseJSON :: Value -> Parser MetricUnit
Core.FromJSON,
FromJSONKeyFunction [MetricUnit]
FromJSONKeyFunction MetricUnit
FromJSONKeyFunction MetricUnit
-> FromJSONKeyFunction [MetricUnit] -> FromJSONKey MetricUnit
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [MetricUnit]
$cfromJSONKeyList :: FromJSONKeyFunction [MetricUnit]
fromJSONKey :: FromJSONKeyFunction MetricUnit
$cfromJSONKey :: FromJSONKeyFunction MetricUnit
Core.FromJSONKey,
[MetricUnit] -> Encoding
[MetricUnit] -> Value
MetricUnit -> Encoding
MetricUnit -> Value
(MetricUnit -> Value)
-> (MetricUnit -> Encoding)
-> ([MetricUnit] -> Value)
-> ([MetricUnit] -> Encoding)
-> ToJSON MetricUnit
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [MetricUnit] -> Encoding
$ctoEncodingList :: [MetricUnit] -> Encoding
toJSONList :: [MetricUnit] -> Value
$ctoJSONList :: [MetricUnit] -> Value
toEncoding :: MetricUnit -> Encoding
$ctoEncoding :: MetricUnit -> Encoding
toJSON :: MetricUnit -> Value
$ctoJSON :: MetricUnit -> Value
Core.ToJSON,
ToJSONKeyFunction [MetricUnit]
ToJSONKeyFunction MetricUnit
ToJSONKeyFunction MetricUnit
-> ToJSONKeyFunction [MetricUnit] -> ToJSONKey MetricUnit
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [MetricUnit]
$ctoJSONKeyList :: ToJSONKeyFunction [MetricUnit]
toJSONKey :: ToJSONKeyFunction MetricUnit
$ctoJSONKey :: ToJSONKeyFunction MetricUnit
Core.ToJSONKey,
[Node] -> Either String MetricUnit
([Node] -> Either String MetricUnit) -> FromXML MetricUnit
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String MetricUnit
$cparseXML :: [Node] -> Either String MetricUnit
Core.FromXML,
MetricUnit -> XML
(MetricUnit -> XML) -> ToXML MetricUnit
forall a. (a -> XML) -> ToXML a
toXML :: MetricUnit -> XML
$ctoXML :: MetricUnit -> XML
Core.ToXML
)
pattern MetricUnit_Bits :: MetricUnit
pattern $bMetricUnit_Bits :: MetricUnit
$mMetricUnit_Bits :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Bits = MetricUnit' "Bits"
pattern MetricUnit_Bits_Second :: MetricUnit
pattern $bMetricUnit_Bits_Second :: MetricUnit
$mMetricUnit_Bits_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Bits_Second = MetricUnit' "Bits/Second"
pattern MetricUnit_Bytes :: MetricUnit
pattern $bMetricUnit_Bytes :: MetricUnit
$mMetricUnit_Bytes :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Bytes = MetricUnit' "Bytes"
pattern MetricUnit_Bytes_Second :: MetricUnit
pattern $bMetricUnit_Bytes_Second :: MetricUnit
$mMetricUnit_Bytes_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Bytes_Second = MetricUnit' "Bytes/Second"
pattern MetricUnit_Count :: MetricUnit
pattern $bMetricUnit_Count :: MetricUnit
$mMetricUnit_Count :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Count = MetricUnit' "Count"
pattern MetricUnit_Count_Second :: MetricUnit
pattern $bMetricUnit_Count_Second :: MetricUnit
$mMetricUnit_Count_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Count_Second = MetricUnit' "Count/Second"
pattern MetricUnit_Gigabits :: MetricUnit
pattern $bMetricUnit_Gigabits :: MetricUnit
$mMetricUnit_Gigabits :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Gigabits = MetricUnit' "Gigabits"
pattern MetricUnit_Gigabits_Second :: MetricUnit
pattern $bMetricUnit_Gigabits_Second :: MetricUnit
$mMetricUnit_Gigabits_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Gigabits_Second = MetricUnit' "Gigabits/Second"
pattern MetricUnit_Gigabytes :: MetricUnit
pattern $bMetricUnit_Gigabytes :: MetricUnit
$mMetricUnit_Gigabytes :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Gigabytes = MetricUnit' "Gigabytes"
pattern MetricUnit_Gigabytes_Second :: MetricUnit
pattern $bMetricUnit_Gigabytes_Second :: MetricUnit
$mMetricUnit_Gigabytes_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Gigabytes_Second = MetricUnit' "Gigabytes/Second"
pattern MetricUnit_Kilobits :: MetricUnit
pattern $bMetricUnit_Kilobits :: MetricUnit
$mMetricUnit_Kilobits :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Kilobits = MetricUnit' "Kilobits"
pattern MetricUnit_Kilobits_Second :: MetricUnit
pattern $bMetricUnit_Kilobits_Second :: MetricUnit
$mMetricUnit_Kilobits_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Kilobits_Second = MetricUnit' "Kilobits/Second"
pattern MetricUnit_Kilobytes :: MetricUnit
pattern $bMetricUnit_Kilobytes :: MetricUnit
$mMetricUnit_Kilobytes :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Kilobytes = MetricUnit' "Kilobytes"
pattern MetricUnit_Kilobytes_Second :: MetricUnit
pattern $bMetricUnit_Kilobytes_Second :: MetricUnit
$mMetricUnit_Kilobytes_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Kilobytes_Second = MetricUnit' "Kilobytes/Second"
pattern MetricUnit_Megabits :: MetricUnit
pattern $bMetricUnit_Megabits :: MetricUnit
$mMetricUnit_Megabits :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Megabits = MetricUnit' "Megabits"
pattern MetricUnit_Megabits_Second :: MetricUnit
pattern $bMetricUnit_Megabits_Second :: MetricUnit
$mMetricUnit_Megabits_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Megabits_Second = MetricUnit' "Megabits/Second"
pattern MetricUnit_Megabytes :: MetricUnit
pattern $bMetricUnit_Megabytes :: MetricUnit
$mMetricUnit_Megabytes :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Megabytes = MetricUnit' "Megabytes"
pattern MetricUnit_Megabytes_Second :: MetricUnit
pattern $bMetricUnit_Megabytes_Second :: MetricUnit
$mMetricUnit_Megabytes_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Megabytes_Second = MetricUnit' "Megabytes/Second"
pattern MetricUnit_Microseconds :: MetricUnit
pattern $bMetricUnit_Microseconds :: MetricUnit
$mMetricUnit_Microseconds :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Microseconds = MetricUnit' "Microseconds"
pattern MetricUnit_Milliseconds :: MetricUnit
pattern $bMetricUnit_Milliseconds :: MetricUnit
$mMetricUnit_Milliseconds :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Milliseconds = MetricUnit' "Milliseconds"
pattern MetricUnit_None :: MetricUnit
pattern $bMetricUnit_None :: MetricUnit
$mMetricUnit_None :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_None = MetricUnit' "None"
pattern MetricUnit_Percent :: MetricUnit
pattern $bMetricUnit_Percent :: MetricUnit
$mMetricUnit_Percent :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Percent = MetricUnit' "Percent"
pattern MetricUnit_Seconds :: MetricUnit
pattern $bMetricUnit_Seconds :: MetricUnit
$mMetricUnit_Seconds :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Seconds = MetricUnit' "Seconds"
pattern MetricUnit_Terabits :: MetricUnit
pattern $bMetricUnit_Terabits :: MetricUnit
$mMetricUnit_Terabits :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Terabits = MetricUnit' "Terabits"
pattern MetricUnit_Terabits_Second :: MetricUnit
pattern $bMetricUnit_Terabits_Second :: MetricUnit
$mMetricUnit_Terabits_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Terabits_Second = MetricUnit' "Terabits/Second"
pattern MetricUnit_Terabytes :: MetricUnit
pattern $bMetricUnit_Terabytes :: MetricUnit
$mMetricUnit_Terabytes :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Terabytes = MetricUnit' "Terabytes"
pattern MetricUnit_Terabytes_Second :: MetricUnit
pattern $bMetricUnit_Terabytes_Second :: MetricUnit
$mMetricUnit_Terabytes_Second :: forall r. MetricUnit -> (Void# -> r) -> (Void# -> r) -> r
MetricUnit_Terabytes_Second = MetricUnit' "Terabytes/Second"
{-# COMPLETE
MetricUnit_Bits,
MetricUnit_Bits_Second,
MetricUnit_Bytes,
MetricUnit_Bytes_Second,
MetricUnit_Count,
MetricUnit_Count_Second,
MetricUnit_Gigabits,
MetricUnit_Gigabits_Second,
MetricUnit_Gigabytes,
MetricUnit_Gigabytes_Second,
MetricUnit_Kilobits,
MetricUnit_Kilobits_Second,
MetricUnit_Kilobytes,
MetricUnit_Kilobytes_Second,
MetricUnit_Megabits,
MetricUnit_Megabits_Second,
MetricUnit_Megabytes,
MetricUnit_Megabytes_Second,
MetricUnit_Microseconds,
MetricUnit_Milliseconds,
MetricUnit_None,
MetricUnit_Percent,
MetricUnit_Seconds,
MetricUnit_Terabits,
MetricUnit_Terabits_Second,
MetricUnit_Terabytes,
MetricUnit_Terabytes_Second,
MetricUnit'
#-}