{-# 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.Lens as Lens
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
(RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool)
-> (RecommendationRelatedCloudWatchMetricsSourceDetail
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> Bool)
-> Eq RecommendationRelatedCloudWatchMetricsSourceDetail
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]
(Int -> ReadS RecommendationRelatedCloudWatchMetricsSourceDetail)
-> ReadS [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> ReadPrec RecommendationRelatedCloudWatchMetricsSourceDetail
-> ReadPrec [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> Read 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
(Int
-> RecommendationRelatedCloudWatchMetricsSourceDetail -> ShowS)
-> (RecommendationRelatedCloudWatchMetricsSourceDetail -> String)
-> ([RecommendationRelatedCloudWatchMetricsSourceDetail] -> ShowS)
-> Show RecommendationRelatedCloudWatchMetricsSourceDetail
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.
RecommendationRelatedCloudWatchMetricsSourceDetail
-> Rep RecommendationRelatedCloudWatchMetricsSourceDetail x)
-> (forall x.
Rep RecommendationRelatedCloudWatchMetricsSourceDetail x
-> RecommendationRelatedCloudWatchMetricsSourceDetail)
-> Generic RecommendationRelatedCloudWatchMetricsSourceDetail
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' :: Maybe Text
-> Maybe Text -> RecommendationRelatedCloudWatchMetricsSourceDetail
RecommendationRelatedCloudWatchMetricsSourceDetail'
{ $sel:metricName:RecommendationRelatedCloudWatchMetricsSourceDetail' :: Maybe Text
metricName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:namespace:RecommendationRelatedCloudWatchMetricsSourceDetail' :: Maybe Text
namespace =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
recommendationRelatedCloudWatchMetricsSourceDetail_metricName :: Lens.Lens' RecommendationRelatedCloudWatchMetricsSourceDetail (Prelude.Maybe Prelude.Text)
recommendationRelatedCloudWatchMetricsSourceDetail_metricName :: (Maybe Text -> f (Maybe Text))
-> RecommendationRelatedCloudWatchMetricsSourceDetail
-> f RecommendationRelatedCloudWatchMetricsSourceDetail
recommendationRelatedCloudWatchMetricsSourceDetail_metricName = (RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text)
-> (RecommendationRelatedCloudWatchMetricsSourceDetail
-> Maybe Text
-> RecommendationRelatedCloudWatchMetricsSourceDetail)
-> Lens
RecommendationRelatedCloudWatchMetricsSourceDetail
RecommendationRelatedCloudWatchMetricsSourceDetail
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> RecommendationRelatedCloudWatchMetricsSourceDetail
-> f RecommendationRelatedCloudWatchMetricsSourceDetail
recommendationRelatedCloudWatchMetricsSourceDetail_namespace = (RecommendationRelatedCloudWatchMetricsSourceDetail -> Maybe Text)
-> (RecommendationRelatedCloudWatchMetricsSourceDetail
-> Maybe Text
-> RecommendationRelatedCloudWatchMetricsSourceDetail)
-> Lens
RecommendationRelatedCloudWatchMetricsSourceDetail
RecommendationRelatedCloudWatchMetricsSourceDetail
(Maybe Text)
(Maybe Text)
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
Core.FromJSON
RecommendationRelatedCloudWatchMetricsSourceDetail
where
parseJSON :: Value -> Parser RecommendationRelatedCloudWatchMetricsSourceDetail
parseJSON =
String
-> (Object
-> Parser RecommendationRelatedCloudWatchMetricsSourceDetail)
-> Value
-> Parser RecommendationRelatedCloudWatchMetricsSourceDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RecommendationRelatedCloudWatchMetricsSourceDetail"
( \Object
x ->
Maybe Text
-> Maybe Text -> RecommendationRelatedCloudWatchMetricsSourceDetail
RecommendationRelatedCloudWatchMetricsSourceDetail'
(Maybe Text
-> Maybe Text
-> RecommendationRelatedCloudWatchMetricsSourceDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> RecommendationRelatedCloudWatchMetricsSourceDetail)
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
"MetricName")
Parser
(Maybe Text -> RecommendationRelatedCloudWatchMetricsSourceDetail)
-> Parser (Maybe Text)
-> Parser RecommendationRelatedCloudWatchMetricsSourceDetail
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
"Namespace")
)
instance
Prelude.Hashable
RecommendationRelatedCloudWatchMetricsSourceDetail
instance
Prelude.NFData
RecommendationRelatedCloudWatchMetricsSourceDetail