getIpsLogs method
Future<List<Log> ?>
getIpsLogs({
- String? uuidToken,
- DateTime? from,
- DateTime? to,
- String? srcIp,
- int? srcPort,
- String? dstIp,
- int? dstPort,
- List<
ProtocolL4> ? protocolLv4, - ProtocolL7? protocolLv7,
Retrive IPS logs
Retrives IPS logs.
Parameters:
-
String uuidToken: Used for remote connections to device
-
DateTime from:
-
DateTime to:
-
String srcIp:
-
int srcPort:
-
String dstIp:
-
int dstPort:
-
List<ProtocolL4> protocolLv4:
-
ProtocolL7 protocolLv7:
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;
}