{-# 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.CostExplorer.Types.Metric
-- 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.CostExplorer.Types.Metric
  ( Metric
      ( ..,
        Metric_AMORTIZED_COST,
        Metric_BLENDED_COST,
        Metric_NET_AMORTIZED_COST,
        Metric_NET_UNBLENDED_COST,
        Metric_NORMALIZED_USAGE_AMOUNT,
        Metric_UNBLENDED_COST,
        Metric_USAGE_QUANTITY
      ),
  )
where

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

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

pattern Metric_AMORTIZED_COST :: Metric
pattern $bMetric_AMORTIZED_COST :: Metric
$mMetric_AMORTIZED_COST :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_AMORTIZED_COST = Metric' "AMORTIZED_COST"

pattern Metric_BLENDED_COST :: Metric
pattern $bMetric_BLENDED_COST :: Metric
$mMetric_BLENDED_COST :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_BLENDED_COST = Metric' "BLENDED_COST"

pattern Metric_NET_AMORTIZED_COST :: Metric
pattern $bMetric_NET_AMORTIZED_COST :: Metric
$mMetric_NET_AMORTIZED_COST :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_NET_AMORTIZED_COST = Metric' "NET_AMORTIZED_COST"

pattern Metric_NET_UNBLENDED_COST :: Metric
pattern $bMetric_NET_UNBLENDED_COST :: Metric
$mMetric_NET_UNBLENDED_COST :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_NET_UNBLENDED_COST = Metric' "NET_UNBLENDED_COST"

pattern Metric_NORMALIZED_USAGE_AMOUNT :: Metric
pattern $bMetric_NORMALIZED_USAGE_AMOUNT :: Metric
$mMetric_NORMALIZED_USAGE_AMOUNT :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_NORMALIZED_USAGE_AMOUNT = Metric' "NORMALIZED_USAGE_AMOUNT"

pattern Metric_UNBLENDED_COST :: Metric
pattern $bMetric_UNBLENDED_COST :: Metric
$mMetric_UNBLENDED_COST :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_UNBLENDED_COST = Metric' "UNBLENDED_COST"

pattern Metric_USAGE_QUANTITY :: Metric
pattern $bMetric_USAGE_QUANTITY :: Metric
$mMetric_USAGE_QUANTITY :: forall r. Metric -> (Void# -> r) -> (Void# -> r) -> r
Metric_USAGE_QUANTITY = Metric' "USAGE_QUANTITY"

{-# COMPLETE
  Metric_AMORTIZED_COST,
  Metric_BLENDED_COST,
  Metric_NET_AMORTIZED_COST,
  Metric_NET_UNBLENDED_COST,
  Metric_NORMALIZED_USAGE_AMOUNT,
  Metric_UNBLENDED_COST,
  Metric_USAGE_QUANTITY,
  Metric'
  #-}