{-# 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.RollbackOnDisable
-- 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.RollbackOnDisable
  ( RollbackOnDisable
      ( ..,
        RollbackOnDisable_DEFAULT_ROLLBACK,
        RollbackOnDisable_NO_ROLLBACK
      ),
  )
where

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

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

pattern RollbackOnDisable_DEFAULT_ROLLBACK :: RollbackOnDisable
pattern $bRollbackOnDisable_DEFAULT_ROLLBACK :: RollbackOnDisable
$mRollbackOnDisable_DEFAULT_ROLLBACK :: forall r. RollbackOnDisable -> (Void# -> r) -> (Void# -> r) -> r
RollbackOnDisable_DEFAULT_ROLLBACK = RollbackOnDisable' "DEFAULT_ROLLBACK"

pattern RollbackOnDisable_NO_ROLLBACK :: RollbackOnDisable
pattern $bRollbackOnDisable_NO_ROLLBACK :: RollbackOnDisable
$mRollbackOnDisable_NO_ROLLBACK :: forall r. RollbackOnDisable -> (Void# -> r) -> (Void# -> r) -> r
RollbackOnDisable_NO_ROLLBACK = RollbackOnDisable' "NO_ROLLBACK"

{-# COMPLETE
  RollbackOnDisable_DEFAULT_ROLLBACK,
  RollbackOnDisable_NO_ROLLBACK,
  RollbackOnDisable'
  #-}