{-# 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.MediaLive.Types.MultiplexState
-- 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.MediaLive.Types.MultiplexState
  ( MultiplexState
      ( ..,
        MultiplexState_CREATE_FAILED,
        MultiplexState_CREATING,
        MultiplexState_DELETED,
        MultiplexState_DELETING,
        MultiplexState_IDLE,
        MultiplexState_RECOVERING,
        MultiplexState_RUNNING,
        MultiplexState_STARTING,
        MultiplexState_STOPPING
      ),
  )
where

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

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

pattern MultiplexState_CREATE_FAILED :: MultiplexState
pattern $bMultiplexState_CREATE_FAILED :: MultiplexState
$mMultiplexState_CREATE_FAILED :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_CREATE_FAILED = MultiplexState' "CREATE_FAILED"

pattern MultiplexState_CREATING :: MultiplexState
pattern $bMultiplexState_CREATING :: MultiplexState
$mMultiplexState_CREATING :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_CREATING = MultiplexState' "CREATING"

pattern MultiplexState_DELETED :: MultiplexState
pattern $bMultiplexState_DELETED :: MultiplexState
$mMultiplexState_DELETED :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_DELETED = MultiplexState' "DELETED"

pattern MultiplexState_DELETING :: MultiplexState
pattern $bMultiplexState_DELETING :: MultiplexState
$mMultiplexState_DELETING :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_DELETING = MultiplexState' "DELETING"

pattern MultiplexState_IDLE :: MultiplexState
pattern $bMultiplexState_IDLE :: MultiplexState
$mMultiplexState_IDLE :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_IDLE = MultiplexState' "IDLE"

pattern MultiplexState_RECOVERING :: MultiplexState
pattern $bMultiplexState_RECOVERING :: MultiplexState
$mMultiplexState_RECOVERING :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_RECOVERING = MultiplexState' "RECOVERING"

pattern MultiplexState_RUNNING :: MultiplexState
pattern $bMultiplexState_RUNNING :: MultiplexState
$mMultiplexState_RUNNING :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_RUNNING = MultiplexState' "RUNNING"

pattern MultiplexState_STARTING :: MultiplexState
pattern $bMultiplexState_STARTING :: MultiplexState
$mMultiplexState_STARTING :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_STARTING = MultiplexState' "STARTING"

pattern MultiplexState_STOPPING :: MultiplexState
pattern $bMultiplexState_STOPPING :: MultiplexState
$mMultiplexState_STOPPING :: forall r. MultiplexState -> (Void# -> r) -> (Void# -> r) -> r
MultiplexState_STOPPING = MultiplexState' "STOPPING"

{-# COMPLETE
  MultiplexState_CREATE_FAILED,
  MultiplexState_CREATING,
  MultiplexState_DELETED,
  MultiplexState_DELETING,
  MultiplexState_IDLE,
  MultiplexState_RECOVERING,
  MultiplexState_RUNNING,
  MultiplexState_STARTING,
  MultiplexState_STOPPING,
  MultiplexState'
  #-}