{-# 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.FleetExcessCapacityTerminationPolicy
-- 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.FleetExcessCapacityTerminationPolicy
  ( FleetExcessCapacityTerminationPolicy
      ( ..,
        FleetExcessCapacityTerminationPolicy_No_termination,
        FleetExcessCapacityTerminationPolicy_Termination
      ),
  )
where

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

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

pattern FleetExcessCapacityTerminationPolicy_No_termination :: FleetExcessCapacityTerminationPolicy
pattern $bFleetExcessCapacityTerminationPolicy_No_termination :: FleetExcessCapacityTerminationPolicy
$mFleetExcessCapacityTerminationPolicy_No_termination :: forall {r}.
FleetExcessCapacityTerminationPolicy
-> ((# #) -> r) -> ((# #) -> r) -> r
FleetExcessCapacityTerminationPolicy_No_termination = FleetExcessCapacityTerminationPolicy' "no-termination"

pattern FleetExcessCapacityTerminationPolicy_Termination :: FleetExcessCapacityTerminationPolicy
pattern $bFleetExcessCapacityTerminationPolicy_Termination :: FleetExcessCapacityTerminationPolicy
$mFleetExcessCapacityTerminationPolicy_Termination :: forall {r}.
FleetExcessCapacityTerminationPolicy
-> ((# #) -> r) -> ((# #) -> r) -> r
FleetExcessCapacityTerminationPolicy_Termination = FleetExcessCapacityTerminationPolicy' "termination"

{-# COMPLETE
  FleetExcessCapacityTerminationPolicy_No_termination,
  FleetExcessCapacityTerminationPolicy_Termination,
  FleetExcessCapacityTerminationPolicy'
  #-}