{-# 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.InstanceStateName
-- 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.InstanceStateName
  ( InstanceStateName
      ( ..,
        InstanceStateName_Pending,
        InstanceStateName_Running,
        InstanceStateName_Shutting_down,
        InstanceStateName_Stopped,
        InstanceStateName_Stopping,
        InstanceStateName_Terminated
      ),
  )
where

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

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

pattern InstanceStateName_Pending :: InstanceStateName
pattern $bInstanceStateName_Pending :: InstanceStateName
$mInstanceStateName_Pending :: forall {r}. InstanceStateName -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceStateName_Pending = InstanceStateName' "pending"

pattern InstanceStateName_Running :: InstanceStateName
pattern $bInstanceStateName_Running :: InstanceStateName
$mInstanceStateName_Running :: forall {r}. InstanceStateName -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceStateName_Running = InstanceStateName' "running"

pattern InstanceStateName_Shutting_down :: InstanceStateName
pattern $bInstanceStateName_Shutting_down :: InstanceStateName
$mInstanceStateName_Shutting_down :: forall {r}. InstanceStateName -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceStateName_Shutting_down = InstanceStateName' "shutting-down"

pattern InstanceStateName_Stopped :: InstanceStateName
pattern $bInstanceStateName_Stopped :: InstanceStateName
$mInstanceStateName_Stopped :: forall {r}. InstanceStateName -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceStateName_Stopped = InstanceStateName' "stopped"

pattern InstanceStateName_Stopping :: InstanceStateName
pattern $bInstanceStateName_Stopping :: InstanceStateName
$mInstanceStateName_Stopping :: forall {r}. InstanceStateName -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceStateName_Stopping = InstanceStateName' "stopping"

pattern InstanceStateName_Terminated :: InstanceStateName
pattern $bInstanceStateName_Terminated :: InstanceStateName
$mInstanceStateName_Terminated :: forall {r}. InstanceStateName -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceStateName_Terminated = InstanceStateName' "terminated"

{-# COMPLETE
  InstanceStateName_Pending,
  InstanceStateName_Running,
  InstanceStateName_Shutting_down,
  InstanceStateName_Stopped,
  InstanceStateName_Stopping,
  InstanceStateName_Terminated,
  InstanceStateName'
  #-}