{-# 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.AllocationState
-- 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.AllocationState
  ( AllocationState
      ( ..,
        AllocationState_Available,
        AllocationState_Pending,
        AllocationState_Permanent_failure,
        AllocationState_Released,
        AllocationState_Released_permanent_failure,
        AllocationState_Under_assessment
      ),
  )
where

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

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

pattern AllocationState_Available :: AllocationState
pattern $bAllocationState_Available :: AllocationState
$mAllocationState_Available :: forall {r}. AllocationState -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationState_Available = AllocationState' "available"

pattern AllocationState_Pending :: AllocationState
pattern $bAllocationState_Pending :: AllocationState
$mAllocationState_Pending :: forall {r}. AllocationState -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationState_Pending = AllocationState' "pending"

pattern AllocationState_Permanent_failure :: AllocationState
pattern $bAllocationState_Permanent_failure :: AllocationState
$mAllocationState_Permanent_failure :: forall {r}. AllocationState -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationState_Permanent_failure = AllocationState' "permanent-failure"

pattern AllocationState_Released :: AllocationState
pattern $bAllocationState_Released :: AllocationState
$mAllocationState_Released :: forall {r}. AllocationState -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationState_Released = AllocationState' "released"

pattern AllocationState_Released_permanent_failure :: AllocationState
pattern $bAllocationState_Released_permanent_failure :: AllocationState
$mAllocationState_Released_permanent_failure :: forall {r}. AllocationState -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationState_Released_permanent_failure = AllocationState' "released-permanent-failure"

pattern AllocationState_Under_assessment :: AllocationState
pattern $bAllocationState_Under_assessment :: AllocationState
$mAllocationState_Under_assessment :: forall {r}. AllocationState -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationState_Under_assessment = AllocationState' "under-assessment"

{-# COMPLETE
  AllocationState_Available,
  AllocationState_Pending,
  AllocationState_Permanent_failure,
  AllocationState_Released,
  AllocationState_Released_permanent_failure,
  AllocationState_Under_assessment,
  AllocationState'
  #-}