{-# 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.RBin.Types.LockState
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RBin.Types.LockState
  ( LockState
      ( ..,
        LockState_Locked,
        LockState_Pending_unlock,
        LockState_Unlocked
      ),
  )
where

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

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

pattern LockState_Locked :: LockState
pattern $bLockState_Locked :: LockState
$mLockState_Locked :: forall {r}. LockState -> ((# #) -> r) -> ((# #) -> r) -> r
LockState_Locked = LockState' "locked"

pattern LockState_Pending_unlock :: LockState
pattern $bLockState_Pending_unlock :: LockState
$mLockState_Pending_unlock :: forall {r}. LockState -> ((# #) -> r) -> ((# #) -> r) -> r
LockState_Pending_unlock = LockState' "pending_unlock"

pattern LockState_Unlocked :: LockState
pattern $bLockState_Unlocked :: LockState
$mLockState_Unlocked :: forall {r}. LockState -> ((# #) -> r) -> ((# #) -> r) -> r
LockState_Unlocked = LockState' "unlocked"

{-# COMPLETE
  LockState_Locked,
  LockState_Pending_unlock,
  LockState_Unlocked,
  LockState'
  #-}