{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.Pi.GetResourceMetrics
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieve Performance Insights metrics for a set of data sources over a
-- time period. You can provide specific dimension groups and dimensions,
-- and provide aggregation and filtering criteria for each group.
--
-- Each response element returns a maximum of 500 bytes. For larger
-- elements, such as SQL statements, only the first 500 bytes are returned.
module Amazonka.Pi.GetResourceMetrics
  ( -- * Creating a Request
    GetResourceMetrics (..),
    newGetResourceMetrics,

    -- * Request Lenses
    getResourceMetrics_maxResults,
    getResourceMetrics_nextToken,
    getResourceMetrics_periodInSeconds,
    getResourceMetrics_serviceType,
    getResourceMetrics_identifier,
    getResourceMetrics_metricQueries,
    getResourceMetrics_startTime,
    getResourceMetrics_endTime,

    -- * Destructuring the Response
    GetResourceMetricsResponse (..),
    newGetResourceMetricsResponse,

    -- * Response Lenses
    getResourceMetricsResponse_alignedEndTime,
    getResourceMetricsResponse_alignedStartTime,
    getResourceMetricsResponse_identifier,
    getResourceMetricsResponse_metricList,
    getResourceMetricsResponse_nextToken,
    getResourceMetricsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pi.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetResourceMetrics' smart constructor.
data GetResourceMetrics = GetResourceMetrics'
  { -- | The maximum number of items to return in the response. If more items
    -- exist than the specified @MaxRecords@ value, a pagination token is
    -- included in the response so that the remaining results can be retrieved.
    GetResourceMetrics -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- token, up to the value specified by @MaxRecords@.
    GetResourceMetrics -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The granularity, in seconds, of the data points returned from
    -- Performance Insights. A period can be as short as one second, or as long
    -- as one day (86400 seconds). Valid values are:
    --
    -- -   @1@ (one second)
    --
    -- -   @60@ (one minute)
    --
    -- -   @300@ (five minutes)
    --
    -- -   @3600@ (one hour)
    --
    -- -   @86400@ (twenty-four hours)
    --
    -- If you don\'t specify @PeriodInSeconds@, then Performance Insights will
    -- choose a value for you, with a goal of returning roughly 100-200 data
    -- points in the response.
    GetResourceMetrics -> Maybe Int
periodInSeconds :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Web Services service for which Performance Insights returns
    -- metrics. Valid values are as follows:
    --
    -- -   @RDS@
    --
    -- -   @DOCDB@
    GetResourceMetrics -> ServiceType
serviceType :: ServiceType,
    -- | An immutable identifier for a data source that is unique for an Amazon
    -- Web Services Region. Performance Insights gathers metrics from this data
    -- source. In the console, the identifier is shown as /ResourceID/. When
    -- you call @DescribeDBInstances@, the identifier is returned as
    -- @DbiResourceId@.
    --
    -- To use a DB instance as a data source, specify its @DbiResourceId@
    -- value. For example, specify @db-ABCDEFGHIJKLMNOPQRSTU1VW2X@.
    GetResourceMetrics -> Text
identifier :: Prelude.Text,
    -- | An array of one or more queries to perform. Each query must specify a
    -- Performance Insights metric, and can optionally specify aggregation and
    -- filtering criteria.
    GetResourceMetrics -> NonEmpty MetricQuery
metricQueries :: Prelude.NonEmpty MetricQuery,
    -- | The date and time specifying the beginning of the requested time series
    -- query range. You can\'t specify a @StartTime@ that is earlier than 7
    -- days ago. By default, Performance Insights has 7 days of retention, but
    -- you can extend this range up to 2 years. The value specified is
    -- /inclusive/. Thus, the command returns data points equal to or greater
    -- than @StartTime@.
    --
    -- The value for @StartTime@ must be earlier than the value for @EndTime@.
    GetResourceMetrics -> POSIX
startTime :: Data.POSIX,
    -- | The date and time specifying the end of the requested time series query
    -- range. The value specified is /exclusive/. Thus, the command returns
    -- data points less than (but not equal to) @EndTime@.
    --
    -- The value for @EndTime@ must be later than the value for @StartTime@.
    GetResourceMetrics -> POSIX
endTime :: Data.POSIX
  }
  deriving (GetResourceMetrics -> GetResourceMetrics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceMetrics -> GetResourceMetrics -> Bool
$c/= :: GetResourceMetrics -> GetResourceMetrics -> Bool
== :: GetResourceMetrics -> GetResourceMetrics -> Bool
$c== :: GetResourceMetrics -> GetResourceMetrics -> Bool
Prelude.Eq, ReadPrec [GetResourceMetrics]
ReadPrec GetResourceMetrics
Int -> ReadS GetResourceMetrics
ReadS [GetResourceMetrics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourceMetrics]
$creadListPrec :: ReadPrec [GetResourceMetrics]
readPrec :: ReadPrec GetResourceMetrics
$creadPrec :: ReadPrec GetResourceMetrics
readList :: ReadS [GetResourceMetrics]
$creadList :: ReadS [GetResourceMetrics]
readsPrec :: Int -> ReadS GetResourceMetrics
$creadsPrec :: Int -> ReadS GetResourceMetrics
Prelude.Read, Int -> GetResourceMetrics -> ShowS
[GetResourceMetrics] -> ShowS
GetResourceMetrics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceMetrics] -> ShowS
$cshowList :: [GetResourceMetrics] -> ShowS
show :: GetResourceMetrics -> String
$cshow :: GetResourceMetrics -> String
showsPrec :: Int -> GetResourceMetrics -> ShowS
$cshowsPrec :: Int -> GetResourceMetrics -> ShowS
Prelude.Show, forall x. Rep GetResourceMetrics x -> GetResourceMetrics
forall x. GetResourceMetrics -> Rep GetResourceMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResourceMetrics x -> GetResourceMetrics
$cfrom :: forall x. GetResourceMetrics -> Rep GetResourceMetrics x
Prelude.Generic)

-- |
-- Create a value of 'GetResourceMetrics' 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:
--
-- 'maxResults', 'getResourceMetrics_maxResults' - The maximum number of items to return in the response. If more items
-- exist than the specified @MaxRecords@ value, a pagination token is
-- included in the response so that the remaining results can be retrieved.
--
-- 'nextToken', 'getResourceMetrics_nextToken' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- token, up to the value specified by @MaxRecords@.
--
-- 'periodInSeconds', 'getResourceMetrics_periodInSeconds' - The granularity, in seconds, of the data points returned from
-- Performance Insights. A period can be as short as one second, or as long
-- as one day (86400 seconds). Valid values are:
--
-- -   @1@ (one second)
--
-- -   @60@ (one minute)
--
-- -   @300@ (five minutes)
--
-- -   @3600@ (one hour)
--
-- -   @86400@ (twenty-four hours)
--
-- If you don\'t specify @PeriodInSeconds@, then Performance Insights will
-- choose a value for you, with a goal of returning roughly 100-200 data
-- points in the response.
--
-- 'serviceType', 'getResourceMetrics_serviceType' - The Amazon Web Services service for which Performance Insights returns
-- metrics. Valid values are as follows:
--
-- -   @RDS@
--
-- -   @DOCDB@
--
-- 'identifier', 'getResourceMetrics_identifier' - An immutable identifier for a data source that is unique for an Amazon
-- Web Services Region. Performance Insights gathers metrics from this data
-- source. In the console, the identifier is shown as /ResourceID/. When
-- you call @DescribeDBInstances@, the identifier is returned as
-- @DbiResourceId@.
--
-- To use a DB instance as a data source, specify its @DbiResourceId@
-- value. For example, specify @db-ABCDEFGHIJKLMNOPQRSTU1VW2X@.
--
-- 'metricQueries', 'getResourceMetrics_metricQueries' - An array of one or more queries to perform. Each query must specify a
-- Performance Insights metric, and can optionally specify aggregation and
-- filtering criteria.
--
-- 'startTime', 'getResourceMetrics_startTime' - The date and time specifying the beginning of the requested time series
-- query range. You can\'t specify a @StartTime@ that is earlier than 7
-- days ago. By default, Performance Insights has 7 days of retention, but
-- you can extend this range up to 2 years. The value specified is
-- /inclusive/. Thus, the command returns data points equal to or greater
-- than @StartTime@.
--
-- The value for @StartTime@ must be earlier than the value for @EndTime@.
--
-- 'endTime', 'getResourceMetrics_endTime' - The date and time specifying the end of the requested time series query
-- range. The value specified is /exclusive/. Thus, the command returns
-- data points less than (but not equal to) @EndTime@.
--
-- The value for @EndTime@ must be later than the value for @StartTime@.
newGetResourceMetrics ::
  -- | 'serviceType'
  ServiceType ->
  -- | 'identifier'
  Prelude.Text ->
  -- | 'metricQueries'
  Prelude.NonEmpty MetricQuery ->
  -- | 'startTime'
  Prelude.UTCTime ->
  -- | 'endTime'
  Prelude.UTCTime ->
  GetResourceMetrics
newGetResourceMetrics :: ServiceType
-> Text
-> NonEmpty MetricQuery
-> UTCTime
-> UTCTime
-> GetResourceMetrics
newGetResourceMetrics
  ServiceType
pServiceType_
  Text
pIdentifier_
  NonEmpty MetricQuery
pMetricQueries_
  UTCTime
pStartTime_
  UTCTime
pEndTime_ =
    GetResourceMetrics'
      { $sel:maxResults:GetResourceMetrics' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetResourceMetrics' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:periodInSeconds:GetResourceMetrics' :: Maybe Int
periodInSeconds = forall a. Maybe a
Prelude.Nothing,
        $sel:serviceType:GetResourceMetrics' :: ServiceType
serviceType = ServiceType
pServiceType_,
        $sel:identifier:GetResourceMetrics' :: Text
identifier = Text
pIdentifier_,
        $sel:metricQueries:GetResourceMetrics' :: NonEmpty MetricQuery
metricQueries = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty MetricQuery
pMetricQueries_,
        $sel:startTime:GetResourceMetrics' :: POSIX
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
        $sel:endTime:GetResourceMetrics' :: POSIX
endTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_
      }

-- | The maximum number of items to return in the response. If more items
-- exist than the specified @MaxRecords@ value, a pagination token is
-- included in the response so that the remaining results can be retrieved.
getResourceMetrics_maxResults :: Lens.Lens' GetResourceMetrics (Prelude.Maybe Prelude.Natural)
getResourceMetrics_maxResults :: Lens' GetResourceMetrics (Maybe Natural)
getResourceMetrics_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetResourceMetrics' :: GetResourceMetrics -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} Maybe Natural
a -> GetResourceMetrics
s {$sel:maxResults:GetResourceMetrics' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetResourceMetrics)

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- token, up to the value specified by @MaxRecords@.
getResourceMetrics_nextToken :: Lens.Lens' GetResourceMetrics (Prelude.Maybe Prelude.Text)
getResourceMetrics_nextToken :: Lens' GetResourceMetrics (Maybe Text)
getResourceMetrics_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourceMetrics' :: GetResourceMetrics -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} Maybe Text
a -> GetResourceMetrics
s {$sel:nextToken:GetResourceMetrics' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourceMetrics)

-- | The granularity, in seconds, of the data points returned from
-- Performance Insights. A period can be as short as one second, or as long
-- as one day (86400 seconds). Valid values are:
--
-- -   @1@ (one second)
--
-- -   @60@ (one minute)
--
-- -   @300@ (five minutes)
--
-- -   @3600@ (one hour)
--
-- -   @86400@ (twenty-four hours)
--
-- If you don\'t specify @PeriodInSeconds@, then Performance Insights will
-- choose a value for you, with a goal of returning roughly 100-200 data
-- points in the response.
getResourceMetrics_periodInSeconds :: Lens.Lens' GetResourceMetrics (Prelude.Maybe Prelude.Int)
getResourceMetrics_periodInSeconds :: Lens' GetResourceMetrics (Maybe Int)
getResourceMetrics_periodInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {Maybe Int
periodInSeconds :: Maybe Int
$sel:periodInSeconds:GetResourceMetrics' :: GetResourceMetrics -> Maybe Int
periodInSeconds} -> Maybe Int
periodInSeconds) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} Maybe Int
a -> GetResourceMetrics
s {$sel:periodInSeconds:GetResourceMetrics' :: Maybe Int
periodInSeconds = Maybe Int
a} :: GetResourceMetrics)

