// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'scan_result.dart';

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

class _$ScanResult extends ScanResult {
  @override
  final String clientScanId;
  @override
  final String? deliveryItemId;
  @override
  final ScanState? newScanState;
  @override
  final String? reason;
  @override
  final ScanResultStatus status;

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

  _$ScanResult._(
      {required this.clientScanId,
      this.deliveryItemId,
      this.newScanState,
      this.reason,
      required this.status})
      : super._();
  @override
  ScanResult rebuild(void Function(ScanResultBuilder) updates) =>
      (toBuilder()..update(updates)).build();

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

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is ScanResult &&
        clientScanId == other.clientScanId &&
        deliveryItemId == other.deliveryItemId &&
        newScanState == other.newScanState &&
        reason == other.reason &&
        status == other.status;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, clientScanId.hashCode);
    _$hash = $jc(_$hash, deliveryItemId.hashCode);
    _$hash = $jc(_$hash, newScanState.hashCode);
    _$hash = $jc(_$hash, reason.hashCode);
    _$hash = $jc(_$hash, status.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'ScanResult')
          ..add('clientScanId', clientScanId)
          ..add('deliveryItemId', deliveryItemId)
          ..add('newScanState', newScanState)
          ..add('reason', reason)
          ..add('status', status))
        .toString();
  }
}

class ScanResultBuilder implements Builder<ScanResult, ScanResultBuilder> {
  _$ScanResult? _$v;

  String? _clientScanId;
  String? get clientScanId => _$this._clientScanId;
  set clientScanId(String? clientScanId) => _$this._clientScanId = clientScanId;

  String? _deliveryItemId;
  String? get deliveryItemId => _$this._deliveryItemId;
  set deliveryItemId(String? deliveryItemId) =>
      _$this._deliveryItemId = deliveryItemId;

  ScanStateBuilder? _newScanState;
  ScanStateBuilder get newScanState =>
      _$this._newScanState ??= ScanStateBuilder();
  set newScanState(ScanStateBuilder? newScanState) =>
      _$this._newScanState = newScanState;

  String? _reason;
  String? get reason => _$this._reason;
  set reason(String? reason) => _$this._reason = reason;

  ScanResultStatus? _status;
  ScanResultStatus? get status => _$this._status;
  set status(ScanResultStatus? status) => _$this._status = status;

  ScanResultBuilder() {
    ScanResult._defaults(this);
  }

  ScanResultBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _clientScanId = $v.clientScanId;
      _deliveryItemId = $v.deliveryItemId;
      _newScanState = $v.newScanState?.toBuilder();
      _reason = $v.reason;
      _status = $v.status;
      _$v = null;
    }
    return this;
  }

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

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

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

  _$ScanResult _build() {
    _$ScanResult _$result;
    try {
      _$result = _$v ??
          _$ScanResult._(
            clientScanId: BuiltValueNullFieldError.checkNotNull(
                clientScanId, r'ScanResult', 'clientScanId'),
            deliveryItemId: deliveryItemId,
            newScanState: _newScanState?.build(),
            reason: reason,
            status: BuiltValueNullFieldError.checkNotNull(
                status, r'ScanResult', 'status'),
          );
    } catch (_) {
      late String _$failedField;
      try {
        _$failedField = 'newScanState';
        _newScanState?.build();
      } catch (e) {
        throw BuiltValueNestedFieldError(
            r'ScanResult', _$failedField, e.toString());
      }
      rethrow;
    }
    replace(_$result);
    return _$result;
  }
}

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
