// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'pending_request.dart';

// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************

class PendingRequestAdapter extends TypeAdapter<PendingRequest> {
  @override
  final int typeId = 100;

  @override
  PendingRequest read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return PendingRequest(
      id: fields[0] as String,
      method: fields[1] as String,
      path: fields[2] as String,
      data: (fields[3] as Map?)?.cast<String, dynamic>(),
      queryParams: (fields[4] as Map?)?.cast<String, dynamic>(),
      createdAt: fields[5] as DateTime,
      tempId: fields[6] as String?,
      context: fields[7] as String,
      retryCount: fields[8] as int,
      errorMessage: fields[9] as String?,
      metadata: (fields[10] as Map?)?.cast<String, dynamic>(),
      priority: fields[11] as int,
      headers: (fields[12] as Map?)?.cast<String, String>(),
    );
  }

  @override
  void write(BinaryWriter writer, PendingRequest obj) {
    writer
      ..writeByte(13)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.method)
      ..writeByte(2)
      ..write(obj.path)
      ..writeByte(3)
      ..write(obj.data)
      ..writeByte(4)
      ..write(obj.queryParams)
      ..writeByte(5)
      ..write(obj.createdAt)
      ..writeByte(6)
      ..write(obj.tempId)
      ..writeByte(7)
      ..write(obj.context)
      ..writeByte(8)
      ..write(obj.retryCount)
      ..writeByte(9)
      ..write(obj.errorMessage)
      ..writeByte(10)
      ..write(obj.metadata)
      ..writeByte(11)
      ..write(obj.priority)
      ..writeByte(12)
      ..write(obj.headers);
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is PendingRequestAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}
