{-# 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.Pinpoint.GetJourneyExecutionMetrics
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves (queries) pre-aggregated data for a standard execution metric
-- that applies to a journey.
module Amazonka.Pinpoint.GetJourneyExecutionMetrics
  ( -- * Creating a Request
    GetJourneyExecutionMetrics (..),
    newGetJourneyExecutionMetrics,

    -- * Request Lenses
    getJourneyExecutionMetrics_nextToken,
    getJourneyExecutionMetrics_pageSize,
    getJourneyExecutionMetrics_applicationId,
    getJourneyExecutionMetrics_journeyId,

    -- * Destructuring the Response
    GetJourneyExecutionMetricsResponse (..),
    newGetJourneyExecutionMetricsResponse,

    -- * Response Lenses
    getJourneyExecutionMetricsResponse_httpStatus,
    getJourneyExecutionMetricsResponse_journeyExecutionMetricsResponse,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetJourneyExecutionMetrics' smart constructor.
data GetJourneyExecutionMetrics = GetJourneyExecutionMetrics'
  { -- | The string that specifies which page of results to return in a paginated
    -- response. This parameter is not supported for application, campaign, and
    -- journey metrics.
    GetJourneyExecutionMetrics -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to include in each page of a paginated
    -- response. This parameter is not supported for application, campaign, and
    -- journey metrics.
    GetJourneyExecutionMetrics -> Maybe Text
pageSize :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the application. This identifier is displayed
    -- as the __Project ID__ on the Amazon Pinpoint console.
    GetJourneyExecutionMetrics -> Text
applicationId :: Prelude.Text,
    -- | The unique identifier for the journey.
    GetJourneyExecutionMetrics -> Text
journeyId :: Prelude.Text
  }
  deriving (GetJourneyExecutionMetrics -> GetJourneyExecutionMetrics -> Bool
(GetJourneyExecutionMetrics -> GetJourneyExecutionMetrics -> Bool)
-> (GetJourneyExecutionMetrics
    -> GetJourneyExecutionMetrics -> Bool)
-> Eq GetJourneyExecutionMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetJourneyExecutionMetrics -> GetJourneyExecutionMetrics -> Bool
$c/= :: GetJourneyExecutionMetrics -> GetJourneyExecutionMetrics -> Bool
== :: GetJourneyExecutionMetrics -> GetJourneyExecutionMetrics -> Bool
$c== :: GetJourneyExecutionMetrics -> GetJourneyExecutionMetrics -> Bool
Prelude.Eq, ReadPrec [GetJourneyExecutionMetrics]
ReadPrec GetJourneyExecutionMetrics
Int -> ReadS GetJourneyExecutionMetrics
ReadS [GetJourneyExecutionMetrics]
(Int -> ReadS GetJourneyExecutionMetrics)
-> ReadS [GetJourneyExecutionMetrics]
-> ReadPrec GetJourneyExecutionMetrics
-> ReadPrec [GetJourneyExecutionMetrics]
-> Read GetJourneyExecutionMetrics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetJourneyExecutionMetrics]
$creadListPrec :: ReadPrec [GetJourneyExecutionMetrics]
readPrec :: ReadPrec GetJourneyExecutionMetrics
$creadPrec :: ReadPrec GetJourneyExecutionMetrics
readList :: ReadS [GetJourneyExecutionMetrics]
$creadList :: ReadS [GetJourneyExecutionMetrics]
readsPrec :: Int -> ReadS GetJourneyExecutionMetrics
$creadsPrec :: Int -> ReadS GetJourneyExecutionMetrics
Prelude.Read, Int -> GetJourneyExecutionMetrics -> ShowS
[GetJourneyExecutionMetrics] -> ShowS
GetJourneyExecutionMetrics -> String
(Int -> GetJourneyExecutionMetrics -> ShowS)
-> (GetJourneyExecutionMetrics -> String)
-> ([GetJourneyExecutionMetrics] -> ShowS)
-> Show GetJourneyExecutionMetrics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetJourneyExecutionMetrics] -> ShowS
$cshowList :: [GetJourneyExecutionMetrics] -> ShowS
show :: GetJourneyExecutionMetrics -> String
$cshow :: GetJourneyExecutionMetrics -> String
showsPrec :: Int -> GetJourneyExecutionMetrics -> ShowS
$cshowsPrec :: Int -> GetJourneyExecutionMetrics -> ShowS
Prelude.Show, (forall x.
 GetJourneyExecutionMetrics -> Rep GetJourneyExecutionMetrics x)
-> (forall x.
    Rep GetJourneyExecutionMetrics x -> GetJourneyExecutionMetrics)
-> Generic GetJourneyExecutionMetrics
forall x.
Rep GetJourneyExecutionMetrics x -> GetJourneyExecutionMetrics
forall x.
GetJourneyExecutionMetrics -> Rep GetJourneyExecutionMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetJourneyExecutionMetrics x -> GetJourneyExecutionMetrics
$cfrom :: forall x.
GetJourneyExecutionMetrics -> Rep GetJourneyExecutionMetrics x
Prelude.Generic)

