{-# 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.CloudWatch.Types.MetricDataResult
-- 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.CloudWatch.Types.MetricDataResult where

import Amazonka.CloudWatch.Types.MessageData
import Amazonka.CloudWatch.Types.StatusCode
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A @GetMetricData@ call returns an array of @MetricDataResult@
-- structures. Each of these structures includes the data points for that
-- metric, along with the timestamps of those data points and other
-- identifying information.
--
-- /See:/ 'newMetricDataResult' smart constructor.
data MetricDataResult = MetricDataResult'
  { -- | The data points for the metric corresponding to @Timestamps@. The number
    -- of values always matches the number of timestamps and the timestamp for
    -- Values[x] is Timestamps[x].
    MetricDataResult -> Maybe [Double]
values :: Prelude.Maybe [Prelude.Double],
    -- | The short name you specified to represent this metric.
    MetricDataResult -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The timestamps for the data points, formatted in Unix timestamp format.
    -- The number of timestamps always matches the number of values and the
    -- value for Timestamps[x] is Values[x].
    MetricDataResult -> Maybe [ISO8601]
timestamps :: Prelude.Maybe [Core.ISO8601],
    -- | A list of messages with additional information about the data returned.
    MetricDataResult -> Maybe [MessageData]
messages :: Prelude.Maybe [MessageData],
    -- | The human-readable label associated with the data.
    MetricDataResult -> Maybe Text
label :: Prelude.Maybe Prelude.Text,
    -- | The status of the returned data. @Complete@ indicates that all data
    -- points in the requested time range were returned. @PartialData@ means
    -- that an incomplete set of data points were returned. You can use the
    -- @NextToken@ value that was returned and repeat your request to get more
    -- data points. @NextToken@ is not returned if you are performing a math
    -- expression. @InternalError@ indicates that an error occurred. Retry your
    -- request using @NextToken@, if present.
    MetricDataResult -> Maybe StatusCode
statusCode :: Prelude.Maybe StatusCode
  }
  deriving (MetricDataResult -> MetricDataResult -> Bool
(MetricDataResult -> MetricDataResult -> Bool)
-> (MetricDataResult -> MetricDataResult -> Bool)
-> Eq MetricDataResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetricDataResult -> MetricDataResult -> Bool
$c/= :: MetricDataResult -> MetricDataResult -> Bool
== :: MetricDataResult -> MetricDataResult -> Bool
$c== :: MetricDataResult -> MetricDataResult -> Bool
Prelude.Eq, ReadPrec [MetricDataResult]
ReadPrec MetricDataResult
Int -> ReadS MetricDataResult
ReadS [MetricDataResult]
(Int -> ReadS MetricDataResult)
-> ReadS [MetricDataResult]
-> ReadPrec MetricDataResult
-> ReadPrec [MetricDataResult]
-> Read MetricDataResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MetricDataResult]
$creadListPrec :: ReadPrec [MetricDataResult]
readPrec :: ReadPrec MetricDataResult
$creadPrec :: ReadPrec MetricDataResult
readList :: ReadS [MetricDataResult]
$creadList :: ReadS [MetricDataResult]
readsPrec :: Int -> ReadS MetricDataResult
$creadsPrec :: Int -> ReadS MetricDataResult
Prelude.Read, Int -> MetricDataResult -> ShowS
[MetricDataResult] -> ShowS
MetricDataResult -> String
(Int -> MetricDataResult -> ShowS)
-> (MetricDataResult -> String)
-> ([MetricDataResult] -> ShowS)
-> Show MetricDataResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MetricDataResult] -> ShowS
$cshowList :: [MetricDataResult] -> ShowS
show :: MetricDataResult -> String
$cshow :: MetricDataResult -> String
showsPrec :: Int -> MetricDataResult -> ShowS
$cshowsPrec :: Int -> MetricDataResult -> ShowS
Prelude.Show, (forall x. MetricDataResult -> Rep MetricDataResult x)
-> (forall x. Rep MetricDataResult x -> MetricDataResult)
-> Generic MetricDataResult
forall x. Rep MetricDataResult x -> MetricDataResult
forall x. MetricDataResult -> Rep MetricDataResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MetricDataResult x -> MetricDataResult
$cfrom :: forall x. MetricDataResult -> Rep MetricDataResult x
Prelude.Generic)

