{-# 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 #-}
module Amazonka.XRay.GetTraceSummaries
(
GetTraceSummaries (..),
newGetTraceSummaries,
getTraceSummaries_filterExpression,
getTraceSummaries_nextToken,
getTraceSummaries_timeRangeType,
getTraceSummaries_samplingStrategy,
getTraceSummaries_sampling,
getTraceSummaries_startTime,
getTraceSummaries_endTime,
GetTraceSummariesResponse (..),
newGetTraceSummariesResponse,
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
data GetTraceSummaries = GetTraceSummaries'
{
GetTraceSummaries -> Maybe Text
filterExpression :: Prelude.Maybe Prelude.Text,
GetTraceSummaries -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetTraceSummaries -> Maybe TimeRangeType
timeRangeType :: Prelude.Maybe TimeRangeType,
GetTraceSummaries -> Maybe SamplingStrategy
samplingStrategy :: Prelude.Maybe SamplingStrategy,
GetTraceSummaries -> Maybe Bool
sampling :: Prelude.Maybe Prelude.Bool,
GetTraceSummaries -> POSIX
startTime :: Core.POSIX,
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)
newGetTraceSummaries ::
Prelude.UTCTime ->
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_
}
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)
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)
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)
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)
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)
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
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
data GetTraceSummariesResponse = GetTraceSummariesResponse'
{
GetTraceSummariesResponse -> Maybe Integer
tracesProcessedCount :: Prelude.Maybe Prelude.Integer,
GetTraceSummariesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetTraceSummariesResponse -> Maybe POSIX
approximateTime :: Prelude.Maybe Core.POSIX,
GetTraceSummariesResponse -> Maybe [TraceSummary]
traceSummaries :: Prelude.Maybe [TraceSummary],
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)
newGetTraceSummariesResponse ::
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_
}
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)
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)
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
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
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