{-# 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.SQS.Types.MessageAttribute
-- 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.SQS.Types.MessageAttribute
  ( MessageAttribute
      ( ..,
        MessageAttribute_All,
        MessageAttribute_ApproximateFirstReceiveTimestamp,
        MessageAttribute_ApproximateReceiveCount,
        MessageAttribute_SenderId,
        MessageAttribute_SentTimestamp
      ),
  )
where

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

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

pattern MessageAttribute_All :: MessageAttribute
pattern $bMessageAttribute_All :: MessageAttribute
$mMessageAttribute_All :: forall r. MessageAttribute -> (Void# -> r) -> (Void# -> r) -> r
MessageAttribute_All = MessageAttribute' "All"

pattern MessageAttribute_ApproximateFirstReceiveTimestamp :: MessageAttribute
pattern $bMessageAttribute_ApproximateFirstReceiveTimestamp :: MessageAttribute
$mMessageAttribute_ApproximateFirstReceiveTimestamp :: forall r. MessageAttribute -> (Void# -> r) -> (Void# -> r) -> r
MessageAttribute_ApproximateFirstReceiveTimestamp = MessageAttribute' "ApproximateFirstReceiveTimestamp"

pattern MessageAttribute_ApproximateReceiveCount :: MessageAttribute
pattern $bMessageAttribute_ApproximateReceiveCount :: MessageAttribute
$mMessageAttribute_ApproximateReceiveCount :: forall r. MessageAttribute -> (Void# -> r) -> (Void# -> r) -> r
MessageAttribute_ApproximateReceiveCount = MessageAttribute' "ApproximateReceiveCount"

pattern MessageAttribute_SenderId :: MessageAttribute
pattern $bMessageAttribute_SenderId :: MessageAttribute
$mMessageAttribute_SenderId :: forall r. MessageAttribute -> (Void# -> r) -> (Void# -> r) -> r
MessageAttribute_SenderId = MessageAttribute' "SenderId"

pattern MessageAttribute_SentTimestamp :: MessageAttribute
pattern $bMessageAttribute_SentTimestamp :: MessageAttribute
$mMessageAttribute_SentTimestamp :: forall r. MessageAttribute -> (Void# -> r) -> (Void# -> r) -> r
MessageAttribute_SentTimestamp = MessageAttribute' "SentTimestamp"

{-# COMPLETE
  MessageAttribute_All,
  MessageAttribute_ApproximateFirstReceiveTimestamp,
  MessageAttribute_ApproximateReceiveCount,
  MessageAttribute_SenderId,
  MessageAttribute_SentTimestamp,
  MessageAttribute'
  #-}