285 lines
8.2 KiB
Dart
285 lines
8.2 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
|
// 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 'catalog_term.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
/// @nodoc
|
|
mixin _$CatalogTerm {
|
|
|
|
String get id; String get nameDe; String get nameEn;
|
|
/// Create a copy of CatalogTerm
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$CatalogTermCopyWith<CatalogTerm> get copyWith => _$CatalogTermCopyWithImpl<CatalogTerm>(this as CatalogTerm, _$identity);
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as CatalogTerm;
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is CatalogTerm&&(identical(other.id, _this.id) || other.id == _this.id)&&(identical(other.nameDe, _this.nameDe) || other.nameDe == _this.nameDe)&&(identical(other.nameEn, _this.nameEn) || other.nameEn == _this.nameEn));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as CatalogTerm;
|
|
return Object.hash(runtimeType,_this.id,_this.nameDe,_this.nameEn);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as CatalogTerm;
|
|
return 'CatalogTerm(id: ${_this.id}, nameDe: ${_this.nameDe}, nameEn: ${_this.nameEn})';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $CatalogTermCopyWith<$Res> {
|
|
factory $CatalogTermCopyWith(CatalogTerm value, $Res Function(CatalogTerm) _then) = _$CatalogTermCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String id, String nameDe, String nameEn
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$CatalogTermCopyWithImpl<$Res>
|
|
implements $CatalogTermCopyWith<$Res> {
|
|
_$CatalogTermCopyWithImpl(this._self, this._then);
|
|
|
|
final CatalogTerm _self;
|
|
final $Res Function(CatalogTerm) _then;
|
|
|
|
/// Create a copy of CatalogTerm
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? nameDe = null,Object? nameEn = null,}) {
|
|
return _then(CatalogTerm(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,nameDe: null == nameDe ? _self.nameDe : nameDe // ignore: cast_nullable_to_non_nullable
|
|
as String,nameEn: null == nameEn ? _self.nameEn : nameEn // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [CatalogTerm].
|
|
extension CatalogTermPatterns on CatalogTerm {
|
|
/// 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( _CatalogTerm value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _CatalogTerm() 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( _CatalogTerm value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _CatalogTerm():
|
|
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( _CatalogTerm value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _CatalogTerm() 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 id, String nameDe, String nameEn)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _CatalogTerm() when $default != null:
|
|
return $default(_that.id,_that.nameDe,_that.nameEn);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 id, String nameDe, String nameEn) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _CatalogTerm():
|
|
return $default(_that.id,_that.nameDe,_that.nameEn);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 id, String nameDe, String nameEn)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _CatalogTerm() when $default != null:
|
|
return $default(_that.id,_that.nameDe,_that.nameEn);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
|
|
class _CatalogTerm extends CatalogTerm {
|
|
const _CatalogTerm({required this.id, required this.nameDe, required this.nameEn}): super._();
|
|
|
|
|
|
@override final String id;
|
|
@override final String nameDe;
|
|
@override final String nameEn;
|
|
|
|
/// Create a copy of CatalogTerm
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$CatalogTermCopyWith<_CatalogTerm> get copyWith => __$CatalogTermCopyWithImpl<_CatalogTerm>(this, _$identity);
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CatalogTerm&&(identical(other.id, id) || other.id == id)&&(identical(other.nameDe, nameDe) || other.nameDe == nameDe)&&(identical(other.nameEn, nameEn) || other.nameEn == nameEn));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType,id,nameDe,nameEn);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'CatalogTerm(id: $id, nameDe: $nameDe, nameEn: $nameEn)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$CatalogTermCopyWith<$Res> implements $CatalogTermCopyWith<$Res> {
|
|
factory _$CatalogTermCopyWith(_CatalogTerm value, $Res Function(_CatalogTerm) _then) = __$CatalogTermCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String id, String nameDe, String nameEn
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$CatalogTermCopyWithImpl<$Res>
|
|
implements _$CatalogTermCopyWith<$Res> {
|
|
__$CatalogTermCopyWithImpl(this._self, this._then);
|
|
|
|
final _CatalogTerm _self;
|
|
final $Res Function(_CatalogTerm) _then;
|
|
|
|
/// Create a copy of CatalogTerm
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? nameDe = null,Object? nameEn = null,}) {
|
|
return _then(_CatalogTerm(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,nameDe: null == nameDe ? _self.nameDe : nameDe // ignore: cast_nullable_to_non_nullable
|
|
as String,nameEn: null == nameEn ? _self.nameEn : nameEn // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|