{-# 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.CloudHSM.Types.HsmStatus
-- 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.CloudHSM.Types.HsmStatus
  ( HsmStatus
      ( ..,
        HsmStatus_DEGRADED,
        HsmStatus_PENDING,
        HsmStatus_RUNNING,
        HsmStatus_SUSPENDED,
        HsmStatus_TERMINATED,
        HsmStatus_TERMINATING,
        HsmStatus_UPDATING
      ),
  )
where

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

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

pattern HsmStatus_DEGRADED :: HsmStatus
pattern $bHsmStatus_DEGRADED :: HsmStatus
$mHsmStatus_DEGRADED :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_DEGRADED = HsmStatus' "DEGRADED"

pattern HsmStatus_PENDING :: HsmStatus
pattern $bHsmStatus_PENDING :: HsmStatus
$mHsmStatus_PENDING :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_PENDING = HsmStatus' "PENDING"

pattern HsmStatus_RUNNING :: HsmStatus
pattern $bHsmStatus_RUNNING :: HsmStatus
$mHsmStatus_RUNNING :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_RUNNING = HsmStatus' "RUNNING"

pattern HsmStatus_SUSPENDED :: HsmStatus
pattern $bHsmStatus_SUSPENDED :: HsmStatus
$mHsmStatus_SUSPENDED :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_SUSPENDED = HsmStatus' "SUSPENDED"

pattern HsmStatus_TERMINATED :: HsmStatus
pattern $bHsmStatus_TERMINATED :: HsmStatus
$mHsmStatus_TERMINATED :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_TERMINATED = HsmStatus' "TERMINATED"

pattern HsmStatus_TERMINATING :: HsmStatus
pattern $bHsmStatus_TERMINATING :: HsmStatus
$mHsmStatus_TERMINATING :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_TERMINATING = HsmStatus' "TERMINATING"

pattern HsmStatus_UPDATING :: HsmStatus
pattern $bHsmStatus_UPDATING :: HsmStatus
$mHsmStatus_UPDATING :: forall r. HsmStatus -> (Void# -> r) -> (Void# -> r) -> r
HsmStatus_UPDATING = HsmStatus' "UPDATING"

{-# COMPLETE
  HsmStatus_DEGRADED,
  HsmStatus_PENDING,
  HsmStatus_RUNNING,
  HsmStatus_SUSPENDED,
  HsmStatus_TERMINATED,
  HsmStatus_TERMINATING,
  HsmStatus_UPDATING,
  HsmStatus'
  #-}