{-# 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.CloudSearch.Types.IndexFieldType
-- 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.CloudSearch.Types.IndexFieldType
  ( IndexFieldType
      ( ..,
        IndexFieldType_Date,
        IndexFieldType_Date_array,
        IndexFieldType_Double,
        IndexFieldType_Double_array,
        IndexFieldType_Int,
        IndexFieldType_Int_array,
        IndexFieldType_Latlon,
        IndexFieldType_Literal,
        IndexFieldType_Literal_array,
        IndexFieldType_Text,
        IndexFieldType_Text_array
      ),
  )
where

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

-- | The type of field. The valid options for a field depend on the field
-- type. For more information about the supported field types, see
-- <http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html Configuring Index Fields>
-- in the /Amazon CloudSearch Developer Guide/.
newtype IndexFieldType = IndexFieldType'
  { IndexFieldType -> Text
fromIndexFieldType ::
      Core.Text
  }
  deriving stock
    ( Int -> IndexFieldType -> ShowS
[IndexFieldType] -> ShowS
IndexFieldType -> String
(Int -> IndexFieldType -> ShowS)
-> (IndexFieldType -> String)
-> ([IndexFieldType] -> ShowS)
-> Show IndexFieldType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IndexFieldType] -> ShowS
$cshowList :: [IndexFieldType] -> ShowS
show :: IndexFieldType -> String
$cshow :: IndexFieldType -> String
showsPrec :: Int -> IndexFieldType -> ShowS
$cshowsPrec :: Int -> IndexFieldType -> ShowS
Prelude.Show,
      ReadPrec [IndexFieldType]
ReadPrec IndexFieldType
Int -> ReadS IndexFieldType
ReadS [IndexFieldType]
(Int -> ReadS IndexFieldType)
-> ReadS [IndexFieldType]
-> ReadPrec IndexFieldType
-> ReadPrec [IndexFieldType]
-> Read IndexFieldType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IndexFieldType]
$creadListPrec :: ReadPrec [IndexFieldType]
readPrec :: ReadPrec IndexFieldType
$creadPrec :: ReadPrec IndexFieldType
readList :: ReadS [IndexFieldType]
$creadList :: ReadS [IndexFieldType]
readsPrec :: Int -> ReadS IndexFieldType
$creadsPrec :: Int -> ReadS IndexFieldType
Prelude.Read,
      IndexFieldType -> IndexFieldType -> Bool
(IndexFieldType -> IndexFieldType -> Bool)
-> (IndexFieldType -> IndexFieldType -> Bool) -> Eq IndexFieldType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexFieldType -> IndexFieldType -> Bool
$c/= :: IndexFieldType -> IndexFieldType -> Bool
== :: IndexFieldType -> IndexFieldType -> Bool
$c== :: IndexFieldType -> IndexFieldType -> Bool
Prelude.Eq,
      Eq IndexFieldType
Eq IndexFieldType
-> (IndexFieldType -> IndexFieldType -> Ordering)
-> (IndexFieldType -> IndexFieldType -> Bool)
-> (IndexFieldType -> IndexFieldType -> Bool)
-> (IndexFieldType -> IndexFieldType -> Bool)
-> (IndexFieldType -> IndexFieldType -> Bool)
-> (IndexFieldType -> IndexFieldType -> IndexFieldType)
-> (IndexFieldType -> IndexFieldType -> IndexFieldType)
-> Ord IndexFieldType
IndexFieldType -> IndexFieldType -> Bool
IndexFieldType -> IndexFieldType -> Ordering
IndexFieldType -> IndexFieldType -> IndexFieldType
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 :: IndexFieldType -> IndexFieldType -> IndexFieldType
$cmin :: IndexFieldType -> IndexFieldType -> IndexFieldType
max :: IndexFieldType -> IndexFieldType -> IndexFieldType
$cmax :: IndexFieldType -> IndexFieldType -> IndexFieldType
>= :: IndexFieldType -> IndexFieldType -> Bool
$c>= :: IndexFieldType -> IndexFieldType -> Bool
> :: IndexFieldType -> IndexFieldType -> Bool
$c> :: IndexFieldType -> IndexFieldType -> Bool
<= :: IndexFieldType -> IndexFieldType -> Bool
$c<= :: IndexFieldType -> IndexFieldType -> Bool
< :: IndexFieldType -> IndexFieldType -> Bool
$c< :: IndexFieldType -> IndexFieldType -> Bool
compare :: IndexFieldType -> IndexFieldType -> Ordering
$ccompare :: IndexFieldType -> IndexFieldType -> Ordering
$cp1Ord :: Eq IndexFieldType
Prelude.Ord,
      (forall x. IndexFieldType -> Rep IndexFieldType x)