-- |
-- Create a value of 'MetricDataResult' 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:
--
-- 'values', 'metricDataResult_values' - The data points for the metric corresponding to @Timestamps@. The number
-- of values always matches the number of timestamps and the timestamp for
-- Values[x] is Timestamps[x].
--
-- 'id', 'metricDataResult_id' - The short name you specified to represent this metric.
--
-- 'timestamps', 'metricDataResult_timestamps' - The timestamps for the data points, formatted in Unix timestamp format.
-- The number of timestamps always matches the number of values and the
-- value for Timestamps[x] is Values[x].
--
-- 'messages', 'metricDataResult_messages' - A list of messages with additional information about the data returned.
--
-- 'label', 'metricDataResult_label' - The human-readable label associated with the data.
--
-- 'statusCode', 'metricDataResult_statusCode' - The status of the returned data. @Complete@ indicates that all data
-- points in the requested time range were returned. @PartialData@ means
-- that an incomplete set of data points were returned. You can use the
-- @NextToken@ value that was returned and repeat your request to get more
-- data points. @NextToken@ is not returned if you are performing a math
-- expression. @InternalError@ indicates that an error occurred. Retry your
-- request using @NextToken@, if present.
newMetricDataResult ::
  MetricDataResult
newMetricDataResult :: MetricDataResult
newMetricDataResult =
  MetricDataResult' :: Maybe [Double]
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe [MessageData]
-> Maybe Text
-> Maybe StatusCode
-> MetricDataResult
MetricDataResult'
    { $sel:values:MetricDataResult' :: Maybe [Double]
values = Maybe [Double]
forall a. Maybe a
Prelude.Nothing,
      $sel:id:MetricDataResult' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timestamps:MetricDataResult' :: Maybe [ISO8601]
timestamps = Maybe [ISO8601]
forall a. Maybe a
Prelude.Nothing,
      $sel:messages:MetricDataResult' :: Maybe [MessageData]
messages = Maybe [MessageData]
forall a. Maybe a
Prelude.Nothing,
      $sel:label:MetricDataResult' :: Maybe Text
label = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:MetricDataResult' :: Maybe StatusCode
statusCode = Maybe StatusCode
forall a. Maybe a
Prelude.Nothing
    }

-- | The data points for the metric corresponding to @Timestamps@. The number
-- of values always matches the number of timestamps and the timestamp for
-- Values[x] is Timestamps[x].
metricDataResult_values :: Lens.Lens' MetricDataResult (Prelude.Maybe [Prelude.Double])
metricDataResult_values :: (Maybe [Double] -> f (Maybe [Double]))
-> MetricDataResult -> f MetricDataResult
metricDataResult_values = (MetricDataResult -> Maybe [Double])
-> (MetricDataResult -> Maybe [Double] -> MetricDataResult)
-> Lens
     MetricDataResult MetricDataResult (Maybe [Double]) (Maybe [Double])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataResult' {Maybe [Double]
values :: Maybe [Double]
$sel:values:MetricDataResult' :: MetricDataResult -> Maybe [Double]
values} -> Maybe [Double]
values) (\s :: MetricDataResult
s@MetricDataResult' {} Maybe [Double]
a -> MetricDataResult
s {$sel:values:MetricDataResult' :: Maybe [Double]
values = Maybe [Double]
a} :: MetricDataResult) ((Maybe [Double] -> f (Maybe [Double]))
 -> MetricDataResult -> f MetricDataResult)
-> ((Maybe [Double] -> f (Maybe [Double]))
    -> Maybe [Double] -> f (Maybe [Double]))
-> (Maybe [Double] -> f (Maybe [Double]))
-> MetricDataResult
-> f MetricDataResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Double] [Double] [Double] [Double]
-> Iso
     (Maybe [Double]) (Maybe [Double]) (Maybe [Double]) (Maybe [Double])
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 [Double] [Double] [Double] [Double]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The short name you specified to represent this metric.
metricDataResult_id :: Lens.Lens' MetricDataResult (Prelude.Maybe Prelude.Text)
metricDataResult_id :: (Maybe Text -> f (Maybe Text))
-> MetricDataResult -> f MetricDataResult
metricDataResult_id = (MetricDataResult -> Maybe Text)
-> (MetricDataResult -> Maybe Text -> MetricDataResult)
-> Lens MetricDataResult MetricDataResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataResult' {Maybe Text
id :: Maybe Text
$sel:id:MetricDataResult' :: MetricDataResult -> Maybe Text
id} -> Maybe Text
id) (\s :: MetricDataResult
s@MetricDataResult' {} Maybe Text
a -> MetricDataResult
s {$sel:id:MetricDataResult' :: Maybe Text
id = Maybe Text
a} :: MetricDataResult)

