// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'sync_delivery.dart';

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

class _$SyncDelivery extends SyncDelivery {
  @override
  final String? belegartCode;
  @override
  final int belegartId;
  @override
  final String? belegartName;
  @override
  final String belegnummer;
  @override
  final BuiltList<SyncContactSource>? contactSources;
  @override
  final Address customerAddress;
  @override
  final String customerName;
  @override
  final Address deliveryAddress;
  @override
  final String? desiredTime;
  @override
  final int erpCustomerId;
  @override
  final BuiltList<SyncDeliveryItem> items;
  @override
  final String? paymentMethodCode;
  @override
  final double? prepaidAmount;
  @override
  final int sortOrder;
  @override
  final String? specialAgreements;

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

  _$SyncDelivery._(
      {this.belegartCode,
      required this.belegartId,
      this.belegartName,
      required this.belegnummer,
      this.contactSources,
      required this.customerAddress,
      required this.customerName,
      required this.deliveryAddress,
      this.desiredTime,
      required this.erpCustomerId,
      required this.items,
      this.paymentMethodCode,
      this.prepaidAmount,
      required this.sortOrder,
      this.specialAgreements})
      : super._();
  @override
  SyncDelivery rebuild(void Function(SyncDeliveryBuilder) updates) =>
      (toBuilder()..update(updates)).build();

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

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is SyncDelivery &&
        belegartCode == other.belegartCode &&
        belegartId == other.belegartId &&
        belegartName == other.belegartName &&
        belegnummer == other.belegnummer &&
        contactSources == other.contactSources &&
        customerAddress == other.customerAddress &&
        customerName == other.customerName &&
        deliveryAddress == other.deliveryAddress &&
        desiredTime == other.desiredTime &&
        erpCustomerId == other.erpCustomerId &&
        items == other.items &&
        paymentMethodCode == other.paymentMethodCode &&
        prepaidAmount == other.prepaidAmount &&
        sortOrder == other.sortOrder &&
        specialAgreements == other.specialAgreements;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, belegartCode.hashCode);
    _$hash = $jc(_$hash, belegartId.hashCode);
    _$hash = $jc(_$hash, belegartName.hashCode);
    _$hash = $jc(_$hash, belegnummer.hashCode);
    _$hash = $jc(_$hash, contactSources.hashCode);
    _$hash = $jc(_$hash, customerAddress.hashCode);
    _$hash = $jc(_$hash, customerName.hashCode);
    _$hash = $jc(_$hash, deliveryAddress.hashCode);
    _$hash = $jc(_$hash, desiredTime.hashCode);
    _$hash = $jc(_$hash, erpCustomerId.hashCode);
    _$hash = $jc(_$hash, items.hashCode);
    _$hash = $jc(_$hash, paymentMethodCode.hashCode);
    _$hash = $jc(_$hash, prepaidAmount.hashCode);
    _$hash = $jc(_$hash, sortOrder.hashCode);
    _$hash = $jc(_$hash, specialAgreements.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'SyncDelivery')
          ..add('belegartCode', belegartCode)
          ..add('belegartId', belegartId)
          ..add('belegartName', belegartName)
          ..add('belegnummer', belegnummer)
          ..add('contactSources', contactSources)
          ..add('customerAddress', customerAddress)
          ..add('customerName', customerName)
          ..add('deliveryAddress', deliveryAddress)
          ..add('desiredTime', desiredTime)
          ..add('erpCustomerId', erpCustomerId)
          ..add('items', items)
          ..add('paymentMethodCode', paymentMethodCode)
          ..add('prepaidAmount', prepaidAmount)
          ..add('sortOrder', sortOrder)
          ..add('specialAgreements', specialAgreements))
        .toString();
  }
}

