{-# 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.CodeGuruProfiler.BatchGetFrameMetricData
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the time series of values for a requested list of frame metrics
-- from a time period.
module Amazonka.CodeGuruProfiler.BatchGetFrameMetricData
  ( -- * Creating a Request
    BatchGetFrameMetricData (..),
    newBatchGetFrameMetricData,

    -- * Request Lenses
    batchGetFrameMetricData_endTime,
    batchGetFrameMetricData_frameMetrics,
    batchGetFrameMetricData_period,
    batchGetFrameMetricData_startTime,
    batchGetFrameMetricData_targetResolution,
    batchGetFrameMetricData_profilingGroupName,

    -- * Destructuring the Response
    BatchGetFrameMetricDataResponse (..),
    newBatchGetFrameMetricDataResponse,

    -- * Response Lenses
    batchGetFrameMetricDataResponse_httpStatus,
    batchGetFrameMetricDataResponse_endTime,
    batchGetFrameMetricDataResponse_endTimes,
    batchGetFrameMetricDataResponse_frameMetricData,
    batchGetFrameMetricDataResponse_resolution,
    batchGetFrameMetricDataResponse_startTime,
    batchGetFrameMetricDataResponse_unprocessedEndTimes,
  )
where

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

-- | The structure representing the BatchGetFrameMetricDataRequest.
--
-- /See:/ 'newBatchGetFrameMetricData' smart constructor.
data BatchGetFrameMetricData = BatchGetFrameMetricData'
  { -- | The end time of the time period for the returned time series values.
    -- This is specified using the ISO 8601 format. For example,
    -- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
    -- 1:15:02 PM UTC.
    BatchGetFrameMetricData -> Maybe ISO8601
endTime :: Prelude.Maybe Data.ISO8601,
    -- | The details of the metrics that are used to request a time series of
    -- values. The metric includes the name of the frame, the aggregation type
    -- to calculate the metric value for the frame, and the thread states to
    -- use to get the count for the metric value of the frame.
    BatchGetFrameMetricData -> Maybe [FrameMetric]
frameMetrics :: Prelude.Maybe [FrameMetric],
    -- | The duration of the frame metrics used to return the time series values.
    -- Specify using the ISO 8601 format. The maximum period duration is one
    -- day (@PT24H@ or @P1D@).
    BatchGetFrameMetricData -> Maybe Text
period :: Prelude.Maybe Prelude.Text,
    -- | The start time of the time period for the frame metrics used to return
    -- the time series values. This is specified using the ISO 8601 format. For
    -- example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1,
    -- 2020 1:15:02 PM UTC.
    BatchGetFrameMetricData -> Maybe ISO8601
startTime :: Prelude.Maybe Data.ISO8601,
    -- | The requested resolution of time steps for the returned time series of
    -- values. If the requested target resolution is not available due to data
    -- not being retained we provide a best effort result by falling back to
    -- the most granular available resolution after the target resolution.
    -- There are 3 valid values.
    --
    -- -   @P1D@ — 1 day
    --
    -- -   @PT1H@ — 1 hour
    --
    -- -   @PT5M@ — 5 minutes
    BatchGetFrameMetricData -> Maybe AggregationPeriod
targetResolution :: Prelude.Maybe AggregationPeriod,
    -- | The name of the profiling group associated with the the frame metrics
    -- used to return the time series values.
    BatchGetFrameMetricData -> Text
profilingGroupName :: Prelude.Text
  }
  deriving (BatchGetFrameMetricData -> BatchGetFrameMetricData -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetFrameMetricData -> BatchGetFrameMetricData -> Bool
$c/= :: BatchGetFrameMetricData -> BatchGetFrameMetricData -> Bool
== :: BatchGetFrameMetricData -> BatchGetFrameMetricData -> Bool
$c== :: BatchGetFrameMetricData -> BatchGetFrameMetricData -> Bool
Prelude.Eq, ReadPrec [BatchGetFrameMetricData]
ReadPrec BatchGetFrameMetricData
Int -> ReadS BatchGetFrameMetricData
ReadS [BatchGetFrameMetricData]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetFrameMetricData]
$creadListPrec :: ReadPrec [BatchGetFrameMetricData]
readPrec :: ReadPrec BatchGetFrameMetricData
$creadPrec :: ReadPrec BatchGetFrameMetricData
readList :: ReadS [BatchGetFrameMetricData]
$creadList :: ReadS [BatchGetFrameMetricData]
readsPrec :: Int -> ReadS BatchGetFrameMetricData
$creadsPrec :: Int -> ReadS BatchGetFrameMetricData
Prelude.Read, Int -> BatchGetFrameMetricData -> ShowS
[BatchGetFrameMetricData] -> ShowS
BatchGetFrameMetricData -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetFrameMetricData] -> ShowS
$cshowList :: [BatchGetFrameMetricData] -> ShowS
show :: BatchGetFrameMetricData -> String
$cshow :: BatchGetFrameMetricData -> String
showsPrec :: Int -> BatchGetFrameMetricData -> ShowS
$cshowsPrec :: Int -> BatchGetFrameMetricData -> ShowS
Prelude.Show, forall x. Rep BatchGetFrameMetricData x -> BatchGetFrameMetricData
forall x. BatchGetFrameMetricData -> Rep BatchGetFrameMetricData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetFrameMetricData x -> BatchGetFrameMetricData
$cfrom :: forall x. BatchGetFrameMetricData -> Rep BatchGetFrameMetricData x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetFrameMetricData' 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:
--
-- 'endTime', 'batchGetFrameMetricData_endTime' - The end time of the time period for the returned time series values.
-- This is specified using the ISO 8601 format. For example,
-- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
-- 1:15:02 PM UTC.
--
-- 'frameMetrics', 'batchGetFrameMetricData_frameMetrics' - The details of the metrics that are used to request a time series of
-- values. The metric includes the name of the frame, the aggregation type
-- to calculate the metric value for the frame, and the thread states to
-- use to get the count for the metric value of the frame.
--
-- 'period', 'batchGetFrameMetricData_period' - The duration of the frame metrics used to return the time series values.
-- Specify using the ISO 8601 format. The maximum period duration is one
-- day (@PT24H@ or @P1D@).
--
-- 'startTime', 'batchGetFrameMetricData_startTime' - The start time of the time period for the frame metrics used to return
-- the time series values. This is specified using the ISO 8601 format. For
-- example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1,
-- 2020 1:15:02 PM UTC.
--
-- 'targetResolution', 'batchGetFrameMetricData_targetResolution' - The requested resolution of time steps for the returned time series of
-- values. If the requested target resolution is not available due to data
-- not being retained we provide a best effort result by falling back to
-- the most granular available resolution after the target resolution.
-- There are 3 valid values.
--
-- -   @P1D@ — 1 day
--
-- -   @PT1H@ — 1 hour
--
-- -   @PT5M@ — 5 minutes
--
-- 'profilingGroupName', 'batchGetFrameMetricData_profilingGroupName' - The name of the profiling group associated with the the frame metrics
-- used to return the time series values.
newBatchGetFrameMetricData ::
  -- | 'profilingGroupName'
  Prelude.Text ->
  BatchGetFrameMetricData
