{-# 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-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.IoTWireless.Types.Event
  ( Event
      ( ..,
        Event_Ack,
        Event_Discovered,
        Event_Lost,
        Event_Nack,
        Event_Passthrough
      ),
  )
where

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

-- | Sidewalk device status notification.
newtype Event = Event' {Event -> Text
fromEvent :: Core.Text}
  deriving stock
    ( Int -> Event -> ShowS
[Event] -> ShowS
Event -> String
(Int -> Event -> ShowS)
-> (Event -> String) -> ([Event] -> ShowS) -> Show Event
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]
(Int -> ReadS Event)
-> ReadS [Event]
-> ReadPrec Event
-> ReadPrec [Event]
-> Read 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
(Event -> Event -> Bool) -> (Event -> Event -> Bool) -> Eq Event
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
Eq Event
-> (Event -> Event -> Ordering)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Event)
-> (Event -> Event -> Event)
-> Ord 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
$cp1Ord :: Eq Event
Prelude.Ord,
      (forall x. Event -> Rep Event x)
-> (forall x. Rep Event x -> Event) -> Generic Event
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
    ( Int -> Event -> Int
Event -> Int
(Int -> Event -> Int) -> (Event -> Int) -> Hashable Event
forall 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 -> ()
(Event -> ()) -> NFData Event
forall a. (a -> ()) -> NFData a
rnf :: Event -> ()
$crnf :: Event -> ()
Prelude.NFData,
      Text -> Either String Event
(Text -> Either String Event) -> FromText Event
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String Event
$cfromText :: Text -> Either String Event
Core.FromText,
      Event -> Text
(Event -> Text) -> ToText Event
forall a. (a -> Text) -> ToText a
toText :: Event -> Text
$ctoText :: Event -> Text
Core.ToText,
      Event -> ByteString
(Event -> ByteString) -> ToByteString Event
forall a. (a -> ByteString) -> ToByteString a
toBS :: Event -> ByteString
$ctoBS :: Event -> ByteString
Core.ToByteString,
      Event -> ByteStringBuilder
(Event -> ByteStringBuilder) -> ToLog Event
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: Event -> ByteStringBuilder
$cbuild :: Event -> ByteStringBuilder
Core.ToLog,
      HeaderName -> Event -> [Header]
(HeaderName -> Event -> [Header]) -> ToHeader Event
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> Event -> [Header]
$ctoHeader :: HeaderName -> Event -> [Header]
Core.ToHeader,
      Event -> QueryString
(Event -> QueryString) -> ToQuery Event
forall a. (a -> QueryString) -> ToQuery a
toQuery :: Event -> QueryString
$ctoQuery :: Event -> QueryString
Core.ToQuery,
      Value -> Parser [Event]
Value -> Parser Event
(Value -> Parser Event)
-> (Value -> Parser [Event]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [Event]
FromJSONKeyFunction Event
FromJSONKeyFunction Event
-> FromJSONKeyFunction [Event] -> FromJSONKey Event
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [Event]
$cfromJSONKeyList :: FromJSONKeyFunction [Event]
fromJSONKey :: FromJSONKeyFunction Event
$cfromJSONKey :: FromJSONKeyFunction Event
Core.FromJSONKey,
      [Event] -> Encoding
[Event] -> Value
Event -> Encoding
Event -> Value
(Event -> Value)
-> (Event -> Encoding)
-> ([Event] -> Value)
-> ([Event] -> Encoding)
-> ToJSON Event
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
Core.ToJSON,
      ToJSONKeyFunction [Event]
ToJSONKeyFunction Event
ToJSONKeyFunction Event
-> ToJSONKeyFunction [Event] -> ToJSONKey Event
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [Event]
$ctoJSONKeyList :: ToJSONKeyFunction [Event]
toJSONKey :: ToJSONKeyFunction Event
$ctoJSONKey :: ToJSONKeyFunction Event
Core.ToJSONKey,
      [Node] -> Either String Event
([Node] -> Either String Event) -> FromXML Event
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String Event
$cparseXML :: [Node] -> Either String Event
Core.FromXML,
      Event -> XML
(Event -> XML) -> ToXML Event
forall a. (a -> XML) -> ToXML a
toXML :: Event -> XML
$ctoXML :: Event -> XML
Core.ToXML
    )

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

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

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

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

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

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