{-# 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.IVS.Types.StreamHealth
-- 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.IVS.Types.StreamHealth
  ( StreamHealth
      ( ..,
        StreamHealth_HEALTHY,
        StreamHealth_STARVING,
        StreamHealth_UNKNOWN
      ),
  )
where

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

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

pattern StreamHealth_HEALTHY :: StreamHealth
pattern $bStreamHealth_HEALTHY :: StreamHealth
$mStreamHealth_HEALTHY :: forall r. StreamHealth -> (Void# -> r) -> (Void# -> r) -> r
StreamHealth_HEALTHY = StreamHealth' "HEALTHY"

pattern StreamHealth_STARVING :: StreamHealth
pattern $bStreamHealth_STARVING :: StreamHealth
$mStreamHealth_STARVING :: forall r. StreamHealth -> (Void# -> r) -> (Void# -> r) -> r
StreamHealth_STARVING = StreamHealth' "STARVING"

pattern StreamHealth_UNKNOWN :: StreamHealth
pattern $bStreamHealth_UNKNOWN :: StreamHealth
$mStreamHealth_UNKNOWN :: forall r. StreamHealth -> (Void# -> r) -> (Void# -> r) -> r
StreamHealth_UNKNOWN = StreamHealth' "UNKNOWN"

{-# COMPLETE
  StreamHealth_HEALTHY,
  StreamHealth_STARVING,
  StreamHealth_UNKNOWN,
  StreamHealth'
  #-}