-- | The Amazon Web Services service for which Performance Insights returns
-- metrics. Valid values are as follows:
--
-- -   @RDS@
--
-- -   @DOCDB@
getResourceMetrics_serviceType :: Lens.Lens' GetResourceMetrics ServiceType
getResourceMetrics_serviceType :: Lens' GetResourceMetrics ServiceType
getResourceMetrics_serviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {ServiceType
serviceType :: ServiceType
$sel:serviceType:GetResourceMetrics' :: GetResourceMetrics -> ServiceType
serviceType} -> ServiceType
serviceType) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} ServiceType
a -> GetResourceMetrics
s {$sel:serviceType:GetResourceMetrics' :: ServiceType
serviceType = ServiceType
a} :: GetResourceMetrics)

-- | An immutable identifier for a data source that is unique for an Amazon
-- Web Services Region. Performance Insights gathers metrics from this data
-- source. In the console, the identifier is shown as /ResourceID/. When
-- you call @DescribeDBInstances@, the identifier is returned as
-- @DbiResourceId@.
--
-- To use a DB instance as a data source, specify its @DbiResourceId@
-- value. For example, specify @db-ABCDEFGHIJKLMNOPQRSTU1VW2X@.
getResourceMetrics_identifier :: Lens.Lens' GetResourceMetrics Prelude.Text
getResourceMetrics_identifier :: Lens' GetResourceMetrics Text
getResourceMetrics_identifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {Text
identifier :: Text
$sel:identifier:GetResourceMetrics' :: GetResourceMetrics -> Text
identifier} -> Text
identifier) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} Text
a -> GetResourceMetrics
s {$sel:identifier:GetResourceMetrics' :: Text
identifier = Text
a} :: GetResourceMetrics)

