{-# 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.InstanceLifecycle
-- 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.InstanceLifecycle
  ( InstanceLifecycle
      ( ..,
        InstanceLifecycle_On_demand,
        InstanceLifecycle_Spot
      ),
  )
where

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

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

pattern InstanceLifecycle_On_demand :: InstanceLifecycle
pattern $bInstanceLifecycle_On_demand :: InstanceLifecycle
$mInstanceLifecycle_On_demand :: forall {r}. InstanceLifecycle -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceLifecycle_On_demand = InstanceLifecycle' "on-demand"

pattern InstanceLifecycle_Spot :: InstanceLifecycle
pattern $bInstanceLifecycle_Spot :: InstanceLifecycle
$mInstanceLifecycle_Spot :: forall {r}. InstanceLifecycle -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceLifecycle_Spot = InstanceLifecycle' "spot"

{-# COMPLETE
  InstanceLifecycle_On_demand,
  InstanceLifecycle_Spot,
  InstanceLifecycle'
  #-}