{-# 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.DynamoDB.Types.ScalarAttributeType
-- 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.DynamoDB.Types.ScalarAttributeType
  ( ScalarAttributeType
      ( ..,
        ScalarAttributeType_B,
        ScalarAttributeType_N,
        ScalarAttributeType_S
      ),
  )
where

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

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

pattern ScalarAttributeType_B :: ScalarAttributeType
pattern $bScalarAttributeType_B :: ScalarAttributeType
$mScalarAttributeType_B :: forall r. ScalarAttributeType -> (Void# -> r) -> (Void# -> r) -> r
ScalarAttributeType_B = ScalarAttributeType' "B"

pattern ScalarAttributeType_N :: ScalarAttributeType
pattern $bScalarAttributeType_N :: ScalarAttributeType
$mScalarAttributeType_N :: forall r. ScalarAttributeType -> (Void# -> r) -> (Void# -> r) -> r
ScalarAttributeType_N = ScalarAttributeType' "N"

pattern ScalarAttributeType_S :: ScalarAttributeType
pattern $bScalarAttributeType_S :: ScalarAttributeType
$mScalarAttributeType_S :: forall r. ScalarAttributeType -> (Void# -> r) -> (Void# -> r) -> r
ScalarAttributeType_S = ScalarAttributeType' "S"

{-# COMPLETE
  ScalarAttributeType_B,
  ScalarAttributeType_N,
  ScalarAttributeType_S,
  ScalarAttributeType'
  #-}