{-# 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.ServiceState
-- 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.ServiceState
  ( ServiceState
      ( ..,
        ServiceState_Available,
        ServiceState_Deleted,
        ServiceState_Deleting,
        ServiceState_Failed,
        ServiceState_Pending
      ),
  )
where

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

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

pattern ServiceState_Available :: ServiceState
pattern $bServiceState_Available :: ServiceState
$mServiceState_Available :: forall {r}. ServiceState -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceState_Available = ServiceState' "Available"

pattern ServiceState_Deleted :: ServiceState
pattern $bServiceState_Deleted :: ServiceState
$mServiceState_Deleted :: forall {r}. ServiceState -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceState_Deleted = ServiceState' "Deleted"

pattern ServiceState_Deleting :: ServiceState
pattern $bServiceState_Deleting :: ServiceState
$mServiceState_Deleting :: forall {r}. ServiceState -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceState_Deleting = ServiceState' "Deleting"

pattern ServiceState_Failed :: ServiceState
pattern $bServiceState_Failed :: ServiceState
$mServiceState_Failed :: forall {r}. ServiceState -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceState_Failed = ServiceState' "Failed"

pattern ServiceState_Pending :: ServiceState
pattern $bServiceState_Pending :: ServiceState
$mServiceState_Pending :: forall {r}. ServiceState -> ((# #) -> r) -> ((# #) -> r) -> r
ServiceState_Pending = ServiceState' "Pending"

{-# COMPLETE
  ServiceState_Available,
  ServiceState_Deleted,
  ServiceState_Deleting,
  ServiceState_Failed,
  ServiceState_Pending,
  ServiceState'
  #-}