{-# 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.Lightsail.Types.InstanceHealthReason
-- 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.Lightsail.Types.InstanceHealthReason
  ( InstanceHealthReason
      ( ..,
        InstanceHealthReason_Instance_DeregistrationInProgress,
        InstanceHealthReason_Instance_FailedHealthChecks,
        InstanceHealthReason_Instance_InvalidState,
        InstanceHealthReason_Instance_IpUnusable,
        InstanceHealthReason_Instance_NotInUse,
        InstanceHealthReason_Instance_NotRegistered,
        InstanceHealthReason_Instance_ResponseCodeMismatch,
        InstanceHealthReason_Instance_Timeout,
        InstanceHealthReason_Lb_InitialHealthChecking,
        InstanceHealthReason_Lb_InternalError,
        InstanceHealthReason_Lb_RegistrationInProgress
      ),
  )
where

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

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

pattern InstanceHealthReason_Instance_DeregistrationInProgress :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_DeregistrationInProgress :: InstanceHealthReason
$mInstanceHealthReason_Instance_DeregistrationInProgress :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_DeregistrationInProgress = InstanceHealthReason' "Instance.DeregistrationInProgress"

pattern InstanceHealthReason_Instance_FailedHealthChecks :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_FailedHealthChecks :: InstanceHealthReason
$mInstanceHealthReason_Instance_FailedHealthChecks :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_FailedHealthChecks = InstanceHealthReason' "Instance.FailedHealthChecks"

pattern InstanceHealthReason_Instance_InvalidState :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_InvalidState :: InstanceHealthReason
$mInstanceHealthReason_Instance_InvalidState :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_InvalidState = InstanceHealthReason' "Instance.InvalidState"

pattern InstanceHealthReason_Instance_IpUnusable :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_IpUnusable :: InstanceHealthReason
$mInstanceHealthReason_Instance_IpUnusable :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_IpUnusable = InstanceHealthReason' "Instance.IpUnusable"

pattern InstanceHealthReason_Instance_NotInUse :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_NotInUse :: InstanceHealthReason
$mInstanceHealthReason_Instance_NotInUse :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_NotInUse = InstanceHealthReason' "Instance.NotInUse"

pattern InstanceHealthReason_Instance_NotRegistered :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_NotRegistered :: InstanceHealthReason
$mInstanceHealthReason_Instance_NotRegistered :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_NotRegistered = InstanceHealthReason' "Instance.NotRegistered"

pattern InstanceHealthReason_Instance_ResponseCodeMismatch :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_ResponseCodeMismatch :: InstanceHealthReason
$mInstanceHealthReason_Instance_ResponseCodeMismatch :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_ResponseCodeMismatch = InstanceHealthReason' "Instance.ResponseCodeMismatch"

pattern InstanceHealthReason_Instance_Timeout :: InstanceHealthReason
pattern $bInstanceHealthReason_Instance_Timeout :: InstanceHealthReason
$mInstanceHealthReason_Instance_Timeout :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Instance_Timeout = InstanceHealthReason' "Instance.Timeout"

pattern InstanceHealthReason_Lb_InitialHealthChecking :: InstanceHealthReason
pattern $bInstanceHealthReason_Lb_InitialHealthChecking :: InstanceHealthReason
$mInstanceHealthReason_Lb_InitialHealthChecking :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Lb_InitialHealthChecking = InstanceHealthReason' "Lb.InitialHealthChecking"

pattern InstanceHealthReason_Lb_InternalError :: InstanceHealthReason
pattern $bInstanceHealthReason_Lb_InternalError :: InstanceHealthReason
$mInstanceHealthReason_Lb_InternalError :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Lb_InternalError = InstanceHealthReason' "Lb.InternalError"

pattern InstanceHealthReason_Lb_RegistrationInProgress :: InstanceHealthReason
pattern $bInstanceHealthReason_Lb_RegistrationInProgress :: InstanceHealthReason
$mInstanceHealthReason_Lb_RegistrationInProgress :: forall r. InstanceHealthReason -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthReason_Lb_RegistrationInProgress = InstanceHealthReason' "Lb.RegistrationInProgress"

{-# COMPLETE
  InstanceHealthReason_Instance_DeregistrationInProgress,
  InstanceHealthReason_Instance_FailedHealthChecks,
  InstanceHealthReason_Instance_InvalidState,
  InstanceHealthReason_Instance_IpUnusable,
  InstanceHealthReason_Instance_NotInUse,
  InstanceHealthReason_Instance_NotRegistered,
  InstanceHealthReason_Instance_ResponseCodeMismatch,
  InstanceHealthReason_Instance_Timeout,
  InstanceHealthReason_Lb_InitialHealthChecking,
  InstanceHealthReason_Lb_InternalError,
  InstanceHealthReason_Lb_RegistrationInProgress,
  InstanceHealthReason'
  #-}