{-# 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.SSM.Types.NotificationEvent
-- 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.SSM.Types.NotificationEvent
  ( NotificationEvent
      ( ..,
        NotificationEvent_All,
        NotificationEvent_Cancelled,
        NotificationEvent_Failed,
        NotificationEvent_InProgress,
        NotificationEvent_Success,
        NotificationEvent_TimedOut
      ),
  )
where

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

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

pattern NotificationEvent_All :: NotificationEvent
pattern $bNotificationEvent_All :: NotificationEvent
$mNotificationEvent_All :: forall r. NotificationEvent -> (Void# -> r) -> (Void# -> r) -> r
NotificationEvent_All = NotificationEvent' "All"

pattern NotificationEvent_Cancelled :: NotificationEvent
pattern $bNotificationEvent_Cancelled :: NotificationEvent
$mNotificationEvent_Cancelled :: forall r. NotificationEvent -> (Void# -> r) -> (Void# -> r) -> r
NotificationEvent_Cancelled = NotificationEvent' "Cancelled"

pattern NotificationEvent_Failed :: NotificationEvent
pattern $bNotificationEvent_Failed :: NotificationEvent
$mNotificationEvent_Failed :: forall r. NotificationEvent -> (Void# -> r) -> (Void# -> r) -> r
NotificationEvent_Failed = NotificationEvent' "Failed"

pattern NotificationEvent_InProgress :: NotificationEvent
pattern $bNotificationEvent_InProgress :: NotificationEvent
$mNotificationEvent_InProgress :: forall r. NotificationEvent -> (Void# -> r) -> (Void# -> r) -> r
NotificationEvent_InProgress = NotificationEvent' "InProgress"

pattern NotificationEvent_Success :: NotificationEvent
pattern $bNotificationEvent_Success :: NotificationEvent
$mNotificationEvent_Success :: forall r. NotificationEvent -> (Void# -> r) -> (Void# -> r) -> r
NotificationEvent_Success = NotificationEvent' "Success"

pattern NotificationEvent_TimedOut :: NotificationEvent
pattern $bNotificationEvent_TimedOut :: NotificationEvent
$mNotificationEvent_TimedOut :: forall r. NotificationEvent -> (Void# -> r) -> (Void# -> r) -> r
NotificationEvent_TimedOut = NotificationEvent' "TimedOut"

{-# COMPLETE
  NotificationEvent_All,
  NotificationEvent_Cancelled,
  NotificationEvent_Failed,
  NotificationEvent_InProgress,
  NotificationEvent_Success,
  NotificationEvent_TimedOut,
  NotificationEvent'
  #-}