-- | An array of one or more queries to perform. Each query must specify a
-- Performance Insights metric, and can optionally specify aggregation and
-- filtering criteria.
getResourceMetrics_metricQueries :: Lens.Lens' GetResourceMetrics (Prelude.NonEmpty MetricQuery)
getResourceMetrics_metricQueries :: Lens' GetResourceMetrics (NonEmpty MetricQuery)
getResourceMetrics_metricQueries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {NonEmpty MetricQuery
metricQueries :: NonEmpty MetricQuery
$sel:metricQueries:GetResourceMetrics' :: GetResourceMetrics -> NonEmpty MetricQuery
metricQueries} -> NonEmpty MetricQuery
metricQueries) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} NonEmpty MetricQuery
a -> GetResourceMetrics
s {$sel:metricQueries:GetResourceMetrics' :: NonEmpty MetricQuery
metricQueries = NonEmpty MetricQuery
a} :: GetResourceMetrics) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date and time specifying the beginning of the requested time series
-- query range. You can\'t specify a @StartTime@ that is earlier than 7
-- days ago. By default, Performance Insights has 7 days of retention, but
-- you can extend this range up to 2 years. The value specified is
-- /inclusive/. Thus, the command returns data points equal to or greater
-- than @StartTime@.
--
-- The value for @StartTime@ must be earlier than the value for @EndTime@.
getResourceMetrics_startTime :: Lens.Lens' GetResourceMetrics Prelude.UTCTime
getResourceMetrics_startTime :: Lens' GetResourceMetrics UTCTime
getResourceMetrics_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {POSIX
startTime :: POSIX
$sel:startTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
startTime} -> POSIX
startTime) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} POSIX
a -> GetResourceMetrics
s {$sel:startTime:GetResourceMetrics' :: POSIX
startTime = POSIX
a} :: GetResourceMetrics) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date and time specifying the end of the requested time series query
-- range. The value specified is /exclusive/. Thus, the command returns
-- data points less than (but not equal to) @EndTime@.
--
-- The value for @EndTime@ must be later than the value for @StartTime@.
getResourceMetrics_endTime :: Lens.Lens' GetResourceMetrics Prelude.UTCTime
getResourceMetrics_endTime :: Lens' GetResourceMetrics UTCTime
getResourceMetrics_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetrics' {POSIX
endTime :: POSIX
$sel:endTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
endTime} -> POSIX
endTime) (\s :: GetResourceMetrics
s@GetResourceMetrics' {} POSIX
a -> GetResourceMetrics
s {$sel:endTime:GetResourceMetrics' :: POSIX
endTime = POSIX
a} :: GetResourceMetrics) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Core.AWSRequest GetResourceMetrics where
  type
    AWSResponse GetResourceMetrics =
      GetResourceMetricsResponse
  request :: (Service -> Service)
