{-# 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.MediaTailor.Types.ChannelState
-- 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.MediaTailor.Types.ChannelState
  ( ChannelState
      ( ..,
        ChannelState_RUNNING,
        ChannelState_STOPPED
      ),
  )
where

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

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

pattern ChannelState_RUNNING :: ChannelState
pattern $bChannelState_RUNNING :: ChannelState
$mChannelState_RUNNING :: forall r. ChannelState -> (Void# -> r) -> (Void# -> r) -> r
ChannelState_RUNNING = ChannelState' "RUNNING"

pattern ChannelState_STOPPED :: ChannelState
pattern $bChannelState_STOPPED :: ChannelState
$mChannelState_STOPPED :: forall r. ChannelState -> (Void# -> r) -> (Void# -> r) -> r
ChannelState_STOPPED = ChannelState' "STOPPED"

{-# COMPLETE
  ChannelState_RUNNING,
  ChannelState_STOPPED,
  ChannelState'
  #-}