// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// 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 'chat_room_state.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
  'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);

/// @nodoc
mixin _$ChatRoomLoadingState {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function() loaded,
    required TResult Function(String? error) error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function()? loaded,
    TResult Function(String? error)? error,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_ChatRoomLoadingStateInitial value) initial,
    required TResult Function(_ChatRoomLoadingStateLoading value) loading,
    required TResult Function(_ChatRoomLoadingStateLoaded value) loaded,
    required TResult Function(_ChatRoomLoadingStateError value) error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult? Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult? Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult? Function(_ChatRoomLoadingStateError value)? error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult Function(_ChatRoomLoadingStateError value)? error,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $ChatRoomLoadingStateCopyWith<$Res> {
  factory $ChatRoomLoadingStateCopyWith(
    ChatRoomLoadingState value,
    $Res Function(ChatRoomLoadingState) then,
  ) = _$ChatRoomLoadingStateCopyWithImpl<$Res, ChatRoomLoadingState>;
}

/// @nodoc
class _$ChatRoomLoadingStateCopyWithImpl<
  $Res,
  $Val extends ChatRoomLoadingState
>
    implements $ChatRoomLoadingStateCopyWith<$Res> {
  _$ChatRoomLoadingStateCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc
abstract class _$$ChatRoomLoadingStateInitialImplCopyWith<$Res> {
  factory _$$ChatRoomLoadingStateInitialImplCopyWith(
    _$ChatRoomLoadingStateInitialImpl value,
    $Res Function(_$ChatRoomLoadingStateInitialImpl) then,
  ) = __$$ChatRoomLoadingStateInitialImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$ChatRoomLoadingStateInitialImplCopyWithImpl<$Res>
    extends
        _$ChatRoomLoadingStateCopyWithImpl<
          $Res,
          _$ChatRoomLoadingStateInitialImpl
        >
    implements _$$ChatRoomLoadingStateInitialImplCopyWith<$Res> {
  __$$ChatRoomLoadingStateInitialImplCopyWithImpl(
    _$ChatRoomLoadingStateInitialImpl _value,
    $Res Function(_$ChatRoomLoadingStateInitialImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc

class _$ChatRoomLoadingStateInitialImpl
    implements _ChatRoomLoadingStateInitial {
  const _$ChatRoomLoadingStateInitialImpl();

  @override
  String toString() {
    return 'ChatRoomLoadingState.initial()';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ChatRoomLoadingStateInitialImpl);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function() loaded,
    required TResult Function(String? error) error,
  }) {
    return initial();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return initial?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function()? loaded,
    TResult Function(String? error)? error,
    required TResult orElse(),
  }) {
    if (initial != null) {
      return initial();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_ChatRoomLoadingStateInitial value) initial,
    required TResult Function(_ChatRoomLoadingStateLoading value) loading,
    required TResult Function(_ChatRoomLoadingStateLoaded value) loaded,
    required TResult Function(_ChatRoomLoadingStateError value) error,
  }) {
    return initial(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult? Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult? Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult? Function(_ChatRoomLoadingStateError value)? error,
  }) {
    return initial?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult Function(_ChatRoomLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (initial != null) {
      return initial(this);
    }
    return orElse();
  }
}

abstract class _ChatRoomLoadingStateInitial implements ChatRoomLoadingState {
  const factory _ChatRoomLoadingStateInitial() =
      _$ChatRoomLoadingStateInitialImpl;
}

/// @nodoc
abstract class _$$ChatRoomLoadingStateLoadingImplCopyWith<$Res> {
  factory _$$ChatRoomLoadingStateLoadingImplCopyWith(
    _$ChatRoomLoadingStateLoadingImpl value,
    $Res Function(_$ChatRoomLoadingStateLoadingImpl) then,
  ) = __$$ChatRoomLoadingStateLoadingImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$ChatRoomLoadingStateLoadingImplCopyWithImpl<$Res>
    extends
        _$ChatRoomLoadingStateCopyWithImpl<
          $Res,
          _$ChatRoomLoadingStateLoadingImpl
        >
    implements _$$ChatRoomLoadingStateLoadingImplCopyWith<$Res> {
  __$$ChatRoomLoadingStateLoadingImplCopyWithImpl(
    _$ChatRoomLoadingStateLoadingImpl _value,
    $Res Function(_$ChatRoomLoadingStateLoadingImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc

class _$ChatRoomLoadingStateLoadingImpl
    implements _ChatRoomLoadingStateLoading {
  const _$ChatRoomLoadingStateLoadingImpl();

  @override
  String toString() {
    return 'ChatRoomLoadingState.loading()';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ChatRoomLoadingStateLoadingImpl);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function() loaded,
    required TResult Function(String? error) error,
  }) {
    return loading();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return loading?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function()? loaded,
    TResult Function(String? error)? error,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_ChatRoomLoadingStateInitial value) initial,
    required TResult Function(_ChatRoomLoadingStateLoading value) loading,
    required TResult Function(_ChatRoomLoadingStateLoaded value) loaded,
    required TResult Function(_ChatRoomLoadingStateError value) error,
  }) {
    return loading(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult? Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult? Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult? Function(_ChatRoomLoadingStateError value)? error,
  }) {
    return loading?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult Function(_ChatRoomLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading(this);
    }
    return orElse();
  }
}

abstract class _ChatRoomLoadingStateLoading implements ChatRoomLoadingState {
  const factory _ChatRoomLoadingStateLoading() =
      _$ChatRoomLoadingStateLoadingImpl;
}

/// @nodoc
abstract class _$$ChatRoomLoadingStateLoadedImplCopyWith<$Res> {
  factory _$$ChatRoomLoadingStateLoadedImplCopyWith(
    _$ChatRoomLoadingStateLoadedImpl value,
    $Res Function(_$ChatRoomLoadingStateLoadedImpl) then,
  ) = __$$ChatRoomLoadingStateLoadedImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$ChatRoomLoadingStateLoadedImplCopyWithImpl<$Res>
    extends
        _$ChatRoomLoadingStateCopyWithImpl<
          $Res,
          _$ChatRoomLoadingStateLoadedImpl
        >
    implements _$$ChatRoomLoadingStateLoadedImplCopyWith<$Res> {
  __$$ChatRoomLoadingStateLoadedImplCopyWithImpl(
    _$ChatRoomLoadingStateLoadedImpl _value,
    $Res Function(_$ChatRoomLoadingStateLoadedImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc

class _$ChatRoomLoadingStateLoadedImpl implements _ChatRoomLoadingStateLoaded {
  const _$ChatRoomLoadingStateLoadedImpl();

  @override
  String toString() {
    return 'ChatRoomLoadingState.loaded()';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ChatRoomLoadingStateLoadedImpl);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function() loaded,
    required TResult Function(String? error) error,
  }) {
    return loaded();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return loaded?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function()? loaded,
    TResult Function(String? error)? error,
    required TResult orElse(),
  }) {
    if (loaded != null) {
      return loaded();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_ChatRoomLoadingStateInitial value) initial,
    required TResult Function(_ChatRoomLoadingStateLoading value) loading,
    required TResult Function(_ChatRoomLoadingStateLoaded value) loaded,
    required TResult Function(_ChatRoomLoadingStateError value) error,
  }) {
    return loaded(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult? Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult? Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult? Function(_ChatRoomLoadingStateError value)? error,
  }) {
    return loaded?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult Function(_ChatRoomLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (loaded != null) {
      return loaded(this);
    }
    return orElse();
  }
}

abstract class _ChatRoomLoadingStateLoaded implements ChatRoomLoadingState {
  const factory _ChatRoomLoadingStateLoaded() =
      _$ChatRoomLoadingStateLoadedImpl;
}

/// @nodoc
abstract class _$$ChatRoomLoadingStateErrorImplCopyWith<$Res> {
  factory _$$ChatRoomLoadingStateErrorImplCopyWith(
    _$ChatRoomLoadingStateErrorImpl value,
    $Res Function(_$ChatRoomLoadingStateErrorImpl) then,
  ) = __$$ChatRoomLoadingStateErrorImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String? error});
}

/// @nodoc
class __$$ChatRoomLoadingStateErrorImplCopyWithImpl<$Res>
    extends
        _$ChatRoomLoadingStateCopyWithImpl<
          $Res,
          _$ChatRoomLoadingStateErrorImpl
        >
    implements _$$ChatRoomLoadingStateErrorImplCopyWith<$Res> {
  __$$ChatRoomLoadingStateErrorImplCopyWithImpl(
    _$ChatRoomLoadingStateErrorImpl _value,
    $Res Function(_$ChatRoomLoadingStateErrorImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? error = freezed}) {
    return _then(
      _$ChatRoomLoadingStateErrorImpl(
        freezed == error
            ? _value.error
            : error // ignore: cast_nullable_to_non_nullable
                as String?,
      ),
    );
  }
}

/// @nodoc

class _$ChatRoomLoadingStateErrorImpl implements _ChatRoomLoadingStateError {
  const _$ChatRoomLoadingStateErrorImpl([this.error]);

  @override
  final String? error;

  @override
  String toString() {
    return 'ChatRoomLoadingState.error(error: $error)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ChatRoomLoadingStateErrorImpl &&
            (identical(other.error, error) || other.error == error));
  }

  @override
  int get hashCode => Object.hash(runtimeType, error);

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$ChatRoomLoadingStateErrorImplCopyWith<_$ChatRoomLoadingStateErrorImpl>
  get copyWith => __$$ChatRoomLoadingStateErrorImplCopyWithImpl<
    _$ChatRoomLoadingStateErrorImpl
  >(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function() loaded,
    required TResult Function(String? error) error,
  }) {
    return error(this.error);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return error?.call(this.error);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function()? loaded,
    TResult Function(String? error)? error,
    required TResult orElse(),
  }) {
    if (error != null) {
      return error(this.error);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_ChatRoomLoadingStateInitial value) initial,
    required TResult Function(_ChatRoomLoadingStateLoading value) loading,
    required TResult Function(_ChatRoomLoadingStateLoaded value) loaded,
    required TResult Function(_ChatRoomLoadingStateError value) error,
  }) {
    return error(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult? Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult? Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult? Function(_ChatRoomLoadingStateError value)? error,
  }) {
    return error?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_ChatRoomLoadingStateInitial value)? initial,
    TResult Function(_ChatRoomLoadingStateLoading value)? loading,
    TResult Function(_ChatRoomLoadingStateLoaded value)? loaded,
    TResult Function(_ChatRoomLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (error != null) {
      return error(this);
    }
    return orElse();
  }
}

