{-# 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.OfferingType
-- 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.OfferingType
  ( OfferingType
      ( ..,
        OfferingType_NO_UPFRONT
      ),
  )
where

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

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

pattern OfferingType_NO_UPFRONT :: OfferingType
pattern $bOfferingType_NO_UPFRONT :: OfferingType
$mOfferingType_NO_UPFRONT :: forall r. OfferingType -> (Void# -> r) -> (Void# -> r) -> r
OfferingType_NO_UPFRONT = OfferingType' "NO_UPFRONT"

{-# COMPLETE
  OfferingType_NO_UPFRONT,
  OfferingType'
  #-}