{-# 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.AutoTuneOptionsStatus where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.AutoTuneOptions
import Amazonka.ElasticSearch.Types.AutoTuneStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoTuneOptionsStatus = AutoTuneOptionsStatus'
{
AutoTuneOptionsStatus -> Maybe AutoTuneStatus
status :: Prelude.Maybe AutoTuneStatus,
AutoTuneOptionsStatus -> Maybe AutoTuneOptions
options :: Prelude.Maybe AutoTuneOptions
}
deriving (AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool
(AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool)
-> (AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool)
-> Eq AutoTuneOptionsStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool
$c/= :: AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool
== :: AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool
$c== :: AutoTuneOptionsStatus -> AutoTuneOptionsStatus -> Bool
Prelude.Eq, ReadPrec [AutoTuneOptionsStatus]
ReadPrec AutoTuneOptionsStatus
Int -> ReadS AutoTuneOptionsStatus
ReadS [AutoTuneOptionsStatus]
(Int -> ReadS AutoTuneOptionsStatus)
-> ReadS [AutoTuneOptionsStatus]
-> ReadPrec AutoTuneOptionsStatus
-> ReadPrec [AutoTuneOptionsStatus]
-> Read AutoTuneOptionsStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoTuneOptionsStatus]
$creadListPrec :: ReadPrec [AutoTuneOptionsStatus]
readPrec :: ReadPrec AutoTuneOptionsStatus
$creadPrec :: ReadPrec AutoTuneOptionsStatus
readList :: ReadS [AutoTuneOptionsStatus]
$creadList :: ReadS [AutoTuneOptionsStatus]
readsPrec :: Int -> ReadS AutoTuneOptionsStatus
$creadsPrec :: Int -> ReadS AutoTuneOptionsStatus
Prelude.Read, Int -> AutoTuneOptionsStatus -> ShowS
[AutoTuneOptionsStatus] -> ShowS
AutoTuneOptionsStatus -> String
(Int -> AutoTuneOptionsStatus -> ShowS)
-> (AutoTuneOptionsStatus -> String)
-> ([AutoTuneOptionsStatus] -> ShowS)
-> Show AutoTuneOptionsStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoTuneOptionsStatus] -> ShowS
$cshowList :: [AutoTuneOptionsStatus] -> ShowS
show :: AutoTuneOptionsStatus -> String
$cshow :: AutoTuneOptionsStatus -> String
showsPrec :: Int -> AutoTuneOptionsStatus -> ShowS
$cshowsPrec :: Int -> AutoTuneOptionsStatus -> ShowS
Prelude.Show, (forall x. AutoTuneOptionsStatus -> Rep AutoTuneOptionsStatus x)
-> (forall x. Rep AutoTuneOptionsStatus x -> AutoTuneOptionsStatus)
-> Generic AutoTuneOptionsStatus
forall x. Rep AutoTuneOptionsStatus x -> AutoTuneOptionsStatus
forall x. AutoTuneOptionsStatus -> Rep AutoTuneOptionsStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoTuneOptionsStatus x -> AutoTuneOptionsStatus
$cfrom :: forall x. AutoTuneOptionsStatus -> Rep AutoTuneOptionsStatus x
Prelude.Generic)
newAutoTuneOptionsStatus ::
AutoTuneOptionsStatus
newAutoTuneOptionsStatus :: AutoTuneOptionsStatus
newAutoTuneOptionsStatus =
AutoTuneOptionsStatus' :: Maybe AutoTuneStatus
-> Maybe AutoTuneOptions -> AutoTuneOptionsStatus
AutoTuneOptionsStatus'
{ $sel:status:AutoTuneOptionsStatus' :: Maybe AutoTuneStatus
status = Maybe AutoTuneStatus
forall a. Maybe a
Prelude.Nothing,
$sel:options:AutoTuneOptionsStatus' :: Maybe AutoTuneOptions
options = Maybe AutoTuneOptions
forall a. Maybe a
Prelude.Nothing
}
autoTuneOptionsStatus_status :: Lens.Lens' AutoTuneOptionsStatus (Prelude.Maybe AutoTuneStatus)
autoTuneOptionsStatus_status :: (Maybe AutoTuneStatus -> f (Maybe AutoTuneStatus))
-> AutoTuneOptionsStatus -> f AutoTuneOptionsStatus
autoTuneOptionsStatus_status = (AutoTuneOptionsStatus -> Maybe AutoTuneStatus)
-> (AutoTuneOptionsStatus
-> Maybe AutoTuneStatus -> AutoTuneOptionsStatus)
-> Lens
AutoTuneOptionsStatus
AutoTuneOptionsStatus
(Maybe AutoTuneStatus)
(Maybe AutoTuneStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoTuneOptionsStatus' {Maybe AutoTuneStatus
status :: Maybe AutoTuneStatus
$sel:status:AutoTuneOptionsStatus' :: AutoTuneOptionsStatus -> Maybe AutoTuneStatus
status} -> Maybe AutoTuneStatus
status) (\s :: AutoTuneOptionsStatus
s@AutoTuneOptionsStatus' {} Maybe AutoTuneStatus
a -> AutoTuneOptionsStatus
s {$sel:status:AutoTuneOptionsStatus' :: Maybe AutoTuneStatus
status = Maybe AutoTuneStatus
a} :: AutoTuneOptionsStatus)
autoTuneOptionsStatus_options :: Lens.Lens' AutoTuneOptionsStatus (Prelude.Maybe AutoTuneOptions)
autoTuneOptionsStatus_options :: (Maybe AutoTuneOptions -> f (Maybe AutoTuneOptions))
-> AutoTuneOptionsStatus -> f AutoTuneOptionsStatus
autoTuneOptionsStatus_options = (AutoTuneOptionsStatus -> Maybe AutoTuneOptions)
-> (AutoTuneOptionsStatus
-> Maybe AutoTuneOptions -> AutoTuneOptionsStatus)
-> Lens
AutoTuneOptionsStatus
AutoTuneOptionsStatus
(Maybe AutoTuneOptions)
(Maybe AutoTuneOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoTuneOptionsStatus' {Maybe AutoTuneOptions
options :: Maybe AutoTuneOptions
$sel:options:AutoTuneOptionsStatus' :: AutoTuneOptionsStatus -> Maybe AutoTuneOptions
options} -> Maybe AutoTuneOptions
options) (\s :: AutoTuneOptionsStatus
s@AutoTuneOptionsStatus' {} Maybe AutoTuneOptions
a -> AutoTuneOptionsStatus
s {$sel:options:AutoTuneOptionsStatus' :: Maybe AutoTuneOptions
options = Maybe AutoTuneOptions
a} :: AutoTuneOptionsStatus)
instance Core.FromJSON AutoTuneOptionsStatus where
parseJSON :: Value -> Parser AutoTuneOptionsStatus
parseJSON =
String
-> (Object -> Parser AutoTuneOptionsStatus)
-> Value
-> Parser AutoTuneOptionsStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutoTuneOptionsStatus"
( \Object
x ->
Maybe AutoTuneStatus
-> Maybe AutoTuneOptions -> AutoTuneOptionsStatus
AutoTuneOptionsStatus'
(Maybe AutoTuneStatus
-> Maybe AutoTuneOptions -> AutoTuneOptionsStatus)
-> Parser (Maybe AutoTuneStatus)
-> Parser (Maybe AutoTuneOptions -> AutoTuneOptionsStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AutoTuneStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser (Maybe AutoTuneOptions -> AutoTuneOptionsStatus)
-> Parser (Maybe AutoTuneOptions) -> Parser AutoTuneOptionsStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutoTuneOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Options")
)
instance Prelude.Hashable AutoTuneOptionsStatus
instance Prelude.NFData AutoTuneOptionsStatus