{-# 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.Context
-- 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.Context
  ( Context
      ( ..,
        Context_COST_AND_USAGE,
        Context_RESERVATIONS,
        Context_SAVINGS_PLANS
      ),
  )
where

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

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

pattern Context_COST_AND_USAGE :: Context
pattern $bContext_COST_AND_USAGE :: Context
$mContext_COST_AND_USAGE :: forall {r}. Context -> ((# #) -> r) -> ((# #) -> r) -> r
Context_COST_AND_USAGE = Context' "COST_AND_USAGE"

pattern Context_RESERVATIONS :: Context
pattern $bContext_RESERVATIONS :: Context
$mContext_RESERVATIONS :: forall {r}. Context -> ((# #) -> r) -> ((# #) -> r) -> r
Context_RESERVATIONS = Context' "RESERVATIONS"

pattern Context_SAVINGS_PLANS :: Context
pattern $bContext_SAVINGS_PLANS :: Context
$mContext_SAVINGS_PLANS :: forall {r}. Context -> ((# #) -> r) -> ((# #) -> r) -> r
Context_SAVINGS_PLANS = Context' "SAVINGS_PLANS"

{-# COMPLETE
  Context_COST_AND_USAGE,
  Context_RESERVATIONS,
  Context_SAVINGS_PLANS,
  Context'
  #-}