-- |
-- Create a value of 'GetJourneyExecutionMetrics' 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:
--
-- 'nextToken', 'getJourneyExecutionMetrics_nextToken' - The string that specifies which page of results to return in a paginated
-- response. This parameter is not supported for application, campaign, and
-- journey metrics.
--
-- 'pageSize', 'getJourneyExecutionMetrics_pageSize' - The maximum number of items to include in each page of a paginated
-- response. This parameter is not supported for application, campaign, and
-- journey metrics.
--
-- 'applicationId', 'getJourneyExecutionMetrics_applicationId' - The unique identifier for the application. This identifier is displayed
-- as the __Project ID__ on the Amazon Pinpoint console.
--
-- 'journeyId', 'getJourneyExecutionMetrics_journeyId' - The unique identifier for the journey.
newGetJourneyExecutionMetrics ::
  -- | 'applicationId'
  Prelude.Text ->
  -- | 'journeyId'
  Prelude.Text ->
  GetJourneyExecutionMetrics
newGetJourneyExecutionMetrics :: Text -> Text -> GetJourneyExecutionMetrics
newGetJourneyExecutionMetrics
  Text
pApplicationId_
  Text
pJourneyId_ =
    GetJourneyExecutionMetrics' :: Maybe Text
-> Maybe Text -> Text -> Text -> GetJourneyExecutionMetrics
GetJourneyExecutionMetrics'
      { $sel:nextToken:GetJourneyExecutionMetrics' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pageSize:GetJourneyExecutionMetrics' :: Maybe Text
pageSize = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationId:GetJourneyExecutionMetrics' :: Text
applicationId = Text
pApplicationId_,
        $sel:journeyId:GetJourneyExecutionMetrics' :: Text
journeyId = Text
pJourneyId_
      }

-- | The string that specifies which page of results to return in a paginated
-- response. This parameter is not supported for application, campaign, and
-- journey metrics.
getJourneyExecutionMetrics_nextToken :: Lens.Lens' GetJourneyExecutionMetrics (Prelude.Maybe Prelude.Text)
getJourneyExecutionMetrics_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetJourneyExecutionMetrics -> f GetJourneyExecutionMetrics
getJourneyExecutionMetrics_nextToken = (GetJourneyExecutionMetrics -> Maybe Text)
-> (GetJourneyExecutionMetrics
    -> Maybe Text -> GetJourneyExecutionMetrics)
-> Lens
     GetJourneyExecutionMetrics
     GetJourneyExecutionMetrics
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetJourneyExecutionMetrics' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetJourneyExecutionMetrics
s@GetJourneyExecutionMetrics' {} Maybe Text
a -> GetJourneyExecutionMetrics
s {$sel:nextToken:GetJourneyExecutionMetrics' :: Maybe Text
nextToken = Maybe Text
a} :: GetJourneyExecutionMetrics)

-- | The maximum number of items to include in each page of a paginated
-- response. This parameter is not supported for application, campaign, and
-- journey metrics.
getJourneyExecutionMetrics_pageSize :: Lens.Lens' GetJourneyExecutionMetrics (Prelude.Maybe Prelude.Text)
getJourneyExecutionMetrics_pageSize :: (Maybe Text -> f (Maybe Text))
-> GetJourneyExecutionMetrics -> f GetJourneyExecutionMetrics
getJourneyExecutionMetrics_pageSize = (GetJourneyExecutionMetrics -> Maybe Text)
-> (GetJourneyExecutionMetrics
    -> Maybe Text -> GetJourneyExecutionMetrics)
