{-# 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.InputPolicy
-- 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.InputPolicy
  ( InputPolicy
      ( ..,
        InputPolicy_ALLOWED,
        InputPolicy_DISALLOWED
      ),
  )
where

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

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

pattern InputPolicy_ALLOWED :: InputPolicy
pattern $bInputPolicy_ALLOWED :: InputPolicy
$mInputPolicy_ALLOWED :: forall r. InputPolicy -> (Void# -> r) -> (Void# -> r) -> r
InputPolicy_ALLOWED = InputPolicy' "ALLOWED"

pattern InputPolicy_DISALLOWED :: InputPolicy
pattern $bInputPolicy_DISALLOWED :: InputPolicy
$mInputPolicy_DISALLOWED :: forall r. InputPolicy -> (Void# -> r) -> (Void# -> r) -> r
InputPolicy_DISALLOWED = InputPolicy' "DISALLOWED"

{-# COMPLETE
  InputPolicy_ALLOWED,
  InputPolicy_DISALLOWED,
  InputPolicy'
  #-}