{-# 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.CopyProtectionAction
-- 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.CopyProtectionAction
  ( CopyProtectionAction
      ( ..,
        CopyProtectionAction_PASSTHROUGH,
        CopyProtectionAction_STRIP
      ),
  )
where

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

-- | The action to take on copy and redistribution control XDS packets. If
-- you select PASSTHROUGH, packets will not be changed. If you select
-- STRIP, any packets will be removed in output captions.
newtype CopyProtectionAction = CopyProtectionAction'
  { CopyProtectionAction -> Text
fromCopyProtectionAction ::
      Core.Text
  }
  deriving stock
    ( Int -> CopyProtectionAction -> ShowS
[CopyProtectionAction] -> ShowS
CopyProtectionAction -> String
(Int -> CopyProtectionAction -> ShowS)
-> (CopyProtectionAction -> String)
-> ([CopyProtectionAction] -> ShowS)
-> Show CopyProtectionAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyProtectionAction] -> ShowS
$cshowList :: [CopyProtectionAction] -> ShowS
show :: CopyProtectionAction -> String
$cshow :: CopyProtectionAction -> String
showsPrec :: Int -> CopyProtectionAction -> ShowS
$cshowsPrec :: Int -> CopyProtectionAction -> ShowS
Prelude.Show,
      ReadPrec [CopyProtectionAction]
ReadPrec CopyProtectionAction
Int -> ReadS CopyProtectionAction
ReadS [CopyProtectionAction]
(Int -> ReadS CopyProtectionAction)
-> ReadS [CopyProtectionAction]
-> ReadPrec CopyProtectionAction
-> ReadPrec [CopyProtectionAction]
-> Read CopyProtectionAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyProtectionAction]
$creadListPrec :: ReadPrec [CopyProtectionAction]
readPrec :: ReadPrec CopyProtectionAction
$creadPrec :: ReadPrec CopyProtectionAction
readList :: ReadS [CopyProtectionAction]
$creadList :: ReadS [CopyProtectionAction]
readsPrec :: Int -> ReadS CopyProtectionAction
$creadsPrec :: Int -> ReadS CopyProtectionAction
Prelude.Read,
      CopyProtectionAction -> CopyProtectionAction -> Bool
(CopyProtectionAction -> CopyProtectionAction -> Bool)
-> (CopyProtectionAction -> CopyProtectionAction -> Bool)
-> Eq CopyProtectionAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyProtectionAction -> CopyProtectionAction -> Bool
$c/= :: CopyProtectionAction -> CopyProtectionAction -> Bool
== :: CopyProtectionAction -> CopyProtectionAction -> Bool
$c== :: CopyProtectionAction -> CopyProtectionAction -> Bool
Prelude.Eq,
      Eq CopyProtectionAction
Eq CopyProtectionAction
-> (CopyProtectionAction -> CopyProtectionAction -> Ordering)
-> (CopyProtectionAction -> CopyProtectionAction -> Bool)
-> (CopyProtectionAction -> CopyProtectionAction -> Bool)
-> (CopyProtectionAction -> CopyProtectionAction -> Bool)
-> (CopyProtectionAction -> CopyProtectionAction -> Bool)
-> (CopyProtectionAction
    -> CopyProtectionAction -> CopyProtectionAction)
-> (CopyProtectionAction
    -> CopyProtectionAction -> CopyProtectionAction)
