{-# 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.EC2.Types.PaymentOption
-- 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.EC2.Types.PaymentOption
  ( PaymentOption
      ( ..,
        PaymentOption_AllUpfront,
        PaymentOption_NoUpfront,
        PaymentOption_PartialUpfront
      ),
  )
where

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

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

pattern PaymentOption_AllUpfront :: PaymentOption
pattern $bPaymentOption_AllUpfront :: PaymentOption
$mPaymentOption_AllUpfront :: forall {r}. PaymentOption -> ((# #) -> r) -> ((# #) -> r) -> r
PaymentOption_AllUpfront = PaymentOption' "AllUpfront"

pattern PaymentOption_NoUpfront :: PaymentOption
pattern $bPaymentOption_NoUpfront :: PaymentOption
$mPaymentOption_NoUpfront :: forall {r}. PaymentOption -> ((# #) -> r) -> ((# #) -> r) -> r
PaymentOption_NoUpfront = PaymentOption' "NoUpfront"

pattern PaymentOption_PartialUpfront :: PaymentOption
pattern $bPaymentOption_PartialUpfront :: PaymentOption
$mPaymentOption_PartialUpfront :: forall {r}. PaymentOption -> ((# #) -> r) -> ((# #) -> r) -> r
PaymentOption_PartialUpfront = PaymentOption' "PartialUpfront"

{-# COMPLETE
  PaymentOption_AllUpfront,
  PaymentOption_NoUpfront,
  PaymentOption_PartialUpfront,
  PaymentOption'
  #-}