// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark part of 'rmv_models.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$Product { String? get name; String? get line; String? get displayNumber; String? get category; String? get categoryCode; String? get operator; /// Create a copy of Product /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ProductCopyWith get copyWith => _$ProductCopyWithImpl(this as Product, _$identity); /// Serializes this Product to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Product&&(identical(other.name, name) || other.name == name)&&(identical(other.line, line) || other.line == line)&&(identical(other.displayNumber, displayNumber) || other.displayNumber == displayNumber)&&(identical(other.category, category) || other.category == category)&&(identical(other.categoryCode, categoryCode) || other.categoryCode == categoryCode)&&(identical(other.operator, operator) || other.operator == operator)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,name,line,displayNumber,category,categoryCode,operator); @override String toString() { return 'Product(name: $name, line: $line, displayNumber: $displayNumber, category: $category, categoryCode: $categoryCode, operator: $operator)'; } } /// @nodoc abstract mixin class $ProductCopyWith<$Res> { factory $ProductCopyWith(Product value, $Res Function(Product) _then) = _$ProductCopyWithImpl; @useResult $Res call({ String? name, String? line, String? displayNumber, String? category, String? categoryCode, String? operator }); } /// @nodoc class _$ProductCopyWithImpl<$Res> implements $ProductCopyWith<$Res> { _$ProductCopyWithImpl(this._self, this._then); final Product _self; final $Res Function(Product) _then; /// Create a copy of Product /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? line = freezed,Object? displayNumber = freezed,Object? category = freezed,Object? categoryCode = freezed,Object? operator = freezed,}) { return _then(_self.copyWith( name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String?,line: freezed == line ? _self.line : line // ignore: cast_nullable_to_non_nullable as String?,displayNumber: freezed == displayNumber ? _self.displayNumber : displayNumber // ignore: cast_nullable_to_non_nullable as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable as String?,categoryCode: freezed == categoryCode ? _self.categoryCode : categoryCode // ignore: cast_nullable_to_non_nullable as String?,operator: freezed == operator ? _self.operator : operator // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [Product]. extension ProductPatterns on Product { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Product value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Product() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Product value) $default,){ final _that = this; switch (_that) { case _Product(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Product value)? $default,){ final _that = this; switch (_that) { case _Product() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String? name, String? line, String? displayNumber, String? category, String? categoryCode, String? operator)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Product() when $default != null: return $default(_that.name,_that.line,_that.displayNumber,_that.category,_that.categoryCode,_that.operator);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String? name, String? line, String? displayNumber, String? category, String? categoryCode, String? operator) $default,) {final _that = this; switch (_that) { case _Product(): return $default(_that.name,_that.line,_that.displayNumber,_that.category,_that.categoryCode,_that.operator);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String? name, String? line, String? displayNumber, String? category, String? categoryCode, String? operator)? $default,) {final _that = this; switch (_that) { case _Product() when $default != null: return $default(_that.name,_that.line,_that.displayNumber,_that.category,_that.categoryCode,_that.operator);case _: return null; } } } /// @nodoc @JsonSerializable() class _Product implements Product { const _Product({this.name, this.line, this.displayNumber, this.category, this.categoryCode, this.operator}); factory _Product.fromJson(Map json) => _$ProductFromJson(json); @override final String? name; @override final String? line; @override final String? displayNumber; @override final String? category; @override final String? categoryCode; @override final String? operator; /// Create a copy of Product /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ProductCopyWith<_Product> get copyWith => __$ProductCopyWithImpl<_Product>(this, _$identity); @override Map toJson() { return _$ProductToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Product&&(identical(other.name, name) || other.name == name)&&(identical(other.line, line) || other.line == line)&&(identical(other.displayNumber, displayNumber) || other.displayNumber == displayNumber)&&(identical(other.category, category) || other.category == category)&&(identical(other.categoryCode, categoryCode) || other.categoryCode == categoryCode)&&(identical(other.operator, operator) || other.operator == operator)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,name,line,displayNumber,category,categoryCode,operator); @override String toString() { return 'Product(name: $name, line: $line, displayNumber: $displayNumber, category: $category, categoryCode: $categoryCode, operator: $operator)'; } } /// @nodoc abstract mixin class _$ProductCopyWith<$Res> implements $ProductCopyWith<$Res> { factory _$ProductCopyWith(_Product value, $Res Function(_Product) _then) = __$ProductCopyWithImpl; @override @useResult $Res call({ String? name, String? line, String? displayNumber, String? category, String? categoryCode, String? operator }); } /// @nodoc class __$ProductCopyWithImpl<$Res> implements _$ProductCopyWith<$Res> { __$ProductCopyWithImpl(this._self, this._then); final _Product _self; final $Res Function(_Product) _then; /// Create a copy of Product /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? line = freezed,Object? displayNumber = freezed,Object? category = freezed,Object? categoryCode = freezed,Object? operator = freezed,}) { return _then(_Product( name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String?,line: freezed == line ? _self.line : line // ignore: cast_nullable_to_non_nullable as String?,displayNumber: freezed == displayNumber ? _self.displayNumber : displayNumber // ignore: cast_nullable_to_non_nullable as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable as String?,categoryCode: freezed == categoryCode ? _self.categoryCode : categoryCode // ignore: cast_nullable_to_non_nullable as String?,operator: freezed == operator ? _self.operator : operator // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc mixin _$StopLocation { String get id; String? get extId; String get name; String? get description; double? get lat; double? get lon; int? get products; int? get distanceMeters; /// Create a copy of StopLocation /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $StopLocationCopyWith get copyWith => _$StopLocationCopyWithImpl(this as StopLocation, _$identity); /// Serializes this StopLocation to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is StopLocation&&(identical(other.id, id) || other.id == id)&&(identical(other.extId, extId) || other.extId == extId)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lon, lon) || other.lon == lon)&&(identical(other.products, products) || other.products == products)&&(identical(other.distanceMeters, distanceMeters) || other.distanceMeters == distanceMeters)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,extId,name,description,lat,lon,products,distanceMeters); @override String toString() { return 'StopLocation(id: $id, extId: $extId, name: $name, description: $description, lat: $lat, lon: $lon, products: $products, distanceMeters: $distanceMeters)'; } } /// @nodoc abstract mixin class $StopLocationCopyWith<$Res> { factory $StopLocationCopyWith(StopLocation value, $Res Function(StopLocation) _then) = _$StopLocationCopyWithImpl; @useResult $Res call({ String id, String? extId, String name, String? description, double? lat, double? lon, int? products, int? distanceMeters }); } /// @nodoc class _$StopLocationCopyWithImpl<$Res> implements $StopLocationCopyWith<$Res> { _$StopLocationCopyWithImpl(this._self, this._then); final StopLocation _self; final $Res Function(StopLocation) _then; /// Create a copy of StopLocation /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? extId = freezed,Object? name = null,Object? description = freezed,Object? lat = freezed,Object? lon = freezed,Object? products = freezed,Object? distanceMeters = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,extId: freezed == extId ? _self.extId : extId // ignore: cast_nullable_to_non_nullable as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable as double?,lon: freezed == lon ? _self.lon : lon // ignore: cast_nullable_to_non_nullable as double?,products: freezed == products ? _self.products : products // ignore: cast_nullable_to_non_nullable as int?,distanceMeters: freezed == distanceMeters ? _self.distanceMeters : distanceMeters // ignore: cast_nullable_to_non_nullable as int?, )); } } /// Adds pattern-matching-related methods to [StopLocation]. extension StopLocationPatterns on StopLocation { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _StopLocation value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _StopLocation() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _StopLocation value) $default,){ final _that = this; switch (_that) { case _StopLocation(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _StopLocation value)? $default,){ final _that = this; switch (_that) { case _StopLocation() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String? extId, String name, String? description, double? lat, double? lon, int? products, int? distanceMeters)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _StopLocation() when $default != null: return $default(_that.id,_that.extId,_that.name,_that.description,_that.lat,_that.lon,_that.products,_that.distanceMeters);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String? extId, String name, String? description, double? lat, double? lon, int? products, int? distanceMeters) $default,) {final _that = this; switch (_that) { case _StopLocation(): return $default(_that.id,_that.extId,_that.name,_that.description,_that.lat,_that.lon,_that.products,_that.distanceMeters);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String? extId, String name, String? description, double? lat, double? lon, int? products, int? distanceMeters)? $default,) {final _that = this; switch (_that) { case _StopLocation() when $default != null: return $default(_that.id,_that.extId,_that.name,_that.description,_that.lat,_that.lon,_that.products,_that.distanceMeters);case _: return null; } } } /// @nodoc @JsonSerializable() class _StopLocation implements StopLocation { const _StopLocation({required this.id, this.extId, required this.name, this.description, this.lat, this.lon, this.products, this.distanceMeters}); factory _StopLocation.fromJson(Map json) => _$StopLocationFromJson(json); @override final String id; @override final String? extId; @override final String name; @override final String? description; @override final double? lat; @override final double? lon; @override final int? products; @override final int? distanceMeters; /// Create a copy of StopLocation /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$StopLocationCopyWith<_StopLocation> get copyWith => __$StopLocationCopyWithImpl<_StopLocation>(this, _$identity); @override Map toJson() { return _$StopLocationToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _StopLocation&&(identical(other.id, id) || other.id == id)&&(identical(other.extId, extId) || other.extId == extId)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lon, lon) || other.lon == lon)&&(identical(other.products, products) || other.products == products)&&(identical(other.distanceMeters, distanceMeters) || other.distanceMeters == distanceMeters)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,extId,name,description,lat,lon,products,distanceMeters); @override String toString() { return 'StopLocation(id: $id, extId: $extId, name: $name, description: $description, lat: $lat, lon: $lon, products: $products, distanceMeters: $distanceMeters)'; } } /// @nodoc abstract mixin class _$StopLocationCopyWith<$Res> implements $StopLocationCopyWith<$Res> { factory _$StopLocationCopyWith(_StopLocation value, $Res Function(_StopLocation) _then) = __$StopLocationCopyWithImpl; @override @useResult $Res call({ String id, String? extId, String name, String? description, double? lat, double? lon, int? products, int? distanceMeters }); } /// @nodoc class __$StopLocationCopyWithImpl<$Res> implements _$StopLocationCopyWith<$Res> { __$StopLocationCopyWithImpl(this._self, this._then); final _StopLocation _self; final $Res Function(_StopLocation) _then; /// Create a copy of StopLocation /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? extId = freezed,Object? name = null,Object? description = freezed,Object? lat = freezed,Object? lon = freezed,Object? products = freezed,Object? distanceMeters = freezed,}) { return _then(_StopLocation( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,extId: freezed == extId ? _self.extId : extId // ignore: cast_nullable_to_non_nullable as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable as double?,lon: freezed == lon ? _self.lon : lon // ignore: cast_nullable_to_non_nullable as double?,products: freezed == products ? _self.products : products // ignore: cast_nullable_to_non_nullable as int?,distanceMeters: freezed == distanceMeters ? _self.distanceMeters : distanceMeters // ignore: cast_nullable_to_non_nullable as int?, )); } } /// @nodoc mixin _$Departure { String get stopId; String? get stopExtId; String get stopName; String get name; String get direction; String? get directionFlag; DateTime get scheduledTime; DateTime? get realTime; int? get delayMinutes; String? get track; String? get realTrack; bool get cancelled; bool get reachable; Product? get product; String? get journeyRef; /// Create a copy of Departure /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $DepartureCopyWith get copyWith => _$DepartureCopyWithImpl(this as Departure, _$identity); /// Serializes this Departure to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Departure&&(identical(other.stopId, stopId) || other.stopId == stopId)&&(identical(other.stopExtId, stopExtId) || other.stopExtId == stopExtId)&&(identical(other.stopName, stopName) || other.stopName == stopName)&&(identical(other.name, name) || other.name == name)&&(identical(other.direction, direction) || other.direction == direction)&&(identical(other.directionFlag, directionFlag) || other.directionFlag == directionFlag)&&(identical(other.scheduledTime, scheduledTime) || other.scheduledTime == scheduledTime)&&(identical(other.realTime, realTime) || other.realTime == realTime)&&(identical(other.delayMinutes, delayMinutes) || other.delayMinutes == delayMinutes)&&(identical(other.track, track) || other.track == track)&&(identical(other.realTrack, realTrack) || other.realTrack == realTrack)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.reachable, reachable) || other.reachable == reachable)&&(identical(other.product, product) || other.product == product)&&(identical(other.journeyRef, journeyRef) || other.journeyRef == journeyRef)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,stopId,stopExtId,stopName,name,direction,directionFlag,scheduledTime,realTime,delayMinutes,track,realTrack,cancelled,reachable,product,journeyRef); @override String toString() { return 'Departure(stopId: $stopId, stopExtId: $stopExtId, stopName: $stopName, name: $name, direction: $direction, directionFlag: $directionFlag, scheduledTime: $scheduledTime, realTime: $realTime, delayMinutes: $delayMinutes, track: $track, realTrack: $realTrack, cancelled: $cancelled, reachable: $reachable, product: $product, journeyRef: $journeyRef)'; } } /// @nodoc abstract mixin class $DepartureCopyWith<$Res> { factory $DepartureCopyWith(Departure value, $Res Function(Departure) _then) = _$DepartureCopyWithImpl; @useResult $Res call({ String stopId, String? stopExtId, String stopName, String name, String direction, String? directionFlag, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, bool reachable, Product? product, String? journeyRef }); $ProductCopyWith<$Res>? get product; } /// @nodoc class _$DepartureCopyWithImpl<$Res> implements $DepartureCopyWith<$Res> { _$DepartureCopyWithImpl(this._self, this._then); final Departure _self; final $Res Function(Departure) _then; /// Create a copy of Departure /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? stopId = null,Object? stopExtId = freezed,Object? stopName = null,Object? name = null,Object? direction = null,Object? directionFlag = freezed,Object? scheduledTime = null,Object? realTime = freezed,Object? delayMinutes = freezed,Object? track = freezed,Object? realTrack = freezed,Object? cancelled = null,Object? reachable = null,Object? product = freezed,Object? journeyRef = freezed,}) { return _then(_self.copyWith( stopId: null == stopId ? _self.stopId : stopId // ignore: cast_nullable_to_non_nullable as String,stopExtId: freezed == stopExtId ? _self.stopExtId : stopExtId // ignore: cast_nullable_to_non_nullable as String?,stopName: null == stopName ? _self.stopName : stopName // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,direction: null == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as String,directionFlag: freezed == directionFlag ? _self.directionFlag : directionFlag // ignore: cast_nullable_to_non_nullable as String?,scheduledTime: null == scheduledTime ? _self.scheduledTime : scheduledTime // ignore: cast_nullable_to_non_nullable as DateTime,realTime: freezed == realTime ? _self.realTime : realTime // ignore: cast_nullable_to_non_nullable as DateTime?,delayMinutes: freezed == delayMinutes ? _self.delayMinutes : delayMinutes // ignore: cast_nullable_to_non_nullable as int?,track: freezed == track ? _self.track : track // ignore: cast_nullable_to_non_nullable as String?,realTrack: freezed == realTrack ? _self.realTrack : realTrack // ignore: cast_nullable_to_non_nullable as String?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,reachable: null == reachable ? _self.reachable : reachable // ignore: cast_nullable_to_non_nullable as bool,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,journeyRef: freezed == journeyRef ? _self.journeyRef : journeyRef // ignore: cast_nullable_to_non_nullable as String?, )); } /// Create a copy of Departure /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// Adds pattern-matching-related methods to [Departure]. extension DeparturePatterns on Departure { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Departure value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Departure() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Departure value) $default,){ final _that = this; switch (_that) { case _Departure(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Departure value)? $default,){ final _that = this; switch (_that) { case _Departure() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String stopId, String? stopExtId, String stopName, String name, String direction, String? directionFlag, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, bool reachable, Product? product, String? journeyRef)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Departure() when $default != null: return $default(_that.stopId,_that.stopExtId,_that.stopName,_that.name,_that.direction,_that.directionFlag,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.cancelled,_that.reachable,_that.product,_that.journeyRef);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String stopId, String? stopExtId, String stopName, String name, String direction, String? directionFlag, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, bool reachable, Product? product, String? journeyRef) $default,) {final _that = this; switch (_that) { case _Departure(): return $default(_that.stopId,_that.stopExtId,_that.stopName,_that.name,_that.direction,_that.directionFlag,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.cancelled,_that.reachable,_that.product,_that.journeyRef);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String stopId, String? stopExtId, String stopName, String name, String direction, String? directionFlag, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, bool reachable, Product? product, String? journeyRef)? $default,) {final _that = this; switch (_that) { case _Departure() when $default != null: return $default(_that.stopId,_that.stopExtId,_that.stopName,_that.name,_that.direction,_that.directionFlag,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.cancelled,_that.reachable,_that.product,_that.journeyRef);case _: return null; } } } /// @nodoc @JsonSerializable() class _Departure implements Departure { const _Departure({required this.stopId, this.stopExtId, required this.stopName, required this.name, required this.direction, this.directionFlag, required this.scheduledTime, this.realTime, this.delayMinutes, this.track, this.realTrack, this.cancelled = false, this.reachable = true, this.product, this.journeyRef}); factory _Departure.fromJson(Map json) => _$DepartureFromJson(json); @override final String stopId; @override final String? stopExtId; @override final String stopName; @override final String name; @override final String direction; @override final String? directionFlag; @override final DateTime scheduledTime; @override final DateTime? realTime; @override final int? delayMinutes; @override final String? track; @override final String? realTrack; @override@JsonKey() final bool cancelled; @override@JsonKey() final bool reachable; @override final Product? product; @override final String? journeyRef; /// Create a copy of Departure /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$DepartureCopyWith<_Departure> get copyWith => __$DepartureCopyWithImpl<_Departure>(this, _$identity); @override Map toJson() { return _$DepartureToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Departure&&(identical(other.stopId, stopId) || other.stopId == stopId)&&(identical(other.stopExtId, stopExtId) || other.stopExtId == stopExtId)&&(identical(other.stopName, stopName) || other.stopName == stopName)&&(identical(other.name, name) || other.name == name)&&(identical(other.direction, direction) || other.direction == direction)&&(identical(other.directionFlag, directionFlag) || other.directionFlag == directionFlag)&&(identical(other.scheduledTime, scheduledTime) || other.scheduledTime == scheduledTime)&&(identical(other.realTime, realTime) || other.realTime == realTime)&&(identical(other.delayMinutes, delayMinutes) || other.delayMinutes == delayMinutes)&&(identical(other.track, track) || other.track == track)&&(identical(other.realTrack, realTrack) || other.realTrack == realTrack)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.reachable, reachable) || other.reachable == reachable)&&(identical(other.product, product) || other.product == product)&&(identical(other.journeyRef, journeyRef) || other.journeyRef == journeyRef)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,stopId,stopExtId,stopName,name,direction,directionFlag,scheduledTime,realTime,delayMinutes,track,realTrack,cancelled,reachable,product,journeyRef); @override String toString() { return 'Departure(stopId: $stopId, stopExtId: $stopExtId, stopName: $stopName, name: $name, direction: $direction, directionFlag: $directionFlag, scheduledTime: $scheduledTime, realTime: $realTime, delayMinutes: $delayMinutes, track: $track, realTrack: $realTrack, cancelled: $cancelled, reachable: $reachable, product: $product, journeyRef: $journeyRef)'; } } /// @nodoc abstract mixin class _$DepartureCopyWith<$Res> implements $DepartureCopyWith<$Res> { factory _$DepartureCopyWith(_Departure value, $Res Function(_Departure) _then) = __$DepartureCopyWithImpl; @override @useResult $Res call({ String stopId, String? stopExtId, String stopName, String name, String direction, String? directionFlag, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, bool reachable, Product? product, String? journeyRef }); @override $ProductCopyWith<$Res>? get product; } /// @nodoc class __$DepartureCopyWithImpl<$Res> implements _$DepartureCopyWith<$Res> { __$DepartureCopyWithImpl(this._self, this._then); final _Departure _self; final $Res Function(_Departure) _then; /// Create a copy of Departure /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? stopId = null,Object? stopExtId = freezed,Object? stopName = null,Object? name = null,Object? direction = null,Object? directionFlag = freezed,Object? scheduledTime = null,Object? realTime = freezed,Object? delayMinutes = freezed,Object? track = freezed,Object? realTrack = freezed,Object? cancelled = null,Object? reachable = null,Object? product = freezed,Object? journeyRef = freezed,}) { return _then(_Departure( stopId: null == stopId ? _self.stopId : stopId // ignore: cast_nullable_to_non_nullable as String,stopExtId: freezed == stopExtId ? _self.stopExtId : stopExtId // ignore: cast_nullable_to_non_nullable as String?,stopName: null == stopName ? _self.stopName : stopName // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,direction: null == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as String,directionFlag: freezed == directionFlag ? _self.directionFlag : directionFlag // ignore: cast_nullable_to_non_nullable as String?,scheduledTime: null == scheduledTime ? _self.scheduledTime : scheduledTime // ignore: cast_nullable_to_non_nullable as DateTime,realTime: freezed == realTime ? _self.realTime : realTime // ignore: cast_nullable_to_non_nullable as DateTime?,delayMinutes: freezed == delayMinutes ? _self.delayMinutes : delayMinutes // ignore: cast_nullable_to_non_nullable as int?,track: freezed == track ? _self.track : track // ignore: cast_nullable_to_non_nullable as String?,realTrack: freezed == realTrack ? _self.realTrack : realTrack // ignore: cast_nullable_to_non_nullable as String?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,reachable: null == reachable ? _self.reachable : reachable // ignore: cast_nullable_to_non_nullable as bool,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,journeyRef: freezed == journeyRef ? _self.journeyRef : journeyRef // ignore: cast_nullable_to_non_nullable as String?, )); } /// Create a copy of Departure /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// @nodoc mixin _$Arrival { String get stopId; String? get stopExtId; String get stopName; String get name; String get origin; DateTime get scheduledTime; DateTime? get realTime; int? get delayMinutes; String? get track; String? get realTrack; bool get cancelled; Product? get product; String? get journeyRef; /// Create a copy of Arrival /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ArrivalCopyWith get copyWith => _$ArrivalCopyWithImpl(this as Arrival, _$identity); /// Serializes this Arrival to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Arrival&&(identical(other.stopId, stopId) || other.stopId == stopId)&&(identical(other.stopExtId, stopExtId) || other.stopExtId == stopExtId)&&(identical(other.stopName, stopName) || other.stopName == stopName)&&(identical(other.name, name) || other.name == name)&&(identical(other.origin, origin) || other.origin == origin)&&(identical(other.scheduledTime, scheduledTime) || other.scheduledTime == scheduledTime)&&(identical(other.realTime, realTime) || other.realTime == realTime)&&(identical(other.delayMinutes, delayMinutes) || other.delayMinutes == delayMinutes)&&(identical(other.track, track) || other.track == track)&&(identical(other.realTrack, realTrack) || other.realTrack == realTrack)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.product, product) || other.product == product)&&(identical(other.journeyRef, journeyRef) || other.journeyRef == journeyRef)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,stopId,stopExtId,stopName,name,origin,scheduledTime,realTime,delayMinutes,track,realTrack,cancelled,product,journeyRef); @override String toString() { return 'Arrival(stopId: $stopId, stopExtId: $stopExtId, stopName: $stopName, name: $name, origin: $origin, scheduledTime: $scheduledTime, realTime: $realTime, delayMinutes: $delayMinutes, track: $track, realTrack: $realTrack, cancelled: $cancelled, product: $product, journeyRef: $journeyRef)'; } } /// @nodoc abstract mixin class $ArrivalCopyWith<$Res> { factory $ArrivalCopyWith(Arrival value, $Res Function(Arrival) _then) = _$ArrivalCopyWithImpl; @useResult $Res call({ String stopId, String? stopExtId, String stopName, String name, String origin, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, Product? product, String? journeyRef }); $ProductCopyWith<$Res>? get product; } /// @nodoc class _$ArrivalCopyWithImpl<$Res> implements $ArrivalCopyWith<$Res> { _$ArrivalCopyWithImpl(this._self, this._then); final Arrival _self; final $Res Function(Arrival) _then; /// Create a copy of Arrival /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? stopId = null,Object? stopExtId = freezed,Object? stopName = null,Object? name = null,Object? origin = null,Object? scheduledTime = null,Object? realTime = freezed,Object? delayMinutes = freezed,Object? track = freezed,Object? realTrack = freezed,Object? cancelled = null,Object? product = freezed,Object? journeyRef = freezed,}) { return _then(_self.copyWith( stopId: null == stopId ? _self.stopId : stopId // ignore: cast_nullable_to_non_nullable as String,stopExtId: freezed == stopExtId ? _self.stopExtId : stopExtId // ignore: cast_nullable_to_non_nullable as String?,stopName: null == stopName ? _self.stopName : stopName // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,origin: null == origin ? _self.origin : origin // ignore: cast_nullable_to_non_nullable as String,scheduledTime: null == scheduledTime ? _self.scheduledTime : scheduledTime // ignore: cast_nullable_to_non_nullable as DateTime,realTime: freezed == realTime ? _self.realTime : realTime // ignore: cast_nullable_to_non_nullable as DateTime?,delayMinutes: freezed == delayMinutes ? _self.delayMinutes : delayMinutes // ignore: cast_nullable_to_non_nullable as int?,track: freezed == track ? _self.track : track // ignore: cast_nullable_to_non_nullable as String?,realTrack: freezed == realTrack ? _self.realTrack : realTrack // ignore: cast_nullable_to_non_nullable as String?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,journeyRef: freezed == journeyRef ? _self.journeyRef : journeyRef // ignore: cast_nullable_to_non_nullable as String?, )); } /// Create a copy of Arrival /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// Adds pattern-matching-related methods to [Arrival]. extension ArrivalPatterns on Arrival { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Arrival value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Arrival() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Arrival value) $default,){ final _that = this; switch (_that) { case _Arrival(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Arrival value)? $default,){ final _that = this; switch (_that) { case _Arrival() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String stopId, String? stopExtId, String stopName, String name, String origin, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, Product? product, String? journeyRef)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Arrival() when $default != null: return $default(_that.stopId,_that.stopExtId,_that.stopName,_that.name,_that.origin,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.cancelled,_that.product,_that.journeyRef);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String stopId, String? stopExtId, String stopName, String name, String origin, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, Product? product, String? journeyRef) $default,) {final _that = this; switch (_that) { case _Arrival(): return $default(_that.stopId,_that.stopExtId,_that.stopName,_that.name,_that.origin,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.cancelled,_that.product,_that.journeyRef);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String stopId, String? stopExtId, String stopName, String name, String origin, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, Product? product, String? journeyRef)? $default,) {final _that = this; switch (_that) { case _Arrival() when $default != null: return $default(_that.stopId,_that.stopExtId,_that.stopName,_that.name,_that.origin,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.cancelled,_that.product,_that.journeyRef);case _: return null; } } } /// @nodoc @JsonSerializable() class _Arrival implements Arrival { const _Arrival({required this.stopId, this.stopExtId, required this.stopName, required this.name, required this.origin, required this.scheduledTime, this.realTime, this.delayMinutes, this.track, this.realTrack, this.cancelled = false, this.product, this.journeyRef}); factory _Arrival.fromJson(Map json) => _$ArrivalFromJson(json); @override final String stopId; @override final String? stopExtId; @override final String stopName; @override final String name; @override final String origin; @override final DateTime scheduledTime; @override final DateTime? realTime; @override final int? delayMinutes; @override final String? track; @override final String? realTrack; @override@JsonKey() final bool cancelled; @override final Product? product; @override final String? journeyRef; /// Create a copy of Arrival /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ArrivalCopyWith<_Arrival> get copyWith => __$ArrivalCopyWithImpl<_Arrival>(this, _$identity); @override Map toJson() { return _$ArrivalToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Arrival&&(identical(other.stopId, stopId) || other.stopId == stopId)&&(identical(other.stopExtId, stopExtId) || other.stopExtId == stopExtId)&&(identical(other.stopName, stopName) || other.stopName == stopName)&&(identical(other.name, name) || other.name == name)&&(identical(other.origin, origin) || other.origin == origin)&&(identical(other.scheduledTime, scheduledTime) || other.scheduledTime == scheduledTime)&&(identical(other.realTime, realTime) || other.realTime == realTime)&&(identical(other.delayMinutes, delayMinutes) || other.delayMinutes == delayMinutes)&&(identical(other.track, track) || other.track == track)&&(identical(other.realTrack, realTrack) || other.realTrack == realTrack)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.product, product) || other.product == product)&&(identical(other.journeyRef, journeyRef) || other.journeyRef == journeyRef)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,stopId,stopExtId,stopName,name,origin,scheduledTime,realTime,delayMinutes,track,realTrack,cancelled,product,journeyRef); @override String toString() { return 'Arrival(stopId: $stopId, stopExtId: $stopExtId, stopName: $stopName, name: $name, origin: $origin, scheduledTime: $scheduledTime, realTime: $realTime, delayMinutes: $delayMinutes, track: $track, realTrack: $realTrack, cancelled: $cancelled, product: $product, journeyRef: $journeyRef)'; } } /// @nodoc abstract mixin class _$ArrivalCopyWith<$Res> implements $ArrivalCopyWith<$Res> { factory _$ArrivalCopyWith(_Arrival value, $Res Function(_Arrival) _then) = __$ArrivalCopyWithImpl; @override @useResult $Res call({ String stopId, String? stopExtId, String stopName, String name, String origin, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, bool cancelled, Product? product, String? journeyRef }); @override $ProductCopyWith<$Res>? get product; } /// @nodoc class __$ArrivalCopyWithImpl<$Res> implements _$ArrivalCopyWith<$Res> { __$ArrivalCopyWithImpl(this._self, this._then); final _Arrival _self; final $Res Function(_Arrival) _then; /// Create a copy of Arrival /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? stopId = null,Object? stopExtId = freezed,Object? stopName = null,Object? name = null,Object? origin = null,Object? scheduledTime = null,Object? realTime = freezed,Object? delayMinutes = freezed,Object? track = freezed,Object? realTrack = freezed,Object? cancelled = null,Object? product = freezed,Object? journeyRef = freezed,}) { return _then(_Arrival( stopId: null == stopId ? _self.stopId : stopId // ignore: cast_nullable_to_non_nullable as String,stopExtId: freezed == stopExtId ? _self.stopExtId : stopExtId // ignore: cast_nullable_to_non_nullable as String?,stopName: null == stopName ? _self.stopName : stopName // ignore: cast_nullable_to_non_nullable as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,origin: null == origin ? _self.origin : origin // ignore: cast_nullable_to_non_nullable as String,scheduledTime: null == scheduledTime ? _self.scheduledTime : scheduledTime // ignore: cast_nullable_to_non_nullable as DateTime,realTime: freezed == realTime ? _self.realTime : realTime // ignore: cast_nullable_to_non_nullable as DateTime?,delayMinutes: freezed == delayMinutes ? _self.delayMinutes : delayMinutes // ignore: cast_nullable_to_non_nullable as int?,track: freezed == track ? _self.track : track // ignore: cast_nullable_to_non_nullable as String?,realTrack: freezed == realTrack ? _self.realTrack : realTrack // ignore: cast_nullable_to_non_nullable as String?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,journeyRef: freezed == journeyRef ? _self.journeyRef : journeyRef // ignore: cast_nullable_to_non_nullable as String?, )); } /// Create a copy of Arrival /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// @nodoc mixin _$TripEndpoint { String get stopId; String? get stopExtId; String get name; double? get lat; double? get lon; DateTime get scheduledTime; DateTime? get realTime; int? get delayMinutes; String? get track; String? get realTrack; String? get type; /// Create a copy of TripEndpoint /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $TripEndpointCopyWith get copyWith => _$TripEndpointCopyWithImpl(this as TripEndpoint, _$identity); /// Serializes this TripEndpoint to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is TripEndpoint&&(identical(other.stopId, stopId) || other.stopId == stopId)&&(identical(other.stopExtId, stopExtId) || other.stopExtId == stopExtId)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lon, lon) || other.lon == lon)&&(identical(other.scheduledTime, scheduledTime) || other.scheduledTime == scheduledTime)&&(identical(other.realTime, realTime) || other.realTime == realTime)&&(identical(other.delayMinutes, delayMinutes) || other.delayMinutes == delayMinutes)&&(identical(other.track, track) || other.track == track)&&(identical(other.realTrack, realTrack) || other.realTrack == realTrack)&&(identical(other.type, type) || other.type == type)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,stopId,stopExtId,name,lat,lon,scheduledTime,realTime,delayMinutes,track,realTrack,type); @override String toString() { return 'TripEndpoint(stopId: $stopId, stopExtId: $stopExtId, name: $name, lat: $lat, lon: $lon, scheduledTime: $scheduledTime, realTime: $realTime, delayMinutes: $delayMinutes, track: $track, realTrack: $realTrack, type: $type)'; } } /// @nodoc abstract mixin class $TripEndpointCopyWith<$Res> { factory $TripEndpointCopyWith(TripEndpoint value, $Res Function(TripEndpoint) _then) = _$TripEndpointCopyWithImpl; @useResult $Res call({ String stopId, String? stopExtId, String name, double? lat, double? lon, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, String? type }); } /// @nodoc class _$TripEndpointCopyWithImpl<$Res> implements $TripEndpointCopyWith<$Res> { _$TripEndpointCopyWithImpl(this._self, this._then); final TripEndpoint _self; final $Res Function(TripEndpoint) _then; /// Create a copy of TripEndpoint /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? stopId = null,Object? stopExtId = freezed,Object? name = null,Object? lat = freezed,Object? lon = freezed,Object? scheduledTime = null,Object? realTime = freezed,Object? delayMinutes = freezed,Object? track = freezed,Object? realTrack = freezed,Object? type = freezed,}) { return _then(_self.copyWith( stopId: null == stopId ? _self.stopId : stopId // ignore: cast_nullable_to_non_nullable as String,stopExtId: freezed == stopExtId ? _self.stopExtId : stopExtId // ignore: cast_nullable_to_non_nullable as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable as double?,lon: freezed == lon ? _self.lon : lon // ignore: cast_nullable_to_non_nullable as double?,scheduledTime: null == scheduledTime ? _self.scheduledTime : scheduledTime // ignore: cast_nullable_to_non_nullable as DateTime,realTime: freezed == realTime ? _self.realTime : realTime // ignore: cast_nullable_to_non_nullable as DateTime?,delayMinutes: freezed == delayMinutes ? _self.delayMinutes : delayMinutes // ignore: cast_nullable_to_non_nullable as int?,track: freezed == track ? _self.track : track // ignore: cast_nullable_to_non_nullable as String?,realTrack: freezed == realTrack ? _self.realTrack : realTrack // ignore: cast_nullable_to_non_nullable as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [TripEndpoint]. extension TripEndpointPatterns on TripEndpoint { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _TripEndpoint value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _TripEndpoint() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _TripEndpoint value) $default,){ final _that = this; switch (_that) { case _TripEndpoint(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _TripEndpoint value)? $default,){ final _that = this; switch (_that) { case _TripEndpoint() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String stopId, String? stopExtId, String name, double? lat, double? lon, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, String? type)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _TripEndpoint() when $default != null: return $default(_that.stopId,_that.stopExtId,_that.name,_that.lat,_that.lon,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.type);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String stopId, String? stopExtId, String name, double? lat, double? lon, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, String? type) $default,) {final _that = this; switch (_that) { case _TripEndpoint(): return $default(_that.stopId,_that.stopExtId,_that.name,_that.lat,_that.lon,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.type);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String stopId, String? stopExtId, String name, double? lat, double? lon, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, String? type)? $default,) {final _that = this; switch (_that) { case _TripEndpoint() when $default != null: return $default(_that.stopId,_that.stopExtId,_that.name,_that.lat,_that.lon,_that.scheduledTime,_that.realTime,_that.delayMinutes,_that.track,_that.realTrack,_that.type);case _: return null; } } } /// @nodoc @JsonSerializable() class _TripEndpoint implements TripEndpoint { const _TripEndpoint({required this.stopId, this.stopExtId, required this.name, this.lat, this.lon, required this.scheduledTime, this.realTime, this.delayMinutes, this.track, this.realTrack, this.type}); factory _TripEndpoint.fromJson(Map json) => _$TripEndpointFromJson(json); @override final String stopId; @override final String? stopExtId; @override final String name; @override final double? lat; @override final double? lon; @override final DateTime scheduledTime; @override final DateTime? realTime; @override final int? delayMinutes; @override final String? track; @override final String? realTrack; @override final String? type; /// Create a copy of TripEndpoint /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$TripEndpointCopyWith<_TripEndpoint> get copyWith => __$TripEndpointCopyWithImpl<_TripEndpoint>(this, _$identity); @override Map toJson() { return _$TripEndpointToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _TripEndpoint&&(identical(other.stopId, stopId) || other.stopId == stopId)&&(identical(other.stopExtId, stopExtId) || other.stopExtId == stopExtId)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lon, lon) || other.lon == lon)&&(identical(other.scheduledTime, scheduledTime) || other.scheduledTime == scheduledTime)&&(identical(other.realTime, realTime) || other.realTime == realTime)&&(identical(other.delayMinutes, delayMinutes) || other.delayMinutes == delayMinutes)&&(identical(other.track, track) || other.track == track)&&(identical(other.realTrack, realTrack) || other.realTrack == realTrack)&&(identical(other.type, type) || other.type == type)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,stopId,stopExtId,name,lat,lon,scheduledTime,realTime,delayMinutes,track,realTrack,type); @override String toString() { return 'TripEndpoint(stopId: $stopId, stopExtId: $stopExtId, name: $name, lat: $lat, lon: $lon, scheduledTime: $scheduledTime, realTime: $realTime, delayMinutes: $delayMinutes, track: $track, realTrack: $realTrack, type: $type)'; } } /// @nodoc abstract mixin class _$TripEndpointCopyWith<$Res> implements $TripEndpointCopyWith<$Res> { factory _$TripEndpointCopyWith(_TripEndpoint value, $Res Function(_TripEndpoint) _then) = __$TripEndpointCopyWithImpl; @override @useResult $Res call({ String stopId, String? stopExtId, String name, double? lat, double? lon, DateTime scheduledTime, DateTime? realTime, int? delayMinutes, String? track, String? realTrack, String? type }); } /// @nodoc class __$TripEndpointCopyWithImpl<$Res> implements _$TripEndpointCopyWith<$Res> { __$TripEndpointCopyWithImpl(this._self, this._then); final _TripEndpoint _self; final $Res Function(_TripEndpoint) _then; /// Create a copy of TripEndpoint /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? stopId = null,Object? stopExtId = freezed,Object? name = null,Object? lat = freezed,Object? lon = freezed,Object? scheduledTime = null,Object? realTime = freezed,Object? delayMinutes = freezed,Object? track = freezed,Object? realTrack = freezed,Object? type = freezed,}) { return _then(_TripEndpoint( stopId: null == stopId ? _self.stopId : stopId // ignore: cast_nullable_to_non_nullable as String,stopExtId: freezed == stopExtId ? _self.stopExtId : stopExtId // ignore: cast_nullable_to_non_nullable as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable as double?,lon: freezed == lon ? _self.lon : lon // ignore: cast_nullable_to_non_nullable as double?,scheduledTime: null == scheduledTime ? _self.scheduledTime : scheduledTime // ignore: cast_nullable_to_non_nullable as DateTime,realTime: freezed == realTime ? _self.realTime : realTime // ignore: cast_nullable_to_non_nullable as DateTime?,delayMinutes: freezed == delayMinutes ? _self.delayMinutes : delayMinutes // ignore: cast_nullable_to_non_nullable as int?,track: freezed == track ? _self.track : track // ignore: cast_nullable_to_non_nullable as String?,realTrack: freezed == realTrack ? _self.realTrack : realTrack // ignore: cast_nullable_to_non_nullable as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc mixin _$JourneyStop { String get id; String? get extId; String get name; double? get lat; double? get lon; int? get routeIdx; DateTime? get scheduledArrival; DateTime? get scheduledDeparture; DateTime? get realArrival; DateTime? get realDeparture; String? get arrTrack; String? get depTrack; String? get realArrTrack; String? get realDepTrack; bool get cancelled; bool get cancelledArrival; bool get cancelledDeparture; /// Create a copy of JourneyStop /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $JourneyStopCopyWith get copyWith => _$JourneyStopCopyWithImpl(this as JourneyStop, _$identity); /// Serializes this JourneyStop to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is JourneyStop&&(identical(other.id, id) || other.id == id)&&(identical(other.extId, extId) || other.extId == extId)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lon, lon) || other.lon == lon)&&(identical(other.routeIdx, routeIdx) || other.routeIdx == routeIdx)&&(identical(other.scheduledArrival, scheduledArrival) || other.scheduledArrival == scheduledArrival)&&(identical(other.scheduledDeparture, scheduledDeparture) || other.scheduledDeparture == scheduledDeparture)&&(identical(other.realArrival, realArrival) || other.realArrival == realArrival)&&(identical(other.realDeparture, realDeparture) || other.realDeparture == realDeparture)&&(identical(other.arrTrack, arrTrack) || other.arrTrack == arrTrack)&&(identical(other.depTrack, depTrack) || other.depTrack == depTrack)&&(identical(other.realArrTrack, realArrTrack) || other.realArrTrack == realArrTrack)&&(identical(other.realDepTrack, realDepTrack) || other.realDepTrack == realDepTrack)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.cancelledArrival, cancelledArrival) || other.cancelledArrival == cancelledArrival)&&(identical(other.cancelledDeparture, cancelledDeparture) || other.cancelledDeparture == cancelledDeparture)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,extId,name,lat,lon,routeIdx,scheduledArrival,scheduledDeparture,realArrival,realDeparture,arrTrack,depTrack,realArrTrack,realDepTrack,cancelled,cancelledArrival,cancelledDeparture); @override String toString() { return 'JourneyStop(id: $id, extId: $extId, name: $name, lat: $lat, lon: $lon, routeIdx: $routeIdx, scheduledArrival: $scheduledArrival, scheduledDeparture: $scheduledDeparture, realArrival: $realArrival, realDeparture: $realDeparture, arrTrack: $arrTrack, depTrack: $depTrack, realArrTrack: $realArrTrack, realDepTrack: $realDepTrack, cancelled: $cancelled, cancelledArrival: $cancelledArrival, cancelledDeparture: $cancelledDeparture)'; } } /// @nodoc abstract mixin class $JourneyStopCopyWith<$Res> { factory $JourneyStopCopyWith(JourneyStop value, $Res Function(JourneyStop) _then) = _$JourneyStopCopyWithImpl; @useResult $Res call({ String id, String? extId, String name, double? lat, double? lon, int? routeIdx, DateTime? scheduledArrival, DateTime? scheduledDeparture, DateTime? realArrival, DateTime? realDeparture, String? arrTrack, String? depTrack, String? realArrTrack, String? realDepTrack, bool cancelled, bool cancelledArrival, bool cancelledDeparture }); } /// @nodoc class _$JourneyStopCopyWithImpl<$Res> implements $JourneyStopCopyWith<$Res> { _$JourneyStopCopyWithImpl(this._self, this._then); final JourneyStop _self; final $Res Function(JourneyStop) _then; /// Create a copy of JourneyStop /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? extId = freezed,Object? name = null,Object? lat = freezed,Object? lon = freezed,Object? routeIdx = freezed,Object? scheduledArrival = freezed,Object? scheduledDeparture = freezed,Object? realArrival = freezed,Object? realDeparture = freezed,Object? arrTrack = freezed,Object? depTrack = freezed,Object? realArrTrack = freezed,Object? realDepTrack = freezed,Object? cancelled = null,Object? cancelledArrival = null,Object? cancelledDeparture = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,extId: freezed == extId ? _self.extId : extId // ignore: cast_nullable_to_non_nullable as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable as double?,lon: freezed == lon ? _self.lon : lon // ignore: cast_nullable_to_non_nullable as double?,routeIdx: freezed == routeIdx ? _self.routeIdx : routeIdx // ignore: cast_nullable_to_non_nullable as int?,scheduledArrival: freezed == scheduledArrival ? _self.scheduledArrival : scheduledArrival // ignore: cast_nullable_to_non_nullable as DateTime?,scheduledDeparture: freezed == scheduledDeparture ? _self.scheduledDeparture : scheduledDeparture // ignore: cast_nullable_to_non_nullable as DateTime?,realArrival: freezed == realArrival ? _self.realArrival : realArrival // ignore: cast_nullable_to_non_nullable as DateTime?,realDeparture: freezed == realDeparture ? _self.realDeparture : realDeparture // ignore: cast_nullable_to_non_nullable as DateTime?,arrTrack: freezed == arrTrack ? _self.arrTrack : arrTrack // ignore: cast_nullable_to_non_nullable as String?,depTrack: freezed == depTrack ? _self.depTrack : depTrack // ignore: cast_nullable_to_non_nullable as String?,realArrTrack: freezed == realArrTrack ? _self.realArrTrack : realArrTrack // ignore: cast_nullable_to_non_nullable as String?,realDepTrack: freezed == realDepTrack ? _self.realDepTrack : realDepTrack // ignore: cast_nullable_to_non_nullable as String?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,cancelledArrival: null == cancelledArrival ? _self.cancelledArrival : cancelledArrival // ignore: cast_nullable_to_non_nullable as bool,cancelledDeparture: null == cancelledDeparture ? _self.cancelledDeparture : cancelledDeparture // ignore: cast_nullable_to_non_nullable as bool, )); } } /// Adds pattern-matching-related methods to [JourneyStop]. extension JourneyStopPatterns on JourneyStop { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _JourneyStop value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _JourneyStop() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _JourneyStop value) $default,){ final _that = this; switch (_that) { case _JourneyStop(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _JourneyStop value)? $default,){ final _that = this; switch (_that) { case _JourneyStop() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String? extId, String name, double? lat, double? lon, int? routeIdx, DateTime? scheduledArrival, DateTime? scheduledDeparture, DateTime? realArrival, DateTime? realDeparture, String? arrTrack, String? depTrack, String? realArrTrack, String? realDepTrack, bool cancelled, bool cancelledArrival, bool cancelledDeparture)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _JourneyStop() when $default != null: return $default(_that.id,_that.extId,_that.name,_that.lat,_that.lon,_that.routeIdx,_that.scheduledArrival,_that.scheduledDeparture,_that.realArrival,_that.realDeparture,_that.arrTrack,_that.depTrack,_that.realArrTrack,_that.realDepTrack,_that.cancelled,_that.cancelledArrival,_that.cancelledDeparture);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String? extId, String name, double? lat, double? lon, int? routeIdx, DateTime? scheduledArrival, DateTime? scheduledDeparture, DateTime? realArrival, DateTime? realDeparture, String? arrTrack, String? depTrack, String? realArrTrack, String? realDepTrack, bool cancelled, bool cancelledArrival, bool cancelledDeparture) $default,) {final _that = this; switch (_that) { case _JourneyStop(): return $default(_that.id,_that.extId,_that.name,_that.lat,_that.lon,_that.routeIdx,_that.scheduledArrival,_that.scheduledDeparture,_that.realArrival,_that.realDeparture,_that.arrTrack,_that.depTrack,_that.realArrTrack,_that.realDepTrack,_that.cancelled,_that.cancelledArrival,_that.cancelledDeparture);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String? extId, String name, double? lat, double? lon, int? routeIdx, DateTime? scheduledArrival, DateTime? scheduledDeparture, DateTime? realArrival, DateTime? realDeparture, String? arrTrack, String? depTrack, String? realArrTrack, String? realDepTrack, bool cancelled, bool cancelledArrival, bool cancelledDeparture)? $default,) {final _that = this; switch (_that) { case _JourneyStop() when $default != null: return $default(_that.id,_that.extId,_that.name,_that.lat,_that.lon,_that.routeIdx,_that.scheduledArrival,_that.scheduledDeparture,_that.realArrival,_that.realDeparture,_that.arrTrack,_that.depTrack,_that.realArrTrack,_that.realDepTrack,_that.cancelled,_that.cancelledArrival,_that.cancelledDeparture);case _: return null; } } } /// @nodoc @JsonSerializable() class _JourneyStop implements JourneyStop { const _JourneyStop({required this.id, this.extId, required this.name, this.lat, this.lon, this.routeIdx, this.scheduledArrival, this.scheduledDeparture, this.realArrival, this.realDeparture, this.arrTrack, this.depTrack, this.realArrTrack, this.realDepTrack, this.cancelled = false, this.cancelledArrival = false, this.cancelledDeparture = false}); factory _JourneyStop.fromJson(Map json) => _$JourneyStopFromJson(json); @override final String id; @override final String? extId; @override final String name; @override final double? lat; @override final double? lon; @override final int? routeIdx; @override final DateTime? scheduledArrival; @override final DateTime? scheduledDeparture; @override final DateTime? realArrival; @override final DateTime? realDeparture; @override final String? arrTrack; @override final String? depTrack; @override final String? realArrTrack; @override final String? realDepTrack; @override@JsonKey() final bool cancelled; @override@JsonKey() final bool cancelledArrival; @override@JsonKey() final bool cancelledDeparture; /// Create a copy of JourneyStop /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$JourneyStopCopyWith<_JourneyStop> get copyWith => __$JourneyStopCopyWithImpl<_JourneyStop>(this, _$identity); @override Map toJson() { return _$JourneyStopToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _JourneyStop&&(identical(other.id, id) || other.id == id)&&(identical(other.extId, extId) || other.extId == extId)&&(identical(other.name, name) || other.name == name)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.lon, lon) || other.lon == lon)&&(identical(other.routeIdx, routeIdx) || other.routeIdx == routeIdx)&&(identical(other.scheduledArrival, scheduledArrival) || other.scheduledArrival == scheduledArrival)&&(identical(other.scheduledDeparture, scheduledDeparture) || other.scheduledDeparture == scheduledDeparture)&&(identical(other.realArrival, realArrival) || other.realArrival == realArrival)&&(identical(other.realDeparture, realDeparture) || other.realDeparture == realDeparture)&&(identical(other.arrTrack, arrTrack) || other.arrTrack == arrTrack)&&(identical(other.depTrack, depTrack) || other.depTrack == depTrack)&&(identical(other.realArrTrack, realArrTrack) || other.realArrTrack == realArrTrack)&&(identical(other.realDepTrack, realDepTrack) || other.realDepTrack == realDepTrack)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.cancelledArrival, cancelledArrival) || other.cancelledArrival == cancelledArrival)&&(identical(other.cancelledDeparture, cancelledDeparture) || other.cancelledDeparture == cancelledDeparture)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,extId,name,lat,lon,routeIdx,scheduledArrival,scheduledDeparture,realArrival,realDeparture,arrTrack,depTrack,realArrTrack,realDepTrack,cancelled,cancelledArrival,cancelledDeparture); @override String toString() { return 'JourneyStop(id: $id, extId: $extId, name: $name, lat: $lat, lon: $lon, routeIdx: $routeIdx, scheduledArrival: $scheduledArrival, scheduledDeparture: $scheduledDeparture, realArrival: $realArrival, realDeparture: $realDeparture, arrTrack: $arrTrack, depTrack: $depTrack, realArrTrack: $realArrTrack, realDepTrack: $realDepTrack, cancelled: $cancelled, cancelledArrival: $cancelledArrival, cancelledDeparture: $cancelledDeparture)'; } } /// @nodoc abstract mixin class _$JourneyStopCopyWith<$Res> implements $JourneyStopCopyWith<$Res> { factory _$JourneyStopCopyWith(_JourneyStop value, $Res Function(_JourneyStop) _then) = __$JourneyStopCopyWithImpl; @override @useResult $Res call({ String id, String? extId, String name, double? lat, double? lon, int? routeIdx, DateTime? scheduledArrival, DateTime? scheduledDeparture, DateTime? realArrival, DateTime? realDeparture, String? arrTrack, String? depTrack, String? realArrTrack, String? realDepTrack, bool cancelled, bool cancelledArrival, bool cancelledDeparture }); } /// @nodoc class __$JourneyStopCopyWithImpl<$Res> implements _$JourneyStopCopyWith<$Res> { __$JourneyStopCopyWithImpl(this._self, this._then); final _JourneyStop _self; final $Res Function(_JourneyStop) _then; /// Create a copy of JourneyStop /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? extId = freezed,Object? name = null,Object? lat = freezed,Object? lon = freezed,Object? routeIdx = freezed,Object? scheduledArrival = freezed,Object? scheduledDeparture = freezed,Object? realArrival = freezed,Object? realDeparture = freezed,Object? arrTrack = freezed,Object? depTrack = freezed,Object? realArrTrack = freezed,Object? realDepTrack = freezed,Object? cancelled = null,Object? cancelledArrival = null,Object? cancelledDeparture = null,}) { return _then(_JourneyStop( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,extId: freezed == extId ? _self.extId : extId // ignore: cast_nullable_to_non_nullable as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable as double?,lon: freezed == lon ? _self.lon : lon // ignore: cast_nullable_to_non_nullable as double?,routeIdx: freezed == routeIdx ? _self.routeIdx : routeIdx // ignore: cast_nullable_to_non_nullable as int?,scheduledArrival: freezed == scheduledArrival ? _self.scheduledArrival : scheduledArrival // ignore: cast_nullable_to_non_nullable as DateTime?,scheduledDeparture: freezed == scheduledDeparture ? _self.scheduledDeparture : scheduledDeparture // ignore: cast_nullable_to_non_nullable as DateTime?,realArrival: freezed == realArrival ? _self.realArrival : realArrival // ignore: cast_nullable_to_non_nullable as DateTime?,realDeparture: freezed == realDeparture ? _self.realDeparture : realDeparture // ignore: cast_nullable_to_non_nullable as DateTime?,arrTrack: freezed == arrTrack ? _self.arrTrack : arrTrack // ignore: cast_nullable_to_non_nullable as String?,depTrack: freezed == depTrack ? _self.depTrack : depTrack // ignore: cast_nullable_to_non_nullable as String?,realArrTrack: freezed == realArrTrack ? _self.realArrTrack : realArrTrack // ignore: cast_nullable_to_non_nullable as String?,realDepTrack: freezed == realDepTrack ? _self.realDepTrack : realDepTrack // ignore: cast_nullable_to_non_nullable as String?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,cancelledArrival: null == cancelledArrival ? _self.cancelledArrival : cancelledArrival // ignore: cast_nullable_to_non_nullable as bool,cancelledDeparture: null == cancelledDeparture ? _self.cancelledDeparture : cancelledDeparture // ignore: cast_nullable_to_non_nullable as bool, )); } } /// @nodoc mixin _$Leg { String get id; int get idx; LegType get type; String? get name; String? get category; String? get number; String? get direction; TripEndpoint get origin; TripEndpoint get destination;@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? get duration; bool get cancelled; bool get partCancelled; bool get reachable; Product? get product; String? get journeyRef; List get stops; /// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $LegCopyWith get copyWith => _$LegCopyWithImpl(this as Leg, _$identity); /// Serializes this Leg to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Leg&&(identical(other.id, id) || other.id == id)&&(identical(other.idx, idx) || other.idx == idx)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.category, category) || other.category == category)&&(identical(other.number, number) || other.number == number)&&(identical(other.direction, direction) || other.direction == direction)&&(identical(other.origin, origin) || other.origin == origin)&&(identical(other.destination, destination) || other.destination == destination)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.partCancelled, partCancelled) || other.partCancelled == partCancelled)&&(identical(other.reachable, reachable) || other.reachable == reachable)&&(identical(other.product, product) || other.product == product)&&(identical(other.journeyRef, journeyRef) || other.journeyRef == journeyRef)&&const DeepCollectionEquality().equals(other.stops, stops)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,idx,type,name,category,number,direction,origin,destination,duration,cancelled,partCancelled,reachable,product,journeyRef,const DeepCollectionEquality().hash(stops)); @override String toString() { return 'Leg(id: $id, idx: $idx, type: $type, name: $name, category: $category, number: $number, direction: $direction, origin: $origin, destination: $destination, duration: $duration, cancelled: $cancelled, partCancelled: $partCancelled, reachable: $reachable, product: $product, journeyRef: $journeyRef, stops: $stops)'; } } /// @nodoc abstract mixin class $LegCopyWith<$Res> { factory $LegCopyWith(Leg value, $Res Function(Leg) _then) = _$LegCopyWithImpl; @useResult $Res call({ String id, int idx, LegType type, String? name, String? category, String? number, String? direction, TripEndpoint origin, TripEndpoint destination,@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, bool cancelled, bool partCancelled, bool reachable, Product? product, String? journeyRef, List stops }); $TripEndpointCopyWith<$Res> get origin;$TripEndpointCopyWith<$Res> get destination;$ProductCopyWith<$Res>? get product; } /// @nodoc class _$LegCopyWithImpl<$Res> implements $LegCopyWith<$Res> { _$LegCopyWithImpl(this._self, this._then); final Leg _self; final $Res Function(Leg) _then; /// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? idx = null,Object? type = null,Object? name = freezed,Object? category = freezed,Object? number = freezed,Object? direction = freezed,Object? origin = null,Object? destination = null,Object? duration = freezed,Object? cancelled = null,Object? partCancelled = null,Object? reachable = null,Object? product = freezed,Object? journeyRef = freezed,Object? stops = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,idx: null == idx ? _self.idx : idx // ignore: cast_nullable_to_non_nullable as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as LegType,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable as String?,number: freezed == number ? _self.number : number // ignore: cast_nullable_to_non_nullable as String?,direction: freezed == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as String?,origin: null == origin ? _self.origin : origin // ignore: cast_nullable_to_non_nullable as TripEndpoint,destination: null == destination ? _self.destination : destination // ignore: cast_nullable_to_non_nullable as TripEndpoint,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as Duration?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,partCancelled: null == partCancelled ? _self.partCancelled : partCancelled // ignore: cast_nullable_to_non_nullable as bool,reachable: null == reachable ? _self.reachable : reachable // ignore: cast_nullable_to_non_nullable as bool,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,journeyRef: freezed == journeyRef ? _self.journeyRef : journeyRef // ignore: cast_nullable_to_non_nullable as String?,stops: null == stops ? _self.stops : stops // ignore: cast_nullable_to_non_nullable as List, )); } /// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $TripEndpointCopyWith<$Res> get origin { return $TripEndpointCopyWith<$Res>(_self.origin, (value) { return _then(_self.copyWith(origin: value)); }); }/// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $TripEndpointCopyWith<$Res> get destination { return $TripEndpointCopyWith<$Res>(_self.destination, (value) { return _then(_self.copyWith(destination: value)); }); }/// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// Adds pattern-matching-related methods to [Leg]. extension LegPatterns on Leg { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Leg value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Leg() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Leg value) $default,){ final _that = this; switch (_that) { case _Leg(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Leg value)? $default,){ final _that = this; switch (_that) { case _Leg() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, int idx, LegType type, String? name, String? category, String? number, String? direction, TripEndpoint origin, TripEndpoint destination, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, bool cancelled, bool partCancelled, bool reachable, Product? product, String? journeyRef, List stops)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Leg() when $default != null: return $default(_that.id,_that.idx,_that.type,_that.name,_that.category,_that.number,_that.direction,_that.origin,_that.destination,_that.duration,_that.cancelled,_that.partCancelled,_that.reachable,_that.product,_that.journeyRef,_that.stops);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, int idx, LegType type, String? name, String? category, String? number, String? direction, TripEndpoint origin, TripEndpoint destination, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, bool cancelled, bool partCancelled, bool reachable, Product? product, String? journeyRef, List stops) $default,) {final _that = this; switch (_that) { case _Leg(): return $default(_that.id,_that.idx,_that.type,_that.name,_that.category,_that.number,_that.direction,_that.origin,_that.destination,_that.duration,_that.cancelled,_that.partCancelled,_that.reachable,_that.product,_that.journeyRef,_that.stops);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, int idx, LegType type, String? name, String? category, String? number, String? direction, TripEndpoint origin, TripEndpoint destination, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, bool cancelled, bool partCancelled, bool reachable, Product? product, String? journeyRef, List stops)? $default,) {final _that = this; switch (_that) { case _Leg() when $default != null: return $default(_that.id,_that.idx,_that.type,_that.name,_that.category,_that.number,_that.direction,_that.origin,_that.destination,_that.duration,_that.cancelled,_that.partCancelled,_that.reachable,_that.product,_that.journeyRef,_that.stops);case _: return null; } } } /// @nodoc @JsonSerializable() class _Leg implements Leg { const _Leg({required this.id, required this.idx, this.type = LegType.unknown, this.name, this.category, this.number, this.direction, required this.origin, required this.destination, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) this.duration, this.cancelled = false, this.partCancelled = false, this.reachable = true, this.product, this.journeyRef, final List stops = const []}): _stops = stops; factory _Leg.fromJson(Map json) => _$LegFromJson(json); @override final String id; @override final int idx; @override@JsonKey() final LegType type; @override final String? name; @override final String? category; @override final String? number; @override final String? direction; @override final TripEndpoint origin; @override final TripEndpoint destination; @override@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) final Duration? duration; @override@JsonKey() final bool cancelled; @override@JsonKey() final bool partCancelled; @override@JsonKey() final bool reachable; @override final Product? product; @override final String? journeyRef; final List _stops; @override@JsonKey() List get stops { if (_stops is EqualUnmodifiableListView) return _stops; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_stops); } /// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$LegCopyWith<_Leg> get copyWith => __$LegCopyWithImpl<_Leg>(this, _$identity); @override Map toJson() { return _$LegToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Leg&&(identical(other.id, id) || other.id == id)&&(identical(other.idx, idx) || other.idx == idx)&&(identical(other.type, type) || other.type == type)&&(identical(other.name, name) || other.name == name)&&(identical(other.category, category) || other.category == category)&&(identical(other.number, number) || other.number == number)&&(identical(other.direction, direction) || other.direction == direction)&&(identical(other.origin, origin) || other.origin == origin)&&(identical(other.destination, destination) || other.destination == destination)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.cancelled, cancelled) || other.cancelled == cancelled)&&(identical(other.partCancelled, partCancelled) || other.partCancelled == partCancelled)&&(identical(other.reachable, reachable) || other.reachable == reachable)&&(identical(other.product, product) || other.product == product)&&(identical(other.journeyRef, journeyRef) || other.journeyRef == journeyRef)&&const DeepCollectionEquality().equals(other._stops, _stops)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,idx,type,name,category,number,direction,origin,destination,duration,cancelled,partCancelled,reachable,product,journeyRef,const DeepCollectionEquality().hash(_stops)); @override String toString() { return 'Leg(id: $id, idx: $idx, type: $type, name: $name, category: $category, number: $number, direction: $direction, origin: $origin, destination: $destination, duration: $duration, cancelled: $cancelled, partCancelled: $partCancelled, reachable: $reachable, product: $product, journeyRef: $journeyRef, stops: $stops)'; } } /// @nodoc abstract mixin class _$LegCopyWith<$Res> implements $LegCopyWith<$Res> { factory _$LegCopyWith(_Leg value, $Res Function(_Leg) _then) = __$LegCopyWithImpl; @override @useResult $Res call({ String id, int idx, LegType type, String? name, String? category, String? number, String? direction, TripEndpoint origin, TripEndpoint destination,@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, bool cancelled, bool partCancelled, bool reachable, Product? product, String? journeyRef, List stops }); @override $TripEndpointCopyWith<$Res> get origin;@override $TripEndpointCopyWith<$Res> get destination;@override $ProductCopyWith<$Res>? get product; } /// @nodoc class __$LegCopyWithImpl<$Res> implements _$LegCopyWith<$Res> { __$LegCopyWithImpl(this._self, this._then); final _Leg _self; final $Res Function(_Leg) _then; /// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? idx = null,Object? type = null,Object? name = freezed,Object? category = freezed,Object? number = freezed,Object? direction = freezed,Object? origin = null,Object? destination = null,Object? duration = freezed,Object? cancelled = null,Object? partCancelled = null,Object? reachable = null,Object? product = freezed,Object? journeyRef = freezed,Object? stops = null,}) { return _then(_Leg( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,idx: null == idx ? _self.idx : idx // ignore: cast_nullable_to_non_nullable as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as LegType,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable as String?,number: freezed == number ? _self.number : number // ignore: cast_nullable_to_non_nullable as String?,direction: freezed == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as String?,origin: null == origin ? _self.origin : origin // ignore: cast_nullable_to_non_nullable as TripEndpoint,destination: null == destination ? _self.destination : destination // ignore: cast_nullable_to_non_nullable as TripEndpoint,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as Duration?,cancelled: null == cancelled ? _self.cancelled : cancelled // ignore: cast_nullable_to_non_nullable as bool,partCancelled: null == partCancelled ? _self.partCancelled : partCancelled // ignore: cast_nullable_to_non_nullable as bool,reachable: null == reachable ? _self.reachable : reachable // ignore: cast_nullable_to_non_nullable as bool,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,journeyRef: freezed == journeyRef ? _self.journeyRef : journeyRef // ignore: cast_nullable_to_non_nullable as String?,stops: null == stops ? _self._stops : stops // ignore: cast_nullable_to_non_nullable as List, )); } /// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $TripEndpointCopyWith<$Res> get origin { return $TripEndpointCopyWith<$Res>(_self.origin, (value) { return _then(_self.copyWith(origin: value)); }); }/// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $TripEndpointCopyWith<$Res> get destination { return $TripEndpointCopyWith<$Res>(_self.destination, (value) { return _then(_self.copyWith(destination: value)); }); }/// Create a copy of Leg /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// @nodoc mixin _$Trip { String? get tripId; String? get ctxRecon; String? get checksum;@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? get duration;@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? get realDuration; int? get transferCount; List get legs; /// Create a copy of Trip /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $TripCopyWith get copyWith => _$TripCopyWithImpl(this as Trip, _$identity); /// Serializes this Trip to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Trip&&(identical(other.tripId, tripId) || other.tripId == tripId)&&(identical(other.ctxRecon, ctxRecon) || other.ctxRecon == ctxRecon)&&(identical(other.checksum, checksum) || other.checksum == checksum)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.realDuration, realDuration) || other.realDuration == realDuration)&&(identical(other.transferCount, transferCount) || other.transferCount == transferCount)&&const DeepCollectionEquality().equals(other.legs, legs)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,tripId,ctxRecon,checksum,duration,realDuration,transferCount,const DeepCollectionEquality().hash(legs)); @override String toString() { return 'Trip(tripId: $tripId, ctxRecon: $ctxRecon, checksum: $checksum, duration: $duration, realDuration: $realDuration, transferCount: $transferCount, legs: $legs)'; } } /// @nodoc abstract mixin class $TripCopyWith<$Res> { factory $TripCopyWith(Trip value, $Res Function(Trip) _then) = _$TripCopyWithImpl; @useResult $Res call({ String? tripId, String? ctxRecon, String? checksum,@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration,@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? realDuration, int? transferCount, List legs }); } /// @nodoc class _$TripCopyWithImpl<$Res> implements $TripCopyWith<$Res> { _$TripCopyWithImpl(this._self, this._then); final Trip _self; final $Res Function(Trip) _then; /// Create a copy of Trip /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? tripId = freezed,Object? ctxRecon = freezed,Object? checksum = freezed,Object? duration = freezed,Object? realDuration = freezed,Object? transferCount = freezed,Object? legs = null,}) { return _then(_self.copyWith( tripId: freezed == tripId ? _self.tripId : tripId // ignore: cast_nullable_to_non_nullable as String?,ctxRecon: freezed == ctxRecon ? _self.ctxRecon : ctxRecon // ignore: cast_nullable_to_non_nullable as String?,checksum: freezed == checksum ? _self.checksum : checksum // ignore: cast_nullable_to_non_nullable as String?,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as Duration?,realDuration: freezed == realDuration ? _self.realDuration : realDuration // ignore: cast_nullable_to_non_nullable as Duration?,transferCount: freezed == transferCount ? _self.transferCount : transferCount // ignore: cast_nullable_to_non_nullable as int?,legs: null == legs ? _self.legs : legs // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [Trip]. extension TripPatterns on Trip { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _Trip value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Trip() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _Trip value) $default,){ final _that = this; switch (_that) { case _Trip(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _Trip value)? $default,){ final _that = this; switch (_that) { case _Trip() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String? tripId, String? ctxRecon, String? checksum, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? realDuration, int? transferCount, List legs)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Trip() when $default != null: return $default(_that.tripId,_that.ctxRecon,_that.checksum,_that.duration,_that.realDuration,_that.transferCount,_that.legs);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String? tripId, String? ctxRecon, String? checksum, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? realDuration, int? transferCount, List legs) $default,) {final _that = this; switch (_that) { case _Trip(): return $default(_that.tripId,_that.ctxRecon,_that.checksum,_that.duration,_that.realDuration,_that.transferCount,_that.legs);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String? tripId, String? ctxRecon, String? checksum, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? realDuration, int? transferCount, List legs)? $default,) {final _that = this; switch (_that) { case _Trip() when $default != null: return $default(_that.tripId,_that.ctxRecon,_that.checksum,_that.duration,_that.realDuration,_that.transferCount,_that.legs);case _: return null; } } } /// @nodoc @JsonSerializable() class _Trip implements Trip { const _Trip({this.tripId, this.ctxRecon, this.checksum, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) this.duration, @JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) this.realDuration, this.transferCount, final List legs = const []}): _legs = legs; factory _Trip.fromJson(Map json) => _$TripFromJson(json); @override final String? tripId; @override final String? ctxRecon; @override final String? checksum; @override@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) final Duration? duration; @override@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) final Duration? realDuration; @override final int? transferCount; final List _legs; @override@JsonKey() List get legs { if (_legs is EqualUnmodifiableListView) return _legs; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_legs); } /// Create a copy of Trip /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$TripCopyWith<_Trip> get copyWith => __$TripCopyWithImpl<_Trip>(this, _$identity); @override Map toJson() { return _$TripToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Trip&&(identical(other.tripId, tripId) || other.tripId == tripId)&&(identical(other.ctxRecon, ctxRecon) || other.ctxRecon == ctxRecon)&&(identical(other.checksum, checksum) || other.checksum == checksum)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.realDuration, realDuration) || other.realDuration == realDuration)&&(identical(other.transferCount, transferCount) || other.transferCount == transferCount)&&const DeepCollectionEquality().equals(other._legs, _legs)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,tripId,ctxRecon,checksum,duration,realDuration,transferCount,const DeepCollectionEquality().hash(_legs)); @override String toString() { return 'Trip(tripId: $tripId, ctxRecon: $ctxRecon, checksum: $checksum, duration: $duration, realDuration: $realDuration, transferCount: $transferCount, legs: $legs)'; } } /// @nodoc abstract mixin class _$TripCopyWith<$Res> implements $TripCopyWith<$Res> { factory _$TripCopyWith(_Trip value, $Res Function(_Trip) _then) = __$TripCopyWithImpl; @override @useResult $Res call({ String? tripId, String? ctxRecon, String? checksum,@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? duration,@JsonKey(fromJson: IsoDuration.fromJson, toJson: IsoDuration.toJson) Duration? realDuration, int? transferCount, List legs }); } /// @nodoc class __$TripCopyWithImpl<$Res> implements _$TripCopyWith<$Res> { __$TripCopyWithImpl(this._self, this._then); final _Trip _self; final $Res Function(_Trip) _then; /// Create a copy of Trip /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? tripId = freezed,Object? ctxRecon = freezed,Object? checksum = freezed,Object? duration = freezed,Object? realDuration = freezed,Object? transferCount = freezed,Object? legs = null,}) { return _then(_Trip( tripId: freezed == tripId ? _self.tripId : tripId // ignore: cast_nullable_to_non_nullable as String?,ctxRecon: freezed == ctxRecon ? _self.ctxRecon : ctxRecon // ignore: cast_nullable_to_non_nullable as String?,checksum: freezed == checksum ? _self.checksum : checksum // ignore: cast_nullable_to_non_nullable as String?,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as Duration?,realDuration: freezed == realDuration ? _self.realDuration : realDuration // ignore: cast_nullable_to_non_nullable as Duration?,transferCount: freezed == transferCount ? _self.transferCount : transferCount // ignore: cast_nullable_to_non_nullable as int?,legs: null == legs ? _self._legs : legs // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$TripSearchResult { List get trips; String? get scrollContextLater; String? get scrollContextEarlier; /// Create a copy of TripSearchResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $TripSearchResultCopyWith get copyWith => _$TripSearchResultCopyWithImpl(this as TripSearchResult, _$identity); /// Serializes this TripSearchResult to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is TripSearchResult&&const DeepCollectionEquality().equals(other.trips, trips)&&(identical(other.scrollContextLater, scrollContextLater) || other.scrollContextLater == scrollContextLater)&&(identical(other.scrollContextEarlier, scrollContextEarlier) || other.scrollContextEarlier == scrollContextEarlier)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(trips),scrollContextLater,scrollContextEarlier); @override String toString() { return 'TripSearchResult(trips: $trips, scrollContextLater: $scrollContextLater, scrollContextEarlier: $scrollContextEarlier)'; } } /// @nodoc abstract mixin class $TripSearchResultCopyWith<$Res> { factory $TripSearchResultCopyWith(TripSearchResult value, $Res Function(TripSearchResult) _then) = _$TripSearchResultCopyWithImpl; @useResult $Res call({ List trips, String? scrollContextLater, String? scrollContextEarlier }); } /// @nodoc class _$TripSearchResultCopyWithImpl<$Res> implements $TripSearchResultCopyWith<$Res> { _$TripSearchResultCopyWithImpl(this._self, this._then); final TripSearchResult _self; final $Res Function(TripSearchResult) _then; /// Create a copy of TripSearchResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? trips = null,Object? scrollContextLater = freezed,Object? scrollContextEarlier = freezed,}) { return _then(_self.copyWith( trips: null == trips ? _self.trips : trips // ignore: cast_nullable_to_non_nullable as List,scrollContextLater: freezed == scrollContextLater ? _self.scrollContextLater : scrollContextLater // ignore: cast_nullable_to_non_nullable as String?,scrollContextEarlier: freezed == scrollContextEarlier ? _self.scrollContextEarlier : scrollContextEarlier // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [TripSearchResult]. extension TripSearchResultPatterns on TripSearchResult { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _TripSearchResult value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _TripSearchResult() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _TripSearchResult value) $default,){ final _that = this; switch (_that) { case _TripSearchResult(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _TripSearchResult value)? $default,){ final _that = this; switch (_that) { case _TripSearchResult() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( List trips, String? scrollContextLater, String? scrollContextEarlier)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _TripSearchResult() when $default != null: return $default(_that.trips,_that.scrollContextLater,_that.scrollContextEarlier);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( List trips, String? scrollContextLater, String? scrollContextEarlier) $default,) {final _that = this; switch (_that) { case _TripSearchResult(): return $default(_that.trips,_that.scrollContextLater,_that.scrollContextEarlier);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( List trips, String? scrollContextLater, String? scrollContextEarlier)? $default,) {final _that = this; switch (_that) { case _TripSearchResult() when $default != null: return $default(_that.trips,_that.scrollContextLater,_that.scrollContextEarlier);case _: return null; } } } /// @nodoc @JsonSerializable() class _TripSearchResult implements TripSearchResult { const _TripSearchResult({final List trips = const [], this.scrollContextLater, this.scrollContextEarlier}): _trips = trips; factory _TripSearchResult.fromJson(Map json) => _$TripSearchResultFromJson(json); final List _trips; @override@JsonKey() List get trips { if (_trips is EqualUnmodifiableListView) return _trips; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_trips); } @override final String? scrollContextLater; @override final String? scrollContextEarlier; /// Create a copy of TripSearchResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$TripSearchResultCopyWith<_TripSearchResult> get copyWith => __$TripSearchResultCopyWithImpl<_TripSearchResult>(this, _$identity); @override Map toJson() { return _$TripSearchResultToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _TripSearchResult&&const DeepCollectionEquality().equals(other._trips, _trips)&&(identical(other.scrollContextLater, scrollContextLater) || other.scrollContextLater == scrollContextLater)&&(identical(other.scrollContextEarlier, scrollContextEarlier) || other.scrollContextEarlier == scrollContextEarlier)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_trips),scrollContextLater,scrollContextEarlier); @override String toString() { return 'TripSearchResult(trips: $trips, scrollContextLater: $scrollContextLater, scrollContextEarlier: $scrollContextEarlier)'; } } /// @nodoc abstract mixin class _$TripSearchResultCopyWith<$Res> implements $TripSearchResultCopyWith<$Res> { factory _$TripSearchResultCopyWith(_TripSearchResult value, $Res Function(_TripSearchResult) _then) = __$TripSearchResultCopyWithImpl; @override @useResult $Res call({ List trips, String? scrollContextLater, String? scrollContextEarlier }); } /// @nodoc class __$TripSearchResultCopyWithImpl<$Res> implements _$TripSearchResultCopyWith<$Res> { __$TripSearchResultCopyWithImpl(this._self, this._then); final _TripSearchResult _self; final $Res Function(_TripSearchResult) _then; /// Create a copy of TripSearchResult /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? trips = null,Object? scrollContextLater = freezed,Object? scrollContextEarlier = freezed,}) { return _then(_TripSearchResult( trips: null == trips ? _self._trips : trips // ignore: cast_nullable_to_non_nullable as List,scrollContextLater: freezed == scrollContextLater ? _self.scrollContextLater : scrollContextLater // ignore: cast_nullable_to_non_nullable as String?,scrollContextEarlier: freezed == scrollContextEarlier ? _self.scrollContextEarlier : scrollContextEarlier // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc mixin _$JourneyDetail { String? get journeyId; Product? get product; String? get direction; List get stops; /// Create a copy of JourneyDetail /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $JourneyDetailCopyWith get copyWith => _$JourneyDetailCopyWithImpl(this as JourneyDetail, _$identity); /// Serializes this JourneyDetail to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is JourneyDetail&&(identical(other.journeyId, journeyId) || other.journeyId == journeyId)&&(identical(other.product, product) || other.product == product)&&(identical(other.direction, direction) || other.direction == direction)&&const DeepCollectionEquality().equals(other.stops, stops)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,journeyId,product,direction,const DeepCollectionEquality().hash(stops)); @override String toString() { return 'JourneyDetail(journeyId: $journeyId, product: $product, direction: $direction, stops: $stops)'; } } /// @nodoc abstract mixin class $JourneyDetailCopyWith<$Res> { factory $JourneyDetailCopyWith(JourneyDetail value, $Res Function(JourneyDetail) _then) = _$JourneyDetailCopyWithImpl; @useResult $Res call({ String? journeyId, Product? product, String? direction, List stops }); $ProductCopyWith<$Res>? get product; } /// @nodoc class _$JourneyDetailCopyWithImpl<$Res> implements $JourneyDetailCopyWith<$Res> { _$JourneyDetailCopyWithImpl(this._self, this._then); final JourneyDetail _self; final $Res Function(JourneyDetail) _then; /// Create a copy of JourneyDetail /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? journeyId = freezed,Object? product = freezed,Object? direction = freezed,Object? stops = null,}) { return _then(_self.copyWith( journeyId: freezed == journeyId ? _self.journeyId : journeyId // ignore: cast_nullable_to_non_nullable as String?,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,direction: freezed == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as String?,stops: null == stops ? _self.stops : stops // ignore: cast_nullable_to_non_nullable as List, )); } /// Create a copy of JourneyDetail /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// Adds pattern-matching-related methods to [JourneyDetail]. extension JourneyDetailPatterns on JourneyDetail { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _JourneyDetail value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _JourneyDetail() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _JourneyDetail value) $default,){ final _that = this; switch (_that) { case _JourneyDetail(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _JourneyDetail value)? $default,){ final _that = this; switch (_that) { case _JourneyDetail() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String? journeyId, Product? product, String? direction, List stops)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _JourneyDetail() when $default != null: return $default(_that.journeyId,_that.product,_that.direction,_that.stops);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String? journeyId, Product? product, String? direction, List stops) $default,) {final _that = this; switch (_that) { case _JourneyDetail(): return $default(_that.journeyId,_that.product,_that.direction,_that.stops);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String? journeyId, Product? product, String? direction, List stops)? $default,) {final _that = this; switch (_that) { case _JourneyDetail() when $default != null: return $default(_that.journeyId,_that.product,_that.direction,_that.stops);case _: return null; } } } /// @nodoc @JsonSerializable() class _JourneyDetail implements JourneyDetail { const _JourneyDetail({this.journeyId, this.product, this.direction, final List stops = const []}): _stops = stops; factory _JourneyDetail.fromJson(Map json) => _$JourneyDetailFromJson(json); @override final String? journeyId; @override final Product? product; @override final String? direction; final List _stops; @override@JsonKey() List get stops { if (_stops is EqualUnmodifiableListView) return _stops; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_stops); } /// Create a copy of JourneyDetail /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$JourneyDetailCopyWith<_JourneyDetail> get copyWith => __$JourneyDetailCopyWithImpl<_JourneyDetail>(this, _$identity); @override Map toJson() { return _$JourneyDetailToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _JourneyDetail&&(identical(other.journeyId, journeyId) || other.journeyId == journeyId)&&(identical(other.product, product) || other.product == product)&&(identical(other.direction, direction) || other.direction == direction)&&const DeepCollectionEquality().equals(other._stops, _stops)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,journeyId,product,direction,const DeepCollectionEquality().hash(_stops)); @override String toString() { return 'JourneyDetail(journeyId: $journeyId, product: $product, direction: $direction, stops: $stops)'; } } /// @nodoc abstract mixin class _$JourneyDetailCopyWith<$Res> implements $JourneyDetailCopyWith<$Res> { factory _$JourneyDetailCopyWith(_JourneyDetail value, $Res Function(_JourneyDetail) _then) = __$JourneyDetailCopyWithImpl; @override @useResult $Res call({ String? journeyId, Product? product, String? direction, List stops }); @override $ProductCopyWith<$Res>? get product; } /// @nodoc class __$JourneyDetailCopyWithImpl<$Res> implements _$JourneyDetailCopyWith<$Res> { __$JourneyDetailCopyWithImpl(this._self, this._then); final _JourneyDetail _self; final $Res Function(_JourneyDetail) _then; /// Create a copy of JourneyDetail /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? journeyId = freezed,Object? product = freezed,Object? direction = freezed,Object? stops = null,}) { return _then(_JourneyDetail( journeyId: freezed == journeyId ? _self.journeyId : journeyId // ignore: cast_nullable_to_non_nullable as String?,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as Product?,direction: freezed == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable as String?,stops: null == stops ? _self._stops : stops // ignore: cast_nullable_to_non_nullable as List, )); } /// Create a copy of JourneyDetail /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ProductCopyWith<$Res>? get product { if (_self.product == null) { return null; } return $ProductCopyWith<$Res>(_self.product!, (value) { return _then(_self.copyWith(product: value)); }); } } /// @nodoc mixin _$HimMessage { String get id; String? get externalId; String? get head; String? get lead; String? get text; String? get category; String? get company; int? get priority; int? get products; DateTime? get startValidity; DateTime? get endValidity; DateTime? get modified; /// Create a copy of HimMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $HimMessageCopyWith get copyWith => _$HimMessageCopyWithImpl(this as HimMessage, _$identity); /// Serializes this HimMessage to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is HimMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.externalId, externalId) || other.externalId == externalId)&&(identical(other.head, head) || other.head == head)&&(identical(other.lead, lead) || other.lead == lead)&&(identical(other.text, text) || other.text == text)&&(identical(other.category, category) || other.category == category)&&(identical(other.company, company) || other.company == company)&&(identical(other.priority, priority) || other.priority == priority)&&(identical(other.products, products) || other.products == products)&&(identical(other.startValidity, startValidity) || other.startValidity == startValidity)&&(identical(other.endValidity, endValidity) || other.endValidity == endValidity)&&(identical(other.modified, modified) || other.modified == modified)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,externalId,head,lead,text,category,company,priority,products,startValidity,endValidity,modified); @override String toString() { return 'HimMessage(id: $id, externalId: $externalId, head: $head, lead: $lead, text: $text, category: $category, company: $company, priority: $priority, products: $products, startValidity: $startValidity, endValidity: $endValidity, modified: $modified)'; } } /// @nodoc abstract mixin class $HimMessageCopyWith<$Res> { factory $HimMessageCopyWith(HimMessage value, $Res Function(HimMessage) _then) = _$HimMessageCopyWithImpl; @useResult $Res call({ String id, String? externalId, String? head, String? lead, String? text, String? category, String? company, int? priority, int? products, DateTime? startValidity, DateTime? endValidity, DateTime? modified }); } /// @nodoc class _$HimMessageCopyWithImpl<$Res> implements $HimMessageCopyWith<$Res> { _$HimMessageCopyWithImpl(this._self, this._then); final HimMessage _self; final $Res Function(HimMessage) _then; /// Create a copy of HimMessage /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? externalId = freezed,Object? head = freezed,Object? lead = freezed,Object? text = freezed,Object? category = freezed,Object? company = freezed,Object? priority = freezed,Object? products = freezed,Object? startValidity = freezed,Object? endValidity = freezed,Object? modified = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,externalId: freezed == externalId ? _self.externalId : externalId // ignore: cast_nullable_to_non_nullable as String?,head: freezed == head ? _self.head : head // ignore: cast_nullable_to_non_nullable as String?,lead: freezed == lead ? _self.lead : lead // ignore: cast_nullable_to_non_nullable as String?,text: freezed == text ? _self.text : text // ignore: cast_nullable_to_non_nullable as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable as String?,company: freezed == company ? _self.company : company // ignore: cast_nullable_to_non_nullable as String?,priority: freezed == priority ? _self.priority : priority // ignore: cast_nullable_to_non_nullable as int?,products: freezed == products ? _self.products : products // ignore: cast_nullable_to_non_nullable as int?,startValidity: freezed == startValidity ? _self.startValidity : startValidity // ignore: cast_nullable_to_non_nullable as DateTime?,endValidity: freezed == endValidity ? _self.endValidity : endValidity // ignore: cast_nullable_to_non_nullable as DateTime?,modified: freezed == modified ? _self.modified : modified // ignore: cast_nullable_to_non_nullable as DateTime?, )); } } /// Adds pattern-matching-related methods to [HimMessage]. extension HimMessagePatterns on HimMessage { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _HimMessage value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _HimMessage() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _HimMessage value) $default,){ final _that = this; switch (_that) { case _HimMessage(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _HimMessage value)? $default,){ final _that = this; switch (_that) { case _HimMessage() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String? externalId, String? head, String? lead, String? text, String? category, String? company, int? priority, int? products, DateTime? startValidity, DateTime? endValidity, DateTime? modified)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _HimMessage() when $default != null: return $default(_that.id,_that.externalId,_that.head,_that.lead,_that.text,_that.category,_that.company,_that.priority,_that.products,_that.startValidity,_that.endValidity,_that.modified);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String? externalId, String? head, String? lead, String? text, String? category, String? company, int? priority, int? products, DateTime? startValidity, DateTime? endValidity, DateTime? modified) $default,) {final _that = this; switch (_that) { case _HimMessage(): return $default(_that.id,_that.externalId,_that.head,_that.lead,_that.text,_that.category,_that.company,_that.priority,_that.products,_that.startValidity,_that.endValidity,_that.modified);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String? externalId, String? head, String? lead, String? text, String? category, String? company, int? priority, int? products, DateTime? startValidity, DateTime? endValidity, DateTime? modified)? $default,) {final _that = this; switch (_that) { case _HimMessage() when $default != null: return $default(_that.id,_that.externalId,_that.head,_that.lead,_that.text,_that.category,_that.company,_that.priority,_that.products,_that.startValidity,_that.endValidity,_that.modified);case _: return null; } } } /// @nodoc @JsonSerializable() class _HimMessage implements HimMessage { const _HimMessage({required this.id, this.externalId, this.head, this.lead, this.text, this.category, this.company, this.priority, this.products, this.startValidity, this.endValidity, this.modified}); factory _HimMessage.fromJson(Map json) => _$HimMessageFromJson(json); @override final String id; @override final String? externalId; @override final String? head; @override final String? lead; @override final String? text; @override final String? category; @override final String? company; @override final int? priority; @override final int? products; @override final DateTime? startValidity; @override final DateTime? endValidity; @override final DateTime? modified; /// Create a copy of HimMessage /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$HimMessageCopyWith<_HimMessage> get copyWith => __$HimMessageCopyWithImpl<_HimMessage>(this, _$identity); @override Map toJson() { return _$HimMessageToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _HimMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.externalId, externalId) || other.externalId == externalId)&&(identical(other.head, head) || other.head == head)&&(identical(other.lead, lead) || other.lead == lead)&&(identical(other.text, text) || other.text == text)&&(identical(other.category, category) || other.category == category)&&(identical(other.company, company) || other.company == company)&&(identical(other.priority, priority) || other.priority == priority)&&(identical(other.products, products) || other.products == products)&&(identical(other.startValidity, startValidity) || other.startValidity == startValidity)&&(identical(other.endValidity, endValidity) || other.endValidity == endValidity)&&(identical(other.modified, modified) || other.modified == modified)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,externalId,head,lead,text,category,company,priority,products,startValidity,endValidity,modified); @override String toString() { return 'HimMessage(id: $id, externalId: $externalId, head: $head, lead: $lead, text: $text, category: $category, company: $company, priority: $priority, products: $products, startValidity: $startValidity, endValidity: $endValidity, modified: $modified)'; } } /// @nodoc abstract mixin class _$HimMessageCopyWith<$Res> implements $HimMessageCopyWith<$Res> { factory _$HimMessageCopyWith(_HimMessage value, $Res Function(_HimMessage) _then) = __$HimMessageCopyWithImpl; @override @useResult $Res call({ String id, String? externalId, String? head, String? lead, String? text, String? category, String? company, int? priority, int? products, DateTime? startValidity, DateTime? endValidity, DateTime? modified }); } /// @nodoc class __$HimMessageCopyWithImpl<$Res> implements _$HimMessageCopyWith<$Res> { __$HimMessageCopyWithImpl(this._self, this._then); final _HimMessage _self; final $Res Function(_HimMessage) _then; /// Create a copy of HimMessage /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? externalId = freezed,Object? head = freezed,Object? lead = freezed,Object? text = freezed,Object? category = freezed,Object? company = freezed,Object? priority = freezed,Object? products = freezed,Object? startValidity = freezed,Object? endValidity = freezed,Object? modified = freezed,}) { return _then(_HimMessage( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,externalId: freezed == externalId ? _self.externalId : externalId // ignore: cast_nullable_to_non_nullable as String?,head: freezed == head ? _self.head : head // ignore: cast_nullable_to_non_nullable as String?,lead: freezed == lead ? _self.lead : lead // ignore: cast_nullable_to_non_nullable as String?,text: freezed == text ? _self.text : text // ignore: cast_nullable_to_non_nullable as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable as String?,company: freezed == company ? _self.company : company // ignore: cast_nullable_to_non_nullable as String?,priority: freezed == priority ? _self.priority : priority // ignore: cast_nullable_to_non_nullable as int?,products: freezed == products ? _self.products : products // ignore: cast_nullable_to_non_nullable as int?,startValidity: freezed == startValidity ? _self.startValidity : startValidity // ignore: cast_nullable_to_non_nullable as DateTime?,endValidity: freezed == endValidity ? _self.endValidity : endValidity // ignore: cast_nullable_to_non_nullable as DateTime?,modified: freezed == modified ? _self.modified : modified // ignore: cast_nullable_to_non_nullable as DateTime?, )); } } // dart format on