{-# 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.DeinterlacerControl
-- 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.DeinterlacerControl
  ( DeinterlacerControl
      ( ..,
        DeinterlacerControl_FORCE_ALL_FRAMES,
        DeinterlacerControl_NORMAL
      ),
  )
where

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

-- | - When set to NORMAL (default), the deinterlacer does not convert frames
-- that are tagged in metadata as progressive. It will only convert those
-- that are tagged as some other type. - When set to FORCE_ALL_FRAMES, the
-- deinterlacer converts every frame to progressive - even those that are
-- already tagged as progressive. Turn Force mode on only if there is a
-- good chance that the metadata has tagged frames as progressive when they
-- are not progressive. Do not turn on otherwise; processing frames that
-- are already progressive into progressive will probably result in lower
-- quality video.
newtype DeinterlacerControl = DeinterlacerControl'
  { DeinterlacerControl -> Text
fromDeinterlacerControl ::
      Core.Text
  }
  deriving stock
    ( Int -> DeinterlacerControl -> ShowS
[DeinterlacerControl] -> ShowS
DeinterlacerControl -> String
(Int -> DeinterlacerControl -> ShowS)
-> (DeinterlacerControl -> String)
-> ([DeinterlacerControl] -> ShowS)
-> Show DeinterlacerControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeinterlacerControl] -> ShowS
$cshowList :: [DeinterlacerControl] -> ShowS
show :: DeinterlacerControl -> String
$cshow :: DeinterlacerControl -> String
showsPrec :: Int -> DeinterlacerControl -> ShowS
$cshowsPrec :: Int -> DeinterlacerControl -> ShowS
Prelude.Show,
      ReadPrec [DeinterlacerControl]
ReadPrec DeinterlacerControl
Int -> ReadS DeinterlacerControl
ReadS [DeinterlacerControl]
(Int -> ReadS DeinterlacerControl)
-> ReadS [DeinterlacerControl]
-> ReadPrec DeinterlacerControl
-> ReadPrec [DeinterlacerControl]
-> Read DeinterlacerControl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeinterlacerControl]
$creadListPrec :: ReadPrec [DeinterlacerControl]
readPrec :: ReadPrec DeinterlacerControl
$creadPrec :: ReadPrec DeinterlacerControl
readList :: ReadS [DeinterlacerControl]
$creadList :: ReadS [DeinterlacerControl]
readsPrec :: Int -> ReadS DeinterlacerControl
$creadsPrec :: Int -> ReadS DeinterlacerControl
Prelude.Read,
      DeinterlacerControl -> DeinterlacerControl -> Bool
(DeinterlacerControl -> DeinterlacerControl -> Bool)
-> (DeinterlacerControl -> DeinterlacerControl -> Bool)
-> Eq DeinterlacerControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeinterlacerControl -> DeinterlacerControl -> Bool
$c/= :: DeinterlacerControl -> DeinterlacerControl -> Bool
== :: DeinterlacerControl -> DeinterlacerControl -> Bool
$c== :: DeinterlacerControl -> DeinterlacerControl -> Bool
Prelude.Eq,
      Eq DeinterlacerControl
Eq DeinterlacerControl
-> (DeinterlacerControl -> DeinterlacerControl -> Ordering)
-> (DeinterlacerControl -> DeinterlacerControl -> Bool)
-> (DeinterlacerControl -> DeinterlacerControl -> Bool)
-> (DeinterlacerControl -> DeinterlacerControl -> Bool)
-> (DeinterlacerControl -> DeinterlacerControl -> Bool)
-> (DeinterlacerControl
    -> DeinterlacerControl -> DeinterlacerControl)
-> (DeinterlacerControl
    -> DeinterlacerControl -> DeinterlacerControl)
