{-# 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.JobStatus
-- 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.JobStatus
  ( JobStatus
      ( ..,
        JobStatus_COMPLETED,
        JobStatus_FAILED,
        JobStatus_IN_PROGRESS,
        JobStatus_STOPPED,
        JobStatus_STOP_REQUESTED,
        JobStatus_SUBMITTED
      ),
  )
where

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

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

pattern JobStatus_COMPLETED :: JobStatus
pattern $bJobStatus_COMPLETED :: JobStatus
$mJobStatus_COMPLETED :: forall r. JobStatus -> (Void# -> r) -> (Void# -> r) -> r
JobStatus_COMPLETED = JobStatus' "COMPLETED"

pattern JobStatus_FAILED :: JobStatus
pattern $bJobStatus_FAILED :: JobStatus
$mJobStatus_FAILED :: forall r. JobStatus -> (Void# -> r) -> (Void# -> r) -> r
JobStatus_FAILED = JobStatus' "FAILED"

pattern JobStatus_IN_PROGRESS :: JobStatus
pattern $bJobStatus_IN_PROGRESS :: JobStatus
$mJobStatus_IN_PROGRESS :: forall r. JobStatus -> (Void# -> r) -> (Void# -> r) -> r
JobStatus_IN_PROGRESS = JobStatus' "IN_PROGRESS"

pattern JobStatus_STOPPED :: JobStatus
pattern $bJobStatus_STOPPED :: JobStatus
$mJobStatus_STOPPED :: forall r. JobStatus -> (Void# -> r) -> (Void# -> r) -> r
JobStatus_STOPPED = JobStatus' "STOPPED"

pattern JobStatus_STOP_REQUESTED :: JobStatus
pattern $bJobStatus_STOP_REQUESTED :: JobStatus
$mJobStatus_STOP_REQUESTED :: forall r. JobStatus -> (Void# -> r) -> (Void# -> r) -> r
JobStatus_STOP_REQUESTED = JobStatus' "STOP_REQUESTED"

pattern JobStatus_SUBMITTED :: JobStatus
pattern $bJobStatus_SUBMITTED :: JobStatus
$mJobStatus_SUBMITTED :: forall r. JobStatus -> (Void# -> r) -> (Void# -> r) -> r
JobStatus_SUBMITTED = JobStatus' "SUBMITTED"

{-# COMPLETE
  JobStatus_COMPLETED,
  JobStatus_FAILED,
  JobStatus_IN_PROGRESS,
  JobStatus_STOPPED,
  JobStatus_STOP_REQUESTED,
  JobStatus_SUBMITTED,
  JobStatus'
  #-}