{-# 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.DeviceState
-- 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.DeviceState
  ( DeviceState
      ( ..,
        DeviceState_Provisioned,
        DeviceState_RegisteredNotSeen,
        DeviceState_RegisteredReachable,
        DeviceState_RegisteredUnreachable
      ),
  )
where

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

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

pattern DeviceState_Provisioned :: DeviceState
pattern $bDeviceState_Provisioned :: DeviceState
$mDeviceState_Provisioned :: forall r. DeviceState -> (Void# -> r) -> (Void# -> r) -> r
DeviceState_Provisioned = DeviceState' "Provisioned"

pattern DeviceState_RegisteredNotSeen :: DeviceState
pattern $bDeviceState_RegisteredNotSeen :: DeviceState
$mDeviceState_RegisteredNotSeen :: forall r. DeviceState -> (Void# -> r) -> (Void# -> r) -> r
DeviceState_RegisteredNotSeen = DeviceState' "RegisteredNotSeen"

pattern DeviceState_RegisteredReachable :: DeviceState
pattern $bDeviceState_RegisteredReachable :: DeviceState
$mDeviceState_RegisteredReachable :: forall r. DeviceState -> (Void# -> r) -> (Void# -> r) -> r
DeviceState_RegisteredReachable = DeviceState' "RegisteredReachable"

pattern DeviceState_RegisteredUnreachable :: DeviceState
pattern $bDeviceState_RegisteredUnreachable :: DeviceState
$mDeviceState_RegisteredUnreachable :: forall r. DeviceState -> (Void# -> r) -> (Void# -> r) -> r
DeviceState_RegisteredUnreachable = DeviceState' "RegisteredUnreachable"

{-# COMPLETE
  DeviceState_Provisioned,
  DeviceState_RegisteredNotSeen,
  DeviceState_RegisteredReachable,
  DeviceState_RegisteredUnreachable,
  DeviceState'
  #-}