// 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 'agent_conversation_service.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$AgentConversationMessage { String get text; bool get isUser; int? get elapsedMs; /// Create a copy of AgentConversationMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AgentConversationMessageCopyWith get copyWith => _$AgentConversationMessageCopyWithImpl( this as AgentConversationMessage, _$identity, ); @override bool operator ==(Object other) { final _this = this as AgentConversationMessage; return identical(this, other) || (other.runtimeType == runtimeType && other is AgentConversationMessage && (identical(other.text, _this.text) || other.text == _this.text) && (identical(other.isUser, _this.isUser) || other.isUser == _this.isUser) && (identical(other.elapsedMs, _this.elapsedMs) || other.elapsedMs == _this.elapsedMs)); } @override int get hashCode { final _this = this as AgentConversationMessage; return Object.hash(runtimeType, _this.text, _this.isUser, _this.elapsedMs); } @override String toString() { final _this = this as AgentConversationMessage; return 'AgentConversationMessage(text: ${_this.text}, isUser: ${_this.isUser}, elapsedMs: ${_this.elapsedMs})'; } } /// @nodoc abstract mixin class $AgentConversationMessageCopyWith<$Res> { factory $AgentConversationMessageCopyWith( AgentConversationMessage value, $Res Function(AgentConversationMessage) _then, ) = _$AgentConversationMessageCopyWithImpl; @useResult $Res call({String text, bool isUser, int? elapsedMs}); } /// @nodoc class _$AgentConversationMessageCopyWithImpl<$Res> implements $AgentConversationMessageCopyWith<$Res> { _$AgentConversationMessageCopyWithImpl(this._self, this._then); final AgentConversationMessage _self; final $Res Function(AgentConversationMessage) _then; /// Create a copy of AgentConversationMessage /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? text = null, Object? isUser = null, Object? elapsedMs = freezed, }) { return _then( AgentConversationMessage( text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable as String, isUser: null == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable as bool, elapsedMs: freezed == elapsedMs ? _self.elapsedMs : elapsedMs // ignore: cast_nullable_to_non_nullable as int?, ), ); } } /// Adds pattern-matching-related methods to [AgentConversationMessage]. extension AgentConversationMessagePatterns on AgentConversationMessage { /// 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(_AgentConversationMessage value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationMessage() 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(_AgentConversationMessage value) $default, ) { final _that = this; switch (_that) { case _AgentConversationMessage(): 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(_AgentConversationMessage value)? $default, ) { final _that = this; switch (_that) { case _AgentConversationMessage() 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 text, bool isUser, int? elapsedMs)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationMessage() when $default != null: return $default(_that.text, _that.isUser, _that.elapsedMs); 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 text, bool isUser, int? elapsedMs) $default, ) { final _that = this; switch (_that) { case _AgentConversationMessage(): return $default(_that.text, _that.isUser, _that.elapsedMs); 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 text, bool isUser, int? elapsedMs)? $default, ) { final _that = this; switch (_that) { case _AgentConversationMessage() when $default != null: return $default(_that.text, _that.isUser, _that.elapsedMs); case _: return null; } } } /// @nodoc class _AgentConversationMessage extends AgentConversationMessage { const _AgentConversationMessage({ required this.text, required this.isUser, this.elapsedMs, }) : super._(); @override final String text; @override final bool isUser; @override final int? elapsedMs; /// Create a copy of AgentConversationMessage /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AgentConversationMessageCopyWith<_AgentConversationMessage> get copyWith => __$AgentConversationMessageCopyWithImpl<_AgentConversationMessage>( this, _$identity, ); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _AgentConversationMessage && (identical(other.text, text) || other.text == text) && (identical(other.isUser, isUser) || other.isUser == isUser) && (identical(other.elapsedMs, elapsedMs) || other.elapsedMs == elapsedMs)); } @override int get hashCode { return Object.hash(runtimeType, text, isUser, elapsedMs); } @override String toString() { return 'AgentConversationMessage(text: $text, isUser: $isUser, elapsedMs: $elapsedMs)'; } } /// @nodoc abstract mixin class _$AgentConversationMessageCopyWith<$Res> implements $AgentConversationMessageCopyWith<$Res> { factory _$AgentConversationMessageCopyWith( _AgentConversationMessage value, $Res Function(_AgentConversationMessage) _then, ) = __$AgentConversationMessageCopyWithImpl; @override @useResult $Res call({String text, bool isUser, int? elapsedMs}); } /// @nodoc class __$AgentConversationMessageCopyWithImpl<$Res> implements _$AgentConversationMessageCopyWith<$Res> { __$AgentConversationMessageCopyWithImpl(this._self, this._then); final _AgentConversationMessage _self; final $Res Function(_AgentConversationMessage) _then; /// Create a copy of AgentConversationMessage /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? text = null, Object? isUser = null, Object? elapsedMs = freezed, }) { return _then( _AgentConversationMessage( text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable as String, isUser: null == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable as bool, elapsedMs: freezed == elapsedMs ? _self.elapsedMs : elapsedMs // ignore: cast_nullable_to_non_nullable as int?, ), ); } } /// @nodoc mixin _$AgentConversationHistory { List get messages; bool get exportReplyFailed; bool get recoveryRequired; bool get resumeAvailable; /// Create a copy of AgentConversationHistory /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AgentConversationHistoryCopyWith get copyWith => _$AgentConversationHistoryCopyWithImpl( this as AgentConversationHistory, _$identity, ); @override bool operator ==(Object other) { final _this = this as AgentConversationHistory; return identical(this, other) || (other.runtimeType == runtimeType && other is AgentConversationHistory && const DeepCollectionEquality().equals( other.messages, _this.messages, ) && (identical(other.exportReplyFailed, _this.exportReplyFailed) || other.exportReplyFailed == _this.exportReplyFailed) && (identical(other.recoveryRequired, _this.recoveryRequired) || other.recoveryRequired == _this.recoveryRequired) && (identical(other.resumeAvailable, _this.resumeAvailable) || other.resumeAvailable == _this.resumeAvailable)); } @override int get hashCode { final _this = this as AgentConversationHistory; return Object.hash( runtimeType, const DeepCollectionEquality().hash(_this.messages), _this.exportReplyFailed, _this.recoveryRequired, _this.resumeAvailable, ); } @override String toString() { final _this = this as AgentConversationHistory; return 'AgentConversationHistory(messages: ${_this.messages}, exportReplyFailed: ${_this.exportReplyFailed}, recoveryRequired: ${_this.recoveryRequired}, resumeAvailable: ${_this.resumeAvailable})'; } } /// @nodoc abstract mixin class $AgentConversationHistoryCopyWith<$Res> { factory $AgentConversationHistoryCopyWith( AgentConversationHistory value, $Res Function(AgentConversationHistory) _then, ) = _$AgentConversationHistoryCopyWithImpl; @useResult $Res call({ List messages, bool exportReplyFailed, bool recoveryRequired, bool resumeAvailable, }); } /// @nodoc class _$AgentConversationHistoryCopyWithImpl<$Res> implements $AgentConversationHistoryCopyWith<$Res> { _$AgentConversationHistoryCopyWithImpl(this._self, this._then); final AgentConversationHistory _self; final $Res Function(AgentConversationHistory) _then; /// Create a copy of AgentConversationHistory /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? messages = null, Object? exportReplyFailed = null, Object? recoveryRequired = null, Object? resumeAvailable = null, }) { return _then( AgentConversationHistory( null == messages ? _self.messages : messages // ignore: cast_nullable_to_non_nullable as List, exportReplyFailed: null == exportReplyFailed ? _self.exportReplyFailed : exportReplyFailed // ignore: cast_nullable_to_non_nullable as bool, recoveryRequired: null == recoveryRequired ? _self.recoveryRequired : recoveryRequired // ignore: cast_nullable_to_non_nullable as bool, resumeAvailable: null == resumeAvailable ? _self.resumeAvailable : resumeAvailable // ignore: cast_nullable_to_non_nullable as bool, ), ); } } /// Adds pattern-matching-related methods to [AgentConversationHistory]. extension AgentConversationHistoryPatterns on AgentConversationHistory { /// 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(_AgentConversationHistory value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationHistory() 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(_AgentConversationHistory value) $default, ) { final _that = this; switch (_that) { case _AgentConversationHistory(): 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(_AgentConversationHistory value)? $default, ) { final _that = this; switch (_that) { case _AgentConversationHistory() 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 messages, bool exportReplyFailed, bool recoveryRequired, bool resumeAvailable, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationHistory() when $default != null: return $default( _that.messages, _that.exportReplyFailed, _that.recoveryRequired, _that.resumeAvailable, ); 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 messages, bool exportReplyFailed, bool recoveryRequired, bool resumeAvailable, ) $default, ) { final _that = this; switch (_that) { case _AgentConversationHistory(): return $default( _that.messages, _that.exportReplyFailed, _that.recoveryRequired, _that.resumeAvailable, ); 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 messages, bool exportReplyFailed, bool recoveryRequired, bool resumeAvailable, )? $default, ) { final _that = this; switch (_that) { case _AgentConversationHistory() when $default != null: return $default( _that.messages, _that.exportReplyFailed, _that.recoveryRequired, _that.resumeAvailable, ); case _: return null; } } } /// @nodoc class _AgentConversationHistory implements AgentConversationHistory { const _AgentConversationHistory( List messages, { this.exportReplyFailed = false, this.recoveryRequired = false, this.resumeAvailable = false, }) : _messages = messages; final List _messages; @override List get messages { if (_messages is EqualUnmodifiableListView) return _messages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_messages); } @override @JsonKey() final bool exportReplyFailed; @override @JsonKey() final bool recoveryRequired; @override @JsonKey() final bool resumeAvailable; /// Create a copy of AgentConversationHistory /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AgentConversationHistoryCopyWith<_AgentConversationHistory> get copyWith => __$AgentConversationHistoryCopyWithImpl<_AgentConversationHistory>( this, _$identity, ); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _AgentConversationHistory && const DeepCollectionEquality().equals(other.messages, _messages) && (identical(other.exportReplyFailed, exportReplyFailed) || other.exportReplyFailed == exportReplyFailed) && (identical(other.recoveryRequired, recoveryRequired) || other.recoveryRequired == recoveryRequired) && (identical(other.resumeAvailable, resumeAvailable) || other.resumeAvailable == resumeAvailable)); } @override int get hashCode { return Object.hash( runtimeType, const DeepCollectionEquality().hash(_messages), exportReplyFailed, recoveryRequired, resumeAvailable, ); } @override String toString() { return 'AgentConversationHistory(messages: $messages, exportReplyFailed: $exportReplyFailed, recoveryRequired: $recoveryRequired, resumeAvailable: $resumeAvailable)'; } } /// @nodoc abstract mixin class _$AgentConversationHistoryCopyWith<$Res> implements $AgentConversationHistoryCopyWith<$Res> { factory _$AgentConversationHistoryCopyWith( _AgentConversationHistory value, $Res Function(_AgentConversationHistory) _then, ) = __$AgentConversationHistoryCopyWithImpl; @override @useResult $Res call({ List messages, bool exportReplyFailed, bool recoveryRequired, bool resumeAvailable, }); } /// @nodoc class __$AgentConversationHistoryCopyWithImpl<$Res> implements _$AgentConversationHistoryCopyWith<$Res> { __$AgentConversationHistoryCopyWithImpl(this._self, this._then); final _AgentConversationHistory _self; final $Res Function(_AgentConversationHistory) _then; /// Create a copy of AgentConversationHistory /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? messages = null, Object? exportReplyFailed = null, Object? recoveryRequired = null, Object? resumeAvailable = null, }) { return _then( _AgentConversationHistory( null == messages ? _self._messages : messages // ignore: cast_nullable_to_non_nullable as List, exportReplyFailed: null == exportReplyFailed ? _self.exportReplyFailed : exportReplyFailed // ignore: cast_nullable_to_non_nullable as bool, recoveryRequired: null == recoveryRequired ? _self.recoveryRequired : recoveryRequired // ignore: cast_nullable_to_non_nullable as bool, resumeAvailable: null == resumeAvailable ? _self.resumeAvailable : resumeAvailable // ignore: cast_nullable_to_non_nullable as bool, ), ); } } /// @nodoc mixin _$AgentConversationPreparation { List get messages; bool get sessionChanged; /// Create a copy of AgentConversationPreparation /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AgentConversationPreparationCopyWith get copyWith => _$AgentConversationPreparationCopyWithImpl( this as AgentConversationPreparation, _$identity, ); @override bool operator ==(Object other) { final _this = this as AgentConversationPreparation; return identical(this, other) || (other.runtimeType == runtimeType && other is AgentConversationPreparation && const DeepCollectionEquality().equals( other.messages, _this.messages, ) && (identical(other.sessionChanged, _this.sessionChanged) || other.sessionChanged == _this.sessionChanged)); } @override int get hashCode { final _this = this as AgentConversationPreparation; return Object.hash( runtimeType, const DeepCollectionEquality().hash(_this.messages), _this.sessionChanged, ); } @override String toString() { final _this = this as AgentConversationPreparation; return 'AgentConversationPreparation(messages: ${_this.messages}, sessionChanged: ${_this.sessionChanged})'; } } /// @nodoc abstract mixin class $AgentConversationPreparationCopyWith<$Res> { factory $AgentConversationPreparationCopyWith( AgentConversationPreparation value, $Res Function(AgentConversationPreparation) _then, ) = _$AgentConversationPreparationCopyWithImpl; @useResult $Res call({List messages, bool sessionChanged}); } /// @nodoc class _$AgentConversationPreparationCopyWithImpl<$Res> implements $AgentConversationPreparationCopyWith<$Res> { _$AgentConversationPreparationCopyWithImpl(this._self, this._then); final AgentConversationPreparation _self; final $Res Function(AgentConversationPreparation) _then; /// Create a copy of AgentConversationPreparation /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? messages = null, Object? sessionChanged = null}) { return _then( AgentConversationPreparation( null == messages ? _self.messages : messages // ignore: cast_nullable_to_non_nullable as List, sessionChanged: null == sessionChanged ? _self.sessionChanged : sessionChanged // ignore: cast_nullable_to_non_nullable as bool, ), ); } } /// Adds pattern-matching-related methods to [AgentConversationPreparation]. extension AgentConversationPreparationPatterns on AgentConversationPreparation { /// 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(_AgentConversationPreparation value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationPreparation() 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(_AgentConversationPreparation value) $default, ) { final _that = this; switch (_that) { case _AgentConversationPreparation(): 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(_AgentConversationPreparation value)? $default, ) { final _that = this; switch (_that) { case _AgentConversationPreparation() 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 messages, bool sessionChanged, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationPreparation() when $default != null: return $default(_that.messages, _that.sessionChanged); 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 messages, bool sessionChanged, ) $default, ) { final _that = this; switch (_that) { case _AgentConversationPreparation(): return $default(_that.messages, _that.sessionChanged); 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 messages, bool sessionChanged, )? $default, ) { final _that = this; switch (_that) { case _AgentConversationPreparation() when $default != null: return $default(_that.messages, _that.sessionChanged); case _: return null; } } } /// @nodoc class _AgentConversationPreparation implements AgentConversationPreparation { const _AgentConversationPreparation( List messages, { required this.sessionChanged, }) : _messages = messages; final List _messages; @override List get messages { if (_messages is EqualUnmodifiableListView) return _messages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_messages); } @override final bool sessionChanged; /// Create a copy of AgentConversationPreparation /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AgentConversationPreparationCopyWith<_AgentConversationPreparation> get copyWith => __$AgentConversationPreparationCopyWithImpl< _AgentConversationPreparation >(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _AgentConversationPreparation && const DeepCollectionEquality().equals(other.messages, _messages) && (identical(other.sessionChanged, sessionChanged) || other.sessionChanged == sessionChanged)); } @override int get hashCode { return Object.hash( runtimeType, const DeepCollectionEquality().hash(_messages), sessionChanged, ); } @override String toString() { return 'AgentConversationPreparation(messages: $messages, sessionChanged: $sessionChanged)'; } } /// @nodoc abstract mixin class _$AgentConversationPreparationCopyWith<$Res> implements $AgentConversationPreparationCopyWith<$Res> { factory _$AgentConversationPreparationCopyWith( _AgentConversationPreparation value, $Res Function(_AgentConversationPreparation) _then, ) = __$AgentConversationPreparationCopyWithImpl; @override @useResult $Res call({List messages, bool sessionChanged}); } /// @nodoc class __$AgentConversationPreparationCopyWithImpl<$Res> implements _$AgentConversationPreparationCopyWith<$Res> { __$AgentConversationPreparationCopyWithImpl(this._self, this._then); final _AgentConversationPreparation _self; final $Res Function(_AgentConversationPreparation) _then; /// Create a copy of AgentConversationPreparation /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? messages = null, Object? sessionChanged = null}) { return _then( _AgentConversationPreparation( null == messages ? _self._messages : messages // ignore: cast_nullable_to_non_nullable as List, sessionChanged: null == sessionChanged ? _self.sessionChanged : sessionChanged // ignore: cast_nullable_to_non_nullable as bool, ), ); } } /// @nodoc mixin _$AgentConversationOutcome { String get response; bool get completed; bool get failed; ConversationMetadata? get conversation; RunFailure? get failure; bool get paused; bool get recoveryRequired; bool get exportReplyFailed; int? get elapsedMs; /// Create a copy of AgentConversationOutcome /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AgentConversationOutcomeCopyWith get copyWith => _$AgentConversationOutcomeCopyWithImpl( this as AgentConversationOutcome, _$identity, ); @override bool operator ==(Object other) { final _this = this as AgentConversationOutcome; return identical(this, other) || (other.runtimeType == runtimeType && other is AgentConversationOutcome && (identical(other.response, _this.response) || other.response == _this.response) && (identical(other.completed, _this.completed) || other.completed == _this.completed) && (identical(other.failed, _this.failed) || other.failed == _this.failed) && (identical(other.conversation, _this.conversation) || other.conversation == _this.conversation) && (identical(other.failure, _this.failure) || other.failure == _this.failure) && (identical(other.paused, _this.paused) || other.paused == _this.paused) && (identical(other.recoveryRequired, _this.recoveryRequired) || other.recoveryRequired == _this.recoveryRequired) && (identical(other.exportReplyFailed, _this.exportReplyFailed) || other.exportReplyFailed == _this.exportReplyFailed) && (identical(other.elapsedMs, _this.elapsedMs) || other.elapsedMs == _this.elapsedMs)); } @override int get hashCode { final _this = this as AgentConversationOutcome; return Object.hash( runtimeType, _this.response, _this.completed, _this.failed, _this.conversation, _this.failure, _this.paused, _this.recoveryRequired, _this.exportReplyFailed, _this.elapsedMs, ); } @override String toString() { final _this = this as AgentConversationOutcome; return 'AgentConversationOutcome(response: ${_this.response}, completed: ${_this.completed}, failed: ${_this.failed}, conversation: ${_this.conversation}, failure: ${_this.failure}, paused: ${_this.paused}, recoveryRequired: ${_this.recoveryRequired}, exportReplyFailed: ${_this.exportReplyFailed}, elapsedMs: ${_this.elapsedMs})'; } } /// @nodoc abstract mixin class $AgentConversationOutcomeCopyWith<$Res> { factory $AgentConversationOutcomeCopyWith( AgentConversationOutcome value, $Res Function(AgentConversationOutcome) _then, ) = _$AgentConversationOutcomeCopyWithImpl; @useResult $Res call({ String response, bool completed, bool failed, ConversationMetadata? conversation, RunFailure? failure, bool paused, bool recoveryRequired, bool exportReplyFailed, int? elapsedMs, }); $ConversationMetadataCopyWith<$Res>? get conversation; } /// @nodoc class _$AgentConversationOutcomeCopyWithImpl<$Res> implements $AgentConversationOutcomeCopyWith<$Res> { _$AgentConversationOutcomeCopyWithImpl(this._self, this._then); final AgentConversationOutcome _self; final $Res Function(AgentConversationOutcome) _then; /// Create a copy of AgentConversationOutcome /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? response = null, Object? completed = null, Object? failed = null, Object? conversation = freezed, Object? failure = freezed, Object? paused = null, Object? recoveryRequired = null, Object? exportReplyFailed = null, Object? elapsedMs = freezed, }) { return _then( AgentConversationOutcome( response: null == response ? _self.response : response // ignore: cast_nullable_to_non_nullable as String, completed: null == completed ? _self.completed : completed // ignore: cast_nullable_to_non_nullable as bool, failed: null == failed ? _self.failed : failed // ignore: cast_nullable_to_non_nullable as bool, conversation: freezed == conversation ? _self.conversation : conversation // ignore: cast_nullable_to_non_nullable as ConversationMetadata?, failure: freezed == failure ? _self.failure : failure // ignore: cast_nullable_to_non_nullable as RunFailure?, paused: null == paused ? _self.paused : paused // ignore: cast_nullable_to_non_nullable as bool, recoveryRequired: null == recoveryRequired ? _self.recoveryRequired : recoveryRequired // ignore: cast_nullable_to_non_nullable as bool, exportReplyFailed: null == exportReplyFailed ? _self.exportReplyFailed : exportReplyFailed // ignore: cast_nullable_to_non_nullable as bool, elapsedMs: freezed == elapsedMs ? _self.elapsedMs : elapsedMs // ignore: cast_nullable_to_non_nullable as int?, ), ); } /// Create a copy of AgentConversationOutcome /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ConversationMetadataCopyWith<$Res>? get conversation { if (_self.conversation == null) { return null; } return $ConversationMetadataCopyWith<$Res>(_self.conversation!, (value) { return _then(_self.copyWith(conversation: value)); }); } } /// Adds pattern-matching-related methods to [AgentConversationOutcome]. extension AgentConversationOutcomePatterns on AgentConversationOutcome { /// 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(_AgentConversationOutcome value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationOutcome() 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(_AgentConversationOutcome value) $default, ) { final _that = this; switch (_that) { case _AgentConversationOutcome(): 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(_AgentConversationOutcome value)? $default, ) { final _that = this; switch (_that) { case _AgentConversationOutcome() 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 response, bool completed, bool failed, ConversationMetadata? conversation, RunFailure? failure, bool paused, bool recoveryRequired, bool exportReplyFailed, int? elapsedMs, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _AgentConversationOutcome() when $default != null: return $default( _that.response, _that.completed, _that.failed, _that.conversation, _that.failure, _that.paused, _that.recoveryRequired, _that.exportReplyFailed, _that.elapsedMs, ); 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 response, bool completed, bool failed, ConversationMetadata? conversation, RunFailure? failure, bool paused, bool recoveryRequired, bool exportReplyFailed, int? elapsedMs, ) $default, ) { final _that = this; switch (_that) { case _AgentConversationOutcome(): return $default( _that.response, _that.completed, _that.failed, _that.conversation, _that.failure, _that.paused, _that.recoveryRequired, _that.exportReplyFailed, _that.elapsedMs, ); 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 response, bool completed, bool failed, ConversationMetadata? conversation, RunFailure? failure, bool paused, bool recoveryRequired, bool exportReplyFailed, int? elapsedMs, )? $default, ) { final _that = this; switch (_that) { case _AgentConversationOutcome() when $default != null: return $default( _that.response, _that.completed, _that.failed, _that.conversation, _that.failure, _that.paused, _that.recoveryRequired, _that.exportReplyFailed, _that.elapsedMs, ); case _: return null; } } } /// @nodoc class _AgentConversationOutcome extends AgentConversationOutcome { const _AgentConversationOutcome({ required this.response, required this.completed, required this.failed, this.conversation, this.failure, this.paused = false, this.recoveryRequired = false, this.exportReplyFailed = false, this.elapsedMs, }) : super._(); @override final String response; @override final bool completed; @override final bool failed; @override final ConversationMetadata? conversation; @override final RunFailure? failure; @override @JsonKey() final bool paused; @override @JsonKey() final bool recoveryRequired; @override @JsonKey() final bool exportReplyFailed; @override final int? elapsedMs; /// Create a copy of AgentConversationOutcome /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AgentConversationOutcomeCopyWith<_AgentConversationOutcome> get copyWith => __$AgentConversationOutcomeCopyWithImpl<_AgentConversationOutcome>( this, _$identity, ); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _AgentConversationOutcome && (identical(other.response, response) || other.response == response) && (identical(other.completed, completed) || other.completed == completed) && (identical(other.failed, failed) || other.failed == failed) && (identical(other.conversation, conversation) || other.conversation == conversation) && (identical(other.failure, failure) || other.failure == failure) && (identical(other.paused, paused) || other.paused == paused) && (identical(other.recoveryRequired, recoveryRequired) || other.recoveryRequired == recoveryRequired) && (identical(other.exportReplyFailed, exportReplyFailed) || other.exportReplyFailed == exportReplyFailed) && (identical(other.elapsedMs, elapsedMs) || other.elapsedMs == elapsedMs)); } @override int get hashCode { return Object.hash( runtimeType, response, completed, failed, conversation, failure, paused, recoveryRequired, exportReplyFailed, elapsedMs, ); } @override String toString() { return 'AgentConversationOutcome(response: $response, completed: $completed, failed: $failed, conversation: $conversation, failure: $failure, paused: $paused, recoveryRequired: $recoveryRequired, exportReplyFailed: $exportReplyFailed, elapsedMs: $elapsedMs)'; } } /// @nodoc abstract mixin class _$AgentConversationOutcomeCopyWith<$Res> implements $AgentConversationOutcomeCopyWith<$Res> { factory _$AgentConversationOutcomeCopyWith( _AgentConversationOutcome value, $Res Function(_AgentConversationOutcome) _then, ) = __$AgentConversationOutcomeCopyWithImpl; @override @useResult $Res call({ String response, bool completed, bool failed, ConversationMetadata? conversation, RunFailure? failure, bool paused, bool recoveryRequired, bool exportReplyFailed, int? elapsedMs, }); @override $ConversationMetadataCopyWith<$Res>? get conversation; } /// @nodoc class __$AgentConversationOutcomeCopyWithImpl<$Res> implements _$AgentConversationOutcomeCopyWith<$Res> { __$AgentConversationOutcomeCopyWithImpl(this._self, this._then); final _AgentConversationOutcome _self; final $Res Function(_AgentConversationOutcome) _then; /// Create a copy of AgentConversationOutcome /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? response = null, Object? completed = null, Object? failed = null, Object? conversation = freezed, Object? failure = freezed, Object? paused = null, Object? recoveryRequired = null, Object? exportReplyFailed = null, Object? elapsedMs = freezed, }) { return _then( _AgentConversationOutcome( response: null == response ? _self.response : response // ignore: cast_nullable_to_non_nullable as String, completed: null == completed ? _self.completed : completed // ignore: cast_nullable_to_non_nullable as bool, failed: null == failed ? _self.failed : failed // ignore: cast_nullable_to_non_nullable as bool, conversation: freezed == conversation ? _self.conversation : conversation // ignore: cast_nullable_to_non_nullable as ConversationMetadata?, failure: freezed == failure ? _self.failure : failure // ignore: cast_nullable_to_non_nullable as RunFailure?, paused: null == paused ? _self.paused : paused // ignore: cast_nullable_to_non_nullable as bool, recoveryRequired: null == recoveryRequired ? _self.recoveryRequired : recoveryRequired // ignore: cast_nullable_to_non_nullable as bool, exportReplyFailed: null == exportReplyFailed ? _self.exportReplyFailed : exportReplyFailed // ignore: cast_nullable_to_non_nullable as bool, elapsedMs: freezed == elapsedMs ? _self.elapsedMs : elapsedMs // ignore: cast_nullable_to_non_nullable as int?, ), ); } /// Create a copy of AgentConversationOutcome /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ConversationMetadataCopyWith<$Res>? get conversation { if (_self.conversation == null) { return null; } return $ConversationMetadataCopyWith<$Res>(_self.conversation!, (value) { return _then(_self.copyWith(conversation: value)); }); } }