{-# 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.IoT.Types.FieldType
-- 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.IoT.Types.FieldType
  ( FieldType
      ( ..,
        FieldType_Boolean,
        FieldType_Number,
        FieldType_String
      ),
  )
where

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

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

pattern FieldType_Boolean :: FieldType
pattern $bFieldType_Boolean :: FieldType
$mFieldType_Boolean :: forall r. FieldType -> (Void# -> r) -> (Void# -> r) -> r
FieldType_Boolean = FieldType' "Boolean"

pattern FieldType_Number :: FieldType
pattern $bFieldType_Number :: FieldType
$mFieldType_Number :: forall r. FieldType -> (Void# -> r) -> (Void# -> r) -> r
FieldType_Number = FieldType' "Number"

pattern FieldType_String :: FieldType
pattern $bFieldType_String :: FieldType
$mFieldType_String :: forall r. FieldType -> (Void# -> r) -> (Void# -> r) -> r
FieldType_String = FieldType' "String"

{-# COMPLETE
  FieldType_Boolean,
  FieldType_Number,
  FieldType_String,
  FieldType'
  #-}