{-# 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.IoT.Types.ActionType
-- 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.IoT.Types.ActionType
  ( ActionType
      ( ..,
        ActionType_CONNECT,
        ActionType_PUBLISH,
        ActionType_RECEIVE,
        ActionType_SUBSCRIBE
      ),
  )
where

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

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

pattern ActionType_CONNECT :: ActionType
pattern $bActionType_CONNECT :: ActionType
$mActionType_CONNECT :: forall r. ActionType -> (Void# -> r) -> (Void# -> r) -> r
ActionType_CONNECT = ActionType' "CONNECT"

pattern ActionType_PUBLISH :: ActionType
pattern $bActionType_PUBLISH :: ActionType
$mActionType_PUBLISH :: forall r. ActionType -> (Void# -> r) -> (Void# -> r) -> r
ActionType_PUBLISH = ActionType' "PUBLISH"

pattern ActionType_RECEIVE :: ActionType
pattern $bActionType_RECEIVE :: ActionType
$mActionType_RECEIVE :: forall r. ActionType -> (Void# -> r) -> (Void# -> r) -> r
ActionType_RECEIVE = ActionType' "RECEIVE"

pattern ActionType_SUBSCRIBE :: ActionType
pattern $bActionType_SUBSCRIBE :: ActionType
$mActionType_SUBSCRIBE :: forall r. ActionType -> (Void# -> r) -> (Void# -> r) -> r
ActionType_SUBSCRIBE = ActionType' "SUBSCRIBE"

{-# COMPLETE
  ActionType_CONNECT,
  ActionType_PUBLISH,
  ActionType_RECEIVE,
  ActionType_SUBSCRIBE,
  ActionType'
  #-}