{-# 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.CloudHSMV2.Types.ClusterState
-- 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.CloudHSMV2.Types.ClusterState
  ( ClusterState
      ( ..,
        ClusterState_ACTIVE,
        ClusterState_CREATE_IN_PROGRESS,
        ClusterState_DEGRADED,
        ClusterState_DELETED,
        ClusterState_DELETE_IN_PROGRESS,
        ClusterState_INITIALIZED,
        ClusterState_INITIALIZE_IN_PROGRESS,
        ClusterState_UNINITIALIZED,
        ClusterState_UPDATE_IN_PROGRESS
      ),
  )
where

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

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

pattern ClusterState_ACTIVE :: ClusterState
pattern $bClusterState_ACTIVE :: ClusterState
$mClusterState_ACTIVE :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_ACTIVE = ClusterState' "ACTIVE"

pattern ClusterState_CREATE_IN_PROGRESS :: ClusterState
pattern $bClusterState_CREATE_IN_PROGRESS :: ClusterState
$mClusterState_CREATE_IN_PROGRESS :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_CREATE_IN_PROGRESS = ClusterState' "CREATE_IN_PROGRESS"

pattern ClusterState_DEGRADED :: ClusterState
pattern $bClusterState_DEGRADED :: ClusterState
$mClusterState_DEGRADED :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_DEGRADED = ClusterState' "DEGRADED"

pattern ClusterState_DELETED :: ClusterState
pattern $bClusterState_DELETED :: ClusterState
$mClusterState_DELETED :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_DELETED = ClusterState' "DELETED"

pattern ClusterState_DELETE_IN_PROGRESS :: ClusterState
pattern $bClusterState_DELETE_IN_PROGRESS :: ClusterState
$mClusterState_DELETE_IN_PROGRESS :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_DELETE_IN_PROGRESS = ClusterState' "DELETE_IN_PROGRESS"

pattern ClusterState_INITIALIZED :: ClusterState
pattern $bClusterState_INITIALIZED :: ClusterState
$mClusterState_INITIALIZED :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_INITIALIZED = ClusterState' "INITIALIZED"

pattern ClusterState_INITIALIZE_IN_PROGRESS :: ClusterState
pattern $bClusterState_INITIALIZE_IN_PROGRESS :: ClusterState
$mClusterState_INITIALIZE_IN_PROGRESS :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_INITIALIZE_IN_PROGRESS = ClusterState' "INITIALIZE_IN_PROGRESS"

pattern ClusterState_UNINITIALIZED :: ClusterState
pattern $bClusterState_UNINITIALIZED :: ClusterState
$mClusterState_UNINITIALIZED :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_UNINITIALIZED = ClusterState' "UNINITIALIZED"

pattern ClusterState_UPDATE_IN_PROGRESS :: ClusterState
pattern $bClusterState_UPDATE_IN_PROGRESS :: ClusterState
$mClusterState_UPDATE_IN_PROGRESS :: forall r. ClusterState -> (Void# -> r) -> (Void# -> r) -> r
ClusterState_UPDATE_IN_PROGRESS = ClusterState' "UPDATE_IN_PROGRESS"

{-# COMPLETE
  ClusterState_ACTIVE,
  ClusterState_CREATE_IN_PROGRESS,
  ClusterState_DEGRADED,
  ClusterState_DELETED,
  ClusterState_DELETE_IN_PROGRESS,
  ClusterState_INITIALIZED,
  ClusterState_INITIALIZE_IN_PROGRESS,
  ClusterState_UNINITIALIZED,
  ClusterState_UPDATE_IN_PROGRESS,
  ClusterState'
  #-}