newBatchGetFrameMetricData :: Text -> BatchGetFrameMetricData
newBatchGetFrameMetricData Text
pProfilingGroupName_ =
  BatchGetFrameMetricData'
    { $sel:endTime:BatchGetFrameMetricData' :: Maybe ISO8601
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:frameMetrics:BatchGetFrameMetricData' :: Maybe [FrameMetric]
frameMetrics = forall a. Maybe a
Prelude.Nothing,
      $sel:period:BatchGetFrameMetricData' :: Maybe Text
period = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:BatchGetFrameMetricData' :: Maybe ISO8601
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:targetResolution:BatchGetFrameMetricData' :: Maybe AggregationPeriod
targetResolution = forall a. Maybe a
Prelude.Nothing,
      $sel:profilingGroupName:BatchGetFrameMetricData' :: Text
profilingGroupName = Text
pProfilingGroupName_
    }

-- | The end time of the time period for the returned time series values.
-- This is specified using the ISO 8601 format. For example,
-- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
-- 1:15:02 PM UTC.
batchGetFrameMetricData_endTime :: Lens.Lens' BatchGetFrameMetricData (Prelude.Maybe Prelude.UTCTime)
batchGetFrameMetricData_endTime :: Lens' BatchGetFrameMetricData (Maybe UTCTime)
batchGetFrameMetricData_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricData' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: BatchGetFrameMetricData
s@BatchGetFrameMetricData' {} Maybe ISO8601
a -> BatchGetFrameMetricData
s {$sel:endTime:BatchGetFrameMetricData' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: BatchGetFrameMetricData) 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 details of the metrics that are used to request a time series of
-- values. The metric includes the name of the frame, the aggregation type
-- to calculate the metric value for the frame, and the thread states to
-- use to get the count for the metric value of the frame.
batchGetFrameMetricData_frameMetrics :: Lens.Lens' BatchGetFrameMetricData (Prelude.Maybe [FrameMetric])
batchGetFrameMetricData_frameMetrics :: Lens' BatchGetFrameMetricData (Maybe [FrameMetric])
batchGetFrameMetricData_frameMetrics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricData' {Maybe [FrameMetric]
frameMetrics :: Maybe [FrameMetric]
$sel:frameMetrics:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe [FrameMetric]
frameMetrics} -> Maybe [FrameMetric]
frameMetrics) (\s :: BatchGetFrameMetricData
s@BatchGetFrameMetricData' {} Maybe [FrameMetric]
a -> BatchGetFrameMetricData
s {$sel:frameMetrics:BatchGetFrameMetricData' :: Maybe [FrameMetric]
frameMetrics = Maybe [FrameMetric]
a} :: BatchGetFrameMetricData) 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

