{-# 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-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.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.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 ::
      Core.Text
  }
  deriving stock
    ( Int -> AutoTuneState -> ShowS
[AutoTuneState] -> ShowS
AutoTuneState -> String
(Int -> AutoTuneState -> ShowS)
-> (AutoTuneState -> String)
-> ([AutoTuneState] -> ShowS)
-> Show AutoTuneState
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]
(Int -> ReadS AutoTuneState)
-> ReadS [AutoTuneState]
-> ReadPrec AutoTuneState
-> ReadPrec [AutoTuneState]
-> Read 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
(AutoTuneState -> AutoTuneState -> Bool)
-> (AutoTuneState -> AutoTuneState -> Bool) -> Eq AutoTuneState
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
Eq AutoTuneState
-> (AutoTuneState -> AutoTuneState -> Ordering)
-> (AutoTuneState -> AutoTuneState -> Bool)
-> (AutoTuneState -> AutoTuneState -> Bool)
-> (AutoTuneState -> AutoTuneState -> Bool)
-> (AutoTuneState -> AutoTuneState -> Bool)
-> (AutoTuneState -> AutoTuneState -> AutoTuneState)
-> (AutoTuneState -> AutoTuneState -> AutoTuneState)
-> Ord 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
$cp1Ord :: Eq AutoTuneState
Prelude.Ord,
      (forall x. AutoTuneState -> Rep AutoTuneState x)
-> (forall x. Rep AutoTuneState x -> AutoTuneState)
-> Generic AutoTuneState
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
    ( Int -> AutoTuneState -> Int
AutoTuneState -> Int
(Int -> AutoTuneState -> Int)
-> (AutoTuneState -> Int) -> Hashable AutoTuneState
forall 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 -> ()
(AutoTuneState -> ()) -> NFData AutoTuneState
forall a. (a -> ()) -> NFData a
rnf :: AutoTuneState -> ()
$crnf :: AutoTuneState -> ()
Prelude.NFData,
      Text -> Either String AutoTuneState
(Text -> Either String AutoTuneState) -> FromText AutoTuneState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AutoTuneState
$cfromText :: Text -> Either String AutoTuneState
Core.FromText,
      AutoTuneState -> Text
(AutoTuneState -> Text) -> ToText AutoTuneState
forall a. (a -> Text) -> ToText a
toText :: AutoTuneState -> Text
$ctoText :: AutoTuneState -> Text
Core.ToText,
      AutoTuneState -> ByteString
(AutoTuneState -> ByteString) -> ToByteString AutoTuneState
forall a. (a -> ByteString) -> ToByteString a
toBS :: AutoTuneState -> ByteString
$ctoBS :: AutoTuneState -> ByteString
Core.ToByteString,
      AutoTuneState -> ByteStringBuilder
(AutoTuneState -> ByteStringBuilder) -> ToLog AutoTuneState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AutoTuneState -> ByteStringBuilder
$cbuild :: AutoTuneState -> ByteStringBuilder
Core.ToLog,
      HeaderName -> AutoTuneState -> [Header]
(HeaderName -> AutoTuneState -> [Header]) -> ToHeader AutoTuneState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AutoTuneState -> [Header]
$ctoHeader :: HeaderName -> AutoTuneState -> [Header]
Core.ToHeader,
      AutoTuneState -> QueryString
(AutoTuneState -> QueryString) -> ToQuery AutoTuneState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AutoTuneState -> QueryString
$ctoQuery :: AutoTuneState -> QueryString
Core.ToQuery,
      Value -> Parser [AutoTuneState]
Value -> Parser AutoTuneState
(Value -> Parser AutoTuneState)
-> (Value -> Parser [AutoTuneState]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [AutoTuneState]
FromJSONKeyFunction AutoTuneState
FromJSONKeyFunction AutoTuneState
-> FromJSONKeyFunction [AutoTuneState] -> FromJSONKey AutoTuneState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AutoTuneState]
$cfromJSONKeyList :: FromJSONKeyFunction [AutoTuneState]
fromJSONKey :: FromJSONKeyFunction AutoTuneState
$cfromJSONKey :: FromJSONKeyFunction AutoTuneState
Core.FromJSONKey,
      [AutoTuneState] -> Encoding
[AutoTuneState] -> Value
AutoTuneState -> Encoding
AutoTuneState -> Value
(AutoTuneState -> Value)
-> (AutoTuneState -> Encoding)
-> ([AutoTuneState] -> Value)
-> ([AutoTuneState] -> Encoding)
-> ToJSON AutoTuneState
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
Core.ToJSON,
      ToJSONKeyFunction [AutoTuneState]
ToJSONKeyFunction AutoTuneState
ToJSONKeyFunction AutoTuneState
-> ToJSONKeyFunction [AutoTuneState] -> ToJSONKey AutoTuneState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AutoTuneState]
$ctoJSONKeyList :: ToJSONKeyFunction [AutoTuneState]
toJSONKey :: ToJSONKeyFunction AutoTuneState
$ctoJSONKey :: ToJSONKeyFunction AutoTuneState
Core.ToJSONKey,
      [Node] -> Either String AutoTuneState
([Node] -> Either String AutoTuneState) -> FromXML AutoTuneState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AutoTuneState
$cparseXML :: [Node] -> Either String AutoTuneState
Core.FromXML,
      AutoTuneState -> XML
(AutoTuneState -> XML) -> ToXML AutoTuneState
forall a. (a -> XML) -> ToXML a
toXML :: AutoTuneState -> XML
$ctoXML :: AutoTuneState -> XML
Core.ToXML
    )

pattern AutoTuneState_DISABLED :: AutoTuneState
pattern $bAutoTuneState_DISABLED :: AutoTuneState
$mAutoTuneState_DISABLED :: forall r. AutoTuneState -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
AutoTuneState_DISABLE_IN_PROGRESS = AutoTuneState' "DISABLE_IN_PROGRESS"

pattern AutoTuneState_ENABLED :: AutoTuneState
pattern $bAutoTuneState_ENABLED :: AutoTuneState
$mAutoTuneState_ENABLED :: forall r. AutoTuneState -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
AutoTuneState_ENABLE_IN_PROGRESS = AutoTuneState' "ENABLE_IN_PROGRESS"

pattern AutoTuneState_ERROR :: AutoTuneState
pattern $bAutoTuneState_ERROR :: AutoTuneState
$mAutoTuneState_ERROR :: forall r. AutoTuneState -> (Void# -> r) -> (Void# -> 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'
  #-}