{-# 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.Forecast.Types.MonitorConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data MonitorConfig = MonitorConfig'
{
MonitorConfig -> Text
monitorName :: Prelude.Text
}
deriving (MonitorConfig -> MonitorConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitorConfig -> MonitorConfig -> Bool
$c/= :: MonitorConfig -> MonitorConfig -> Bool
== :: MonitorConfig -> MonitorConfig -> Bool
$c== :: MonitorConfig -> MonitorConfig -> Bool
Prelude.Eq, ReadPrec [MonitorConfig]
ReadPrec MonitorConfig
Int -> ReadS MonitorConfig
ReadS [MonitorConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitorConfig]
$creadListPrec :: ReadPrec [MonitorConfig]
readPrec :: ReadPrec MonitorConfig
$creadPrec :: ReadPrec MonitorConfig
readList :: ReadS [MonitorConfig]
$creadList :: ReadS [MonitorConfig]
readsPrec :: Int -> ReadS MonitorConfig
$creadsPrec :: Int -> ReadS MonitorConfig
Prelude.Read, Int -> MonitorConfig -> ShowS
[MonitorConfig] -> ShowS
MonitorConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitorConfig] -> ShowS
$cshowList :: [MonitorConfig] -> ShowS
show :: MonitorConfig -> String
$cshow :: MonitorConfig -> String
showsPrec :: Int -> MonitorConfig -> ShowS
$cshowsPrec :: Int -> MonitorConfig -> ShowS
Prelude.Show, forall x. Rep MonitorConfig x -> MonitorConfig
forall x. MonitorConfig -> Rep MonitorConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MonitorConfig x -> MonitorConfig
$cfrom :: forall x. MonitorConfig -> Rep MonitorConfig x
Prelude.Generic)
newMonitorConfig ::
Prelude.Text ->
MonitorConfig
newMonitorConfig :: Text -> MonitorConfig
newMonitorConfig Text
pMonitorName_ =
MonitorConfig' {$sel:monitorName:MonitorConfig' :: Text
monitorName = Text
pMonitorName_}
monitorConfig_monitorName :: Lens.Lens' MonitorConfig Prelude.Text
monitorConfig_monitorName :: Lens' MonitorConfig Text
monitorConfig_monitorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitorConfig' {Text
monitorName :: Text
$sel:monitorName:MonitorConfig' :: MonitorConfig -> Text
monitorName} -> Text
monitorName) (\s :: MonitorConfig
s@MonitorConfig' {} Text
a -> MonitorConfig
s {$sel:monitorName:MonitorConfig' :: Text
monitorName = Text
a} :: MonitorConfig)
instance Prelude.Hashable MonitorConfig where
hashWithSalt :: Int -> MonitorConfig -> Int
hashWithSalt Int
_salt MonitorConfig' {Text
monitorName :: Text
$sel:monitorName:MonitorConfig' :: MonitorConfig -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
monitorName
instance Prelude.NFData MonitorConfig where
rnf :: MonitorConfig -> ()
rnf MonitorConfig' {Text
monitorName :: Text
$sel:monitorName:MonitorConfig' :: MonitorConfig -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
monitorName
instance Data.ToJSON MonitorConfig where
toJSON :: MonitorConfig -> Value
toJSON MonitorConfig' {Text
monitorName :: Text
$sel:monitorName:MonitorConfig' :: MonitorConfig -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"MonitorName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
monitorName)]
)