{-# 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.SESV2.Types.BatchGetMetricDataQuery
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SESV2.Types.BatchGetMetricDataQuery where

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 Amazonka.SESV2.Types.Metric
import Amazonka.SESV2.Types.MetricDimensionName
import Amazonka.SESV2.Types.MetricNamespace

-- | Represents a single metric data query to include in a batch.
--
-- /See:/ 'newBatchGetMetricDataQuery' smart constructor.
data BatchGetMetricDataQuery = BatchGetMetricDataQuery'
  { -- | An object that contains mapping between @MetricDimensionName@ and
    -- @MetricDimensionValue@ to filter metrics by.
    BatchGetMetricDataQuery -> Maybe (HashMap MetricDimensionName Text)
dimensions :: Prelude.Maybe (Prelude.HashMap MetricDimensionName Prelude.Text),
    -- | The query identifier.
    BatchGetMetricDataQuery -> Text
id :: Prelude.Text,
    -- | The query namespace - e.g. @VDM@
    BatchGetMetricDataQuery -> MetricNamespace
namespace :: MetricNamespace,
    -- | The queried metric. This can be one of the following:
    --
    -- -   @SEND@ – Emails sent eligible for tracking in the VDM dashboard.
    --     This excludes emails sent to the mailbox simulator and emails
    --     addressed to more than one recipient.
    --
    -- -   @COMPLAINT@ – Complaints received for your account. This excludes
    --     complaints from the mailbox simulator, those originating from your
    --     account-level suppression list (if enabled), and those for emails
    --     addressed to more than one recipient
    --
    -- -   @PERMANENT_BOUNCE@ – Permanent bounces - i.e. feedback received for
    --     emails sent to non-existent mailboxes. Excludes bounces from the
    --     mailbox simulator, those originating from your account-level
    --     suppression list (if enabled), and those for emails addressed to
    --     more than one recipient.
    --
    -- -   @TRANSIENT_BOUNCE@ – Transient bounces - i.e. feedback received for
    --     delivery failures excluding issues with non-existent mailboxes.
    --     Excludes bounces from the mailbox simulator, and those for emails
    --     addressed to more than one recipient.
    --
    -- -   @OPEN@ – Unique open events for emails including open trackers.
    --     Excludes opens for emails addressed to more than one recipient.
    --
    -- -   @CLICK@ – Unique click events for emails including wrapped links.
    --     Excludes clicks for emails addressed to more than one recipient.
    --
    -- -   @DELIVERY@ – Successful deliveries for email sending attempts.
    --     Excludes deliveries to the mailbox simulator and for emails
    --     addressed to more than one recipient.
    --
    -- -   @DELIVERY_OPEN@ – Successful deliveries for email sending attempts.
    --     Excludes deliveries to the mailbox simulator, for emails addressed
    --     to more than one recipient, and emails without open trackers.
    --
    -- -   @DELIVERY_CLICK@ – Successful deliveries for email sending attempts.
    --     Excludes deliveries to the mailbox simulator, for emails addressed
    --     to more than one recipient, and emails without click trackers.
    --
    -- -   @DELIVERY_COMPLAINT@ – Successful deliveries for email sending
    --     attempts. Excludes deliveries to the mailbox simulator, for emails
    --     addressed to more than one recipient, and emails addressed to
    --     recipients hosted by ISPs with which Amazon SES does not have a
    --     feedback loop agreement.
    BatchGetMetricDataQuery -> Metric
metric :: Metric,
    -- | Represents the start date for the query interval.
    BatchGetMetricDataQuery -> POSIX
startDate :: Data.POSIX,
    -- | Represents the end date for the query interval.
    BatchGetMetricDataQuery -> POSIX
endDate :: Data.POSIX
  }
  deriving (BatchGetMetricDataQuery -> BatchGetMetricDataQuery -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetMetricDataQuery -> BatchGetMetricDataQuery -> Bool
$c/= :: BatchGetMetricDataQuery -> BatchGetMetricDataQuery -> Bool
== :: BatchGetMetricDataQuery -> BatchGetMetricDataQuery -> Bool
$c== :: BatchGetMetricDataQuery -> BatchGetMetricDataQuery -> Bool
Prelude.Eq, ReadPrec [BatchGetMetricDataQuery]
ReadPrec BatchGetMetricDataQuery
Int -> ReadS BatchGetMetricDataQuery
ReadS [BatchGetMetricDataQuery]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetMetricDataQuery]
$creadListPrec :: ReadPrec [BatchGetMetricDataQuery]
readPrec :: ReadPrec BatchGetMetricDataQuery
$creadPrec :: ReadPrec BatchGetMetricDataQuery
readList :: ReadS [BatchGetMetricDataQuery]
$creadList :: ReadS [BatchGetMetricDataQuery]
readsPrec :: Int -> ReadS BatchGetMetricDataQuery
$creadsPrec :: Int -> ReadS BatchGetMetricDataQuery
Prelude.Read, Int -> BatchGetMetricDataQuery -> ShowS
[BatchGetMetricDataQuery] -> ShowS
BatchGetMetricDataQuery -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetMetricDataQuery] -> ShowS
$cshowList :: [BatchGetMetricDataQuery] -> ShowS
show :: BatchGetMetricDataQuery -> String
$cshow :: BatchGetMetricDataQuery -> String
showsPrec :: Int -> BatchGetMetricDataQuery -> ShowS
$cshowsPrec :: Int -> BatchGetMetricDataQuery -> ShowS
Prelude.Show, forall x. Rep BatchGetMetricDataQuery x -> BatchGetMetricDataQuery
forall x. BatchGetMetricDataQuery -> Rep BatchGetMetricDataQuery x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetMetricDataQuery x -> BatchGetMetricDataQuery
$cfrom :: forall x. BatchGetMetricDataQuery -> Rep BatchGetMetricDataQuery x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetMetricDataQuery' 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:
--
-- 'dimensions', 'batchGetMetricDataQuery_dimensions' - An object that contains mapping between @MetricDimensionName@ and
-- @MetricDimensionValue@ to filter metrics by.
--
-- 'id', 'batchGetMetricDataQuery_id' - The query identifier.
--
-- 'namespace', 'batchGetMetricDataQuery_namespace' - The query namespace - e.g. @VDM@
--
-- 'metric', 'batchGetMetricDataQuery_metric' - The queried metric. This can be one of the following:
--
-- -   @SEND@ – Emails sent eligible for tracking in the VDM dashboard.
--     This excludes emails sent to the mailbox simulator and emails
--     addressed to more than one recipient.
--
-- -   @COMPLAINT@ – Complaints received for your account. This excludes
--     complaints from the mailbox simulator, those originating from your
--     account-level suppression list (if enabled), and those for emails
--     addressed to more than one recipient
--
-- -   @PERMANENT_BOUNCE@ – Permanent bounces - i.e. feedback received for
--     emails sent to non-existent mailboxes. Excludes bounces from the
--     mailbox simulator, those originating from your account-level
--     suppression list (if enabled), and those for emails addressed to
--     more than one recipient.
--
-- -   @TRANSIENT_BOUNCE@ – Transient bounces - i.e. feedback received for
--     delivery failures excluding issues with non-existent mailboxes.
--     Excludes bounces from the mailbox simulator, and those for emails
--     addressed to more than one recipient.
--
-- -   @OPEN@ – Unique open events for emails including open trackers.
--     Excludes opens for emails addressed to more than one recipient.
--
-- -   @CLICK@ – Unique click events for emails including wrapped links.
--     Excludes clicks for emails addressed to more than one recipient.
--
-- -   @DELIVERY@ – Successful deliveries for email sending attempts.
--     Excludes deliveries to the mailbox simulator and for emails
--     addressed to more than one recipient.
--
-- -   @DELIVERY_OPEN@ – Successful deliveries for email sending attempts.
--     Excludes deliveries to the mailbox simulator, for emails addressed
--     to more than one recipient, and emails without open trackers.
--
-- -   @DELIVERY_CLICK@ – Successful deliveries for email sending attempts.
--     Excludes deliveries to the mailbox simulator, for emails addressed
--     to more than one recipient, and emails without click trackers.
--
-- -   @DELIVERY_COMPLAINT@ – Successful deliveries for email sending
--     attempts. Excludes deliveries to the mailbox simulator, for emails
--     addressed to more than one recipient, and emails addressed to
--     recipients hosted by ISPs with which Amazon SES does not have a
--     feedback loop agreement.
--
-- 'startDate', 'batchGetMetricDataQuery_startDate' - Represents the start date for the query interval.
--
-- 'endDate', 'batchGetMetricDataQuery_endDate' - Represents the end date for the query interval.
newBatchGetMetricDataQuery ::
  -- | 'id'
  Prelude.Text ->
  -- | 'namespace'
  MetricNamespace ->
  -- | 'metric'
  Metric ->
  -- | 'startDate'
  Prelude.UTCTime ->
  -- | 'endDate'
  Prelude.UTCTime ->
  BatchGetMetricDataQuery