-- | The duration of the frame metrics used to return the time series values.
-- Specify using the ISO 8601 format. The maximum period duration is one
-- day (@PT24H@ or @P1D@).
batchGetFrameMetricData_period :: Lens.Lens' BatchGetFrameMetricData (Prelude.Maybe Prelude.Text)
batchGetFrameMetricData_period :: Lens' BatchGetFrameMetricData (Maybe Text)
batchGetFrameMetricData_period = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricData' {Maybe Text
period :: Maybe Text
$sel:period:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe Text
period} -> Maybe Text
period) (\s :: BatchGetFrameMetricData
s@BatchGetFrameMetricData' {} Maybe Text
a -> BatchGetFrameMetricData
s {$sel:period:BatchGetFrameMetricData' :: Maybe Text
period = Maybe Text
a} :: BatchGetFrameMetricData)

-- | The start time of the time period for the frame metrics used to return
-- the time series values. This is specified using the ISO 8601 format. For
-- example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1,
-- 2020 1:15:02 PM UTC.
batchGetFrameMetricData_startTime :: Lens.Lens' BatchGetFrameMetricData (Prelude.Maybe Prelude.UTCTime)
batchGetFrameMetricData_startTime :: Lens' BatchGetFrameMetricData (Maybe UTCTime)
batchGetFrameMetricData_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricData' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: BatchGetFrameMetricData
s@BatchGetFrameMetricData' {} Maybe ISO8601
a -> BatchGetFrameMetricData
s {$sel:startTime:BatchGetFrameMetricData' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: BatchGetFrameMetricData) 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 requested resolution of time steps for the returned time series of
-- values. If the requested target resolution is not available due to data
-- not being retained we provide a best effort result by falling back to
-- the most granular available resolution after the target resolution.
-- There are 3 valid values.
--
-- -   @P1D@ — 1 day
--
-- -   @PT1H@ — 1 hour
--
-- -   @PT5M@ — 5 minutes
batchGetFrameMetricData_targetResolution :: Lens.Lens' BatchGetFrameMetricData (Prelude.Maybe AggregationPeriod)
batchGetFrameMetricData_targetResolution :: Lens' BatchGetFrameMetricData (Maybe AggregationPeriod)
batchGetFrameMetricData_targetResolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricData' {Maybe AggregationPeriod
targetResolution :: Maybe AggregationPeriod
$sel:targetResolution:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe AggregationPeriod
targetResolution} -> Maybe AggregationPeriod
targetResolution) (\s :: BatchGetFrameMetricData
s@BatchGetFrameMetricData' {} Maybe AggregationPeriod
a -> BatchGetFrameMetricData
s {$sel:targetResolution:BatchGetFrameMetricData' :: Maybe AggregationPeriod
targetResolution = Maybe AggregationPeriod
a} :: BatchGetFrameMetricData)

