// // AUTO-GENERATED FILE, DO NOT MODIFY! // // @dart=2.0 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first // ignore_for_file: lines_longer_than_80_chars part of openapi.api; class OddNice { /// Returns a new [OddNice] instance. OddNice({ this.teams, this.commenceTime, this.homeTeam, this.odds, }); List teams; int commenceTime; String homeTeam; OneOfOddObject odds; @override bool operator ==(Object other) => identical(this, other) || other is OddNice && other.teams == teams && other.commenceTime == commenceTime && other.homeTeam == homeTeam && other.odds == odds; @override int get hashCode => (teams == null ? 0 : teams.hashCode) + (commenceTime == null ? 0 : commenceTime.hashCode) + (homeTeam == null ? 0 : homeTeam.hashCode) + (odds == null ? 0 : odds.hashCode); @override String toString() => 'OddNice[teams=$teams, commenceTime=$commenceTime, homeTeam=$homeTeam, odds=$odds]'; Map toJson() { final json = {}; if (teams != null) { json[r'teams'] = teams; } if (commenceTime != null) { json[r'commence_time'] = commenceTime; } if (homeTeam != null) { json[r'home_team'] = homeTeam; } if (odds != null) { json[r'odds'] = odds; } return json; } /// Returns a new [OddNice] instance and imports its values from /// [json] if it's non-null, null if [json] is null. static OddNice fromJson(Map json) => json == null ? null : OddNice( teams: json[r'teams'] == null ? null : (json[r'teams'] as List).cast(), commenceTime: json[r'commence_time'], homeTeam: json[r'home_team'], odds: OneOfOddObject.fromJson(json[r'odds']), ); static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty ? true == emptyIsNull ? null : [] : json.map((v) => OddNice.fromJson(v)).toList(growable: true == growable); static Map mapFromJson(Map json) { final map = {}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) => map[key] = OddNice.fromJson(v)); } return map; } // maps a json object with a list of OddNice-objects as value to a dart map static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { final map = >{}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) { map[key] = OddNice.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; } }