-- | The timestamps for the data points, formatted in Unix timestamp format.
-- The number of timestamps always matches the number of values and the
-- value for Timestamps[x] is Values[x].
metricDataResult_timestamps :: Lens.Lens' MetricDataResult (Prelude.Maybe [Prelude.UTCTime])
metricDataResult_timestamps :: (Maybe [UTCTime] -> f (Maybe [UTCTime]))
-> MetricDataResult -> f MetricDataResult
metricDataResult_timestamps = (MetricDataResult -> Maybe [ISO8601])
-> (MetricDataResult -> Maybe [ISO8601] -> MetricDataResult)
-> Lens
     MetricDataResult
     MetricDataResult
     (Maybe [ISO8601])
     (Maybe [ISO8601])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataResult' {Maybe [ISO8601]
timestamps :: Maybe [ISO8601]
$sel:timestamps:MetricDataResult' :: MetricDataResult -> Maybe [ISO8601]
timestamps} -> Maybe [ISO8601]
timestamps) (\s :: MetricDataResult
s@MetricDataResult' {} Maybe [ISO8601]
a -> MetricDataResult
s {$sel:timestamps:MetricDataResult' :: Maybe [ISO8601]
timestamps = Maybe [ISO8601]
a} :: MetricDataResult) ((Maybe [ISO8601] -> f (Maybe [ISO8601]))
 -> MetricDataResult -> f MetricDataResult)
-> ((Maybe [UTCTime] -> f (Maybe [UTCTime]))
    -> Maybe [ISO8601] -> f (Maybe [ISO8601]))
-> (Maybe [UTCTime] -> f (Maybe [UTCTime]))
-> MetricDataResult
-> f MetricDataResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ISO8601] [ISO8601] [UTCTime] [UTCTime]
-> Iso
     (Maybe [ISO8601])
     (Maybe [ISO8601])
     (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 [ISO8601] [ISO8601] [UTCTime] [UTCTime]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of messages with additional information about the data returned.
metricDataResult_messages :: Lens.Lens' MetricDataResult (Prelude.Maybe [MessageData])
metricDataResult_messages :: (Maybe [MessageData] -> f (Maybe [MessageData]))
-> MetricDataResult -> f MetricDataResult
metricDataResult_messages = (MetricDataResult -> Maybe [MessageData])
-> (MetricDataResult -> Maybe [MessageData] -> MetricDataResult)
-> Lens
     MetricDataResult
     MetricDataResult
     (Maybe [MessageData])
     (Maybe [MessageData])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataResult' {Maybe [MessageData]
messages :: Maybe [MessageData]
$sel:messages:MetricDataResult' :: MetricDataResult -> Maybe [MessageData]
messages} -> Maybe [MessageData]
messages) (\s :: MetricDataResult
s@MetricDataResult' {} Maybe [MessageData]
a -> MetricDataResult
s {$sel:messages:MetricDataResult' :: Maybe [MessageData]
messages = Maybe [MessageData]
a} :: MetricDataResult) ((Maybe [MessageData] -> f (Maybe [MessageData]))
 -> MetricDataResult -> f MetricDataResult)
-> ((Maybe [MessageData] -> f (Maybe [MessageData]))
    -> Maybe [MessageData] -> f (Maybe [MessageData]))
-> (Maybe [MessageData] -> f (Maybe [MessageData]))
-> MetricDataResult
-> f MetricDataResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MessageData] [MessageData] [MessageData] [MessageData]
-> Iso
     (Maybe [MessageData])
     (Maybe [MessageData])
     (Maybe [MessageData])
     (Maybe [MessageData])
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 [MessageData] [MessageData] [MessageData] [MessageData]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The human-readable label associated with the data.
metricDataResult_label :: Lens.Lens' MetricDataResult (Prelude.Maybe Prelude.Text)
metricDataResult_label :: (Maybe Text -> f (Maybe Text))
-> MetricDataResult -> f MetricDataResult
metricDataResult_label = (MetricDataResult -> Maybe Text)
-> (MetricDataResult -> Maybe Text -> MetricDataResult)
-> Lens MetricDataResult MetricDataResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataResult' {Maybe Text
label :: Maybe Text
$sel:label:MetricDataResult' :: MetricDataResult -> Maybe Text
label} -> Maybe Text
label) (\s :: MetricDataResult
s@MetricDataResult' {} Maybe Text
a -> MetricDataResult
s {$sel:label:MetricDataResult' :: Maybe Text
label = Maybe Text
a} :: MetricDataResult)

