{-# 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.ConnectParticipant.Types.ChatItemType
-- 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.ConnectParticipant.Types.ChatItemType
  ( ChatItemType
      ( ..,
        ChatItemType_ATTACHMENT,
        ChatItemType_CHAT_ENDED,
        ChatItemType_CONNECTION_ACK,
        ChatItemType_EVENT,
        ChatItemType_MESSAGE,
        ChatItemType_PARTICIPANT_JOINED,
        ChatItemType_PARTICIPANT_LEFT,
        ChatItemType_TRANSFER_FAILED,
        ChatItemType_TRANSFER_SUCCEEDED,
        ChatItemType_TYPING
      ),
  )
where

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

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

pattern ChatItemType_ATTACHMENT :: ChatItemType
pattern $bChatItemType_ATTACHMENT :: ChatItemType
$mChatItemType_ATTACHMENT :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_ATTACHMENT = ChatItemType' "ATTACHMENT"

pattern ChatItemType_CHAT_ENDED :: ChatItemType
pattern $bChatItemType_CHAT_ENDED :: ChatItemType
$mChatItemType_CHAT_ENDED :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_CHAT_ENDED = ChatItemType' "CHAT_ENDED"

pattern ChatItemType_CONNECTION_ACK :: ChatItemType
pattern $bChatItemType_CONNECTION_ACK :: ChatItemType
$mChatItemType_CONNECTION_ACK :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_CONNECTION_ACK = ChatItemType' "CONNECTION_ACK"

pattern ChatItemType_EVENT :: ChatItemType
pattern $bChatItemType_EVENT :: ChatItemType
$mChatItemType_EVENT :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_EVENT = ChatItemType' "EVENT"

pattern ChatItemType_MESSAGE :: ChatItemType
pattern $bChatItemType_MESSAGE :: ChatItemType
$mChatItemType_MESSAGE :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_MESSAGE = ChatItemType' "MESSAGE"

pattern ChatItemType_PARTICIPANT_JOINED :: ChatItemType
pattern $bChatItemType_PARTICIPANT_JOINED :: ChatItemType
$mChatItemType_PARTICIPANT_JOINED :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_PARTICIPANT_JOINED = ChatItemType' "PARTICIPANT_JOINED"

pattern ChatItemType_PARTICIPANT_LEFT :: ChatItemType
pattern $bChatItemType_PARTICIPANT_LEFT :: ChatItemType
$mChatItemType_PARTICIPANT_LEFT :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_PARTICIPANT_LEFT = ChatItemType' "PARTICIPANT_LEFT"

pattern ChatItemType_TRANSFER_FAILED :: ChatItemType
pattern $bChatItemType_TRANSFER_FAILED :: ChatItemType
$mChatItemType_TRANSFER_FAILED :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_TRANSFER_FAILED = ChatItemType' "TRANSFER_FAILED"

pattern ChatItemType_TRANSFER_SUCCEEDED :: ChatItemType
pattern $bChatItemType_TRANSFER_SUCCEEDED :: ChatItemType
$mChatItemType_TRANSFER_SUCCEEDED :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_TRANSFER_SUCCEEDED = ChatItemType' "TRANSFER_SUCCEEDED"

pattern ChatItemType_TYPING :: ChatItemType
pattern $bChatItemType_TYPING :: ChatItemType
$mChatItemType_TYPING :: forall r. ChatItemType -> (Void# -> r) -> (Void# -> r) -> r
ChatItemType_TYPING = ChatItemType' "TYPING"

{-# COMPLETE
  ChatItemType_ATTACHMENT,
  ChatItemType_CHAT_ENDED,
  ChatItemType_CONNECTION_ACK,
  ChatItemType_EVENT,
  ChatItemType_MESSAGE,
  ChatItemType_PARTICIPANT_JOINED,
  ChatItemType_PARTICIPANT_LEFT,
  ChatItemType_TRANSFER_FAILED,
  ChatItemType_TRANSFER_SUCCEEDED,
  ChatItemType_TYPING,
  ChatItemType'
  #-}