{-# 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.IoTWireless.Types.Event
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTWireless.Types.Event
  ( Event
      ( ..,
        Event_Ack,
        Event_Discovered,
        Event_Lost,
        Event_Nack,
        Event_Passthrough
      ),
  )
where

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

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

pattern Event_Ack :: Event
pattern $bEvent_Ack :: Event
$mEvent_Ack :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_Ack = Event' "ack"

pattern Event_Discovered :: Event
pattern $bEvent_Discovered :: Event
$mEvent_Discovered :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_Discovered = Event' "discovered"

pattern Event_Lost :: Event
pattern $bEvent_Lost :: Event
$mEvent_Lost :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_Lost = Event' "lost"

pattern Event_Nack :: Event
pattern $bEvent_Nack :: Event
$mEvent_Nack :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_Nack = Event' "nack"

pattern Event_Passthrough :: Event
pattern $bEvent_Passthrough :: Event
$mEvent_Passthrough :: forall {r}. Event -> ((# #) -> r) -> ((# #) -> r) -> r
Event_Passthrough = Event' "passthrough"

{-# COMPLETE
  Event_Ack,
  Event_Discovered,
  Event_Lost,
  Event_Nack,
  Event_Passthrough,
  Event'
  #-}