{-# 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.OpenSearch.Types.ScheduledAutoTuneDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpenSearch.Types.ScheduledAutoTuneActionType
import Amazonka.OpenSearch.Types.ScheduledAutoTuneSeverityType
import qualified Amazonka.Prelude as Prelude
data ScheduledAutoTuneDetails = ScheduledAutoTuneDetails'
{
ScheduledAutoTuneDetails -> Maybe ScheduledAutoTuneSeverityType
severity :: Prelude.Maybe ScheduledAutoTuneSeverityType,
ScheduledAutoTuneDetails -> Maybe Text
action :: Prelude.Maybe Prelude.Text,
ScheduledAutoTuneDetails -> Maybe POSIX
date :: Prelude.Maybe Core.POSIX,
ScheduledAutoTuneDetails -> Maybe ScheduledAutoTuneActionType
actionType :: Prelude.Maybe ScheduledAutoTuneActionType
}
deriving (ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool
(ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool)
-> (ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool)
-> Eq ScheduledAutoTuneDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool
$c/= :: ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool
== :: ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool
$c== :: ScheduledAutoTuneDetails -> ScheduledAutoTuneDetails -> Bool
Prelude.Eq, ReadPrec [ScheduledAutoTuneDetails]
ReadPrec ScheduledAutoTuneDetails
Int -> ReadS ScheduledAutoTuneDetails
ReadS [ScheduledAutoTuneDetails]
(Int -> ReadS ScheduledAutoTuneDetails)
-> ReadS [ScheduledAutoTuneDetails]
-> ReadPrec ScheduledAutoTuneDetails
-> ReadPrec [ScheduledAutoTuneDetails]
-> Read ScheduledAutoTuneDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledAutoTuneDetails]
$creadListPrec :: ReadPrec [ScheduledAutoTuneDetails]
readPrec :: ReadPrec ScheduledAutoTuneDetails
$creadPrec :: ReadPrec ScheduledAutoTuneDetails
readList :: ReadS [ScheduledAutoTuneDetails]
$creadList :: ReadS [ScheduledAutoTuneDetails]
readsPrec :: Int -> ReadS ScheduledAutoTuneDetails
$creadsPrec :: Int -> ReadS ScheduledAutoTuneDetails
Prelude.Read, Int -> ScheduledAutoTuneDetails -> ShowS
[ScheduledAutoTuneDetails] -> ShowS
ScheduledAutoTuneDetails -> String
(Int -> ScheduledAutoTuneDetails -> ShowS)
-> (ScheduledAutoTuneDetails -> String)
-> ([ScheduledAutoTuneDetails] -> ShowS)
-> Show ScheduledAutoTuneDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledAutoTuneDetails] -> ShowS
$cshowList :: [ScheduledAutoTuneDetails] -> ShowS
show :: ScheduledAutoTuneDetails -> String
$cshow :: ScheduledAutoTuneDetails -> String
showsPrec :: Int -> ScheduledAutoTuneDetails -> ShowS
$cshowsPrec :: Int -> ScheduledAutoTuneDetails -> ShowS
Prelude.Show, (forall x.
ScheduledAutoTuneDetails -> Rep ScheduledAutoTuneDetails x)
-> (forall x.
Rep ScheduledAutoTuneDetails x -> ScheduledAutoTuneDetails)
-> Generic ScheduledAutoTuneDetails
forall x.
Rep ScheduledAutoTuneDetails x -> ScheduledAutoTuneDetails
forall x.
ScheduledAutoTuneDetails -> Rep ScheduledAutoTuneDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduledAutoTuneDetails x -> ScheduledAutoTuneDetails
$cfrom :: forall x.
ScheduledAutoTuneDetails -> Rep ScheduledAutoTuneDetails x
Prelude.Generic)
newScheduledAutoTuneDetails ::
ScheduledAutoTuneDetails
newScheduledAutoTuneDetails :: ScheduledAutoTuneDetails
newScheduledAutoTuneDetails =
ScheduledAutoTuneDetails' :: Maybe ScheduledAutoTuneSeverityType
-> Maybe Text
-> Maybe POSIX
-> Maybe ScheduledAutoTuneActionType
-> ScheduledAutoTuneDetails
ScheduledAutoTuneDetails'
{ $sel:severity:ScheduledAutoTuneDetails' :: Maybe ScheduledAutoTuneSeverityType
severity =
Maybe ScheduledAutoTuneSeverityType
forall a. Maybe a
Prelude.Nothing,
$sel:action:ScheduledAutoTuneDetails' :: Maybe Text
action = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:date:ScheduledAutoTuneDetails' :: Maybe POSIX
date = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:actionType:ScheduledAutoTuneDetails' :: Maybe ScheduledAutoTuneActionType
actionType = Maybe ScheduledAutoTuneActionType
forall a. Maybe a
Prelude.Nothing
}
scheduledAutoTuneDetails_severity :: Lens.Lens' ScheduledAutoTuneDetails (Prelude.Maybe ScheduledAutoTuneSeverityType)
scheduledAutoTuneDetails_severity :: (Maybe ScheduledAutoTuneSeverityType
-> f (Maybe ScheduledAutoTuneSeverityType))
-> ScheduledAutoTuneDetails -> f ScheduledAutoTuneDetails
scheduledAutoTuneDetails_severity = (ScheduledAutoTuneDetails -> Maybe ScheduledAutoTuneSeverityType)
-> (ScheduledAutoTuneDetails
-> Maybe ScheduledAutoTuneSeverityType -> ScheduledAutoTuneDetails)
-> Lens
ScheduledAutoTuneDetails
ScheduledAutoTuneDetails
(Maybe ScheduledAutoTuneSeverityType)
(Maybe ScheduledAutoTuneSeverityType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAutoTuneDetails' {Maybe ScheduledAutoTuneSeverityType
severity :: Maybe ScheduledAutoTuneSeverityType
$sel:severity:ScheduledAutoTuneDetails' :: ScheduledAutoTuneDetails -> Maybe ScheduledAutoTuneSeverityType
severity} -> Maybe ScheduledAutoTuneSeverityType
severity) (\s :: ScheduledAutoTuneDetails
s@ScheduledAutoTuneDetails' {} Maybe ScheduledAutoTuneSeverityType
a -> ScheduledAutoTuneDetails
s {$sel:severity:ScheduledAutoTuneDetails' :: Maybe ScheduledAutoTuneSeverityType
severity = Maybe ScheduledAutoTuneSeverityType
a} :: ScheduledAutoTuneDetails)
scheduledAutoTuneDetails_action :: Lens.Lens' ScheduledAutoTuneDetails (Prelude.Maybe Prelude.Text)
scheduledAutoTuneDetails_action :: (Maybe Text -> f (Maybe Text))
-> ScheduledAutoTuneDetails -> f ScheduledAutoTuneDetails
scheduledAutoTuneDetails_action = (ScheduledAutoTuneDetails -> Maybe Text)
-> (ScheduledAutoTuneDetails
-> Maybe Text -> ScheduledAutoTuneDetails)
-> Lens
ScheduledAutoTuneDetails
ScheduledAutoTuneDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAutoTuneDetails' {Maybe Text
action :: Maybe Text
$sel:action:ScheduledAutoTuneDetails' :: ScheduledAutoTuneDetails -> Maybe Text
action} -> Maybe Text
action) (\s :: ScheduledAutoTuneDetails
s@ScheduledAutoTuneDetails' {} Maybe Text
a -> ScheduledAutoTuneDetails
s {$sel:action:ScheduledAutoTuneDetails' :: Maybe Text
action = Maybe Text
a} :: ScheduledAutoTuneDetails)
scheduledAutoTuneDetails_date :: Lens.Lens' ScheduledAutoTuneDetails (Prelude.Maybe Prelude.UTCTime)
scheduledAutoTuneDetails_date :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledAutoTuneDetails -> f ScheduledAutoTuneDetails
scheduledAutoTuneDetails_date = (ScheduledAutoTuneDetails -> Maybe POSIX)
-> (ScheduledAutoTuneDetails
-> Maybe POSIX -> ScheduledAutoTuneDetails)
-> Lens
ScheduledAutoTuneDetails
ScheduledAutoTuneDetails
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAutoTuneDetails' {Maybe POSIX
date :: Maybe POSIX
$sel:date:ScheduledAutoTuneDetails' :: ScheduledAutoTuneDetails -> Maybe POSIX
date} -> Maybe POSIX
date) (\s :: ScheduledAutoTuneDetails
s@ScheduledAutoTuneDetails' {} Maybe POSIX
a -> ScheduledAutoTuneDetails
s {$sel:date:ScheduledAutoTuneDetails' :: Maybe POSIX
date = Maybe POSIX
a} :: ScheduledAutoTuneDetails) ((Maybe POSIX -> f (Maybe POSIX))
-> ScheduledAutoTuneDetails -> f ScheduledAutoTuneDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledAutoTuneDetails
-> f ScheduledAutoTuneDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
scheduledAutoTuneDetails_actionType :: Lens.Lens' ScheduledAutoTuneDetails (Prelude.Maybe ScheduledAutoTuneActionType)
scheduledAutoTuneDetails_actionType :: (Maybe ScheduledAutoTuneActionType
-> f (Maybe ScheduledAutoTuneActionType))
-> ScheduledAutoTuneDetails -> f ScheduledAutoTuneDetails
scheduledAutoTuneDetails_actionType = (ScheduledAutoTuneDetails -> Maybe ScheduledAutoTuneActionType)
-> (ScheduledAutoTuneDetails
-> Maybe ScheduledAutoTuneActionType -> ScheduledAutoTuneDetails)
-> Lens
ScheduledAutoTuneDetails
ScheduledAutoTuneDetails
(Maybe ScheduledAutoTuneActionType)
(Maybe ScheduledAutoTuneActionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAutoTuneDetails' {Maybe ScheduledAutoTuneActionType
actionType :: Maybe ScheduledAutoTuneActionType
$sel:actionType:ScheduledAutoTuneDetails' :: ScheduledAutoTuneDetails -> Maybe ScheduledAutoTuneActionType
actionType} -> Maybe ScheduledAutoTuneActionType
actionType) (\s :: ScheduledAutoTuneDetails
s@ScheduledAutoTuneDetails' {} Maybe ScheduledAutoTuneActionType
a -> ScheduledAutoTuneDetails
s {$sel:actionType:ScheduledAutoTuneDetails' :: Maybe ScheduledAutoTuneActionType
actionType = Maybe ScheduledAutoTuneActionType
a} :: ScheduledAutoTuneDetails)
instance Core.FromJSON ScheduledAutoTuneDetails where
parseJSON :: Value -> Parser ScheduledAutoTuneDetails
parseJSON =
String
-> (Object -> Parser ScheduledAutoTuneDetails)
-> Value
-> Parser ScheduledAutoTuneDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ScheduledAutoTuneDetails"
( \Object
x ->
Maybe ScheduledAutoTuneSeverityType
-> Maybe Text
-> Maybe POSIX
-> Maybe ScheduledAutoTuneActionType
-> ScheduledAutoTuneDetails
ScheduledAutoTuneDetails'
(Maybe ScheduledAutoTuneSeverityType
-> Maybe Text
-> Maybe POSIX
-> Maybe ScheduledAutoTuneActionType
-> ScheduledAutoTuneDetails)
-> Parser (Maybe ScheduledAutoTuneSeverityType)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ScheduledAutoTuneActionType
-> ScheduledAutoTuneDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ScheduledAutoTuneSeverityType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Severity")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ScheduledAutoTuneActionType
-> ScheduledAutoTuneDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe ScheduledAutoTuneActionType -> ScheduledAutoTuneDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Action")
Parser
(Maybe POSIX
-> Maybe ScheduledAutoTuneActionType -> ScheduledAutoTuneDetails)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ScheduledAutoTuneActionType -> ScheduledAutoTuneDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Date")
Parser
(Maybe ScheduledAutoTuneActionType -> ScheduledAutoTuneDetails)
-> Parser (Maybe ScheduledAutoTuneActionType)
-> Parser ScheduledAutoTuneDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScheduledAutoTuneActionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ActionType")
)
instance Prelude.Hashable ScheduledAutoTuneDetails
instance Prelude.NFData ScheduledAutoTuneDetails