-> Lens
     GetJourneyExecutionMetrics
     GetJourneyExecutionMetrics
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetJourneyExecutionMetrics' {Maybe Text
pageSize :: Maybe Text
$sel:pageSize:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Maybe Text
pageSize} -> Maybe Text
pageSize) (\s :: GetJourneyExecutionMetrics
s@GetJourneyExecutionMetrics' {} Maybe Text
a -> GetJourneyExecutionMetrics
s {$sel:pageSize:GetJourneyExecutionMetrics' :: Maybe Text
pageSize = Maybe Text
a} :: GetJourneyExecutionMetrics)

-- | The unique identifier for the application. This identifier is displayed
-- as the __Project ID__ on the Amazon Pinpoint console.
getJourneyExecutionMetrics_applicationId :: Lens.Lens' GetJourneyExecutionMetrics Prelude.Text
getJourneyExecutionMetrics_applicationId :: (Text -> f Text)
-> GetJourneyExecutionMetrics -> f GetJourneyExecutionMetrics
getJourneyExecutionMetrics_applicationId = (GetJourneyExecutionMetrics -> Text)
-> (GetJourneyExecutionMetrics
    -> Text -> GetJourneyExecutionMetrics)
-> Lens
     GetJourneyExecutionMetrics GetJourneyExecutionMetrics Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetJourneyExecutionMetrics' {Text
applicationId :: Text
$sel:applicationId:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Text
applicationId} -> Text
applicationId) (\s :: GetJourneyExecutionMetrics
s@GetJourneyExecutionMetrics' {} Text
a -> GetJourneyExecutionMetrics
s {$sel:applicationId:GetJourneyExecutionMetrics' :: Text
applicationId = Text
a} :: GetJourneyExecutionMetrics)

-- | The unique identifier for the journey.
getJourneyExecutionMetrics_journeyId :: Lens.Lens' GetJourneyExecutionMetrics Prelude.Text
getJourneyExecutionMetrics_journeyId :: (Text -> f Text)
-> GetJourneyExecutionMetrics -> f GetJourneyExecutionMetrics
getJourneyExecutionMetrics_journeyId = (GetJourneyExecutionMetrics -> Text)
-> (GetJourneyExecutionMetrics
    -> Text -> GetJourneyExecutionMetrics)
-> Lens
     GetJourneyExecutionMetrics GetJourneyExecutionMetrics Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetJourneyExecutionMetrics' {Text
journeyId :: Text
$sel:journeyId:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Text
journeyId} -> Text
journeyId) (\s :: GetJourneyExecutionMetrics
s@GetJourneyExecutionMetrics' {} Text
a -> GetJourneyExecutionMetrics
s {$sel:journeyId:GetJourneyExecutionMetrics' :: Text
journeyId = Text
a} :: GetJourneyExecutionMetrics)

instance Core.AWSRequest GetJourneyExecutionMetrics where
  type
    AWSResponse GetJourneyExecutionMetrics =
      GetJourneyExecutionMetricsResponse
  request :: GetJourneyExecutionMetrics -> Request GetJourneyExecutionMetrics
request = Service
-> GetJourneyExecutionMetrics -> Request GetJourneyExecutionMetrics
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetJourneyExecutionMetrics
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetJourneyExecutionMetrics)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetJourneyExecutionMetrics))
-> Logger
-> Service
-> Proxy GetJourneyExecutionMetrics
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetJourneyExecutionMetrics)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int
-> JourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse
GetJourneyExecutionMetricsResponse'
            (Int
 -> JourneyExecutionMetricsResponse
 -> GetJourneyExecutionMetricsResponse)
-> Either String Int
-> Either
     String
     (JourneyExecutionMetricsResponse
      -> GetJourneyExecutionMetricsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  (JourneyExecutionMetricsResponse
   -> GetJourneyExecutionMetricsResponse)
-> Either String JourneyExecutionMetricsResponse
-> Either String GetJourneyExecutionMetricsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String JourneyExecutionMetricsResponse
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
      )

