{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CloudWatchDashboard = CloudWatchDashboard'
{
CloudWatchDashboard -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (CloudWatchDashboard -> CloudWatchDashboard -> Bool
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]
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
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. 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' {$sel:name:CloudWatchDashboard' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing}
cloudWatchDashboard_name :: Lens.Lens' CloudWatchDashboard (Prelude.Maybe Prelude.Text)
cloudWatchDashboard_name :: Lens' CloudWatchDashboard (Maybe Text)
cloudWatchDashboard_name = 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 Data.FromJSON CloudWatchDashboard where
parseJSON :: Value -> Parser CloudWatchDashboard
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CloudWatchDashboard"
( \Object
x ->
Maybe Text -> CloudWatchDashboard
CloudWatchDashboard' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
)
instance Prelude.Hashable CloudWatchDashboard where
hashWithSalt :: Int -> CloudWatchDashboard -> Int
hashWithSalt Int
_salt CloudWatchDashboard' {Maybe Text
name :: Maybe Text
$sel:name:CloudWatchDashboard' :: CloudWatchDashboard -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData CloudWatchDashboard where
rnf :: CloudWatchDashboard -> ()
rnf CloudWatchDashboard' {Maybe Text
name :: Maybe Text
$sel:name:CloudWatchDashboard' :: CloudWatchDashboard -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name