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

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

newtype CostCategoryRuleType = CostCategoryRuleType'
  { CostCategoryRuleType -> Text
fromCostCategoryRuleType ::
      Core.Text
  }
  deriving stock
    ( Int -> CostCategoryRuleType -> ShowS
[CostCategoryRuleType] -> ShowS
CostCategoryRuleType -> String
(Int -> CostCategoryRuleType -> ShowS)
-> (CostCategoryRuleType -> String)
-> ([CostCategoryRuleType] -> ShowS)
-> Show CostCategoryRuleType
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]
(Int -> ReadS CostCategoryRuleType)
-> ReadS [CostCategoryRuleType]
-> ReadPrec CostCategoryRuleType
-> ReadPrec [CostCategoryRuleType]
-> Read 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
(CostCategoryRuleType -> CostCategoryRuleType -> Bool)
-> (CostCategoryRuleType -> CostCategoryRuleType -> Bool)
-> Eq CostCategoryRuleType
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
Eq CostCategoryRuleType
-> (CostCategoryRuleType -> CostCategoryRuleType -> Ordering)
-> (CostCategoryRuleType -> CostCategoryRuleType -> Bool)
-> (CostCategoryRuleType -> CostCategoryRuleType -> Bool)
-> (CostCategoryRuleType -> CostCategoryRuleType -> Bool)
-> (CostCategoryRuleType -> CostCategoryRuleType -> Bool)
-> (CostCategoryRuleType
    -> CostCategoryRuleType -> CostCategoryRuleType)
-> (CostCategoryRuleType
    -> CostCategoryRuleType -> CostCategoryRuleType)
-> Ord 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
$cp1Ord :: Eq CostCategoryRuleType
Prelude.Ord,
      (forall x. CostCategoryRuleType -> Rep CostCategoryRuleType x)
-> (forall x. Rep CostCategoryRuleType x -> CostCategoryRuleType)
-> Generic CostCategoryRuleType
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
    ( Int -> CostCategoryRuleType -> Int
CostCategoryRuleType -> Int
(Int -> CostCategoryRuleType -> Int)
-> (CostCategoryRuleType -> Int) -> Hashable CostCategoryRuleType
forall 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 -> ()
(CostCategoryRuleType -> ()) -> NFData CostCategoryRuleType
forall a. (a -> ()) -> NFData a
rnf :: CostCategoryRuleType -> ()
$crnf :: CostCategoryRuleType -> ()
Prelude.NFData,
      Text -> Either String CostCategoryRuleType
(Text -> Either String CostCategoryRuleType)
-> FromText CostCategoryRuleType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CostCategoryRuleType
$cfromText :: Text -> Either String CostCategoryRuleType
Core.FromText,
      CostCategoryRuleType -> Text
(CostCategoryRuleType -> Text) -> ToText CostCategoryRuleType
forall a. (a -> Text) -> ToText a
toText :: CostCategoryRuleType -> Text
$ctoText :: CostCategoryRuleType -> Text
Core.ToText,
      CostCategoryRuleType -> ByteString
(CostCategoryRuleType -> ByteString)
-> ToByteString CostCategoryRuleType
forall a. (a -> ByteString) -> ToByteString a
toBS :: CostCategoryRuleType -> ByteString
$ctoBS :: CostCategoryRuleType -> ByteString
Core.ToByteString,
      CostCategoryRuleType -> ByteStringBuilder
(CostCategoryRuleType -> ByteStringBuilder)
-> ToLog CostCategoryRuleType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CostCategoryRuleType -> ByteStringBuilder
$cbuild :: CostCategoryRuleType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CostCategoryRuleType -> [Header]
(HeaderName -> CostCategoryRuleType -> [Header])
-> ToHeader CostCategoryRuleType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CostCategoryRuleType -> [Header]
$ctoHeader :: HeaderName -> CostCategoryRuleType -> [Header]
Core.ToHeader,
      CostCategoryRuleType -> QueryString
(CostCategoryRuleType -> QueryString)
-> ToQuery CostCategoryRuleType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CostCategoryRuleType -> QueryString
$ctoQuery :: CostCategoryRuleType -> QueryString
Core.ToQuery,
      Value -> Parser [CostCategoryRuleType]
Value -> Parser CostCategoryRuleType
(Value -> Parser CostCategoryRuleType)
-> (Value -> Parser [CostCategoryRuleType])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [CostCategoryRuleType]
FromJSONKeyFunction CostCategoryRuleType
FromJSONKeyFunction CostCategoryRuleType
-> FromJSONKeyFunction [CostCategoryRuleType]
-> FromJSONKey CostCategoryRuleType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CostCategoryRuleType]
$cfromJSONKeyList :: FromJSONKeyFunction [CostCategoryRuleType]
fromJSONKey :: FromJSONKeyFunction CostCategoryRuleType
$cfromJSONKey :: FromJSONKeyFunction CostCategoryRuleType
Core.FromJSONKey,
      [CostCategoryRuleType] -> Encoding
[CostCategoryRuleType] -> Value
CostCategoryRuleType -> Encoding
CostCategoryRuleType -> Value
(CostCategoryRuleType -> Value)
-> (CostCategoryRuleType -> Encoding)
-> ([CostCategoryRuleType] -> Value)
-> ([CostCategoryRuleType] -> Encoding)
-> ToJSON CostCategoryRuleType
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
Core.ToJSON,
      ToJSONKeyFunction [CostCategoryRuleType]
ToJSONKeyFunction CostCategoryRuleType
ToJSONKeyFunction CostCategoryRuleType
-> ToJSONKeyFunction [CostCategoryRuleType]
-> ToJSONKey CostCategoryRuleType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CostCategoryRuleType]
$ctoJSONKeyList :: ToJSONKeyFunction [CostCategoryRuleType]
toJSONKey :: ToJSONKeyFunction CostCategoryRuleType
$ctoJSONKey :: ToJSONKeyFunction CostCategoryRuleType
Core.ToJSONKey,
      [Node] -> Either String CostCategoryRuleType
([Node] -> Either String CostCategoryRuleType)
-> FromXML CostCategoryRuleType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CostCategoryRuleType
$cparseXML :: [Node] -> Either String CostCategoryRuleType
Core.FromXML,
      CostCategoryRuleType -> XML
(CostCategoryRuleType -> XML) -> ToXML CostCategoryRuleType
forall a. (a -> XML) -> ToXML a
toXML :: CostCategoryRuleType -> XML
$ctoXML :: CostCategoryRuleType -> XML
Core.ToXML
    )

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

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

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