Files
fin-tracker/app/packages/api_client/lib/src/model/rule_patch.dart
T
Dmitry 90ba198c2a chore(app): сгенерированный Dart-клиент из OpenAPI
openapi-generator-cli -g dart-dio. Генерируется, но коммитится: CI ловит дрейф
openapi/openapi.json, а приложение собирается без запуска генератора.
Пересобирается через just gen-client после любого изменения роутов.
2026-09-18 13:44:09 +03:00

159 lines
2.5 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// ignore_for_file: unused_element
import 'package:fintracker_api/src/model/rule_match_type.dart';
import 'package:fintracker_api/src/model/rule_kind.dart';
import 'package:copy_with_extension/copy_with_extension.dart';
import 'package:json_annotation/json_annotation.dart';
part 'rule_patch.g.dart';
@CopyWith()
@JsonSerializable(
checked: true,
createToJson: true,
disallowUnrecognizedKeys: false,
explicitToJson: true,
)
class RulePatch {
/// Returns a new [RulePatch] instance.
RulePatch({
this.enabled,
this.kind,
this.matchType,
this.note,
this.pattern,
this.priority,
this.value,
});
@JsonKey(
name: r'enabled',
required: false,
includeIfNull: false,
)
final bool? enabled;
@JsonKey(
name: r'kind',
required: false,
includeIfNull: false,
unknownEnumValue: RuleKind.unknownDefaultOpenApi,
)
final RuleKind? kind;
@JsonKey(
name: r'match_type',
required: false,
includeIfNull: false,
unknownEnumValue: RuleMatchType.unknownDefaultOpenApi,
)
final RuleMatchType? matchType;
@JsonKey(
name: r'note',
required: false,
includeIfNull: false,
)
final String? note;
@JsonKey(
name: r'pattern',
required: false,
includeIfNull: false,
)
final String? pattern;
@JsonKey(
name: r'priority',
required: false,
includeIfNull: false,
)
final int? priority;
@JsonKey(
name: r'value',
required: false,
includeIfNull: false,
)
final String? value;
@override
bool operator ==(Object other) => identical(this, other) || other is RulePatch &&
other.enabled == enabled &&
other.kind == kind &&
other.matchType == matchType &&
other.note == note &&
other.pattern == pattern &&
other.priority == priority &&
other.value == value;
@override
int get hashCode =>
(enabled == null ? 0 : enabled.hashCode) +
(kind == null ? 0 : kind.hashCode) +
(matchType == null ? 0 : matchType.hashCode) +
(note == null ? 0 : note.hashCode) +
(pattern == null ? 0 : pattern.hashCode) +
(priority == null ? 0 : priority.hashCode) +
(value == null ? 0 : value.hashCode);
factory RulePatch.fromJson(Map<String, dynamic> json) => _$RulePatchFromJson(json);
Map<String, dynamic> toJson() => _$RulePatchToJson(this);
@override
String toString() {
return toJson().toString();
}
}