{-# 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.InstanceHealthStatus
-- 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.InstanceHealthStatus
  ( InstanceHealthStatus
      ( ..,
        InstanceHealthStatus_Healthy,
        InstanceHealthStatus_Unhealthy
      ),
  )
where

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

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

pattern InstanceHealthStatus_Healthy :: InstanceHealthStatus
pattern $bInstanceHealthStatus_Healthy :: InstanceHealthStatus
$mInstanceHealthStatus_Healthy :: forall {r}.
InstanceHealthStatus -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceHealthStatus_Healthy = InstanceHealthStatus' "healthy"

pattern InstanceHealthStatus_Unhealthy :: InstanceHealthStatus
pattern $bInstanceHealthStatus_Unhealthy :: InstanceHealthStatus
$mInstanceHealthStatus_Unhealthy :: forall {r}.
InstanceHealthStatus -> ((# #) -> r) -> ((# #) -> r) -> r
InstanceHealthStatus_Unhealthy = InstanceHealthStatus' "unhealthy"

{-# COMPLETE
  InstanceHealthStatus_Healthy,
  InstanceHealthStatus_Unhealthy,
  InstanceHealthStatus'
  #-}