{-# 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.OpenSearch.Types.ReservedInstancePaymentOption
-- 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.OpenSearch.Types.ReservedInstancePaymentOption
  ( ReservedInstancePaymentOption
      ( ..,
        ReservedInstancePaymentOption_ALL_UPFRONT,
        ReservedInstancePaymentOption_NO_UPFRONT,
        ReservedInstancePaymentOption_PARTIAL_UPFRONT
      ),
  )
where

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

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

pattern ReservedInstancePaymentOption_ALL_UPFRONT :: ReservedInstancePaymentOption
pattern $bReservedInstancePaymentOption_ALL_UPFRONT :: ReservedInstancePaymentOption
$mReservedInstancePaymentOption_ALL_UPFRONT :: forall r.
ReservedInstancePaymentOption -> (Void# -> r) -> (Void# -> r) -> r
ReservedInstancePaymentOption_ALL_UPFRONT = ReservedInstancePaymentOption' "ALL_UPFRONT"

pattern ReservedInstancePaymentOption_NO_UPFRONT :: ReservedInstancePaymentOption
pattern $bReservedInstancePaymentOption_NO_UPFRONT :: ReservedInstancePaymentOption
$mReservedInstancePaymentOption_NO_UPFRONT :: forall r.
ReservedInstancePaymentOption -> (Void# -> r) -> (Void# -> r) -> r
ReservedInstancePaymentOption_NO_UPFRONT = ReservedInstancePaymentOption' "NO_UPFRONT"

pattern ReservedInstancePaymentOption_PARTIAL_UPFRONT :: ReservedInstancePaymentOption
pattern $bReservedInstancePaymentOption_PARTIAL_UPFRONT :: ReservedInstancePaymentOption
$mReservedInstancePaymentOption_PARTIAL_UPFRONT :: forall r.
ReservedInstancePaymentOption -> (Void# -> r) -> (Void# -> r) -> r
ReservedInstancePaymentOption_PARTIAL_UPFRONT = ReservedInstancePaymentOption' "PARTIAL_UPFRONT"

{-# COMPLETE
  ReservedInstancePaymentOption_ALL_UPFRONT,
  ReservedInstancePaymentOption_NO_UPFRONT,
  ReservedInstancePaymentOption_PARTIAL_UPFRONT,
  ReservedInstancePaymentOption'
  #-}