{-# 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.Origination
-- 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.MediaPackage.Types.Origination
  ( Origination
      ( ..,
        Origination_ALLOW,
        Origination_DENY
      ),
  )
where

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

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

pattern Origination_ALLOW :: Origination
pattern $bOrigination_ALLOW :: Origination
$mOrigination_ALLOW :: forall r. Origination -> (Void# -> r) -> (Void# -> r) -> r
Origination_ALLOW = Origination' "ALLOW"

pattern Origination_DENY :: Origination
pattern $bOrigination_DENY :: Origination
$mOrigination_DENY :: forall r. Origination -> (Void# -> r) -> (Void# -> r) -> r
Origination_DENY = Origination' "DENY"

{-# COMPLETE
  Origination_ALLOW,
  Origination_DENY,
  Origination'
  #-}