{-# 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.SavingsPlanPaymentOption
-- 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.SavingsPlanPaymentOption
  ( SavingsPlanPaymentOption
      ( ..,
        SavingsPlanPaymentOption_All_Upfront,
        SavingsPlanPaymentOption_No_Upfront,
        SavingsPlanPaymentOption_Partial_Upfront
      ),
  )
where

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

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

pattern SavingsPlanPaymentOption_All_Upfront :: SavingsPlanPaymentOption
pattern $bSavingsPlanPaymentOption_All_Upfront :: SavingsPlanPaymentOption
$mSavingsPlanPaymentOption_All_Upfront :: forall r.
SavingsPlanPaymentOption -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanPaymentOption_All_Upfront = SavingsPlanPaymentOption' "All Upfront"

pattern SavingsPlanPaymentOption_No_Upfront :: SavingsPlanPaymentOption
pattern $bSavingsPlanPaymentOption_No_Upfront :: SavingsPlanPaymentOption
$mSavingsPlanPaymentOption_No_Upfront :: forall r.
SavingsPlanPaymentOption -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanPaymentOption_No_Upfront = SavingsPlanPaymentOption' "No Upfront"

pattern SavingsPlanPaymentOption_Partial_Upfront :: SavingsPlanPaymentOption
pattern $bSavingsPlanPaymentOption_Partial_Upfront :: SavingsPlanPaymentOption
$mSavingsPlanPaymentOption_Partial_Upfront :: forall r.
SavingsPlanPaymentOption -> (Void# -> r) -> (Void# -> r) -> r
SavingsPlanPaymentOption_Partial_Upfront = SavingsPlanPaymentOption' "Partial Upfront"

{-# COMPLETE
  SavingsPlanPaymentOption_All_Upfront,
  SavingsPlanPaymentOption_No_Upfront,
  SavingsPlanPaymentOption_Partial_Upfront,
  SavingsPlanPaymentOption'
  #-}