{-# 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.PropertyDataType
-- 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.PropertyDataType
  ( PropertyDataType
      ( ..,
        PropertyDataType_BOOLEAN,
        PropertyDataType_DOUBLE,
        PropertyDataType_INTEGER,
        PropertyDataType_STRING,
        PropertyDataType_STRUCT
      ),
  )
where

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

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

pattern PropertyDataType_BOOLEAN :: PropertyDataType
pattern $bPropertyDataType_BOOLEAN :: PropertyDataType
$mPropertyDataType_BOOLEAN :: forall r. PropertyDataType -> (Void# -> r) -> (Void# -> r) -> r
PropertyDataType_BOOLEAN = PropertyDataType' "BOOLEAN"

pattern PropertyDataType_DOUBLE :: PropertyDataType
pattern $bPropertyDataType_DOUBLE :: PropertyDataType
$mPropertyDataType_DOUBLE :: forall r. PropertyDataType -> (Void# -> r) -> (Void# -> r) -> r
PropertyDataType_DOUBLE = PropertyDataType' "DOUBLE"

pattern PropertyDataType_INTEGER :: PropertyDataType
pattern $bPropertyDataType_INTEGER :: PropertyDataType
$mPropertyDataType_INTEGER :: forall r. PropertyDataType -> (Void# -> r) -> (Void# -> r) -> r
PropertyDataType_INTEGER = PropertyDataType' "INTEGER"

pattern PropertyDataType_STRING :: PropertyDataType
pattern $bPropertyDataType_STRING :: PropertyDataType
$mPropertyDataType_STRING :: forall r. PropertyDataType -> (Void# -> r) -> (Void# -> r) -> r
PropertyDataType_STRING = PropertyDataType' "STRING"

pattern PropertyDataType_STRUCT :: PropertyDataType
pattern $bPropertyDataType_STRUCT :: PropertyDataType
$mPropertyDataType_STRUCT :: forall r. PropertyDataType -> (Void# -> r) -> (Void# -> r) -> r
PropertyDataType_STRUCT = PropertyDataType' "STRUCT"

{-# COMPLETE
  PropertyDataType_BOOLEAN,
  PropertyDataType_DOUBLE,
  PropertyDataType_INTEGER,
  PropertyDataType_STRING,
  PropertyDataType_STRUCT,
  PropertyDataType'
  #-}