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

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

-- | The broker\'s status.
newtype BrokerState = BrokerState'
  { BrokerState -> Text
fromBrokerState ::
      Core.Text
  }
  deriving stock
    ( Int -> BrokerState -> ShowS
[BrokerState] -> ShowS
BrokerState -> String
(Int -> BrokerState -> ShowS)
-> (BrokerState -> String)
-> ([BrokerState] -> ShowS)
-> Show BrokerState
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]
(Int -> ReadS BrokerState)
-> ReadS [BrokerState]
-> ReadPrec BrokerState
-> ReadPrec [BrokerState]
-> Read 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
(BrokerState -> BrokerState -> Bool)
-> (BrokerState -> BrokerState -> Bool) -> Eq BrokerState
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
Eq BrokerState
-> (BrokerState -> BrokerState -> Ordering)
-> (BrokerState -> BrokerState -> Bool)
-> (BrokerState -> BrokerState -> Bool)
-> (BrokerState -> BrokerState -> Bool)
-> (BrokerState -> BrokerState -> Bool)
-> (BrokerState -> BrokerState -> BrokerState)
-> (BrokerState -> BrokerState -> BrokerState)
-> Ord 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
$cp1Ord :: Eq BrokerState
Prelude.Ord,
      (forall x. BrokerState -> Rep BrokerState x)
-> (forall x. Rep BrokerState x -> BrokerState)
-> Generic BrokerState
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
    ( Int -> BrokerState -> Int
BrokerState -> Int
(Int -> BrokerState -> Int)
-> (BrokerState -> Int) -> Hashable BrokerState
forall 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 -> ()
(BrokerState -> ()) -> NFData BrokerState
forall a. (a -> ()) -> NFData a
rnf :: BrokerState -> ()
$crnf :: BrokerState -> ()
Prelude.NFData,
      Text -> Either String BrokerState
(Text -> Either String BrokerState) -> FromText BrokerState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String BrokerState
$cfromText :: Text -> Either String BrokerState
Core.FromText,
      BrokerState -> Text
(BrokerState -> Text) -> ToText BrokerState
forall a. (a -> Text) -> ToText a
toText :: BrokerState -> Text
$ctoText :: BrokerState -> Text
Core.ToText,
      BrokerState -> ByteString
(BrokerState -> ByteString) -> ToByteString BrokerState
forall a. (a -> ByteString) -> ToByteString a
toBS :: BrokerState -> ByteString
$ctoBS :: BrokerState -> ByteString
Core.ToByteString,
      BrokerState -> ByteStringBuilder
(BrokerState -> ByteStringBuilder) -> ToLog BrokerState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: BrokerState -> ByteStringBuilder
$cbuild :: BrokerState -> ByteStringBuilder
Core.ToLog,
      HeaderName -> BrokerState -> [Header]
(HeaderName -> BrokerState -> [Header]) -> ToHeader BrokerState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> BrokerState -> [Header]
$ctoHeader :: HeaderName -> BrokerState -> [Header]
Core.ToHeader,
      BrokerState -> QueryString
(BrokerState -> QueryString) -> ToQuery BrokerState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: BrokerState -> QueryString
$ctoQuery :: BrokerState -> QueryString
Core.ToQuery,
      Value -> Parser [BrokerState]
Value -> Parser BrokerState
(Value -> Parser BrokerState)
-> (Value -> Parser [BrokerState]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [BrokerState]
FromJSONKeyFunction BrokerState
FromJSONKeyFunction BrokerState
-> FromJSONKeyFunction [BrokerState] -> FromJSONKey BrokerState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [BrokerState]
$cfromJSONKeyList :: FromJSONKeyFunction [BrokerState]
fromJSONKey :: FromJSONKeyFunction BrokerState
$cfromJSONKey :: FromJSONKeyFunction BrokerState
Core.FromJSONKey,
      [BrokerState] -> Encoding
[BrokerState] -> Value
BrokerState -> Encoding
BrokerState -> Value
(BrokerState -> Value)
-> (BrokerState -> Encoding)
-> ([BrokerState] -> Value)
-> ([BrokerState] -> Encoding)
-> ToJSON BrokerState
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
Core.ToJSON,
      ToJSONKeyFunction [BrokerState]
ToJSONKeyFunction BrokerState
ToJSONKeyFunction BrokerState
-> ToJSONKeyFunction [BrokerState] -> ToJSONKey BrokerState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [BrokerState]
$ctoJSONKeyList :: ToJSONKeyFunction [BrokerState]
toJSONKey :: ToJSONKeyFunction BrokerState
$ctoJSONKey :: ToJSONKeyFunction BrokerState
Core.ToJSONKey,
      [Node] -> Either String BrokerState
([Node] -> Either String BrokerState) -> FromXML BrokerState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String BrokerState
$cparseXML :: [Node] -> Either String BrokerState
Core.FromXML,
      BrokerState -> XML
(BrokerState -> XML) -> ToXML BrokerState
forall a. (a -> XML) -> ToXML a
toXML :: BrokerState -> XML
$ctoXML :: BrokerState -> XML
Core.ToXML
    )

pattern BrokerState_CREATION_FAILED :: BrokerState
pattern $bBrokerState_CREATION_FAILED :: BrokerState
$mBrokerState_CREATION_FAILED :: forall r. BrokerState -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
BrokerState_CREATION_IN_PROGRESS = BrokerState' "CREATION_IN_PROGRESS"

pattern BrokerState_DELETION_IN_PROGRESS :: BrokerState
pattern $bBrokerState_DELETION_IN_PROGRESS :: BrokerState
$mBrokerState_DELETION_IN_PROGRESS :: forall r. BrokerState -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
BrokerState_REBOOT_IN_PROGRESS = BrokerState' "REBOOT_IN_PROGRESS"

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

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