{-# 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.Rum.ListRumMetricsDestinations
-- 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 a list of destinations that you have created to receive RUM
-- extended metrics, for the specified app monitor.
--
-- For more information about extended metrics, see
-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_AddRumMetrcs.html AddRumMetrics>.
--
-- This operation returns paginated results.
module Amazonka.Rum.ListRumMetricsDestinations
  ( -- * Creating a Request
    ListRumMetricsDestinations (..),
    newListRumMetricsDestinations,

    -- * Request Lenses
    listRumMetricsDestinations_maxResults,
    listRumMetricsDestinations_nextToken,
    listRumMetricsDestinations_appMonitorName,

    -- * Destructuring the Response
    ListRumMetricsDestinationsResponse (..),
    newListRumMetricsDestinationsResponse,

    -- * Response Lenses
    listRumMetricsDestinationsResponse_destinations,
    listRumMetricsDestinationsResponse_nextToken,
    listRumMetricsDestinationsResponse_httpStatus,
  )
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Rum.Types

-- | /See:/ 'newListRumMetricsDestinations' smart constructor.
data ListRumMetricsDestinations = ListRumMetricsDestinations'
  { -- | The maximum number of results to return in one operation. The default is
    -- 50. The maximum that you can specify is 100.
    --
    -- To retrieve the remaining results, make another call with the returned
    -- @NextToken@ value.
    ListRumMetricsDestinations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Use the token returned by the previous operation to request the next
    -- page of results.
    ListRumMetricsDestinations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the app monitor associated with the destinations that you
    -- want to retrieve.
    ListRumMetricsDestinations -> Text
appMonitorName :: Prelude.Text
  }
  deriving (ListRumMetricsDestinations -> ListRumMetricsDestinations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRumMetricsDestinations -> ListRumMetricsDestinations -> Bool
$c/= :: ListRumMetricsDestinations -> ListRumMetricsDestinations -> Bool
== :: ListRumMetricsDestinations -> ListRumMetricsDestinations -> Bool
$c== :: ListRumMetricsDestinations -> ListRumMetricsDestinations -> Bool
Prelude.Eq, ReadPrec [ListRumMetricsDestinations]
ReadPrec ListRumMetricsDestinations
Int -> ReadS ListRumMetricsDestinations
ReadS [ListRumMetricsDestinations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRumMetricsDestinations]
$creadListPrec :: ReadPrec [ListRumMetricsDestinations]
readPrec :: ReadPrec ListRumMetricsDestinations
$creadPrec :: ReadPrec ListRumMetricsDestinations
readList :: ReadS [ListRumMetricsDestinations]
$creadList :: ReadS [ListRumMetricsDestinations]
readsPrec :: Int -> ReadS ListRumMetricsDestinations
$creadsPrec :: Int -> ReadS ListRumMetricsDestinations
Prelude.Read, Int -> ListRumMetricsDestinations -> ShowS
[ListRumMetricsDestinations] -> ShowS
ListRumMetricsDestinations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRumMetricsDestinations] -> ShowS
$cshowList :: [ListRumMetricsDestinations] -> ShowS
show :: ListRumMetricsDestinations -> String
$cshow :: ListRumMetricsDestinations -> String
showsPrec :: Int -> ListRumMetricsDestinations -> ShowS
$cshowsPrec :: Int -> ListRumMetricsDestinations -> ShowS
Prelude.Show, forall x.
Rep ListRumMetricsDestinations x -> ListRumMetricsDestinations
forall x.
ListRumMetricsDestinations -> Rep ListRumMetricsDestinations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRumMetricsDestinations x -> ListRumMetricsDestinations
$cfrom :: forall x.
ListRumMetricsDestinations -> Rep ListRumMetricsDestinations x
Prelude.Generic)