-> Ord CopyProtectionAction
CopyProtectionAction -> CopyProtectionAction -> Bool
CopyProtectionAction -> CopyProtectionAction -> Ordering
CopyProtectionAction
-> CopyProtectionAction -> CopyProtectionAction
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 :: CopyProtectionAction
-> CopyProtectionAction -> CopyProtectionAction
$cmin :: CopyProtectionAction
-> CopyProtectionAction -> CopyProtectionAction
max :: CopyProtectionAction
-> CopyProtectionAction -> CopyProtectionAction
$cmax :: CopyProtectionAction
-> CopyProtectionAction -> CopyProtectionAction
>= :: CopyProtectionAction -> CopyProtectionAction -> Bool
$c>= :: CopyProtectionAction -> CopyProtectionAction -> Bool
> :: CopyProtectionAction -> CopyProtectionAction -> Bool
$c> :: CopyProtectionAction -> CopyProtectionAction -> Bool
<= :: CopyProtectionAction -> CopyProtectionAction -> Bool
$c<= :: CopyProtectionAction -> CopyProtectionAction -> Bool
< :: CopyProtectionAction -> CopyProtectionAction -> Bool
$c< :: CopyProtectionAction -> CopyProtectionAction -> Bool
compare :: CopyProtectionAction -> CopyProtectionAction -> Ordering
$ccompare :: CopyProtectionAction -> CopyProtectionAction -> Ordering
$cp1Ord :: Eq CopyProtectionAction
Prelude.Ord,
      (forall x. CopyProtectionAction -> Rep CopyProtectionAction x)
-> (forall x. Rep CopyProtectionAction x -> CopyProtectionAction)
-> Generic CopyProtectionAction
forall x. Rep CopyProtectionAction x -> CopyProtectionAction
forall x. CopyProtectionAction -> Rep CopyProtectionAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyProtectionAction x -> CopyProtectionAction
$cfrom :: forall x. CopyProtectionAction -> Rep CopyProtectionAction x
Prelude.Generic
    )
  deriving newtype
    ( Int -> CopyProtectionAction -> Int
CopyProtectionAction -> Int
(Int -> CopyProtectionAction -> Int)
-> (CopyProtectionAction -> Int) -> Hashable CopyProtectionAction
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CopyProtectionAction -> Int
$chash :: CopyProtectionAction -> Int
hashWithSalt :: Int -> CopyProtectionAction -> Int
$chashWithSalt :: Int -> CopyProtectionAction -> Int
Prelude.Hashable,
      CopyProtectionAction -> ()
(CopyProtectionAction -> ()) -> NFData CopyProtectionAction
forall a. (a -> ()) -> NFData a
rnf :: CopyProtectionAction -> ()
$crnf :: CopyProtectionAction -> ()
Prelude.NFData,
      Text -> Either String CopyProtectionAction
(Text -> Either String CopyProtectionAction)
-> FromText CopyProtectionAction
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CopyProtectionAction
$cfromText :: Text -> Either String CopyProtectionAction
Core.FromText,
      CopyProtectionAction -> Text
(CopyProtectionAction -> Text) -> ToText CopyProtectionAction
forall a. (a -> Text) -> ToText a
toText :: CopyProtectionAction -> Text
$ctoText :: CopyProtectionAction -> Text
Core.ToText,
      CopyProtectionAction -> ByteString
(CopyProtectionAction -> ByteString)
-> ToByteString CopyProtectionAction
forall a. (a -> ByteString) -> ToByteString a
toBS :: CopyProtectionAction -> ByteString
$ctoBS :: CopyProtectionAction -> ByteString
Core.ToByteString,
      CopyProtectionAction -> ByteStringBuilder
(CopyProtectionAction -> ByteStringBuilder)
-> ToLog CopyProtectionAction
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CopyProtectionAction -> ByteStringBuilder
$cbuild :: CopyProtectionAction -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CopyProtectionAction -> [Header]
(HeaderName -> CopyProtectionAction -> [Header])
-> ToHeader CopyProtectionAction
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CopyProtectionAction -> [Header]
$ctoHeader :: HeaderName -> CopyProtectionAction -> [Header]
Core.ToHeader,
      CopyProtectionAction -> QueryString
(CopyProtectionAction -> QueryString)
-> ToQuery CopyProtectionAction
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CopyProtectionAction -> QueryString
$ctoQuery :: CopyProtectionAction -> QueryString
Core.ToQuery,
      Value -> Parser [CopyProtectionAction]
Value -> Parser CopyProtectionAction
(Value -> Parser CopyProtectionAction)
-> (Value -> Parser [CopyProtectionAction])
-> FromJSON CopyProtectionAction
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CopyProtectionAction]
$cparseJSONList :: Value -> Parser [CopyProtectionAction]
parseJSON :: Value -> Parser CopyProtectionAction
$cparseJSON :: Value -> Parser CopyProtectionAction
Core.FromJSON,
      FromJSONKeyFunction [CopyProtectionAction]
