{-# 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.GreengrassV2.Types.CoreDeviceStatus
-- 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.GreengrassV2.Types.CoreDeviceStatus
  ( CoreDeviceStatus
      ( ..,
        CoreDeviceStatus_HEALTHY,
        CoreDeviceStatus_UNHEALTHY
      ),
  )
where

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

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

pattern CoreDeviceStatus_HEALTHY :: CoreDeviceStatus
pattern $bCoreDeviceStatus_HEALTHY :: CoreDeviceStatus
$mCoreDeviceStatus_HEALTHY :: forall r. CoreDeviceStatus -> (Void# -> r) -> (Void# -> r) -> r
CoreDeviceStatus_HEALTHY = CoreDeviceStatus' "HEALTHY"

pattern CoreDeviceStatus_UNHEALTHY :: CoreDeviceStatus
pattern $bCoreDeviceStatus_UNHEALTHY :: CoreDeviceStatus
$mCoreDeviceStatus_UNHEALTHY :: forall r. CoreDeviceStatus -> (Void# -> r) -> (Void# -> r) -> r
CoreDeviceStatus_UNHEALTHY = CoreDeviceStatus' "UNHEALTHY"

{-# COMPLETE
  CoreDeviceStatus_HEALTHY,
  CoreDeviceStatus_UNHEALTHY,
  CoreDeviceStatus'
  #-}