{-# 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.BlockType
-- 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.BlockType
  ( BlockType
      ( ..,
        BlockType_CELL,
        BlockType_KEY_VALUE_SET,
        BlockType_LINE,
        BlockType_PAGE,
        BlockType_SELECTION_ELEMENT,
        BlockType_TABLE,
        BlockType_WORD
      ),
  )
where

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

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

pattern BlockType_CELL :: BlockType
pattern $bBlockType_CELL :: BlockType
$mBlockType_CELL :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_CELL = BlockType' "CELL"

pattern BlockType_KEY_VALUE_SET :: BlockType
pattern $bBlockType_KEY_VALUE_SET :: BlockType
$mBlockType_KEY_VALUE_SET :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_KEY_VALUE_SET = BlockType' "KEY_VALUE_SET"

pattern BlockType_LINE :: BlockType
pattern $bBlockType_LINE :: BlockType
$mBlockType_LINE :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_LINE = BlockType' "LINE"

pattern BlockType_PAGE :: BlockType
pattern $bBlockType_PAGE :: BlockType
$mBlockType_PAGE :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_PAGE = BlockType' "PAGE"

pattern BlockType_SELECTION_ELEMENT :: BlockType
pattern $bBlockType_SELECTION_ELEMENT :: BlockType
$mBlockType_SELECTION_ELEMENT :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_SELECTION_ELEMENT = BlockType' "SELECTION_ELEMENT"

pattern BlockType_TABLE :: BlockType
pattern $bBlockType_TABLE :: BlockType
$mBlockType_TABLE :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_TABLE = BlockType' "TABLE"

pattern BlockType_WORD :: BlockType
pattern $bBlockType_WORD :: BlockType
$mBlockType_WORD :: forall r. BlockType -> (Void# -> r) -> (Void# -> r) -> r
BlockType_WORD = BlockType' "WORD"

{-# COMPLETE
  BlockType_CELL,
  BlockType_KEY_VALUE_SET,
  BlockType_LINE,
  BlockType_PAGE,
  BlockType_SELECTION_ELEMENT,
  BlockType_TABLE,
  BlockType_WORD,
  BlockType'
  #-}