{-# 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.OpenSearch.Types.UpgradeStatus
-- 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.OpenSearch.Types.UpgradeStatus
  ( UpgradeStatus
      ( ..,
        UpgradeStatus_FAILED,
        UpgradeStatus_IN_PROGRESS,
        UpgradeStatus_SUCCEEDED,
        UpgradeStatus_SUCCEEDED_WITH_ISSUES
      ),
  )
where

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

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

pattern UpgradeStatus_FAILED :: UpgradeStatus
pattern $bUpgradeStatus_FAILED :: UpgradeStatus
$mUpgradeStatus_FAILED :: forall r. UpgradeStatus -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStatus_FAILED = UpgradeStatus' "FAILED"

pattern UpgradeStatus_IN_PROGRESS :: UpgradeStatus
pattern $bUpgradeStatus_IN_PROGRESS :: UpgradeStatus
$mUpgradeStatus_IN_PROGRESS :: forall r. UpgradeStatus -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStatus_IN_PROGRESS = UpgradeStatus' "IN_PROGRESS"

pattern UpgradeStatus_SUCCEEDED :: UpgradeStatus
pattern $bUpgradeStatus_SUCCEEDED :: UpgradeStatus
$mUpgradeStatus_SUCCEEDED :: forall r. UpgradeStatus -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStatus_SUCCEEDED = UpgradeStatus' "SUCCEEDED"

pattern UpgradeStatus_SUCCEEDED_WITH_ISSUES :: UpgradeStatus
pattern $bUpgradeStatus_SUCCEEDED_WITH_ISSUES :: UpgradeStatus
$mUpgradeStatus_SUCCEEDED_WITH_ISSUES :: forall r. UpgradeStatus -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStatus_SUCCEEDED_WITH_ISSUES = UpgradeStatus' "SUCCEEDED_WITH_ISSUES"

{-# COMPLETE
  UpgradeStatus_FAILED,
  UpgradeStatus_IN_PROGRESS,
  UpgradeStatus_SUCCEEDED,
  UpgradeStatus_SUCCEEDED_WITH_ISSUES,
  UpgradeStatus'
  #-}