// 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 'poll_voting_mode.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 _$PollVotingMode {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() disabled,
    required TResult Function() unique,
    required TResult Function(int count) limited,
    required TResult Function() all,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? disabled,
    TResult? Function()? unique,
    TResult? Function(int count)? limited,
    TResult? Function()? all,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? disabled,
    TResult Function()? unique,
    TResult Function(int count)? limited,
    TResult Function()? all,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(VotingDisabled value) disabled,
    required TResult Function(VotingUnique value) unique,
    required TResult Function(VotingLimited value) limited,
    required TResult Function(VotingAll value) all,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(VotingDisabled value)? disabled,
    TResult? Function(VotingUnique value)? unique,
    TResult? Function(VotingLimited value)? limited,
    TResult? Function(VotingAll value)? all,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(VotingDisabled value)? disabled,
    TResult Function(VotingUnique value)? unique,
    TResult Function(VotingLimited value)? limited,
    TResult Function(VotingAll value)? all,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $PollVotingModeCopyWith<$Res> {
  factory $PollVotingModeCopyWith(
          PollVotingMode value, $Res Function(PollVotingMode) then) =
      _$PollVotingModeCopyWithImpl<$Res, PollVotingMode>;
}

/// @nodoc
class _$PollVotingModeCopyWithImpl<$Res, $Val extends PollVotingMode>
    implements $PollVotingModeCopyWith<$Res> {
  _$PollVotingModeCopyWithImpl(this._value, this._then);

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

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

/// @nodoc
abstract class _$$VotingDisabledImplCopyWith<$Res> {
  factory _$$VotingDisabledImplCopyWith(_$VotingDisabledImpl value,
          $Res Function(_$VotingDisabledImpl) then) =
      __$$VotingDisabledImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$VotingDisabledImplCopyWithImpl<$Res>
    extends _$PollVotingModeCopyWithImpl<$Res, _$VotingDisabledImpl>
    implements _$$VotingDisabledImplCopyWith<$Res> {
  __$$VotingDisabledImplCopyWithImpl(
      _$VotingDisabledImpl _value, $Res Function(_$VotingDisabledImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$VotingDisabledImpl implements VotingDisabled {
  const _$VotingDisabledImpl();

  @override
  String toString() {
    return 'PollVotingMode.disabled()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() disabled,
    required TResult Function() unique,
    required TResult Function(int count) limited,
    required TResult Function() all,
  }) {
    return disabled();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? disabled,
    TResult? Function()? unique,
    TResult? Function(int count)? limited,
    TResult? Function()? all,
  }) {
    return disabled?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? disabled,
    TResult Function()? unique,
    TResult Function(int count)? limited,
    TResult Function()? all,
    required TResult orElse(),
  }) {
    if (disabled != null) {
      return disabled();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(VotingDisabled value) disabled,
    required TResult Function(VotingUnique value) unique,
    required TResult Function(VotingLimited value) limited,
    required TResult Function(VotingAll value) all,
  }) {
    return disabled(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(VotingDisabled value)? disabled,
    TResult? Function(VotingUnique value)? unique,
    TResult? Function(VotingLimited value)? limited,
    TResult? Function(VotingAll value)? all,
  }) {
    return disabled?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(VotingDisabled value)? disabled,
    TResult Function(VotingUnique value)? unique,
    TResult Function(VotingLimited value)? limited,
    TResult Function(VotingAll value)? all,
    required TResult orElse(),
  }) {
    if (disabled != null) {
      return disabled(this);
    }
    return orElse();
  }
}

abstract class VotingDisabled implements PollVotingMode {
  const factory VotingDisabled() = _$VotingDisabledImpl;
}

/// @nodoc
abstract class _$$VotingUniqueImplCopyWith<$Res> {
  factory _$$VotingUniqueImplCopyWith(
          _$VotingUniqueImpl value, $Res Function(_$VotingUniqueImpl) then) =
      __$$VotingUniqueImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$VotingUniqueImplCopyWithImpl<$Res>
    extends _$PollVotingModeCopyWithImpl<$Res, _$VotingUniqueImpl>
    implements _$$VotingUniqueImplCopyWith<$Res> {
  __$$VotingUniqueImplCopyWithImpl(
      _$VotingUniqueImpl _value, $Res Function(_$VotingUniqueImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$VotingUniqueImpl implements VotingUnique {
  const _$VotingUniqueImpl();

  @override
  String toString() {
    return 'PollVotingMode.unique()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() disabled,
    required TResult Function() unique,
    required TResult Function(int count) limited,
    required TResult Function() all,
  }) {
    return unique();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? disabled,
    TResult? Function()? unique,
    TResult? Function(int count)? limited,
    TResult? Function()? all,
  }) {
    return unique?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? disabled,
    TResult Function()? unique,
    TResult Function(int count)? limited,
    TResult Function()? all,
    required TResult orElse(),
  }) {
    if (unique != null) {
      return unique();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(VotingDisabled value) disabled,
    required TResult Function(VotingUnique value) unique,
    required TResult Function(VotingLimited value) limited,
    required TResult Function(VotingAll value) all,
  }) {
    return unique(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(VotingDisabled value)? disabled,
    TResult? Function(VotingUnique value)? unique,
    TResult? Function(VotingLimited value)? limited,
    TResult? Function(VotingAll value)? all,
  }) {
    return unique?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(VotingDisabled value)? disabled,
    TResult Function(VotingUnique value)? unique,
    TResult Function(VotingLimited value)? limited,
    TResult Function(VotingAll value)? all,
    required TResult orElse(),
  }) {
    if (unique != null) {
      return unique(this);
    }
    return orElse();
  }
}

abstract class VotingUnique implements PollVotingMode {
  const factory VotingUnique() = _$VotingUniqueImpl;
}

/// @nodoc
abstract class _$$VotingLimitedImplCopyWith<$Res> {
  factory _$$VotingLimitedImplCopyWith(
          _$VotingLimitedImpl value, $Res Function(_$VotingLimitedImpl) then) =
      __$$VotingLimitedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({int count});
}

/// @nodoc
class __$$VotingLimitedImplCopyWithImpl<$Res>
    extends _$PollVotingModeCopyWithImpl<$Res, _$VotingLimitedImpl>
    implements _$$VotingLimitedImplCopyWith<$Res> {
  __$$VotingLimitedImplCopyWithImpl(
      _$VotingLimitedImpl _value, $Res Function(_$VotingLimitedImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$VotingLimitedImpl implements VotingLimited {
  const _$VotingLimitedImpl({required this.count});

  @override
  final int count;

  @override
  String toString() {
    return 'PollVotingMode.limited(count: $count)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() disabled,
    required TResult Function() unique,
    required TResult Function(int count) limited,
    required TResult Function() all,
  }) {
    return limited(count);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? disabled,
    TResult? Function()? unique,
    TResult? Function(int count)? limited,
    TResult? Function()? all,
  }) {
    return limited?.call(count);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? disabled,
    TResult Function()? unique,
    TResult Function(int count)? limited,
    TResult Function()? all,
    required TResult orElse(),
  }) {
    if (limited != null) {
      return limited(count);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(VotingDisabled value) disabled,
    required TResult Function(VotingUnique value) unique,
    required TResult Function(VotingLimited value) limited,
    required TResult Function(VotingAll value) all,
  }) {
    return limited(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(VotingDisabled value)? disabled,
    TResult? Function(VotingUnique value)? unique,
    TResult? Function(VotingLimited value)? limited,
    TResult? Function(VotingAll value)? all,
  }) {
    return limited?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(VotingDisabled value)? disabled,
    TResult Function(VotingUnique value)? unique,
    TResult Function(VotingLimited value)? limited,
    TResult Function(VotingAll value)? all,
    required TResult orElse(),
  }) {
    if (limited != null) {
      return limited(this);
    }
    return orElse();
  }
}

