2021-01-06 17:35:57 +00:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'server_details.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// TypeAdapterGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
class HetznerServerDetailsAdapter extends TypeAdapter<HetznerServerDetails> {
|
|
|
|
@override
|
|
|
|
final int typeId = 2;
|
|
|
|
|
|
|
|
@override
|
|
|
|
HetznerServerDetails read(BinaryReader reader) {
|
|
|
|
final numOfFields = reader.readByte();
|
|
|
|
final fields = <int, dynamic>{
|
|
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
|
|
};
|
|
|
|
return HetznerServerDetails(
|
2021-03-30 17:38:40 +00:00
|
|
|
ip4: fields[0] as String,
|
|
|
|
id: fields[1] as int,
|
2021-03-15 15:39:44 +00:00
|
|
|
createTime: fields[3] as DateTime?,
|
2021-03-30 17:38:40 +00:00
|
|
|
dataBase: fields[4] as HetznerDataBase,
|
2021-03-15 15:39:44 +00:00
|
|
|
startTime: fields[2] as DateTime?,
|
2021-01-06 17:35:57 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void write(BinaryWriter writer, HetznerServerDetails obj) {
|
|
|
|
writer
|
2021-03-30 17:38:40 +00:00
|
|
|
..writeByte(5)
|
2021-01-06 17:35:57 +00:00
|
|
|
..writeByte(0)
|
|
|
|
..write(obj.ip4)
|
|
|
|
..writeByte(1)
|
|
|
|
..write(obj.id)
|
2021-01-19 12:05:40 +00:00
|
|
|
..writeByte(3)
|
2021-02-03 20:26:38 +00:00
|
|
|
..write(obj.createTime)
|
|
|
|
..writeByte(2)
|
2021-03-30 17:38:40 +00:00
|
|
|
..write(obj.startTime)
|
|
|
|
..writeByte(4)
|
|
|
|
..write(obj.dataBase);
|
2021-01-06 17:35:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool operator ==(Object other) =>
|
|
|
|
identical(this, other) ||
|
|
|
|
other is HetznerServerDetailsAdapter &&
|
|
|
|
runtimeType == other.runtimeType &&
|
|
|
|
typeId == other.typeId;
|
|
|
|
}
|
2021-03-30 17:38:40 +00:00
|
|
|
|
|
|
|
class HetznerDataBaseAdapter extends TypeAdapter<HetznerDataBase> {
|
|
|
|
@override
|
|
|
|
final int typeId = 5;
|
|
|
|
|
|
|
|
@override
|
|
|
|
HetznerDataBase read(BinaryReader reader) {
|
|
|
|
final numOfFields = reader.readByte();
|
|
|
|
final fields = <int, dynamic>{
|
|
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
|
|
};
|
|
|
|
return HetznerDataBase(
|
|
|
|
id: fields[1] as int,
|
|
|
|
name: fields[2] as String,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void write(BinaryWriter writer, HetznerDataBase obj) {
|
|
|
|
writer
|
|
|
|
..writeByte(2)
|
|
|
|
..writeByte(1)
|
|
|
|
..write(obj.id)
|
|
|
|
..writeByte(2)
|
|
|
|
..write(obj.name);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool operator ==(Object other) =>
|
|
|
|
identical(this, other) ||
|
|
|
|
other is HetznerDataBaseAdapter &&
|
|
|
|
runtimeType == other.runtimeType &&
|
|
|
|
typeId == other.typeId;
|
|
|
|
}
|