{-# 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.Inspector.Types.AgentHealth
-- 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.Inspector.Types.AgentHealth
  ( AgentHealth
      ( ..,
        AgentHealth_HEALTHY,
        AgentHealth_UNHEALTHY,
        AgentHealth_UNKNOWN
      ),
  )
where

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

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

pattern AgentHealth_HEALTHY :: AgentHealth
pattern $bAgentHealth_HEALTHY :: AgentHealth
$mAgentHealth_HEALTHY :: forall r. AgentHealth -> (Void# -> r) -> (Void# -> r) -> r
AgentHealth_HEALTHY = AgentHealth' "HEALTHY"

pattern AgentHealth_UNHEALTHY :: AgentHealth
pattern $bAgentHealth_UNHEALTHY :: AgentHealth
$mAgentHealth_UNHEALTHY :: forall r. AgentHealth -> (Void# -> r) -> (Void# -> r) -> r
AgentHealth_UNHEALTHY = AgentHealth' "UNHEALTHY"

pattern AgentHealth_UNKNOWN :: AgentHealth
pattern $bAgentHealth_UNKNOWN :: AgentHealth
$mAgentHealth_UNKNOWN :: forall r. AgentHealth -> (Void# -> r) -> (Void# -> r) -> r
AgentHealth_UNKNOWN = AgentHealth' "UNKNOWN"

{-# COMPLETE
  AgentHealth_HEALTHY,
  AgentHealth_UNHEALTHY,
  AgentHealth_UNKNOWN,
  AgentHealth'
  #-}