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