-- | The name of the profiling group associated with the the frame metrics
-- used to return the time series values.
batchGetFrameMetricData_profilingGroupName :: Lens.Lens' BatchGetFrameMetricData Prelude.Text
batchGetFrameMetricData_profilingGroupName :: Lens' BatchGetFrameMetricData Text
batchGetFrameMetricData_profilingGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricData' {Text
profilingGroupName :: Text
$sel:profilingGroupName:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Text
profilingGroupName} -> Text
profilingGroupName) (\s :: BatchGetFrameMetricData
s@BatchGetFrameMetricData' {} Text
a -> BatchGetFrameMetricData
s {$sel:profilingGroupName:BatchGetFrameMetricData' :: Text
profilingGroupName = Text
a} :: BatchGetFrameMetricData)

instance Core.AWSRequest BatchGetFrameMetricData where
  type
    AWSResponse BatchGetFrameMetricData =
      BatchGetFrameMetricDataResponse
  request :: (Service -> Service)
-> BatchGetFrameMetricData -> Request BatchGetFrameMetricData
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 BatchGetFrameMetricData
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchGetFrameMetricData)))
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 ->
          Int
-> ISO8601
-> [TimestampStructure]
-> [FrameMetricDatum]
-> AggregationPeriod
-> ISO8601
-> HashMap Text [TimestampStructure]
-> BatchGetFrameMetricDataResponse
BatchGetFrameMetricDataResponse'
            forall (f :: * -> *) a b. Functor 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"endTime")
            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
"endTimes" 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
"frameMetricData"
                            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 a
Data..:> Key
"resolution")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"startTime")
            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
"unprocessedEndTimes"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable BatchGetFrameMetricData where
  hashWithSalt :: Int -> BatchGetFrameMetricData -> Int
hashWithSalt Int
_salt BatchGetFrameMetricData' {Maybe [FrameMetric]
Maybe Text
Maybe ISO8601
Maybe AggregationPeriod
Text
profilingGroupName :: Text
targetResolution :: Maybe AggregationPeriod
startTime :: Maybe ISO8601
period :: Maybe Text
frameMetrics :: Maybe [FrameMetric]
endTime :: Maybe ISO8601
$sel:profilingGroupName:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Text
$sel:targetResolution:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe AggregationPeriod
$sel:startTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
$sel:period:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe Text
$sel:frameMetrics:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe [FrameMetric]
$sel:endTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
endTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [FrameMetric]
frameMetrics
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
period
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AggregationPeriod
targetResolution
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
profilingGroupName

instance Prelude.NFData BatchGetFrameMetricData where
  rnf :: BatchGetFrameMetricData -> ()
rnf BatchGetFrameMetricData' {Maybe [FrameMetric]
Maybe Text
Maybe ISO8601
Maybe AggregationPeriod
Text
profilingGroupName :: Text
targetResolution :: Maybe AggregationPeriod
startTime :: Maybe ISO8601
period :: Maybe Text
frameMetrics :: Maybe [FrameMetric]
endTime :: Maybe ISO8601
$sel:profilingGroupName:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Text
$sel:targetResolution:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe AggregationPeriod
$sel:startTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
$sel:period:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe Text
$sel:frameMetrics:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe [FrameMetric]
$sel:endTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [FrameMetric]
frameMetrics
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
period
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AggregationPeriod
targetResolution
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
profilingGroupName

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

instance Data.ToJSON BatchGetFrameMetricData where
  toJSON :: BatchGetFrameMetricData -> Value
toJSON BatchGetFrameMetricData' {Maybe [FrameMetric]
Maybe Text
Maybe ISO8601
Maybe AggregationPeriod
Text
profilingGroupName :: Text
targetResolution :: Maybe AggregationPeriod
startTime :: Maybe ISO8601
period :: Maybe Text
frameMetrics :: Maybe [FrameMetric]
endTime :: Maybe ISO8601
$sel:profilingGroupName:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Text
$sel:targetResolution:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe AggregationPeriod
$sel:startTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
$sel:period:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe Text
$sel:frameMetrics:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe [FrameMetric]
$sel:endTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Key
"frameMetrics" 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 [FrameMetric]
frameMetrics]
      )

instance Data.ToPath BatchGetFrameMetricData where
  toPath :: BatchGetFrameMetricData -> ByteString
toPath BatchGetFrameMetricData' {Maybe [FrameMetric]
Maybe Text
Maybe ISO8601
Maybe AggregationPeriod
Text
profilingGroupName :: Text
targetResolution :: Maybe AggregationPeriod
startTime :: Maybe ISO8601
period :: Maybe Text
frameMetrics :: Maybe [FrameMetric]
endTime :: Maybe ISO8601
$sel:profilingGroupName:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Text
$sel:targetResolution:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe AggregationPeriod
$sel:startTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
$sel:period:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe Text
$sel:frameMetrics:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe [FrameMetric]
$sel:endTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/profilingGroups/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
profilingGroupName,
        ByteString
