{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DevOpsGuru.Types.CloudWatchMetricsDetail
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DevOpsGuru.Types.CloudWatchMetricsDetail where

import qualified Amazonka.Core as Core
import Amazonka.DevOpsGuru.Types.CloudWatchMetricsDimension
import Amazonka.DevOpsGuru.Types.CloudWatchMetricsStat
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about an Amazon CloudWatch metric.
--
-- /See:/ 'newCloudWatchMetricsDetail' smart constructor.
data CloudWatchMetricsDetail = CloudWatchMetricsDetail'
  { -- | The length of time associated with the CloudWatch metric in number of
    -- seconds.
    CloudWatchMetricsDetail -> Maybe Int
period :: Prelude.Maybe Prelude.Int,
    -- | The name of the CloudWatch metric.
    CloudWatchMetricsDetail -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
    -- | The namespace of the CloudWatch metric. A namespace is a container for
    -- CloudWatch metrics.
    CloudWatchMetricsDetail -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The type of statistic associated with the CloudWatch metric. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic Statistics>
    -- in the /Amazon CloudWatch User Guide/.
    CloudWatchMetricsDetail -> Maybe CloudWatchMetricsStat
stat :: Prelude.Maybe CloudWatchMetricsStat,
    -- | An array of CloudWatch dimensions associated with
    CloudWatchMetricsDetail -> Maybe [CloudWatchMetricsDimension]
dimensions :: Prelude.Maybe [CloudWatchMetricsDimension],
    -- | The unit of measure used for the CloudWatch metric. For example,
    -- @Bytes@, @Seconds@, @Count@, and @Percent@.
    CloudWatchMetricsDetail -> Maybe Text
unit :: Prelude.Maybe Prelude.Text
  }
  deriving (CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool
(CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool)
-> (CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool)
-> Eq CloudWatchMetricsDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool
$c/= :: CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool
== :: CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool
$c== :: CloudWatchMetricsDetail -> CloudWatchMetricsDetail -> Bool
Prelude.Eq, ReadPrec [CloudWatchMetricsDetail]
ReadPrec CloudWatchMetricsDetail
Int -> ReadS CloudWatchMetricsDetail
ReadS [CloudWatchMetricsDetail]
(Int -> ReadS CloudWatchMetricsDetail)
-> ReadS [CloudWatchMetricsDetail]
-> ReadPrec CloudWatchMetricsDetail
-> ReadPrec [CloudWatchMetricsDetail]
-> Read CloudWatchMetricsDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchMetricsDetail]
$creadListPrec :: ReadPrec [CloudWatchMetricsDetail]
readPrec :: ReadPrec CloudWatchMetricsDetail
$creadPrec :: ReadPrec CloudWatchMetricsDetail
readList :: ReadS [CloudWatchMetricsDetail]
$creadList :: ReadS [CloudWatchMetricsDetail]
readsPrec :: Int -> ReadS CloudWatchMetricsDetail
$creadsPrec :: Int -> ReadS CloudWatchMetricsDetail
Prelude.Read, Int -> CloudWatchMetricsDetail -> ShowS
[CloudWatchMetricsDetail] -> ShowS
CloudWatchMetricsDetail -> String
(Int -> CloudWatchMetricsDetail -> ShowS)
-> (CloudWatchMetricsDetail -> String)
-> ([CloudWatchMetricsDetail] -> ShowS)
-> Show CloudWatchMetricsDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchMetricsDetail] -> ShowS
$cshowList :: [CloudWatchMetricsDetail] -> ShowS
show :: CloudWatchMetricsDetail -> String
$cshow :: CloudWatchMetricsDetail -> String
showsPrec :: Int -> CloudWatchMetricsDetail -> ShowS
$cshowsPrec :: Int -> CloudWatchMetricsDetail -> ShowS
Prelude.Show, (forall x.
 CloudWatchMetricsDetail -> Rep CloudWatchMetricsDetail x)
-> (forall x.
    Rep CloudWatchMetricsDetail x -> CloudWatchMetricsDetail)
-> Generic CloudWatchMetricsDetail
forall x. Rep CloudWatchMetricsDetail x -> CloudWatchMetricsDetail
forall x. CloudWatchMetricsDetail -> Rep CloudWatchMetricsDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CloudWatchMetricsDetail x -> CloudWatchMetricsDetail
$cfrom :: forall x. CloudWatchMetricsDetail -> Rep CloudWatchMetricsDetail x
Prelude.Generic)

