{-# 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.EntityType
-- 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.EntityType
  ( EntityType
      ( ..,
        EntityType_KEY,
        EntityType_VALUE
      ),
  )
where

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

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

pattern EntityType_KEY :: EntityType
pattern $bEntityType_KEY :: EntityType
$mEntityType_KEY :: forall r. EntityType -> (Void# -> r) -> (Void# -> r) -> r
EntityType_KEY = EntityType' "KEY"

pattern EntityType_VALUE :: EntityType
pattern $bEntityType_VALUE :: EntityType
$mEntityType_VALUE :: forall r. EntityType -> (Void# -> r) -> (Void# -> r) -> r
EntityType_VALUE = EntityType' "VALUE"

{-# COMPLETE
  EntityType_KEY,
  EntityType_VALUE,
  EntityType'
  #-}