{-# 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.CmafEncryptionType
-- 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.CmafEncryptionType
  ( CmafEncryptionType
      ( ..,
        CmafEncryptionType_AES_CTR,
        CmafEncryptionType_SAMPLE_AES
      ),
  )
where

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

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

pattern CmafEncryptionType_AES_CTR :: CmafEncryptionType
pattern $bCmafEncryptionType_AES_CTR :: CmafEncryptionType
$mCmafEncryptionType_AES_CTR :: forall {r}. CmafEncryptionType -> ((# #) -> r) -> ((# #) -> r) -> r
CmafEncryptionType_AES_CTR = CmafEncryptionType' "AES_CTR"

pattern CmafEncryptionType_SAMPLE_AES :: CmafEncryptionType
pattern $bCmafEncryptionType_SAMPLE_AES :: CmafEncryptionType
$mCmafEncryptionType_SAMPLE_AES :: forall {r}. CmafEncryptionType -> ((# #) -> r) -> ((# #) -> r) -> r
CmafEncryptionType_SAMPLE_AES = CmafEncryptionType' "SAMPLE_AES"

{-# COMPLETE
  CmafEncryptionType_AES_CTR,
  CmafEncryptionType_SAMPLE_AES,
  CmafEncryptionType'
  #-}