{-# 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.PlaybackMode
-- 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.PlaybackMode
  ( PlaybackMode
      ( ..,
        PlaybackMode_LINEAR,
        PlaybackMode_LOOP
      ),
  )
where

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

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

pattern PlaybackMode_LINEAR :: PlaybackMode
pattern $bPlaybackMode_LINEAR :: PlaybackMode
$mPlaybackMode_LINEAR :: forall r. PlaybackMode -> (Void# -> r) -> (Void# -> r) -> r
PlaybackMode_LINEAR = PlaybackMode' "LINEAR"

pattern PlaybackMode_LOOP :: PlaybackMode
pattern $bPlaybackMode_LOOP :: PlaybackMode
$mPlaybackMode_LOOP :: forall r. PlaybackMode -> (Void# -> r) -> (Void# -> r) -> r
PlaybackMode_LOOP = PlaybackMode' "LOOP"

{-# COMPLETE
  PlaybackMode_LINEAR,
  PlaybackMode_LOOP,
  PlaybackMode'
  #-}