abstract class _ChatRoomLoadingStateError implements ChatRoomLoadingState {
  const factory _ChatRoomLoadingStateError([final String? error]) =
      _$ChatRoomLoadingStateErrorImpl;

  String? get error;

  /// Create a copy of ChatRoomLoadingState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$ChatRoomLoadingStateErrorImplCopyWith<_$ChatRoomLoadingStateErrorImpl>
  get copyWith => throw _privateConstructorUsedError;
}

/// @nodoc
mixin _$ChatRoomState {
  List<Message> get messages => throw _privateConstructorUsedError;
  ChatRoomLoadingState get loading => throw _privateConstructorUsedError;
  bool get hasMore => throw _privateConstructorUsedError;

  /// Create a copy of ChatRoomState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  $ChatRoomStateCopyWith<ChatRoomState> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $ChatRoomStateCopyWith<$Res> {
  factory $ChatRoomStateCopyWith(
    ChatRoomState value,
    $Res Function(ChatRoomState) then,
  ) = _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>;
  @useResult
  $Res call({
    List<Message> messages,
    ChatRoomLoadingState loading,
    bool hasMore,
  });

  $ChatRoomLoadingStateCopyWith<$Res> get loading;
}

/// @nodoc
class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
    implements $ChatRoomStateCopyWith<$Res> {
  _$ChatRoomStateCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of ChatRoomState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? messages = null,
    Object? loading = null,
    Object? hasMore = null,
  }) {
    return _then(
      _value.copyWith(
            messages:
                null == messages
                    ? _value.messages
                    : messages // ignore: cast_nullable_to_non_nullable
                        as List<Message>,
            loading:
                null == loading
                    ? _value.loading
                    : loading // ignore: cast_nullable_to_non_nullable
                        as ChatRoomLoadingState,
            hasMore:
                null == hasMore
                    ? _value.hasMore
                    : hasMore // ignore: cast_nullable_to_non_nullable
                        as bool,
          )
          as $Val,
    );
  }

  /// Create a copy of ChatRoomState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $ChatRoomLoadingStateCopyWith<$Res> get loading {
    return $ChatRoomLoadingStateCopyWith<$Res>(_value.loading, (value) {
      return _then(_value.copyWith(loading: value) as $Val);
    });
  }
}

