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