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

pattern InstanceLifecycleType_Scheduled :: InstanceLifecycleType
pattern $bInstanceLifecycleType_Scheduled :: InstanceLifecycleType
$mInstanceLifecycleType_Scheduled :: forall {r}.
InstanceLifecycleType -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceLifecycleType_Scheduled = InstanceLifecycleType' "scheduled"

pattern InstanceLifecycleType_Spot :: InstanceLifecycleType
pattern $bInstanceLifecycleType_Spot :: InstanceLifecycleType
$mInstanceLifecycleType_Spot :: forall {r}.
InstanceLifecycleType -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceLifecycleType_Spot = InstanceLifecycleType' "spot"

{-# COMPLETE
  InstanceLifecycleType_Scheduled,
  InstanceLifecycleType_Spot,
  InstanceLifecycleType'
  #-}