{-# 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.AppStream.Types.MessageAction
-- 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.AppStream.Types.MessageAction
  ( MessageAction
      ( ..,
        MessageAction_RESEND,
        MessageAction_SUPPRESS
      ),
  )
where

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

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

pattern MessageAction_RESEND :: MessageAction
pattern $bMessageAction_RESEND :: MessageAction
$mMessageAction_RESEND :: forall r. MessageAction -> (Void# -> r) -> (Void# -> r) -> r
MessageAction_RESEND = MessageAction' "RESEND"

pattern MessageAction_SUPPRESS :: MessageAction
pattern $bMessageAction_SUPPRESS :: MessageAction
$mMessageAction_SUPPRESS :: forall r. MessageAction -> (Void# -> r) -> (Void# -> r) -> r
MessageAction_SUPPRESS = MessageAction' "SUPPRESS"

{-# COMPLETE
  MessageAction_RESEND,
  MessageAction_SUPPRESS,
  MessageAction'
  #-}