newBatchGetMetricDataQuery :: Text
-> MetricNamespace
-> Metric
-> UTCTime
-> UTCTime
-> BatchGetMetricDataQuery
newBatchGetMetricDataQuery
  Text
pId_
  MetricNamespace
pNamespace_
  Metric
pMetric_
  UTCTime
pStartDate_
  UTCTime
pEndDate_ =
    BatchGetMetricDataQuery'
      { $sel:dimensions:BatchGetMetricDataQuery' :: Maybe (HashMap MetricDimensionName Text)
dimensions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:id:BatchGetMetricDataQuery' :: Text
id = Text
pId_,
        $sel:namespace:BatchGetMetricDataQuery' :: MetricNamespace
namespace = MetricNamespace
pNamespace_,
        $sel:metric:BatchGetMetricDataQuery' :: Metric
metric = Metric
pMetric_,
        $sel:startDate:BatchGetMetricDataQuery' :: POSIX
startDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartDate_,
        $sel:endDate:BatchGetMetricDataQuery' :: POSIX
endDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndDate_
      }

-- | An object that contains mapping between @MetricDimensionName@ and
-- @MetricDimensionValue@ to filter metrics by.
batchGetMetricDataQuery_dimensions :: Lens.Lens' BatchGetMetricDataQuery (Prelude.Maybe (Prelude.HashMap MetricDimensionName Prelude.Text))
batchGetMetricDataQuery_dimensions :: Lens'
  BatchGetMetricDataQuery (Maybe (HashMap MetricDimensionName Text))
