{-# 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.ManagedBlockChain.Types.NodeStatus
-- 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.ManagedBlockChain.Types.NodeStatus
  ( NodeStatus
      ( ..,
        NodeStatus_AVAILABLE,
        NodeStatus_CREATE_FAILED,
        NodeStatus_CREATING,
        NodeStatus_DELETED,
        NodeStatus_DELETING,
        NodeStatus_FAILED,
        NodeStatus_INACCESSIBLE_ENCRYPTION_KEY,
        NodeStatus_UNHEALTHY,
        NodeStatus_UPDATING
      ),
  )
where

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

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

pattern NodeStatus_AVAILABLE :: NodeStatus
pattern $bNodeStatus_AVAILABLE :: NodeStatus
$mNodeStatus_AVAILABLE :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_AVAILABLE = NodeStatus' "AVAILABLE"

pattern NodeStatus_CREATE_FAILED :: NodeStatus
pattern $bNodeStatus_CREATE_FAILED :: NodeStatus
$mNodeStatus_CREATE_FAILED :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_CREATE_FAILED = NodeStatus' "CREATE_FAILED"

pattern NodeStatus_CREATING :: NodeStatus
pattern $bNodeStatus_CREATING :: NodeStatus
$mNodeStatus_CREATING :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_CREATING = NodeStatus' "CREATING"

pattern NodeStatus_DELETED :: NodeStatus
pattern $bNodeStatus_DELETED :: NodeStatus
$mNodeStatus_DELETED :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_DELETED = NodeStatus' "DELETED"

pattern NodeStatus_DELETING :: NodeStatus
pattern $bNodeStatus_DELETING :: NodeStatus
$mNodeStatus_DELETING :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_DELETING = NodeStatus' "DELETING"

pattern NodeStatus_FAILED :: NodeStatus
pattern $bNodeStatus_FAILED :: NodeStatus
$mNodeStatus_FAILED :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_FAILED = NodeStatus' "FAILED"

pattern NodeStatus_INACCESSIBLE_ENCRYPTION_KEY :: NodeStatus
pattern $bNodeStatus_INACCESSIBLE_ENCRYPTION_KEY :: NodeStatus
$mNodeStatus_INACCESSIBLE_ENCRYPTION_KEY :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_INACCESSIBLE_ENCRYPTION_KEY = NodeStatus' "INACCESSIBLE_ENCRYPTION_KEY"

pattern NodeStatus_UNHEALTHY :: NodeStatus
pattern $bNodeStatus_UNHEALTHY :: NodeStatus
$mNodeStatus_UNHEALTHY :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_UNHEALTHY = NodeStatus' "UNHEALTHY"

pattern NodeStatus_UPDATING :: NodeStatus
pattern $bNodeStatus_UPDATING :: NodeStatus
$mNodeStatus_UPDATING :: forall r. NodeStatus -> (Void# -> r) -> (Void# -> r) -> r
NodeStatus_UPDATING = NodeStatus' "UPDATING"

{-# COMPLETE
  NodeStatus_AVAILABLE,
  NodeStatus_CREATE_FAILED,
  NodeStatus_CREATING,
  NodeStatus_DELETED,
  NodeStatus_DELETING,
  NodeStatus_FAILED,
  NodeStatus_INACCESSIBLE_ENCRYPTION_KEY,
  NodeStatus_UNHEALTHY,
  NodeStatus_UPDATING,
  NodeStatus'
  #-}