{-# 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.Lightsail.Types.DistributionMetricName
-- 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.Lightsail.Types.DistributionMetricName
  ( DistributionMetricName
      ( ..,
        DistributionMetricName_BytesDownloaded,
        DistributionMetricName_BytesUploaded,
        DistributionMetricName_Http4xxErrorRate,
        DistributionMetricName_Http5xxErrorRate,
        DistributionMetricName_Requests,
        DistributionMetricName_TotalErrorRate
      ),
  )
where

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

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

pattern DistributionMetricName_BytesDownloaded :: DistributionMetricName
pattern $bDistributionMetricName_BytesDownloaded :: DistributionMetricName
$mDistributionMetricName_BytesDownloaded :: forall r.
DistributionMetricName -> (Void# -> r) -> (Void# -> r) -> r
DistributionMetricName_BytesDownloaded = DistributionMetricName' "BytesDownloaded"

pattern DistributionMetricName_BytesUploaded :: DistributionMetricName
pattern $bDistributionMetricName_BytesUploaded :: DistributionMetricName
$mDistributionMetricName_BytesUploaded :: forall r.
DistributionMetricName -> (Void# -> r) -> (Void# -> r) -> r
DistributionMetricName_BytesUploaded = DistributionMetricName' "BytesUploaded"

pattern DistributionMetricName_Http4xxErrorRate :: DistributionMetricName
pattern $bDistributionMetricName_Http4xxErrorRate :: DistributionMetricName
$mDistributionMetricName_Http4xxErrorRate :: forall r.
DistributionMetricName -> (Void# -> r) -> (Void# -> r) -> r
DistributionMetricName_Http4xxErrorRate = DistributionMetricName' "Http4xxErrorRate"

pattern DistributionMetricName_Http5xxErrorRate :: DistributionMetricName
pattern $bDistributionMetricName_Http5xxErrorRate :: DistributionMetricName
$mDistributionMetricName_Http5xxErrorRate :: forall r.
DistributionMetricName -> (Void# -> r) -> (Void# -> r) -> r
DistributionMetricName_Http5xxErrorRate = DistributionMetricName' "Http5xxErrorRate"

pattern DistributionMetricName_Requests :: DistributionMetricName
pattern $bDistributionMetricName_Requests :: DistributionMetricName
$mDistributionMetricName_Requests :: forall r.
DistributionMetricName -> (Void# -> r) -> (Void# -> r) -> r
DistributionMetricName_Requests = DistributionMetricName' "Requests"

pattern DistributionMetricName_TotalErrorRate :: DistributionMetricName
pattern $bDistributionMetricName_TotalErrorRate :: DistributionMetricName
$mDistributionMetricName_TotalErrorRate :: forall r.
DistributionMetricName -> (Void# -> r) -> (Void# -> r) -> r
DistributionMetricName_TotalErrorRate = DistributionMetricName' "TotalErrorRate"

{-# COMPLETE
  DistributionMetricName_BytesDownloaded,
  DistributionMetricName_BytesUploaded,
  DistributionMetricName_Http4xxErrorRate,
  DistributionMetricName_Http5xxErrorRate,
  DistributionMetricName_Requests,
  DistributionMetricName_TotalErrorRate,
  DistributionMetricName'
  #-}