{-# 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.OTAUpdateStatus
-- 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.OTAUpdateStatus
  ( OTAUpdateStatus
      ( ..,
        OTAUpdateStatus_CREATE_COMPLETE,
        OTAUpdateStatus_CREATE_FAILED,
        OTAUpdateStatus_CREATE_IN_PROGRESS,
        OTAUpdateStatus_CREATE_PENDING
      ),
  )
where

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

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

pattern OTAUpdateStatus_CREATE_COMPLETE :: OTAUpdateStatus
pattern $bOTAUpdateStatus_CREATE_COMPLETE :: OTAUpdateStatus
$mOTAUpdateStatus_CREATE_COMPLETE :: forall r. OTAUpdateStatus -> (Void# -> r) -> (Void# -> r) -> r
OTAUpdateStatus_CREATE_COMPLETE = OTAUpdateStatus' "CREATE_COMPLETE"

pattern OTAUpdateStatus_CREATE_FAILED :: OTAUpdateStatus
pattern $bOTAUpdateStatus_CREATE_FAILED :: OTAUpdateStatus
$mOTAUpdateStatus_CREATE_FAILED :: forall r. OTAUpdateStatus -> (Void# -> r) -> (Void# -> r) -> r
OTAUpdateStatus_CREATE_FAILED = OTAUpdateStatus' "CREATE_FAILED"

pattern OTAUpdateStatus_CREATE_IN_PROGRESS :: OTAUpdateStatus
pattern $bOTAUpdateStatus_CREATE_IN_PROGRESS :: OTAUpdateStatus
$mOTAUpdateStatus_CREATE_IN_PROGRESS :: forall r. OTAUpdateStatus -> (Void# -> r) -> (Void# -> r) -> r
OTAUpdateStatus_CREATE_IN_PROGRESS = OTAUpdateStatus' "CREATE_IN_PROGRESS"

pattern OTAUpdateStatus_CREATE_PENDING :: OTAUpdateStatus
pattern $bOTAUpdateStatus_CREATE_PENDING :: OTAUpdateStatus
$mOTAUpdateStatus_CREATE_PENDING :: forall r. OTAUpdateStatus -> (Void# -> r) -> (Void# -> r) -> r
OTAUpdateStatus_CREATE_PENDING = OTAUpdateStatus' "CREATE_PENDING"

{-# COMPLETE
  OTAUpdateStatus_CREATE_COMPLETE,
  OTAUpdateStatus_CREATE_FAILED,
  OTAUpdateStatus_CREATE_IN_PROGRESS,
  OTAUpdateStatus_CREATE_PENDING,
  OTAUpdateStatus'
  #-}