{-# 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.IoTThingsGraph.Types.UploadStatus
-- 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.IoTThingsGraph.Types.UploadStatus
  ( UploadStatus
      ( ..,
        UploadStatus_FAILED,
        UploadStatus_IN_PROGRESS,
        UploadStatus_SUCCEEDED
      ),
  )
where

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

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

pattern UploadStatus_FAILED :: UploadStatus
pattern $bUploadStatus_FAILED :: UploadStatus
$mUploadStatus_FAILED :: forall r. UploadStatus -> (Void# -> r) -> (Void# -> r) -> r
UploadStatus_FAILED = UploadStatus' "FAILED"

pattern UploadStatus_IN_PROGRESS :: UploadStatus
pattern $bUploadStatus_IN_PROGRESS :: UploadStatus
$mUploadStatus_IN_PROGRESS :: forall r. UploadStatus -> (Void# -> r) -> (Void# -> r) -> r
UploadStatus_IN_PROGRESS = UploadStatus' "IN_PROGRESS"

pattern UploadStatus_SUCCEEDED :: UploadStatus
pattern $bUploadStatus_SUCCEEDED :: UploadStatus
$mUploadStatus_SUCCEEDED :: forall r. UploadStatus -> (Void# -> r) -> (Void# -> r) -> r
UploadStatus_SUCCEEDED = UploadStatus' "SUCCEEDED"

{-# COMPLETE
  UploadStatus_FAILED,
  UploadStatus_IN_PROGRESS,
  UploadStatus_SUCCEEDED,
  UploadStatus'
  #-}