{-# 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.MQ.Types.BrokerState
-- 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.MQ.Types.BrokerState
  ( BrokerState
      ( ..,
        BrokerState_CREATION_FAILED,
        BrokerState_CREATION_IN_PROGRESS,
        BrokerState_CRITICAL_ACTION_REQUIRED,
        BrokerState_DELETION_IN_PROGRESS,
        BrokerState_REBOOT_IN_PROGRESS,
        BrokerState_RUNNING
      ),
  )
where

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

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

pattern BrokerState_CREATION_FAILED :: BrokerState
pattern $bBrokerState_CREATION_FAILED :: BrokerState
$mBrokerState_CREATION_FAILED :: forall {r}. BrokerState -> ((# #) -> r) -> ((# #) -> r) -> r
BrokerState_CREATION_FAILED = BrokerState' "CREATION_FAILED"

pattern BrokerState_CREATION_IN_PROGRESS :: BrokerState
pattern $bBrokerState_CREATION_IN_PROGRESS :: BrokerState
$mBrokerState_CREATION_IN_PROGRESS :: forall {r}. BrokerState -> ((# #) -> r) -> ((# #) -> r) -> r
BrokerState_CREATION_IN_PROGRESS = BrokerState' "CREATION_IN_PROGRESS"

pattern BrokerState_CRITICAL_ACTION_REQUIRED :: BrokerState
pattern $bBrokerState_CRITICAL_ACTION_REQUIRED :: BrokerState
$mBrokerState_CRITICAL_ACTION_REQUIRED :: forall {r}. BrokerState -> ((# #) -> r) -> ((# #) -> r) -> r
BrokerState_CRITICAL_ACTION_REQUIRED = BrokerState' "CRITICAL_ACTION_REQUIRED"

pattern BrokerState_DELETION_IN_PROGRESS :: BrokerState
pattern $bBrokerState_DELETION_IN_PROGRESS :: BrokerState
$mBrokerState_DELETION_IN_PROGRESS :: forall {r}. BrokerState -> ((# #) -> r) -> ((# #) -> r) -> r
BrokerState_DELETION_IN_PROGRESS = BrokerState' "DELETION_IN_PROGRESS"

pattern BrokerState_REBOOT_IN_PROGRESS :: BrokerState
pattern $bBrokerState_REBOOT_IN_PROGRESS :: BrokerState
$mBrokerState_REBOOT_IN_PROGRESS :: forall {r}. BrokerState -> ((# #) -> r) -> ((# #) -> r) -> r
BrokerState_REBOOT_IN_PROGRESS = BrokerState' "REBOOT_IN_PROGRESS"

pattern BrokerState_RUNNING :: BrokerState
pattern $bBrokerState_RUNNING :: BrokerState
$mBrokerState_RUNNING :: forall {r}. BrokerState -> ((# #) -> r) -> ((# #) -> r) -> r
BrokerState_RUNNING = BrokerState' "RUNNING"

{-# COMPLETE
  BrokerState_CREATION_FAILED,
  BrokerState_CREATION_IN_PROGRESS,
  BrokerState_CRITICAL_ACTION_REQUIRED,
  BrokerState_DELETION_IN_PROGRESS,
  BrokerState_REBOOT_IN_PROGRESS,
  BrokerState_RUNNING,
  BrokerState'
  #-}