{-# 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.AllocationType
-- 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.AllocationType
  ( AllocationType
      ( ..,
        AllocationType_Used
      ),
  )
where

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

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

pattern AllocationType_Used :: AllocationType
pattern $bAllocationType_Used :: AllocationType
$mAllocationType_Used :: forall {r}. AllocationType -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationType_Used = AllocationType' "used"

{-# COMPLETE
  AllocationType_Used,
  AllocationType'
  #-}