{-# 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.XRay.GetTraceSummaries
-- 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 IDs and annotations for traces available for a specified time
-- frame using an optional filter. To get the full traces, pass the trace
-- IDs to @BatchGetTraces@.
--
-- A filter expression can target traced requests that hit specific service
-- nodes or edges, have errors, or come from a known user. For example, the
-- following filter expression targets traces that pass through
-- @api.example.com@:
--
-- @service(\"api.example.com\")@
--
-- This filter expression finds traces that have an annotation named
-- @account@ with the value @12345@:
--
-- @annotation.account = \"12345\"@
--
-- For a full list of indexed fields and keywords that you can use in
-- filter expressions, see
-- <https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html Using Filter Expressions>
-- in the /Amazon Web Services X-Ray Developer Guide/.
--
-- This operation returns paginated results.
module Amazonka.XRay.GetTraceSummaries
  ( -- * Creating a Request
    GetTraceSummaries (..),
    newGetTraceSummaries,

    -- * Request Lenses
    getTraceSummaries_filterExpression,
    getTraceSummaries_nextToken,
    getTraceSummaries_timeRangeType,
    getTraceSummaries_samplingStrategy,
    getTraceSummaries_sampling,
    getTraceSummaries_startTime,
    getTraceSummaries_endTime,

    -- * Destructuring the Response
    GetTraceSummariesResponse (..),
    newGetTraceSummariesResponse,

    -- * Response Lenses
    getTraceSummariesResponse_tracesProcessedCount,
    getTraceSummariesResponse_nextToken,
    getTraceSummariesResponse_approximateTime,
    getTraceSummariesResponse_traceSummaries,
    getTraceSummariesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetTraceSummaries' smart constructor.
data GetTraceSummaries = GetTraceSummaries'
  { -- | Specify a filter expression to retrieve trace summaries for services or
    -- requests that meet certain requirements.
    GetTraceSummaries -> Maybe Text
filterExpression :: Prelude.Maybe Prelude.Text,
    -- | Specify the pagination token returned by a previous request to retrieve
    -- the next page of results.
    GetTraceSummaries -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A parameter to indicate whether to query trace summaries by TraceId or
    -- Event time.
    GetTraceSummaries -> Maybe TimeRangeType
timeRangeType :: Prelude.Maybe TimeRangeType,
    -- | A parameter to indicate whether to enable sampling on trace summaries.
    -- Input parameters are Name and Value.
    GetTraceSummaries -> Maybe SamplingStrategy
samplingStrategy :: Prelude.Maybe SamplingStrategy,
    -- | Set to @true@ to get summaries for only a subset of available traces.
    GetTraceSummaries -> Maybe Bool
sampling :: Prelude.Maybe Prelude.Bool,
    -- | The start of the time frame for which to retrieve traces.
    GetTraceSummaries -> POSIX
startTime :: Core.POSIX,
    -- | The end of the time frame for which to retrieve traces.
    GetTraceSummaries -> POSIX
endTime :: Core.POSIX
  }
  deriving (GetTraceSummaries -> GetTraceSummaries -> Bool
(GetTraceSummaries -> GetTraceSummaries -> Bool)
-> (GetTraceSummaries -> GetTraceSummaries -> Bool)
-> Eq GetTraceSummaries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTraceSummaries -> GetTraceSummaries -> Bool
$c/= :: GetTraceSummaries -> GetTraceSummaries -> Bool
== :: GetTraceSummaries -> GetTraceSummaries -> Bool
$c== :: GetTraceSummaries -> GetTraceSummaries -> Bool
Prelude.Eq, ReadPrec [GetTraceSummaries]
ReadPrec GetTraceSummaries
Int -> ReadS GetTraceSummaries
ReadS [GetTraceSummaries]
(Int -> ReadS GetTraceSummaries)
-> ReadS [GetTraceSummaries]
-> ReadPrec GetTraceSummaries
-> ReadPrec [GetTraceSummaries]
-> Read GetTraceSummaries
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTraceSummaries]
$creadListPrec :: ReadPrec [GetTraceSummaries]
readPrec :: ReadPrec GetTraceSummaries
$creadPrec :: ReadPrec GetTraceSummaries
readList :: ReadS [GetTraceSummaries]
$creadList :: ReadS [GetTraceSummaries]
readsPrec :: Int -> ReadS GetTraceSummaries
$creadsPrec :: Int -> ReadS GetTraceSummaries
Prelude.Read, Int -> GetTraceSummaries -> ShowS
[GetTraceSummaries] -> ShowS
GetTraceSummaries -> String
(Int -> GetTraceSummaries -> ShowS)
-> (GetTraceSummaries -> String)
-> ([GetTraceSummaries] -> ShowS)
-> Show GetTraceSummaries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTraceSummaries] -> ShowS
$cshowList :: [GetTraceSummaries] -> ShowS
show :: GetTraceSummaries -> String
$cshow :: GetTraceSummaries -> String
showsPrec :: Int -> GetTraceSummaries -> ShowS
$cshowsPrec :: Int -> GetTraceSummaries -> ShowS
Prelude.Show, (forall x. GetTraceSummaries -> Rep GetTraceSummaries x)
-> (forall x. Rep GetTraceSummaries x -> GetTraceSummaries)
-> Generic GetTraceSummaries
forall x. Rep GetTraceSummaries x -> GetTraceSummaries
forall x. GetTraceSummaries -> Rep GetTraceSummaries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetTraceSummaries x -> GetTraceSummaries
$cfrom :: forall x. GetTraceSummaries -> Rep GetTraceSummaries x
Prelude.Generic)

-- |
-- Create a value of 'GetTraceSummaries' 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:
--
-- 'filterExpression', 'getTraceSummaries_filterExpression' - Specify a filter expression to retrieve trace summaries for services or
-- requests that meet certain requirements.
--
-- 'nextToken', 'getTraceSummaries_nextToken' - Specify the pagination token returned by a previous request to retrieve
-- the next page of results.
--
-- 'timeRangeType', 'getTraceSummaries_timeRangeType' - A parameter to indicate whether to query trace summaries by TraceId or
-- Event time.
--
-- 'samplingStrategy', 'getTraceSummaries_samplingStrategy' - A parameter to indicate whether to enable sampling on trace summaries.
-- Input parameters are Name and Value.
--
-- 'sampling', 'getTraceSummaries_sampling' - Set to @true@ to get summaries for only a subset of available traces.
--
-- 'startTime', 'getTraceSummaries_startTime' - The start of the time frame for which to retrieve traces.
--
-- 'endTime', 'getTraceSummaries_endTime' - The end of the time frame for which to retrieve traces.
newGetTraceSummaries ::
  -- | 'startTime'
  Prelude.UTCTime ->
  -- | 'endTime'
  Prelude.UTCTime ->
  GetTraceSummaries
newGetTraceSummaries :: UTCTime -> UTCTime -> GetTraceSummaries
newGetTraceSummaries UTCTime
pStartTime_ UTCTime
pEndTime_ =
  GetTraceSummaries' :: Maybe Text
-> Maybe Text
-> Maybe TimeRangeType
-> Maybe SamplingStrategy
-> Maybe Bool
-> POSIX
-> POSIX
-> GetTraceSummaries
GetTraceSummaries'
    { $sel:filterExpression:GetTraceSummaries' :: Maybe Text
filterExpression =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetTraceSummaries' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeRangeType:GetTraceSummaries' :: Maybe TimeRangeType
timeRangeType = Maybe TimeRangeType
forall a. Maybe a
Prelude.Nothing,
      $sel:samplingStrategy:GetTraceSummaries' :: Maybe SamplingStrategy
samplingStrategy = Maybe SamplingStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:sampling:GetTraceSummaries' :: Maybe Bool
sampling = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:GetTraceSummaries' :: POSIX
startTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
      $sel:endTime:GetTraceSummaries' :: POSIX
endTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_
    }

-- | Specify a filter expression to retrieve trace summaries for services or
-- requests that meet certain requirements.
getTraceSummaries_filterExpression :: Lens.Lens' GetTraceSummaries (Prelude.Maybe Prelude.Text)
getTraceSummaries_filterExpression :: (Maybe Text -> f (Maybe Text))
-> GetTraceSummaries -> f GetTraceSummaries
getTraceSummaries_filterExpression = (GetTraceSummaries -> Maybe Text)
-> (GetTraceSummaries -> Maybe Text -> GetTraceSummaries)
-> Lens
     GetTraceSummaries GetTraceSummaries (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummaries' {Maybe Text
filterExpression :: Maybe Text
$sel:filterExpression:GetTraceSummaries' :: GetTraceSummaries -> Maybe Text
filterExpression} -> Maybe Text
filterExpression) (\s :: GetTraceSummaries
s@GetTraceSummaries' {} Maybe Text
a -> GetTraceSummaries
s {$sel:filterExpression:GetTraceSummaries' :: Maybe Text
filterExpression = Maybe Text
a} :: GetTraceSummaries)

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

