{-# 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.InstanceHealthState
-- 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.InstanceHealthState
  ( InstanceHealthState
      ( ..,
        InstanceHealthState_Draining,
        InstanceHealthState_Healthy,
        InstanceHealthState_Initial,
        InstanceHealthState_Unavailable,
        InstanceHealthState_Unhealthy,
        InstanceHealthState_Unused
      ),
  )
where

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

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

pattern InstanceHealthState_Draining :: InstanceHealthState
pattern $bInstanceHealthState_Draining :: InstanceHealthState
$mInstanceHealthState_Draining :: forall r. InstanceHealthState -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthState_Draining = InstanceHealthState' "draining"

pattern InstanceHealthState_Healthy :: InstanceHealthState
pattern $bInstanceHealthState_Healthy :: InstanceHealthState
$mInstanceHealthState_Healthy :: forall r. InstanceHealthState -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthState_Healthy = InstanceHealthState' "healthy"

pattern InstanceHealthState_Initial :: InstanceHealthState
pattern $bInstanceHealthState_Initial :: InstanceHealthState
$mInstanceHealthState_Initial :: forall r. InstanceHealthState -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthState_Initial = InstanceHealthState' "initial"

pattern InstanceHealthState_Unavailable :: InstanceHealthState
pattern $bInstanceHealthState_Unavailable :: InstanceHealthState
$mInstanceHealthState_Unavailable :: forall r. InstanceHealthState -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthState_Unavailable = InstanceHealthState' "unavailable"

pattern InstanceHealthState_Unhealthy :: InstanceHealthState
pattern $bInstanceHealthState_Unhealthy :: InstanceHealthState
$mInstanceHealthState_Unhealthy :: forall r. InstanceHealthState -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthState_Unhealthy = InstanceHealthState' "unhealthy"

pattern InstanceHealthState_Unused :: InstanceHealthState
pattern $bInstanceHealthState_Unused :: InstanceHealthState
$mInstanceHealthState_Unused :: forall r. InstanceHealthState -> (Void# -> r) -> (Void# -> r) -> r
InstanceHealthState_Unused = InstanceHealthState' "unused"

{-# COMPLETE
  InstanceHealthState_Draining,
  InstanceHealthState_Healthy,
  InstanceHealthState_Initial,
  InstanceHealthState_Unavailable,
  InstanceHealthState_Unhealthy,
  InstanceHealthState_Unused,
  InstanceHealthState'
  #-}