{-# 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.GlobalAccelerator.Types.HealthState
-- 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.GlobalAccelerator.Types.HealthState
  ( HealthState
      ( ..,
        HealthState_HEALTHY,
        HealthState_INITIAL,
        HealthState_UNHEALTHY
      ),
  )
where

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

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

pattern HealthState_HEALTHY :: HealthState
pattern $bHealthState_HEALTHY :: HealthState
$mHealthState_HEALTHY :: forall {r}. HealthState -> ((# #) -> r) -> ((# #) -> r) -> r
HealthState_HEALTHY = HealthState' "HEALTHY"

pattern HealthState_INITIAL :: HealthState
pattern $bHealthState_INITIAL :: HealthState
$mHealthState_INITIAL :: forall {r}. HealthState -> ((# #) -> r) -> ((# #) -> r) -> r
HealthState_INITIAL = HealthState' "INITIAL"

pattern HealthState_UNHEALTHY :: HealthState
pattern $bHealthState_UNHEALTHY :: HealthState
$mHealthState_UNHEALTHY :: forall {r}. HealthState -> ((# #) -> r) -> ((# #) -> r) -> r
HealthState_UNHEALTHY = HealthState' "UNHEALTHY"

{-# COMPLETE
  HealthState_HEALTHY,
  HealthState_INITIAL,
  HealthState_UNHEALTHY,
  HealthState'
  #-}