/// @nodoc
abstract class _$$ChatRoomStateImplCopyWith<$Res>
    implements $ChatRoomStateCopyWith<$Res> {
  factory _$$ChatRoomStateImplCopyWith(
    _$ChatRoomStateImpl value,
    $Res Function(_$ChatRoomStateImpl) then,
  ) = __$$ChatRoomStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    List<Message> messages,
    ChatRoomLoadingState loading,
    bool hasMore,
  });

  @override
  $ChatRoomLoadingStateCopyWith<$Res> get loading;
}

/// @nodoc
class __$$ChatRoomStateImplCopyWithImpl<$Res>
    extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl>
    implements _$$ChatRoomStateImplCopyWith<$Res> {
  __$$ChatRoomStateImplCopyWithImpl(
    _$ChatRoomStateImpl _value,
    $Res Function(_$ChatRoomStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ChatRoomState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? messages = null,
    Object? loading = null,
    Object? hasMore = null,
  }) {
    return _then(
      _$ChatRoomStateImpl(
        messages:
            null == messages
                ? _value._messages
                : messages // ignore: cast_nullable_to_non_nullable
                    as List<Message>,
        loading:
            null == loading
                ? _value.loading
                : loading // ignore: cast_nullable_to_non_nullable
                    as ChatRoomLoadingState,
        hasMore:
            null == hasMore
                ? _value.hasMore
                : hasMore // ignore: cast_nullable_to_non_nullable
                    as bool,
      ),
    );
  }
}

