{-# 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.MediaConvert.Types.Eac3PassthroughControl
-- 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.MediaConvert.Types.Eac3PassthroughControl
  ( Eac3PassthroughControl
      ( ..,
        Eac3PassthroughControl_NO_PASSTHROUGH,
        Eac3PassthroughControl_WHEN_POSSIBLE
      ),
  )
where

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

-- | When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it
-- is present on the input. this detection is dynamic over the life of the
-- transcode. Inputs that alternate between DD+ and non-DD+ content will
-- have a consistent DD+ output as the system alternates between
-- passthrough and encoding.
newtype Eac3PassthroughControl = Eac3PassthroughControl'
  { Eac3PassthroughControl -> Text
fromEac3PassthroughControl ::
      Core.Text
  }
  deriving stock
    ( Int -> Eac3PassthroughControl -> ShowS
[Eac3PassthroughControl] -> ShowS
Eac3PassthroughControl -> String
(Int -> Eac3PassthroughControl -> ShowS)
-> (Eac3PassthroughControl -> String)
-> ([Eac3PassthroughControl] -> ShowS)
-> Show Eac3PassthroughControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Eac3PassthroughControl] -> ShowS
$cshowList :: [Eac3PassthroughControl] -> ShowS
show :: Eac3PassthroughControl -> String
$cshow :: Eac3PassthroughControl -> String
showsPrec :: Int -> Eac3PassthroughControl -> ShowS
$cshowsPrec :: Int -> Eac3PassthroughControl -> ShowS
Prelude.Show,
      ReadPrec [Eac3PassthroughControl]
ReadPrec Eac3PassthroughControl
Int -> ReadS Eac3PassthroughControl
ReadS [Eac3PassthroughControl]
(Int -> ReadS Eac3PassthroughControl)
-> ReadS [Eac3PassthroughControl]
-> ReadPrec Eac3PassthroughControl
-> ReadPrec [Eac3PassthroughControl]
-> Read Eac3PassthroughControl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Eac3PassthroughControl]
$creadListPrec :: ReadPrec [Eac3PassthroughControl]
readPrec :: ReadPrec Eac3PassthroughControl
$creadPrec :: ReadPrec Eac3PassthroughControl
readList :: ReadS [Eac3PassthroughControl]
$creadList :: ReadS [Eac3PassthroughControl]
readsPrec :: Int -> ReadS Eac3PassthroughControl
$creadsPrec :: Int -> ReadS Eac3PassthroughControl
Prelude.Read,
      Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
(Eac3PassthroughControl -> Eac3PassthroughControl -> Bool)
-> (Eac3PassthroughControl -> Eac3PassthroughControl -> Bool)
-> Eq Eac3PassthroughControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
$c/= :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
== :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
$c== :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
Prelude.Eq,
      Eq Eac3PassthroughControl
Eq Eac3PassthroughControl
-> (Eac3PassthroughControl -> Eac3PassthroughControl -> Ordering)
-> (Eac3PassthroughControl -> Eac3PassthroughControl -> Bool)
-> (Eac3PassthroughControl -> Eac3PassthroughControl -> Bool)
-> (Eac3PassthroughControl -> Eac3PassthroughControl -> Bool)
-> (Eac3PassthroughControl -> Eac3PassthroughControl -> Bool)
-> (Eac3PassthroughControl
    -> Eac3PassthroughControl -> Eac3PassthroughControl)
-> (Eac3PassthroughControl
    -> Eac3PassthroughControl -> Eac3PassthroughControl)
-> Ord Eac3PassthroughControl
Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
Eac3PassthroughControl -> Eac3PassthroughControl -> Ordering
Eac3PassthroughControl
-> Eac3PassthroughControl -> Eac3PassthroughControl
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 :: Eac3PassthroughControl
-> Eac3PassthroughControl -> Eac3PassthroughControl
$cmin :: Eac3PassthroughControl
-> Eac3PassthroughControl -> Eac3PassthroughControl
max :: Eac3PassthroughControl
-> Eac3PassthroughControl -> Eac3PassthroughControl
$cmax :: Eac3PassthroughControl
-> Eac3PassthroughControl -> Eac3PassthroughControl
>= :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
$c>= :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
> :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
$c> :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
<= :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
$c<= :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
< :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
$c< :: Eac3PassthroughControl -> Eac3PassthroughControl -> Bool
compare :: Eac3PassthroughControl -> Eac3PassthroughControl -> Ordering
$ccompare :: Eac3PassthroughControl -> Eac3PassthroughControl -> Ordering
$cp1Ord :: Eq Eac3PassthroughControl
Prelude.Ord,
      (forall x. Eac3PassthroughControl -> Rep Eac3PassthroughControl x)
