{-# 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.MediaPackage.Types.AdsOnDeliveryRestrictions
-- 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.MediaPackage.Types.AdsOnDeliveryRestrictions
  ( AdsOnDeliveryRestrictions
      ( ..,
        AdsOnDeliveryRestrictions_BOTH,
        AdsOnDeliveryRestrictions_NONE,
        AdsOnDeliveryRestrictions_RESTRICTED,
        AdsOnDeliveryRestrictions_UNRESTRICTED
      ),
  )
where

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

-- | This setting allows the delivery restriction flags on SCTE-35
-- segmentation descriptors to determine whether a message signals an ad.
-- Choosing \"NONE\" means no SCTE-35 messages become ads. Choosing
-- \"RESTRICTED\" means SCTE-35 messages of the types specified in
-- AdTriggers that contain delivery restrictions will be treated as ads.
-- Choosing \"UNRESTRICTED\" means SCTE-35 messages of the types specified
-- in AdTriggers that do not contain delivery restrictions will be treated
-- as ads. Choosing \"BOTH\" means all SCTE-35 messages of the types
-- specified in AdTriggers will be treated as ads. Note that Splice Insert
-- messages do not have these flags and are always treated as ads if
-- specified in AdTriggers.
newtype AdsOnDeliveryRestrictions = AdsOnDeliveryRestrictions'
  { AdsOnDeliveryRestrictions -> Text
fromAdsOnDeliveryRestrictions ::
      Data.Text
  }
  deriving stock
    ( Int -> AdsOnDeliveryRestrictions -> ShowS
[AdsOnDeliveryRestrictions] -> ShowS
AdsOnDeliveryRestrictions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdsOnDeliveryRestrictions] -> ShowS
$cshowList :: [AdsOnDeliveryRestrictions] -> ShowS
show :: AdsOnDeliveryRestrictions -> String
$cshow :: AdsOnDeliveryRestrictions -> String
showsPrec :: Int -> AdsOnDeliveryRestrictions -> ShowS
$cshowsPrec :: Int -> AdsOnDeliveryRestrictions -> ShowS
Prelude.Show,
      ReadPrec [AdsOnDeliveryRestrictions]
ReadPrec AdsOnDeliveryRestrictions
Int -> ReadS AdsOnDeliveryRestrictions
ReadS [AdsOnDeliveryRestrictions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AdsOnDeliveryRestrictions]
$creadListPrec :: ReadPrec [AdsOnDeliveryRestrictions]
readPrec :: ReadPrec AdsOnDeliveryRestrictions
$creadPrec :: ReadPrec AdsOnDeliveryRestrictions
readList :: ReadS [AdsOnDeliveryRestrictions]
$creadList :: ReadS [AdsOnDeliveryRestrictions]
readsPrec :: Int -> ReadS AdsOnDeliveryRestrictions
$creadsPrec :: Int -> ReadS AdsOnDeliveryRestrictions
Prelude.Read,
      AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
$c/= :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
== :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
$c== :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
Prelude.Eq,
      Eq AdsOnDeliveryRestrictions
AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Ordering
AdsOnDeliveryRestrictions
-> AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions
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 :: AdsOnDeliveryRestrictions
-> AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions
$cmin :: AdsOnDeliveryRestrictions
-> AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions
max :: AdsOnDeliveryRestrictions
-> AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions
$cmax :: AdsOnDeliveryRestrictions
-> AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions
>= :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
$c>= :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
> :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
$c> :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
<= :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
$c<= :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
< :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
$c< :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Bool
compare :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Ordering
$ccompare :: AdsOnDeliveryRestrictions -> AdsOnDeliveryRestrictions -> Ordering
Prelude.Ord,
      forall x.
Rep AdsOnDeliveryRestrictions x -> AdsOnDeliveryRestrictions
forall x.
AdsOnDeliveryRestrictions -> Rep AdsOnDeliveryRestrictions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AdsOnDeliveryRestrictions x -> AdsOnDeliveryRestrictions
$cfrom :: forall x.
AdsOnDeliveryRestrictions -> Rep AdsOnDeliveryRestrictions x
Prelude.Generic
    )
  deriving newtype
    ( Eq AdsOnDeliveryRestrictions
Int -> AdsOnDeliveryRestrictions -> Int
AdsOnDeliveryRestrictions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: AdsOnDeliveryRestrictions -> Int
$chash :: AdsOnDeliveryRestrictions -> Int
hashWithSalt :: Int -> AdsOnDeliveryRestrictions -> Int
$chashWithSalt :: Int -> AdsOnDeliveryRestrictions -> Int
Prelude.Hashable,
      AdsOnDeliveryRestrictions -> ()
forall a. (a -> ()) -> NFData a
rnf :: AdsOnDeliveryRestrictions -> ()
$crnf :: AdsOnDeliveryRestrictions -> ()
Prelude.NFData,
      Text -> Either String AdsOnDeliveryRestrictions
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AdsOnDeliveryRestrictions
$cfromText :: Text -> Either String AdsOnDeliveryRestrictions
Data.FromText,
      AdsOnDeliveryRestrictions -> Text
forall a. (a -> Text) -> ToText a
toText :: AdsOnDeliveryRestrictions -> Text
$ctoText :: AdsOnDeliveryRestrictions -> Text
Data.ToText,
      AdsOnDeliveryRestrictions -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: AdsOnDeliveryRestrictions -> ByteString
$ctoBS :: AdsOnDeliveryRestrictions -> ByteString
Data.ToByteString,
      AdsOnDeliveryRestrictions -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AdsOnDeliveryRestrictions -> ByteStringBuilder
$cbuild :: AdsOnDeliveryRestrictions -> ByteStringBuilder
Data.ToLog,
      HeaderName -> AdsOnDeliveryRestrictions -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AdsOnDeliveryRestrictions -> [Header]
$ctoHeader :: HeaderName -> AdsOnDeliveryRestrictions -> [Header]
Data.ToHeader,
      AdsOnDeliveryRestrictions -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AdsOnDeliveryRestrictions -> QueryString
$ctoQuery :: AdsOnDeliveryRestrictions -> QueryString
Data.ToQuery,
      Value -> Parser [AdsOnDeliveryRestrictions]
Value -> Parser AdsOnDeliveryRestrictions
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [AdsOnDeliveryRestrictions]
$cparseJSONList :: Value -> Parser [AdsOnDeliveryRestrictions]
parseJSON :: Value -> Parser AdsOnDeliveryRestrictions
$cparseJSON :: Value -> Parser AdsOnDeliveryRestrictions
Data.FromJSON,
      FromJSONKeyFunction [AdsOnDeliveryRestrictions]
FromJSONKeyFunction AdsOnDeliveryRestrictions
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AdsOnDeliveryRestrictions]
$cfromJSONKeyList :: FromJSONKeyFunction [AdsOnDeliveryRestrictions]
fromJSONKey :: FromJSONKeyFunction AdsOnDeliveryRestrictions
$cfromJSONKey :: FromJSONKeyFunction AdsOnDeliveryRestrictions
Data.FromJSONKey,
      [AdsOnDeliveryRestrictions] -> Encoding
