{-# 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.ManagedBlockChain.Types.StateDBType
-- 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.ManagedBlockChain.Types.StateDBType
  ( StateDBType
      ( ..,
        StateDBType_CouchDB,
        StateDBType_LevelDB
      ),
  )
where

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

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

pattern StateDBType_CouchDB :: StateDBType
pattern $bStateDBType_CouchDB :: StateDBType
$mStateDBType_CouchDB :: forall r. StateDBType -> (Void# -> r) -> (Void# -> r) -> r
StateDBType_CouchDB = StateDBType' "CouchDB"

pattern StateDBType_LevelDB :: StateDBType
pattern $bStateDBType_LevelDB :: StateDBType
$mStateDBType_LevelDB :: forall r. StateDBType -> (Void# -> r) -> (Void# -> r) -> r
StateDBType_LevelDB = StateDBType' "LevelDB"

{-# COMPLETE
  StateDBType_CouchDB,
  StateDBType_LevelDB,
  StateDBType'
  #-}