"/frames/-/metrics"
      ]

instance Data.ToQuery BatchGetFrameMetricData where
  toQuery :: BatchGetFrameMetricData -> QueryString
toQuery BatchGetFrameMetricData' {Maybe [FrameMetric]
Maybe Text
Maybe ISO8601
Maybe AggregationPeriod
Text
profilingGroupName :: Text
targetResolution :: Maybe AggregationPeriod
startTime :: Maybe ISO8601
period :: Maybe Text
frameMetrics :: Maybe [FrameMetric]
endTime :: Maybe ISO8601
$sel:profilingGroupName:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Text
$sel:targetResolution:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe AggregationPeriod
$sel:startTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
$sel:period:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe Text
$sel:frameMetrics:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe [FrameMetric]
$sel:endTime:BatchGetFrameMetricData' :: BatchGetFrameMetricData -> Maybe ISO8601
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"endTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ISO8601
endTime,
        ByteString
"period" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
period,
        ByteString
"startTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ISO8601
startTime,
        ByteString
"targetResolution" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe AggregationPeriod
targetResolution
      ]

-- | The structure representing the BatchGetFrameMetricDataResponse.
--
-- /See:/ 'newBatchGetFrameMetricDataResponse' smart constructor.
data BatchGetFrameMetricDataResponse = BatchGetFrameMetricDataResponse'
  { -- | The response's http status code.
    BatchGetFrameMetricDataResponse -> Int
httpStatus :: Prelude.Int,
    -- | The end time of the time period for the returned time series values.
    -- This is specified using the ISO 8601 format. For example,
    -- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
    -- 1:15:02 PM UTC.
    BatchGetFrameMetricDataResponse -> ISO8601
endTime :: Data.ISO8601,
    -- | List of instances, or time steps, in the time series. For example, if
    -- the @period@ is one day (@PT24H)@), and the @resolution@ is five minutes
    -- (@PT5M@), then there are 288 @endTimes@ in the list that are each five
    -- minutes appart.
    BatchGetFrameMetricDataResponse -> [TimestampStructure]
endTimes :: [TimestampStructure],
    -- | Details of the metrics to request a time series of values. The metric
    -- includes the name of the frame, the aggregation type to calculate the
    -- metric value for the frame, and the thread states to use to get the
    -- count for the metric value of the frame.
    BatchGetFrameMetricDataResponse -> [FrameMetricDatum]
frameMetricData :: [FrameMetricDatum],
    -- | Resolution or granularity of the profile data used to generate the time
    -- series. This is the value used to jump through time steps in a time
    -- series. There are 3 valid values.
    --
    -- -   @P1D@ — 1 day
    --
    -- -   @PT1H@ — 1 hour
    --
    -- -   @PT5M@ — 5 minutes
    BatchGetFrameMetricDataResponse -> AggregationPeriod
resolution :: AggregationPeriod,
    -- | The start time of the time period for the returned time series values.
    -- This is specified using the ISO 8601 format. For example,
    -- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
    -- 1:15:02 PM UTC.
    BatchGetFrameMetricDataResponse -> ISO8601
startTime :: Data.ISO8601,
    -- | List of instances which remained unprocessed. This will create a missing
    -- time step in the list of end times.
    BatchGetFrameMetricDataResponse