-> (forall x.
    Rep Eac3PassthroughControl x -> Eac3PassthroughControl)
-> Generic Eac3PassthroughControl
forall x. Rep Eac3PassthroughControl x -> Eac3PassthroughControl
forall x. Eac3PassthroughControl -> Rep Eac3PassthroughControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Eac3PassthroughControl x -> Eac3PassthroughControl
$cfrom :: forall x. Eac3PassthroughControl -> Rep Eac3PassthroughControl x
Prelude.Generic
    )
  deriving newtype
    ( Int -> Eac3PassthroughControl -> Int
Eac3PassthroughControl -> Int
(Int -> Eac3PassthroughControl -> Int)
-> (Eac3PassthroughControl -> Int)
-> Hashable Eac3PassthroughControl
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Eac3PassthroughControl -> Int
$chash :: Eac3PassthroughControl -> Int
hashWithSalt :: Int -> Eac3PassthroughControl -> Int
$chashWithSalt :: Int -> Eac3PassthroughControl -> Int
Prelude.Hashable,
      Eac3PassthroughControl -> ()
(Eac3PassthroughControl -> ()) -> NFData Eac3PassthroughControl
forall a. (a -> ()) -> NFData a
rnf :: Eac3PassthroughControl -> ()
$crnf :: Eac3PassthroughControl -> ()
Prelude.NFData,
      Text -> Either String Eac3PassthroughControl
(Text -> Either String Eac3PassthroughControl)
-> FromText Eac3PassthroughControl
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String Eac3PassthroughControl
$cfromText :: Text -> Either String Eac3PassthroughControl
Core.FromText,
      Eac3PassthroughControl -> Text
(Eac3PassthroughControl -> Text) -> ToText Eac3PassthroughControl
forall a. (a -> Text) -> ToText a
toText :: Eac3PassthroughControl -> Text
$ctoText :: Eac3PassthroughControl -> Text
Core.ToText,
      Eac3PassthroughControl -> ByteString
(Eac3PassthroughControl -> ByteString)
-> ToByteString Eac3PassthroughControl
forall a. (a -> ByteString) -> ToByteString a
toBS :: Eac3PassthroughControl -> ByteString
$ctoBS :: Eac3PassthroughControl -> ByteString
Core.ToByteString,
      Eac3PassthroughControl -> ByteStringBuilder
(Eac3PassthroughControl -> ByteStringBuilder)
-> ToLog Eac3PassthroughControl
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: Eac3PassthroughControl -> ByteStringBuilder
$cbuild :: Eac3PassthroughControl -> ByteStringBuilder
Core.ToLog,
      HeaderName -> Eac3PassthroughControl -> [Header]
(HeaderName -> Eac3PassthroughControl -> [Header])
-> ToHeader Eac3PassthroughControl
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> Eac3PassthroughControl -> [Header]
$ctoHeader :: HeaderName -> Eac3PassthroughControl -> [Header]
Core.ToHeader,
      Eac3PassthroughControl -> QueryString
(Eac3PassthroughControl -> QueryString)
-> ToQuery Eac3PassthroughControl
forall a. (a -> QueryString) -> ToQuery a
toQuery :: Eac3PassthroughControl -> QueryString
$ctoQuery :: Eac3PassthroughControl -> QueryString
Core.ToQuery,
      Value -> Parser [Eac3PassthroughControl]
Value -> Parser Eac3PassthroughControl
(Value -> Parser Eac3PassthroughControl)
-> (Value -> Parser [Eac3PassthroughControl])
-> FromJSON Eac3PassthroughControl
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Eac3PassthroughControl]
$cparseJSONList :: Value -> Parser [Eac3PassthroughControl]
parseJSON :: Value -> Parser Eac3PassthroughControl
$cparseJSON :: Value -> Parser Eac3PassthroughControl
Core.FromJSON,
      FromJSONKeyFunction [Eac3PassthroughControl]
