{-# 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.SavingsPlans.Types.SavingsPlanType
-- 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.SavingsPlans.Types.SavingsPlanType
  ( SavingsPlanType
      ( ..,
        SavingsPlanType_Compute,
        SavingsPlanType_EC2Instance,
        SavingsPlanType_SageMaker
      ),
  )
where

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

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

pattern SavingsPlanType_Compute :: SavingsPlanType
pattern $bSavingsPlanType_Compute :: SavingsPlanType
$mSavingsPlanType_Compute :: forall {r}. SavingsPlanType -> ((# #) -> r) -> ((# #) -> r) -> r
SavingsPlanType_Compute = SavingsPlanType' "Compute"

pattern SavingsPlanType_EC2Instance :: SavingsPlanType
pattern $bSavingsPlanType_EC2Instance :: SavingsPlanType
$mSavingsPlanType_EC2Instance :: forall {r}. SavingsPlanType -> ((# #) -> r) -> ((# #) -> r) -> r
SavingsPlanType_EC2Instance = SavingsPlanType' "EC2Instance"

pattern SavingsPlanType_SageMaker :: SavingsPlanType
pattern $bSavingsPlanType_SageMaker :: SavingsPlanType
$mSavingsPlanType_SageMaker :: forall {r}. SavingsPlanType -> ((# #) -> r) -> ((# #) -> r) -> r
SavingsPlanType_SageMaker = SavingsPlanType' "SageMaker"

{-# COMPLETE
  SavingsPlanType_Compute,
  SavingsPlanType_EC2Instance,
  SavingsPlanType_SageMaker,
  SavingsPlanType'
  #-}