batchGetMetricDataQuery_dimensions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetMetricDataQuery' {Maybe (HashMap MetricDimensionName Text)
dimensions :: Maybe (HashMap MetricDimensionName Text)
$sel:dimensions:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Maybe (HashMap MetricDimensionName Text)
dimensions} -> Maybe (HashMap MetricDimensionName Text)
dimensions) (\s :: BatchGetMetricDataQuery
s@BatchGetMetricDataQuery' {} Maybe (HashMap MetricDimensionName Text)
a -> BatchGetMetricDataQuery
s {$sel:dimensions:BatchGetMetricDataQuery' :: Maybe (HashMap MetricDimensionName Text)
dimensions = Maybe (HashMap MetricDimensionName Text)
a} :: BatchGetMetricDataQuery) 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 query identifier.
batchGetMetricDataQuery_id :: Lens.Lens' BatchGetMetricDataQuery Prelude.Text
batchGetMetricDataQuery_id :: Lens' BatchGetMetricDataQuery Text
batchGetMetricDataQuery_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetMetricDataQuery' {Text
id :: Text
$sel:id:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Text
id} -> Text
id) (\s :: BatchGetMetricDataQuery
s@BatchGetMetricDataQuery' {} Text
a -> BatchGetMetricDataQuery
s {$sel:id:BatchGetMetricDataQuery' :: Text
id = Text
a} :: BatchGetMetricDataQuery)

