getIpsLogs method

Future<List<Log>?> getIpsLogs({
  1. String? uuidToken,
  2. DateTime? from,
  3. DateTime? to,
  4. String? srcIp,
  5. int? srcPort,
  6. String? dstIp,
  7. int? dstPort,
  8. List<ProtocolL4>? protocolLv4,
  9. ProtocolL7? protocolLv7,
})

Retrive IPS logs

Retrives IPS logs.

Parameters:

Implementation

Future<List<Log>?> getIpsLogs({
  String? uuidToken,
  DateTime? from,
  DateTime? to,
  String? srcIp,
  int? srcPort,
  String? dstIp,
  int? dstPort,
  List<ProtocolL4>? protocolLv4,
  ProtocolL7? protocolLv7,
}) async {
  final response = await getIpsLogsWithHttpInfo(
    uuidToken: uuidToken,
    from: from,
    to: to,
    srcIp: srcIp,
    srcPort: srcPort,
    dstIp: dstIp,
    dstPort: dstPort,
    protocolLv4: protocolLv4,
    protocolLv7: protocolLv7,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty &&
      response.statusCode != HttpStatus.noContent) {
    final responseBody = await _decodeBodyBytes(response);
    return (await apiClient.deserializeAsync(responseBody, 'List<Log>')
            as List)
        .cast<Log>()
        .toList();
  }
  return null;
}