{-# 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.MediaLive.Types.Scte35DeviceRestrictions
-- 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.MediaLive.Types.Scte35DeviceRestrictions
  ( Scte35DeviceRestrictions
      ( ..,
        Scte35DeviceRestrictions_NONE,
        Scte35DeviceRestrictions_RESTRICT_GROUP0,
        Scte35DeviceRestrictions_RESTRICT_GROUP1,
        Scte35DeviceRestrictions_RESTRICT_GROUP2
      ),
  )
where

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

-- | Corresponds to the device_restrictions parameter in a
-- segmentation_descriptor. If you include one of the \"restriction\" flags
-- then you must include all four of them.
newtype Scte35DeviceRestrictions = Scte35DeviceRestrictions'
  { Scte35DeviceRestrictions -> Text
fromScte35DeviceRestrictions ::
      Core.Text
  }
  deriving stock
    ( Int -> Scte35DeviceRestrictions -> ShowS
[Scte35DeviceRestrictions] -> ShowS
Scte35DeviceRestrictions -> String
(Int -> Scte35DeviceRestrictions -> ShowS)
-> (Scte35DeviceRestrictions -> String)
-> ([Scte35DeviceRestrictions] -> ShowS)
-> Show Scte35DeviceRestrictions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Scte35DeviceRestrictions] -> ShowS
$cshowList :: [Scte35DeviceRestrictions] -> ShowS
show :: Scte35DeviceRestrictions -> String
$cshow :: Scte35DeviceRestrictions -> String
showsPrec :: Int -> Scte35DeviceRestrictions -> ShowS
$cshowsPrec :: Int -> Scte35DeviceRestrictions -> ShowS
Prelude.Show,
      ReadPrec [Scte35DeviceRestrictions]
ReadPrec Scte35DeviceRestrictions
Int -> ReadS Scte35DeviceRestrictions
ReadS [Scte35DeviceRestrictions]
(Int -> ReadS Scte35DeviceRestrictions)
-> ReadS [Scte35DeviceRestrictions]
-> ReadPrec Scte35DeviceRestrictions
-> ReadPrec [Scte35DeviceRestrictions]
-> Read Scte35DeviceRestrictions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Scte35DeviceRestrictions]
$creadListPrec :: ReadPrec [Scte35DeviceRestrictions]
readPrec :: ReadPrec Scte35DeviceRestrictions
$creadPrec :: ReadPrec Scte35DeviceRestrictions
readList :: ReadS [Scte35DeviceRestrictions]
$creadList :: ReadS [Scte35DeviceRestrictions]
readsPrec :: Int -> ReadS Scte35DeviceRestrictions
$creadsPrec :: Int -> ReadS Scte35DeviceRestrictions
Prelude.Read,
      Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
(Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool)
-> (Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool)
-> Eq Scte35DeviceRestrictions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
$c/= :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
== :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
$c== :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
Prelude.Eq,
      Eq Scte35DeviceRestrictions
Eq Scte35DeviceRestrictions
-> (Scte35DeviceRestrictions
    -> Scte35DeviceRestrictions -> Ordering)
-> (Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool)
-> (Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool)
-> (Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool)
-> (Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool)
-> (Scte35DeviceRestrictions
    -> Scte35DeviceRestrictions -> Scte35DeviceRestrictions)
-> (Scte35DeviceRestrictions
    -> Scte35DeviceRestrictions -> Scte35DeviceRestrictions)
-> Ord Scte35DeviceRestrictions
Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Ordering
Scte35DeviceRestrictions
-> Scte35DeviceRestrictions -> Scte35DeviceRestrictions
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 :: Scte35DeviceRestrictions
-> Scte35DeviceRestrictions -> Scte35DeviceRestrictions
$cmin :: Scte35DeviceRestrictions
-> Scte35DeviceRestrictions -> Scte35DeviceRestrictions
max :: Scte35DeviceRestrictions
-> Scte35DeviceRestrictions -> Scte35DeviceRestrictions
$cmax :: Scte35DeviceRestrictions
-> Scte35DeviceRestrictions -> Scte35DeviceRestrictions
>= :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
$c>= :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
> :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
$c> :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
<= :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
$c<= :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
< :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
$c< :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Bool
compare :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Ordering
$ccompare :: Scte35DeviceRestrictions -> Scte35DeviceRestrictions -> Ordering
$cp1Ord :: Eq Scte35DeviceRestrictions
Prelude.Ord,
      (forall x.
 Scte35DeviceRestrictions -> Rep Scte35DeviceRestrictions x)
-> (forall x.
    Rep Scte35DeviceRestrictions x -> Scte35DeviceRestrictions)