-- | The status of the returned data. @Complete@ indicates that all data
-- points in the requested time range were returned. @PartialData@ means
-- that an incomplete set of data points were returned. You can use the
-- @NextToken@ value that was returned and repeat your request to get more
-- data points. @NextToken@ is not returned if you are performing a math
-- expression. @InternalError@ indicates that an error occurred. Retry your
-- request using @NextToken@, if present.
metricDataResult_statusCode :: Lens.Lens' MetricDataResult (Prelude.Maybe StatusCode)
metricDataResult_statusCode :: (Maybe StatusCode -> f (Maybe StatusCode))
-> MetricDataResult -> f MetricDataResult
metricDataResult_statusCode = (MetricDataResult -> Maybe StatusCode)
-> (MetricDataResult -> Maybe StatusCode -> MetricDataResult)
-> Lens
     MetricDataResult
     MetricDataResult
     (Maybe StatusCode)
     (Maybe StatusCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetricDataResult' {Maybe StatusCode
statusCode :: Maybe StatusCode
$sel:statusCode:MetricDataResult' :: MetricDataResult -> Maybe StatusCode
statusCode} -> Maybe StatusCode
statusCode) (\s :: MetricDataResult
s@MetricDataResult' {} Maybe StatusCode
a -> MetricDataResult
s {$sel:statusCode:MetricDataResult' :: Maybe StatusCode
statusCode = Maybe StatusCode
a} :: MetricDataResult)

instance Core.FromXML MetricDataResult where
  parseXML :: [Node] -> Either String MetricDataResult
parseXML [Node]
x =
    Maybe [Double]
-> Maybe Text
-> Maybe [ISO8601]
-> Maybe [MessageData]
-> Maybe Text
-> Maybe StatusCode
-> MetricDataResult
MetricDataResult'
      (Maybe [Double]
 -> Maybe Text
 -> Maybe [ISO8601]
 -> Maybe [MessageData]
 -> Maybe Text
 -> Maybe StatusCode
 -> MetricDataResult)
-> Either String (Maybe [Double])
-> Either
     String
     (Maybe Text
      -> Maybe [ISO8601]
      -> Maybe [MessageData]
      -> Maybe Text
      -> Maybe StatusCode
      -> MetricDataResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Values" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Double]))
-> Either String (Maybe [Double])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Double])
-> [Node] -> Either String (Maybe [Double])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Double]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe [ISO8601]
   -> Maybe [MessageData]
   -> Maybe Text
   -> Maybe StatusCode
   -> MetricDataResult)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ISO8601]
      -> Maybe [MessageData]
      -> Maybe Text
      -> Maybe StatusCode
      -> MetricDataResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Id")
      Either
  String
  (Maybe [ISO8601]
   -> Maybe [MessageData]
   -> Maybe Text
   -> Maybe StatusCode
   -> MetricDataResult)
-> Either String (Maybe [ISO8601])
-> Either
     String
     (Maybe [MessageData]
      -> Maybe Text -> Maybe StatusCode -> MetricDataResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Timestamps" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [ISO8601]))
-> Either String (Maybe [ISO8601])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ISO8601])
-> [Node] -> Either String (Maybe [ISO8601])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ISO8601]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe [MessageData]
   -> Maybe Text -> Maybe StatusCode -> MetricDataResult)
-> Either String (Maybe [MessageData])
-> Either
     String (Maybe Text -> Maybe StatusCode -> MetricDataResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Messages" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [MessageData]))
-> Either String (Maybe [MessageData])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [MessageData])
-> [Node] -> Either String (Maybe [MessageData])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [MessageData]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either String (Maybe Text -> Maybe StatusCode -> MetricDataResult)
-> Either String (Maybe Text)
-> Either String (Maybe StatusCode -> MetricDataResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Label")
      Either String (Maybe StatusCode -> MetricDataResult)
-> Either String (Maybe StatusCode)
-> Either String MetricDataResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe StatusCode)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StatusCode")

instance Prelude.Hashable MetricDataResult

instance Prelude.NFData MetricDataResult