// 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 'spirit.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$Spirit { int get id; String get name; String? get avatar; String? get prompt; String? get memory; String? get voiceId; bool get isActive; String? get createdAt; String? get updatedAt; /// Create a copy of Spirit /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SpiritCopyWith get copyWith => _$SpiritCopyWithImpl(this as Spirit, _$identity); /// Serializes this Spirit to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Spirit&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.avatar, avatar) || other.avatar == avatar)&&(identical(other.prompt, prompt) || other.prompt == prompt)&&(identical(other.memory, memory) || other.memory == memory)&&(identical(other.voiceId, voiceId) || other.voiceId == voiceId)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,name,avatar,prompt,memory,voiceId,isActive,createdAt,updatedAt); @override String toString() { return 'Spirit(id: $id, name: $name, avatar: $avatar, prompt: $prompt, memory: $memory, voiceId: $voiceId, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt)'; } } /// @nodoc abstract mixin class $SpiritCopyWith<$Res> { factory $SpiritCopyWith(Spirit value, $Res Function(Spirit) _then) = _$SpiritCopyWithImpl; @useResult $Res call({ int id, String name, String? avatar, String? prompt, String? memory, String? voiceId, bool isActive, String? createdAt, String? updatedAt }); } /// @nodoc class _$SpiritCopyWithImpl<$Res> implements $SpiritCopyWith<$Res> { _$SpiritCopyWithImpl(this._self, this._then); final Spirit _self; final $Res Function(Spirit) _then; /// Create a copy of Spirit /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? avatar = freezed,Object? prompt = freezed,Object? memory = freezed,Object? voiceId = freezed,Object? isActive = null,Object? createdAt = freezed,Object? updatedAt = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,avatar: freezed == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String?,prompt: freezed == prompt ? _self.prompt : prompt // ignore: cast_nullable_to_non_nullable as String?,memory: freezed == memory ? _self.memory : memory // ignore: cast_nullable_to_non_nullable as String?,voiceId: freezed == voiceId ? _self.voiceId : voiceId // ignore: cast_nullable_to_non_nullable as String?,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable as bool,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String?,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [Spirit]. extension SpiritPatterns on Spirit { /// 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( _Spirit value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Spirit() 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( _Spirit value) $default,){ final _that = this; switch (_that) { case _Spirit(): 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( _Spirit value)? $default,){ final _that = this; switch (_that) { case _Spirit() 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( int id, String name, String? avatar, String? prompt, String? memory, String? voiceId, bool isActive, String? createdAt, String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Spirit() when $default != null: return $default(_that.id,_that.name,_that.avatar,_that.prompt,_that.memory,_that.voiceId,_that.isActive,_that.createdAt,_that.updatedAt);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( int id, String name, String? avatar, String? prompt, String? memory, String? voiceId, bool isActive, String? createdAt, String? updatedAt) $default,) {final _that = this; switch (_that) { case _Spirit(): return $default(_that.id,_that.name,_that.avatar,_that.prompt,_that.memory,_that.voiceId,_that.isActive,_that.createdAt,_that.updatedAt);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( int id, String name, String? avatar, String? prompt, String? memory, String? voiceId, bool isActive, String? createdAt, String? updatedAt)? $default,) {final _that = this; switch (_that) { case _Spirit() when $default != null: return $default(_that.id,_that.name,_that.avatar,_that.prompt,_that.memory,_that.voiceId,_that.isActive,_that.createdAt,_that.updatedAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _Spirit implements Spirit { const _Spirit({required this.id, required this.name, this.avatar, this.prompt, this.memory, this.voiceId, this.isActive = true, this.createdAt, this.updatedAt}); factory _Spirit.fromJson(Map json) => _$SpiritFromJson(json); @override final int id; @override final String name; @override final String? avatar; @override final String? prompt; @override final String? memory; @override final String? voiceId; @override@JsonKey() final bool isActive; @override final String? createdAt; @override final String? updatedAt; /// Create a copy of Spirit /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SpiritCopyWith<_Spirit> get copyWith => __$SpiritCopyWithImpl<_Spirit>(this, _$identity); @override Map toJson() { return _$SpiritToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Spirit&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.avatar, avatar) || other.avatar == avatar)&&(identical(other.prompt, prompt) || other.prompt == prompt)&&(identical(other.memory, memory) || other.memory == memory)&&(identical(other.voiceId, voiceId) || other.voiceId == voiceId)&&(identical(other.isActive, isActive) || other.isActive == isActive)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,name,avatar,prompt,memory,voiceId,isActive,createdAt,updatedAt); @override String toString() { return 'Spirit(id: $id, name: $name, avatar: $avatar, prompt: $prompt, memory: $memory, voiceId: $voiceId, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt)'; } } /// @nodoc abstract mixin class _$SpiritCopyWith<$Res> implements $SpiritCopyWith<$Res> { factory _$SpiritCopyWith(_Spirit value, $Res Function(_Spirit) _then) = __$SpiritCopyWithImpl; @override @useResult $Res call({ int id, String name, String? avatar, String? prompt, String? memory, String? voiceId, bool isActive, String? createdAt, String? updatedAt }); } /// @nodoc class __$SpiritCopyWithImpl<$Res> implements _$SpiritCopyWith<$Res> { __$SpiritCopyWithImpl(this._self, this._then); final _Spirit _self; final $Res Function(_Spirit) _then; /// Create a copy of Spirit /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? avatar = freezed,Object? prompt = freezed,Object? memory = freezed,Object? voiceId = freezed,Object? isActive = null,Object? createdAt = freezed,Object? updatedAt = freezed,}) { return _then(_Spirit( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as int,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,avatar: freezed == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String?,prompt: freezed == prompt ? _self.prompt : prompt // ignore: cast_nullable_to_non_nullable as String?,memory: freezed == memory ? _self.memory : memory // ignore: cast_nullable_to_non_nullable as String?,voiceId: freezed == voiceId ? _self.voiceId : voiceId // ignore: cast_nullable_to_non_nullable as String?,isActive: null == isActive ? _self.isActive : isActive // ignore: cast_nullable_to_non_nullable as bool,createdAt: freezed == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String?,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String?, )); } } // dart format on