{-# 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.Textract.Types.TextType
-- 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.Textract.Types.TextType
  ( TextType
      ( ..,
        TextType_HANDWRITING,
        TextType_PRINTED
      ),
  )
where

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

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

pattern TextType_HANDWRITING :: TextType
pattern $bTextType_HANDWRITING :: TextType
$mTextType_HANDWRITING :: forall r. TextType -> (Void# -> r) -> (Void# -> r) -> r
TextType_HANDWRITING = TextType' "HANDWRITING"

pattern TextType_PRINTED :: TextType
pattern $bTextType_PRINTED :: TextType
$mTextType_PRINTED :: forall r. TextType -> (Void# -> r) -> (Void# -> r) -> r
TextType_PRINTED = TextType' "PRINTED"

{-# COMPLETE
  TextType_HANDWRITING,
  TextType_PRINTED,
  TextType'
  #-}