-- | The query namespace - e.g. @VDM@
batchGetMetricDataQuery_namespace :: Lens.Lens' BatchGetMetricDataQuery MetricNamespace
batchGetMetricDataQuery_namespace :: Lens' BatchGetMetricDataQuery MetricNamespace
batchGetMetricDataQuery_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetMetricDataQuery' {MetricNamespace
namespace :: MetricNamespace
$sel:namespace:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> MetricNamespace
namespace} -> MetricNamespace
namespace) (\s :: BatchGetMetricDataQuery
s@BatchGetMetricDataQuery' {} MetricNamespace
a -> BatchGetMetricDataQuery
s {$sel:namespace:BatchGetMetricDataQuery' :: MetricNamespace
namespace = MetricNamespace
a} :: BatchGetMetricDataQuery)

-- | The queried metric. This can be one of the following:
--
-- -   @SEND@ – Emails sent eligible for tracking in the VDM dashboard.
--     This excludes emails sent to the mailbox simulator and emails
--     addressed to more than one recipient.
--
-- -   @COMPLAINT@ – Complaints received for your account. This excludes
--     complaints from the mailbox simulator, those originating from your
--     account-level suppression list (if enabled), and those for emails
--     addressed to more than one recipient
--
-- -   @PERMANENT_BOUNCE@ – Permanent bounces - i.e. feedback received for
--     emails sent to non-existent mailboxes. Excludes bounces from the
--     mailbox simulator, those originating from your account-level
--     suppression list (if enabled), and those for emails addressed to
--     more than one recipient.
--
-- -   @TRANSIENT_BOUNCE@ – Transient bounces - i.e. feedback received for
--     delivery failures excluding issues with non-existent mailboxes.
--     Excludes bounces from the mailbox simulator, and those for emails
--     addressed to more than one recipient.
--
-- -   @OPEN@ – Unique open events for emails including open trackers.
--     Excludes opens for emails addressed to more than one recipient.
--
-- -   @CLICK@ – Unique click events for emails including wrapped links.
--     Excludes clicks for emails addressed to more than one recipient.
--
-- -   @DELIVERY@ – Successful deliveries for email sending attempts.
--     Excludes deliveries to the mailbox simulator and for emails
--     addressed to more than one recipient.
--
-- -   @DELIVERY_OPEN@ – Successful deliveries for email sending attempts.
--     Excludes deliveries to the mailbox simulator, for emails addressed
--     to more than one recipient, and emails without open trackers.
--
-- -   @DELIVERY_CLICK@ – Successful deliveries for email sending attempts.
--     Excludes deliveries to the mailbox simulator, for emails addressed
--     to more than one recipient, and emails without click trackers.
--
-- -   @DELIVERY_COMPLAINT@ – Successful deliveries for email sending
--     attempts. Excludes deliveries to the mailbox simulator, for emails
--     addressed to more than one recipient, and emails addressed to
--     recipients hosted by ISPs with which Amazon SES does not have a
--     feedback loop agreement.
batchGetMetricDataQuery_metric :: Lens.Lens' BatchGetMetricDataQuery Metric
batchGetMetricDataQuery_metric :: Lens' BatchGetMetricDataQuery Metric
batchGetMetricDataQuery_metric = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetMetricDataQuery' {Metric
metric :: Metric
$sel:metric:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Metric
metric} -> Metric
metric) (\s :: BatchGetMetricDataQuery
s@BatchGetMetricDataQuery' {} Metric
a -> BatchGetMetricDataQuery
s {$sel:metric:BatchGetMetricDataQuery' :: Metric
metric = Metric
a} :: BatchGetMetricDataQuery)

