{-# 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.CostCategoryRuleVersion
-- 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.CostCategoryRuleVersion
  ( CostCategoryRuleVersion
      ( ..,
        CostCategoryRuleVersion_CostCategoryExpression_v1
      ),
  )
where

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

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

pattern CostCategoryRuleVersion_CostCategoryExpression_v1 :: CostCategoryRuleVersion
pattern $bCostCategoryRuleVersion_CostCategoryExpression_v1 :: CostCategoryRuleVersion
$mCostCategoryRuleVersion_CostCategoryExpression_v1 :: forall r.
CostCategoryRuleVersion -> (Void# -> r) -> (Void# -> r) -> r
CostCategoryRuleVersion_CostCategoryExpression_v1 = CostCategoryRuleVersion' "CostCategoryExpression.v1"

{-# COMPLETE
  CostCategoryRuleVersion_CostCategoryExpression_v1,
  CostCategoryRuleVersion'
  #-}