{-# 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.H264InterlaceMode
-- 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.H264InterlaceMode
  ( H264InterlaceMode
      ( ..,
        H264InterlaceMode_BOTTOM_FIELD,
        H264InterlaceMode_FOLLOW_BOTTOM_FIELD,
        H264InterlaceMode_FOLLOW_TOP_FIELD,
        H264InterlaceMode_PROGRESSIVE,
        H264InterlaceMode_TOP_FIELD
      ),
  )
where

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

-- | Choose the scan line type for the output. Keep the default value,
-- Progressive (PROGRESSIVE) to create a progressive output, regardless of
-- the scan type of your input. Use Top field first (TOP_FIELD) or Bottom
-- field first (BOTTOM_FIELD) to create an output that\'s interlaced with
-- the same field polarity throughout. Use Follow, default top
-- (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to
-- produce outputs with the same field polarity as the source. For jobs
-- that have multiple inputs, the output field polarity might change over
-- the course of the output. Follow behavior depends on the input scan
-- type. If the source is interlaced, the output will be interlaced with
-- the same polarity as the source. If the source is progressive, the
-- output will be interlaced with top field bottom field first, depending
-- on which of the Follow options you choose.
newtype H264InterlaceMode = H264InterlaceMode'
  { H264InterlaceMode -> Text
fromH264InterlaceMode ::
      Core.Text
  }
  deriving stock
    ( Int -> H264InterlaceMode -> ShowS
[H264InterlaceMode] -> ShowS
H264InterlaceMode -> String
(Int -> H264InterlaceMode -> ShowS)
-> (H264InterlaceMode -> String)
-> ([H264InterlaceMode] -> ShowS)
-> Show H264InterlaceMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [H264InterlaceMode] -> ShowS
$cshowList :: [H264InterlaceMode] -> ShowS
show :: H264InterlaceMode -> String
$cshow :: H264InterlaceMode -> String
showsPrec :: Int -> H264InterlaceMode -> ShowS
$cshowsPrec :: Int -> H264InterlaceMode -> ShowS
Prelude.Show,
      ReadPrec [H264InterlaceMode]
ReadPrec H264InterlaceMode
Int -> ReadS H264InterlaceMode
ReadS [H264InterlaceMode]
(Int -> ReadS H264InterlaceMode)
-> ReadS [H264InterlaceMode]
-> ReadPrec H264InterlaceMode
-> ReadPrec [H264InterlaceMode]
-> Read H264InterlaceMode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [H264InterlaceMode]
$creadListPrec :: ReadPrec [H264InterlaceMode]
readPrec :: ReadPrec H264InterlaceMode
$creadPrec :: ReadPrec H264InterlaceMode
readList :: ReadS [H264InterlaceMode]
$creadList :: ReadS [H264InterlaceMode]
readsPrec :: Int -> ReadS H264InterlaceMode
$creadsPrec :: Int -> ReadS H264InterlaceMode
Prelude.Read,
      H264InterlaceMode -> H264InterlaceMode -> Bool
(H264InterlaceMode -> H264InterlaceMode -> Bool)
-> (H264InterlaceMode -> H264InterlaceMode -> Bool)
-> Eq H264InterlaceMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: H264InterlaceMode -> H264InterlaceMode -> Bool
$c/= :: H264InterlaceMode -> H264InterlaceMode -> Bool
== :: H264InterlaceMode -> H264InterlaceMode -> Bool
$c== :: H264InterlaceMode -> H264InterlaceMode -> Bool
Prelude.Eq,
      Eq H264InterlaceMode
Eq H264InterlaceMode
-> (H264InterlaceMode -> H264InterlaceMode -> Ordering)
-> (H264InterlaceMode -> H264InterlaceMode -> Bool)
-> (H264InterlaceMode -> H264InterlaceMode -> Bool)
-> (H264InterlaceMode -> H264InterlaceMode -> Bool)
-> (H264InterlaceMode -> H264InterlaceMode -> Bool)
-> (H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode)
-> (H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode)
-> Ord H264InterlaceMode
H264InterlaceMode -> H264InterlaceMode -> Bool
H264InterlaceMode -> H264InterlaceMode -> Ordering
H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode
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 :: H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode
$cmin :: H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode
max :: H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode
$cmax :: H264InterlaceMode -> H264InterlaceMode -> H264InterlaceMode
>= :: H264InterlaceMode -> H264InterlaceMode -> Bool
$c>= :: H264InterlaceMode -> H264InterlaceMode -> Bool
> :: H264InterlaceMode -> H264InterlaceMode -> Bool
$c> :: H264InterlaceMode -> H264InterlaceMode -> Bool
<= :: H264InterlaceMode -> H264InterlaceMode -> Bool
$c<= :: H264InterlaceMode -> H264InterlaceMode -> Bool
< :: H264InterlaceMode -> H264InterlaceMode -> Bool
$c< :: H264InterlaceMode -> H264InterlaceMode -> Bool
compare :: H264InterlaceMode -> H264InterlaceMode -> Ordering
$ccompare :: H264InterlaceMode -> H264InterlaceMode -> Ordering
$cp1Ord :: Eq H264InterlaceMode
Prelude.Ord,
      (forall x. H264InterlaceMode -> Rep H264InterlaceMode x)
-> (forall x. Rep H264InterlaceMode x -> H264InterlaceMode)
-> Generic H264InterlaceMode
forall x. Rep H264InterlaceMode x -> H264InterlaceMode
forall x. H264InterlaceMode -> Rep H264InterlaceMode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep H264InterlaceMode x -> H264InterlaceMode
$cfrom :: forall x. H264InterlaceMode -> Rep H264InterlaceMode x
Prelude.Generic
    )
  deriving newtype
    ( Int -> H264InterlaceMode -> Int
H264InterlaceMode -> Int
(Int -> H264InterlaceMode -> Int)
-> (H264InterlaceMode -> Int) -> Hashable H264InterlaceMode
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: H264InterlaceMode -> Int
$chash :: H264InterlaceMode -> Int
hashWithSalt :: Int -> H264InterlaceMode -> Int
$chashWithSalt :: Int -> H264InterlaceMode -> Int
Prelude.Hashable,
      H264InterlaceMode -> ()
(H264InterlaceMode -> ()) -> NFData H264InterlaceMode
forall a. (a -> ()) -> NFData a
rnf :: H264InterlaceMode -> ()
$crnf :: H264InterlaceMode -> ()
Prelude.NFData,
      Text -> Either String H264InterlaceMode
(Text -> Either String H264InterlaceMode)
-> FromText H264InterlaceMode
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String H264InterlaceMode
$cfromText :: Text -> Either String H264InterlaceMode
Core.FromText,
      H264InterlaceMode -> Text
(H264InterlaceMode -> Text) -> ToText H264InterlaceMode
forall a. (a -> Text) -> ToText a
toText :: H264InterlaceMode -> Text
$ctoText :: H264InterlaceMode -> Text
Core.ToText,
      H264InterlaceMode -> ByteString
(H264InterlaceMode -> ByteString) -> ToByteString H264InterlaceMode
forall a. (a -> ByteString) -> ToByteString a
toBS :: H264InterlaceMode -> ByteString
$ctoBS :: H264InterlaceMode -> ByteString
Core.ToByteString,
      H264InterlaceMode -> ByteStringBuilder
(H264InterlaceMode -> ByteStringBuilder) -> ToLog H264InterlaceMode
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: H264InterlaceMode -> ByteStringBuilder
$cbuild :: H264InterlaceMode -> ByteStringBuilder
Core.ToLog,
      HeaderName -> H264InterlaceMode -> [Header]
(HeaderName -> H264InterlaceMode -> [Header])
-> ToHeader H264InterlaceMode
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> H264InterlaceMode -> [Header]
$ctoHeader :: HeaderName -> H264InterlaceMode -> [Header]
Core.ToHeader,
      H264InterlaceMode -> QueryString
(H264InterlaceMode -> QueryString) -> ToQuery H264InterlaceMode
forall a. (a -> QueryString) -> ToQuery a
toQuery :: H264InterlaceMode -> QueryString
$ctoQuery :: H264InterlaceMode -> QueryString
Core.ToQuery,
      Value -> Parser [H264InterlaceMode]
Value -> Parser H264InterlaceMode
(Value -> Parser H264InterlaceMode)
-> (Value -> Parser [H264InterlaceMode])
-> FromJSON H264InterlaceMode
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [H264InterlaceMode]
$cparseJSONList :: Value -> Parser [H264InterlaceMode]
parseJSON :: Value -> Parser H264InterlaceMode
$cparseJSON :: Value -> Parser H264InterlaceMode
Core.FromJSON,
      FromJSONKeyFunction [H264InterlaceMode]
FromJSONKeyFunction H264InterlaceMode
FromJSONKeyFunction H264InterlaceMode
-> FromJSONKeyFunction [H264InterlaceMode]
-> FromJSONKey H264InterlaceMode
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [H264InterlaceMode]
$cfromJSONKeyList :: FromJSONKeyFunction [H264InterlaceMode]
fromJSONKey :: FromJSONKeyFunction H264InterlaceMode
$cfromJSONKey :: FromJSONKeyFunction H264InterlaceMode
Core.FromJSONKey,
      [H264InterlaceMode] -> Encoding
[H264InterlaceMode] -> Value
H264InterlaceMode -> Encoding
H264InterlaceMode -> Value
(H264InterlaceMode -> Value)
-> (H264InterlaceMode -> Encoding)
-> ([H264InterlaceMode] -> Value)
-> ([H264InterlaceMode] -> Encoding)
-> ToJSON H264InterlaceMode
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [H264InterlaceMode] -> Encoding
$ctoEncodingList :: [H264InterlaceMode] -> Encoding
toJSONList :: [H264InterlaceMode] -> Value
$ctoJSONList :: [H264InterlaceMode] -> Value
toEncoding :: H264InterlaceMode -> Encoding
$ctoEncoding :: H264InterlaceMode -> Encoding
toJSON :: H264InterlaceMode -> Value
$ctoJSON :: H264InterlaceMode -> Value
Core.ToJSON,
      ToJSONKeyFunction [H264InterlaceMode]
ToJSONKeyFunction H264InterlaceMode
ToJSONKeyFunction H264InterlaceMode
-> ToJSONKeyFunction [H264InterlaceMode]
-> ToJSONKey H264InterlaceMode
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [H264InterlaceMode]
$ctoJSONKeyList :: ToJSONKeyFunction [H264InterlaceMode]
toJSONKey :: ToJSONKeyFunction H264InterlaceMode
$ctoJSONKey :: ToJSONKeyFunction H264InterlaceMode
Core.ToJSONKey,
      [Node] -> Either String H264InterlaceMode
([Node] -> Either String H264InterlaceMode)
-> FromXML H264InterlaceMode
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String H264InterlaceMode
$cparseXML :: [Node] -> Either String H264InterlaceMode
Core.FromXML,
      H264InterlaceMode -> XML
(H264InterlaceMode -> XML) -> ToXML H264InterlaceMode
forall a. (a -> XML) -> ToXML a
toXML :: H264InterlaceMode -> XML
$ctoXML :: H264InterlaceMode -> XML
Core.ToXML
    )

pattern H264InterlaceMode_BOTTOM_FIELD :: H264InterlaceMode
pattern $bH264InterlaceMode_BOTTOM_FIELD :: H264InterlaceMode
$mH264InterlaceMode_BOTTOM_FIELD :: forall r. H264InterlaceMode -> (Void# -> r) -> (Void# -> r) -> r
H264InterlaceMode_BOTTOM_FIELD = H264InterlaceMode' "BOTTOM_FIELD"

pattern H264InterlaceMode_FOLLOW_BOTTOM_FIELD :: H264InterlaceMode
pattern $bH264InterlaceMode_FOLLOW_BOTTOM_FIELD :: H264InterlaceMode
$mH264InterlaceMode_FOLLOW_BOTTOM_FIELD :: forall r. H264InterlaceMode -> (Void# -> r) -> (Void# -> r) -> r
H264InterlaceMode_FOLLOW_BOTTOM_FIELD = H264InterlaceMode' "FOLLOW_BOTTOM_FIELD"

pattern H264InterlaceMode_FOLLOW_TOP_FIELD :: H264InterlaceMode
pattern $bH264InterlaceMode_FOLLOW_TOP_FIELD :: H264InterlaceMode
$mH264InterlaceMode_FOLLOW_TOP_FIELD :: forall r. H264InterlaceMode -> (Void# -> r) -> (Void# -> r) -> r
H264InterlaceMode_FOLLOW_TOP_FIELD = H264InterlaceMode' "FOLLOW_TOP_FIELD"

pattern H264InterlaceMode_PROGRESSIVE :: H264InterlaceMode
pattern $bH264InterlaceMode_PROGRESSIVE :: H264InterlaceMode
$mH264InterlaceMode_PROGRESSIVE :: forall r. H264InterlaceMode -> (Void# -> r) -> (Void# -> r) -> r
H264InterlaceMode_PROGRESSIVE = H264InterlaceMode' "PROGRESSIVE"

pattern H264InterlaceMode_TOP_FIELD :: H264InterlaceMode
pattern $bH264InterlaceMode_TOP_FIELD :: H264InterlaceMode
$mH264InterlaceMode_TOP_FIELD :: forall r. H264InterlaceMode -> (Void# -> r) -> (Void# -> r) -> r
H264InterlaceMode_TOP_FIELD = H264InterlaceMode' "TOP_FIELD"

{-# COMPLETE
  H264InterlaceMode_BOTTOM_FIELD,
  H264InterlaceMode_FOLLOW_BOTTOM_FIELD,
  H264InterlaceMode_FOLLOW_TOP_FIELD,
  H264InterlaceMode_PROGRESSIVE,
  H264InterlaceMode_TOP_FIELD,
  H264InterlaceMode'
  #-}