// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'delivery_with_items.dart';

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

class _$DeliveryWithItems extends DeliveryWithItems {
  @override
  final int sortOrder;
  @override
  final BuiltList<DeliveryItem> items;
  @override
  final String? assignedCarId;
  @override
  final BuiltList<String> contactPersonIds;
  @override
  final String customerId;
  @override
  final Address deliveryAddressSnapshot;
  @override
  final String? desiredTime;
  @override
  final int erpBelegartId;
  @override
  final String erpBelegnummer;
  @override
  final String id;
  @override
  final String paymentMethodId;
  @override
  final double prepaidAmount;
  @override
  final String? specialAgreements;
  @override
  final DeliveryState state;
  @override
  final String? stateReason;
  @override
  final String tourId;

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

  _$DeliveryWithItems._(
      {required this.sortOrder,
      required this.items,
      this.assignedCarId,
      required this.contactPersonIds,
      required this.customerId,
      required this.deliveryAddressSnapshot,
      this.desiredTime,
      required this.erpBelegartId,
      required this.erpBelegnummer,
      required this.id,
      required this.paymentMethodId,
      required this.prepaidAmount,
      this.specialAgreements,
      required this.state,
      this.stateReason,
      required this.tourId})
      : super._();
  @override
  DeliveryWithItems rebuild(void Function(DeliveryWithItemsBuilder) updates) =>
      (toBuilder()..update(updates)).build();

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

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is DeliveryWithItems &&
        sortOrder == other.sortOrder &&
        items == other.items &&
        assignedCarId == other.assignedCarId &&
        contactPersonIds == other.contactPersonIds &&
        customerId == other.customerId &&
        deliveryAddressSnapshot == other.deliveryAddressSnapshot &&
        desiredTime == other.desiredTime &&
        erpBelegartId == other.erpBelegartId &&
        erpBelegnummer == other.erpBelegnummer &&
        id == other.id &&
        paymentMethodId == other.paymentMethodId &&
        prepaidAmount == other.prepaidAmount &&
        specialAgreements == other.specialAgreements &&
        state == other.state &&
        stateReason == other.stateReason &&
        tourId == other.tourId;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, sortOrder.hashCode);
    _$hash = $jc(_$hash, items.hashCode);
    _$hash = $jc(_$hash, assignedCarId.hashCode);
    _$hash = $jc(_$hash, contactPersonIds.hashCode);
    _$hash = $jc(_$hash, customerId.hashCode);
    _$hash = $jc(_$hash, deliveryAddressSnapshot.hashCode);
    _$hash = $jc(_$hash, desiredTime.hashCode);
    _$hash = $jc(_$hash, erpBelegartId.hashCode);
    _$hash = $jc(_$hash, erpBelegnummer.hashCode);
    _$hash = $jc(_$hash, id.hashCode);
    _$hash = $jc(_$hash, paymentMethodId.hashCode);
    _$hash = $jc(_$hash, prepaidAmount.hashCode);
    _$hash = $jc(_$hash, specialAgreements.hashCode);
    _$hash = $jc(_$hash, state.hashCode);
    _$hash = $jc(_$hash, stateReason.hashCode);
    _$hash = $jc(_$hash, tourId.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'DeliveryWithItems')
          ..add('sortOrder', sortOrder)
          ..add('items', items)
          ..add('assignedCarId', assignedCarId)
          ..add('contactPersonIds', contactPersonIds)
          ..add('customerId', customerId)
          ..add('deliveryAddressSnapshot', deliveryAddressSnapshot)
          ..add('desiredTime', desiredTime)
          ..add('erpBelegartId', erpBelegartId)
          ..add('erpBelegnummer', erpBelegnummer)
          ..add('id', id)
          ..add('paymentMethodId', paymentMethodId)
          ..add('prepaidAmount', prepaidAmount)
          ..add('specialAgreements', specialAgreements)
          ..add('state', state)
          ..add('stateReason', stateReason)
          ..add('tourId', tourId))
        .toString();
  }
}

