{-# 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.UpgradeStep
-- 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.UpgradeStep
  ( UpgradeStep
      ( ..,
        UpgradeStep_PRE_UPGRADE_CHECK,
        UpgradeStep_SNAPSHOT,
        UpgradeStep_UPGRADE
      ),
  )
where

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

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

pattern UpgradeStep_PRE_UPGRADE_CHECK :: UpgradeStep
pattern $bUpgradeStep_PRE_UPGRADE_CHECK :: UpgradeStep
$mUpgradeStep_PRE_UPGRADE_CHECK :: forall r. UpgradeStep -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStep_PRE_UPGRADE_CHECK = UpgradeStep' "PRE_UPGRADE_CHECK"

pattern UpgradeStep_SNAPSHOT :: UpgradeStep
pattern $bUpgradeStep_SNAPSHOT :: UpgradeStep
$mUpgradeStep_SNAPSHOT :: forall r. UpgradeStep -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStep_SNAPSHOT = UpgradeStep' "SNAPSHOT"

pattern UpgradeStep_UPGRADE :: UpgradeStep
pattern $bUpgradeStep_UPGRADE :: UpgradeStep
$mUpgradeStep_UPGRADE :: forall r. UpgradeStep -> (Void# -> r) -> (Void# -> r) -> r
UpgradeStep_UPGRADE = UpgradeStep' "UPGRADE"

{-# COMPLETE
  UpgradeStep_PRE_UPGRADE_CHECK,
  UpgradeStep_SNAPSHOT,
  UpgradeStep_UPGRADE,
  UpgradeStep'
  #-}