-> Generic Scte35DeviceRestrictions
forall x.
Rep Scte35DeviceRestrictions x -> Scte35DeviceRestrictions
forall x.
Scte35DeviceRestrictions -> Rep Scte35DeviceRestrictions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Scte35DeviceRestrictions x -> Scte35DeviceRestrictions
$cfrom :: forall x.
Scte35DeviceRestrictions -> Rep Scte35DeviceRestrictions x
Prelude.Generic
    )
  deriving newtype
    ( Int -> Scte35DeviceRestrictions -> Int
Scte35DeviceRestrictions -> Int
(Int -> Scte35DeviceRestrictions -> Int)
-> (Scte35DeviceRestrictions -> Int)
-> Hashable Scte35DeviceRestrictions
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Scte35DeviceRestrictions -> Int
$chash :: Scte35DeviceRestrictions -> Int
hashWithSalt :: Int -> Scte35DeviceRestrictions -> Int
$chashWithSalt :: Int -> Scte35DeviceRestrictions -> Int
Prelude.Hashable,
      Scte35DeviceRestrictions -> ()
(Scte35DeviceRestrictions -> ()) -> NFData Scte35DeviceRestrictions
forall a. (a -> ()) -> NFData a
rnf :: Scte35DeviceRestrictions -> ()
$crnf :: Scte35DeviceRestrictions -> ()
Prelude.NFData,
      Text -> Either String Scte35DeviceRestrictions
(Text -> Either String Scte35DeviceRestrictions)
-> FromText Scte35DeviceRestrictions
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String Scte35DeviceRestrictions
$cfromText :: Text -> Either String Scte35DeviceRestrictions
Core.FromText,
      Scte35DeviceRestrictions -> Text
(Scte35DeviceRestrictions -> Text)
-> ToText Scte35DeviceRestrictions
forall a. (a -> Text) -> ToText a
toText :: Scte35DeviceRestrictions -> Text
$ctoText :: Scte35DeviceRestrictions -> Text
Core.ToText,
      Scte35DeviceRestrictions -> ByteString
(Scte35DeviceRestrictions -> ByteString)
-> ToByteString Scte35DeviceRestrictions
forall a. (a -> ByteString) -> ToByteString a
toBS :: Scte35DeviceRestrictions -> ByteString
$ctoBS :: Scte35DeviceRestrictions -> ByteString
Core.ToByteString,
      Scte35DeviceRestrictions -> ByteStringBuilder
(Scte35DeviceRestrictions -> ByteStringBuilder)
-> ToLog Scte35DeviceRestrictions
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: Scte35DeviceRestrictions -> ByteStringBuilder
$cbuild :: Scte35DeviceRestrictions -> ByteStringBuilder
Core.ToLog,
      HeaderName -> Scte35DeviceRestrictions -> [Header]
(HeaderName -> Scte35DeviceRestrictions -> [Header])
-> ToHeader Scte35DeviceRestrictions
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> Scte35DeviceRestrictions -> [Header]
$ctoHeader :: HeaderName -> Scte35DeviceRestrictions -> [Header]
Core.ToHeader,
      Scte35DeviceRestrictions -> QueryString
(Scte35DeviceRestrictions -> QueryString)
-> ToQuery Scte35DeviceRestrictions
forall a. (a -> QueryString) -> ToQuery a
toQuery :: Scte35DeviceRestrictions -> QueryString
$ctoQuery :: Scte35DeviceRestrictions -> QueryString
Core.ToQuery,
      Value -> Parser [Scte35DeviceRestrictions]
Value -> Parser Scte35DeviceRestrictions
(Value -> Parser Scte35DeviceRestrictions)
-> (Value -> Parser [Scte35DeviceRestrictions])
-> FromJSON Scte35DeviceRestrictions
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Scte35DeviceRestrictions]
$cparseJSONList :: Value -> Parser [Scte35DeviceRestrictions]
parseJSON :: Value -> Parser Scte35DeviceRestrictions
$cparseJSON :: Value -> Parser Scte35DeviceRestrictions
Core.FromJSON,
      FromJSONKeyFunction [Scte35DeviceRestrictions]
FromJSONKeyFunction Scte35DeviceRestrictions
FromJSONKeyFunction Scte35DeviceRestrictions
-> FromJSONKeyFunction [Scte35DeviceRestrictions]
-> FromJSONKey Scte35DeviceRestrictions
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [Scte35DeviceRestrictions]
$cfromJSONKeyList :: FromJSONKeyFunction [Scte35DeviceRestrictions]
fromJSONKey :: FromJSONKeyFunction Scte35DeviceRestrictions
$cfromJSONKey :: FromJSONKeyFunction Scte35DeviceRestrictions
Core.FromJSONKey,
      [Scte35DeviceRestrictions] -> Encoding
