{-# 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.Chime.Types.NotificationTarget
-- 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.Chime.Types.NotificationTarget
  ( NotificationTarget
      ( ..,
        NotificationTarget_EventBridge,
        NotificationTarget_SNS,
        NotificationTarget_SQS
      ),
  )
where

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

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

pattern NotificationTarget_EventBridge :: NotificationTarget
pattern $bNotificationTarget_EventBridge :: NotificationTarget
$mNotificationTarget_EventBridge :: forall r. NotificationTarget -> (Void# -> r) -> (Void# -> r) -> r
NotificationTarget_EventBridge = NotificationTarget' "EventBridge"

pattern NotificationTarget_SNS :: NotificationTarget
pattern $bNotificationTarget_SNS :: NotificationTarget
$mNotificationTarget_SNS :: forall r. NotificationTarget -> (Void# -> r) -> (Void# -> r) -> r
NotificationTarget_SNS = NotificationTarget' "SNS"

pattern NotificationTarget_SQS :: NotificationTarget
pattern $bNotificationTarget_SQS :: NotificationTarget
$mNotificationTarget_SQS :: forall r. NotificationTarget -> (Void# -> r) -> (Void# -> r) -> r
NotificationTarget_SQS = NotificationTarget' "SQS"

{-# COMPLETE
  NotificationTarget_EventBridge,
  NotificationTarget_SNS,
  NotificationTarget_SQS,
  NotificationTarget'
  #-}