Line data Source code
1 : // GENERATED CODE - DO NOT MODIFY BY HAND
2 : // 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
3 :
4 : part of 'language.dart';
5 :
6 : // **************************************************************************
7 : // FreezedGenerator
8 : // **************************************************************************
9 :
10 0 : T _$identity<T>(T value) => value;
11 :
12 0 : final _privateConstructorUsedError = UnsupportedError(
13 : '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 informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
14 :
15 7 : Language _$LanguageFromJson(Map<String, dynamic> json) {
16 7 : return _Language.fromJson(json);
17 : }
18 :
19 : /// @nodoc
20 : class _$LanguageTearOff {
21 7 : const _$LanguageTearOff();
22 :
23 0 : _Language call({required String id, required String name}) {
24 0 : return _Language(
25 : id: id,
26 : name: name,
27 : );
28 : }
29 :
30 0 : Language fromJson(Map<String, Object> json) {
31 0 : return Language.fromJson(json);
32 : }
33 : }
34 :
35 : /// @nodoc
36 : const $Language = _$LanguageTearOff();
37 :
38 : /// @nodoc
39 : mixin _$Language {
40 0 : String get id => throw _privateConstructorUsedError;
41 0 : String get name => throw _privateConstructorUsedError;
42 :
43 0 : Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
44 0 : @JsonKey(ignore: true)
45 : $LanguageCopyWith<Language> get copyWith =>
46 0 : throw _privateConstructorUsedError;
47 : }
48 :
49 : /// @nodoc
50 : abstract class $LanguageCopyWith<$Res> {
51 : factory $LanguageCopyWith(Language value, $Res Function(Language) then) =
52 : _$LanguageCopyWithImpl<$Res>;
53 : $Res call({String id, String name});
54 : }
55 :
56 : /// @nodoc
57 : class _$LanguageCopyWithImpl<$Res> implements $LanguageCopyWith<$Res> {
58 0 : _$LanguageCopyWithImpl(this._value, this._then);
59 :
60 : final Language _value;
61 : // ignore: unused_field
62 : final $Res Function(Language) _then;
63 :
64 0 : @override
65 : $Res call({
66 : Object? id = freezed,
67 : Object? name = freezed,
68 : }) {
69 0 : return _then(_value.copyWith(
70 0 : id: id == freezed
71 0 : ? _value.id
72 : : id // ignore: cast_nullable_to_non_nullable
73 : as String,
74 0 : name: name == freezed
75 0 : ? _value.name
76 : : name // ignore: cast_nullable_to_non_nullable
77 : as String,
78 : ));
79 : }
80 : }
81 :
82 : /// @nodoc
83 : abstract class _$LanguageCopyWith<$Res> implements $LanguageCopyWith<$Res> {
84 : factory _$LanguageCopyWith(_Language value, $Res Function(_Language) then) =
85 : __$LanguageCopyWithImpl<$Res>;
86 : @override
87 : $Res call({String id, String name});
88 : }
89 :
90 : /// @nodoc
91 : class __$LanguageCopyWithImpl<$Res> extends _$LanguageCopyWithImpl<$Res>
92 : implements _$LanguageCopyWith<$Res> {
93 0 : __$LanguageCopyWithImpl(_Language _value, $Res Function(_Language) _then)
94 0 : : super(_value, (v) => _then(v as _Language));
95 :
96 0 : @override
97 0 : _Language get _value => super._value as _Language;
98 :
99 0 : @override
100 : $Res call({
101 : Object? id = freezed,
102 : Object? name = freezed,
103 : }) {
104 0 : return _then(_Language(
105 0 : id: id == freezed
106 0 : ? _value.id
107 : : id // ignore: cast_nullable_to_non_nullable
108 : as String,
109 0 : name: name == freezed
110 0 : ? _value.name
111 : : name // ignore: cast_nullable_to_non_nullable
112 : as String,
113 : ));
114 : }
115 : }
116 :
117 : /// @nodoc
118 : @JsonSerializable()
119 : class _$_Language implements _Language {
120 7 : _$_Language({required this.id, required this.name});
121 :
122 7 : factory _$_Language.fromJson(Map<String, dynamic> json) =>
123 7 : _$_$_LanguageFromJson(json);
124 :
125 : @override
126 : final String id;
127 : @override
128 : final String name;
129 :
130 0 : @override
131 : String toString() {
132 0 : return 'Language(id: $id, name: $name)';
133 : }
134 :
135 0 : @override
136 : bool operator ==(dynamic other) {
137 : return identical(this, other) ||
138 0 : (other is _Language &&
139 0 : (identical(other.id, id) ||
140 0 : const DeepCollectionEquality().equals(other.id, id)) &&
141 0 : (identical(other.name, name) ||
142 0 : const DeepCollectionEquality().equals(other.name, name)));
143 : }
144 :
145 0 : @override
146 : int get hashCode =>
147 0 : runtimeType.hashCode ^
148 0 : const DeepCollectionEquality().hash(id) ^
149 0 : const DeepCollectionEquality().hash(name);
150 :
151 0 : @JsonKey(ignore: true)
152 : @override
153 : _$LanguageCopyWith<_Language> get copyWith =>
154 0 : __$LanguageCopyWithImpl<_Language>(this, _$identity);
155 :
156 0 : @override
157 : Map<String, dynamic> toJson() {
158 0 : return _$_$_LanguageToJson(this);
159 : }
160 : }
161 :
162 : abstract class _Language implements Language {
163 : factory _Language({required String id, required String name}) = _$_Language;
164 :
165 : factory _Language.fromJson(Map<String, dynamic> json) = _$_Language.fromJson;
166 :
167 0 : @override
168 0 : String get id => throw _privateConstructorUsedError;
169 0 : @override
170 0 : String get name => throw _privateConstructorUsedError;
171 0 : @override
172 : @JsonKey(ignore: true)
173 : _$LanguageCopyWith<_Language> get copyWith =>
174 0 : throw _privateConstructorUsedError;
175 : }
|