{-# 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.BackupState
-- 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.BackupState
  ( BackupState
      ( ..,
        BackupState_CREATE_IN_PROGRESS,
        BackupState_DELETED,
        BackupState_PENDING_DELETION,
        BackupState_READY
      ),
  )
where

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

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

pattern BackupState_CREATE_IN_PROGRESS :: BackupState
pattern $bBackupState_CREATE_IN_PROGRESS :: BackupState
$mBackupState_CREATE_IN_PROGRESS :: forall r. BackupState -> (Void# -> r) -> (Void# -> r) -> r
BackupState_CREATE_IN_PROGRESS = BackupState' "CREATE_IN_PROGRESS"

pattern BackupState_DELETED :: BackupState
pattern $bBackupState_DELETED :: BackupState
$mBackupState_DELETED :: forall r. BackupState -> (Void# -> r) -> (Void# -> r) -> r
BackupState_DELETED = BackupState' "DELETED"

pattern BackupState_PENDING_DELETION :: BackupState
pattern $bBackupState_PENDING_DELETION :: BackupState
$mBackupState_PENDING_DELETION :: forall r. BackupState -> (Void# -> r) -> (Void# -> r) -> r
BackupState_PENDING_DELETION = BackupState' "PENDING_DELETION"

pattern BackupState_READY :: BackupState
pattern $bBackupState_READY :: BackupState
$mBackupState_READY :: forall r. BackupState -> (Void# -> r) -> (Void# -> r) -> r
BackupState_READY = BackupState' "READY"

{-# COMPLETE
  BackupState_CREATE_IN_PROGRESS,
  BackupState_DELETED,
  BackupState_PENDING_DELETION,
  BackupState_READY,
  BackupState'
  #-}