-> (forall x. Rep IndexFieldType x -> IndexFieldType)
-> Generic IndexFieldType
forall x. Rep IndexFieldType x -> IndexFieldType
forall x. IndexFieldType -> Rep IndexFieldType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IndexFieldType x -> IndexFieldType
$cfrom :: forall x. IndexFieldType -> Rep IndexFieldType x
Prelude.Generic
    )
  deriving newtype
    ( Int -> IndexFieldType -> Int
IndexFieldType -> Int
(Int -> IndexFieldType -> Int)
-> (IndexFieldType -> Int) -> Hashable IndexFieldType
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: IndexFieldType -> Int
$chash :: IndexFieldType -> Int
hashWithSalt :: Int -> IndexFieldType -> Int
$chashWithSalt :: Int -> IndexFieldType -> Int
Prelude.Hashable,
      IndexFieldType -> ()
(IndexFieldType -> ()) -> NFData IndexFieldType
forall a. (a -> ()) -> NFData a
rnf :: IndexFieldType -> ()
$crnf :: IndexFieldType -> ()
Prelude.NFData,
      Text -> Either String IndexFieldType
(Text -> Either String IndexFieldType) -> FromText IndexFieldType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String IndexFieldType
$cfromText :: Text -> Either String IndexFieldType
Core.FromText,
      IndexFieldType -> Text
(IndexFieldType -> Text) -> ToText IndexFieldType
forall a. (a -> Text) -> ToText a
toText :: IndexFieldType -> Text
$ctoText :: IndexFieldType -> Text
Core.ToText,
      IndexFieldType -> ByteString
(IndexFieldType -> ByteString) -> ToByteString IndexFieldType
forall a. (a -> ByteString) -> ToByteString a
toBS :: IndexFieldType -> ByteString
$ctoBS :: IndexFieldType -> ByteString
Core.ToByteString,
      IndexFieldType -> ByteStringBuilder
(IndexFieldType -> ByteStringBuilder) -> ToLog IndexFieldType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: IndexFieldType -> ByteStringBuilder
$cbuild :: IndexFieldType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> IndexFieldType -> [Header]
(HeaderName -> IndexFieldType -> [Header])
-> ToHeader IndexFieldType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> IndexFieldType -> [Header]
$ctoHeader :: HeaderName -> IndexFieldType -> [Header]
Core.ToHeader,
      IndexFieldType -> QueryString
(IndexFieldType -> QueryString) -> ToQuery IndexFieldType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: IndexFieldType -> QueryString
$ctoQuery :: IndexFieldType -> QueryString
Core.ToQuery,
      Value -> Parser [IndexFieldType]
Value -> Parser IndexFieldType
(Value -> Parser IndexFieldType)
-> (Value -> Parser [IndexFieldType]) -> FromJSON IndexFieldType
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [IndexFieldType]
$cparseJSONList :: Value -> Parser [IndexFieldType]
parseJSON :: Value -> Parser IndexFieldType
$cparseJSON :: Value -> Parser IndexFieldType
Core.FromJSON,
      FromJSONKeyFunction [IndexFieldType]
FromJSONKeyFunction IndexFieldType
FromJSONKeyFunction IndexFieldType
-> FromJSONKeyFunction [IndexFieldType]
-> FromJSONKey IndexFieldType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [IndexFieldType]
$cfromJSONKeyList :: FromJSONKeyFunction [IndexFieldType]
fromJSONKey :: FromJSONKeyFunction IndexFieldType
$cfromJSONKey :: FromJSONKeyFunction IndexFieldType
Core.FromJSONKey,
      [IndexFieldType] -> Encoding
[IndexFieldType] -> Value
IndexFieldType -> Encoding
IndexFieldType -> Value
(IndexFieldType -> Value)
-> (IndexFieldType -> Encoding)
-> ([IndexFieldType] -> Value)
-> ([IndexFieldType] -> Encoding)
-> ToJSON IndexFieldType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [IndexFieldType] -> Encoding
$ctoEncodingList :: [IndexFieldType] -> Encoding
toJSONList :: [IndexFieldType] -> Value
$ctoJSONList :: [IndexFieldType] -> Value
toEncoding :: IndexFieldType -> Encoding
$ctoEncoding :: IndexFieldType -> Encoding
toJSON :: IndexFieldType -> Value
$ctoJSON :: IndexFieldType -> Value
Core.ToJSON,
      ToJSONKeyFunction [IndexFieldType]
ToJSONKeyFunction IndexFieldType
ToJSONKeyFunction IndexFieldType
-> ToJSONKeyFunction [IndexFieldType] -> ToJSONKey IndexFieldType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [IndexFieldType]
$ctoJSONKeyList :: ToJSONKeyFunction [IndexFieldType]
toJSONKey :: ToJSONKeyFunction IndexFieldType
$ctoJSONKey :: ToJSONKeyFunction IndexFieldType
Core.ToJSONKey,
      [Node] -> Either String IndexFieldType
([Node] -> Either String IndexFieldType) -> FromXML IndexFieldType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String IndexFieldType
$cparseXML :: [Node] -> Either String IndexFieldType
Core.FromXML,
      IndexFieldType -> XML
(IndexFieldType -> XML) -> ToXML IndexFieldType
forall a. (a -> XML) -> ToXML a
toXML :: IndexFieldType -> XML
$ctoXML :: IndexFieldType -> XML
Core.ToXML
    )

