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

pattern HlsTargetDurationCompatibilityMode_LEGACY :: HlsTargetDurationCompatibilityMode
pattern $bHlsTargetDurationCompatibilityMode_LEGACY :: HlsTargetDurationCompatibilityMode
$mHlsTargetDurationCompatibilityMode_LEGACY :: forall r.
HlsTargetDurationCompatibilityMode
-> (Void# -> r) -> (Void# -> r) -> r
HlsTargetDurationCompatibilityMode_LEGACY = HlsTargetDurationCompatibilityMode' "LEGACY"

pattern HlsTargetDurationCompatibilityMode_SPEC_COMPLIANT :: HlsTargetDurationCompatibilityMode
pattern $bHlsTargetDurationCompatibilityMode_SPEC_COMPLIANT :: HlsTargetDurationCompatibilityMode
$mHlsTargetDurationCompatibilityMode_SPEC_COMPLIANT :: forall r.
HlsTargetDurationCompatibilityMode
-> (Void# -> r) -> (Void# -> r) -> r
HlsTargetDurationCompatibilityMode_SPEC_COMPLIANT = HlsTargetDurationCompatibilityMode' "SPEC_COMPLIANT"

{-# COMPLETE
  HlsTargetDurationCompatibilityMode_LEGACY,
  HlsTargetDurationCompatibilityMode_SPEC_COMPLIANT,
  HlsTargetDurationCompatibilityMode'
  #-}