{-# 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.SESV2.Types.Metric
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SESV2.Types.Metric
  ( Metric
      ( ..,
        Metric_CLICK,
        Metric_COMPLAINT,
        Metric_DELIVERY,
        Metric_DELIVERY_CLICK,
        Metric_DELIVERY_COMPLAINT,
        Metric_DELIVERY_OPEN,
        Metric_OPEN,
        Metric_PERMANENT_BOUNCE,
        Metric_SEND,
        Metric_TRANSIENT_BOUNCE
      ),
  )
where

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

newtype Metric = Metric' {Metric -> Text
fromMetric :: Data.Text}
  deriving stock
    ( Int -> Metric -> ShowS
[Metric] -> ShowS
Metric -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq Metric
Int -> Metric -> Int
Metric -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: Metric -> ()
$crnf :: Metric -> ()
Prelude.NFData,
      Text -> Either String Metric
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String Metric
$cfromText :: Text -> Either String Metric
Data.FromText,
      Metric -> Text
forall a. (a -> Text) -> ToText a
toText :: Metric -> Text
$ctoText :: Metric -> Text
Data.ToText,
      Metric -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: Metric -> ByteString
$ctoBS :: Metric -> ByteString
Data.ToByteString,
      Metric -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: Metric -> ByteStringBuilder
$cbuild :: Metric -> ByteStringBuilder
Data.ToLog,
      HeaderName -> Metric -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> Metric -> [Header]
$ctoHeader :: HeaderName -> Metric -> [Header]
Data.ToHeader,
      Metric -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: Metric -> QueryString
$ctoQuery :: Metric -> QueryString
Data.ToQuery,
      Value -> Parser [Metric]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [Metric]
FromJSONKeyFunction Metric
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [Metric]
$cfromJSONKeyList :: FromJSONKeyFunction [Metric]
fromJSONKey :: FromJSONKeyFunction Metric
$cfromJSONKey :: FromJSONKeyFunction Metric
Data.FromJSONKey,
      [Metric] -> Encoding
[Metric] -> Value
Metric -> Encoding
Metric -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [Metric]
ToJSONKeyFunction Metric
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [Metric]
$ctoJSONKeyList :: ToJSONKeyFunction [Metric]
toJSONKey :: ToJSONKeyFunction Metric
$ctoJSONKey :: ToJSONKeyFunction Metric
Data.ToJSONKey,
      [Node] -> Either String Metric
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String Metric
$cparseXML :: [Node] -> Either String Metric
Data.FromXML,
      Metric -> XML
forall a. (a -> XML) -> ToXML a
toXML :: Metric -> XML
$ctoXML :: Metric -> XML
Data.ToXML
    )

pattern Metric_CLICK :: Metric
pattern $bMetric_CLICK :: Metric
$mMetric_CLICK :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_CLICK = Metric' "CLICK"

pattern Metric_COMPLAINT :: Metric
pattern $bMetric_COMPLAINT :: Metric
$mMetric_COMPLAINT :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_COMPLAINT = Metric' "COMPLAINT"

pattern Metric_DELIVERY :: Metric
pattern $bMetric_DELIVERY :: Metric
$mMetric_DELIVERY :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_DELIVERY = Metric' "DELIVERY"

pattern Metric_DELIVERY_CLICK :: Metric
pattern $bMetric_DELIVERY_CLICK :: Metric
$mMetric_DELIVERY_CLICK :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_DELIVERY_CLICK = Metric' "DELIVERY_CLICK"

pattern Metric_DELIVERY_COMPLAINT :: Metric
pattern $bMetric_DELIVERY_COMPLAINT :: Metric
$mMetric_DELIVERY_COMPLAINT :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_DELIVERY_COMPLAINT = Metric' "DELIVERY_COMPLAINT"

pattern Metric_DELIVERY_OPEN :: Metric
pattern $bMetric_DELIVERY_OPEN :: Metric
$mMetric_DELIVERY_OPEN :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_DELIVERY_OPEN = Metric' "DELIVERY_OPEN"

pattern Metric_OPEN :: Metric
pattern $bMetric_OPEN :: Metric
$mMetric_OPEN :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_OPEN = Metric' "OPEN"

pattern Metric_PERMANENT_BOUNCE :: Metric
pattern $bMetric_PERMANENT_BOUNCE :: Metric
$mMetric_PERMANENT_BOUNCE :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_PERMANENT_BOUNCE = Metric' "PERMANENT_BOUNCE"

pattern Metric_SEND :: Metric
pattern $bMetric_SEND :: Metric
$mMetric_SEND :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_SEND = Metric' "SEND"

pattern Metric_TRANSIENT_BOUNCE :: Metric
pattern $bMetric_TRANSIENT_BOUNCE :: Metric
$mMetric_TRANSIENT_BOUNCE :: forall {r}. Metric -> ((# #) -> r) -> ((# #) -> r) -> r
Metric_TRANSIENT_BOUNCE = Metric' "TRANSIENT_BOUNCE"

{-# COMPLETE
  Metric_CLICK,
  Metric_COMPLAINT,
  Metric_DELIVERY,
  Metric_DELIVERY_CLICK,
  Metric_DELIVERY_COMPLAINT,
  Metric_DELIVERY_OPEN,
  Metric_OPEN,
  Metric_PERMANENT_BOUNCE,
  Metric_SEND,
  Metric_TRANSIENT_BOUNCE,
  Metric'
  #-}