pattern IndexFieldType_Date :: IndexFieldType
pattern $bIndexFieldType_Date :: IndexFieldType
$mIndexFieldType_Date :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Date = IndexFieldType' "date"

pattern IndexFieldType_Date_array :: IndexFieldType
pattern $bIndexFieldType_Date_array :: IndexFieldType
$mIndexFieldType_Date_array :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Date_array = IndexFieldType' "date-array"

pattern IndexFieldType_Double :: IndexFieldType
pattern $bIndexFieldType_Double :: IndexFieldType
$mIndexFieldType_Double :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Double = IndexFieldType' "double"

pattern IndexFieldType_Double_array :: IndexFieldType
pattern $bIndexFieldType_Double_array :: IndexFieldType
$mIndexFieldType_Double_array :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Double_array = IndexFieldType' "double-array"

pattern IndexFieldType_Int :: IndexFieldType
pattern $bIndexFieldType_Int :: IndexFieldType
$mIndexFieldType_Int :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Int = IndexFieldType' "int"

pattern IndexFieldType_Int_array :: IndexFieldType
pattern $bIndexFieldType_Int_array :: IndexFieldType
$mIndexFieldType_Int_array :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Int_array = IndexFieldType' "int-array"

pattern IndexFieldType_Latlon :: IndexFieldType
pattern $bIndexFieldType_Latlon :: IndexFieldType
$mIndexFieldType_Latlon :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Latlon = IndexFieldType' "latlon"

pattern IndexFieldType_Literal :: IndexFieldType
pattern $bIndexFieldType_Literal :: IndexFieldType
$mIndexFieldType_Literal :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Literal = IndexFieldType' "literal"

pattern IndexFieldType_Literal_array :: IndexFieldType
pattern $bIndexFieldType_Literal_array :: IndexFieldType
$mIndexFieldType_Literal_array :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Literal_array = IndexFieldType' "literal-array"

pattern IndexFieldType_Text :: IndexFieldType
pattern $bIndexFieldType_Text :: IndexFieldType
$mIndexFieldType_Text :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Text = IndexFieldType' "text"

pattern IndexFieldType_Text_array :: IndexFieldType
pattern $bIndexFieldType_Text_array :: IndexFieldType
$mIndexFieldType_Text_array :: forall r. IndexFieldType -> (Void# -> r) -> (Void# -> r) -> r
IndexFieldType_Text_array = IndexFieldType' "text-array"

{-# COMPLETE
  IndexFieldType_Date,
  IndexFieldType_Date_array,
  IndexFieldType_Double,
  IndexFieldType_Double_array,
  IndexFieldType_Int,
  IndexFieldType_Int_array,
  IndexFieldType_Latlon,
  IndexFieldType_Literal,
  IndexFieldType_Literal_array,
  IndexFieldType_Text,
  IndexFieldType_Text_array,
  IndexFieldType'
  #-}