{-# 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.HlsSegmentLengthControl
-- 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.HlsSegmentLengthControl
  ( HlsSegmentLengthControl
      ( ..,
        HlsSegmentLengthControl_EXACT,
        HlsSegmentLengthControl_GOP_MULTIPLE
      ),
  )
where

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

-- | Specify how you want MediaConvert to determine the segment length.
-- Choose Exact (EXACT) to have the encoder use the exact length that you
-- specify with the setting Segment length (SegmentLength). This might
-- result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have
-- the encoder round up the segment lengths to match the next GOP boundary.
newtype HlsSegmentLengthControl = HlsSegmentLengthControl'
  { HlsSegmentLengthControl -> Text
fromHlsSegmentLengthControl ::
      Core.Text
  }
  deriving stock
    ( Int -> HlsSegmentLengthControl -> ShowS
[HlsSegmentLengthControl] -> ShowS
HlsSegmentLengthControl -> String
(Int -> HlsSegmentLengthControl -> ShowS)
-> (HlsSegmentLengthControl -> String)
-> ([HlsSegmentLengthControl] -> ShowS)
-> Show HlsSegmentLengthControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsSegmentLengthControl] -> ShowS
$cshowList :: [HlsSegmentLengthControl] -> ShowS
show :: HlsSegmentLengthControl -> String
$cshow :: HlsSegmentLengthControl -> String
showsPrec :: Int -> HlsSegmentLengthControl -> ShowS
$cshowsPrec :: Int -> HlsSegmentLengthControl -> ShowS
Prelude.Show,
      ReadPrec [HlsSegmentLengthControl]
ReadPrec HlsSegmentLengthControl
Int -> ReadS HlsSegmentLengthControl
ReadS [HlsSegmentLengthControl]
(Int -> ReadS HlsSegmentLengthControl)
-> ReadS [HlsSegmentLengthControl]
-> ReadPrec HlsSegmentLengthControl
-> ReadPrec [HlsSegmentLengthControl]
-> Read HlsSegmentLengthControl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsSegmentLengthControl]
$creadListPrec :: ReadPrec [HlsSegmentLengthControl]
readPrec :: ReadPrec HlsSegmentLengthControl
$creadPrec :: ReadPrec HlsSegmentLengthControl
readList :: ReadS [HlsSegmentLengthControl]
$creadList :: ReadS [HlsSegmentLengthControl]
readsPrec :: Int -> ReadS HlsSegmentLengthControl
$creadsPrec :: Int -> ReadS HlsSegmentLengthControl
Prelude.Read,
      HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
(HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool)
-> (HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool)
-> Eq HlsSegmentLengthControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
$c/= :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
== :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
$c== :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
Prelude.Eq,
      Eq HlsSegmentLengthControl
Eq HlsSegmentLengthControl
-> (HlsSegmentLengthControl -> HlsSegmentLengthControl -> Ordering)
-> (HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool)
-> (HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool)
-> (HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool)
-> (HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool)
-> (HlsSegmentLengthControl
    -> HlsSegmentLengthControl -> HlsSegmentLengthControl)
-> (HlsSegmentLengthControl
    -> HlsSegmentLengthControl -> HlsSegmentLengthControl)
-> Ord HlsSegmentLengthControl
HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
HlsSegmentLengthControl -> HlsSegmentLengthControl -> Ordering
HlsSegmentLengthControl
-> HlsSegmentLengthControl -> HlsSegmentLengthControl
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 :: HlsSegmentLengthControl
-> HlsSegmentLengthControl -> HlsSegmentLengthControl
$cmin :: HlsSegmentLengthControl
-> HlsSegmentLengthControl -> HlsSegmentLengthControl
max :: HlsSegmentLengthControl
-> HlsSegmentLengthControl -> HlsSegmentLengthControl
$cmax :: HlsSegmentLengthControl
-> HlsSegmentLengthControl -> HlsSegmentLengthControl
>= :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
$c>= :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
> :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
$c> :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
<= :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
$c<= :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
< :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
$c< :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Bool
compare :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Ordering
$ccompare :: HlsSegmentLengthControl -> HlsSegmentLengthControl -> Ordering
$cp1Ord :: Eq HlsSegmentLengthControl
Prelude.Ord,
      (forall x.
 HlsSegmentLengthControl -> Rep HlsSegmentLengthControl x)