-> GetResourceMetrics -> Request GetResourceMetrics
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetResourceMetrics
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetResourceMetrics)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe [MetricKeyDataPoints]
-> Maybe Text
-> Int
-> GetResourceMetricsResponse
GetResourceMetricsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AlignedEndTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AlignedStartTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Identifier")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MetricList" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetResourceMetrics where
  hashWithSalt :: Int -> GetResourceMetrics -> Int
hashWithSalt Int
_salt GetResourceMetrics' {Maybe Int
Maybe Natural
Maybe Text
NonEmpty MetricQuery
Text
POSIX
ServiceType
endTime :: POSIX
startTime :: POSIX
metricQueries :: NonEmpty MetricQuery
identifier :: Text
serviceType :: ServiceType
periodInSeconds :: Maybe Int
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:endTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
$sel:startTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
$sel:metricQueries:GetResourceMetrics' :: GetResourceMetrics -> NonEmpty MetricQuery
$sel:identifier:GetResourceMetrics' :: GetResourceMetrics -> Text
$sel:serviceType:GetResourceMetrics' :: GetResourceMetrics -> ServiceType
$sel:periodInSeconds:GetResourceMetrics' :: GetResourceMetrics -> Maybe Int
$sel:nextToken:GetResourceMetrics' :: GetResourceMetrics -> Maybe Text
$sel:maxResults:GetResourceMetrics' :: GetResourceMetrics -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
periodInSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ServiceType
serviceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
identifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty MetricQuery
metricQueries
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
endTime