[Scte35DeviceRestrictions] -> Value
Scte35DeviceRestrictions -> Encoding
Scte35DeviceRestrictions -> Value
(Scte35DeviceRestrictions -> Value)
-> (Scte35DeviceRestrictions -> Encoding)
-> ([Scte35DeviceRestrictions] -> Value)
-> ([Scte35DeviceRestrictions] -> Encoding)
-> ToJSON Scte35DeviceRestrictions
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Scte35DeviceRestrictions] -> Encoding
$ctoEncodingList :: [Scte35DeviceRestrictions] -> Encoding
toJSONList :: [Scte35DeviceRestrictions] -> Value
$ctoJSONList :: [Scte35DeviceRestrictions] -> Value
toEncoding :: Scte35DeviceRestrictions -> Encoding
$ctoEncoding :: Scte35DeviceRestrictions -> Encoding
toJSON :: Scte35DeviceRestrictions -> Value
$ctoJSON :: Scte35DeviceRestrictions -> Value
Core.ToJSON,
      ToJSONKeyFunction [Scte35DeviceRestrictions]
ToJSONKeyFunction Scte35DeviceRestrictions
ToJSONKeyFunction Scte35DeviceRestrictions
-> ToJSONKeyFunction [Scte35DeviceRestrictions]
-> ToJSONKey Scte35DeviceRestrictions
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [Scte35DeviceRestrictions]
$ctoJSONKeyList :: ToJSONKeyFunction [Scte35DeviceRestrictions]
toJSONKey :: ToJSONKeyFunction Scte35DeviceRestrictions
$ctoJSONKey :: ToJSONKeyFunction Scte35DeviceRestrictions
Core.ToJSONKey,
      [Node] -> Either String Scte35DeviceRestrictions
([Node] -> Either String Scte35DeviceRestrictions)
-> FromXML Scte35DeviceRestrictions
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String Scte35DeviceRestrictions
$cparseXML :: [Node] -> Either String Scte35DeviceRestrictions
Core.FromXML,
      Scte35DeviceRestrictions -> XML
(Scte35DeviceRestrictions -> XML) -> ToXML Scte35DeviceRestrictions
forall a. (a -> XML) -> ToXML a
toXML :: Scte35DeviceRestrictions -> XML
$ctoXML :: Scte35DeviceRestrictions -> XML
Core.ToXML
    )

pattern Scte35DeviceRestrictions_NONE :: Scte35DeviceRestrictions
pattern $bScte35DeviceRestrictions_NONE :: Scte35DeviceRestrictions
$mScte35DeviceRestrictions_NONE :: forall r.
Scte35DeviceRestrictions -> (Void# -> r) -> (Void# -> r) -> r
Scte35DeviceRestrictions_NONE = Scte35DeviceRestrictions' "NONE"

pattern Scte35DeviceRestrictions_RESTRICT_GROUP0 :: Scte35DeviceRestrictions
pattern $bScte35DeviceRestrictions_RESTRICT_GROUP0 :: Scte35DeviceRestrictions
$mScte35DeviceRestrictions_RESTRICT_GROUP0 :: forall r.
Scte35DeviceRestrictions -> (Void# -> r) -> (Void# -> r) -> r
Scte35DeviceRestrictions_RESTRICT_GROUP0 = Scte35DeviceRestrictions' "RESTRICT_GROUP0"

pattern Scte35DeviceRestrictions_RESTRICT_GROUP1 :: Scte35DeviceRestrictions
pattern $bScte35DeviceRestrictions_RESTRICT_GROUP1 :: Scte35DeviceRestrictions
$mScte35DeviceRestrictions_RESTRICT_GROUP1 :: forall r.
Scte35DeviceRestrictions -> (Void# -> r) -> (Void# -> r) -> r
Scte35DeviceRestrictions_RESTRICT_GROUP1 = Scte35DeviceRestrictions' "RESTRICT_GROUP1"

pattern Scte35DeviceRestrictions_RESTRICT_GROUP2 :: Scte35DeviceRestrictions
pattern $bScte35DeviceRestrictions_RESTRICT_GROUP2 :: Scte35DeviceRestrictions
$mScte35DeviceRestrictions_RESTRICT_GROUP2 :: forall r.
Scte35DeviceRestrictions -> (Void# -> r) -> (Void# -> r) -> r
Scte35DeviceRestrictions_RESTRICT_GROUP2 = Scte35DeviceRestrictions' "RESTRICT_GROUP2"

{-# COMPLETE
  Scte35DeviceRestrictions_NONE,
  Scte35DeviceRestrictions_RESTRICT_GROUP0,
  Scte35DeviceRestrictions_RESTRICT_GROUP1,
  Scte35DeviceRestrictions_RESTRICT_GROUP2,
  Scte35DeviceRestrictions'
  #-}