instance Prelude.Hashable GetJourneyExecutionMetrics

instance Prelude.NFData GetJourneyExecutionMetrics

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

instance Core.ToPath GetJourneyExecutionMetrics where
  toPath :: GetJourneyExecutionMetrics -> ByteString
toPath GetJourneyExecutionMetrics' {Maybe Text
Text
journeyId :: Text
applicationId :: Text
pageSize :: Maybe Text
nextToken :: Maybe Text
$sel:journeyId:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Text
$sel:applicationId:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Text
$sel:pageSize:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Maybe Text
$sel:nextToken:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/apps/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationId,
        ByteString
"/journeys/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
journeyId,
        ByteString
"/execution-metrics"
      ]

instance Core.ToQuery GetJourneyExecutionMetrics where
  toQuery :: GetJourneyExecutionMetrics -> QueryString
toQuery GetJourneyExecutionMetrics' {Maybe Text
Text
journeyId :: Text
applicationId :: Text
pageSize :: Maybe Text
nextToken :: Maybe Text
$sel:journeyId:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Text
$sel:applicationId:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Text
$sel:pageSize:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Maybe Text
$sel:nextToken:GetJourneyExecutionMetrics' :: GetJourneyExecutionMetrics -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"page-size" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
pageSize
      ]

-- | /See:/ 'newGetJourneyExecutionMetricsResponse' smart constructor.
data GetJourneyExecutionMetricsResponse = GetJourneyExecutionMetricsResponse'
  { -- | The response's http status code.
    GetJourneyExecutionMetricsResponse -> Int
httpStatus :: Prelude.Int,
    GetJourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse :: JourneyExecutionMetricsResponse
  }
  deriving (GetJourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse -> Bool
(GetJourneyExecutionMetricsResponse
 -> GetJourneyExecutionMetricsResponse -> Bool)
-> (GetJourneyExecutionMetricsResponse
    -> GetJourneyExecutionMetricsResponse -> Bool)
-> Eq GetJourneyExecutionMetricsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetJourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse -> Bool
$c/= :: GetJourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse -> Bool
== :: GetJourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse -> Bool
$c== :: GetJourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse -> Bool
Prelude.Eq, ReadPrec [GetJourneyExecutionMetricsResponse]
ReadPrec GetJourneyExecutionMetricsResponse
Int -> ReadS GetJourneyExecutionMetricsResponse
ReadS [GetJourneyExecutionMetricsResponse]
(Int -> ReadS GetJourneyExecutionMetricsResponse)
-> ReadS [GetJourneyExecutionMetricsResponse]
-> ReadPrec GetJourneyExecutionMetricsResponse
-> ReadPrec [GetJourneyExecutionMetricsResponse]
-> Read GetJourneyExecutionMetricsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetJourneyExecutionMetricsResponse]
$creadListPrec :: ReadPrec [GetJourneyExecutionMetricsResponse]
readPrec :: ReadPrec GetJourneyExecutionMetricsResponse
$creadPrec :: ReadPrec GetJourneyExecutionMetricsResponse
readList :: ReadS [GetJourneyExecutionMetricsResponse]
$creadList :: ReadS [GetJourneyExecutionMetricsResponse]
readsPrec :: Int -> ReadS GetJourneyExecutionMetricsResponse
$creadsPrec :: Int -> ReadS GetJourneyExecutionMetricsResponse
Prelude.Read, Int -> GetJourneyExecutionMetricsResponse -> ShowS
[GetJourneyExecutionMetricsResponse] -> ShowS
GetJourneyExecutionMetricsResponse -> String
(Int -> GetJourneyExecutionMetricsResponse -> ShowS)
-> (GetJourneyExecutionMetricsResponse -> String)
-> ([GetJourneyExecutionMetricsResponse] -> ShowS)
-> Show GetJourneyExecutionMetricsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetJourneyExecutionMetricsResponse] -> ShowS
$cshowList :: [GetJourneyExecutionMetricsResponse] -> ShowS
show :: GetJourneyExecutionMetricsResponse -> String
$cshow :: GetJourneyExecutionMetricsResponse -> String
showsPrec :: Int -> GetJourneyExecutionMetricsResponse -> ShowS
$cshowsPrec :: Int -> GetJourneyExecutionMetricsResponse -> ShowS
Prelude.Show, (forall x.
 GetJourneyExecutionMetricsResponse
 -> Rep GetJourneyExecutionMetricsResponse x)
