{-# 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.MsSmoothFragmentLengthControl
-- 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.MsSmoothFragmentLengthControl
  ( MsSmoothFragmentLengthControl
      ( ..,
        MsSmoothFragmentLengthControl_EXACT,
        MsSmoothFragmentLengthControl_GOP_MULTIPLE
      ),
  )
where

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

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

pattern MsSmoothFragmentLengthControl_EXACT :: MsSmoothFragmentLengthControl
pattern $bMsSmoothFragmentLengthControl_EXACT :: MsSmoothFragmentLengthControl
$mMsSmoothFragmentLengthControl_EXACT :: forall r.
MsSmoothFragmentLengthControl -> (Void# -> r) -> (Void# -> r) -> r
MsSmoothFragmentLengthControl_EXACT = MsSmoothFragmentLengthControl' "EXACT"

pattern MsSmoothFragmentLengthControl_GOP_MULTIPLE :: MsSmoothFragmentLengthControl
pattern $bMsSmoothFragmentLengthControl_GOP_MULTIPLE :: MsSmoothFragmentLengthControl
$mMsSmoothFragmentLengthControl_GOP_MULTIPLE :: forall r.
MsSmoothFragmentLengthControl -> (Void# -> r) -> (Void# -> r) -> r
MsSmoothFragmentLengthControl_GOP_MULTIPLE = MsSmoothFragmentLengthControl' "GOP_MULTIPLE"

{-# COMPLETE
  MsSmoothFragmentLengthControl_EXACT,
  MsSmoothFragmentLengthControl_GOP_MULTIPLE,
  MsSmoothFragmentLengthControl'
  #-}