[AdsOnDeliveryRestrictions] -> Value
AdsOnDeliveryRestrictions -> Encoding
AdsOnDeliveryRestrictions -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AdsOnDeliveryRestrictions] -> Encoding
$ctoEncodingList :: [AdsOnDeliveryRestrictions] -> Encoding
toJSONList :: [AdsOnDeliveryRestrictions] -> Value
$ctoJSONList :: [AdsOnDeliveryRestrictions] -> Value
toEncoding :: AdsOnDeliveryRestrictions -> Encoding
$ctoEncoding :: AdsOnDeliveryRestrictions -> Encoding
toJSON :: AdsOnDeliveryRestrictions -> Value
$ctoJSON :: AdsOnDeliveryRestrictions -> Value
Data.ToJSON,
      ToJSONKeyFunction [AdsOnDeliveryRestrictions]
ToJSONKeyFunction AdsOnDeliveryRestrictions
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AdsOnDeliveryRestrictions]
$ctoJSONKeyList :: ToJSONKeyFunction [AdsOnDeliveryRestrictions]
toJSONKey :: ToJSONKeyFunction AdsOnDeliveryRestrictions
$ctoJSONKey :: ToJSONKeyFunction AdsOnDeliveryRestrictions
Data.ToJSONKey,
      [Node] -> Either String AdsOnDeliveryRestrictions
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AdsOnDeliveryRestrictions
$cparseXML :: [Node] -> Either String AdsOnDeliveryRestrictions
Data.FromXML,
      AdsOnDeliveryRestrictions -> XML
forall a. (a -> XML) -> ToXML a
toXML :: AdsOnDeliveryRestrictions -> XML
$ctoXML :: AdsOnDeliveryRestrictions -> XML
Data.ToXML
    )

pattern AdsOnDeliveryRestrictions_BOTH :: AdsOnDeliveryRestrictions
pattern $bAdsOnDeliveryRestrictions_BOTH :: AdsOnDeliveryRestrictions
$mAdsOnDeliveryRestrictions_BOTH :: forall {r}.
AdsOnDeliveryRestrictions -> ((# #) -> r) -> ((# #) -> r) -> r
AdsOnDeliveryRestrictions_BOTH = AdsOnDeliveryRestrictions' "BOTH"

pattern AdsOnDeliveryRestrictions_NONE :: AdsOnDeliveryRestrictions
pattern $bAdsOnDeliveryRestrictions_NONE :: AdsOnDeliveryRestrictions
$mAdsOnDeliveryRestrictions_NONE :: forall {r}.
AdsOnDeliveryRestrictions -> ((# #) -> r) -> ((# #) -> r) -> r
AdsOnDeliveryRestrictions_NONE = AdsOnDeliveryRestrictions' "NONE"

pattern AdsOnDeliveryRestrictions_RESTRICTED :: AdsOnDeliveryRestrictions
pattern $bAdsOnDeliveryRestrictions_RESTRICTED :: AdsOnDeliveryRestrictions
$mAdsOnDeliveryRestrictions_RESTRICTED :: forall {r}.
AdsOnDeliveryRestrictions -> ((# #) -> r) -> ((# #) -> r) -> r
AdsOnDeliveryRestrictions_RESTRICTED = AdsOnDeliveryRestrictions' "RESTRICTED"

pattern AdsOnDeliveryRestrictions_UNRESTRICTED :: AdsOnDeliveryRestrictions
pattern $bAdsOnDeliveryRestrictions_UNRESTRICTED :: AdsOnDeliveryRestrictions
$mAdsOnDeliveryRestrictions_UNRESTRICTED :: forall {r}.
AdsOnDeliveryRestrictions -> ((# #) -> r) -> ((# #) -> r) -> r
AdsOnDeliveryRestrictions_UNRESTRICTED = AdsOnDeliveryRestrictions' "UNRESTRICTED"

{-# COMPLETE
  AdsOnDeliveryRestrictions_BOTH,
  AdsOnDeliveryRestrictions_NONE,
  AdsOnDeliveryRestrictions_RESTRICTED,
  AdsOnDeliveryRestrictions_UNRESTRICTED,
  AdsOnDeliveryRestrictions'
  #-}