{-# 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.AutoTuneDesiredState
-- 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.AutoTuneDesiredState
  ( AutoTuneDesiredState
      ( ..,
        AutoTuneDesiredState_DISABLED,
        AutoTuneDesiredState_ENABLED
      ),
  )
where

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

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

pattern AutoTuneDesiredState_DISABLED :: AutoTuneDesiredState
pattern $bAutoTuneDesiredState_DISABLED :: AutoTuneDesiredState
$mAutoTuneDesiredState_DISABLED :: forall r. AutoTuneDesiredState -> (Void# -> r) -> (Void# -> r) -> r
AutoTuneDesiredState_DISABLED = AutoTuneDesiredState' "DISABLED"

pattern AutoTuneDesiredState_ENABLED :: AutoTuneDesiredState
pattern $bAutoTuneDesiredState_ENABLED :: AutoTuneDesiredState
$mAutoTuneDesiredState_ENABLED :: forall r. AutoTuneDesiredState -> (Void# -> r) -> (Void# -> r) -> r
AutoTuneDesiredState_ENABLED = AutoTuneDesiredState' "ENABLED"

{-# COMPLETE
  AutoTuneDesiredState_DISABLED,
  AutoTuneDesiredState_ENABLED,
  AutoTuneDesiredState'
  #-}