{-# 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.Comprehend.Types.SentimentType
-- 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.Comprehend.Types.SentimentType
  ( SentimentType
      ( ..,
        SentimentType_MIXED,
        SentimentType_NEGATIVE,
        SentimentType_NEUTRAL,
        SentimentType_POSITIVE
      ),
  )
where

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

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

pattern SentimentType_MIXED :: SentimentType
pattern $bSentimentType_MIXED :: SentimentType
$mSentimentType_MIXED :: forall r. SentimentType -> (Void# -> r) -> (Void# -> r) -> r
SentimentType_MIXED = SentimentType' "MIXED"

pattern SentimentType_NEGATIVE :: SentimentType
pattern $bSentimentType_NEGATIVE :: SentimentType
$mSentimentType_NEGATIVE :: forall r. SentimentType -> (Void# -> r) -> (Void# -> r) -> r
SentimentType_NEGATIVE = SentimentType' "NEGATIVE"

pattern SentimentType_NEUTRAL :: SentimentType
pattern $bSentimentType_NEUTRAL :: SentimentType
$mSentimentType_NEUTRAL :: forall r. SentimentType -> (Void# -> r) -> (Void# -> r) -> r
SentimentType_NEUTRAL = SentimentType' "NEUTRAL"

pattern SentimentType_POSITIVE :: SentimentType
pattern $bSentimentType_POSITIVE :: SentimentType
$mSentimentType_POSITIVE :: forall r. SentimentType -> (Void# -> r) -> (Void# -> r) -> r
SentimentType_POSITIVE = SentimentType' "POSITIVE"

{-# COMPLETE
  SentimentType_MIXED,
  SentimentType_NEGATIVE,
  SentimentType_NEUTRAL,
  SentimentType_POSITIVE,
  SentimentType'
  #-}