{-# 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.SnowDeviceManagement.Types.UnlockState
-- 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.SnowDeviceManagement.Types.UnlockState
  ( UnlockState
      ( ..,
        UnlockState_LOCKED,
        UnlockState_UNLOCKED,
        UnlockState_UNLOCKING
      ),
  )
where

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

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

pattern UnlockState_LOCKED :: UnlockState
pattern $bUnlockState_LOCKED :: UnlockState
$mUnlockState_LOCKED :: forall r. UnlockState -> (Void# -> r) -> (Void# -> r) -> r
UnlockState_LOCKED = UnlockState' "LOCKED"

pattern UnlockState_UNLOCKED :: UnlockState
pattern $bUnlockState_UNLOCKED :: UnlockState
$mUnlockState_UNLOCKED :: forall r. UnlockState -> (Void# -> r) -> (Void# -> r) -> r
UnlockState_UNLOCKED = UnlockState' "UNLOCKED"

pattern UnlockState_UNLOCKING :: UnlockState
pattern $bUnlockState_UNLOCKING :: UnlockState
$mUnlockState_UNLOCKING :: forall r. UnlockState -> (Void# -> r) -> (Void# -> r) -> r
UnlockState_UNLOCKING = UnlockState' "UNLOCKING"

{-# COMPLETE
  UnlockState_LOCKED,
  UnlockState_UNLOCKED,
  UnlockState_UNLOCKING,
  UnlockState'
  #-}