50e4f43738
Implement company AI onboarding/recommendation models, services, repository, and tender UI integration with supporting tests. Co-authored-by: Cursor <cursoragent@cursor.com>
284 lines
9.1 KiB
Dart
284 lines
9.1 KiB
Dart
// 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 'recommendation_item.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$RecommendationItem {
|
|
|
|
String? get rank;@JsonKey(name: 'tender_id') String? get tenderId; String? get analysis;
|
|
/// Create a copy of RecommendationItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$RecommendationItemCopyWith<RecommendationItem> get copyWith => _$RecommendationItemCopyWithImpl<RecommendationItem>(this as RecommendationItem, _$identity);
|
|
|
|
/// Serializes this RecommendationItem to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is RecommendationItem&&(identical(other.rank, rank) || other.rank == rank)&&(identical(other.tenderId, tenderId) || other.tenderId == tenderId)&&(identical(other.analysis, analysis) || other.analysis == analysis));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,rank,tenderId,analysis);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'RecommendationItem(rank: $rank, tenderId: $tenderId, analysis: $analysis)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $RecommendationItemCopyWith<$Res> {
|
|
factory $RecommendationItemCopyWith(RecommendationItem value, $Res Function(RecommendationItem) _then) = _$RecommendationItemCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String? rank,@JsonKey(name: 'tender_id') String? tenderId, String? analysis
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$RecommendationItemCopyWithImpl<$Res>
|
|
implements $RecommendationItemCopyWith<$Res> {
|
|
_$RecommendationItemCopyWithImpl(this._self, this._then);
|
|
|
|
final RecommendationItem _self;
|
|
final $Res Function(RecommendationItem) _then;
|
|
|
|
/// Create a copy of RecommendationItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? rank = freezed,Object? tenderId = freezed,Object? analysis = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
rank: freezed == rank ? _self.rank : rank // ignore: cast_nullable_to_non_nullable
|
|
as String?,tenderId: freezed == tenderId ? _self.tenderId : tenderId // ignore: cast_nullable_to_non_nullable
|
|
as String?,analysis: freezed == analysis ? _self.analysis : analysis // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [RecommendationItem].
|
|
extension RecommendationItemPatterns on RecommendationItem {
|
|
/// 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 extends Object?>(TResult Function( _RecommendationItem value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RecommendationItem() 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 extends Object?>(TResult Function( _RecommendationItem value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RecommendationItem():
|
|
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 extends Object?>(TResult? Function( _RecommendationItem value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _RecommendationItem() 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 extends Object?>(TResult Function( String? rank, @JsonKey(name: 'tender_id') String? tenderId, String? analysis)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _RecommendationItem() when $default != null:
|
|
return $default(_that.rank,_that.tenderId,_that.analysis);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 extends Object?>(TResult Function( String? rank, @JsonKey(name: 'tender_id') String? tenderId, String? analysis) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _RecommendationItem():
|
|
return $default(_that.rank,_that.tenderId,_that.analysis);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 extends Object?>(TResult? Function( String? rank, @JsonKey(name: 'tender_id') String? tenderId, String? analysis)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _RecommendationItem() when $default != null:
|
|
return $default(_that.rank,_that.tenderId,_that.analysis);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _RecommendationItem implements RecommendationItem {
|
|
const _RecommendationItem({required this.rank, @JsonKey(name: 'tender_id') required this.tenderId, required this.analysis});
|
|
factory _RecommendationItem.fromJson(Map<String, dynamic> json) => _$RecommendationItemFromJson(json);
|
|
|
|
@override final String? rank;
|
|
@override@JsonKey(name: 'tender_id') final String? tenderId;
|
|
@override final String? analysis;
|
|
|
|
/// Create a copy of RecommendationItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$RecommendationItemCopyWith<_RecommendationItem> get copyWith => __$RecommendationItemCopyWithImpl<_RecommendationItem>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$RecommendationItemToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RecommendationItem&&(identical(other.rank, rank) || other.rank == rank)&&(identical(other.tenderId, tenderId) || other.tenderId == tenderId)&&(identical(other.analysis, analysis) || other.analysis == analysis));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,rank,tenderId,analysis);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'RecommendationItem(rank: $rank, tenderId: $tenderId, analysis: $analysis)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$RecommendationItemCopyWith<$Res> implements $RecommendationItemCopyWith<$Res> {
|
|
factory _$RecommendationItemCopyWith(_RecommendationItem value, $Res Function(_RecommendationItem) _then) = __$RecommendationItemCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String? rank,@JsonKey(name: 'tender_id') String? tenderId, String? analysis
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$RecommendationItemCopyWithImpl<$Res>
|
|
implements _$RecommendationItemCopyWith<$Res> {
|
|
__$RecommendationItemCopyWithImpl(this._self, this._then);
|
|
|
|
final _RecommendationItem _self;
|
|
final $Res Function(_RecommendationItem) _then;
|
|
|
|
/// Create a copy of RecommendationItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? rank = freezed,Object? tenderId = freezed,Object? analysis = freezed,}) {
|
|
return _then(_RecommendationItem(
|
|
rank: freezed == rank ? _self.rank : rank // ignore: cast_nullable_to_non_nullable
|
|
as String?,tenderId: freezed == tenderId ? _self.tenderId : tenderId // ignore: cast_nullable_to_non_nullable
|
|
as String?,analysis: freezed == analysis ? _self.analysis : analysis // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|