-- |
-- Create a value of 'CloudWatchMetricsDetail' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'period', 'cloudWatchMetricsDetail_period' - The length of time associated with the CloudWatch metric in number of
-- seconds.
--
-- 'metricName', 'cloudWatchMetricsDetail_metricName' - The name of the CloudWatch metric.
--
-- 'namespace', 'cloudWatchMetricsDetail_namespace' - The namespace of the CloudWatch metric. A namespace is a container for
-- CloudWatch metrics.
--
-- 'stat', 'cloudWatchMetricsDetail_stat' - The type of statistic associated with the CloudWatch metric. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic Statistics>
-- in the /Amazon CloudWatch User Guide/.
--
-- 'dimensions', 'cloudWatchMetricsDetail_dimensions' - An array of CloudWatch dimensions associated with
--
-- 'unit', 'cloudWatchMetricsDetail_unit' - The unit of measure used for the CloudWatch metric. For example,
-- @Bytes@, @Seconds@, @Count@, and @Percent@.
newCloudWatchMetricsDetail ::
  CloudWatchMetricsDetail
newCloudWatchMetricsDetail :: CloudWatchMetricsDetail
newCloudWatchMetricsDetail =
  CloudWatchMetricsDetail' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe CloudWatchMetricsStat
-> Maybe [CloudWatchMetricsDimension]
-> Maybe Text
-> CloudWatchMetricsDetail
CloudWatchMetricsDetail'
    { $sel:period:CloudWatchMetricsDetail' :: Maybe Int
period = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:metricName:CloudWatchMetricsDetail' :: Maybe Text
metricName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:namespace:CloudWatchMetricsDetail' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stat:CloudWatchMetricsDetail' :: Maybe CloudWatchMetricsStat
stat = Maybe CloudWatchMetricsStat
forall a. Maybe a
Prelude.Nothing,
      $sel:dimensions:CloudWatchMetricsDetail' :: Maybe [CloudWatchMetricsDimension]
dimensions = Maybe [CloudWatchMetricsDimension]
forall a. Maybe a
Prelude.Nothing,
      $sel:unit:CloudWatchMetricsDetail' :: Maybe Text
unit = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The length of time associated with the CloudWatch metric in number of
-- seconds.
cloudWatchMetricsDetail_period :: Lens.Lens' CloudWatchMetricsDetail (Prelude.Maybe Prelude.Int)
cloudWatchMetricsDetail_period :: (Maybe Int -> f (Maybe Int))
-> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail
cloudWatchMetricsDetail_period = (CloudWatchMetricsDetail -> Maybe Int)
-> (CloudWatchMetricsDetail
    -> Maybe Int -> CloudWatchMetricsDetail)
-> Lens
     CloudWatchMetricsDetail
     CloudWatchMetricsDetail
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchMetricsDetail' {Maybe Int
period :: Maybe Int
$sel:period:CloudWatchMetricsDetail' :: CloudWatchMetricsDetail -> Maybe Int
period} -> Maybe Int
period) (\s :: CloudWatchMetricsDetail
s@CloudWatchMetricsDetail' {} Maybe Int
a -> CloudWatchMetricsDetail
s {$sel:period:CloudWatchMetricsDetail' :: Maybe Int
period = Maybe Int
a} :: CloudWatchMetricsDetail)

-- | The name of the CloudWatch metric.
cloudWatchMetricsDetail_metricName :: Lens.Lens' CloudWatchMetricsDetail (Prelude.Maybe Prelude.Text)
cloudWatchMetricsDetail_metricName :: (Maybe Text -> f (Maybe Text))
-> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail
cloudWatchMetricsDetail_metricName = (CloudWatchMetricsDetail -> Maybe Text)
-> (CloudWatchMetricsDetail
    -> Maybe Text -> CloudWatchMetricsDetail)
-> Lens
     CloudWatchMetricsDetail
     CloudWatchMetricsDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchMetricsDetail' {Maybe Text
metricName :: Maybe Text
$sel:metricName:CloudWatchMetricsDetail' :: CloudWatchMetricsDetail -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: CloudWatchMetricsDetail
s@CloudWatchMetricsDetail' {} Maybe Text
a -> CloudWatchMetricsDetail
s {$sel:metricName:CloudWatchMetricsDetail' :: Maybe Text
metricName = Maybe Text
a} :: CloudWatchMetricsDetail)

-- | The namespace of the CloudWatch metric. A namespace is a container for
-- CloudWatch metrics.
cloudWatchMetricsDetail_namespace :: Lens.Lens' CloudWatchMetricsDetail (Prelude.Maybe Prelude.Text)
cloudWatchMetricsDetail_namespace :: (Maybe Text -> f (Maybe Text))
-> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail
cloudWatchMetricsDetail_namespace = (CloudWatchMetricsDetail -> Maybe Text)
-> (CloudWatchMetricsDetail
    -> Maybe Text -> CloudWatchMetricsDetail)
