{-# 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.IoT.Types.DynamoKeyType
-- 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.IoT.Types.DynamoKeyType
  ( DynamoKeyType
      ( ..,
        DynamoKeyType_NUMBER,
        DynamoKeyType_STRING
      ),
  )
where

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

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

pattern DynamoKeyType_NUMBER :: DynamoKeyType
pattern $bDynamoKeyType_NUMBER :: DynamoKeyType
$mDynamoKeyType_NUMBER :: forall r. DynamoKeyType -> (Void# -> r) -> (Void# -> r) -> r
DynamoKeyType_NUMBER = DynamoKeyType' "NUMBER"

pattern DynamoKeyType_STRING :: DynamoKeyType
pattern $bDynamoKeyType_STRING :: DynamoKeyType
$mDynamoKeyType_STRING :: forall r. DynamoKeyType -> (Void# -> r) -> (Void# -> r) -> r
DynamoKeyType_STRING = DynamoKeyType' "STRING"

{-# COMPLETE
  DynamoKeyType_NUMBER,
  DynamoKeyType_STRING,
  DynamoKeyType'
  #-}