{-# 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.Personalize.ListMetricAttributions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists metric attributions.
--
-- This operation returns paginated results.
module Amazonka.Personalize.ListMetricAttributions
  ( -- * Creating a Request
    ListMetricAttributions (..),
    newListMetricAttributions,

    -- * Request Lenses
    listMetricAttributions_datasetGroupArn,
    listMetricAttributions_maxResults,
    listMetricAttributions_nextToken,

    -- * Destructuring the Response
    ListMetricAttributionsResponse (..),
    newListMetricAttributionsResponse,

    -- * Response Lenses
    listMetricAttributionsResponse_metricAttributions,
    listMetricAttributionsResponse_nextToken,
    listMetricAttributionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListMetricAttributions' smart constructor.
data ListMetricAttributions = ListMetricAttributions'
  { -- | The metric attributions\' dataset group Amazon Resource Name (ARN).
    ListMetricAttributions -> Maybe Text
datasetGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of metric attributions to return in one page of
    -- results.
    ListMetricAttributions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Specify the pagination token from a previous request to retrieve the
    -- next page of results.
    ListMetricAttributions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListMetricAttributions -> ListMetricAttributions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMetricAttributions -> ListMetricAttributions -> Bool
$c/= :: ListMetricAttributions -> ListMetricAttributions -> Bool
== :: ListMetricAttributions -> ListMetricAttributions -> Bool
$c== :: ListMetricAttributions -> ListMetricAttributions -> Bool
Prelude.Eq, ReadPrec [ListMetricAttributions]
ReadPrec ListMetricAttributions
Int -> ReadS ListMetricAttributions
ReadS [ListMetricAttributions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMetricAttributions]
$creadListPrec :: ReadPrec [ListMetricAttributions]
readPrec :: ReadPrec ListMetricAttributions
$creadPrec :: ReadPrec ListMetricAttributions
readList :: ReadS [ListMetricAttributions]
$creadList :: ReadS [ListMetricAttributions]
readsPrec :: Int -> ReadS ListMetricAttributions
$creadsPrec :: Int -> ReadS ListMetricAttributions
Prelude.Read, Int -> ListMetricAttributions -> ShowS
[ListMetricAttributions] -> ShowS
ListMetricAttributions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMetricAttributions] -> ShowS
$cshowList :: [ListMetricAttributions] -> ShowS
show :: ListMetricAttributions -> String
$cshow :: ListMetricAttributions -> String
showsPrec :: Int -> ListMetricAttributions -> ShowS
$cshowsPrec :: Int -> ListMetricAttributions -> ShowS
Prelude.Show, forall x. Rep ListMetricAttributions x -> ListMetricAttributions
forall x. ListMetricAttributions -> Rep ListMetricAttributions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMetricAttributions x -> ListMetricAttributions
$cfrom :: forall x. ListMetricAttributions -> Rep ListMetricAttributions x
Prelude.Generic)

-- |
-- Create a value of 'ListMetricAttributions' 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:
--
-- 'datasetGroupArn', 'listMetricAttributions_datasetGroupArn' - The metric attributions\' dataset group Amazon Resource Name (ARN).
--
-- 'maxResults', 'listMetricAttributions_maxResults' - The maximum number of metric attributions to return in one page of
-- results.
--
-- 'nextToken', 'listMetricAttributions_nextToken' - Specify the pagination token from a previous request to retrieve the
-- next page of results.
newListMetricAttributions ::
  ListMetricAttributions
newListMetricAttributions :: ListMetricAttributions
newListMetricAttributions =
  ListMetricAttributions'
    { $sel:datasetGroupArn:ListMetricAttributions' :: Maybe Text
datasetGroupArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMetricAttributions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMetricAttributions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The metric attributions\' dataset group Amazon Resource Name (ARN).
listMetricAttributions_datasetGroupArn :: Lens.Lens' ListMetricAttributions (Prelude.Maybe Prelude.Text)
listMetricAttributions_datasetGroupArn :: Lens' ListMetricAttributions (Maybe Text)
listMetricAttributions_datasetGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMetricAttributions' {Maybe Text
datasetGroupArn :: Maybe Text
$sel:datasetGroupArn:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
datasetGroupArn} -> Maybe Text
datasetGroupArn) (\s :: ListMetricAttributions
s@ListMetricAttributions' {} Maybe Text
a -> ListMetricAttributions
s {$sel:datasetGroupArn:ListMetricAttributions' :: Maybe Text
datasetGroupArn = Maybe Text
a} :: ListMetricAttributions)

