{-# 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.Pinpoint.Types.ButtonAction
-- 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.Pinpoint.Types.ButtonAction
  ( ButtonAction
      ( ..,
        ButtonAction_CLOSE,
        ButtonAction_DEEP_LINK,
        ButtonAction_LINK
      ),
  )
where

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

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

pattern ButtonAction_CLOSE :: ButtonAction
pattern $bButtonAction_CLOSE :: ButtonAction
$mButtonAction_CLOSE :: forall r. ButtonAction -> (Void# -> r) -> (Void# -> r) -> r
ButtonAction_CLOSE = ButtonAction' "CLOSE"

pattern ButtonAction_DEEP_LINK :: ButtonAction
pattern $bButtonAction_DEEP_LINK :: ButtonAction
$mButtonAction_DEEP_LINK :: forall r. ButtonAction -> (Void# -> r) -> (Void# -> r) -> r
ButtonAction_DEEP_LINK = ButtonAction' "DEEP_LINK"

pattern ButtonAction_LINK :: ButtonAction
pattern $bButtonAction_LINK :: ButtonAction
$mButtonAction_LINK :: forall r. ButtonAction -> (Void# -> r) -> (Void# -> r) -> r
ButtonAction_LINK = ButtonAction' "LINK"

{-# COMPLETE
  ButtonAction_CLOSE,
  ButtonAction_DEEP_LINK,
  ButtonAction_LINK,
  ButtonAction'
  #-}