class DeliveryWithItemsBuilder
    implements
        Builder<DeliveryWithItems, DeliveryWithItemsBuilder>,
        DeliveryBuilder {
  _$DeliveryWithItems? _$v;

  int? _sortOrder;
  int? get sortOrder => _$this._sortOrder;
  set sortOrder(covariant int? sortOrder) => _$this._sortOrder = sortOrder;

  ListBuilder<DeliveryItem>? _items;
  ListBuilder<DeliveryItem> get items =>
      _$this._items ??= ListBuilder<DeliveryItem>();
  set items(covariant ListBuilder<DeliveryItem>? items) =>
      _$this._items = items;

  String? _assignedCarId;
  String? get assignedCarId => _$this._assignedCarId;
  set assignedCarId(covariant String? assignedCarId) =>
      _$this._assignedCarId = assignedCarId;

  ListBuilder<String>? _contactPersonIds;
  ListBuilder<String> get contactPersonIds =>
      _$this._contactPersonIds ??= ListBuilder<String>();
  set contactPersonIds(covariant ListBuilder<String>? contactPersonIds) =>
      _$this._contactPersonIds = contactPersonIds;

  String? _customerId;
  String? get customerId => _$this._customerId;
  set customerId(covariant String? customerId) =>
      _$this._customerId = customerId;

  AddressBuilder? _deliveryAddressSnapshot;
  AddressBuilder get deliveryAddressSnapshot =>
      _$this._deliveryAddressSnapshot ??= AddressBuilder();
  set deliveryAddressSnapshot(
          covariant AddressBuilder? deliveryAddressSnapshot) =>
      _$this._deliveryAddressSnapshot = deliveryAddressSnapshot;

  String? _desiredTime;
  String? get desiredTime => _$this._desiredTime;
  set desiredTime(covariant String? desiredTime) =>
      _$this._desiredTime = desiredTime;

  int? _erpBelegartId;
  int? get erpBelegartId => _$this._erpBelegartId;
  set erpBelegartId(covariant int? erpBelegartId) =>
      _$this._erpBelegartId = erpBelegartId;

  String? _erpBelegnummer;
  String? get erpBelegnummer => _$this._erpBelegnummer;
  set erpBelegnummer(covariant String? erpBelegnummer) =>
      _$this._erpBelegnummer = erpBelegnummer;

  String? _id;
  String? get id => _$this._id;
  set id(covariant String? id) => _$this._id = id;

  String? _paymentMethodId;
  String? get paymentMethodId => _$this._paymentMethodId;
  set paymentMethodId(covariant String? paymentMethodId) =>
      _$this._paymentMethodId = paymentMethodId;

  double? _prepaidAmount;
  double? get prepaidAmount => _$this._prepaidAmount;
  set prepaidAmount(covariant double? prepaidAmount) =>
      _$this._prepaidAmount = prepaidAmount;

  String? _specialAgreements;
  String? get specialAgreements => _$this._specialAgreements;
  set specialAgreements(covariant String? specialAgreements) =>
      _$this._specialAgreements = specialAgreements;

  DeliveryState? _state;
  DeliveryState? get state => _$this._state;
  set state(covariant DeliveryState? state) => _$this._state = state;

  String? _stateReason;
  String? get stateReason => _$this._stateReason;
  set stateReason(covariant String? stateReason) =>
      _$this._stateReason = stateReason;

  String? _tourId;
  String? get tourId => _$this._tourId;
  set tourId(covariant String? tourId) => _$this._tourId = tourId;

  DeliveryWithItemsBuilder() {
    DeliveryWithItems._defaults(this);
  }

  DeliveryWithItemsBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _sortOrder = $v.sortOrder;
      _items = $v.items.toBuilder();
      _assignedCarId = $v.assignedCarId;
      _contactPersonIds = $v.contactPersonIds.toBuilder();
      _customerId = $v.customerId;
      _deliveryAddressSnapshot = $v.deliveryAddressSnapshot.toBuilder();
      _desiredTime = $v.desiredTime;
      _erpBelegartId = $v.erpBelegartId;
      _erpBelegnummer = $v.erpBelegnummer;
      _id = $v.id;
      _paymentMethodId = $v.paymentMethodId;
      _prepaidAmount = $v.prepaidAmount;
      _specialAgreements = $v.specialAgreements;
      _state = $v.state;
      _stateReason = $v.stateReason;
      _tourId = $v.tourId;
      _$v = null;
    }
    return this;
  }

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

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

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

  _$DeliveryWithItems _build() {
    _$DeliveryWithItems _$result;
    try {
      _$result = _$v ??
          _$DeliveryWithItems._(
            sortOrder: BuiltValueNullFieldError.checkNotNull(
                sortOrder, r'DeliveryWithItems', 'sortOrder'),
            items: items.build(),
            assignedCarId: assignedCarId,
            contactPersonIds: contactPersonIds.build(),
            customerId: BuiltValueNullFieldError.checkNotNull(
                customerId, r'DeliveryWithItems', 'customerId'),
            deliveryAddressSnapshot: deliveryAddressSnapshot.build(),
            desiredTime: desiredTime,
            erpBelegartId: BuiltValueNullFieldError.checkNotNull(
                erpBelegartId, r'DeliveryWithItems', 'erpBelegartId'),
            erpBelegnummer: BuiltValueNullFieldError.checkNotNull(
                erpBelegnummer, r'DeliveryWithItems', 'erpBelegnummer'),
            id: BuiltValueNullFieldError.checkNotNull(
                id, r'DeliveryWithItems', 'id'),
            paymentMethodId: BuiltValueNullFieldError.checkNotNull(
                paymentMethodId, r'DeliveryWithItems', 'paymentMethodId'),
            prepaidAmount: BuiltValueNullFieldError.checkNotNull(
                prepaidAmount, r'DeliveryWithItems', 'prepaidAmount'),
            specialAgreements: specialAgreements,
            state: BuiltValueNullFieldError.checkNotNull(
                state, r'DeliveryWithItems', 'state'),
            stateReason: stateReason,
            tourId: BuiltValueNullFieldError.checkNotNull(
                tourId, r'DeliveryWithItems', 'tourId'),
          );
    } catch (_) {
      late String _$failedField;
      try {
        _$failedField = 'items';
        items.build();

        _$failedField = 'contactPersonIds';
        contactPersonIds.build();

        _$failedField = 'deliveryAddressSnapshot';
        deliveryAddressSnapshot.build();
      } catch (e) {
        throw BuiltValueNestedFieldError(
            r'DeliveryWithItems', _$failedField, e.toString());
      }
      rethrow;
    }
    replace(_$result);
    return _$result;
  }
}

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