-> HashMap Text [TimestampStructure]
unprocessedEndTimes :: Prelude.HashMap Prelude.Text [TimestampStructure]
  }
  deriving (BatchGetFrameMetricDataResponse
-> BatchGetFrameMetricDataResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetFrameMetricDataResponse
-> BatchGetFrameMetricDataResponse -> Bool
$c/= :: BatchGetFrameMetricDataResponse
-> BatchGetFrameMetricDataResponse -> Bool
== :: BatchGetFrameMetricDataResponse
-> BatchGetFrameMetricDataResponse -> Bool
$c== :: BatchGetFrameMetricDataResponse
-> BatchGetFrameMetricDataResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetFrameMetricDataResponse]
ReadPrec BatchGetFrameMetricDataResponse
Int -> ReadS BatchGetFrameMetricDataResponse
ReadS [BatchGetFrameMetricDataResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetFrameMetricDataResponse]
$creadListPrec :: ReadPrec [BatchGetFrameMetricDataResponse]
readPrec :: ReadPrec BatchGetFrameMetricDataResponse
$creadPrec :: ReadPrec BatchGetFrameMetricDataResponse
readList :: ReadS [BatchGetFrameMetricDataResponse]
$creadList :: ReadS [BatchGetFrameMetricDataResponse]
readsPrec :: Int -> ReadS BatchGetFrameMetricDataResponse
$creadsPrec :: Int -> ReadS BatchGetFrameMetricDataResponse
Prelude.Read, Int -> BatchGetFrameMetricDataResponse -> ShowS
[BatchGetFrameMetricDataResponse] -> ShowS
BatchGetFrameMetricDataResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetFrameMetricDataResponse] -> ShowS
$cshowList :: [BatchGetFrameMetricDataResponse] -> ShowS
show :: BatchGetFrameMetricDataResponse -> String
$cshow :: BatchGetFrameMetricDataResponse -> String
showsPrec :: Int -> BatchGetFrameMetricDataResponse -> ShowS
$cshowsPrec :: Int -> BatchGetFrameMetricDataResponse -> ShowS
Prelude.Show, forall x.
Rep BatchGetFrameMetricDataResponse x
-> BatchGetFrameMetricDataResponse
forall x.
BatchGetFrameMetricDataResponse
-> Rep BatchGetFrameMetricDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetFrameMetricDataResponse x
-> BatchGetFrameMetricDataResponse
$cfrom :: forall x.
BatchGetFrameMetricDataResponse
-> Rep BatchGetFrameMetricDataResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetFrameMetricDataResponse' 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:
--
-- 'httpStatus', 'batchGetFrameMetricDataResponse_httpStatus' - The response's http status code.
--
-- 'endTime', 'batchGetFrameMetricDataResponse_endTime' - The end time of the time period for the returned time series values.
-- This is specified using the ISO 8601 format. For example,
-- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
-- 1:15:02 PM UTC.
--
-- 'endTimes', 'batchGetFrameMetricDataResponse_endTimes' - List of instances, or time steps, in the time series. For example, if
-- the @period@ is one day (@PT24H)@), and the @resolution@ is five minutes
-- (@PT5M@), then there are 288 @endTimes@ in the list that are each five
-- minutes appart.
--
-- 'frameMetricData', 'batchGetFrameMetricDataResponse_frameMetricData' - Details of the metrics to request a time series of values. The metric
-- includes the name of the frame, the aggregation type to calculate the
-- metric value for the frame, and the thread states to use to get the
-- count for the metric value of the frame.
--
-- 'resolution', 'batchGetFrameMetricDataResponse_resolution' - Resolution or granularity of the profile data used to generate the time
-- series. This is the value used to jump through time steps in a time
-- series. There are 3 valid values.
--
-- -   @P1D@ — 1 day
--
-- -   @PT1H@ — 1 hour
--
-- -   @PT5M@ — 5 minutes
--
-- 'startTime', 'batchGetFrameMetricDataResponse_startTime' - The start time of the time period for the returned time series values.
-- This is specified using the ISO 8601 format. For example,
-- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
-- 1:15:02 PM UTC.
--
-- 'unprocessedEndTimes', 'batchGetFrameMetricDataResponse_unprocessedEndTimes' - List of instances which remained unprocessed. This will create a missing
-- time step in the list of end times.
newBatchGetFrameMetricDataResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'endTime'
  Prelude.UTCTime ->
  -- | 'resolution'
  AggregationPeriod ->
  -- | 'startTime'
  Prelude.UTCTime ->
  BatchGetFrameMetricDataResponse
newBatchGetFrameMetricDataResponse :: Int
-> UTCTime
-> AggregationPeriod
-> UTCTime
-> BatchGetFrameMetricDataResponse
newBatchGetFrameMetricDataResponse
  Int
pHttpStatus_
  UTCTime
pEndTime_
  AggregationPeriod
pResolution_
  UTCTime
