{-# 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.RDS.Types.TargetHealthReason
-- 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.RDS.Types.TargetHealthReason
  ( TargetHealthReason
      ( ..,
        TargetHealthReason_AUTH_FAILURE,
        TargetHealthReason_CONNECTION_FAILED,
        TargetHealthReason_INVALID_REPLICATION_STATE,
        TargetHealthReason_PENDING_PROXY_CAPACITY,
        TargetHealthReason_UNREACHABLE
      ),
  )
where

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

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

pattern TargetHealthReason_AUTH_FAILURE :: TargetHealthReason
pattern $bTargetHealthReason_AUTH_FAILURE :: TargetHealthReason
$mTargetHealthReason_AUTH_FAILURE :: forall r. TargetHealthReason -> (Void# -> r) -> (Void# -> r) -> r
TargetHealthReason_AUTH_FAILURE = TargetHealthReason' "AUTH_FAILURE"

pattern TargetHealthReason_CONNECTION_FAILED :: TargetHealthReason
pattern $bTargetHealthReason_CONNECTION_FAILED :: TargetHealthReason
$mTargetHealthReason_CONNECTION_FAILED :: forall r. TargetHealthReason -> (Void# -> r) -> (Void# -> r) -> r
TargetHealthReason_CONNECTION_FAILED = TargetHealthReason' "CONNECTION_FAILED"

pattern TargetHealthReason_INVALID_REPLICATION_STATE :: TargetHealthReason
pattern $bTargetHealthReason_INVALID_REPLICATION_STATE :: TargetHealthReason
$mTargetHealthReason_INVALID_REPLICATION_STATE :: forall r. TargetHealthReason -> (Void# -> r) -> (Void# -> r) -> r
TargetHealthReason_INVALID_REPLICATION_STATE = TargetHealthReason' "INVALID_REPLICATION_STATE"

pattern TargetHealthReason_PENDING_PROXY_CAPACITY :: TargetHealthReason
pattern $bTargetHealthReason_PENDING_PROXY_CAPACITY :: TargetHealthReason
$mTargetHealthReason_PENDING_PROXY_CAPACITY :: forall r. TargetHealthReason -> (Void# -> r) -> (Void# -> r) -> r
TargetHealthReason_PENDING_PROXY_CAPACITY = TargetHealthReason' "PENDING_PROXY_CAPACITY"

pattern TargetHealthReason_UNREACHABLE :: TargetHealthReason
pattern $bTargetHealthReason_UNREACHABLE :: TargetHealthReason
$mTargetHealthReason_UNREACHABLE :: forall r. TargetHealthReason -> (Void# -> r) -> (Void# -> r) -> r
TargetHealthReason_UNREACHABLE = TargetHealthReason' "UNREACHABLE"

{-# COMPLETE
  TargetHealthReason_AUTH_FAILURE,
  TargetHealthReason_CONNECTION_FAILED,
  TargetHealthReason_INVALID_REPLICATION_STATE,
  TargetHealthReason_PENDING_PROXY_CAPACITY,
  TargetHealthReason_UNREACHABLE,
  TargetHealthReason'
  #-}