-- | A parameter to indicate whether to query trace summaries by TraceId or
-- Event time.
getTraceSummaries_timeRangeType :: Lens.Lens' GetTraceSummaries (Prelude.Maybe TimeRangeType)
getTraceSummaries_timeRangeType :: (Maybe TimeRangeType -> f (Maybe TimeRangeType))
-> GetTraceSummaries -> f GetTraceSummaries
getTraceSummaries_timeRangeType = (GetTraceSummaries -> Maybe TimeRangeType)
-> (GetTraceSummaries -> Maybe TimeRangeType -> GetTraceSummaries)
-> Lens
     GetTraceSummaries
     GetTraceSummaries
     (Maybe TimeRangeType)
     (Maybe TimeRangeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummaries' {Maybe TimeRangeType
timeRangeType :: Maybe TimeRangeType
$sel:timeRangeType:GetTraceSummaries' :: GetTraceSummaries -> Maybe TimeRangeType
timeRangeType} -> Maybe TimeRangeType
timeRangeType) (\s :: GetTraceSummaries
s@GetTraceSummaries' {} Maybe TimeRangeType
a -> GetTraceSummaries
s {$sel:timeRangeType:GetTraceSummaries' :: Maybe TimeRangeType
timeRangeType = Maybe TimeRangeType
a} :: GetTraceSummaries)

