{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ElasticSearch.Types.AutoTuneOptionsOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticSearch.Types.AutoTuneState
import qualified Amazonka.Prelude as Prelude
data AutoTuneOptionsOutput = AutoTuneOptionsOutput'
{
AutoTuneOptionsOutput -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
AutoTuneOptionsOutput -> Maybe AutoTuneState
state :: Prelude.Maybe AutoTuneState
}
deriving (AutoTuneOptionsOutput -> AutoTuneOptionsOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoTuneOptionsOutput -> AutoTuneOptionsOutput -> Bool
$c/= :: AutoTuneOptionsOutput -> AutoTuneOptionsOutput -> Bool
== :: AutoTuneOptionsOutput -> AutoTuneOptionsOutput -> Bool
$c== :: AutoTuneOptionsOutput -> AutoTuneOptionsOutput -> Bool
Prelude.Eq, ReadPrec [AutoTuneOptionsOutput]
ReadPrec AutoTuneOptionsOutput
Int -> ReadS AutoTuneOptionsOutput
ReadS [AutoTuneOptionsOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoTuneOptionsOutput]
$creadListPrec :: ReadPrec [AutoTuneOptionsOutput]
readPrec :: ReadPrec AutoTuneOptionsOutput
$creadPrec :: ReadPrec AutoTuneOptionsOutput
readList :: ReadS [AutoTuneOptionsOutput]
$creadList :: ReadS [AutoTuneOptionsOutput]
readsPrec :: Int -> ReadS AutoTuneOptionsOutput
$creadsPrec :: Int -> ReadS AutoTuneOptionsOutput
Prelude.Read, Int -> AutoTuneOptionsOutput -> ShowS
[AutoTuneOptionsOutput] -> ShowS
AutoTuneOptionsOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoTuneOptionsOutput] -> ShowS
$cshowList :: [AutoTuneOptionsOutput] -> ShowS
show :: AutoTuneOptionsOutput -> String
$cshow :: AutoTuneOptionsOutput -> String
showsPrec :: Int -> AutoTuneOptionsOutput -> ShowS
$cshowsPrec :: Int -> AutoTuneOptionsOutput -> ShowS
Prelude.Show, forall x. Rep AutoTuneOptionsOutput x -> AutoTuneOptionsOutput
forall x. AutoTuneOptionsOutput -> Rep AutoTuneOptionsOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoTuneOptionsOutput x -> AutoTuneOptionsOutput
$cfrom :: forall x. AutoTuneOptionsOutput -> Rep AutoTuneOptionsOutput x
Prelude.Generic)
newAutoTuneOptionsOutput ::
AutoTuneOptionsOutput
newAutoTuneOptionsOutput :: AutoTuneOptionsOutput
newAutoTuneOptionsOutput =
AutoTuneOptionsOutput'
{ $sel:errorMessage:AutoTuneOptionsOutput' :: Maybe Text
errorMessage =
forall a. Maybe a
Prelude.Nothing,
$sel:state:AutoTuneOptionsOutput' :: Maybe AutoTuneState
state = forall a. Maybe a
Prelude.Nothing
}
autoTuneOptionsOutput_errorMessage :: Lens.Lens' AutoTuneOptionsOutput (Prelude.Maybe Prelude.Text)
autoTuneOptionsOutput_errorMessage :: Lens' AutoTuneOptionsOutput (Maybe Text)
autoTuneOptionsOutput_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoTuneOptionsOutput' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:AutoTuneOptionsOutput' :: AutoTuneOptionsOutput -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: AutoTuneOptionsOutput
s@AutoTuneOptionsOutput' {} Maybe Text
a -> AutoTuneOptionsOutput
s {$sel:errorMessage:AutoTuneOptionsOutput' :: Maybe Text
errorMessage = Maybe Text
a} :: AutoTuneOptionsOutput)
autoTuneOptionsOutput_state :: Lens.Lens' AutoTuneOptionsOutput (Prelude.Maybe AutoTuneState)
autoTuneOptionsOutput_state :: Lens' AutoTuneOptionsOutput (Maybe AutoTuneState)
autoTuneOptionsOutput_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoTuneOptionsOutput' {Maybe AutoTuneState
state :: Maybe AutoTuneState
$sel:state:AutoTuneOptionsOutput' :: AutoTuneOptionsOutput -> Maybe AutoTuneState
state} -> Maybe AutoTuneState
state) (\s :: AutoTuneOptionsOutput
s@AutoTuneOptionsOutput' {} Maybe AutoTuneState
a -> AutoTuneOptionsOutput
s {$sel:state:AutoTuneOptionsOutput' :: Maybe AutoTuneState
state = Maybe AutoTuneState
a} :: AutoTuneOptionsOutput)
instance Data.FromJSON AutoTuneOptionsOutput where
parseJSON :: Value -> Parser AutoTuneOptionsOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AutoTuneOptionsOutput"
( \Object
x ->
Maybe Text -> Maybe AutoTuneState -> AutoTuneOptionsOutput
AutoTuneOptionsOutput'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
)
instance Prelude.Hashable AutoTuneOptionsOutput where
hashWithSalt :: Int -> AutoTuneOptionsOutput -> Int
hashWithSalt Int
_salt AutoTuneOptionsOutput' {Maybe Text
Maybe AutoTuneState
state :: Maybe AutoTuneState
errorMessage :: Maybe Text
$sel:state:AutoTuneOptionsOutput' :: AutoTuneOptionsOutput -> Maybe AutoTuneState
$sel:errorMessage:AutoTuneOptionsOutput' :: AutoTuneOptionsOutput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoTuneState
state
instance Prelude.NFData AutoTuneOptionsOutput where
rnf :: AutoTuneOptionsOutput -> ()
rnf AutoTuneOptionsOutput' {Maybe Text
Maybe AutoTuneState
state :: Maybe AutoTuneState
errorMessage :: Maybe Text
$sel:state:AutoTuneOptionsOutput' :: AutoTuneOptionsOutput -> Maybe AutoTuneState
$sel:errorMessage:AutoTuneOptionsOutput' :: AutoTuneOptionsOutput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoTuneState
state