{-# 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.RecommendationRelatedAnomalySourceDetail where
import qualified Amazonka.Core as Core
import Amazonka.DevOpsGuru.Types.RecommendationRelatedCloudWatchMetricsSourceDetail
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RecommendationRelatedAnomalySourceDetail = RecommendationRelatedAnomalySourceDetail'
{
RecommendationRelatedAnomalySourceDetail
-> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
cloudWatchMetrics :: Prelude.Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
}
deriving (RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool
(RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool)
-> (RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool)
-> Eq RecommendationRelatedAnomalySourceDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool
$c/= :: RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool
== :: RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool
$c== :: RecommendationRelatedAnomalySourceDetail
-> RecommendationRelatedAnomalySourceDetail -> Bool
Prelude.Eq, ReadPrec [RecommendationRelatedAnomalySourceDetail]
ReadPrec RecommendationRelatedAnomalySourceDetail
Int -> ReadS RecommendationRelatedAnomalySourceDetail
ReadS [RecommendationRelatedAnomalySourceDetail]
(Int -> ReadS RecommendationRelatedAnomalySourceDetail)
-> ReadS [RecommendationRelatedAnomalySourceDetail]
-> ReadPrec RecommendationRelatedAnomalySourceDetail
-> ReadPrec [RecommendationRelatedAnomalySourceDetail]
-> Read RecommendationRelatedAnomalySourceDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecommendationRelatedAnomalySourceDetail]
$creadListPrec :: ReadPrec [RecommendationRelatedAnomalySourceDetail]
readPrec :: ReadPrec RecommendationRelatedAnomalySourceDetail
$creadPrec :: ReadPrec RecommendationRelatedAnomalySourceDetail
readList :: ReadS [RecommendationRelatedAnomalySourceDetail]
$creadList :: ReadS [RecommendationRelatedAnomalySourceDetail]
readsPrec :: Int -> ReadS RecommendationRelatedAnomalySourceDetail
$creadsPrec :: Int -> ReadS RecommendationRelatedAnomalySourceDetail
Prelude.Read, Int -> RecommendationRelatedAnomalySourceDetail -> ShowS
[RecommendationRelatedAnomalySourceDetail] -> ShowS
RecommendationRelatedAnomalySourceDetail -> String
(Int -> RecommendationRelatedAnomalySourceDetail -> ShowS)
-> (RecommendationRelatedAnomalySourceDetail -> String)
-> ([RecommendationRelatedAnomalySourceDetail] -> ShowS)
-> Show RecommendationRelatedAnomalySourceDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecommendationRelatedAnomalySourceDetail] -> ShowS
$cshowList :: [RecommendationRelatedAnomalySourceDetail] -> ShowS
show :: RecommendationRelatedAnomalySourceDetail -> String
$cshow :: RecommendationRelatedAnomalySourceDetail -> String
showsPrec :: Int -> RecommendationRelatedAnomalySourceDetail -> ShowS
$cshowsPrec :: Int -> RecommendationRelatedAnomalySourceDetail -> ShowS
Prelude.Show, (forall x.
RecommendationRelatedAnomalySourceDetail
-> Rep RecommendationRelatedAnomalySourceDetail x)
-> (forall x.
Rep RecommendationRelatedAnomalySourceDetail x
-> RecommendationRelatedAnomalySourceDetail)
-> Generic RecommendationRelatedAnomalySourceDetail
forall x.
Rep RecommendationRelatedAnomalySourceDetail x
-> RecommendationRelatedAnomalySourceDetail
forall x.
RecommendationRelatedAnomalySourceDetail
-> Rep RecommendationRelatedAnomalySourceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RecommendationRelatedAnomalySourceDetail x
-> RecommendationRelatedAnomalySourceDetail
$cfrom :: forall x.
RecommendationRelatedAnomalySourceDetail
-> Rep RecommendationRelatedAnomalySourceDetail x
Prelude.Generic)
newRecommendationRelatedAnomalySourceDetail ::
RecommendationRelatedAnomalySourceDetail
newRecommendationRelatedAnomalySourceDetail :: RecommendationRelatedAnomalySourceDetail
newRecommendationRelatedAnomalySourceDetail =
RecommendationRelatedAnomalySourceDetail' :: Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> RecommendationRelatedAnomalySourceDetail
RecommendationRelatedAnomalySourceDetail'
{ $sel:cloudWatchMetrics:RecommendationRelatedAnomalySourceDetail' :: Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
cloudWatchMetrics =
Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
forall a. Maybe a
Prelude.Nothing
}
recommendationRelatedAnomalySourceDetail_cloudWatchMetrics :: Lens.Lens' RecommendationRelatedAnomalySourceDetail (Prelude.Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
recommendationRelatedAnomalySourceDetail_cloudWatchMetrics :: (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> f (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
-> RecommendationRelatedAnomalySourceDetail
-> f RecommendationRelatedAnomalySourceDetail
recommendationRelatedAnomalySourceDetail_cloudWatchMetrics = (RecommendationRelatedAnomalySourceDetail
-> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
-> (RecommendationRelatedAnomalySourceDetail
-> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> RecommendationRelatedAnomalySourceDetail)
-> Lens
RecommendationRelatedAnomalySourceDetail
RecommendationRelatedAnomalySourceDetail
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommendationRelatedAnomalySourceDetail' {Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
cloudWatchMetrics :: Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
$sel:cloudWatchMetrics:RecommendationRelatedAnomalySourceDetail' :: RecommendationRelatedAnomalySourceDetail
-> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
cloudWatchMetrics} -> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
cloudWatchMetrics) (\s :: RecommendationRelatedAnomalySourceDetail
s@RecommendationRelatedAnomalySourceDetail' {} Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
a -> RecommendationRelatedAnomalySourceDetail
s {$sel:cloudWatchMetrics:RecommendationRelatedAnomalySourceDetail' :: Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
cloudWatchMetrics = Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
a} :: RecommendationRelatedAnomalySourceDetail) ((Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> f (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
-> RecommendationRelatedAnomalySourceDetail
-> f RecommendationRelatedAnomalySourceDetail)
-> ((Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> f (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
-> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> f (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
-> (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> f (Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
-> RecommendationRelatedAnomalySourceDetail
-> f RecommendationRelatedAnomalySourceDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RecommendationRelatedCloudWatchMetricsSourceDetail]
[RecommendationRelatedCloudWatchMetricsSourceDetail]
[RecommendationRelatedCloudWatchMetricsSourceDetail]
[RecommendationRelatedCloudWatchMetricsSourceDetail]
-> Iso
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[RecommendationRelatedCloudWatchMetricsSourceDetail]
[RecommendationRelatedCloudWatchMetricsSourceDetail]
[RecommendationRelatedCloudWatchMetricsSourceDetail]
[RecommendationRelatedCloudWatchMetricsSourceDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
RecommendationRelatedAnomalySourceDetail
where
parseJSON :: Value -> Parser RecommendationRelatedAnomalySourceDetail
parseJSON =
String
-> (Object -> Parser RecommendationRelatedAnomalySourceDetail)
-> Value
-> Parser RecommendationRelatedAnomalySourceDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RecommendationRelatedAnomalySourceDetail"
( \Object
x ->
Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> RecommendationRelatedAnomalySourceDetail
RecommendationRelatedAnomalySourceDetail'
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> RecommendationRelatedAnomalySourceDetail)
-> Parser
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
-> Parser RecommendationRelatedAnomalySourceDetail
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Parser
(Maybe
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchMetrics"
Parser
(Maybe
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]))
-> Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
-> Parser
(Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RecommendationRelatedCloudWatchMetricsSourceDetail]
forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
RecommendationRelatedAnomalySourceDetail
instance
Prelude.NFData
RecommendationRelatedAnomalySourceDetail