// 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 'attachment_media_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 _$AttachmentMediaLoadingState {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() loading,
    required TResult Function() loaded,
    required TResult Function(String? error) error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    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(_AttachmentMediaLoadingStateLoading value)
    loading,
    required TResult Function(_AttachmentMediaLoadingStateLoaded value) loaded,
    required TResult Function(_AttachmentMediaLoadingStateError value) error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult? Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult? Function(_AttachmentMediaLoadingStateError value)? error,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult Function(_AttachmentMediaLoadingStateError value)? error,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $AttachmentMediaLoadingStateCopyWith<$Res> {
  factory $AttachmentMediaLoadingStateCopyWith(
    AttachmentMediaLoadingState value,
    $Res Function(AttachmentMediaLoadingState) then,
  ) =
      _$AttachmentMediaLoadingStateCopyWithImpl<
        $Res,
        AttachmentMediaLoadingState
      >;
}

/// @nodoc
class _$AttachmentMediaLoadingStateCopyWithImpl<
  $Res,
  $Val extends AttachmentMediaLoadingState
>
    implements $AttachmentMediaLoadingStateCopyWith<$Res> {
  _$AttachmentMediaLoadingStateCopyWithImpl(this._value, this._then);

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

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

/// @nodoc
abstract class _$$AttachmentMediaLoadingStateLoadingImplCopyWith<$Res> {
  factory _$$AttachmentMediaLoadingStateLoadingImplCopyWith(
    _$AttachmentMediaLoadingStateLoadingImpl value,
    $Res Function(_$AttachmentMediaLoadingStateLoadingImpl) then,
  ) = __$$AttachmentMediaLoadingStateLoadingImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$AttachmentMediaLoadingStateLoadingImplCopyWithImpl<$Res>
    extends
        _$AttachmentMediaLoadingStateCopyWithImpl<
          $Res,
          _$AttachmentMediaLoadingStateLoadingImpl
        >
    implements _$$AttachmentMediaLoadingStateLoadingImplCopyWith<$Res> {
  __$$AttachmentMediaLoadingStateLoadingImplCopyWithImpl(
    _$AttachmentMediaLoadingStateLoadingImpl _value,
    $Res Function(_$AttachmentMediaLoadingStateLoadingImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$AttachmentMediaLoadingStateLoadingImpl
    implements _AttachmentMediaLoadingStateLoading {
  const _$AttachmentMediaLoadingStateLoadingImpl();

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

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    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()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return loading?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    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(_AttachmentMediaLoadingStateLoading value)
    loading,
    required TResult Function(_AttachmentMediaLoadingStateLoaded value) loaded,
    required TResult Function(_AttachmentMediaLoadingStateError value) error,
  }) {
    return loading(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult? Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult? Function(_AttachmentMediaLoadingStateError value)? error,
  }) {
    return loading?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult Function(_AttachmentMediaLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading(this);
    }
    return orElse();
  }
}

abstract class _AttachmentMediaLoadingStateLoading
    implements AttachmentMediaLoadingState {
  const factory _AttachmentMediaLoadingStateLoading() =
      _$AttachmentMediaLoadingStateLoadingImpl;
}

/// @nodoc
abstract class _$$AttachmentMediaLoadingStateLoadedImplCopyWith<$Res> {
  factory _$$AttachmentMediaLoadingStateLoadedImplCopyWith(
    _$AttachmentMediaLoadingStateLoadedImpl value,
    $Res Function(_$AttachmentMediaLoadingStateLoadedImpl) then,
  ) = __$$AttachmentMediaLoadingStateLoadedImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$AttachmentMediaLoadingStateLoadedImplCopyWithImpl<$Res>
    extends
        _$AttachmentMediaLoadingStateCopyWithImpl<
          $Res,
          _$AttachmentMediaLoadingStateLoadedImpl
        >
    implements _$$AttachmentMediaLoadingStateLoadedImplCopyWith<$Res> {
  __$$AttachmentMediaLoadingStateLoadedImplCopyWithImpl(
    _$AttachmentMediaLoadingStateLoadedImpl _value,
    $Res Function(_$AttachmentMediaLoadingStateLoadedImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$AttachmentMediaLoadingStateLoadedImpl
    implements _AttachmentMediaLoadingStateLoaded {
  const _$AttachmentMediaLoadingStateLoadedImpl();

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

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    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()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return loaded?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    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(_AttachmentMediaLoadingStateLoading value)
    loading,
    required TResult Function(_AttachmentMediaLoadingStateLoaded value) loaded,
    required TResult Function(_AttachmentMediaLoadingStateError value) error,
  }) {
    return loaded(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult? Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult? Function(_AttachmentMediaLoadingStateError value)? error,
  }) {
    return loaded?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult Function(_AttachmentMediaLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (loaded != null) {
      return loaded(this);
    }
    return orElse();
  }
}

abstract class _AttachmentMediaLoadingStateLoaded
    implements AttachmentMediaLoadingState {
  const factory _AttachmentMediaLoadingStateLoaded() =
      _$AttachmentMediaLoadingStateLoadedImpl;
}

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

/// @nodoc
class __$$AttachmentMediaLoadingStateErrorImplCopyWithImpl<$Res>
    extends
        _$AttachmentMediaLoadingStateCopyWithImpl<
          $Res,
          _$AttachmentMediaLoadingStateErrorImpl
        >
    implements _$$AttachmentMediaLoadingStateErrorImplCopyWith<$Res> {
  __$$AttachmentMediaLoadingStateErrorImplCopyWithImpl(
    _$AttachmentMediaLoadingStateErrorImpl _value,
    $Res Function(_$AttachmentMediaLoadingStateErrorImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$AttachmentMediaLoadingStateErrorImpl
    implements _AttachmentMediaLoadingStateError {
  const _$AttachmentMediaLoadingStateErrorImpl([this.error]);

  @override
  final String? error;

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

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    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()? loading,
    TResult? Function()? loaded,
    TResult? Function(String? error)? error,
  }) {
    return error?.call(this.error);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    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(_AttachmentMediaLoadingStateLoading value)
    loading,
    required TResult Function(_AttachmentMediaLoadingStateLoaded value) loaded,
    required TResult Function(_AttachmentMediaLoadingStateError value) error,
  }) {
    return error(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult? Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult? Function(_AttachmentMediaLoadingStateError value)? error,
  }) {
    return error?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_AttachmentMediaLoadingStateLoading value)? loading,
    TResult Function(_AttachmentMediaLoadingStateLoaded value)? loaded,
    TResult Function(_AttachmentMediaLoadingStateError value)? error,
    required TResult orElse(),
  }) {
    if (error != null) {
      return error(this);
    }
    return orElse();
  }
}

abstract class _AttachmentMediaLoadingStateError
    implements AttachmentMediaLoadingState {
  const factory _AttachmentMediaLoadingStateError([final String? error]) =
      _$AttachmentMediaLoadingStateErrorImpl;

  String? get error;

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

/// @nodoc
mixin _$AttachmentMediaState {
  AttachmentMediaLoadingState get mediaLoadingState =>
      throw _privateConstructorUsedError;
  File? get mediaFile => throw _privateConstructorUsedError;
  bool get isDownloading => throw _privateConstructorUsedError;

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

/// @nodoc
abstract class $AttachmentMediaStateCopyWith<$Res> {
  factory $AttachmentMediaStateCopyWith(
    AttachmentMediaState value,
    $Res Function(AttachmentMediaState) then,
  ) = _$AttachmentMediaStateCopyWithImpl<$Res, AttachmentMediaState>;
  @useResult
  $Res call({
    AttachmentMediaLoadingState mediaLoadingState,
    File? mediaFile,
    bool isDownloading,
  });

  $AttachmentMediaLoadingStateCopyWith<$Res> get mediaLoadingState;
}

/// @nodoc
class _$AttachmentMediaStateCopyWithImpl<
  $Res,
  $Val extends AttachmentMediaState
>
    implements $AttachmentMediaStateCopyWith<$Res> {
  _$AttachmentMediaStateCopyWithImpl(this._value, this._then);

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

  /// Create a copy of AttachmentMediaState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? mediaLoadingState = null,
    Object? mediaFile = freezed,
    Object? isDownloading = null,
  }) {
    return _then(
      _value.copyWith(
            mediaLoadingState:
                null == mediaLoadingState
                    ? _value.mediaLoadingState
                    : mediaLoadingState // ignore: cast_nullable_to_non_nullable
                        as AttachmentMediaLoadingState,
            mediaFile:
                freezed == mediaFile
                    ? _value.mediaFile
                    : mediaFile // ignore: cast_nullable_to_non_nullable
                        as File?,
            isDownloading:
                null == isDownloading
                    ? _value.isDownloading
                    : isDownloading // ignore: cast_nullable_to_non_nullable
                        as bool,
          )
          as $Val,
    );
  }

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

/// @nodoc
abstract class _$$AttachmentMediaStateImplCopyWith<$Res>
    implements $AttachmentMediaStateCopyWith<$Res> {
  factory _$$AttachmentMediaStateImplCopyWith(
    _$AttachmentMediaStateImpl value,
    $Res Function(_$AttachmentMediaStateImpl) then,
  ) = __$$AttachmentMediaStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    AttachmentMediaLoadingState mediaLoadingState,
    File? mediaFile,
    bool isDownloading,
  });

  @override
  $AttachmentMediaLoadingStateCopyWith<$Res> get mediaLoadingState;
}

/// @nodoc
class __$$AttachmentMediaStateImplCopyWithImpl<$Res>
    extends _$AttachmentMediaStateCopyWithImpl<$Res, _$AttachmentMediaStateImpl>
    implements _$$AttachmentMediaStateImplCopyWith<$Res> {
  __$$AttachmentMediaStateImplCopyWithImpl(
    _$AttachmentMediaStateImpl _value,
    $Res Function(_$AttachmentMediaStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of AttachmentMediaState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? mediaLoadingState = null,
    Object? mediaFile = freezed,
    Object? isDownloading = null,
  }) {
    return _then(
      _$AttachmentMediaStateImpl(
        mediaLoadingState:
            null == mediaLoadingState
                ? _value.mediaLoadingState
                : mediaLoadingState // ignore: cast_nullable_to_non_nullable
                    as AttachmentMediaLoadingState,
        mediaFile:
            freezed == mediaFile
                ? _value.mediaFile
                : mediaFile // ignore: cast_nullable_to_non_nullable
                    as File?,
        isDownloading:
            null == isDownloading
                ? _value.isDownloading
                : isDownloading // ignore: cast_nullable_to_non_nullable
                    as bool,
      ),
    );
  }
}

/// @nodoc

class _$AttachmentMediaStateImpl implements _AttachmentMediaState {
  const _$AttachmentMediaStateImpl({
    this.mediaLoadingState = const AttachmentMediaLoadingState.loading(),
    this.mediaFile,
    this.isDownloading = false,
  });

  @override
  @JsonKey()
  final AttachmentMediaLoadingState mediaLoadingState;
  @override
  final File? mediaFile;
  @override
  @JsonKey()
  final bool isDownloading;

  @override
  String toString() {
    return 'AttachmentMediaState(mediaLoadingState: $mediaLoadingState, mediaFile: $mediaFile, isDownloading: $isDownloading)';
  }

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

  @override
  int get hashCode =>
      Object.hash(runtimeType, mediaLoadingState, mediaFile, isDownloading);

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

abstract class _AttachmentMediaState implements AttachmentMediaState {
  const factory _AttachmentMediaState({
    final AttachmentMediaLoadingState mediaLoadingState,
    final File? mediaFile,
    final bool isDownloading,
  }) = _$AttachmentMediaStateImpl;

  @override
  AttachmentMediaLoadingState get mediaLoadingState;
  @override
  File? get mediaFile;
  @override
  bool get isDownloading;

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