// // AUTO-GENERATED FILE, DO NOT MODIFY! // // ignore_for_file: unused_element import 'package:copy_with_extension/copy_with_extension.dart'; import 'package:json_annotation/json_annotation.dart'; part 'benchmark_create.g.dart'; @CopyWith() @JsonSerializable( checked: true, createToJson: true, disallowUnrecognizedKeys: false, explicitToJson: true, ) class BenchmarkCreate { /// Returns a new [BenchmarkCreate] instance. BenchmarkCreate({ required this.code, this.currency = 'RUB', this.instrumentId, this.isActive = true, this.isDefault = false, required this.kind, required this.name, this.source_ = 'moex', }); @JsonKey( name: r'code', required: true, includeIfNull: false, ) final String code; @JsonKey( defaultValue: 'RUB', name: r'currency', required: false, includeIfNull: false, ) final String? currency; @JsonKey( name: r'instrument_id', required: false, includeIfNull: false, ) final int? instrumentId; @JsonKey( defaultValue: true, name: r'is_active', required: false, includeIfNull: false, ) final bool? isActive; @JsonKey( defaultValue: false, name: r'is_default', required: false, includeIfNull: false, ) final bool? isDefault; @JsonKey( name: r'kind', required: true, includeIfNull: false, ) final String kind; @JsonKey( name: r'name', required: true, includeIfNull: false, ) final String name; @JsonKey( defaultValue: 'moex', name: r'source', required: false, includeIfNull: false, ) final String? source_; @override bool operator ==(Object other) => identical(this, other) || other is BenchmarkCreate && other.code == code && other.currency == currency && other.instrumentId == instrumentId && other.isActive == isActive && other.isDefault == isDefault && other.kind == kind && other.name == name && other.source_ == source_; @override int get hashCode => code.hashCode + currency.hashCode + (instrumentId == null ? 0 : instrumentId.hashCode) + isActive.hashCode + isDefault.hashCode + kind.hashCode + name.hashCode + source_.hashCode; factory BenchmarkCreate.fromJson(Map json) => _$BenchmarkCreateFromJson(json); Map toJson() => _$BenchmarkCreateToJson(this); @override String toString() { return toJson().toString(); } }