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

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

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

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

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

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

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