// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'sync_tour_request.dart';

// **************************************************************************
// BuiltValueGenerator
// **************************************************************************

class _$SyncTourRequest extends SyncTourRequest {
  @override
  final BuiltList<SyncDelivery> deliveries;
  @override
  final int driverPersonalnummer;
  @override
  final Date tourDate;

  factory _$SyncTourRequest([void Function(SyncTourRequestBuilder)? updates]) =>
      (SyncTourRequestBuilder()..update(updates))._build();

  _$SyncTourRequest._(
      {required this.deliveries,
      required this.driverPersonalnummer,
      required this.tourDate})
      : super._();
  @override
  SyncTourRequest rebuild(void Function(SyncTourRequestBuilder) updates) =>
      (toBuilder()..update(updates)).build();

  @override
  SyncTourRequestBuilder toBuilder() => SyncTourRequestBuilder()..replace(this);

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is SyncTourRequest &&
        deliveries == other.deliveries &&
        driverPersonalnummer == other.driverPersonalnummer &&
        tourDate == other.tourDate;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, deliveries.hashCode);
    _$hash = $jc(_$hash, driverPersonalnummer.hashCode);
    _$hash = $jc(_$hash, tourDate.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'SyncTourRequest')
          ..add('deliveries', deliveries)
          ..add('driverPersonalnummer', driverPersonalnummer)
          ..add('tourDate', tourDate))
        .toString();
  }
}

class SyncTourRequestBuilder
    implements Builder<SyncTourRequest, SyncTourRequestBuilder> {
  _$SyncTourRequest? _$v;

  ListBuilder<SyncDelivery>? _deliveries;
  ListBuilder<SyncDelivery> get deliveries =>
      _$this._deliveries ??= ListBuilder<SyncDelivery>();
  set deliveries(ListBuilder<SyncDelivery>? deliveries) =>
      _$this._deliveries = deliveries;

  int? _driverPersonalnummer;
  int? get driverPersonalnummer => _$this._driverPersonalnummer;
  set driverPersonalnummer(int? driverPersonalnummer) =>
      _$this._driverPersonalnummer = driverPersonalnummer;

  Date? _tourDate;
  Date? get tourDate => _$this._tourDate;
  set tourDate(Date? tourDate) => _$this._tourDate = tourDate;

  SyncTourRequestBuilder() {
    SyncTourRequest._defaults(this);
  }

  SyncTourRequestBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _deliveries = $v.deliveries.toBuilder();
      _driverPersonalnummer = $v.driverPersonalnummer;
      _tourDate = $v.tourDate;
      _$v = null;
    }
    return this;
  }

  @override
  void replace(SyncTourRequest other) {
    _$v = other as _$SyncTourRequest;
  }

  @override
  void update(void Function(SyncTourRequestBuilder)? updates) {
    if (updates != null) updates(this);
  }

  @override
  SyncTourRequest build() => _build();

  _$SyncTourRequest _build() {
    _$SyncTourRequest _$result;
    try {
      _$result = _$v ??
          _$SyncTourRequest._(
            deliveries: deliveries.build(),
            driverPersonalnummer: BuiltValueNullFieldError.checkNotNull(
                driverPersonalnummer,
                r'SyncTourRequest',
                'driverPersonalnummer'),
            tourDate: BuiltValueNullFieldError.checkNotNull(
                tourDate, r'SyncTourRequest', 'tourDate'),
          );
    } catch (_) {
      late String _$failedField;
      try {
        _$failedField = 'deliveries';
        deliveries.build();
      } catch (e) {
        throw BuiltValueNestedFieldError(
            r'SyncTourRequest', _$failedField, e.toString());
      }
      rethrow;
    }
    replace(_$result);
    return _$result;
  }
}

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
