{-# 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.AlexaBusiness.Types.TemperatureUnit
-- 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.AlexaBusiness.Types.TemperatureUnit
  ( TemperatureUnit
      ( ..,
        TemperatureUnit_CELSIUS,
        TemperatureUnit_FAHRENHEIT
      ),
  )
where

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

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

pattern TemperatureUnit_CELSIUS :: TemperatureUnit
pattern $bTemperatureUnit_CELSIUS :: TemperatureUnit
$mTemperatureUnit_CELSIUS :: forall r. TemperatureUnit -> (Void# -> r) -> (Void# -> r) -> r
TemperatureUnit_CELSIUS = TemperatureUnit' "CELSIUS"

pattern TemperatureUnit_FAHRENHEIT :: TemperatureUnit
pattern $bTemperatureUnit_FAHRENHEIT :: TemperatureUnit
$mTemperatureUnit_FAHRENHEIT :: forall r. TemperatureUnit -> (Void# -> r) -> (Void# -> r) -> r
TemperatureUnit_FAHRENHEIT = TemperatureUnit' "FAHRENHEIT"

{-# COMPLETE
  TemperatureUnit_CELSIUS,
  TemperatureUnit_FAHRENHEIT,
  TemperatureUnit'
  #-}