FromJSONKeyFunction CopyProtectionAction
FromJSONKeyFunction CopyProtectionAction
-> FromJSONKeyFunction [CopyProtectionAction]
-> FromJSONKey CopyProtectionAction
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CopyProtectionAction]
$cfromJSONKeyList :: FromJSONKeyFunction [CopyProtectionAction]
fromJSONKey :: FromJSONKeyFunction CopyProtectionAction
$cfromJSONKey :: FromJSONKeyFunction CopyProtectionAction
Core.FromJSONKey,
      [CopyProtectionAction] -> Encoding
[CopyProtectionAction] -> Value
CopyProtectionAction -> Encoding
CopyProtectionAction -> Value
(CopyProtectionAction -> Value)
-> (CopyProtectionAction -> Encoding)
-> ([CopyProtectionAction] -> Value)
-> ([CopyProtectionAction] -> Encoding)
-> ToJSON CopyProtectionAction
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CopyProtectionAction] -> Encoding
$ctoEncodingList :: [CopyProtectionAction] -> Encoding
toJSONList :: [CopyProtectionAction] -> Value
$ctoJSONList :: [CopyProtectionAction] -> Value
toEncoding :: CopyProtectionAction -> Encoding
$ctoEncoding :: CopyProtectionAction -> Encoding
toJSON :: CopyProtectionAction -> Value
$ctoJSON :: CopyProtectionAction -> Value
Core.ToJSON,
      ToJSONKeyFunction [CopyProtectionAction]
ToJSONKeyFunction CopyProtectionAction
ToJSONKeyFunction CopyProtectionAction
-> ToJSONKeyFunction [CopyProtectionAction]
-> ToJSONKey CopyProtectionAction
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CopyProtectionAction]
$ctoJSONKeyList :: ToJSONKeyFunction [CopyProtectionAction]
toJSONKey :: ToJSONKeyFunction CopyProtectionAction
$ctoJSONKey :: ToJSONKeyFunction CopyProtectionAction
Core.ToJSONKey,
      [Node] -> Either String CopyProtectionAction
([Node] -> Either String CopyProtectionAction)
-> FromXML CopyProtectionAction
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CopyProtectionAction
$cparseXML :: [Node] -> Either String CopyProtectionAction
Core.FromXML,
      CopyProtectionAction -> XML
(CopyProtectionAction -> XML) -> ToXML CopyProtectionAction
forall a. (a -> XML) -> ToXML a
toXML :: CopyProtectionAction -> XML
$ctoXML :: CopyProtectionAction -> XML
Core.ToXML
    )

pattern CopyProtectionAction_PASSTHROUGH :: CopyProtectionAction
pattern $bCopyProtectionAction_PASSTHROUGH :: CopyProtectionAction
$mCopyProtectionAction_PASSTHROUGH :: forall r. CopyProtectionAction -> (Void# -> r) -> (Void# -> r) -> r
CopyProtectionAction_PASSTHROUGH = CopyProtectionAction' "PASSTHROUGH"

pattern CopyProtectionAction_STRIP :: CopyProtectionAction
pattern $bCopyProtectionAction_STRIP :: CopyProtectionAction
$mCopyProtectionAction_STRIP :: forall r. CopyProtectionAction -> (Void# -> r) -> (Void# -> r) -> r
CopyProtectionAction_STRIP = CopyProtectionAction' "STRIP"

{-# COMPLETE
  CopyProtectionAction_PASSTHROUGH,
  CopyProtectionAction_STRIP,
  CopyProtectionAction'
  #-}