{-# 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.IoTSiteWise.Types.Quality
-- 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.IoTSiteWise.Types.Quality
  ( Quality
      ( ..,
        Quality_BAD,
        Quality_GOOD,
        Quality_UNCERTAIN
      ),
  )
where

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

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

pattern Quality_BAD :: Quality
pattern $bQuality_BAD :: Quality
$mQuality_BAD :: forall r. Quality -> (Void# -> r) -> (Void# -> r) -> r
Quality_BAD = Quality' "BAD"

pattern Quality_GOOD :: Quality
pattern $bQuality_GOOD :: Quality
$mQuality_GOOD :: forall r. Quality -> (Void# -> r) -> (Void# -> r) -> r
Quality_GOOD = Quality' "GOOD"

pattern Quality_UNCERTAIN :: Quality
pattern $bQuality_UNCERTAIN :: Quality
$mQuality_UNCERTAIN :: forall r. Quality -> (Void# -> r) -> (Void# -> r) -> r
Quality_UNCERTAIN = Quality' "UNCERTAIN"

{-# COMPLETE
  Quality_BAD,
  Quality_GOOD,
  Quality_UNCERTAIN,
  Quality'
  #-}