{-# 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.QLDB.Types.LedgerState
-- 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.QLDB.Types.LedgerState
  ( LedgerState
      ( ..,
        LedgerState_ACTIVE,
        LedgerState_CREATING,
        LedgerState_DELETED,
        LedgerState_DELETING
      ),
  )
where

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

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

pattern LedgerState_ACTIVE :: LedgerState
pattern $bLedgerState_ACTIVE :: LedgerState
$mLedgerState_ACTIVE :: forall r. LedgerState -> (Void# -> r) -> (Void# -> r) -> r
LedgerState_ACTIVE = LedgerState' "ACTIVE"

pattern LedgerState_CREATING :: LedgerState
pattern $bLedgerState_CREATING :: LedgerState
$mLedgerState_CREATING :: forall r. LedgerState -> (Void# -> r) -> (Void# -> r) -> r
LedgerState_CREATING = LedgerState' "CREATING"

pattern LedgerState_DELETED :: LedgerState
pattern $bLedgerState_DELETED :: LedgerState
$mLedgerState_DELETED :: forall r. LedgerState -> (Void# -> r) -> (Void# -> r) -> r
LedgerState_DELETED = LedgerState' "DELETED"

pattern LedgerState_DELETING :: LedgerState
pattern $bLedgerState_DELETING :: LedgerState
$mLedgerState_DELETING :: forall r. LedgerState -> (Void# -> r) -> (Void# -> r) -> r
LedgerState_DELETING = LedgerState' "DELETING"

{-# COMPLETE
  LedgerState_ACTIVE,
  LedgerState_CREATING,
  LedgerState_DELETED,
  LedgerState_DELETING,
  LedgerState'
  #-}