{-# 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.CmafTargetDurationCompatibilityMode
-- 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.CmafTargetDurationCompatibilityMode
  ( CmafTargetDurationCompatibilityMode
      ( ..,
        CmafTargetDurationCompatibilityMode_LEGACY,
        CmafTargetDurationCompatibilityMode_SPEC_COMPLIANT
      ),
  )
where

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

-- | When set to LEGACY, the segment target duration is always rounded up to
-- the nearest integer value above its current value in seconds. When set
-- to SPEC\\\\_COMPLIANT, the segment target duration is rounded up to the
-- nearest integer value if fraction seconds are greater than or equal to
-- 0.5 (>= 0.5) and rounded down if less than 0.5 (\< 0.5). You may need to
-- use LEGACY if your client needs to ensure that the target duration is
-- always longer than the actual duration of the segment. Some older
-- players may experience interrupted playback when the actual duration of
-- a track in a segment is longer than the target duration.
newtype CmafTargetDurationCompatibilityMode = CmafTargetDurationCompatibilityMode'
  { CmafTargetDurationCompatibilityMode -> Text
fromCmafTargetDurationCompatibilityMode ::
      Core.Text
  }
  deriving stock
    ( Int -> CmafTargetDurationCompatibilityMode -> ShowS
[CmafTargetDurationCompatibilityMode] -> ShowS
CmafTargetDurationCompatibilityMode -> String
(Int -> CmafTargetDurationCompatibilityMode -> ShowS)
-> (CmafTargetDurationCompatibilityMode -> String)
-> ([CmafTargetDurationCompatibilityMode] -> ShowS)
-> Show CmafTargetDurationCompatibilityMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CmafTargetDurationCompatibilityMode] -> ShowS
$cshowList :: [CmafTargetDurationCompatibilityMode] -> ShowS
show :: CmafTargetDurationCompatibilityMode -> String
$cshow :: CmafTargetDurationCompatibilityMode -> String
showsPrec :: Int -> CmafTargetDurationCompatibilityMode -> ShowS
$cshowsPrec :: Int -> CmafTargetDurationCompatibilityMode -> ShowS
Prelude.Show,
      ReadPrec [CmafTargetDurationCompatibilityMode]
ReadPrec CmafTargetDurationCompatibilityMode
Int -> ReadS CmafTargetDurationCompatibilityMode
ReadS [CmafTargetDurationCompatibilityMode]
(Int -> ReadS CmafTargetDurationCompatibilityMode)
-> ReadS [CmafTargetDurationCompatibilityMode]
-> ReadPrec CmafTargetDurationCompatibilityMode
-> ReadPrec [CmafTargetDurationCompatibilityMode]
-> Read CmafTargetDurationCompatibilityMode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CmafTargetDurationCompatibilityMode]
$creadListPrec :: ReadPrec [CmafTargetDurationCompatibilityMode]
readPrec :: ReadPrec CmafTargetDurationCompatibilityMode
$creadPrec :: ReadPrec CmafTargetDurationCompatibilityMode
readList :: ReadS [CmafTargetDurationCompatibilityMode]
$creadList :: ReadS [CmafTargetDurationCompatibilityMode]
readsPrec :: Int -> ReadS CmafTargetDurationCompatibilityMode
$creadsPrec :: Int -> ReadS CmafTargetDurationCompatibilityMode
Prelude.Read,
      CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
(CmafTargetDurationCompatibilityMode
 -> CmafTargetDurationCompatibilityMode -> Bool)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode -> Bool)
-> Eq CmafTargetDurationCompatibilityMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
$c/= :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
== :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
$c== :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
Prelude.Eq,
      Eq CmafTargetDurationCompatibilityMode
Eq CmafTargetDurationCompatibilityMode
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode -> Ordering)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode -> Bool)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode -> Bool)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode -> Bool)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode -> Bool)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode)
-> (CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode
    -> CmafTargetDurationCompatibilityMode)
-> Ord CmafTargetDurationCompatibilityMode
CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Ordering
CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
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 :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
$cmin :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
max :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
$cmax :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode
>= :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
$c>= :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
> :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
$c> :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
<= :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
$c<= :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
< :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
$c< :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Bool
compare :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Ordering
$ccompare :: CmafTargetDurationCompatibilityMode
-> CmafTargetDurationCompatibilityMode -> Ordering
$cp1Ord :: Eq CmafTargetDurationCompatibilityMode
Prelude.Ord,
      (forall x.
 CmafTargetDurationCompatibilityMode
 -> Rep CmafTargetDurationCompatibilityMode x)
-> (forall x.
    Rep CmafTargetDurationCompatibilityMode x
    -> CmafTargetDurationCompatibilityMode)