-> Ord DeinterlacerControl
DeinterlacerControl -> DeinterlacerControl -> Bool
DeinterlacerControl -> DeinterlacerControl -> Ordering
DeinterlacerControl -> DeinterlacerControl -> DeinterlacerControl
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 :: DeinterlacerControl -> DeinterlacerControl -> DeinterlacerControl
$cmin :: DeinterlacerControl -> DeinterlacerControl -> DeinterlacerControl
max :: DeinterlacerControl -> DeinterlacerControl -> DeinterlacerControl
$cmax :: DeinterlacerControl -> DeinterlacerControl -> DeinterlacerControl
>= :: DeinterlacerControl -> DeinterlacerControl -> Bool
$c>= :: DeinterlacerControl -> DeinterlacerControl -> Bool
> :: DeinterlacerControl -> DeinterlacerControl -> Bool
$c> :: DeinterlacerControl -> DeinterlacerControl -> Bool
<= :: DeinterlacerControl -> DeinterlacerControl -> Bool
$c<= :: DeinterlacerControl -> DeinterlacerControl -> Bool
< :: DeinterlacerControl -> DeinterlacerControl -> Bool
$c< :: DeinterlacerControl -> DeinterlacerControl -> Bool
compare :: DeinterlacerControl -> DeinterlacerControl -> Ordering
$ccompare :: DeinterlacerControl -> DeinterlacerControl -> Ordering
$cp1Ord :: Eq DeinterlacerControl
Prelude.Ord,
      (forall x. DeinterlacerControl -> Rep DeinterlacerControl x)