pStartTime_ =
    BatchGetFrameMetricDataResponse'
      { $sel:httpStatus:BatchGetFrameMetricDataResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:endTime:BatchGetFrameMetricDataResponse' :: ISO8601
endTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_,
        $sel:endTimes:BatchGetFrameMetricDataResponse' :: [TimestampStructure]
endTimes = forall a. Monoid a => a
Prelude.mempty,
        $sel:frameMetricData:BatchGetFrameMetricDataResponse' :: [FrameMetricDatum]
frameMetricData = forall a. Monoid a => a
Prelude.mempty,
        $sel:resolution:BatchGetFrameMetricDataResponse' :: AggregationPeriod
resolution = AggregationPeriod
pResolution_,
        $sel:startTime:BatchGetFrameMetricDataResponse' :: ISO8601
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
        $sel:unprocessedEndTimes:BatchGetFrameMetricDataResponse' :: HashMap Text [TimestampStructure]
unprocessedEndTimes = forall a. Monoid a => a
Prelude.mempty
      }

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

-- | The end time of the time period for the returned time series values.
-- This is specified using the ISO 8601 format. For example,
-- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
-- 1:15:02 PM UTC.
batchGetFrameMetricDataResponse_endTime :: Lens.Lens' BatchGetFrameMetricDataResponse Prelude.UTCTime
batchGetFrameMetricDataResponse_endTime :: Lens' BatchGetFrameMetricDataResponse UTCTime
batchGetFrameMetricDataResponse_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricDataResponse' {ISO8601
endTime :: ISO8601
$sel:endTime:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> ISO8601
endTime} -> ISO8601
endTime) (\s :: BatchGetFrameMetricDataResponse
s@BatchGetFrameMetricDataResponse' {} ISO8601
a -> BatchGetFrameMetricDataResponse
s {$sel:endTime:BatchGetFrameMetricDataResponse' :: ISO8601
endTime = ISO8601
a} :: BatchGetFrameMetricDataResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | List of instances, or time steps, in the time series. For example, if
-- the @period@ is one day (@PT24H)@), and the @resolution@ is five minutes
-- (@PT5M@), then there are 288 @endTimes@ in the list that are each five
-- minutes appart.
batchGetFrameMetricDataResponse_endTimes :: Lens.Lens' BatchGetFrameMetricDataResponse [TimestampStructure]
batchGetFrameMetricDataResponse_endTimes :: Lens' BatchGetFrameMetricDataResponse [TimestampStructure]
batchGetFrameMetricDataResponse_endTimes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricDataResponse' {[TimestampStructure]
endTimes :: [TimestampStructure]
$sel:endTimes:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> [TimestampStructure]
endTimes} -> [TimestampStructure]
endTimes) (\s :: BatchGetFrameMetricDataResponse
s@BatchGetFrameMetricDataResponse' {} [TimestampStructure]
a -> BatchGetFrameMetricDataResponse
s {$sel:endTimes:BatchGetFrameMetricDataResponse' :: [TimestampStructure]
endTimes = [TimestampStructure]
a} :: BatchGetFrameMetricDataResponse) 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

-- | Details of the metrics to request a time series of values. The metric
-- includes the name of the frame, the aggregation type to calculate the
-- metric value for the frame, and the thread states to use to get the
-- count for the metric value of the frame.
batchGetFrameMetricDataResponse_frameMetricData :: Lens.Lens' BatchGetFrameMetricDataResponse [FrameMetricDatum]
batchGetFrameMetricDataResponse_frameMetricData :: Lens' BatchGetFrameMetricDataResponse [FrameMetricDatum]
batchGetFrameMetricDataResponse_frameMetricData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricDataResponse' {[FrameMetricDatum]
frameMetricData :: [FrameMetricDatum]
$sel:frameMetricData:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> [FrameMetricDatum]
frameMetricData} -> [FrameMetricDatum]
frameMetricData) (\s :: BatchGetFrameMetricDataResponse
s@BatchGetFrameMetricDataResponse' {} [FrameMetricDatum]
a -> BatchGetFrameMetricDataResponse
s {$sel:frameMetricData:BatchGetFrameMetricDataResponse' :: [FrameMetricDatum]
frameMetricData = [FrameMetricDatum]
a} :: BatchGetFrameMetricDataResponse) 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