-> Generic CmafTargetDurationCompatibilityMode
forall x.
Rep CmafTargetDurationCompatibilityMode x
-> CmafTargetDurationCompatibilityMode
forall x.
CmafTargetDurationCompatibilityMode
-> Rep CmafTargetDurationCompatibilityMode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CmafTargetDurationCompatibilityMode x
-> CmafTargetDurationCompatibilityMode
$cfrom :: forall x.
CmafTargetDurationCompatibilityMode
-> Rep CmafTargetDurationCompatibilityMode x
Prelude.Generic
    )
  deriving newtype
    ( Int -> CmafTargetDurationCompatibilityMode -> Int
CmafTargetDurationCompatibilityMode -> Int
(Int -> CmafTargetDurationCompatibilityMode -> Int)
-> (CmafTargetDurationCompatibilityMode -> Int)
-> Hashable CmafTargetDurationCompatibilityMode
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CmafTargetDurationCompatibilityMode -> Int
$chash :: CmafTargetDurationCompatibilityMode -> Int
hashWithSalt :: Int -> CmafTargetDurationCompatibilityMode -> Int
$chashWithSalt :: Int -> CmafTargetDurationCompatibilityMode -> Int
Prelude.Hashable,
      CmafTargetDurationCompatibilityMode -> ()
(CmafTargetDurationCompatibilityMode -> ())
-> NFData CmafTargetDurationCompatibilityMode
forall a. (a -> ()) -> NFData a
rnf :: CmafTargetDurationCompatibilityMode -> ()
$crnf :: CmafTargetDurationCompatibilityMode -> ()
Prelude.NFData,
      Text -> Either String CmafTargetDurationCompatibilityMode
(Text -> Either String CmafTargetDurationCompatibilityMode)
-> FromText CmafTargetDurationCompatibilityMode
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CmafTargetDurationCompatibilityMode
$cfromText :: Text -> Either String CmafTargetDurationCompatibilityMode
Core.FromText,
      CmafTargetDurationCompatibilityMode -> Text
(CmafTargetDurationCompatibilityMode -> Text)
-> ToText CmafTargetDurationCompatibilityMode
forall a. (a -> Text) -> ToText a
toText :: CmafTargetDurationCompatibilityMode -> Text
$ctoText :: CmafTargetDurationCompatibilityMode -> Text
Core.ToText,
      CmafTargetDurationCompatibilityMode -> ByteString
(CmafTargetDurationCompatibilityMode -> ByteString)
-> ToByteString CmafTargetDurationCompatibilityMode
forall a. (a -> ByteString) -> ToByteString a
toBS :: CmafTargetDurationCompatibilityMode -> ByteString
$ctoBS :: CmafTargetDurationCompatibilityMode -> ByteString
Core.ToByteString,
      CmafTargetDurationCompatibilityMode -> ByteStringBuilder
(CmafTargetDurationCompatibilityMode -> ByteStringBuilder)
-> ToLog CmafTargetDurationCompatibilityMode
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CmafTargetDurationCompatibilityMode -> ByteStringBuilder
$cbuild :: CmafTargetDurationCompatibilityMode -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CmafTargetDurationCompatibilityMode -> [Header]
(HeaderName -> CmafTargetDurationCompatibilityMode -> [Header])
-> ToHeader CmafTargetDurationCompatibilityMode
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CmafTargetDurationCompatibilityMode -> [Header]
$ctoHeader :: HeaderName -> CmafTargetDurationCompatibilityMode -> [Header]
Core.ToHeader,
      CmafTargetDurationCompatibilityMode -> QueryString
(CmafTargetDurationCompatibilityMode -> QueryString)
-> ToQuery CmafTargetDurationCompatibilityMode
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CmafTargetDurationCompatibilityMode -> QueryString
$ctoQuery :: CmafTargetDurationCompatibilityMode -> QueryString
Core.ToQuery,
      Value -> Parser [CmafTargetDurationCompatibilityMode]
Value -> Parser CmafTargetDurationCompatibilityMode
(Value -> Parser CmafTargetDurationCompatibilityMode)
-> (Value -> Parser [CmafTargetDurationCompatibilityMode])
-> FromJSON CmafTargetDurationCompatibilityMode
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CmafTargetDurationCompatibilityMode]
$cparseJSONList :: Value -> Parser [CmafTargetDurationCompatibilityMode]
parseJSON :: Value -> Parser CmafTargetDurationCompatibilityMode
$cparseJSON :: Value -> Parser CmafTargetDurationCompatibilityMode
Core.FromJSON,
      FromJSONKeyFunction [CmafTargetDurationCompatibilityMode]
