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

pattern UsageClassType_On_demand :: UsageClassType
pattern $bUsageClassType_On_demand :: UsageClassType
$mUsageClassType_On_demand :: forall {r}. UsageClassType -> ((# #) -> r) -> ((# #) -> r) -> r
UsageClassType_On_demand = UsageClassType' "on-demand"

pattern UsageClassType_Spot :: UsageClassType
pattern $bUsageClassType_Spot :: UsageClassType
$mUsageClassType_Spot :: forall {r}. UsageClassType -> ((# #) -> r) -> ((# #) -> r) -> r
UsageClassType_Spot = UsageClassType' "spot"

{-# COMPLETE
  UsageClassType_On_demand,
  UsageClassType_Spot,
  UsageClassType'
  #-}