// GENERATED CODE - DO NOT MODIFY BY HAND part of 'github.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** GithubEvent _$GithubEventFromJson(Map json) { return GithubEvent() ..actor = json['actor'] == null ? null : GithubEventUser.fromJson(json['actor'] as Map) ..type = json['type'] as String ..repo = json['repo'] == null ? null : GithubEventRepo.fromJson(json['repo'] as Map) ..createdAt = json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String) ..payload = json['payload'] == null ? null : GithubEventPayload.fromJson(json['payload'] as Map); } Map _$GithubEventToJson(GithubEvent instance) => { 'actor': instance.actor, 'type': instance.type, 'repo': instance.repo, 'created_at': instance.createdAt?.toIso8601String(), 'payload': instance.payload, }; GithubEventUser _$GithubEventUserFromJson(Map json) { return GithubEventUser() ..login = json['login'] as String ..avatarUrl = json['avatar_url'] as String; } Map _$GithubEventUserToJson(GithubEventUser instance) => { 'login': instance.login, 'avatar_url': instance.avatarUrl, }; GithubEventRepo _$GithubEventRepoFromJson(Map json) { return GithubEventRepo()..name = json['name'] as String; } Map _$GithubEventRepoToJson(GithubEventRepo instance) => { 'name': instance.name, }; GithubEventPayload _$GithubEventPayloadFromJson(Map json) { return GithubEventPayload() ..issue = json['issue'] == null ? null : GithubEventIssue.fromJson(json['issue'] as Map) ..pullRequest = json['pull_request'] == null ? null : GithubEventIssue.fromJson( json['pull_request'] as Map) ..comment = json['comment'] == null ? null : GithubEventComment.fromJson(json['comment'] as Map) ..action = json['action'] as String ..ref = json['ref'] as String ..before = json['before'] as String ..head = json['head'] as String ..commits = (json['commits'] as List) ?.map((e) => e == null ? null : GithubEventCommit.fromJson(e as Map)) ?.toList() ..forkee = json['forkee'] as Map; } Map _$GithubEventPayloadToJson(GithubEventPayload instance) => { 'issue': instance.issue, 'pull_request': instance.pullRequest, 'comment': instance.comment, 'action': instance.action, 'ref': instance.ref, 'before': instance.before, 'head': instance.head, 'commits': instance.commits, 'forkee': instance.forkee, }; GithubEventIssue _$GithubEventIssueFromJson(Map json) { return GithubEventIssue() ..title = json['title'] as String ..user = json['user'] == null ? null : GithubEventUser.fromJson(json['user'] as Map) ..number = json['number'] as int ..body = json['body'] as String ..pullRequest = json['pull_request'] ..state = json['state'] as String ..comments = json['comments'] as int ..merged = json['merged'] as bool; } Map _$GithubEventIssueToJson(GithubEventIssue instance) => { 'title': instance.title, 'user': instance.user, 'number': instance.number, 'body': instance.body, 'pull_request': instance.pullRequest, 'state': instance.state, 'comments': instance.comments, 'merged': instance.merged, }; GithubEventComment _$GithubEventCommentFromJson(Map json) { return GithubEventComment() ..body = json['body'] as String ..user = json['user'] == null ? null : GithubEventUser.fromJson(json['user'] as Map); } Map _$GithubEventCommentToJson(GithubEventComment instance) => { 'body': instance.body, 'user': instance.user, }; GithubEventCommit _$GithubEventCommitFromJson(Map json) { return GithubEventCommit() ..sha = json['sha'] as String ..message = json['message'] as String; } Map _$GithubEventCommitToJson(GithubEventCommit instance) => { 'sha': instance.sha, 'message': instance.message, }; GithubTrendingItem _$GithubTrendingItemFromJson(Map json) { return GithubTrendingItem() ..author = json['author'] as String ..name = json['name'] as String ..avatar = json['avatar'] as String ..description = json['description'] as String ..language = json['language'] as String ..languageColor = json['languageColor'] as String ..stars = json['stars'] as int ..forks = json['forks'] as int ..currentPeriodStars = json['currentPeriodStars'] as int; } Map _$GithubTrendingItemToJson(GithubTrendingItem instance) => { 'author': instance.author, 'name': instance.name, 'avatar': instance.avatar, 'description': instance.description, 'language': instance.language, 'languageColor': instance.languageColor, 'stars': instance.stars, 'forks': instance.forks, 'currentPeriodStars': instance.currentPeriodStars, };