FromJSONKeyFunction CmafTargetDurationCompatibilityMode
FromJSONKeyFunction CmafTargetDurationCompatibilityMode
-> FromJSONKeyFunction [CmafTargetDurationCompatibilityMode]
-> FromJSONKey CmafTargetDurationCompatibilityMode
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CmafTargetDurationCompatibilityMode]
$cfromJSONKeyList :: FromJSONKeyFunction [CmafTargetDurationCompatibilityMode]
fromJSONKey :: FromJSONKeyFunction CmafTargetDurationCompatibilityMode
$cfromJSONKey :: FromJSONKeyFunction CmafTargetDurationCompatibilityMode
Core.FromJSONKey,
      [CmafTargetDurationCompatibilityMode] -> Encoding
[CmafTargetDurationCompatibilityMode] -> Value
CmafTargetDurationCompatibilityMode -> Encoding
CmafTargetDurationCompatibilityMode -> Value
(CmafTargetDurationCompatibilityMode -> Value)
-> (CmafTargetDurationCompatibilityMode -> Encoding)
-> ([CmafTargetDurationCompatibilityMode] -> Value)
-> ([CmafTargetDurationCompatibilityMode] -> Encoding)
-> ToJSON CmafTargetDurationCompatibilityMode
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CmafTargetDurationCompatibilityMode] -> Encoding
$ctoEncodingList :: [CmafTargetDurationCompatibilityMode] -> Encoding
toJSONList :: [CmafTargetDurationCompatibilityMode] -> Value
$ctoJSONList :: [CmafTargetDurationCompatibilityMode] -> Value
toEncoding :: CmafTargetDurationCompatibilityMode -> Encoding
$ctoEncoding :: CmafTargetDurationCompatibilityMode -> Encoding
toJSON :: CmafTargetDurationCompatibilityMode -> Value
$ctoJSON :: CmafTargetDurationCompatibilityMode -> Value
Core.ToJSON,
      ToJSONKeyFunction [CmafTargetDurationCompatibilityMode]
ToJSONKeyFunction CmafTargetDurationCompatibilityMode
ToJSONKeyFunction CmafTargetDurationCompatibilityMode
-> ToJSONKeyFunction [CmafTargetDurationCompatibilityMode]
-> ToJSONKey CmafTargetDurationCompatibilityMode
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CmafTargetDurationCompatibilityMode]
$ctoJSONKeyList :: ToJSONKeyFunction [CmafTargetDurationCompatibilityMode]
toJSONKey :: ToJSONKeyFunction CmafTargetDurationCompatibilityMode
$ctoJSONKey :: ToJSONKeyFunction CmafTargetDurationCompatibilityMode
Core.ToJSONKey,
      [Node] -> Either String CmafTargetDurationCompatibilityMode
([Node] -> Either String CmafTargetDurationCompatibilityMode)
-> FromXML CmafTargetDurationCompatibilityMode
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CmafTargetDurationCompatibilityMode
$cparseXML :: [Node] -> Either String CmafTargetDurationCompatibilityMode
Core.FromXML,
      CmafTargetDurationCompatibilityMode -> XML
(CmafTargetDurationCompatibilityMode -> XML)
-> ToXML CmafTargetDurationCompatibilityMode
forall a. (a -> XML) -> ToXML a
toXML :: CmafTargetDurationCompatibilityMode -> XML
$ctoXML :: CmafTargetDurationCompatibilityMode -> XML
Core.ToXML
    )

pattern CmafTargetDurationCompatibilityMode_LEGACY :: CmafTargetDurationCompatibilityMode
pattern $bCmafTargetDurationCompatibilityMode_LEGACY :: CmafTargetDurationCompatibilityMode
$mCmafTargetDurationCompatibilityMode_LEGACY :: forall r.
CmafTargetDurationCompatibilityMode
-> (Void# -> r) -> (Void# -> r) -> r
CmafTargetDurationCompatibilityMode_LEGACY = CmafTargetDurationCompatibilityMode' "LEGACY"

pattern CmafTargetDurationCompatibilityMode_SPEC_COMPLIANT :: CmafTargetDurationCompatibilityMode
pattern $bCmafTargetDurationCompatibilityMode_SPEC_COMPLIANT :: CmafTargetDurationCompatibilityMode
$mCmafTargetDurationCompatibilityMode_SPEC_COMPLIANT :: forall r.
CmafTargetDurationCompatibilityMode
-> (Void# -> r) -> (Void# -> r) -> r
CmafTargetDurationCompatibilityMode_SPEC_COMPLIANT = CmafTargetDurationCompatibilityMode' "SPEC_COMPLIANT"

{-# COMPLETE
  CmafTargetDurationCompatibilityMode_LEGACY,
  CmafTargetDurationCompatibilityMode_SPEC_COMPLIANT,
  CmafTargetDurationCompatibilityMode'
  #-}