// // AUTO-GENERATED FILE, DO NOT MODIFY! // // @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars part of openapi.api; class SubscriptionPlanDTO { /// Returns a new [SubscriptionPlanDTO] instance. SubscriptionPlanDTO({ this.id, required this.name, this.storageQuotaBytes, this.aiRequestsPerMonth, this.statsHistoryDays, this.hasAdvancedStats, }); String? id; String name; int? storageQuotaBytes; int? aiRequestsPerMonth; int? statsHistoryDays; bool? hasAdvancedStats; @override bool operator ==(Object other) => identical(this, other) || other is SubscriptionPlanDTO && other.id == id && other.name == name && other.storageQuotaBytes == storageQuotaBytes && other.aiRequestsPerMonth == aiRequestsPerMonth && other.statsHistoryDays == statsHistoryDays && other.hasAdvancedStats == hasAdvancedStats; @override int get hashCode => (id == null ? 0 : id!.hashCode) + (name.hashCode) + (storageQuotaBytes == null ? 0 : storageQuotaBytes!.hashCode) + (aiRequestsPerMonth == null ? 0 : aiRequestsPerMonth!.hashCode) + (statsHistoryDays == null ? 0 : statsHistoryDays!.hashCode) + (hasAdvancedStats == null ? 0 : hasAdvancedStats!.hashCode); @override String toString() => 'SubscriptionPlanDTO[id=$id, name=$name, storageQuotaBytes=$storageQuotaBytes, aiRequestsPerMonth=$aiRequestsPerMonth, statsHistoryDays=$statsHistoryDays, hasAdvancedStats=$hasAdvancedStats]'; Map toJson() { final json = {}; if (this.id != null) { json[r'id'] = this.id; } else { json[r'id'] = null; } json[r'name'] = this.name; if (this.storageQuotaBytes != null) { json[r'storageQuotaBytes'] = this.storageQuotaBytes; } else { json[r'storageQuotaBytes'] = null; } if (this.aiRequestsPerMonth != null) { json[r'aiRequestsPerMonth'] = this.aiRequestsPerMonth; } else { json[r'aiRequestsPerMonth'] = null; } if (this.statsHistoryDays != null) { json[r'statsHistoryDays'] = this.statsHistoryDays; } else { json[r'statsHistoryDays'] = null; } if (this.hasAdvancedStats != null) { json[r'hasAdvancedStats'] = this.hasAdvancedStats; } else { json[r'hasAdvancedStats'] = null; } return json; } // ignore: prefer_constructors_over_static_methods static SubscriptionPlanDTO? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); return SubscriptionPlanDTO( id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name') ?? '', storageQuotaBytes: mapValueOfType(json, r'storageQuotaBytes'), aiRequestsPerMonth: mapValueOfType(json, r'aiRequestsPerMonth'), statsHistoryDays: mapValueOfType(json, r'statsHistoryDays'), hasAdvancedStats: mapValueOfType(json, r'hasAdvancedStats'), ); } return null; } static List listFromJson( dynamic json, { bool growable = false, }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { final value = SubscriptionPlanDTO.fromJson(row); if (value != null) { result.add(value); } } } return result.toList(growable: growable); } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); for (final entry in json.entries) { final value = SubscriptionPlanDTO.fromJson(entry.value); if (value != null) { map[entry.key] = value; } } } return map; } static Map> mapListFromJson( dynamic json, { bool growable = false, }) { final map = >{}; if (json is Map && json.isNotEmpty) { json = json.cast(); for (final entry in json.entries) { map[entry.key] = SubscriptionPlanDTO.listFromJson( entry.value, growable: growable, ); } } return map; } static const requiredKeys = {'name'}; }