-- | A parameter to indicate whether to enable sampling on trace summaries.
-- Input parameters are Name and Value.
getTraceSummaries_samplingStrategy :: Lens.Lens' GetTraceSummaries (Prelude.Maybe SamplingStrategy)
getTraceSummaries_samplingStrategy :: (Maybe SamplingStrategy -> f (Maybe SamplingStrategy))
-> GetTraceSummaries -> f GetTraceSummaries
getTraceSummaries_samplingStrategy = (GetTraceSummaries -> Maybe SamplingStrategy)
-> (GetTraceSummaries
    -> Maybe SamplingStrategy -> GetTraceSummaries)
-> Lens
     GetTraceSummaries
     GetTraceSummaries
     (Maybe SamplingStrategy)
     (Maybe SamplingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummaries' {Maybe SamplingStrategy
samplingStrategy :: Maybe SamplingStrategy
$sel:samplingStrategy:GetTraceSummaries' :: GetTraceSummaries -> Maybe SamplingStrategy
samplingStrategy} -> Maybe SamplingStrategy
samplingStrategy) (\s :: GetTraceSummaries
s@GetTraceSummaries' {} Maybe SamplingStrategy
a -> GetTraceSummaries
s {$sel:samplingStrategy:GetTraceSummaries' :: Maybe SamplingStrategy
samplingStrategy = Maybe SamplingStrategy
a} :: GetTraceSummaries)

-- | Set to @true@ to get summaries for only a subset of available traces.
getTraceSummaries_sampling :: Lens.Lens' GetTraceSummaries (Prelude.Maybe Prelude.Bool)
getTraceSummaries_sampling :: (Maybe Bool -> f (Maybe Bool))
-> GetTraceSummaries -> f GetTraceSummaries
getTraceSummaries_sampling = (GetTraceSummaries -> Maybe Bool)
-> (GetTraceSummaries -> Maybe Bool -> GetTraceSummaries)
-> Lens
     GetTraceSummaries GetTraceSummaries (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummaries' {Maybe Bool
sampling :: Maybe Bool
$sel:sampling:GetTraceSummaries' :: GetTraceSummaries -> Maybe Bool
sampling} -> Maybe Bool
sampling) (\s :: GetTraceSummaries
s@GetTraceSummaries' {} Maybe Bool
a -> GetTraceSummaries
s {$sel:sampling:GetTraceSummaries' :: Maybe Bool
sampling = Maybe Bool
a} :: GetTraceSummaries)