-- | Represents the start date for the query interval.
batchGetMetricDataQuery_startDate :: Lens.Lens' BatchGetMetricDataQuery Prelude.UTCTime
batchGetMetricDataQuery_startDate :: Lens' BatchGetMetricDataQuery UTCTime
batchGetMetricDataQuery_startDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetMetricDataQuery' {POSIX
startDate :: POSIX
$sel:startDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
startDate} -> POSIX
startDate) (\s :: BatchGetMetricDataQuery
s@BatchGetMetricDataQuery' {} POSIX
a -> BatchGetMetricDataQuery
s {$sel:startDate:BatchGetMetricDataQuery' :: POSIX
startDate = POSIX
a} :: BatchGetMetricDataQuery) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Represents the end date for the query interval.
batchGetMetricDataQuery_endDate :: Lens.Lens' BatchGetMetricDataQuery Prelude.UTCTime
batchGetMetricDataQuery_endDate :: Lens' BatchGetMetricDataQuery UTCTime
batchGetMetricDataQuery_endDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetMetricDataQuery' {POSIX
endDate :: POSIX
$sel:endDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
endDate} -> POSIX
endDate) (\s :: BatchGetMetricDataQuery
s@BatchGetMetricDataQuery' {} POSIX
a -> BatchGetMetricDataQuery
s {$sel:endDate:BatchGetMetricDataQuery' :: POSIX
endDate = POSIX
a} :: BatchGetMetricDataQuery) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Prelude.Hashable BatchGetMetricDataQuery where
  hashWithSalt :: Int -> BatchGetMetricDataQuery -> Int
hashWithSalt Int
_salt BatchGetMetricDataQuery' {Maybe (HashMap MetricDimensionName Text)
Text
POSIX
Metric
MetricNamespace
endDate :: POSIX
startDate :: POSIX
metric :: Metric
namespace :: MetricNamespace
id :: Text
dimensions :: Maybe (HashMap MetricDimensionName Text)
$sel:endDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
$sel:startDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
$sel:metric:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Metric
$sel:namespace:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> MetricNamespace
$sel:id:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Text
$sel:dimensions:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Maybe (HashMap MetricDimensionName Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap MetricDimensionName Text)
dimensions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MetricNamespace
namespace
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Metric
metric
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
endDate

instance Prelude.NFData BatchGetMetricDataQuery where
  rnf :: BatchGetMetricDataQuery -> ()
rnf BatchGetMetricDataQuery' {Maybe (HashMap MetricDimensionName Text)
Text
POSIX
Metric
MetricNamespace
endDate :: POSIX
startDate :: POSIX
metric :: Metric
namespace :: MetricNamespace
id :: Text
dimensions :: Maybe (HashMap MetricDimensionName Text)
$sel:endDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
$sel:startDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
$sel:metric:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Metric
$sel:namespace:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> MetricNamespace
$sel:id:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Text
$sel:dimensions:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Maybe (HashMap MetricDimensionName Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap MetricDimensionName Text)
dimensions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MetricNamespace
namespace
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Metric
metric
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
endDate

instance Data.ToJSON BatchGetMetricDataQuery where
  toJSON :: BatchGetMetricDataQuery -> Value
toJSON BatchGetMetricDataQuery' {Maybe (HashMap MetricDimensionName Text)
Text
POSIX
Metric
MetricNamespace
endDate :: POSIX
startDate :: POSIX
metric :: Metric
namespace :: MetricNamespace
id :: Text
dimensions :: Maybe (HashMap MetricDimensionName Text)
$sel:endDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
$sel:startDate:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> POSIX
$sel:metric:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Metric
$sel:namespace:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> MetricNamespace
$sel:id:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Text
$sel:dimensions:BatchGetMetricDataQuery' :: BatchGetMetricDataQuery -> Maybe (HashMap MetricDimensionName Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Dimensions" 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 (HashMap MetricDimensionName Text)
dimensions,
            forall a. a -> Maybe a
Prelude.Just (Key
"Id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
id),
            forall a. a -> Maybe a
Prelude.Just (Key
"Namespace" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= MetricNamespace
namespace),
            forall a. a -> Maybe a
Prelude.Just (Key
"Metric" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Metric
metric),
            forall a. a -> Maybe a
Prelude.Just (Key
"StartDate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= POSIX
startDate),
            forall a. a -> Maybe a
Prelude.Just (Key
"EndDate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= POSIX
endDate)
          ]
      )