-> Lens
     CloudWatchMetricsDetail
     CloudWatchMetricsDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchMetricsDetail' {Maybe Text
namespace :: Maybe Text
$sel:namespace:CloudWatchMetricsDetail' :: CloudWatchMetricsDetail -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: CloudWatchMetricsDetail
s@CloudWatchMetricsDetail' {} Maybe Text
a -> CloudWatchMetricsDetail
s {$sel:namespace:CloudWatchMetricsDetail' :: Maybe Text
namespace = Maybe Text
a} :: CloudWatchMetricsDetail)

-- | The type of statistic associated with the CloudWatch metric. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic Statistics>
-- in the /Amazon CloudWatch User Guide/.
cloudWatchMetricsDetail_stat :: Lens.Lens' CloudWatchMetricsDetail (Prelude.Maybe CloudWatchMetricsStat)
cloudWatchMetricsDetail_stat :: (Maybe CloudWatchMetricsStat -> f (Maybe CloudWatchMetricsStat))
-> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail
cloudWatchMetricsDetail_stat = (CloudWatchMetricsDetail -> Maybe CloudWatchMetricsStat)
-> (CloudWatchMetricsDetail
    -> Maybe CloudWatchMetricsStat -> CloudWatchMetricsDetail)
-> Lens
     CloudWatchMetricsDetail
     CloudWatchMetricsDetail
     (Maybe CloudWatchMetricsStat)
     (Maybe CloudWatchMetricsStat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchMetricsDetail' {Maybe CloudWatchMetricsStat
stat :: Maybe CloudWatchMetricsStat
$sel:stat:CloudWatchMetricsDetail' :: CloudWatchMetricsDetail -> Maybe CloudWatchMetricsStat
stat} -> Maybe CloudWatchMetricsStat
stat) (\s :: CloudWatchMetricsDetail
s@CloudWatchMetricsDetail' {} Maybe CloudWatchMetricsStat
a -> CloudWatchMetricsDetail
s {$sel:stat:CloudWatchMetricsDetail' :: Maybe CloudWatchMetricsStat
stat = Maybe CloudWatchMetricsStat
a} :: CloudWatchMetricsDetail)

-- | An array of CloudWatch dimensions associated with
cloudWatchMetricsDetail_dimensions :: Lens.Lens' CloudWatchMetricsDetail (Prelude.Maybe [CloudWatchMetricsDimension])
cloudWatchMetricsDetail_dimensions :: (Maybe [CloudWatchMetricsDimension]
 -> f (Maybe [CloudWatchMetricsDimension]))
-> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail
cloudWatchMetricsDetail_dimensions = (CloudWatchMetricsDetail -> Maybe [CloudWatchMetricsDimension])
-> (CloudWatchMetricsDetail
    -> Maybe [CloudWatchMetricsDimension] -> CloudWatchMetricsDetail)
-> Lens
     CloudWatchMetricsDetail
     CloudWatchMetricsDetail
     (Maybe [CloudWatchMetricsDimension])
     (Maybe [CloudWatchMetricsDimension])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchMetricsDetail' {Maybe [CloudWatchMetricsDimension]
dimensions :: Maybe [CloudWatchMetricsDimension]
$sel:dimensions:CloudWatchMetricsDetail' :: CloudWatchMetricsDetail -> Maybe [CloudWatchMetricsDimension]
dimensions} -> Maybe [CloudWatchMetricsDimension]
dimensions) (\s :: CloudWatchMetricsDetail
s@CloudWatchMetricsDetail' {} Maybe [CloudWatchMetricsDimension]
a -> CloudWatchMetricsDetail
s {$sel:dimensions:CloudWatchMetricsDetail' :: Maybe [CloudWatchMetricsDimension]
dimensions = Maybe [CloudWatchMetricsDimension]
a} :: CloudWatchMetricsDetail) ((Maybe [CloudWatchMetricsDimension]
  -> f (Maybe [CloudWatchMetricsDimension]))
 -> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail)
-> ((Maybe [CloudWatchMetricsDimension]
     -> f (Maybe [CloudWatchMetricsDimension]))
    -> Maybe [CloudWatchMetricsDimension]
    -> f (Maybe [CloudWatchMetricsDimension]))
-> (Maybe [CloudWatchMetricsDimension]
    -> f (Maybe [CloudWatchMetricsDimension]))