-- | The start of the time frame for which to retrieve traces.
getTraceSummaries_startTime :: Lens.Lens' GetTraceSummaries Prelude.UTCTime
getTraceSummaries_startTime :: (UTCTime -> f UTCTime) -> GetTraceSummaries -> f GetTraceSummaries
getTraceSummaries_startTime = (GetTraceSummaries -> POSIX)
-> (GetTraceSummaries -> POSIX -> GetTraceSummaries)
-> Lens GetTraceSummaries GetTraceSummaries POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummaries' {POSIX
startTime :: POSIX
$sel:startTime:GetTraceSummaries' :: GetTraceSummaries -> POSIX
startTime} -> POSIX
startTime) (\s :: GetTraceSummaries
s@GetTraceSummaries' {} POSIX
a -> GetTraceSummaries
s {$sel:startTime:GetTraceSummaries' :: POSIX
startTime = POSIX
a} :: GetTraceSummaries) ((POSIX -> f POSIX) -> GetTraceSummaries -> f GetTraceSummaries)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetTraceSummaries
-> f GetTraceSummaries
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The end of the time frame for which to retrieve traces.
getTraceSummaries_endTime :: Lens.Lens' GetTraceSummaries Prelude.UTCTime
getTraceSummaries_endTime :: (UTCTime -> f UTCTime) -> GetTraceSummaries -> f GetTraceSummaries
getTraceSummaries_endTime = (GetTraceSummaries -> POSIX)
-> (GetTraceSummaries -> POSIX -> GetTraceSummaries)
-> Lens GetTraceSummaries GetTraceSummaries POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummaries' {POSIX
endTime :: POSIX
$sel:endTime:GetTraceSummaries' :: GetTraceSummaries -> POSIX
endTime} -> POSIX
endTime) (\s :: GetTraceSummaries
s@GetTraceSummaries' {} POSIX
a -> GetTraceSummaries
s {$sel:endTime:GetTraceSummaries' :: POSIX
endTime = POSIX
a} :: GetTraceSummaries) ((POSIX -> f POSIX) -> GetTraceSummaries -> f GetTraceSummaries)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetTraceSummaries
-> f GetTraceSummaries
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.AWSPager GetTraceSummaries where
  page :: GetTraceSummaries
-> AWSResponse GetTraceSummaries -> Maybe GetTraceSummaries
page GetTraceSummaries
rq AWSResponse GetTraceSummaries
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetTraceSummaries
GetTraceSummariesResponse
rs
            GetTraceSummariesResponse
-> Getting (First Text) GetTraceSummariesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetTraceSummariesResponse
-> Const (First Text) GetTraceSummariesResponse
Lens' GetTraceSummariesResponse (Maybe Text)
getTraceSummariesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetTraceSummariesResponse
 -> Const (First Text) GetTraceSummariesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetTraceSummariesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetTraceSummaries
forall a. Maybe a
Prelude.Nothing
    | Maybe [TraceSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetTraceSummaries
GetTraceSummariesResponse
rs
            GetTraceSummariesResponse
-> Getting
     (First [TraceSummary]) GetTraceSummariesResponse [TraceSummary]
-> Maybe [TraceSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [TraceSummary]
 -> Const (First [TraceSummary]) (Maybe [TraceSummary]))
-> GetTraceSummariesResponse
-> Const (First [TraceSummary]) GetTraceSummariesResponse
Lens' GetTraceSummariesResponse (Maybe [TraceSummary])
getTraceSummariesResponse_traceSummaries
              ((Maybe [TraceSummary]
  -> Const (First [TraceSummary]) (Maybe [TraceSummary]))
 -> GetTraceSummariesResponse
 -> Const (First [TraceSummary]) GetTraceSummariesResponse)
-> (([TraceSummary] -> Const (First [TraceSummary]) [TraceSummary])
    -> Maybe [TraceSummary]
    -> Const (First [TraceSummary]) (Maybe [TraceSummary]))
-> Getting
     (First [TraceSummary]) GetTraceSummariesResponse [TraceSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TraceSummary] -> Const (First [TraceSummary]) [TraceSummary])