abstract class VotingLimited implements PollVotingMode {
  const factory VotingLimited({required final int count}) = _$VotingLimitedImpl;

  int get count;

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

/// @nodoc
abstract class _$$VotingAllImplCopyWith<$Res> {
  factory _$$VotingAllImplCopyWith(
          _$VotingAllImpl value, $Res Function(_$VotingAllImpl) then) =
      __$$VotingAllImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$VotingAllImplCopyWithImpl<$Res>
    extends _$PollVotingModeCopyWithImpl<$Res, _$VotingAllImpl>
    implements _$$VotingAllImplCopyWith<$Res> {
  __$$VotingAllImplCopyWithImpl(
      _$VotingAllImpl _value, $Res Function(_$VotingAllImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$VotingAllImpl implements VotingAll {
  const _$VotingAllImpl();

  @override
  String toString() {
    return 'PollVotingMode.all()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() disabled,
    required TResult Function() unique,
    required TResult Function(int count) limited,
    required TResult Function() all,
  }) {
    return all();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? disabled,
    TResult? Function()? unique,
    TResult? Function(int count)? limited,
    TResult? Function()? all,
  }) {
    return all?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? disabled,
    TResult Function()? unique,
    TResult Function(int count)? limited,
    TResult Function()? all,
    required TResult orElse(),
  }) {
    if (all != null) {
      return all();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(VotingDisabled value) disabled,
    required TResult Function(VotingUnique value) unique,
    required TResult Function(VotingLimited value) limited,
    required TResult Function(VotingAll value) all,
  }) {
    return all(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(VotingDisabled value)? disabled,
    TResult? Function(VotingUnique value)? unique,
    TResult? Function(VotingLimited value)? limited,
    TResult? Function(VotingAll value)? all,
  }) {
    return all?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(VotingDisabled value)? disabled,
    TResult Function(VotingUnique value)? unique,
    TResult Function(VotingLimited value)? limited,
    TResult Function(VotingAll value)? all,
    required TResult orElse(),
  }) {
    if (all != null) {
      return all(this);
    }
    return orElse();
  }
}

abstract class VotingAll implements PollVotingMode {
  const factory VotingAll() = _$VotingAllImpl;
}
