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

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

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

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

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

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

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