-- |
-- Create a value of 'ListRumMetricsDestinations' 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', 'listRumMetricsDestinations_maxResults' - The maximum number of results to return in one operation. The default is
-- 50. The maximum that you can specify is 100.
--
-- To retrieve the remaining results, make another call with the returned
-- @NextToken@ value.
--
-- 'nextToken', 'listRumMetricsDestinations_nextToken' - Use the token returned by the previous operation to request the next
-- page of results.
--
-- 'appMonitorName', 'listRumMetricsDestinations_appMonitorName' - The name of the app monitor associated with the destinations that you
-- want to retrieve.
newListRumMetricsDestinations ::
  -- | 'appMonitorName'
  Prelude.Text ->
  ListRumMetricsDestinations
newListRumMetricsDestinations :: Text -> ListRumMetricsDestinations
newListRumMetricsDestinations Text
pAppMonitorName_ =
  ListRumMetricsDestinations'
    { $sel:maxResults:ListRumMetricsDestinations' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRumMetricsDestinations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:appMonitorName:ListRumMetricsDestinations' :: Text
appMonitorName = Text
pAppMonitorName_
    }

-- | The maximum number of results to return in one operation. The default is
-- 50. The maximum that you can specify is 100.
--
-- To retrieve the remaining results, make another call with the returned
-- @NextToken@ value.
listRumMetricsDestinations_maxResults :: Lens.Lens' ListRumMetricsDestinations (Prelude.Maybe Prelude.Natural)
listRumMetricsDestinations_maxResults :: Lens' ListRumMetricsDestinations (Maybe Natural)
listRumMetricsDestinations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRumMetricsDestinations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRumMetricsDestinations
s@ListRumMetricsDestinations' {} Maybe Natural
a -> ListRumMetricsDestinations
s {$sel:maxResults:ListRumMetricsDestinations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRumMetricsDestinations)

-- | Use the token returned by the previous operation to request the next
-- page of results.
listRumMetricsDestinations_nextToken :: Lens.Lens' ListRumMetricsDestinations (Prelude.Maybe Prelude.Text)
listRumMetricsDestinations_nextToken :: Lens' ListRumMetricsDestinations (Maybe Text)
listRumMetricsDestinations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRumMetricsDestinations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRumMetricsDestinations
s@ListRumMetricsDestinations' {} Maybe Text
a -> ListRumMetricsDestinations
s {$sel:nextToken:ListRumMetricsDestinations' :: Maybe Text
nextToken = Maybe Text
a} :: ListRumMetricsDestinations)

-- | The name of the app monitor associated with the destinations that you
-- want to retrieve.
listRumMetricsDestinations_appMonitorName :: Lens.Lens' ListRumMetricsDestinations Prelude.Text
listRumMetricsDestinations_appMonitorName :: Lens' ListRumMetricsDestinations Text
listRumMetricsDestinations_appMonitorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRumMetricsDestinations' {Text
appMonitorName :: Text
$sel:appMonitorName:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Text
appMonitorName} -> Text
appMonitorName) (\s :: ListRumMetricsDestinations
s@ListRumMetricsDestinations' {} Text
a -> ListRumMetricsDestinations
s {$sel:appMonitorName:ListRumMetricsDestinations' :: Text
appMonitorName = Text
a} :: ListRumMetricsDestinations)

instance Core.AWSPager ListRumMetricsDestinations where
  page :: ListRumMetricsDestinations
-> AWSResponse ListRumMetricsDestinations
-> Maybe ListRumMetricsDestinations
page ListRumMetricsDestinations
rq AWSResponse ListRumMetricsDestinations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRumMetricsDestinations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRumMetricsDestinationsResponse (Maybe Text)
listRumMetricsDestinationsResponse_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 ListRumMetricsDestinations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListRumMetricsDestinationsResponse
  (Maybe [MetricDestinationSummary])
listRumMetricsDestinationsResponse_destinations
            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.$ ListRumMetricsDestinations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListRumMetricsDestinations (Maybe Text)
listRumMetricsDestinations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRumMetricsDestinations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRumMetricsDestinationsResponse (Maybe Text)
listRumMetricsDestinationsResponse_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 ListRumMetricsDestinations where
  type
    AWSResponse ListRumMetricsDestinations =
      ListRumMetricsDestinationsResponse
  request :: (Service -> Service)
