GetSampledRequestsResponse.fromJson constructor

GetSampledRequestsResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GetSampledRequestsResponse.fromJson(Map<String, dynamic> json) {
  return GetSampledRequestsResponse(
    populationSize: json['PopulationSize'] as int?,
    sampledRequests: (json['SampledRequests'] as List?)
        ?.whereNotNull()
        .map((e) => SampledHTTPRequest.fromJson(e as Map<String, dynamic>))
        .toList(),
    timeWindow: json['TimeWindow'] != null
        ? TimeWindow.fromJson(json['TimeWindow'] as Map<String, dynamic>)
        : null,
  );
}