{-# 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.CostExplorer.Types.CostCategoryRuleType
-- 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.CostExplorer.Types.CostCategoryRuleType
  ( CostCategoryRuleType
      ( ..,
        CostCategoryRuleType_INHERITED_VALUE,
        CostCategoryRuleType_REGULAR
      ),
  )
where

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

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

pattern CostCategoryRuleType_INHERITED_VALUE :: CostCategoryRuleType
pattern $bCostCategoryRuleType_INHERITED_VALUE :: CostCategoryRuleType
$mCostCategoryRuleType_INHERITED_VALUE :: forall {r}.
CostCategoryRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
CostCategoryRuleType_INHERITED_VALUE = CostCategoryRuleType' "INHERITED_VALUE"

pattern CostCategoryRuleType_REGULAR :: CostCategoryRuleType
pattern $bCostCategoryRuleType_REGULAR :: CostCategoryRuleType
$mCostCategoryRuleType_REGULAR :: forall {r}.
CostCategoryRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
CostCategoryRuleType_REGULAR = CostCategoryRuleType' "REGULAR"

{-# COMPLETE
  CostCategoryRuleType_INHERITED_VALUE,
  CostCategoryRuleType_REGULAR,
  CostCategoryRuleType'
  #-}