-> Maybe [TraceSummary]
-> Const (First [TraceSummary]) (Maybe [TraceSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetTraceSummaries
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetTraceSummaries -> Maybe GetTraceSummaries
forall a. a -> Maybe a
Prelude.Just (GetTraceSummaries -> Maybe GetTraceSummaries)
-> GetTraceSummaries -> Maybe GetTraceSummaries
forall a b. (a -> b) -> a -> b
Prelude.$
        GetTraceSummaries
rq
          GetTraceSummaries
-> (GetTraceSummaries -> GetTraceSummaries) -> GetTraceSummaries
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetTraceSummaries -> Identity GetTraceSummaries
Lens GetTraceSummaries GetTraceSummaries (Maybe Text) (Maybe Text)
getTraceSummaries_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> GetTraceSummaries -> Identity GetTraceSummaries)
-> Maybe Text -> GetTraceSummaries -> GetTraceSummaries
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetTraceSummaries
GetTraceSummariesResponse
rs
          GetTraceSummariesResponse
-> Getting (First Text) GetTraceSummariesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetTraceSummariesResponse
-> Const (First Text) GetTraceSummariesResponse
Lens' GetTraceSummariesResponse (Maybe Text)
getTraceSummariesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetTraceSummariesResponse
 -> Const (First Text) GetTraceSummariesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetTraceSummariesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest GetTraceSummaries where
  type
    AWSResponse GetTraceSummaries =
      GetTraceSummariesResponse
  request :: GetTraceSummaries -> Request GetTraceSummaries
request = Service -> GetTraceSummaries -> Request GetTraceSummaries
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetTraceSummaries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetTraceSummaries)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetTraceSummaries))
-> Logger
-> Service
-> Proxy GetTraceSummaries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetTraceSummaries)))
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 ->
          Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe [TraceSummary]
-> Int
-> GetTraceSummariesResponse
GetTraceSummariesResponse'
            (Maybe Integer
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [TraceSummary]
 -> Int
 -> GetTraceSummariesResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [TraceSummary]
      -> Int
      -> GetTraceSummariesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TracesProcessedCount")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [TraceSummary]
   -> Int
   -> GetTraceSummariesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe [TraceSummary] -> Int -> GetTraceSummariesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe POSIX
   -> Maybe [TraceSummary] -> Int -> GetTraceSummariesResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe [TraceSummary] -> Int -> GetTraceSummariesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ApproximateTime")
            Either
  String (Maybe [TraceSummary] -> Int -> GetTraceSummariesResponse)
-> Either String (Maybe [TraceSummary])
-> Either String (Int -> GetTraceSummariesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [TraceSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TraceSummaries" Either String (Maybe (Maybe [TraceSummary]))
-> Maybe [TraceSummary] -> Either String (Maybe [TraceSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TraceSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetTraceSummariesResponse)
-> Either String Int -> Either String GetTraceSummariesResponse
forall (f :: * -> *) a b. Applicative f => 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))
      )

instance Prelude.Hashable GetTraceSummaries

instance Prelude.NFData GetTraceSummaries

instance Core.ToHeaders GetTraceSummaries where
  toHeaders :: GetTraceSummaries -> ResponseHeaders
toHeaders = ResponseHeaders -> GetTraceSummaries -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON GetTraceSummaries where
  toJSON :: GetTraceSummaries -> Value
toJSON GetTraceSummaries' {Maybe Bool
Maybe Text
Maybe SamplingStrategy
Maybe TimeRangeType
POSIX
endTime :: POSIX
startTime :: POSIX
sampling :: Maybe Bool
samplingStrategy :: Maybe SamplingStrategy
timeRangeType :: Maybe TimeRangeType
nextToken :: Maybe Text
filterExpression :: Maybe Text
$sel:endTime:GetTraceSummaries' :: GetTraceSummaries -> POSIX
$sel:startTime:GetTraceSummaries' :: GetTraceSummaries -> POSIX
$sel:sampling:GetTraceSummaries' :: GetTraceSummaries -> Maybe Bool
$sel:samplingStrategy:GetTraceSummaries' :: GetTraceSummaries -> Maybe SamplingStrategy
$sel:timeRangeType:GetTraceSummaries' :: GetTraceSummaries -> Maybe TimeRangeType
$sel:nextToken:GetTraceSummaries' :: GetTraceSummaries -> Maybe Text
$sel:filterExpression:GetTraceSummaries' :: GetTraceSummaries -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"FilterExpression" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
filterExpression,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"TimeRangeType" Text -> TimeRangeType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TimeRangeType -> Pair) -> Maybe TimeRangeType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeRangeType
timeRangeType,
            (Text
"SamplingStrategy" Text -> SamplingStrategy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SamplingStrategy -> Pair) -> Maybe SamplingStrategy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SamplingStrategy
samplingStrategy,
            (Text
"Sampling" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
sampling,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
startTime),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
endTime)
          ]
      )

