{-# 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.DrS.Types.EC2InstanceState
-- 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.DrS.Types.EC2InstanceState
  ( EC2InstanceState
      ( ..,
        EC2InstanceState_NOT_FOUND,
        EC2InstanceState_PENDING,
        EC2InstanceState_RUNNING,
        EC2InstanceState_SHUTTING_DOWN,
        EC2InstanceState_STOPPED,
        EC2InstanceState_STOPPING,
        EC2InstanceState_TERMINATED
      ),
  )
where

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

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

pattern EC2InstanceState_NOT_FOUND :: EC2InstanceState
pattern $bEC2InstanceState_NOT_FOUND :: EC2InstanceState
$mEC2InstanceState_NOT_FOUND :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_NOT_FOUND = EC2InstanceState' "NOT_FOUND"

pattern EC2InstanceState_PENDING :: EC2InstanceState
pattern $bEC2InstanceState_PENDING :: EC2InstanceState
$mEC2InstanceState_PENDING :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_PENDING = EC2InstanceState' "PENDING"

pattern EC2InstanceState_RUNNING :: EC2InstanceState
pattern $bEC2InstanceState_RUNNING :: EC2InstanceState
$mEC2InstanceState_RUNNING :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_RUNNING = EC2InstanceState' "RUNNING"

pattern EC2InstanceState_SHUTTING_DOWN :: EC2InstanceState
pattern $bEC2InstanceState_SHUTTING_DOWN :: EC2InstanceState
$mEC2InstanceState_SHUTTING_DOWN :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_SHUTTING_DOWN = EC2InstanceState' "SHUTTING-DOWN"

pattern EC2InstanceState_STOPPED :: EC2InstanceState
pattern $bEC2InstanceState_STOPPED :: EC2InstanceState
$mEC2InstanceState_STOPPED :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_STOPPED = EC2InstanceState' "STOPPED"

pattern EC2InstanceState_STOPPING :: EC2InstanceState
pattern $bEC2InstanceState_STOPPING :: EC2InstanceState
$mEC2InstanceState_STOPPING :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_STOPPING = EC2InstanceState' "STOPPING"

pattern EC2InstanceState_TERMINATED :: EC2InstanceState
pattern $bEC2InstanceState_TERMINATED :: EC2InstanceState
$mEC2InstanceState_TERMINATED :: forall {r}. EC2InstanceState -> ((# #) -> r) -> ((# #) -> r) -> r
EC2InstanceState_TERMINATED = EC2InstanceState' "TERMINATED"

{-# COMPLETE
  EC2InstanceState_NOT_FOUND,
  EC2InstanceState_PENDING,
  EC2InstanceState_RUNNING,
  EC2InstanceState_SHUTTING_DOWN,
  EC2InstanceState_STOPPED,
  EC2InstanceState_STOPPING,
  EC2InstanceState_TERMINATED,
  EC2InstanceState'
  #-}