-- | The maximum number of metric attributions to return in one page of
-- results.
listMetricAttributions_maxResults :: Lens.Lens' ListMetricAttributions (Prelude.Maybe Prelude.Natural)
listMetricAttributions_maxResults :: Lens' ListMetricAttributions (Maybe Natural)
listMetricAttributions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMetricAttributions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMetricAttributions' :: ListMetricAttributions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMetricAttributions
s@ListMetricAttributions' {} Maybe Natural
a -> ListMetricAttributions
s {$sel:maxResults:ListMetricAttributions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMetricAttributions)

-- | Specify the pagination token from a previous request to retrieve the
-- next page of results.
listMetricAttributions_nextToken :: Lens.Lens' ListMetricAttributions (Prelude.Maybe Prelude.Text)
listMetricAttributions_nextToken :: Lens' ListMetricAttributions (Maybe Text)
listMetricAttributions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMetricAttributions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMetricAttributions
s@ListMetricAttributions' {} Maybe Text
a -> ListMetricAttributions
s {$sel:nextToken:ListMetricAttributions' :: Maybe Text
nextToken = Maybe Text
a} :: ListMetricAttributions)

instance Core.AWSPager ListMetricAttributions where
  page :: ListMetricAttributions
-> AWSResponse ListMetricAttributions
-> Maybe ListMetricAttributions
page ListMetricAttributions
rq AWSResponse ListMetricAttributions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMetricAttributions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMetricAttributionsResponse (Maybe Text)
listMetricAttributionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMetricAttributions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListMetricAttributionsResponse (Maybe [MetricAttributionSummary])
listMetricAttributionsResponse_metricAttributions
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListMetricAttributions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListMetricAttributions (Maybe Text)
listMetricAttributions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMetricAttributions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMetricAttributionsResponse (Maybe Text)
listMetricAttributionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListMetricAttributions where
  type
    AWSResponse ListMetricAttributions =
      ListMetricAttributionsResponse
  request :: (Service -> Service)
-> ListMetricAttributions -> Request ListMetricAttributions
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 ListMetricAttributions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMetricAttributions)))
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 [MetricAttributionSummary]
-> Maybe Text -> Int -> ListMetricAttributionsResponse
ListMetricAttributionsResponse'
            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
"metricAttributions"
                            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 ListMetricAttributions where
  hashWithSalt :: Int -> ListMetricAttributions -> Int
hashWithSalt Int
_salt ListMetricAttributions' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
datasetGroupArn :: Maybe Text
$sel:nextToken:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
$sel:maxResults:ListMetricAttributions' :: ListMetricAttributions -> Maybe Natural
$sel:datasetGroupArn:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
datasetGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListMetricAttributions where
  rnf :: ListMetricAttributions -> ()
rnf ListMetricAttributions' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
datasetGroupArn :: Maybe Text
$sel:nextToken:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
$sel:maxResults:ListMetricAttributions' :: ListMetricAttributions -> Maybe Natural
$sel:datasetGroupArn:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
datasetGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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

instance Data.ToHeaders ListMetricAttributions where
  toHeaders :: ListMetricAttributions -> 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
"AmazonPersonalize.ListMetricAttributions" ::
                          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 ListMetricAttributions where
  toJSON :: ListMetricAttributions -> Value
toJSON ListMetricAttributions' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
datasetGroupArn :: Maybe Text
$sel:nextToken:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
$sel:maxResults:ListMetricAttributions' :: ListMetricAttributions -> Maybe Natural
$sel:datasetGroupArn:ListMetricAttributions' :: ListMetricAttributions -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"datasetGroupArn" 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
datasetGroupArn,
            (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
          ]
      )

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

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