-> CloudWatchMetricsDetail
-> f CloudWatchMetricsDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CloudWatchMetricsDimension]
  [CloudWatchMetricsDimension]
  [CloudWatchMetricsDimension]
  [CloudWatchMetricsDimension]
-> Iso
     (Maybe [CloudWatchMetricsDimension])
     (Maybe [CloudWatchMetricsDimension])
     (Maybe [CloudWatchMetricsDimension])
     (Maybe [CloudWatchMetricsDimension])
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
  [CloudWatchMetricsDimension]
  [CloudWatchMetricsDimension]
  [CloudWatchMetricsDimension]
  [CloudWatchMetricsDimension]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unit of measure used for the CloudWatch metric. For example,
-- @Bytes@, @Seconds@, @Count@, and @Percent@.
cloudWatchMetricsDetail_unit :: Lens.Lens' CloudWatchMetricsDetail (Prelude.Maybe Prelude.Text)
cloudWatchMetricsDetail_unit :: (Maybe Text -> f (Maybe Text))
-> CloudWatchMetricsDetail -> f CloudWatchMetricsDetail
cloudWatchMetricsDetail_unit = (CloudWatchMetricsDetail -> Maybe Text)
-> (CloudWatchMetricsDetail
    -> Maybe Text -> CloudWatchMetricsDetail)
-> Lens
     CloudWatchMetricsDetail
     CloudWatchMetricsDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchMetricsDetail' {Maybe Text
unit :: Maybe Text
$sel:unit:CloudWatchMetricsDetail' :: CloudWatchMetricsDetail -> Maybe Text
unit} -> Maybe Text
unit) (\s :: CloudWatchMetricsDetail
s@CloudWatchMetricsDetail' {} Maybe Text
a -> CloudWatchMetricsDetail
s {$sel:unit:CloudWatchMetricsDetail' :: Maybe Text
unit = Maybe Text
a} :: CloudWatchMetricsDetail)

instance Core.FromJSON CloudWatchMetricsDetail where
  parseJSON :: Value -> Parser CloudWatchMetricsDetail
parseJSON =
    String
-> (Object -> Parser CloudWatchMetricsDetail)
-> Value
-> Parser CloudWatchMetricsDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CloudWatchMetricsDetail"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe CloudWatchMetricsStat
-> Maybe [CloudWatchMetricsDimension]
-> Maybe Text
-> CloudWatchMetricsDetail
CloudWatchMetricsDetail'
            (Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe CloudWatchMetricsStat
 -> Maybe [CloudWatchMetricsDimension]
 -> Maybe Text
 -> CloudWatchMetricsDetail)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe CloudWatchMetricsStat
      -> Maybe [CloudWatchMetricsDimension]
      -> Maybe Text
      -> CloudWatchMetricsDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Period")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe CloudWatchMetricsStat
   -> Maybe [CloudWatchMetricsDimension]
   -> Maybe Text
   -> CloudWatchMetricsDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe CloudWatchMetricsStat
      -> Maybe [CloudWatchMetricsDimension]
      -> Maybe Text
      -> CloudWatchMetricsDetail)
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
"MetricName")
            Parser
  (Maybe Text
   -> Maybe CloudWatchMetricsStat
   -> Maybe [CloudWatchMetricsDimension]
   -> Maybe Text
   -> CloudWatchMetricsDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe CloudWatchMetricsStat
      -> Maybe [CloudWatchMetricsDimension]
      -> Maybe Text
      -> CloudWatchMetricsDetail)
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")
            Parser
  (Maybe CloudWatchMetricsStat
   -> Maybe [CloudWatchMetricsDimension]
   -> Maybe Text
   -> CloudWatchMetricsDetail)
-> Parser (Maybe CloudWatchMetricsStat)
-> Parser
     (Maybe [CloudWatchMetricsDimension]
      -> Maybe Text -> CloudWatchMetricsDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchMetricsStat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Stat")
            Parser
  (Maybe [CloudWatchMetricsDimension]
   -> Maybe Text -> CloudWatchMetricsDetail)
-> Parser (Maybe [CloudWatchMetricsDimension])
-> Parser (Maybe Text -> CloudWatchMetricsDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [CloudWatchMetricsDimension]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Dimensions" Parser (Maybe (Maybe [CloudWatchMetricsDimension]))
-> Maybe [CloudWatchMetricsDimension]
-> Parser (Maybe [CloudWatchMetricsDimension])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CloudWatchMetricsDimension]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> CloudWatchMetricsDetail)
-> Parser (Maybe Text) -> Parser CloudWatchMetricsDetail
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
"Unit")
      )

instance Prelude.Hashable CloudWatchMetricsDetail

instance Prelude.NFData CloudWatchMetricsDetail