-> (forall x. Rep DeinterlacerControl x -> DeinterlacerControl)
-> Generic DeinterlacerControl
forall x. Rep DeinterlacerControl x -> DeinterlacerControl
forall x. DeinterlacerControl -> Rep DeinterlacerControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeinterlacerControl x -> DeinterlacerControl
$cfrom :: forall x. DeinterlacerControl -> Rep DeinterlacerControl x
Prelude.Generic
    )
  deriving newtype
    ( Int -> DeinterlacerControl -> Int
DeinterlacerControl -> Int
(Int -> DeinterlacerControl -> Int)
-> (DeinterlacerControl -> Int) -> Hashable DeinterlacerControl
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DeinterlacerControl -> Int
$chash :: DeinterlacerControl -> Int
hashWithSalt :: Int -> DeinterlacerControl -> Int
$chashWithSalt :: Int -> DeinterlacerControl -> Int
Prelude.Hashable,
      DeinterlacerControl -> ()
(DeinterlacerControl -> ()) -> NFData DeinterlacerControl
forall a. (a -> ()) -> NFData a
rnf :: DeinterlacerControl -> ()
$crnf :: DeinterlacerControl -> ()
Prelude.NFData,
      Text -> Either String DeinterlacerControl
(Text -> Either String DeinterlacerControl)
-> FromText DeinterlacerControl
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String DeinterlacerControl
$cfromText :: Text -> Either String DeinterlacerControl
Core.FromText,
      DeinterlacerControl -> Text
(DeinterlacerControl -> Text) -> ToText DeinterlacerControl
forall a. (a -> Text) -> ToText a
toText :: DeinterlacerControl -> Text
$ctoText :: DeinterlacerControl -> Text
Core.ToText,
      DeinterlacerControl -> ByteString
(DeinterlacerControl -> ByteString)
-> ToByteString DeinterlacerControl
forall a. (a -> ByteString) -> ToByteString a
toBS :: DeinterlacerControl -> ByteString
$ctoBS :: DeinterlacerControl -> ByteString
Core.ToByteString,
      DeinterlacerControl -> ByteStringBuilder
(DeinterlacerControl -> ByteStringBuilder)
-> ToLog DeinterlacerControl
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: DeinterlacerControl -> ByteStringBuilder
$cbuild :: DeinterlacerControl -> ByteStringBuilder
Core.ToLog,
      HeaderName -> DeinterlacerControl -> [Header]
(HeaderName -> DeinterlacerControl -> [Header])
-> ToHeader DeinterlacerControl
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> DeinterlacerControl -> [Header]
$ctoHeader :: HeaderName -> DeinterlacerControl -> [Header]
Core.ToHeader,
      DeinterlacerControl -> QueryString
(DeinterlacerControl -> QueryString) -> ToQuery DeinterlacerControl
forall a. (a -> QueryString) -> ToQuery a
toQuery :: DeinterlacerControl -> QueryString
$ctoQuery :: DeinterlacerControl -> QueryString
Core.ToQuery,
      Value -> Parser [DeinterlacerControl]
Value -> Parser DeinterlacerControl
(Value -> Parser DeinterlacerControl)
-> (Value -> Parser [DeinterlacerControl])
-> FromJSON DeinterlacerControl
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [DeinterlacerControl]
$cparseJSONList :: Value -> Parser [DeinterlacerControl]
parseJSON :: Value -> Parser DeinterlacerControl
$cparseJSON :: Value -> Parser DeinterlacerControl
Core.FromJSON,
      FromJSONKeyFunction [DeinterlacerControl]
FromJSONKeyFunction DeinterlacerControl
FromJSONKeyFunction DeinterlacerControl
-> FromJSONKeyFunction [DeinterlacerControl]
-> FromJSONKey DeinterlacerControl
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [DeinterlacerControl]
$cfromJSONKeyList :: FromJSONKeyFunction [DeinterlacerControl]
fromJSONKey :: FromJSONKeyFunction DeinterlacerControl
$cfromJSONKey :: FromJSONKeyFunction DeinterlacerControl
Core.FromJSONKey,
      [DeinterlacerControl] -> Encoding
[DeinterlacerControl] -> Value
DeinterlacerControl -> Encoding
DeinterlacerControl -> Value
(DeinterlacerControl -> Value)
-> (DeinterlacerControl -> Encoding)
-> ([DeinterlacerControl] -> Value)
-> ([DeinterlacerControl] -> Encoding)
-> ToJSON DeinterlacerControl
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [DeinterlacerControl] -> Encoding
$ctoEncodingList :: [DeinterlacerControl] -> Encoding
toJSONList :: [DeinterlacerControl] -> Value
$ctoJSONList :: [DeinterlacerControl] -> Value
toEncoding :: DeinterlacerControl -> Encoding
$ctoEncoding :: DeinterlacerControl -> Encoding
toJSON :: DeinterlacerControl -> Value
$ctoJSON :: DeinterlacerControl -> Value
Core.ToJSON,
      ToJSONKeyFunction [DeinterlacerControl]
ToJSONKeyFunction DeinterlacerControl
ToJSONKeyFunction DeinterlacerControl
-> ToJSONKeyFunction [DeinterlacerControl]
-> ToJSONKey DeinterlacerControl
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [DeinterlacerControl]
$ctoJSONKeyList :: ToJSONKeyFunction [DeinterlacerControl]
toJSONKey :: ToJSONKeyFunction DeinterlacerControl
$ctoJSONKey :: ToJSONKeyFunction DeinterlacerControl
Core.ToJSONKey,
      [Node] -> Either String DeinterlacerControl
([Node] -> Either String DeinterlacerControl)
-> FromXML DeinterlacerControl
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String DeinterlacerControl
$cparseXML :: [Node] -> Either String DeinterlacerControl
Core.FromXML,
      DeinterlacerControl -> XML
(DeinterlacerControl -> XML) -> ToXML DeinterlacerControl
forall a. (a -> XML) -> ToXML a
toXML :: DeinterlacerControl -> XML
$ctoXML :: DeinterlacerControl -> XML
Core.ToXML
    )

pattern DeinterlacerControl_FORCE_ALL_FRAMES :: DeinterlacerControl
pattern $bDeinterlacerControl_FORCE_ALL_FRAMES :: DeinterlacerControl
$mDeinterlacerControl_FORCE_ALL_FRAMES :: forall r. DeinterlacerControl -> (Void# -> r) -> (Void# -> r) -> r
DeinterlacerControl_FORCE_ALL_FRAMES = DeinterlacerControl' "FORCE_ALL_FRAMES"

pattern DeinterlacerControl_NORMAL :: DeinterlacerControl
pattern $bDeinterlacerControl_NORMAL :: DeinterlacerControl
$mDeinterlacerControl_NORMAL :: forall r. DeinterlacerControl -> (Void# -> r) -> (Void# -> r) -> r
DeinterlacerControl_NORMAL = DeinterlacerControl' "NORMAL"

{-# COMPLETE
  DeinterlacerControl_FORCE_ALL_FRAMES,
  DeinterlacerControl_NORMAL,
  DeinterlacerControl'
  #-}