{-# 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.KMS.Types.KeyState
-- 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.KMS.Types.KeyState
  ( KeyState
      ( ..,
        KeyState_Creating,
        KeyState_Disabled,
        KeyState_Enabled,
        KeyState_PendingDeletion,
        KeyState_PendingImport,
        KeyState_PendingReplicaDeletion,
        KeyState_Unavailable,
        KeyState_Updating
      ),
  )
where

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

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

pattern KeyState_Creating :: KeyState
pattern $bKeyState_Creating :: KeyState
$mKeyState_Creating :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_Creating = KeyState' "Creating"

pattern KeyState_Disabled :: KeyState
pattern $bKeyState_Disabled :: KeyState
$mKeyState_Disabled :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_Disabled = KeyState' "Disabled"

pattern KeyState_Enabled :: KeyState
pattern $bKeyState_Enabled :: KeyState
$mKeyState_Enabled :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_Enabled = KeyState' "Enabled"

pattern KeyState_PendingDeletion :: KeyState
pattern $bKeyState_PendingDeletion :: KeyState
$mKeyState_PendingDeletion :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_PendingDeletion = KeyState' "PendingDeletion"

pattern KeyState_PendingImport :: KeyState
pattern $bKeyState_PendingImport :: KeyState
$mKeyState_PendingImport :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_PendingImport = KeyState' "PendingImport"

pattern KeyState_PendingReplicaDeletion :: KeyState
pattern $bKeyState_PendingReplicaDeletion :: KeyState
$mKeyState_PendingReplicaDeletion :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_PendingReplicaDeletion = KeyState' "PendingReplicaDeletion"

pattern KeyState_Unavailable :: KeyState
pattern $bKeyState_Unavailable :: KeyState
$mKeyState_Unavailable :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_Unavailable = KeyState' "Unavailable"

pattern KeyState_Updating :: KeyState
pattern $bKeyState_Updating :: KeyState
$mKeyState_Updating :: forall r. KeyState -> (Void# -> r) -> (Void# -> r) -> r
KeyState_Updating = KeyState' "Updating"

{-# COMPLETE
  KeyState_Creating,
  KeyState_Disabled,
  KeyState_Enabled,
  KeyState_PendingDeletion,
  KeyState_PendingImport,
  KeyState_PendingReplicaDeletion,
  KeyState_Unavailable,
  KeyState_Updating,
  KeyState'
  #-}