-> (forall x.
    Rep HlsSegmentLengthControl x -> HlsSegmentLengthControl)
-> Generic HlsSegmentLengthControl
forall x. Rep HlsSegmentLengthControl x -> HlsSegmentLengthControl
forall x. HlsSegmentLengthControl -> Rep HlsSegmentLengthControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsSegmentLengthControl x -> HlsSegmentLengthControl
$cfrom :: forall x. HlsSegmentLengthControl -> Rep HlsSegmentLengthControl x
Prelude.Generic
    )
  deriving newtype
    ( Int -> HlsSegmentLengthControl -> Int
HlsSegmentLengthControl -> Int
(Int -> HlsSegmentLengthControl -> Int)
-> (HlsSegmentLengthControl -> Int)
-> Hashable HlsSegmentLengthControl
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: HlsSegmentLengthControl -> Int
$chash :: HlsSegmentLengthControl -> Int
hashWithSalt :: Int -> HlsSegmentLengthControl -> Int
$chashWithSalt :: Int -> HlsSegmentLengthControl -> Int
Prelude.Hashable,
      HlsSegmentLengthControl -> ()
(HlsSegmentLengthControl -> ()) -> NFData HlsSegmentLengthControl
forall a. (a -> ()) -> NFData a
rnf :: HlsSegmentLengthControl -> ()
$crnf :: HlsSegmentLengthControl -> ()
Prelude.NFData,
      Text -> Either String HlsSegmentLengthControl
(Text -> Either String HlsSegmentLengthControl)
-> FromText HlsSegmentLengthControl
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String HlsSegmentLengthControl
$cfromText :: Text -> Either String HlsSegmentLengthControl
Core.FromText,
      HlsSegmentLengthControl -> Text
(HlsSegmentLengthControl -> Text) -> ToText HlsSegmentLengthControl
forall a. (a -> Text) -> ToText a
toText :: HlsSegmentLengthControl -> Text
$ctoText :: HlsSegmentLengthControl -> Text
Core.ToText,
      HlsSegmentLengthControl -> ByteString
(HlsSegmentLengthControl -> ByteString)
-> ToByteString HlsSegmentLengthControl
forall a. (a -> ByteString) -> ToByteString a
toBS :: HlsSegmentLengthControl -> ByteString
$ctoBS :: HlsSegmentLengthControl -> ByteString
Core.ToByteString,
      HlsSegmentLengthControl -> ByteStringBuilder
(HlsSegmentLengthControl -> ByteStringBuilder)
-> ToLog HlsSegmentLengthControl
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: HlsSegmentLengthControl -> ByteStringBuilder
$cbuild :: HlsSegmentLengthControl -> ByteStringBuilder
Core.ToLog,
      HeaderName -> HlsSegmentLengthControl -> [Header]
(HeaderName -> HlsSegmentLengthControl -> [Header])
-> ToHeader HlsSegmentLengthControl
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> HlsSegmentLengthControl -> [Header]
$ctoHeader :: HeaderName -> HlsSegmentLengthControl -> [Header]
Core.ToHeader,
      HlsSegmentLengthControl -> QueryString
(HlsSegmentLengthControl -> QueryString)
-> ToQuery HlsSegmentLengthControl
forall a. (a -> QueryString) -> ToQuery a
toQuery :: HlsSegmentLengthControl -> QueryString
$ctoQuery :: HlsSegmentLengthControl -> QueryString
Core.ToQuery,
      Value -> Parser [HlsSegmentLengthControl]
Value -> Parser HlsSegmentLengthControl
(Value -> Parser HlsSegmentLengthControl)
-> (Value -> Parser [HlsSegmentLengthControl])
-> FromJSON HlsSegmentLengthControl
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [HlsSegmentLengthControl]
$cparseJSONList :: Value -> Parser [HlsSegmentLengthControl]
parseJSON :: Value -> Parser HlsSegmentLengthControl
$cparseJSON :: Value -> Parser HlsSegmentLengthControl
Core.FromJSON,
      FromJSONKeyFunction [HlsSegmentLengthControl]
FromJSONKeyFunction HlsSegmentLengthControl
FromJSONKeyFunction HlsSegmentLengthControl
-> FromJSONKeyFunction [HlsSegmentLengthControl]
-> FromJSONKey HlsSegmentLengthControl
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [HlsSegmentLengthControl]
$cfromJSONKeyList :: FromJSONKeyFunction [HlsSegmentLengthControl]
fromJSONKey :: FromJSONKeyFunction HlsSegmentLengthControl
$cfromJSONKey :: FromJSONKeyFunction HlsSegmentLengthControl
Core.FromJSONKey,
      [HlsSegmentLengthControl] -> Encoding
[HlsSegmentLengthControl] -> Value
HlsSegmentLengthControl -> Encoding
HlsSegmentLengthControl -> Value
(HlsSegmentLengthControl -> Value)
-> (HlsSegmentLengthControl -> Encoding)
-> ([HlsSegmentLengthControl] -> Value)
-> ([HlsSegmentLengthControl] -> Encoding)
-> ToJSON HlsSegmentLengthControl
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [HlsSegmentLengthControl] -> Encoding
$ctoEncodingList :: [HlsSegmentLengthControl] -> Encoding
toJSONList :: [HlsSegmentLengthControl] -> Value
$ctoJSONList :: [HlsSegmentLengthControl] -> Value
toEncoding :: HlsSegmentLengthControl -> Encoding
$ctoEncoding :: HlsSegmentLengthControl -> Encoding
toJSON :: HlsSegmentLengthControl -> Value
$ctoJSON :: HlsSegmentLengthControl -> Value
Core.ToJSON,
      ToJSONKeyFunction [HlsSegmentLengthControl]
ToJSONKeyFunction HlsSegmentLengthControl
ToJSONKeyFunction HlsSegmentLengthControl
-> ToJSONKeyFunction [HlsSegmentLengthControl]
-> ToJSONKey HlsSegmentLengthControl
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [HlsSegmentLengthControl]
$ctoJSONKeyList :: ToJSONKeyFunction [HlsSegmentLengthControl]
toJSONKey :: ToJSONKeyFunction HlsSegmentLengthControl
$ctoJSONKey :: ToJSONKeyFunction HlsSegmentLengthControl
Core.ToJSONKey,
      [Node] -> Either String HlsSegmentLengthControl
([Node] -> Either String HlsSegmentLengthControl)
-> FromXML HlsSegmentLengthControl
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String HlsSegmentLengthControl
$cparseXML :: [Node] -> Either String HlsSegmentLengthControl
Core.FromXML,
      HlsSegmentLengthControl -> XML
(HlsSegmentLengthControl -> XML) -> ToXML HlsSegmentLengthControl
forall a. (a -> XML) -> ToXML a
toXML :: HlsSegmentLengthControl -> XML
$ctoXML :: HlsSegmentLengthControl -> XML
Core.ToXML
    )

pattern HlsSegmentLengthControl_EXACT :: HlsSegmentLengthControl
pattern $bHlsSegmentLengthControl_EXACT :: HlsSegmentLengthControl
$mHlsSegmentLengthControl_EXACT :: forall r.
HlsSegmentLengthControl -> (Void# -> r) -> (Void# -> r) -> r
HlsSegmentLengthControl_EXACT = HlsSegmentLengthControl' "EXACT"

pattern HlsSegmentLengthControl_GOP_MULTIPLE :: HlsSegmentLengthControl
pattern $bHlsSegmentLengthControl_GOP_MULTIPLE :: HlsSegmentLengthControl
$mHlsSegmentLengthControl_GOP_MULTIPLE :: forall r.
HlsSegmentLengthControl -> (Void# -> r) -> (Void# -> r) -> r
HlsSegmentLengthControl_GOP_MULTIPLE = HlsSegmentLengthControl' "GOP_MULTIPLE"

{-# COMPLETE
  HlsSegmentLengthControl_EXACT,
  HlsSegmentLengthControl_GOP_MULTIPLE,
  HlsSegmentLengthControl'
  #-}