-- | Resolution or granularity of the profile data used to generate the time
-- series. This is the value used to jump through time steps in a time
-- series. There are 3 valid values.
--
-- -   @P1D@ — 1 day
--
-- -   @PT1H@ — 1 hour
--
-- -   @PT5M@ — 5 minutes
batchGetFrameMetricDataResponse_resolution :: Lens.Lens' BatchGetFrameMetricDataResponse AggregationPeriod
batchGetFrameMetricDataResponse_resolution :: Lens' BatchGetFrameMetricDataResponse AggregationPeriod
batchGetFrameMetricDataResponse_resolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricDataResponse' {AggregationPeriod
resolution :: AggregationPeriod
$sel:resolution:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> AggregationPeriod
resolution} -> AggregationPeriod
resolution) (\s :: BatchGetFrameMetricDataResponse
s@BatchGetFrameMetricDataResponse' {} AggregationPeriod
a -> BatchGetFrameMetricDataResponse
s {$sel:resolution:BatchGetFrameMetricDataResponse' :: AggregationPeriod
resolution = AggregationPeriod
a} :: BatchGetFrameMetricDataResponse)

-- | The start time of the time period for the returned time series values.
-- This is specified using the ISO 8601 format. For example,
-- 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020
-- 1:15:02 PM UTC.
batchGetFrameMetricDataResponse_startTime :: Lens.Lens' BatchGetFrameMetricDataResponse Prelude.UTCTime
batchGetFrameMetricDataResponse_startTime :: Lens' BatchGetFrameMetricDataResponse UTCTime
batchGetFrameMetricDataResponse_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricDataResponse' {ISO8601
startTime :: ISO8601
$sel:startTime:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> ISO8601
startTime} -> ISO8601
startTime) (\s :: BatchGetFrameMetricDataResponse
s@BatchGetFrameMetricDataResponse' {} ISO8601
a -> BatchGetFrameMetricDataResponse
s {$sel:startTime:BatchGetFrameMetricDataResponse' :: ISO8601
startTime = ISO8601
a} :: BatchGetFrameMetricDataResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | List of instances which remained unprocessed. This will create a missing
-- time step in the list of end times.
batchGetFrameMetricDataResponse_unprocessedEndTimes :: Lens.Lens' BatchGetFrameMetricDataResponse (Prelude.HashMap Prelude.Text [TimestampStructure])
batchGetFrameMetricDataResponse_unprocessedEndTimes :: Lens'
  BatchGetFrameMetricDataResponse (HashMap Text [TimestampStructure])
batchGetFrameMetricDataResponse_unprocessedEndTimes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetFrameMetricDataResponse' {HashMap Text [TimestampStructure]
unprocessedEndTimes :: HashMap Text [TimestampStructure]
$sel:unprocessedEndTimes:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse
-> HashMap Text [TimestampStructure]
unprocessedEndTimes} -> HashMap Text [TimestampStructure]
unprocessedEndTimes) (\s :: BatchGetFrameMetricDataResponse
s@BatchGetFrameMetricDataResponse' {} HashMap Text [TimestampStructure]
a -> BatchGetFrameMetricDataResponse
s {$sel:unprocessedEndTimes:BatchGetFrameMetricDataResponse' :: HashMap Text [TimestampStructure]
unprocessedEndTimes = HashMap Text [TimestampStructure]
a} :: BatchGetFrameMetricDataResponse) 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

instance
  Prelude.NFData
    BatchGetFrameMetricDataResponse
  where
  rnf :: BatchGetFrameMetricDataResponse -> ()
rnf BatchGetFrameMetricDataResponse' {Int
[FrameMetricDatum]
[TimestampStructure]
HashMap Text [TimestampStructure]
ISO8601
AggregationPeriod
unprocessedEndTimes :: HashMap Text [TimestampStructure]
startTime :: ISO8601
resolution :: AggregationPeriod
frameMetricData :: [FrameMetricDatum]
endTimes :: [TimestampStructure]
endTime :: ISO8601
httpStatus :: Int
$sel:unprocessedEndTimes:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse
-> HashMap Text [TimestampStructure]
$sel:startTime:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> ISO8601
$sel:resolution:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> AggregationPeriod
$sel:frameMetricData:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> [FrameMetricDatum]
$sel:endTimes:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> [TimestampStructure]
$sel:endTime:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> ISO8601
$sel:httpStatus:BatchGetFrameMetricDataResponse' :: BatchGetFrameMetricDataResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [TimestampStructure]
endTimes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [FrameMetricDatum]
frameMetricData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AggregationPeriod
resolution
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text [TimestampStructure]
unprocessedEndTimes