{-# 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.LookoutMetrics.Types.MetricSetSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MetricSetSummary = MetricSetSummary'
{
MetricSetSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
MetricSetSummary -> Maybe Text
anomalyDetectorArn :: Prelude.Maybe Prelude.Text,
MetricSetSummary -> Maybe Text
metricSetName :: Prelude.Maybe Prelude.Text,
MetricSetSummary -> Maybe Text
metricSetDescription :: Prelude.Maybe Prelude.Text,
MetricSetSummary -> Maybe Text
metricSetArn :: Prelude.Maybe Prelude.Text,
MetricSetSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
MetricSetSummary -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX
}
deriving (MetricSetSummary -> MetricSetSummary -> Bool
(MetricSetSummary -> MetricSetSummary -> Bool)
-> (MetricSetSummary -> MetricSetSummary -> Bool)
-> Eq MetricSetSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetricSetSummary -> MetricSetSummary -> Bool
$c/= :: MetricSetSummary -> MetricSetSummary -> Bool
== :: MetricSetSummary -> MetricSetSummary -> Bool
$c== :: MetricSetSummary -> MetricSetSummary -> Bool
Prelude.Eq, ReadPrec [MetricSetSummary]
ReadPrec MetricSetSummary
Int -> ReadS MetricSetSummary
ReadS [MetricSetSummary]
(Int -> ReadS MetricSetSummary)
-> ReadS [MetricSetSummary]
-> ReadPrec MetricSetSummary
-> ReadPrec [MetricSetSummary]
-> Read MetricSetSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MetricSetSummary]
$creadListPrec :: ReadPrec [MetricSetSummary]
readPrec :: ReadPrec MetricSetSummary
$creadPrec :: ReadPrec MetricSetSummary
readList :: ReadS [MetricSetSummary]
$creadList :: ReadS [MetricSetSummary]
readsPrec :: Int -> ReadS MetricSetSummary
$creadsPrec :: Int -> ReadS MetricSetSummary
Prelude.Read, Int -> MetricSetSummary -> ShowS
[MetricSetSummary] -> ShowS
MetricSetSummary -> String
(Int -> MetricSetSummary -> ShowS)
-> (MetricSetSummary -> String)
-> ([MetricSetSummary] -> ShowS)
-> Show MetricSetSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MetricSetSummary] -> ShowS
$cshowList :: [MetricSetSummary] -> ShowS
show :: MetricSetSummary -> String
$cshow :: MetricSetSummary -> String
showsPrec :: Int -> MetricSetSummary -> ShowS
$cshowsPrec :: Int -> MetricSetSummary -> ShowS
Prelude.Show, (forall x. MetricSetSummary -> Rep MetricSetSummary x)
-> (forall x. Rep MetricSetSummary x -> MetricSetSummary)
-> Generic MetricSetSummary
forall x. Rep MetricSetSummary x -> MetricSetSummary
forall x. MetricSetSummary -> Rep MetricSetSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MetricSetSummary x -> MetricSetSummary
$cfrom :: forall x. MetricSetSummary -> Rep MetricSetSummary x
Prelude.Generic)
newMetricSetSummary ::
MetricSetSummary
newMetricSetSummary :: MetricSetSummary
newMetricSetSummary =
MetricSetSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary
MetricSetSummary'
{ $sel:creationTime:MetricSetSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:anomalyDetectorArn:MetricSetSummary' :: Maybe Text
anomalyDetectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metricSetName:MetricSetSummary' :: Maybe Text
metricSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metricSetDescription:MetricSetSummary' :: Maybe Text
metricSetDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metricSetArn:MetricSetSummary' :: Maybe Text
metricSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:MetricSetSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:lastModificationTime:MetricSetSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
metricSetSummary_creationTime :: Lens.Lens' MetricSetSummary (Prelude.Maybe Prelude.UTCTime)
metricSetSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_creationTime = (MetricSetSummary -> Maybe POSIX)
-> (MetricSetSummary -> Maybe POSIX -> MetricSetSummary)
-> Lens
MetricSetSummary MetricSetSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:MetricSetSummary' :: MetricSetSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe POSIX
a -> MetricSetSummary
s {$sel:creationTime:MetricSetSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: MetricSetSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> MetricSetSummary -> f MetricSetSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MetricSetSummary
-> f MetricSetSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
metricSetSummary_anomalyDetectorArn :: Lens.Lens' MetricSetSummary (Prelude.Maybe Prelude.Text)
metricSetSummary_anomalyDetectorArn :: (Maybe Text -> f (Maybe Text))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_anomalyDetectorArn = (MetricSetSummary -> Maybe Text)
-> (MetricSetSummary -> Maybe Text -> MetricSetSummary)
-> Lens MetricSetSummary MetricSetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe Text
anomalyDetectorArn :: Maybe Text
$sel:anomalyDetectorArn:MetricSetSummary' :: MetricSetSummary -> Maybe Text
anomalyDetectorArn} -> Maybe Text
anomalyDetectorArn) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe Text
a -> MetricSetSummary
s {$sel:anomalyDetectorArn:MetricSetSummary' :: Maybe Text
anomalyDetectorArn = Maybe Text
a} :: MetricSetSummary)
metricSetSummary_metricSetName :: Lens.Lens' MetricSetSummary (Prelude.Maybe Prelude.Text)
metricSetSummary_metricSetName :: (Maybe Text -> f (Maybe Text))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_metricSetName = (MetricSetSummary -> Maybe Text)
-> (MetricSetSummary -> Maybe Text -> MetricSetSummary)
-> Lens MetricSetSummary MetricSetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe Text
metricSetName :: Maybe Text
$sel:metricSetName:MetricSetSummary' :: MetricSetSummary -> Maybe Text
metricSetName} -> Maybe Text
metricSetName) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe Text
a -> MetricSetSummary
s {$sel:metricSetName:MetricSetSummary' :: Maybe Text
metricSetName = Maybe Text
a} :: MetricSetSummary)
metricSetSummary_metricSetDescription :: Lens.Lens' MetricSetSummary (Prelude.Maybe Prelude.Text)
metricSetSummary_metricSetDescription :: (Maybe Text -> f (Maybe Text))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_metricSetDescription = (MetricSetSummary -> Maybe Text)
-> (MetricSetSummary -> Maybe Text -> MetricSetSummary)
-> Lens MetricSetSummary MetricSetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe Text
metricSetDescription :: Maybe Text
$sel:metricSetDescription:MetricSetSummary' :: MetricSetSummary -> Maybe Text
metricSetDescription} -> Maybe Text
metricSetDescription) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe Text
a -> MetricSetSummary
s {$sel:metricSetDescription:MetricSetSummary' :: Maybe Text
metricSetDescription = Maybe Text
a} :: MetricSetSummary)
metricSetSummary_metricSetArn :: Lens.Lens' MetricSetSummary (Prelude.Maybe Prelude.Text)
metricSetSummary_metricSetArn :: (Maybe Text -> f (Maybe Text))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_metricSetArn = (MetricSetSummary -> Maybe Text)
-> (MetricSetSummary -> Maybe Text -> MetricSetSummary)
-> Lens MetricSetSummary MetricSetSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe Text
metricSetArn :: Maybe Text
$sel:metricSetArn:MetricSetSummary' :: MetricSetSummary -> Maybe Text
metricSetArn} -> Maybe Text
metricSetArn) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe Text
a -> MetricSetSummary
s {$sel:metricSetArn:MetricSetSummary' :: Maybe Text
metricSetArn = Maybe Text
a} :: MetricSetSummary)
metricSetSummary_tags :: Lens.Lens' MetricSetSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
metricSetSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_tags = (MetricSetSummary -> Maybe (HashMap Text Text))
-> (MetricSetSummary
-> Maybe (HashMap Text Text) -> MetricSetSummary)
-> Lens
MetricSetSummary
MetricSetSummary
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:MetricSetSummary' :: MetricSetSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe (HashMap Text Text)
a -> MetricSetSummary
s {$sel:tags:MetricSetSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: MetricSetSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MetricSetSummary -> f MetricSetSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MetricSetSummary
-> f MetricSetSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
metricSetSummary_lastModificationTime :: Lens.Lens' MetricSetSummary (Prelude.Maybe Prelude.UTCTime)
metricSetSummary_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MetricSetSummary -> f MetricSetSummary
metricSetSummary_lastModificationTime = (MetricSetSummary -> Maybe POSIX)
-> (MetricSetSummary -> Maybe POSIX -> MetricSetSummary)
-> Lens
MetricSetSummary MetricSetSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricSetSummary' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:MetricSetSummary' :: MetricSetSummary -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: MetricSetSummary
s@MetricSetSummary' {} Maybe POSIX
a -> MetricSetSummary
s {$sel:lastModificationTime:MetricSetSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: MetricSetSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> MetricSetSummary -> f MetricSetSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MetricSetSummary
-> f MetricSetSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON MetricSetSummary where
parseJSON :: Value -> Parser MetricSetSummary
parseJSON =
String
-> (Object -> Parser MetricSetSummary)
-> Value
-> Parser MetricSetSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MetricSetSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary
MetricSetSummary'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
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
"AnomalyDetectorArn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
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
"MetricSetName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> MetricSetSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> Maybe POSIX -> MetricSetSummary)
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
"MetricSetDescription")
Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> Maybe POSIX -> MetricSetSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text) -> Maybe POSIX -> MetricSetSummary)
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
"MetricSetArn")
Parser
(Maybe (HashMap Text Text) -> Maybe POSIX -> MetricSetSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe POSIX -> MetricSetSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe POSIX -> MetricSetSummary)
-> Parser (Maybe POSIX) -> Parser MetricSetSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModificationTime")
)
instance Prelude.Hashable MetricSetSummary
instance Prelude.NFData MetricSetSummary