{-# 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.OpsWorksCM.Types.ServerStatus
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.OpsWorksCM.Types.ServerStatus
  ( ServerStatus
      ( ..,
        ServerStatus_BACKING_UP,
        ServerStatus_CONNECTION_LOST,
        ServerStatus_CREATING,
        ServerStatus_DELETING,
        ServerStatus_FAILED,
        ServerStatus_HEALTHY,
        ServerStatus_MODIFYING,
        ServerStatus_RESTORING,
        ServerStatus_RUNNING,
        ServerStatus_SETUP,
        ServerStatus_TERMINATED,
        ServerStatus_UNDER_MAINTENANCE,
        ServerStatus_UNHEALTHY
      ),
  )
where

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

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

pattern ServerStatus_BACKING_UP :: ServerStatus
pattern $bServerStatus_BACKING_UP :: ServerStatus
$mServerStatus_BACKING_UP :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_BACKING_UP = ServerStatus' "BACKING_UP"

pattern ServerStatus_CONNECTION_LOST :: ServerStatus
pattern $bServerStatus_CONNECTION_LOST :: ServerStatus
$mServerStatus_CONNECTION_LOST :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_CONNECTION_LOST = ServerStatus' "CONNECTION_LOST"

pattern ServerStatus_CREATING :: ServerStatus
pattern $bServerStatus_CREATING :: ServerStatus
$mServerStatus_CREATING :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_CREATING = ServerStatus' "CREATING"

pattern ServerStatus_DELETING :: ServerStatus
pattern $bServerStatus_DELETING :: ServerStatus
$mServerStatus_DELETING :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_DELETING = ServerStatus' "DELETING"

pattern ServerStatus_FAILED :: ServerStatus
pattern $bServerStatus_FAILED :: ServerStatus
$mServerStatus_FAILED :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_FAILED = ServerStatus' "FAILED"

pattern ServerStatus_HEALTHY :: ServerStatus
pattern $bServerStatus_HEALTHY :: ServerStatus
$mServerStatus_HEALTHY :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_HEALTHY = ServerStatus' "HEALTHY"

pattern ServerStatus_MODIFYING :: ServerStatus
pattern $bServerStatus_MODIFYING :: ServerStatus
$mServerStatus_MODIFYING :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_MODIFYING = ServerStatus' "MODIFYING"

pattern ServerStatus_RESTORING :: ServerStatus
pattern $bServerStatus_RESTORING :: ServerStatus
$mServerStatus_RESTORING :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_RESTORING = ServerStatus' "RESTORING"

pattern ServerStatus_RUNNING :: ServerStatus
pattern $bServerStatus_RUNNING :: ServerStatus
$mServerStatus_RUNNING :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_RUNNING = ServerStatus' "RUNNING"

pattern ServerStatus_SETUP :: ServerStatus
pattern $bServerStatus_SETUP :: ServerStatus
$mServerStatus_SETUP :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_SETUP = ServerStatus' "SETUP"

pattern ServerStatus_TERMINATED :: ServerStatus
pattern $bServerStatus_TERMINATED :: ServerStatus
$mServerStatus_TERMINATED :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_TERMINATED = ServerStatus' "TERMINATED"

pattern ServerStatus_UNDER_MAINTENANCE :: ServerStatus
pattern $bServerStatus_UNDER_MAINTENANCE :: ServerStatus
$mServerStatus_UNDER_MAINTENANCE :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_UNDER_MAINTENANCE = ServerStatus' "UNDER_MAINTENANCE"

pattern ServerStatus_UNHEALTHY :: ServerStatus
pattern $bServerStatus_UNHEALTHY :: ServerStatus
$mServerStatus_UNHEALTHY :: forall r. ServerStatus -> (Void# -> r) -> (Void# -> r) -> r
ServerStatus_UNHEALTHY = ServerStatus' "UNHEALTHY"

{-# COMPLETE
  ServerStatus_BACKING_UP,
  ServerStatus_CONNECTION_LOST,
  ServerStatus_CREATING,
  ServerStatus_DELETING,
  ServerStatus_FAILED,
  ServerStatus_HEALTHY,
  ServerStatus_MODIFYING,
  ServerStatus_RESTORING,
  ServerStatus_RUNNING,
  ServerStatus_SETUP,
  ServerStatus_TERMINATED,
  ServerStatus_UNDER_MAINTENANCE,
  ServerStatus_UNHEALTHY,
  ServerStatus'
  #-}