{-# 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.CmafSegmentLengthControl
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.CmafSegmentLengthControl
  ( CmafSegmentLengthControl
      ( ..,
        CmafSegmentLengthControl_EXACT,
        CmafSegmentLengthControl_GOP_MULTIPLE
      ),
  )
where

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

pattern CmafSegmentLengthControl_EXACT :: CmafSegmentLengthControl
pattern $bCmafSegmentLengthControl_EXACT :: CmafSegmentLengthControl
$mCmafSegmentLengthControl_EXACT :: forall {r}.
CmafSegmentLengthControl -> ((# #) -> r) -> ((# #) -> r) -> r
CmafSegmentLengthControl_EXACT = CmafSegmentLengthControl' "EXACT"

pattern CmafSegmentLengthControl_GOP_MULTIPLE :: CmafSegmentLengthControl
pattern $bCmafSegmentLengthControl_GOP_MULTIPLE :: CmafSegmentLengthControl
$mCmafSegmentLengthControl_GOP_MULTIPLE :: forall {r}.
CmafSegmentLengthControl -> ((# #) -> r) -> ((# #) -> r) -> r
CmafSegmentLengthControl_GOP_MULTIPLE = CmafSegmentLengthControl' "GOP_MULTIPLE"

{-# COMPLETE
  CmafSegmentLengthControl_EXACT,
  CmafSegmentLengthControl_GOP_MULTIPLE,
  CmafSegmentLengthControl'
  #-}