{-# 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.TaskStatus
-- 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.TaskStatus
  ( TaskStatus
      ( ..,
        TaskStatus_Cancelled,
        TaskStatus_Cancelling,
        TaskStatus_Completed,
        TaskStatus_Failed,
        TaskStatus_InProgress
      ),
  )
where

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

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

pattern TaskStatus_Cancelled :: TaskStatus
pattern $bTaskStatus_Cancelled :: TaskStatus
$mTaskStatus_Cancelled :: forall r. TaskStatus -> (Void# -> r) -> (Void# -> r) -> r
TaskStatus_Cancelled = TaskStatus' "Cancelled"

pattern TaskStatus_Cancelling :: TaskStatus
pattern $bTaskStatus_Cancelling :: TaskStatus
$mTaskStatus_Cancelling :: forall r. TaskStatus -> (Void# -> r) -> (Void# -> r) -> r
TaskStatus_Cancelling = TaskStatus' "Cancelling"

pattern TaskStatus_Completed :: TaskStatus
pattern $bTaskStatus_Completed :: TaskStatus
$mTaskStatus_Completed :: forall r. TaskStatus -> (Void# -> r) -> (Void# -> r) -> r
TaskStatus_Completed = TaskStatus' "Completed"

pattern TaskStatus_Failed :: TaskStatus
pattern $bTaskStatus_Failed :: TaskStatus
$mTaskStatus_Failed :: forall r. TaskStatus -> (Void# -> r) -> (Void# -> r) -> r
TaskStatus_Failed = TaskStatus' "Failed"

pattern TaskStatus_InProgress :: TaskStatus
pattern $bTaskStatus_InProgress :: TaskStatus
$mTaskStatus_InProgress :: forall r. TaskStatus -> (Void# -> r) -> (Void# -> r) -> r
TaskStatus_InProgress = TaskStatus' "InProgress"

{-# COMPLETE
  TaskStatus_Cancelled,
  TaskStatus_Cancelling,
  TaskStatus_Completed,
  TaskStatus_Failed,
  TaskStatus_InProgress,
  TaskStatus'
  #-}