{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ElasticSearch.Types.AutoTuneDetails
-- 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.AutoTuneDetails where

import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.ScheduledAutoTuneDetails
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies details of the Auto-Tune action. See the
-- <https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/auto-tune.html Developer Guide>
-- for more information.
--
-- /See:/ 'newAutoTuneDetails' smart constructor.
data AutoTuneDetails = AutoTuneDetails'
  { AutoTuneDetails -> Maybe ScheduledAutoTuneDetails
scheduledAutoTuneDetails :: Prelude.Maybe ScheduledAutoTuneDetails
  }
  deriving (AutoTuneDetails -> AutoTuneDetails -> Bool
(AutoTuneDetails -> AutoTuneDetails -> Bool)
-> (AutoTuneDetails -> AutoTuneDetails -> Bool)
-> Eq AutoTuneDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoTuneDetails -> AutoTuneDetails -> Bool
$c/= :: AutoTuneDetails -> AutoTuneDetails -> Bool
== :: AutoTuneDetails -> AutoTuneDetails -> Bool
$c== :: AutoTuneDetails -> AutoTuneDetails -> Bool
Prelude.Eq, ReadPrec [AutoTuneDetails]
ReadPrec AutoTuneDetails
Int -> ReadS AutoTuneDetails
ReadS [AutoTuneDetails]
(Int -> ReadS AutoTuneDetails)
-> ReadS [AutoTuneDetails]
-> ReadPrec AutoTuneDetails
-> ReadPrec [AutoTuneDetails]
-> Read AutoTuneDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoTuneDetails]
$creadListPrec :: ReadPrec [AutoTuneDetails]
readPrec :: ReadPrec AutoTuneDetails
$creadPrec :: ReadPrec AutoTuneDetails
readList :: ReadS [AutoTuneDetails]
$creadList :: ReadS [AutoTuneDetails]
readsPrec :: Int -> ReadS AutoTuneDetails
$creadsPrec :: Int -> ReadS AutoTuneDetails
Prelude.Read, Int -> AutoTuneDetails -> ShowS
[AutoTuneDetails] -> ShowS
AutoTuneDetails -> String
(Int -> AutoTuneDetails -> ShowS)
-> (AutoTuneDetails -> String)
-> ([AutoTuneDetails] -> ShowS)
-> Show AutoTuneDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoTuneDetails] -> ShowS
$cshowList :: [AutoTuneDetails] -> ShowS
show :: AutoTuneDetails -> String
$cshow :: AutoTuneDetails -> String
showsPrec :: Int -> AutoTuneDetails -> ShowS
$cshowsPrec :: Int -> AutoTuneDetails -> ShowS
Prelude.Show, (forall x. AutoTuneDetails -> Rep AutoTuneDetails x)
-> (forall x. Rep AutoTuneDetails x -> AutoTuneDetails)
-> Generic AutoTuneDetails
forall x. Rep AutoTuneDetails x -> AutoTuneDetails
forall x. AutoTuneDetails -> Rep AutoTuneDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoTuneDetails x -> AutoTuneDetails
$cfrom :: forall x. AutoTuneDetails -> Rep AutoTuneDetails x
Prelude.Generic)

-- |
-- Create a value of 'AutoTuneDetails' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'scheduledAutoTuneDetails', 'autoTuneDetails_scheduledAutoTuneDetails' - Undocumented member.
newAutoTuneDetails ::
  AutoTuneDetails
newAutoTuneDetails :: AutoTuneDetails
newAutoTuneDetails =
  AutoTuneDetails' :: Maybe ScheduledAutoTuneDetails -> AutoTuneDetails
AutoTuneDetails'
    { $sel:scheduledAutoTuneDetails:AutoTuneDetails' :: Maybe ScheduledAutoTuneDetails
scheduledAutoTuneDetails =
        Maybe ScheduledAutoTuneDetails
forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
autoTuneDetails_scheduledAutoTuneDetails :: Lens.Lens' AutoTuneDetails (Prelude.Maybe ScheduledAutoTuneDetails)
autoTuneDetails_scheduledAutoTuneDetails :: (Maybe ScheduledAutoTuneDetails
 -> f (Maybe ScheduledAutoTuneDetails))
-> AutoTuneDetails -> f AutoTuneDetails
autoTuneDetails_scheduledAutoTuneDetails = (AutoTuneDetails -> Maybe ScheduledAutoTuneDetails)
-> (AutoTuneDetails
    -> Maybe ScheduledAutoTuneDetails -> AutoTuneDetails)
-> Lens
     AutoTuneDetails
     AutoTuneDetails
     (Maybe ScheduledAutoTuneDetails)
     (Maybe ScheduledAutoTuneDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoTuneDetails' {Maybe ScheduledAutoTuneDetails
scheduledAutoTuneDetails :: Maybe ScheduledAutoTuneDetails
$sel:scheduledAutoTuneDetails:AutoTuneDetails' :: AutoTuneDetails -> Maybe ScheduledAutoTuneDetails
scheduledAutoTuneDetails} -> Maybe ScheduledAutoTuneDetails
scheduledAutoTuneDetails) (\s :: AutoTuneDetails
s@AutoTuneDetails' {} Maybe ScheduledAutoTuneDetails
a -> AutoTuneDetails
s {$sel:scheduledAutoTuneDetails:AutoTuneDetails' :: Maybe ScheduledAutoTuneDetails
scheduledAutoTuneDetails = Maybe ScheduledAutoTuneDetails
a} :: AutoTuneDetails)

instance Core.FromJSON AutoTuneDetails where
  parseJSON :: Value -> Parser AutoTuneDetails
parseJSON =
    String
-> (Object -> Parser AutoTuneDetails)
-> Value
-> Parser AutoTuneDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AutoTuneDetails"
      ( \Object
x ->
          Maybe ScheduledAutoTuneDetails -> AutoTuneDetails
AutoTuneDetails'
            (Maybe ScheduledAutoTuneDetails -> AutoTuneDetails)
-> Parser (Maybe ScheduledAutoTuneDetails)
-> Parser AutoTuneDetails
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ScheduledAutoTuneDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScheduledAutoTuneDetails")
      )

instance Prelude.Hashable AutoTuneDetails

instance Prelude.NFData AutoTuneDetails