instance Prelude.NFData GetResourceMetrics where
  rnf :: GetResourceMetrics -> ()
rnf GetResourceMetrics' {Maybe Int
Maybe Natural
Maybe Text
NonEmpty MetricQuery
Text
POSIX
ServiceType
endTime :: POSIX
startTime :: POSIX
metricQueries :: NonEmpty MetricQuery
identifier :: Text
serviceType :: ServiceType
periodInSeconds :: Maybe Int
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:endTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
$sel:startTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
$sel:metricQueries:GetResourceMetrics' :: GetResourceMetrics -> NonEmpty MetricQuery
$sel:identifier:GetResourceMetrics' :: GetResourceMetrics -> Text
$sel:serviceType:GetResourceMetrics' :: GetResourceMetrics -> ServiceType
$sel:periodInSeconds:GetResourceMetrics' :: GetResourceMetrics -> Maybe Int
$sel:nextToken:GetResourceMetrics' :: GetResourceMetrics -> Maybe Text
$sel:maxResults:GetResourceMetrics' :: GetResourceMetrics -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
periodInSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ServiceType
serviceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
identifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty MetricQuery
metricQueries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
endTime

instance Data.ToHeaders GetResourceMetrics where
  toHeaders :: GetResourceMetrics -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"PerformanceInsightsv20180227.GetResourceMetrics" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON GetResourceMetrics where
  toJSON :: GetResourceMetrics -> Value
toJSON GetResourceMetrics' {Maybe Int
Maybe Natural
Maybe Text
NonEmpty MetricQuery
Text
POSIX
ServiceType
endTime :: POSIX
startTime :: POSIX
metricQueries :: NonEmpty MetricQuery
identifier :: Text
serviceType :: ServiceType
periodInSeconds :: Maybe Int
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:endTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
$sel:startTime:GetResourceMetrics' :: GetResourceMetrics -> POSIX
$sel:metricQueries:GetResourceMetrics' :: GetResourceMetrics -> NonEmpty MetricQuery
$sel:identifier:GetResourceMetrics' :: GetResourceMetrics -> Text
$sel:serviceType:GetResourceMetrics' :: GetResourceMetrics -> ServiceType
$sel:periodInSeconds:GetResourceMetrics' :: GetResourceMetrics -> Maybe Int
$sel:nextToken:GetResourceMetrics' :: GetResourceMetrics -> Maybe Text
$sel:maxResults:GetResourceMetrics' :: GetResourceMetrics -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"PeriodInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
periodInSeconds,
            forall a. a -> Maybe a
