{-# 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.BillingConductor.Types.PricingRuleType
-- 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.BillingConductor.Types.PricingRuleType
  ( PricingRuleType
      ( ..,
        PricingRuleType_DISCOUNT,
        PricingRuleType_MARKUP,
        PricingRuleType_TIERING
      ),
  )
where

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

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

pattern PricingRuleType_DISCOUNT :: PricingRuleType
pattern $bPricingRuleType_DISCOUNT :: PricingRuleType
$mPricingRuleType_DISCOUNT :: forall {r}. PricingRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
PricingRuleType_DISCOUNT = PricingRuleType' "DISCOUNT"

pattern PricingRuleType_MARKUP :: PricingRuleType
pattern $bPricingRuleType_MARKUP :: PricingRuleType
$mPricingRuleType_MARKUP :: forall {r}. PricingRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
PricingRuleType_MARKUP = PricingRuleType' "MARKUP"

pattern PricingRuleType_TIERING :: PricingRuleType
pattern $bPricingRuleType_TIERING :: PricingRuleType
$mPricingRuleType_TIERING :: forall {r}. PricingRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
PricingRuleType_TIERING = PricingRuleType' "TIERING"

{-# COMPLETE
  PricingRuleType_DISCOUNT,
  PricingRuleType_MARKUP,
  PricingRuleType_TIERING,
  PricingRuleType'
  #-}