{-# 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.TimeStreamQuery.Types.ScalarType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.TimeStreamQuery.Types.ScalarType
  ( ScalarType
      ( ..,
        ScalarType_BIGINT,
        ScalarType_BOOLEAN,
        ScalarType_DATE,
        ScalarType_DOUBLE,
        ScalarType_INTEGER,
        ScalarType_INTERVAL_DAY_TO_SECOND,
        ScalarType_INTERVAL_YEAR_TO_MONTH,
        ScalarType_TIME,
        ScalarType_TIMESTAMP,
        ScalarType_UNKNOWN,
        ScalarType_VARCHAR
      ),
  )
where

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

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

pattern ScalarType_BIGINT :: ScalarType
pattern $bScalarType_BIGINT :: ScalarType
$mScalarType_BIGINT :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_BIGINT = ScalarType' "BIGINT"

pattern ScalarType_BOOLEAN :: ScalarType
pattern $bScalarType_BOOLEAN :: ScalarType
$mScalarType_BOOLEAN :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_BOOLEAN = ScalarType' "BOOLEAN"

pattern ScalarType_DATE :: ScalarType
pattern $bScalarType_DATE :: ScalarType
$mScalarType_DATE :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_DATE = ScalarType' "DATE"

pattern ScalarType_DOUBLE :: ScalarType
pattern $bScalarType_DOUBLE :: ScalarType
$mScalarType_DOUBLE :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_DOUBLE = ScalarType' "DOUBLE"

pattern ScalarType_INTEGER :: ScalarType
pattern $bScalarType_INTEGER :: ScalarType
$mScalarType_INTEGER :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_INTEGER = ScalarType' "INTEGER"

pattern ScalarType_INTERVAL_DAY_TO_SECOND :: ScalarType
pattern $bScalarType_INTERVAL_DAY_TO_SECOND :: ScalarType
$mScalarType_INTERVAL_DAY_TO_SECOND :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_INTERVAL_DAY_TO_SECOND = ScalarType' "INTERVAL_DAY_TO_SECOND"

pattern ScalarType_INTERVAL_YEAR_TO_MONTH :: ScalarType
pattern $bScalarType_INTERVAL_YEAR_TO_MONTH :: ScalarType
$mScalarType_INTERVAL_YEAR_TO_MONTH :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_INTERVAL_YEAR_TO_MONTH = ScalarType' "INTERVAL_YEAR_TO_MONTH"

pattern ScalarType_TIME :: ScalarType
pattern $bScalarType_TIME :: ScalarType
$mScalarType_TIME :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_TIME = ScalarType' "TIME"

pattern ScalarType_TIMESTAMP :: ScalarType
pattern $bScalarType_TIMESTAMP :: ScalarType
$mScalarType_TIMESTAMP :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_TIMESTAMP = ScalarType' "TIMESTAMP"

pattern ScalarType_UNKNOWN :: ScalarType
pattern $bScalarType_UNKNOWN :: ScalarType
$mScalarType_UNKNOWN :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_UNKNOWN = ScalarType' "UNKNOWN"

pattern ScalarType_VARCHAR :: ScalarType
pattern $bScalarType_VARCHAR :: ScalarType
$mScalarType_VARCHAR :: forall {r}. ScalarType -> ((# #) -> r) -> ((# #) -> r) -> r
ScalarType_VARCHAR = ScalarType' "VARCHAR"

{-# COMPLETE
  ScalarType_BIGINT,
  ScalarType_BOOLEAN,
  ScalarType_DATE,
  ScalarType_DOUBLE,
  ScalarType_INTEGER,
  ScalarType_INTERVAL_DAY_TO_SECOND,
  ScalarType_INTERVAL_YEAR_TO_MONTH,
  ScalarType_TIME,
  ScalarType_TIMESTAMP,
  ScalarType_UNKNOWN,
  ScalarType_VARCHAR,
  ScalarType'
  #-}