{-# 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.SpotInstanceType
-- 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.SpotInstanceType
  ( SpotInstanceType
      ( ..,
        SpotInstanceType_One_time,
        SpotInstanceType_Persistent
      ),
  )
where

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

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

pattern SpotInstanceType_One_time :: SpotInstanceType
pattern $bSpotInstanceType_One_time :: SpotInstanceType
$mSpotInstanceType_One_time :: forall {r}. SpotInstanceType -> ((# #) -> r) -> ((# #) -> r) -> r
SpotInstanceType_One_time = SpotInstanceType' "one-time"

pattern SpotInstanceType_Persistent :: SpotInstanceType
pattern $bSpotInstanceType_Persistent :: SpotInstanceType
$mSpotInstanceType_Persistent :: forall {r}. SpotInstanceType -> ((# #) -> r) -> ((# #) -> r) -> r
SpotInstanceType_Persistent = SpotInstanceType' "persistent"

{-# COMPLETE
  SpotInstanceType_One_time,
  SpotInstanceType_Persistent,
  SpotInstanceType'
  #-}