-> ListRumMetricsDestinations -> Request ListRumMetricsDestinations
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListRumMetricsDestinations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRumMetricsDestinations)))
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 [MetricDestinationSummary]
-> Maybe Text -> Int -> ListRumMetricsDestinationsResponse
ListRumMetricsDestinationsResponse'
            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
"Destinations" 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 ListRumMetricsDestinations where
  hashWithSalt :: Int -> ListRumMetricsDestinations -> Int
hashWithSalt Int
_salt ListRumMetricsDestinations' {Maybe Natural
Maybe Text
Text
appMonitorName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appMonitorName:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Text
$sel:nextToken:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Text
$sel:maxResults:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> 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` Text
appMonitorName

instance Prelude.NFData ListRumMetricsDestinations where
  rnf :: ListRumMetricsDestinations -> ()
rnf ListRumMetricsDestinations' {Maybe Natural
Maybe Text
Text
appMonitorName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appMonitorName:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Text
$sel:nextToken:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Text
$sel:maxResults:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> 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 Text
appMonitorName

instance Data.ToHeaders ListRumMetricsDestinations where
  toHeaders :: ListRumMetricsDestinations -> 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.ToPath ListRumMetricsDestinations where
  toPath :: ListRumMetricsDestinations -> ByteString
toPath ListRumMetricsDestinations' {Maybe Natural
Maybe Text
Text
appMonitorName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appMonitorName:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Text
$sel:nextToken:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Text
$sel:maxResults:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/rummetrics/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
appMonitorName,
        ByteString
"/metricsdestination"
      ]

instance Data.ToQuery ListRumMetricsDestinations where
  toQuery :: ListRumMetricsDestinations -> QueryString
toQuery ListRumMetricsDestinations' {Maybe Natural
Maybe Text
Text
appMonitorName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appMonitorName:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Text
$sel:nextToken:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Text
$sel:maxResults:ListRumMetricsDestinations' :: ListRumMetricsDestinations -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListRumMetricsDestinationsResponse' smart constructor.
data ListRumMetricsDestinationsResponse = ListRumMetricsDestinationsResponse'
  { -- | The list of CloudWatch RUM extended metrics destinations associated with
    -- the app monitor that you specified.
    ListRumMetricsDestinationsResponse
-> Maybe [MetricDestinationSummary]
destinations :: Prelude.Maybe [MetricDestinationSummary],
    -- | A token that you can use in a subsequent operation to retrieve the next
    -- set of results.
    ListRumMetricsDestinationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListRumMetricsDestinationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRumMetricsDestinationsResponse
-> ListRumMetricsDestinationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRumMetricsDestinationsResponse
-> ListRumMetricsDestinationsResponse -> Bool
$c/= :: ListRumMetricsDestinationsResponse
-> ListRumMetricsDestinationsResponse -> Bool
== :: ListRumMetricsDestinationsResponse
-> ListRumMetricsDestinationsResponse -> Bool
$c== :: ListRumMetricsDestinationsResponse
-> ListRumMetricsDestinationsResponse -> Bool
Prelude.Eq, ReadPrec [ListRumMetricsDestinationsResponse]
ReadPrec ListRumMetricsDestinationsResponse
Int -> ReadS ListRumMetricsDestinationsResponse
ReadS [ListRumMetricsDestinationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRumMetricsDestinationsResponse]
$creadListPrec :: ReadPrec [ListRumMetricsDestinationsResponse]
readPrec :: ReadPrec ListRumMetricsDestinationsResponse
$creadPrec :: ReadPrec ListRumMetricsDestinationsResponse
readList :: ReadS [ListRumMetricsDestinationsResponse]
$creadList :: ReadS [ListRumMetricsDestinationsResponse]
readsPrec :: Int -> ReadS ListRumMetricsDestinationsResponse
$creadsPrec :: Int -> ReadS ListRumMetricsDestinationsResponse
Prelude.Read, Int -> ListRumMetricsDestinationsResponse -> ShowS
[ListRumMetricsDestinationsResponse] -> ShowS
ListRumMetricsDestinationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRumMetricsDestinationsResponse] -> ShowS
$cshowList :: [ListRumMetricsDestinationsResponse] -> ShowS
show :: ListRumMetricsDestinationsResponse -> String
$cshow :: ListRumMetricsDestinationsResponse -> String
showsPrec :: Int -> ListRumMetricsDestinationsResponse -> ShowS
$cshowsPrec :: Int -> ListRumMetricsDestinationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListRumMetricsDestinationsResponse x
-> ListRumMetricsDestinationsResponse
forall x.
ListRumMetricsDestinationsResponse
-> Rep ListRumMetricsDestinationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRumMetricsDestinationsResponse x
-> ListRumMetricsDestinationsResponse
$cfrom :: forall x.
ListRumMetricsDestinationsResponse
-> Rep ListRumMetricsDestinationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRumMetricsDestinationsResponse' 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:
--
-- 'destinations', 'listRumMetricsDestinationsResponse_destinations' - The list of CloudWatch RUM extended metrics destinations associated with
-- the app monitor that you specified.
--
-- 'nextToken', 'listRumMetricsDestinationsResponse_nextToken' - A token that you can use in a subsequent operation to retrieve the next
-- set of results.
--
-- 'httpStatus', 'listRumMetricsDestinationsResponse_httpStatus' - The response's http status code.
newListRumMetricsDestinationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRumMetricsDestinationsResponse
newListRumMetricsDestinationsResponse :: Int -> ListRumMetricsDestinationsResponse
newListRumMetricsDestinationsResponse Int
pHttpStatus_ =
  ListRumMetricsDestinationsResponse'
    { $sel:destinations:ListRumMetricsDestinationsResponse' :: Maybe [MetricDestinationSummary]
destinations =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRumMetricsDestinationsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRumMetricsDestinationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of CloudWatch RUM extended metrics destinations associated with
-- the app monitor that you specified.
listRumMetricsDestinationsResponse_destinations :: Lens.Lens' ListRumMetricsDestinationsResponse (Prelude.Maybe [MetricDestinationSummary])
listRumMetricsDestinationsResponse_destinations :: Lens'
  ListRumMetricsDestinationsResponse
  (Maybe [MetricDestinationSummary])
listRumMetricsDestinationsResponse_destinations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRumMetricsDestinationsResponse' {Maybe [MetricDestinationSummary]
destinations :: Maybe [MetricDestinationSummary]
$sel:destinations:ListRumMetricsDestinationsResponse' :: ListRumMetricsDestinationsResponse
-> Maybe [MetricDestinationSummary]
destinations} -> Maybe [MetricDestinationSummary]
destinations) (\s :: ListRumMetricsDestinationsResponse
s@ListRumMetricsDestinationsResponse' {} Maybe [MetricDestinationSummary]
a -> ListRumMetricsDestinationsResponse
s {$sel:destinations:ListRumMetricsDestinationsResponse' :: Maybe [MetricDestinationSummary]
destinations = Maybe [MetricDestinationSummary]
a} :: ListRumMetricsDestinationsResponse) 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

-- | A token that you can use in a subsequent operation to retrieve the next
-- set of results.
listRumMetricsDestinationsResponse_nextToken :: Lens.Lens' ListRumMetricsDestinationsResponse (Prelude.Maybe Prelude.Text)
listRumMetricsDestinationsResponse_nextToken :: Lens' ListRumMetricsDestinationsResponse (Maybe Text)
listRumMetricsDestinationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRumMetricsDestinationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRumMetricsDestinationsResponse' :: ListRumMetricsDestinationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRumMetricsDestinationsResponse
s@ListRumMetricsDestinationsResponse' {} Maybe Text
a -> ListRumMetricsDestinationsResponse
s {$sel:nextToken:ListRumMetricsDestinationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRumMetricsDestinationsResponse)

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

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