{-# 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.ParticipantRole
-- 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.ConnectParticipant.Types.ParticipantRole
  ( ParticipantRole
      ( ..,
        ParticipantRole_AGENT,
        ParticipantRole_CUSTOMER,
        ParticipantRole_SYSTEM
      ),
  )
where

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

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

pattern ParticipantRole_AGENT :: ParticipantRole
pattern $bParticipantRole_AGENT :: ParticipantRole
$mParticipantRole_AGENT :: forall {r}. ParticipantRole -> ((# #) -> r) -> ((# #) -> r) -> r
ParticipantRole_AGENT = ParticipantRole' "AGENT"

pattern ParticipantRole_CUSTOMER :: ParticipantRole
pattern $bParticipantRole_CUSTOMER :: ParticipantRole
$mParticipantRole_CUSTOMER :: forall {r}. ParticipantRole -> ((# #) -> r) -> ((# #) -> r) -> r
ParticipantRole_CUSTOMER = ParticipantRole' "CUSTOMER"

pattern ParticipantRole_SYSTEM :: ParticipantRole
pattern $bParticipantRole_SYSTEM :: ParticipantRole
$mParticipantRole_SYSTEM :: forall {r}. ParticipantRole -> ((# #) -> r) -> ((# #) -> r) -> r
ParticipantRole_SYSTEM = ParticipantRole' "SYSTEM"

{-# COMPLETE
  ParticipantRole_AGENT,
  ParticipantRole_CUSTOMER,
  ParticipantRole_SYSTEM,
  ParticipantRole'
  #-}