{-# 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.AttributeAction
-- 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.DynamoDB.Types.AttributeAction
  ( AttributeAction
      ( ..,
        AttributeAction_ADD,
        AttributeAction_DELETE,
        AttributeAction_PUT
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude

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

pattern AttributeAction_ADD :: AttributeAction
pattern $bAttributeAction_ADD :: AttributeAction
$mAttributeAction_ADD :: forall {r}. AttributeAction -> ((# #) -> r) -> ((# #) -> r) -> r
AttributeAction_ADD = AttributeAction' "ADD"

pattern AttributeAction_DELETE :: AttributeAction
pattern $bAttributeAction_DELETE :: AttributeAction
$mAttributeAction_DELETE :: forall {r}. AttributeAction -> ((# #) -> r) -> ((# #) -> r) -> r
AttributeAction_DELETE = AttributeAction' "DELETE"

pattern AttributeAction_PUT :: AttributeAction
pattern $bAttributeAction_PUT :: AttributeAction
$mAttributeAction_PUT :: forall {r}. AttributeAction -> ((# #) -> r) -> ((# #) -> r) -> r
AttributeAction_PUT = AttributeAction' "PUT"

{-# COMPLETE
  AttributeAction_ADD,
  AttributeAction_DELETE,
  AttributeAction_PUT,
  AttributeAction'
  #-}