/// @nodoc

class _$ChatRoomStateImpl implements _ChatRoomState {
  const _$ChatRoomStateImpl({
    final List<Message> messages = const [],
    this.loading = const ChatRoomLoadingState.initial(),
    this.hasMore = true,
  }) : _messages = messages;

  final List<Message> _messages;
  @override
  @JsonKey()
  List<Message> get messages {
    if (_messages is EqualUnmodifiableListView) return _messages;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_messages);
  }

  @override
  @JsonKey()
  final ChatRoomLoadingState loading;
  @override
  @JsonKey()
  final bool hasMore;

  @override
  String toString() {
    return 'ChatRoomState(messages: $messages, loading: $loading, hasMore: $hasMore)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ChatRoomStateImpl &&
            const DeepCollectionEquality().equals(other._messages, _messages) &&
            (identical(other.loading, loading) || other.loading == loading) &&
            (identical(other.hasMore, hasMore) || other.hasMore == hasMore));
  }

  @override
  int get hashCode => Object.hash(
    runtimeType,
    const DeepCollectionEquality().hash(_messages),
    loading,
    hasMore,
  );

  /// Create a copy of ChatRoomState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$ChatRoomStateImplCopyWith<_$ChatRoomStateImpl> get copyWith =>
      __$$ChatRoomStateImplCopyWithImpl<_$ChatRoomStateImpl>(this, _$identity);
}

abstract class _ChatRoomState implements ChatRoomState {
  const factory _ChatRoomState({
    final List<Message> messages,
    final ChatRoomLoadingState loading,
    final bool hasMore,
  }) = _$ChatRoomStateImpl;

  @override
  List<Message> get messages;
  @override
  ChatRoomLoadingState get loading;
  @override
  bool get hasMore;

  /// Create a copy of ChatRoomState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$ChatRoomStateImplCopyWith<_$ChatRoomStateImpl> get copyWith =>
      throw _privateConstructorUsedError;
}
