{-# 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.RelationshipType
-- 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.RelationshipType
  ( RelationshipType
      ( ..,
        RelationshipType_CHILD,
        RelationshipType_COMPLEX_FEATURES,
        RelationshipType_VALUE
      ),
  )
where

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

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

pattern RelationshipType_CHILD :: RelationshipType
pattern $bRelationshipType_CHILD :: RelationshipType
$mRelationshipType_CHILD :: forall r. RelationshipType -> (Void# -> r) -> (Void# -> r) -> r
RelationshipType_CHILD = RelationshipType' "CHILD"

pattern RelationshipType_COMPLEX_FEATURES :: RelationshipType
pattern $bRelationshipType_COMPLEX_FEATURES :: RelationshipType
$mRelationshipType_COMPLEX_FEATURES :: forall r. RelationshipType -> (Void# -> r) -> (Void# -> r) -> r
RelationshipType_COMPLEX_FEATURES = RelationshipType' "COMPLEX_FEATURES"

pattern RelationshipType_VALUE :: RelationshipType
pattern $bRelationshipType_VALUE :: RelationshipType
$mRelationshipType_VALUE :: forall r. RelationshipType -> (Void# -> r) -> (Void# -> r) -> r
RelationshipType_VALUE = RelationshipType' "VALUE"

{-# COMPLETE
  RelationshipType_CHILD,
  RelationshipType_COMPLEX_FEATURES,
  RelationshipType_VALUE,
  RelationshipType'
  #-}