{-# 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.CloudHsmObjectState
-- 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.CloudHSM.Types.CloudHsmObjectState
  ( CloudHsmObjectState
      ( ..,
        CloudHsmObjectState_DEGRADED,
        CloudHsmObjectState_READY,
        CloudHsmObjectState_UPDATING
      ),
  )
where

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

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

pattern CloudHsmObjectState_DEGRADED :: CloudHsmObjectState
pattern $bCloudHsmObjectState_DEGRADED :: CloudHsmObjectState
$mCloudHsmObjectState_DEGRADED :: forall {r}.
CloudHsmObjectState -> ((# #) -> r) -> ((# #) -> r) -> r
CloudHsmObjectState_DEGRADED = CloudHsmObjectState' "DEGRADED"

pattern CloudHsmObjectState_READY :: CloudHsmObjectState
pattern $bCloudHsmObjectState_READY :: CloudHsmObjectState
$mCloudHsmObjectState_READY :: forall {r}.
CloudHsmObjectState -> ((# #) -> r) -> ((# #) -> r) -> r
CloudHsmObjectState_READY = CloudHsmObjectState' "READY"

pattern CloudHsmObjectState_UPDATING :: CloudHsmObjectState
pattern $bCloudHsmObjectState_UPDATING :: CloudHsmObjectState
$mCloudHsmObjectState_UPDATING :: forall {r}.
CloudHsmObjectState -> ((# #) -> r) -> ((# #) -> r) -> r
CloudHsmObjectState_UPDATING = CloudHsmObjectState' "UPDATING"

{-# COMPLETE
  CloudHsmObjectState_DEGRADED,
  CloudHsmObjectState_READY,
  CloudHsmObjectState_UPDATING,
  CloudHsmObjectState'
  #-}