{-# 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.State
-- 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.State
  ( State
      ( ..,
        State_Available,
        State_Deleted,
        State_Deleting,
        State_Expired,
        State_Failed,
        State_Pending,
        State_PendingAcceptance,
        State_Rejected
      ),
  )
where

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

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

pattern State_Available :: State
pattern $bState_Available :: State
$mState_Available :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Available = State' "Available"

pattern State_Deleted :: State
pattern $bState_Deleted :: State
$mState_Deleted :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Deleted = State' "Deleted"

pattern State_Deleting :: State
pattern $bState_Deleting :: State
$mState_Deleting :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Deleting = State' "Deleting"

pattern State_Expired :: State
pattern $bState_Expired :: State
$mState_Expired :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Expired = State' "Expired"

pattern State_Failed :: State
pattern $bState_Failed :: State
$mState_Failed :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Failed = State' "Failed"

pattern State_Pending :: State
pattern $bState_Pending :: State
$mState_Pending :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Pending = State' "Pending"

pattern State_PendingAcceptance :: State
pattern $bState_PendingAcceptance :: State
$mState_PendingAcceptance :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_PendingAcceptance = State' "PendingAcceptance"

pattern State_Rejected :: State
pattern $bState_Rejected :: State
$mState_Rejected :: forall {r}. State -> ((# #) -> r) -> ((# #) -> r) -> r
State_Rejected = State' "Rejected"

{-# COMPLETE
  State_Available,
  State_Deleted,
  State_Deleting,
  State_Expired,
  State_Failed,
  State_Pending,
  State_PendingAcceptance,
  State_Rejected,
  State'
  #-}