-- | /See:/ 'newListMetricAttributionsResponse' smart constructor.
data ListMetricAttributionsResponse = ListMetricAttributionsResponse'
  { -- | The list of metric attributions.
    ListMetricAttributionsResponse -> Maybe [MetricAttributionSummary]
metricAttributions :: Prelude.Maybe [MetricAttributionSummary],
    -- | Specify the pagination token from a previous request to retrieve the
    -- next page of results.
    ListMetricAttributionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMetricAttributionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMetricAttributionsResponse
-> ListMetricAttributionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMetricAttributionsResponse
-> ListMetricAttributionsResponse -> Bool
$c/= :: ListMetricAttributionsResponse
-> ListMetricAttributionsResponse -> Bool
== :: ListMetricAttributionsResponse
-> ListMetricAttributionsResponse -> Bool
$c== :: ListMetricAttributionsResponse
-> ListMetricAttributionsResponse -> Bool
Prelude.Eq, ReadPrec [ListMetricAttributionsResponse]
ReadPrec ListMetricAttributionsResponse
Int -> ReadS ListMetricAttributionsResponse
ReadS [ListMetricAttributionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMetricAttributionsResponse]
$creadListPrec :: ReadPrec [ListMetricAttributionsResponse]
readPrec :: ReadPrec ListMetricAttributionsResponse
$creadPrec :: ReadPrec ListMetricAttributionsResponse
readList :: ReadS [ListMetricAttributionsResponse]
$creadList :: ReadS [ListMetricAttributionsResponse]
readsPrec :: Int -> ReadS ListMetricAttributionsResponse
$creadsPrec :: Int -> ReadS ListMetricAttributionsResponse
Prelude.Read, Int -> ListMetricAttributionsResponse -> ShowS
[ListMetricAttributionsResponse] -> ShowS
ListMetricAttributionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMetricAttributionsResponse] -> ShowS
$cshowList :: [ListMetricAttributionsResponse] -> ShowS
show :: ListMetricAttributionsResponse -> String
$cshow :: ListMetricAttributionsResponse -> String
showsPrec :: Int -> ListMetricAttributionsResponse -> ShowS
$cshowsPrec :: Int -> ListMetricAttributionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListMetricAttributionsResponse x
-> ListMetricAttributionsResponse
forall x.
ListMetricAttributionsResponse
-> Rep ListMetricAttributionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMetricAttributionsResponse x
-> ListMetricAttributionsResponse
$cfrom :: forall x.
ListMetricAttributionsResponse
-> Rep ListMetricAttributionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMetricAttributionsResponse' 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:
--
-- 'metricAttributions', 'listMetricAttributionsResponse_metricAttributions' - The list of metric attributions.
--
-- 'nextToken', 'listMetricAttributionsResponse_nextToken' - Specify the pagination token from a previous request to retrieve the
-- next page of results.
--
-- 'httpStatus', 'listMetricAttributionsResponse_httpStatus' - The response's http status code.
newListMetricAttributionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMetricAttributionsResponse
newListMetricAttributionsResponse :: Int -> ListMetricAttributionsResponse
newListMetricAttributionsResponse Int
pHttpStatus_ =
  ListMetricAttributionsResponse'
    { $sel:metricAttributions:ListMetricAttributionsResponse' :: Maybe [MetricAttributionSummary]
metricAttributions =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMetricAttributionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMetricAttributionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of metric attributions.
listMetricAttributionsResponse_metricAttributions :: Lens.Lens' ListMetricAttributionsResponse (Prelude.Maybe [MetricAttributionSummary])
listMetricAttributionsResponse_metricAttributions :: Lens'
  ListMetricAttributionsResponse (Maybe [MetricAttributionSummary])
listMetricAttributionsResponse_metricAttributions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMetricAttributionsResponse' {Maybe [MetricAttributionSummary]
metricAttributions :: Maybe [MetricAttributionSummary]
$sel:metricAttributions:ListMetricAttributionsResponse' :: ListMetricAttributionsResponse -> Maybe [MetricAttributionSummary]
metricAttributions} -> Maybe [MetricAttributionSummary]
metricAttributions) (\s :: ListMetricAttributionsResponse
s@ListMetricAttributionsResponse' {} Maybe [MetricAttributionSummary]
a -> ListMetricAttributionsResponse
s {$sel:metricAttributions:ListMetricAttributionsResponse' :: Maybe [MetricAttributionSummary]
metricAttributions = Maybe [MetricAttributionSummary]
a} :: ListMetricAttributionsResponse) 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

-- | Specify the pagination token from a previous request to retrieve the
-- next page of results.
listMetricAttributionsResponse_nextToken :: Lens.Lens' ListMetricAttributionsResponse (Prelude.Maybe Prelude.Text)
listMetricAttributionsResponse_nextToken :: Lens' ListMetricAttributionsResponse (Maybe Text)
listMetricAttributionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMetricAttributionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMetricAttributionsResponse' :: ListMetricAttributionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMetricAttributionsResponse
s@ListMetricAttributionsResponse' {} Maybe Text
a -> ListMetricAttributionsResponse
s {$sel:nextToken:ListMetricAttributionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMetricAttributionsResponse)

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

instance
  Prelude.NFData
    ListMetricAttributionsResponse
  where
  rnf :: ListMetricAttributionsResponse -> ()
rnf ListMetricAttributionsResponse' {Int
Maybe [MetricAttributionSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
metricAttributions :: Maybe [MetricAttributionSummary]
$sel:httpStatus:ListMetricAttributionsResponse' :: ListMetricAttributionsResponse -> Int
$sel:nextToken:ListMetricAttributionsResponse' :: ListMetricAttributionsResponse -> Maybe Text
$sel:metricAttributions:ListMetricAttributionsResponse' :: ListMetricAttributionsResponse -> Maybe [MetricAttributionSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [MetricAttributionSummary]
metricAttributions
      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