instance Core.ToPath GetTraceSummaries where
  toPath :: GetTraceSummaries -> ByteString
toPath = ByteString -> GetTraceSummaries -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/TraceSummaries"

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

-- | /See:/ 'newGetTraceSummariesResponse' smart constructor.
data GetTraceSummariesResponse = GetTraceSummariesResponse'
  { -- | The total number of traces processed, including traces that did not
    -- match the specified filter expression.
    GetTraceSummariesResponse -> Maybe Integer
tracesProcessedCount :: Prelude.Maybe Prelude.Integer,
    -- | If the requested time frame contained more than one page of results, you
    -- can use this token to retrieve the next page. The first page contains
    -- the most recent results, closest to the end of the time frame.
    GetTraceSummariesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The start time of this page of results.
    GetTraceSummariesResponse -> Maybe POSIX
approximateTime :: Prelude.Maybe Core.POSIX,
    -- | Trace IDs and annotations for traces that were found in the specified
    -- time frame.
    GetTraceSummariesResponse -> Maybe [TraceSummary]
traceSummaries :: Prelude.Maybe [TraceSummary],
    -- | The response's http status code.
    GetTraceSummariesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool
(GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool)
-> (GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool)
-> Eq GetTraceSummariesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool
$c/= :: GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool
== :: GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool
$c== :: GetTraceSummariesResponse -> GetTraceSummariesResponse -> Bool
Prelude.Eq, ReadPrec [GetTraceSummariesResponse]
ReadPrec GetTraceSummariesResponse
Int -> ReadS GetTraceSummariesResponse
ReadS [GetTraceSummariesResponse]
(Int -> ReadS GetTraceSummariesResponse)
-> ReadS [GetTraceSummariesResponse]
-> ReadPrec GetTraceSummariesResponse
-> ReadPrec [GetTraceSummariesResponse]
-> Read GetTraceSummariesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTraceSummariesResponse]
$creadListPrec :: ReadPrec [GetTraceSummariesResponse]
readPrec :: ReadPrec GetTraceSummariesResponse
$creadPrec :: ReadPrec GetTraceSummariesResponse
readList :: ReadS [GetTraceSummariesResponse]
$creadList :: ReadS [GetTraceSummariesResponse]
readsPrec :: Int -> ReadS GetTraceSummariesResponse
$creadsPrec :: Int -> ReadS GetTraceSummariesResponse
Prelude.Read, Int -> GetTraceSummariesResponse -> ShowS
[GetTraceSummariesResponse] -> ShowS
GetTraceSummariesResponse -> String
(Int -> GetTraceSummariesResponse -> ShowS)
-> (GetTraceSummariesResponse -> String)
-> ([GetTraceSummariesResponse] -> ShowS)
-> Show GetTraceSummariesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTraceSummariesResponse] -> ShowS
$cshowList :: [GetTraceSummariesResponse] -> ShowS
show :: GetTraceSummariesResponse -> String
$cshow :: GetTraceSummariesResponse -> String
showsPrec :: Int -> GetTraceSummariesResponse -> ShowS
$cshowsPrec :: Int -> GetTraceSummariesResponse -> ShowS
Prelude.Show, (forall x.
 GetTraceSummariesResponse -> Rep GetTraceSummariesResponse x)