Prelude.Just (Key
"ServiceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ServiceType
serviceType),
            forall a. a -> Maybe a
Prelude.Just (Key
"Identifier" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
identifier),
            forall a. a -> Maybe a
Prelude.Just (Key
"MetricQueries" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty MetricQuery
metricQueries),
            forall a. a -> Maybe a
Prelude.Just (Key
"StartTime" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= POSIX
startTime),
            forall a. a -> Maybe a
Prelude.Just (Key
"EndTime" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= POSIX
endTime)
          ]
      )

instance Data.ToPath GetResourceMetrics where
  toPath :: GetResourceMetrics -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery GetResourceMetrics where
  toQuery :: GetResourceMetrics -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetResourceMetricsResponse' smart constructor.
data GetResourceMetricsResponse = GetResourceMetricsResponse'
  { -- | The end time for the returned metrics, after alignment to a granular
    -- boundary (as specified by @PeriodInSeconds@). @AlignedEndTime@ will be
    -- greater than or equal to the value of the user-specified @Endtime@.
    GetResourceMetricsResponse -> Maybe POSIX
alignedEndTime :: Prelude.Maybe Data.POSIX,
    -- | The start time for the returned metrics, after alignment to a granular
    -- boundary (as specified by @PeriodInSeconds@). @AlignedStartTime@ will be
    -- less than or equal to the value of the user-specified @StartTime@.
    GetResourceMetricsResponse -> Maybe POSIX
alignedStartTime :: Prelude.Maybe Data.POSIX,
    -- | An immutable identifier for a data source that is unique for an Amazon
    -- Web Services Region. Performance Insights gathers metrics from this data
    -- source. In the console, the identifier is shown as /ResourceID/. When
    -- you call @DescribeDBInstances@, the identifier is returned as
    -- @DbiResourceId@.
    GetResourceMetricsResponse -> Maybe Text
identifier :: Prelude.Maybe Prelude.Text,
    -- | An array of metric results, where each array element contains all of the
    -- data points for a particular dimension.
    GetResourceMetricsResponse -> Maybe [MetricKeyDataPoints]
metricList :: Prelude.Maybe [MetricKeyDataPoints],
    -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- token, up to the value specified by @MaxRecords@.
    GetResourceMetricsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetResourceMetricsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetResourceMetricsResponse -> GetResourceMetricsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResourceMetricsResponse -> GetResourceMetricsResponse -> Bool
$c/= :: GetResourceMetricsResponse -> GetResourceMetricsResponse -> Bool
== :: GetResourceMetricsResponse -> GetResourceMetricsResponse -> Bool
$c== :: GetResourceMetricsResponse -> GetResourceMetricsResponse -> Bool
Prelude.Eq, ReadPrec [GetResourceMetricsResponse]
ReadPrec GetResourceMetricsResponse
Int -> ReadS GetResourceMetricsResponse
ReadS [GetResourceMetricsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResourceMetricsResponse]
$creadListPrec :: ReadPrec [GetResourceMetricsResponse]
readPrec :: ReadPrec GetResourceMetricsResponse
$creadPrec :: ReadPrec GetResourceMetricsResponse
readList :: ReadS [GetResourceMetricsResponse]
$creadList :: ReadS [GetResourceMetricsResponse]
readsPrec :: Int -> ReadS GetResourceMetricsResponse
$creadsPrec :: Int -> ReadS GetResourceMetricsResponse
Prelude.Read, Int -> GetResourceMetricsResponse -> ShowS
[GetResourceMetricsResponse] -> ShowS
GetResourceMetricsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResourceMetricsResponse] -> ShowS
$cshowList :: [GetResourceMetricsResponse] -> ShowS
show :: GetResourceMetricsResponse -> String
$cshow :: GetResourceMetricsResponse -> String
showsPrec :: Int -> GetResourceMetricsResponse -> ShowS
$cshowsPrec :: Int -> GetResourceMetricsResponse -> ShowS
Prelude.Show, forall x.
Rep GetResourceMetricsResponse x -> GetResourceMetricsResponse
forall x.
GetResourceMetricsResponse -> Rep GetResourceMetricsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResourceMetricsResponse x -> GetResourceMetricsResponse
$cfrom :: forall x.
GetResourceMetricsResponse -> Rep GetResourceMetricsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetResourceMetricsResponse' 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:
--
-- 'alignedEndTime', 'getResourceMetricsResponse_alignedEndTime' - The end time for the returned metrics, after alignment to a granular
-- boundary (as specified by @PeriodInSeconds@). @AlignedEndTime@ will be
-- greater than or equal to the value of the user-specified @Endtime@.
--
-- 'alignedStartTime', 'getResourceMetricsResponse_alignedStartTime' - The start time for the returned metrics, after alignment to a granular
-- boundary (as specified by @PeriodInSeconds@). @AlignedStartTime@ will be
-- less than or equal to the value of the user-specified @StartTime@.
--
-- 'identifier', 'getResourceMetricsResponse_identifier' - An immutable identifier for a data source that is unique for an Amazon
-- Web Services Region. Performance Insights gathers metrics from this data
-- source. In the console, the identifier is shown as /ResourceID/. When
-- you call @DescribeDBInstances@, the identifier is returned as
-- @DbiResourceId@.
--
-- 'metricList', 'getResourceMetricsResponse_metricList' - An array of metric results, where each array element contains all of the
-- data points for a particular dimension.
--
-- 'nextToken', 'getResourceMetricsResponse_nextToken' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- token, up to the value specified by @MaxRecords@.
--
-- 'httpStatus', 'getResourceMetricsResponse_httpStatus' - The response's http status code.
newGetResourceMetricsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetResourceMetricsResponse
newGetResourceMetricsResponse :: Int -> GetResourceMetricsResponse
newGetResourceMetricsResponse Int
pHttpStatus_ =
  GetResourceMetricsResponse'
    { $sel:alignedEndTime:GetResourceMetricsResponse' :: Maybe POSIX
alignedEndTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:alignedStartTime:GetResourceMetricsResponse' :: Maybe POSIX
alignedStartTime = forall a. Maybe a
Prelude.Nothing,
      $sel:identifier:GetResourceMetricsResponse' :: Maybe Text
identifier = forall a. Maybe a
Prelude.Nothing,
      $sel:metricList:GetResourceMetricsResponse' :: Maybe [MetricKeyDataPoints]
metricList = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetResourceMetricsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetResourceMetricsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The end time for the returned metrics, after alignment to a granular
-- boundary (as specified by @PeriodInSeconds@). @AlignedEndTime@ will be
-- greater than or equal to the value of the user-specified @Endtime@.
getResourceMetricsResponse_alignedEndTime :: Lens.Lens' GetResourceMetricsResponse (Prelude.Maybe Prelude.UTCTime)
getResourceMetricsResponse_alignedEndTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime)
getResourceMetricsResponse_alignedEndTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetricsResponse' {Maybe POSIX
alignedEndTime :: Maybe POSIX
$sel:alignedEndTime:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe POSIX
alignedEndTime} -> Maybe POSIX
alignedEndTime) (\s :: GetResourceMetricsResponse
s@GetResourceMetricsResponse' {} Maybe POSIX
a -> GetResourceMetricsResponse
s {$sel:alignedEndTime:GetResourceMetricsResponse' :: Maybe POSIX
alignedEndTime = Maybe POSIX
a} :: GetResourceMetricsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The start time for the returned metrics, after alignment to a granular
-- boundary (as specified by @PeriodInSeconds@). @AlignedStartTime@ will be
-- less than or equal to the value of the user-specified @StartTime@.
getResourceMetricsResponse_alignedStartTime :: Lens.Lens' GetResourceMetricsResponse (Prelude.Maybe Prelude.UTCTime)
getResourceMetricsResponse_alignedStartTime :: Lens' GetResourceMetricsResponse (Maybe UTCTime)
getResourceMetricsResponse_alignedStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetricsResponse' {Maybe POSIX
alignedStartTime :: Maybe POSIX
$sel:alignedStartTime:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe POSIX
alignedStartTime} -> Maybe POSIX
alignedStartTime) (\s :: GetResourceMetricsResponse
s@GetResourceMetricsResponse' {} Maybe POSIX
a -> GetResourceMetricsResponse
s {$sel:alignedStartTime:GetResourceMetricsResponse' :: Maybe POSIX
alignedStartTime = Maybe POSIX
a} :: GetResourceMetricsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | An immutable identifier for a data source that is unique for an Amazon
-- Web Services Region. Performance Insights gathers metrics from this data
-- source. In the console, the identifier is shown as /ResourceID/. When
-- you call @DescribeDBInstances@, the identifier is returned as
-- @DbiResourceId@.
getResourceMetricsResponse_identifier :: Lens.Lens' GetResourceMetricsResponse (Prelude.Maybe Prelude.Text)
getResourceMetricsResponse_identifier :: Lens' GetResourceMetricsResponse (Maybe Text)
getResourceMetricsResponse_identifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetricsResponse' {Maybe Text
identifier :: Maybe Text
$sel:identifier:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe Text
identifier} -> Maybe Text
identifier) (\s :: GetResourceMetricsResponse
s@GetResourceMetricsResponse' {} Maybe Text
a -> GetResourceMetricsResponse
s {$sel:identifier:GetResourceMetricsResponse' :: Maybe Text
identifier = Maybe Text
a} :: GetResourceMetricsResponse)

