SimpleCloudNotifier/flutter/lib/state/request_log.g.dart

81 lines
2.2 KiB
Dart
Raw Permalink Normal View History

2024-05-25 18:09:39 +02:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'request_log.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class SCNRequestAdapter extends TypeAdapter<SCNRequest> {
@override
final int typeId = 100;
@override
SCNRequest read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return SCNRequest(
2024-05-26 00:20:25 +02:00
id: fields[0] as String,
timestampStart: fields[10] as DateTime,
timestampEnd: fields[11] as DateTime,
name: fields[12] as String,
method: fields[21] as String,
url: fields[22] as String,
requestHeaders: (fields[23] as Map).cast<String, String>(),
requestBody: fields[24] as String,
responseStatusCode: fields[31] as int,
responseHeaders: (fields[32] as Map).cast<String, String>(),
responseBody: fields[33] as String,
type: fields[13] as String,
error: fields[14] as String,
stackTrace: fields[15] as String,
2024-05-25 18:09:39 +02:00
);
}
@override
void write(BinaryWriter writer, SCNRequest obj) {
writer
2024-05-26 00:20:25 +02:00
..writeByte(14)
2024-05-25 18:09:39 +02:00
..writeByte(0)
2024-05-26 00:20:25 +02:00
..write(obj.id)
..writeByte(10)
2024-05-25 18:09:39 +02:00
..write(obj.timestampStart)
2024-05-26 00:20:25 +02:00
..writeByte(11)
2024-05-25 18:09:39 +02:00
..write(obj.timestampEnd)
2024-05-26 00:20:25 +02:00
..writeByte(12)
2024-05-25 18:09:39 +02:00
..write(obj.name)
2024-05-26 00:20:25 +02:00
..writeByte(13)
2024-05-25 18:09:39 +02:00
..write(obj.type)
2024-05-26 00:20:25 +02:00
..writeByte(14)
2024-05-25 18:09:39 +02:00
..write(obj.error)
2024-05-26 00:20:25 +02:00
..writeByte(15)
2024-05-25 18:09:39 +02:00
..write(obj.stackTrace)
2024-05-26 00:20:25 +02:00
..writeByte(21)
2024-05-25 18:09:39 +02:00
..write(obj.method)
2024-05-26 00:20:25 +02:00
..writeByte(22)
2024-05-25 18:09:39 +02:00
..write(obj.url)
2024-05-26 00:20:25 +02:00
..writeByte(23)
2024-05-25 18:09:39 +02:00
..write(obj.requestHeaders)
2024-05-26 00:20:25 +02:00
..writeByte(24)
2024-05-25 18:09:39 +02:00
..write(obj.requestBody)
2024-05-26 00:20:25 +02:00
..writeByte(31)
2024-05-25 18:09:39 +02:00
..write(obj.responseStatusCode)
2024-05-26 00:20:25 +02:00
..writeByte(32)
2024-05-25 18:09:39 +02:00
..write(obj.responseHeaders)
2024-05-26 00:20:25 +02:00
..writeByte(33)
2024-05-25 18:09:39 +02:00
..write(obj.responseBody);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SCNRequestAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}