-> (forall x.
    Rep GetTraceSummariesResponse x -> GetTraceSummariesResponse)
-> Generic GetTraceSummariesResponse
forall x.
Rep GetTraceSummariesResponse x -> GetTraceSummariesResponse
forall x.
GetTraceSummariesResponse -> Rep GetTraceSummariesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetTraceSummariesResponse x -> GetTraceSummariesResponse
$cfrom :: forall x.
GetTraceSummariesResponse -> Rep GetTraceSummariesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetTraceSummariesResponse' 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:
--
-- 'tracesProcessedCount', 'getTraceSummariesResponse_tracesProcessedCount' - The total number of traces processed, including traces that did not
-- match the specified filter expression.
--
-- 'nextToken', 'getTraceSummariesResponse_nextToken' - If the requested time frame contained more than one page of results, you
-- can use this token to retrieve the next page. The first page contains
-- the most recent results, closest to the end of the time frame.
--
-- 'approximateTime', 'getTraceSummariesResponse_approximateTime' - The start time of this page of results.
--
-- 'traceSummaries', 'getTraceSummariesResponse_traceSummaries' - Trace IDs and annotations for traces that were found in the specified
-- time frame.
--
-- 'httpStatus', 'getTraceSummariesResponse_httpStatus' - The response's http status code.
newGetTraceSummariesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetTraceSummariesResponse
newGetTraceSummariesResponse :: Int -> GetTraceSummariesResponse
newGetTraceSummariesResponse Int
pHttpStatus_ =
  GetTraceSummariesResponse' :: Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe [TraceSummary]
-> Int
-> GetTraceSummariesResponse
GetTraceSummariesResponse'
    { $sel:tracesProcessedCount:GetTraceSummariesResponse' :: Maybe Integer
tracesProcessedCount =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetTraceSummariesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:approximateTime:GetTraceSummariesResponse' :: Maybe POSIX
approximateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:traceSummaries:GetTraceSummariesResponse' :: Maybe [TraceSummary]
traceSummaries = Maybe [TraceSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetTraceSummariesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The total number of traces processed, including traces that did not
-- match the specified filter expression.
getTraceSummariesResponse_tracesProcessedCount :: Lens.Lens' GetTraceSummariesResponse (Prelude.Maybe Prelude.Integer)
getTraceSummariesResponse_tracesProcessedCount :: (Maybe Integer -> f (Maybe Integer))
-> GetTraceSummariesResponse -> f GetTraceSummariesResponse
getTraceSummariesResponse_tracesProcessedCount = (GetTraceSummariesResponse -> Maybe Integer)
-> (GetTraceSummariesResponse
    -> Maybe Integer -> GetTraceSummariesResponse)
-> Lens
     GetTraceSummariesResponse
     GetTraceSummariesResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummariesResponse' {Maybe Integer
tracesProcessedCount :: Maybe Integer
$sel:tracesProcessedCount:GetTraceSummariesResponse' :: GetTraceSummariesResponse -> Maybe Integer
tracesProcessedCount} -> Maybe Integer
tracesProcessedCount) (\s :: GetTraceSummariesResponse
s@GetTraceSummariesResponse' {} Maybe Integer
a -> GetTraceSummariesResponse
s {$sel:tracesProcessedCount:GetTraceSummariesResponse' :: Maybe Integer
tracesProcessedCount = Maybe Integer
a} :: GetTraceSummariesResponse)

-- | If the requested time frame contained more than one page of results, you
-- can use this token to retrieve the next page. The first page contains
-- the most recent results, closest to the end of the time frame.
getTraceSummariesResponse_nextToken :: Lens.Lens' GetTraceSummariesResponse (Prelude.Maybe Prelude.Text)
getTraceSummariesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetTraceSummariesResponse -> f GetTraceSummariesResponse
getTraceSummariesResponse_nextToken = (GetTraceSummariesResponse -> Maybe Text)
-> (GetTraceSummariesResponse
    -> Maybe Text -> GetTraceSummariesResponse)
