{-# 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.StreamState
-- 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.StreamState
  ( StreamState
      ( ..,
        StreamState_LIVE,
        StreamState_OFFLINE
      ),
  )
where

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

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

pattern StreamState_LIVE :: StreamState
pattern $bStreamState_LIVE :: StreamState
$mStreamState_LIVE :: forall r. StreamState -> (Void# -> r) -> (Void# -> r) -> r
StreamState_LIVE = StreamState' "LIVE"

pattern StreamState_OFFLINE :: StreamState
pattern $bStreamState_OFFLINE :: StreamState
$mStreamState_OFFLINE :: forall r. StreamState -> (Void# -> r) -> (Void# -> r) -> r
StreamState_OFFLINE = StreamState' "OFFLINE"

{-# COMPLETE
  StreamState_LIVE,
  StreamState_OFFLINE,
  StreamState'
  #-}