{-# 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.CloudWatch.Types.MetricStreamOutputFormat
-- 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.CloudWatch.Types.MetricStreamOutputFormat
  ( MetricStreamOutputFormat
      ( ..,
        MetricStreamOutputFormat_Json,
        MetricStreamOutputFormat_Opentelemetry0_7
      ),
  )
where

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

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

pattern MetricStreamOutputFormat_Json :: MetricStreamOutputFormat
pattern $bMetricStreamOutputFormat_Json :: MetricStreamOutputFormat
$mMetricStreamOutputFormat_Json :: forall r.
MetricStreamOutputFormat -> (Void# -> r) -> (Void# -> r) -> r
MetricStreamOutputFormat_Json = MetricStreamOutputFormat' "json"

pattern MetricStreamOutputFormat_Opentelemetry0_7 :: MetricStreamOutputFormat
pattern $bMetricStreamOutputFormat_Opentelemetry0_7 :: MetricStreamOutputFormat
$mMetricStreamOutputFormat_Opentelemetry0_7 :: forall r.
MetricStreamOutputFormat -> (Void# -> r) -> (Void# -> r) -> r
MetricStreamOutputFormat_Opentelemetry0_7 = MetricStreamOutputFormat' "opentelemetry0.7"

{-# COMPLETE
  MetricStreamOutputFormat_Json,
  MetricStreamOutputFormat_Opentelemetry0_7,
  MetricStreamOutputFormat'
  #-}