class SyncDeliveryBuilder
    implements Builder<SyncDelivery, SyncDeliveryBuilder> {
  _$SyncDelivery? _$v;

  String? _belegartCode;
  String? get belegartCode => _$this._belegartCode;
  set belegartCode(String? belegartCode) => _$this._belegartCode = belegartCode;

  int? _belegartId;
  int? get belegartId => _$this._belegartId;
  set belegartId(int? belegartId) => _$this._belegartId = belegartId;

  String? _belegartName;
  String? get belegartName => _$this._belegartName;
  set belegartName(String? belegartName) => _$this._belegartName = belegartName;

  String? _belegnummer;
  String? get belegnummer => _$this._belegnummer;
  set belegnummer(String? belegnummer) => _$this._belegnummer = belegnummer;

  ListBuilder<SyncContactSource>? _contactSources;
  ListBuilder<SyncContactSource> get contactSources =>
      _$this._contactSources ??= ListBuilder<SyncContactSource>();
  set contactSources(ListBuilder<SyncContactSource>? contactSources) =>
      _$this._contactSources = contactSources;

  AddressBuilder? _customerAddress;
  AddressBuilder get customerAddress =>
      _$this._customerAddress ??= AddressBuilder();
  set customerAddress(AddressBuilder? customerAddress) =>
      _$this._customerAddress = customerAddress;

  String? _customerName;
  String? get customerName => _$this._customerName;
  set customerName(String? customerName) => _$this._customerName = customerName;

  AddressBuilder? _deliveryAddress;
  AddressBuilder get deliveryAddress =>
      _$this._deliveryAddress ??= AddressBuilder();
  set deliveryAddress(AddressBuilder? deliveryAddress) =>
      _$this._deliveryAddress = deliveryAddress;

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

  int? _erpCustomerId;
  int? get erpCustomerId => _$this._erpCustomerId;
  set erpCustomerId(int? erpCustomerId) =>
      _$this._erpCustomerId = erpCustomerId;

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

  String? _paymentMethodCode;
  String? get paymentMethodCode => _$this._paymentMethodCode;
  set paymentMethodCode(String? paymentMethodCode) =>
      _$this._paymentMethodCode = paymentMethodCode;

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

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

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

  SyncDeliveryBuilder() {
    SyncDelivery._defaults(this);
  }

  SyncDeliveryBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _belegartCode = $v.belegartCode;
      _belegartId = $v.belegartId;
      _belegartName = $v.belegartName;
      _belegnummer = $v.belegnummer;
      _contactSources = $v.contactSources?.toBuilder();
      _customerAddress = $v.customerAddress.toBuilder();
      _customerName = $v.customerName;
      _deliveryAddress = $v.deliveryAddress.toBuilder();
      _desiredTime = $v.desiredTime;
      _erpCustomerId = $v.erpCustomerId;
      _items = $v.items.toBuilder();
      _paymentMethodCode = $v.paymentMethodCode;
      _prepaidAmount = $v.prepaidAmount;
      _sortOrder = $v.sortOrder;
      _specialAgreements = $v.specialAgreements;
      _$v = null;
    }
    return this;
  }

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

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

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

  _$SyncDelivery _build() {
    _$SyncDelivery _$result;
    try {
      _$result = _$v ??
          _$SyncDelivery._(
            belegartCode: belegartCode,
            belegartId: BuiltValueNullFieldError.checkNotNull(
                belegartId, r'SyncDelivery', 'belegartId'),
            belegartName: belegartName,
            belegnummer: BuiltValueNullFieldError.checkNotNull(
                belegnummer, r'SyncDelivery', 'belegnummer'),
            contactSources: _contactSources?.build(),
            customerAddress: customerAddress.build(),
            customerName: BuiltValueNullFieldError.checkNotNull(
                customerName, r'SyncDelivery', 'customerName'),
            deliveryAddress: deliveryAddress.build(),
            desiredTime: desiredTime,
            erpCustomerId: BuiltValueNullFieldError.checkNotNull(
                erpCustomerId, r'SyncDelivery', 'erpCustomerId'),
            items: items.build(),
            paymentMethodCode: paymentMethodCode,
            prepaidAmount: prepaidAmount,
            sortOrder: BuiltValueNullFieldError.checkNotNull(
                sortOrder, r'SyncDelivery', 'sortOrder'),
            specialAgreements: specialAgreements,
          );
    } catch (_) {
      late String _$failedField;
      try {
        _$failedField = 'contactSources';
        _contactSources?.build();
        _$failedField = 'customerAddress';
        customerAddress.build();

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

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

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
