{-# 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.SavingsPlanProductType
-- 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.SavingsPlanProductType
  ( SavingsPlanProductType
      ( ..,
        SavingsPlanProductType_EC2,
        SavingsPlanProductType_Fargate,
        SavingsPlanProductType_Lambda,
        SavingsPlanProductType_SageMaker
      ),
  )
where

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

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

pattern SavingsPlanProductType_EC2 :: SavingsPlanProductType
pattern $bSavingsPlanProductType_EC2 :: SavingsPlanProductType
$mSavingsPlanProductType_EC2 :: forall r.
SavingsPlanProductType -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanProductType_EC2 = SavingsPlanProductType' "EC2"

pattern SavingsPlanProductType_Fargate :: SavingsPlanProductType
pattern $bSavingsPlanProductType_Fargate :: SavingsPlanProductType
$mSavingsPlanProductType_Fargate :: forall r.
SavingsPlanProductType -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanProductType_Fargate = SavingsPlanProductType' "Fargate"

pattern SavingsPlanProductType_Lambda :: SavingsPlanProductType
pattern $bSavingsPlanProductType_Lambda :: SavingsPlanProductType
$mSavingsPlanProductType_Lambda :: forall r.
SavingsPlanProductType -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanProductType_Lambda = SavingsPlanProductType' "Lambda"

pattern SavingsPlanProductType_SageMaker :: SavingsPlanProductType
pattern $bSavingsPlanProductType_SageMaker :: SavingsPlanProductType
$mSavingsPlanProductType_SageMaker :: forall r.
SavingsPlanProductType -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanProductType_SageMaker = SavingsPlanProductType' "SageMaker"

{-# COMPLETE
  SavingsPlanProductType_EC2,
  SavingsPlanProductType_Fargate,
  SavingsPlanProductType_Lambda,
  SavingsPlanProductType_SageMaker,
  SavingsPlanProductType'
  #-}