{-# 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.HsmState
-- 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.HsmState
  ( HsmState
      ( ..,
        HsmState_ACTIVE,
        HsmState_CREATE_IN_PROGRESS,
        HsmState_DEGRADED,
        HsmState_DELETED,
        HsmState_DELETE_IN_PROGRESS
      ),
  )
where

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

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

pattern HsmState_ACTIVE :: HsmState
pattern $bHsmState_ACTIVE :: HsmState
$mHsmState_ACTIVE :: forall r. HsmState -> (Void# -> r) -> (Void# -> r) -> r
HsmState_ACTIVE = HsmState' "ACTIVE"

pattern HsmState_CREATE_IN_PROGRESS :: HsmState
pattern $bHsmState_CREATE_IN_PROGRESS :: HsmState
$mHsmState_CREATE_IN_PROGRESS :: forall r. HsmState -> (Void# -> r) -> (Void# -> r) -> r
HsmState_CREATE_IN_PROGRESS = HsmState' "CREATE_IN_PROGRESS"

pattern HsmState_DEGRADED :: HsmState
pattern $bHsmState_DEGRADED :: HsmState
$mHsmState_DEGRADED :: forall r. HsmState -> (Void# -> r) -> (Void# -> r) -> r
HsmState_DEGRADED = HsmState' "DEGRADED"

pattern HsmState_DELETED :: HsmState
pattern $bHsmState_DELETED :: HsmState
$mHsmState_DELETED :: forall r. HsmState -> (Void# -> r) -> (Void# -> r) -> r
HsmState_DELETED = HsmState' "DELETED"

pattern HsmState_DELETE_IN_PROGRESS :: HsmState
pattern $bHsmState_DELETE_IN_PROGRESS :: HsmState
$mHsmState_DELETE_IN_PROGRESS :: forall r. HsmState -> (Void# -> r) -> (Void# -> r) -> r
HsmState_DELETE_IN_PROGRESS = HsmState' "DELETE_IN_PROGRESS"

{-# COMPLETE
  HsmState_ACTIVE,
  HsmState_CREATE_IN_PROGRESS,
  HsmState_DEGRADED,
  HsmState_DELETED,
  HsmState_DELETE_IN_PROGRESS,
  HsmState'
  #-}