{-# 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.IoT.Types.JobExecutionFailureType
-- 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.IoT.Types.JobExecutionFailureType
  ( JobExecutionFailureType
      ( ..,
        JobExecutionFailureType_ALL,
        JobExecutionFailureType_FAILED,
        JobExecutionFailureType_REJECTED,
        JobExecutionFailureType_TIMED_OUT
      ),
  )
where

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

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

pattern JobExecutionFailureType_ALL :: JobExecutionFailureType
pattern $bJobExecutionFailureType_ALL :: JobExecutionFailureType
$mJobExecutionFailureType_ALL :: forall r.
JobExecutionFailureType -> (Void# -> r) -> (Void# -> r) -> r
JobExecutionFailureType_ALL = JobExecutionFailureType' "ALL"

pattern JobExecutionFailureType_FAILED :: JobExecutionFailureType
pattern $bJobExecutionFailureType_FAILED :: JobExecutionFailureType
$mJobExecutionFailureType_FAILED :: forall r.
JobExecutionFailureType -> (Void# -> r) -> (Void# -> r) -> r
JobExecutionFailureType_FAILED = JobExecutionFailureType' "FAILED"

pattern JobExecutionFailureType_REJECTED :: JobExecutionFailureType
pattern $bJobExecutionFailureType_REJECTED :: JobExecutionFailureType
$mJobExecutionFailureType_REJECTED :: forall r.
JobExecutionFailureType -> (Void# -> r) -> (Void# -> r) -> r
JobExecutionFailureType_REJECTED = JobExecutionFailureType' "REJECTED"

pattern JobExecutionFailureType_TIMED_OUT :: JobExecutionFailureType
pattern $bJobExecutionFailureType_TIMED_OUT :: JobExecutionFailureType
$mJobExecutionFailureType_TIMED_OUT :: forall r.
JobExecutionFailureType -> (Void# -> r) -> (Void# -> r) -> r
JobExecutionFailureType_TIMED_OUT = JobExecutionFailureType' "TIMED_OUT"

{-# COMPLETE
  JobExecutionFailureType_ALL,
  JobExecutionFailureType_FAILED,
  JobExecutionFailureType_REJECTED,
  JobExecutionFailureType_TIMED_OUT,
  JobExecutionFailureType'
  #-}