{-# 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.ElasticSearch.Types.AutoTuneState
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ElasticSearch.Types.AutoTuneState
  ( AutoTuneState
      ( ..,
        AutoTuneState_DISABLED,
        AutoTuneState_DISABLED_AND_ROLLBACK_COMPLETE,
        AutoTuneState_DISABLED_AND_ROLLBACK_ERROR,
        AutoTuneState_DISABLED_AND_ROLLBACK_IN_PROGRESS,
        AutoTuneState_DISABLED_AND_ROLLBACK_SCHEDULED,
        AutoTuneState_DISABLE_IN_PROGRESS,
        AutoTuneState_ENABLED,
        AutoTuneState_ENABLE_IN_PROGRESS,
        AutoTuneState_ERROR
      ),
  )
where

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

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

pattern AutoTuneState_DISABLED :: AutoTuneState
pattern $bAutoTuneState_DISABLED :: AutoTuneState
$mAutoTuneState_DISABLED :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_DISABLED = AutoTuneState' "DISABLED"

pattern AutoTuneState_DISABLED_AND_ROLLBACK_COMPLETE :: AutoTuneState
pattern $bAutoTuneState_DISABLED_AND_ROLLBACK_COMPLETE :: AutoTuneState
$mAutoTuneState_DISABLED_AND_ROLLBACK_COMPLETE :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_DISABLED_AND_ROLLBACK_COMPLETE = AutoTuneState' "DISABLED_AND_ROLLBACK_COMPLETE"

pattern AutoTuneState_DISABLED_AND_ROLLBACK_ERROR :: AutoTuneState
pattern $bAutoTuneState_DISABLED_AND_ROLLBACK_ERROR :: AutoTuneState
$mAutoTuneState_DISABLED_AND_ROLLBACK_ERROR :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_DISABLED_AND_ROLLBACK_ERROR = AutoTuneState' "DISABLED_AND_ROLLBACK_ERROR"

pattern AutoTuneState_DISABLED_AND_ROLLBACK_IN_PROGRESS :: AutoTuneState
pattern $bAutoTuneState_DISABLED_AND_ROLLBACK_IN_PROGRESS :: AutoTuneState
$mAutoTuneState_DISABLED_AND_ROLLBACK_IN_PROGRESS :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_DISABLED_AND_ROLLBACK_IN_PROGRESS = AutoTuneState' "DISABLED_AND_ROLLBACK_IN_PROGRESS"

pattern AutoTuneState_DISABLED_AND_ROLLBACK_SCHEDULED :: AutoTuneState
pattern $bAutoTuneState_DISABLED_AND_ROLLBACK_SCHEDULED :: AutoTuneState
$mAutoTuneState_DISABLED_AND_ROLLBACK_SCHEDULED :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_DISABLED_AND_ROLLBACK_SCHEDULED = AutoTuneState' "DISABLED_AND_ROLLBACK_SCHEDULED"

pattern AutoTuneState_DISABLE_IN_PROGRESS :: AutoTuneState
pattern $bAutoTuneState_DISABLE_IN_PROGRESS :: AutoTuneState
$mAutoTuneState_DISABLE_IN_PROGRESS :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_DISABLE_IN_PROGRESS = AutoTuneState' "DISABLE_IN_PROGRESS"

pattern AutoTuneState_ENABLED :: AutoTuneState
pattern $bAutoTuneState_ENABLED :: AutoTuneState
$mAutoTuneState_ENABLED :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_ENABLED = AutoTuneState' "ENABLED"

pattern AutoTuneState_ENABLE_IN_PROGRESS :: AutoTuneState
pattern $bAutoTuneState_ENABLE_IN_PROGRESS :: AutoTuneState
$mAutoTuneState_ENABLE_IN_PROGRESS :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_ENABLE_IN_PROGRESS = AutoTuneState' "ENABLE_IN_PROGRESS"

pattern AutoTuneState_ERROR :: AutoTuneState
pattern $bAutoTuneState_ERROR :: AutoTuneState
$mAutoTuneState_ERROR :: forall {r}. AutoTuneState -> ((# #) -> r) -> ((# #) -> r) -> r
AutoTuneState_ERROR = AutoTuneState' "ERROR"

{-# COMPLETE
  AutoTuneState_DISABLED,
  AutoTuneState_DISABLED_AND_ROLLBACK_COMPLETE,
  AutoTuneState_DISABLED_AND_ROLLBACK_ERROR,
  AutoTuneState_DISABLED_AND_ROLLBACK_IN_PROGRESS,
  AutoTuneState_DISABLED_AND_ROLLBACK_SCHEDULED,
  AutoTuneState_DISABLE_IN_PROGRESS,
  AutoTuneState_ENABLED,
  AutoTuneState_ENABLE_IN_PROGRESS,
  AutoTuneState_ERROR,
  AutoTuneState'
  #-}