FromJSONKeyFunction Eac3PassthroughControl
FromJSONKeyFunction Eac3PassthroughControl
-> FromJSONKeyFunction [Eac3PassthroughControl]
-> FromJSONKey Eac3PassthroughControl
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [Eac3PassthroughControl]
$cfromJSONKeyList :: FromJSONKeyFunction [Eac3PassthroughControl]
fromJSONKey :: FromJSONKeyFunction Eac3PassthroughControl
$cfromJSONKey :: FromJSONKeyFunction Eac3PassthroughControl
Core.FromJSONKey,
      [Eac3PassthroughControl] -> Encoding
[Eac3PassthroughControl] -> Value
Eac3PassthroughControl -> Encoding
Eac3PassthroughControl -> Value
(Eac3PassthroughControl -> Value)
-> (Eac3PassthroughControl -> Encoding)
-> ([Eac3PassthroughControl] -> Value)
-> ([Eac3PassthroughControl] -> Encoding)
-> ToJSON Eac3PassthroughControl
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Eac3PassthroughControl] -> Encoding
$ctoEncodingList :: [Eac3PassthroughControl] -> Encoding
toJSONList :: [Eac3PassthroughControl] -> Value
$ctoJSONList :: [Eac3PassthroughControl] -> Value
toEncoding :: Eac3PassthroughControl -> Encoding
$ctoEncoding :: Eac3PassthroughControl -> Encoding
toJSON :: Eac3PassthroughControl -> Value
$ctoJSON :: Eac3PassthroughControl -> Value
Core.ToJSON,
      ToJSONKeyFunction [Eac3PassthroughControl]
ToJSONKeyFunction Eac3PassthroughControl
ToJSONKeyFunction Eac3PassthroughControl
-> ToJSONKeyFunction [Eac3PassthroughControl]
-> ToJSONKey Eac3PassthroughControl
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [Eac3PassthroughControl]
$ctoJSONKeyList :: ToJSONKeyFunction [Eac3PassthroughControl]
toJSONKey :: ToJSONKeyFunction Eac3PassthroughControl
$ctoJSONKey :: ToJSONKeyFunction Eac3PassthroughControl
Core.ToJSONKey,
      [Node] -> Either String Eac3PassthroughControl
([Node] -> Either String Eac3PassthroughControl)
-> FromXML Eac3PassthroughControl
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String Eac3PassthroughControl
$cparseXML :: [Node] -> Either String Eac3PassthroughControl
Core.FromXML,
      Eac3PassthroughControl -> XML
(Eac3PassthroughControl -> XML) -> ToXML Eac3PassthroughControl
forall a. (a -> XML) -> ToXML a
toXML :: Eac3PassthroughControl -> XML
$ctoXML :: Eac3PassthroughControl -> XML
Core.ToXML
    )

pattern Eac3PassthroughControl_NO_PASSTHROUGH :: Eac3PassthroughControl
pattern $bEac3PassthroughControl_NO_PASSTHROUGH :: Eac3PassthroughControl
$mEac3PassthroughControl_NO_PASSTHROUGH :: forall r.
Eac3PassthroughControl -> (Void# -> r) -> (Void# -> r) -> r
Eac3PassthroughControl_NO_PASSTHROUGH = Eac3PassthroughControl' "NO_PASSTHROUGH"

pattern Eac3PassthroughControl_WHEN_POSSIBLE :: Eac3PassthroughControl
pattern $bEac3PassthroughControl_WHEN_POSSIBLE :: Eac3PassthroughControl
$mEac3PassthroughControl_WHEN_POSSIBLE :: forall r.
Eac3PassthroughControl -> (Void# -> r) -> (Void# -> r) -> r
Eac3PassthroughControl_WHEN_POSSIBLE = Eac3PassthroughControl' "WHEN_POSSIBLE"

{-# COMPLETE
  Eac3PassthroughControl_NO_PASSTHROUGH,
  Eac3PassthroughControl_WHEN_POSSIBLE,
  Eac3PassthroughControl'
  #-}