{-# 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.MechanicalTurk.Types.NotifyWorkersFailureCode
-- 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.MechanicalTurk.Types.NotifyWorkersFailureCode
  ( NotifyWorkersFailureCode
      ( ..,
        NotifyWorkersFailureCode_HardFailure,
        NotifyWorkersFailureCode_SoftFailure
      ),
  )
where

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

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

pattern NotifyWorkersFailureCode_HardFailure :: NotifyWorkersFailureCode
pattern $bNotifyWorkersFailureCode_HardFailure :: NotifyWorkersFailureCode
$mNotifyWorkersFailureCode_HardFailure :: forall r.
NotifyWorkersFailureCode -> (Void# -> r) -> (Void# -> r) -> r
NotifyWorkersFailureCode_HardFailure = NotifyWorkersFailureCode' "HardFailure"

pattern NotifyWorkersFailureCode_SoftFailure :: NotifyWorkersFailureCode
pattern $bNotifyWorkersFailureCode_SoftFailure :: NotifyWorkersFailureCode
$mNotifyWorkersFailureCode_SoftFailure :: forall r.
NotifyWorkersFailureCode -> (Void# -> r) -> (Void# -> r) -> r
NotifyWorkersFailureCode_SoftFailure = NotifyWorkersFailureCode' "SoftFailure"

{-# COMPLETE
  NotifyWorkersFailureCode_HardFailure,
  NotifyWorkersFailureCode_SoftFailure,
  NotifyWorkersFailureCode'
  #-}