mnemo_cards/mnemo_cards_common/lib/src/dtos/voice_dto.g.dart

151 lines
4.8 KiB
Dart
Raw Normal View History

2025-12-11 00:38:08 +00:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'voice_dto.dart';
// **************************************************************************
// CopyWithGenerator
// **************************************************************************
abstract class _$VoiceDtoCWProxy {
2025-12-13 20:55:50 +00:00
VoiceDto id(String id);
2025-12-11 00:38:08 +00:00
VoiceDto phrase(String phrase);
VoiceDto path(String path);
VoiceDto speaker(String speaker);
VoiceDto url(String? url);
2025-12-19 00:56:58 +00:00
VoiceDto voiceUrl(String? voiceUrl);
VoiceDto presignedUrl(String? presignedUrl);
2025-12-13 20:55:50 +00:00
/// Creates a new instance with the provided field values.
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `VoiceDto(...).copyWith.fieldName(value)`.
2025-12-11 00:38:08 +00:00
///
2025-12-13 20:55:50 +00:00
/// Example:
2025-12-11 00:38:08 +00:00
/// ```dart
/// VoiceDto(...).copyWith(id: 12, name: "My name")
2025-12-13 20:55:50 +00:00
/// ```
2025-12-11 00:38:08 +00:00
VoiceDto call({
2025-12-13 20:55:50 +00:00
String id,
String phrase,
String path,
String speaker,
2025-12-11 00:38:08 +00:00
String? url,
2025-12-19 00:56:58 +00:00
String? voiceUrl,
String? presignedUrl,
2025-12-11 00:38:08 +00:00
});
}
2025-12-13 20:55:50 +00:00
/// Callable proxy for `copyWith` functionality.
/// Use as `instanceOfVoiceDto.copyWith(...)` or call `instanceOfVoiceDto.copyWith.fieldName(value)` for a single field.
2025-12-11 00:38:08 +00:00
class _$VoiceDtoCWProxyImpl implements _$VoiceDtoCWProxy {
const _$VoiceDtoCWProxyImpl(this._value);
final VoiceDto _value;
@override
2025-12-13 20:55:50 +00:00
VoiceDto id(String id) => call(id: id);
2025-12-11 00:38:08 +00:00
@override
2025-12-13 20:55:50 +00:00
VoiceDto phrase(String phrase) => call(phrase: phrase);
2025-12-11 00:38:08 +00:00
@override
2025-12-13 20:55:50 +00:00
VoiceDto path(String path) => call(path: path);
2025-12-11 00:38:08 +00:00
@override
2025-12-13 20:55:50 +00:00
VoiceDto speaker(String speaker) => call(speaker: speaker);
2025-12-11 00:38:08 +00:00
@override
2025-12-13 20:55:50 +00:00
VoiceDto url(String? url) => call(url: url);
2025-12-11 00:38:08 +00:00
2025-12-19 00:56:58 +00:00
@override
VoiceDto voiceUrl(String? voiceUrl) => call(voiceUrl: voiceUrl);
@override
VoiceDto presignedUrl(String? presignedUrl) =>
call(presignedUrl: presignedUrl);
2025-12-11 00:38:08 +00:00
@override
2025-12-13 20:55:50 +00:00
/// Creates a new instance with the provided field values.
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `VoiceDto(...).copyWith.fieldName(value)`.
///
/// Example:
/// ```dart
/// VoiceDto(...).copyWith(id: 12, name: "My name")
/// ```
2025-12-11 00:38:08 +00:00
VoiceDto call({
Object? id = const $CopyWithPlaceholder(),
Object? phrase = const $CopyWithPlaceholder(),
Object? path = const $CopyWithPlaceholder(),
Object? speaker = const $CopyWithPlaceholder(),
Object? url = const $CopyWithPlaceholder(),
2025-12-19 00:56:58 +00:00
Object? voiceUrl = const $CopyWithPlaceholder(),
Object? presignedUrl = const $CopyWithPlaceholder(),
2025-12-11 00:38:08 +00:00
}) {
return VoiceDto(
id: id == const $CopyWithPlaceholder() || id == null
? _value.id
// ignore: cast_nullable_to_non_nullable
2025-12-13 20:55:50 +00:00
: id as String,
2025-12-11 00:38:08 +00:00
phrase: phrase == const $CopyWithPlaceholder() || phrase == null
? _value.phrase
// ignore: cast_nullable_to_non_nullable
: phrase as String,
path: path == const $CopyWithPlaceholder() || path == null
? _value.path
// ignore: cast_nullable_to_non_nullable
: path as String,
speaker: speaker == const $CopyWithPlaceholder() || speaker == null
? _value.speaker
// ignore: cast_nullable_to_non_nullable
: speaker as String,
url: url == const $CopyWithPlaceholder()
? _value.url
// ignore: cast_nullable_to_non_nullable
: url as String?,
2025-12-19 00:56:58 +00:00
voiceUrl: voiceUrl == const $CopyWithPlaceholder()
? _value.voiceUrl
// ignore: cast_nullable_to_non_nullable
: voiceUrl as String?,
presignedUrl: presignedUrl == const $CopyWithPlaceholder()
? _value.presignedUrl
// ignore: cast_nullable_to_non_nullable
: presignedUrl as String?,
2025-12-11 00:38:08 +00:00
);
}
}
extension $VoiceDtoCopyWith on VoiceDto {
2025-12-13 20:55:50 +00:00
/// Returns a callable class used to build a new instance with modified fields.
/// Example: `instanceOfVoiceDto.copyWith(...)` or `instanceOfVoiceDto.copyWith.fieldName(...)`.
2025-12-11 00:38:08 +00:00
// ignore: library_private_types_in_public_api
_$VoiceDtoCWProxy get copyWith => _$VoiceDtoCWProxyImpl(this);
}
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
VoiceDto _$VoiceDtoFromJson(Map<String, dynamic> json) => VoiceDto(
2025-12-13 20:55:50 +00:00
id: json['id'] as String,
phrase: json['phrase'] as String,
path: json['path'] as String,
speaker: json['speaker'] as String,
url: json['url'] as String?,
2025-12-19 00:56:58 +00:00
voiceUrl: json['voice_url'] as String?,
presignedUrl: json['presigned_url'] as String?,
2025-12-13 20:55:50 +00:00
);
2025-12-11 00:38:08 +00:00
Map<String, dynamic> _$VoiceDtoToJson(VoiceDto instance) => <String, dynamic>{
2025-12-13 20:55:50 +00:00
'id': instance.id,
'phrase': instance.phrase,
'path': instance.path,
'speaker': instance.speaker,
'url': instance.url,
2025-12-19 00:56:58 +00:00
'voice_url': instance.voiceUrl,
'presigned_url': instance.presignedUrl,
2025-12-13 20:55:50 +00:00
};