-> Lens' GetTraceSummariesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummariesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetTraceSummariesResponse' :: GetTraceSummariesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetTraceSummariesResponse
s@GetTraceSummariesResponse' {} Maybe Text
a -> GetTraceSummariesResponse
s {$sel:nextToken:GetTraceSummariesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetTraceSummariesResponse)

-- | The start time of this page of results.
getTraceSummariesResponse_approximateTime :: Lens.Lens' GetTraceSummariesResponse (Prelude.Maybe Prelude.UTCTime)
getTraceSummariesResponse_approximateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetTraceSummariesResponse -> f GetTraceSummariesResponse
getTraceSummariesResponse_approximateTime = (GetTraceSummariesResponse -> Maybe POSIX)
-> (GetTraceSummariesResponse
    -> Maybe POSIX -> GetTraceSummariesResponse)
-> Lens
     GetTraceSummariesResponse
     GetTraceSummariesResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummariesResponse' {Maybe POSIX
approximateTime :: Maybe POSIX
$sel:approximateTime:GetTraceSummariesResponse' :: GetTraceSummariesResponse -> Maybe POSIX
approximateTime} -> Maybe POSIX
approximateTime) (\s :: GetTraceSummariesResponse
s@GetTraceSummariesResponse' {} Maybe POSIX
a -> GetTraceSummariesResponse
s {$sel:approximateTime:GetTraceSummariesResponse' :: Maybe POSIX
approximateTime = Maybe POSIX
a} :: GetTraceSummariesResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetTraceSummariesResponse -> f GetTraceSummariesResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetTraceSummariesResponse
-> f GetTraceSummariesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Trace IDs and annotations for traces that were found in the specified
-- time frame.
getTraceSummariesResponse_traceSummaries :: Lens.Lens' GetTraceSummariesResponse (Prelude.Maybe [TraceSummary])
getTraceSummariesResponse_traceSummaries :: (Maybe [TraceSummary] -> f (Maybe [TraceSummary]))
-> GetTraceSummariesResponse -> f GetTraceSummariesResponse
getTraceSummariesResponse_traceSummaries = (GetTraceSummariesResponse -> Maybe [TraceSummary])
-> (GetTraceSummariesResponse
    -> Maybe [TraceSummary] -> GetTraceSummariesResponse)
-> Lens' GetTraceSummariesResponse (Maybe [TraceSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTraceSummariesResponse' {Maybe [TraceSummary]
traceSummaries :: Maybe [TraceSummary]
$sel:traceSummaries:GetTraceSummariesResponse' :: GetTraceSummariesResponse -> Maybe [TraceSummary]
traceSummaries} -> Maybe [TraceSummary]
traceSummaries) (\s :: GetTraceSummariesResponse
s@GetTraceSummariesResponse' {} Maybe [TraceSummary]
a -> GetTraceSummariesResponse
s {$sel:traceSummaries:GetTraceSummariesResponse' :: Maybe [TraceSummary]
traceSummaries = Maybe [TraceSummary]
a} :: GetTraceSummariesResponse) ((Maybe [TraceSummary] -> f (Maybe [TraceSummary]))
 -> GetTraceSummariesResponse -> f GetTraceSummariesResponse)
-> ((Maybe [TraceSummary] -> f (Maybe [TraceSummary]))
    -> Maybe [TraceSummary] -> f (Maybe [TraceSummary]))
-> (Maybe [TraceSummary] -> f (Maybe [TraceSummary]))
-> GetTraceSummariesResponse
-> f GetTraceSummariesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TraceSummary] [TraceSummary] [TraceSummary] [TraceSummary]
-> Iso
     (Maybe [TraceSummary])
     (Maybe [TraceSummary])
     (Maybe [TraceSummary])
     (Maybe [TraceSummary])
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 AnIso [TraceSummary] [TraceSummary] [TraceSummary] [TraceSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetTraceSummariesResponse