{-# 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-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.CmafSegmentLengthControl
  ( CmafSegmentLengthControl
      ( ..,
        CmafSegmentLengthControl_EXACT,
        CmafSegmentLengthControl_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 CmafSegmentLengthControl = CmafSegmentLengthControl'
  { CmafSegmentLengthControl -> Text
fromCmafSegmentLengthControl ::
      Core.Text
  }
  deriving stock
    ( Int -> CmafSegmentLengthControl -> ShowS
[CmafSegmentLengthControl] -> ShowS
CmafSegmentLengthControl -> String
(Int -> CmafSegmentLengthControl -> ShowS)
-> (CmafSegmentLengthControl -> String)
-> ([CmafSegmentLengthControl] -> ShowS)
-> Show CmafSegmentLengthControl
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]
(Int -> ReadS CmafSegmentLengthControl)
-> ReadS [CmafSegmentLengthControl]
-> ReadPrec CmafSegmentLengthControl
-> ReadPrec [CmafSegmentLengthControl]
-> Read 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
(CmafSegmentLengthControl -> CmafSegmentLengthControl -> Bool)
-> (CmafSegmentLengthControl -> CmafSegmentLengthControl -> Bool)
-> Eq CmafSegmentLengthControl
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
Eq CmafSegmentLengthControl
-> (CmafSegmentLengthControl
    -> CmafSegmentLengthControl -> Ordering)
-> (CmafSegmentLengthControl -> CmafSegmentLengthControl -> Bool)
-> (CmafSegmentLengthControl -> CmafSegmentLengthControl -> Bool)
-> (CmafSegmentLengthControl -> CmafSegmentLengthControl -> Bool)
-> (CmafSegmentLengthControl -> CmafSegmentLengthControl -> Bool)
-> (CmafSegmentLengthControl
    -> CmafSegmentLengthControl -> CmafSegmentLengthControl)
-> (CmafSegmentLengthControl
    -> CmafSegmentLengthControl -> CmafSegmentLengthControl)
-> Ord 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
$cp1Ord :: Eq CmafSegmentLengthControl
Prelude.Ord,
      (forall x.
 CmafSegmentLengthControl -> Rep CmafSegmentLengthControl x)
-> (forall x.
    Rep CmafSegmentLengthControl x -> CmafSegmentLengthControl)
-> Generic CmafSegmentLengthControl
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
    ( Int -> CmafSegmentLengthControl -> Int
CmafSegmentLengthControl -> Int
(Int -> CmafSegmentLengthControl -> Int)
-> (CmafSegmentLengthControl -> Int)
-> Hashable CmafSegmentLengthControl
forall 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 -> ()
(CmafSegmentLengthControl -> ()) -> NFData CmafSegmentLengthControl
forall a. (a -> ()) -> NFData a
rnf :: CmafSegmentLengthControl -> ()
$crnf :: CmafSegmentLengthControl -> ()
Prelude.NFData,
      Text -> Either String CmafSegmentLengthControl
(Text -> Either String CmafSegmentLengthControl)
-> FromText CmafSegmentLengthControl
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CmafSegmentLengthControl
$cfromText :: Text -> Either String CmafSegmentLengthControl
Core.FromText,
      CmafSegmentLengthControl -> Text
(CmafSegmentLengthControl -> Text)
-> ToText CmafSegmentLengthControl
forall a. (a -> Text) -> ToText a
toText :: CmafSegmentLengthControl -> Text
$ctoText :: CmafSegmentLengthControl -> Text
Core.ToText,
      CmafSegmentLengthControl -> ByteString
(CmafSegmentLengthControl -> ByteString)
-> ToByteString CmafSegmentLengthControl
forall a. (a -> ByteString) -> ToByteString a
toBS :: CmafSegmentLengthControl -> ByteString
$ctoBS :: CmafSegmentLengthControl -> ByteString
Core.ToByteString,
      CmafSegmentLengthControl -> ByteStringBuilder
(CmafSegmentLengthControl -> ByteStringBuilder)
-> ToLog CmafSegmentLengthControl
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CmafSegmentLengthControl -> ByteStringBuilder
$cbuild :: CmafSegmentLengthControl -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CmafSegmentLengthControl -> [Header]
(HeaderName -> CmafSegmentLengthControl -> [Header])
-> ToHeader CmafSegmentLengthControl
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CmafSegmentLengthControl -> [Header]
$ctoHeader :: HeaderName -> CmafSegmentLengthControl -> [Header]
Core.ToHeader,
      CmafSegmentLengthControl -> QueryString
(CmafSegmentLengthControl -> QueryString)
-> ToQuery CmafSegmentLengthControl
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CmafSegmentLengthControl -> QueryString
$ctoQuery :: CmafSegmentLengthControl -> QueryString
Core.ToQuery,
      Value -> Parser [CmafSegmentLengthControl]
Value -> Parser CmafSegmentLengthControl
(Value -> Parser CmafSegmentLengthControl)
-> (Value -> Parser [CmafSegmentLengthControl])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [CmafSegmentLengthControl]
FromJSONKeyFunction CmafSegmentLengthControl
FromJSONKeyFunction CmafSegmentLengthControl
-> FromJSONKeyFunction [CmafSegmentLengthControl]
-> FromJSONKey CmafSegmentLengthControl
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CmafSegmentLengthControl]
$cfromJSONKeyList :: FromJSONKeyFunction [CmafSegmentLengthControl]
fromJSONKey :: FromJSONKeyFunction CmafSegmentLengthControl
$cfromJSONKey :: FromJSONKeyFunction CmafSegmentLengthControl
Core.FromJSONKey,
      [CmafSegmentLengthControl] -> Encoding
[CmafSegmentLengthControl] -> Value
CmafSegmentLengthControl -> Encoding
CmafSegmentLengthControl -> Value
(CmafSegmentLengthControl -> Value)
-> (CmafSegmentLengthControl -> Encoding)
-> ([CmafSegmentLengthControl] -> Value)
-> ([CmafSegmentLengthControl] -> Encoding)
-> ToJSON CmafSegmentLengthControl
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
Core.ToJSON,
      ToJSONKeyFunction [CmafSegmentLengthControl]
ToJSONKeyFunction CmafSegmentLengthControl
ToJSONKeyFunction CmafSegmentLengthControl
-> ToJSONKeyFunction [CmafSegmentLengthControl]
-> ToJSONKey CmafSegmentLengthControl
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CmafSegmentLengthControl]
$ctoJSONKeyList :: ToJSONKeyFunction [CmafSegmentLengthControl]
toJSONKey :: ToJSONKeyFunction CmafSegmentLengthControl
$ctoJSONKey :: ToJSONKeyFunction CmafSegmentLengthControl
Core.ToJSONKey,
      [Node] -> Either String CmafSegmentLengthControl
([Node] -> Either String CmafSegmentLengthControl)
-> FromXML CmafSegmentLengthControl
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CmafSegmentLengthControl
$cparseXML :: [Node] -> Either String CmafSegmentLengthControl
Core.FromXML,
      CmafSegmentLengthControl -> XML
(CmafSegmentLengthControl -> XML) -> ToXML CmafSegmentLengthControl
forall a. (a -> XML) -> ToXML a
toXML :: CmafSegmentLengthControl -> XML
$ctoXML :: CmafSegmentLengthControl -> XML
Core.ToXML
    )

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

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

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