-> (forall x.
    Rep GetJourneyExecutionMetricsResponse x
    -> GetJourneyExecutionMetricsResponse)
-> Generic GetJourneyExecutionMetricsResponse
forall x.
Rep GetJourneyExecutionMetricsResponse x
-> GetJourneyExecutionMetricsResponse
forall x.
GetJourneyExecutionMetricsResponse
-> Rep GetJourneyExecutionMetricsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetJourneyExecutionMetricsResponse x
-> GetJourneyExecutionMetricsResponse
$cfrom :: forall x.
GetJourneyExecutionMetricsResponse
-> Rep GetJourneyExecutionMetricsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetJourneyExecutionMetricsResponse' 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', 'getJourneyExecutionMetricsResponse_httpStatus' - The response's http status code.
--
-- 'journeyExecutionMetricsResponse', 'getJourneyExecutionMetricsResponse_journeyExecutionMetricsResponse' - Undocumented member.
newGetJourneyExecutionMetricsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'journeyExecutionMetricsResponse'
  JourneyExecutionMetricsResponse ->
  GetJourneyExecutionMetricsResponse
newGetJourneyExecutionMetricsResponse :: Int
-> JourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse
newGetJourneyExecutionMetricsResponse
  Int
pHttpStatus_
  JourneyExecutionMetricsResponse
pJourneyExecutionMetricsResponse_ =
    GetJourneyExecutionMetricsResponse' :: Int
-> JourneyExecutionMetricsResponse
-> GetJourneyExecutionMetricsResponse
GetJourneyExecutionMetricsResponse'
      { $sel:httpStatus:GetJourneyExecutionMetricsResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:journeyExecutionMetricsResponse:GetJourneyExecutionMetricsResponse' :: JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse =
          JourneyExecutionMetricsResponse
pJourneyExecutionMetricsResponse_
      }

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

-- | Undocumented member.
getJourneyExecutionMetricsResponse_journeyExecutionMetricsResponse :: Lens.Lens' GetJourneyExecutionMetricsResponse JourneyExecutionMetricsResponse
getJourneyExecutionMetricsResponse_journeyExecutionMetricsResponse :: (JourneyExecutionMetricsResponse
 -> f JourneyExecutionMetricsResponse)
-> GetJourneyExecutionMetricsResponse
-> f GetJourneyExecutionMetricsResponse
getJourneyExecutionMetricsResponse_journeyExecutionMetricsResponse = (GetJourneyExecutionMetricsResponse
 -> JourneyExecutionMetricsResponse)
-> (GetJourneyExecutionMetricsResponse
    -> JourneyExecutionMetricsResponse
    -> GetJourneyExecutionMetricsResponse)
-> Lens
     GetJourneyExecutionMetricsResponse
     GetJourneyExecutionMetricsResponse
     JourneyExecutionMetricsResponse
     JourneyExecutionMetricsResponse
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetJourneyExecutionMetricsResponse' {JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse :: JourneyExecutionMetricsResponse
$sel:journeyExecutionMetricsResponse:GetJourneyExecutionMetricsResponse' :: GetJourneyExecutionMetricsResponse
-> JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse} -> JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse) (\s :: GetJourneyExecutionMetricsResponse
s@GetJourneyExecutionMetricsResponse' {} JourneyExecutionMetricsResponse
a -> GetJourneyExecutionMetricsResponse
s {$sel:journeyExecutionMetricsResponse:GetJourneyExecutionMetricsResponse' :: JourneyExecutionMetricsResponse
journeyExecutionMetricsResponse = JourneyExecutionMetricsResponse
a} :: GetJourneyExecutionMetricsResponse)

instance
  Prelude.NFData
    GetJourneyExecutionMetricsResponse