-- | An array of metric results, where each array element contains all of the
-- data points for a particular dimension.
getResourceMetricsResponse_metricList :: Lens.Lens' GetResourceMetricsResponse (Prelude.Maybe [MetricKeyDataPoints])
getResourceMetricsResponse_metricList :: Lens' GetResourceMetricsResponse (Maybe [MetricKeyDataPoints])
getResourceMetricsResponse_metricList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetricsResponse' {Maybe [MetricKeyDataPoints]
metricList :: Maybe [MetricKeyDataPoints]
$sel:metricList:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe [MetricKeyDataPoints]
metricList} -> Maybe [MetricKeyDataPoints]
metricList) (\s :: GetResourceMetricsResponse
s@GetResourceMetricsResponse' {} Maybe [MetricKeyDataPoints]
a -> GetResourceMetricsResponse
s {$sel:metricList:GetResourceMetricsResponse' :: Maybe [MetricKeyDataPoints]
metricList = Maybe [MetricKeyDataPoints]
a} :: GetResourceMetricsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- token, up to the value specified by @MaxRecords@.
getResourceMetricsResponse_nextToken :: Lens.Lens' GetResourceMetricsResponse (Prelude.Maybe Prelude.Text)
getResourceMetricsResponse_nextToken :: Lens' GetResourceMetricsResponse (Maybe Text)
getResourceMetricsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetricsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetResourceMetricsResponse
s@GetResourceMetricsResponse' {} Maybe Text
a -> GetResourceMetricsResponse
s {$sel:nextToken:GetResourceMetricsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetResourceMetricsResponse)

-- | The response's http status code.
getResourceMetricsResponse_httpStatus :: Lens.Lens' GetResourceMetricsResponse Prelude.Int
getResourceMetricsResponse_httpStatus :: Lens' GetResourceMetricsResponse Int
getResourceMetricsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResourceMetricsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetResourceMetricsResponse
s@GetResourceMetricsResponse' {} Int
a -> GetResourceMetricsResponse
s {$sel:httpStatus:GetResourceMetricsResponse' :: Int
httpStatus = Int
a} :: GetResourceMetricsResponse)

instance Prelude.NFData GetResourceMetricsResponse where
  rnf :: GetResourceMetricsResponse -> ()
rnf GetResourceMetricsResponse' {Int
Maybe [MetricKeyDataPoints]
Maybe Text
Maybe POSIX
httpStatus :: Int
nextToken :: Maybe Text
metricList :: Maybe [MetricKeyDataPoints]
identifier :: Maybe Text
alignedStartTime :: Maybe POSIX
alignedEndTime :: Maybe POSIX
$sel:httpStatus:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Int
$sel:nextToken:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe Text
$sel:metricList:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe [MetricKeyDataPoints]
$sel:identifier:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe Text
$sel:alignedStartTime:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe POSIX
$sel:alignedEndTime:GetResourceMetricsResponse' :: GetResourceMetricsResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
alignedEndTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
alignedStartTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
identifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MetricKeyDataPoints]
metricList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus