{-# 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.DevOpsGuru.Types.RecommendationRelatedCloudWatchMetricsSourceDetail 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 RecommendationRelatedCloudWatchMetricsSourceDetail = RecommendationRelatedCloudWatchMetricsSourceDetail'
{
RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text
}
deriving (RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool
$c/= :: RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool
== :: RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool
$c== :: RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool
Prelude.Eq, ReadPrec [RecommendationRelatedCloudWatchMetricsSourceDetail]
ReadPrec RecommendationRelatedCloudWatchMetricsSourceDetail
Int -> ReadS RecommendationRelatedCloudWatchMetricsSourceDetail
ReadS [RecommendationRelatedCloudWatchMetricsSourceDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecommendationRelatedCloudWatchMetricsSourceDetail]
$creadListPrec :: ReadPrec [RecommendationRelatedCloudWatchMetricsSourceDetail]
readPrec :: ReadPrec RecommendationRelatedCloudWatchMetricsSourceDetail
$creadPrec :: ReadPrec RecommendationRelatedCloudWatchMetricsSourceDetail
readList :: ReadS [RecommendationRelatedCloudWatchMetricsSourceDetail]
$creadList :: ReadS [RecommendationRelatedCloudWatchMetricsSourceDetail]
readsPrec :: Int -> ReadS RecommendationRelatedCloudWatchMetricsSourceDetail
$creadsPrec :: Int -> ReadS RecommendationRelatedCloudWatchMetricsSourceDetail
Prelude.Read, Int -> RecommendationRelatedCloudWatchMetricsSourceDetail -> ShowS
[RecommendationRelatedCloudWatchMetricsSourceDetail] -> ShowS
RecommendationRelatedCloudWatchMetricsSourceDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecommendationRelatedCloudWatchMetricsSourceDetail] -> ShowS
$cshowList :: [RecommendationRelatedCloudWatchMetricsSourceDetail] -> ShowS
show :: RecommendationRelatedCloudWatchMetricsSourceDetail -> String
$cshow :: RecommendationRelatedCloudWatchMetricsSourceDetail -> String
showsPrec :: Int -> RecommendationRelatedCloudWatchMetricsSourceDetail -> ShowS
$cshowsPrec :: Int -> RecommendationRelatedCloudWatchMetricsSourceDetail -> ShowS
Prelude.Show, forall x.
Rep RecommendationRelatedCloudWatchMetricsSourceDetail x
-> RecommendationRelatedCloudWatchMetricsSourceDetail
forall x.
RecommendationRelatedCloudWatchMetricsSourceDetail
-> Rep RecommendationRelatedCloudWatchMetricsSourceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RecommendationRelatedCloudWatchMetricsSourceDetail x
-> RecommendationRelatedCloudWatchMetricsSourceDetail
$cfrom :: forall x.
RecommendationRelatedCloudWatchMetricsSourceDetail
-> Rep RecommendationRelatedCloudWatchMetricsSourceDetail x
Prelude.Generic)
newRecommendationRelatedCloudWatchMetricsSourceDetail ::
RecommendationRelatedCloudWatchMetricsSourceDetail
newRecommendationRelatedCloudWatchMetricsSourceDetail :: RecommendationRelatedCloudWatchMetricsSourceDetail
newRecommendationRelatedCloudWatchMetricsSourceDetail =
RecommendationRelatedCloudWatchMetricsSourceDetail'
{ $sel:metricName:RecommendationRelatedCloudWatchMetricsSourceDetail' :: Maybe Text
metricName =
forall a. Maybe a
Prelude.Nothing,
$sel:namespace:RecommendationRelatedCloudWatchMetricsSourceDetail' :: Maybe Text
namespace =
forall a. Maybe a
Prelude.Nothing
}
recommendationRelatedCloudWatchMetricsSourceDetail_metricName :: Lens.Lens' RecommendationRelatedCloudWatchMetricsSourceDetail (Prelude.Maybe Prelude.Text)
recommendationRelatedCloudWatchMetricsSourceDetail_metricName :: Lens'
RecommendationRelatedCloudWatchMetricsSourceDetail (Maybe Text)
recommendationRelatedCloudWatchMetricsSourceDetail_metricName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommendationRelatedCloudWatchMetricsSourceDetail' {Maybe Text
metricName :: Maybe Text
$sel:metricName:RecommendationRelatedCloudWatchMetricsSourceDetail' :: RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: RecommendationRelatedCloudWatchMetricsSourceDetail
s@RecommendationRelatedCloudWatchMetricsSourceDetail' {} Maybe Text
a -> RecommendationRelatedCloudWatchMetricsSourceDetail
s {$sel:metricName:RecommendationRelatedCloudWatchMetricsSourceDetail' :: Maybe Text
metricName = Maybe Text
a} :: RecommendationRelatedCloudWatchMetricsSourceDetail)
recommendationRelatedCloudWatchMetricsSourceDetail_namespace :: Lens.Lens' RecommendationRelatedCloudWatchMetricsSourceDetail (Prelude.Maybe Prelude.Text)
recommendationRelatedCloudWatchMetricsSourceDetail_namespace :: Lens'
RecommendationRelatedCloudWatchMetricsSourceDetail (Maybe Text)
recommendationRelatedCloudWatchMetricsSourceDetail_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommendationRelatedCloudWatchMetricsSourceDetail' {Maybe Text
namespace :: Maybe Text
$sel:namespace:RecommendationRelatedCloudWatchMetricsSourceDetail' :: RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: RecommendationRelatedCloudWatchMetricsSourceDetail
s@RecommendationRelatedCloudWatchMetricsSourceDetail' {} Maybe Text
a -> RecommendationRelatedCloudWatchMetricsSourceDetail
s {$sel:namespace:RecommendationRelatedCloudWatchMetricsSourceDetail' :: Maybe Text
namespace = Maybe Text
a} :: RecommendationRelatedCloudWatchMetricsSourceDetail)
instance
Data.FromJSON
RecommendationRelatedCloudWatchMetricsSourceDetail
where
parseJSON :: Value -> Parser RecommendationRelatedCloudWatchMetricsSourceDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RecommendationRelatedCloudWatchMetricsSourceDetail"
( \Object
x ->
Maybe Text
-> Maybe Text -> RecommendationRelatedCloudWatchMetricsSourceDetail
RecommendationRelatedCloudWatchMetricsSourceDetail'
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
"MetricName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Namespace")
)
instance
Prelude.Hashable
RecommendationRelatedCloudWatchMetricsSourceDetail
where
hashWithSalt :: Int -> RecommendationRelatedCloudWatchMetricsSourceDetail -> Int
hashWithSalt
Int
_salt
RecommendationRelatedCloudWatchMetricsSourceDetail' {Maybe Text
namespace :: Maybe Text
metricName :: Maybe Text
$sel:namespace:RecommendationRelatedCloudWatchMetricsSourceDetail' :: RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
$sel:metricName:RecommendationRelatedCloudWatchMetricsSourceDetail' :: RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
metricName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
namespace
instance
Prelude.NFData
RecommendationRelatedCloudWatchMetricsSourceDetail
where
rnf :: RecommendationRelatedCloudWatchMetricsSourceDetail -> ()
rnf
RecommendationRelatedCloudWatchMetricsSourceDetail' {Maybe Text
namespace :: Maybe Text
metricName :: Maybe Text
$sel:namespace:RecommendationRelatedCloudWatchMetricsSourceDetail' :: RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
$sel:metricName:RecommendationRelatedCloudWatchMetricsSourceDetail' :: RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
metricName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
namespace