2019-12-08 07:21:14 +01:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
2019-12-12 07:02:48 +01:00
|
|
|
part of 'github.dart';
|
2019-12-08 07:21:14 +01:00
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
GithubEvent _$GithubEventFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEvent()
|
|
|
|
..actor = json['actor'] == null
|
|
|
|
? null
|
2019-12-20 13:52:49 +01:00
|
|
|
: GithubEventUser.fromJson(json['actor'] as Map<String, dynamic>)
|
2019-12-08 07:21:14 +01:00
|
|
|
..type = json['type'] as String
|
|
|
|
..repo = json['repo'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventRepo.fromJson(json['repo'] as Map<String, dynamic>)
|
2019-12-20 13:52:49 +01:00
|
|
|
..createdAt = json['created_at'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['created_at'] as String)
|
|
|
|
..payload = json['payload'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventPayload.fromJson(json['payload'] as Map<String, dynamic>);
|
2019-12-08 07:21:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GithubEventToJson(GithubEvent instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'actor': instance.actor,
|
|
|
|
'type': instance.type,
|
|
|
|
'repo': instance.repo,
|
2019-12-20 13:52:49 +01:00
|
|
|
'created_at': instance.createdAt?.toIso8601String(),
|
2019-12-08 07:21:14 +01:00
|
|
|
'payload': instance.payload,
|
|
|
|
};
|
|
|
|
|
2019-12-20 13:52:49 +01:00
|
|
|
GithubEventUser _$GithubEventUserFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEventUser()
|
2019-12-08 07:21:14 +01:00
|
|
|
..login = json['login'] as String
|
|
|
|
..avatarUrl = json['avatar_url'] as String;
|
|
|
|
}
|
|
|
|
|
2019-12-20 13:52:49 +01:00
|
|
|
Map<String, dynamic> _$GithubEventUserToJson(GithubEventUser instance) =>
|
2019-12-08 07:21:14 +01:00
|
|
|
<String, dynamic>{
|
|
|
|
'login': instance.login,
|
|
|
|
'avatar_url': instance.avatarUrl,
|
|
|
|
};
|
|
|
|
|
|
|
|
GithubEventRepo _$GithubEventRepoFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEventRepo()..name = json['name'] as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GithubEventRepoToJson(GithubEventRepo instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'name': instance.name,
|
|
|
|
};
|
2019-12-12 07:02:48 +01:00
|
|
|
|
2019-12-20 13:52:49 +01:00
|
|
|
GithubEventPayload _$GithubEventPayloadFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEventPayload()
|
|
|
|
..issue = json['issue'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventIssue.fromJson(json['issue'] as Map<String, dynamic>)
|
|
|
|
..pullRequest = json['pull_request'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventIssue.fromJson(
|
|
|
|
json['pull_request'] as Map<String, dynamic>)
|
|
|
|
..comment = json['comment'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventComment.fromJson(json['comment'] as Map<String, dynamic>)
|
|
|
|
..action = json['action'] as String
|
|
|
|
..ref = json['ref'] as String
|
|
|
|
..before = json['before'] as String
|
2019-12-20 15:41:38 +01:00
|
|
|
..head = json['head'] as String
|
2019-12-20 13:52:49 +01:00
|
|
|
..commits = (json['commits'] as List)
|
|
|
|
?.map((e) => e == null
|
|
|
|
? null
|
|
|
|
: GithubEventCommit.fromJson(e as Map<String, dynamic>))
|
|
|
|
?.toList()
|
|
|
|
..forkee = json['forkee'] as Map<String, dynamic>;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GithubEventPayloadToJson(GithubEventPayload instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'issue': instance.issue,
|
|
|
|
'pull_request': instance.pullRequest,
|
|
|
|
'comment': instance.comment,
|
|
|
|
'action': instance.action,
|
|
|
|
'ref': instance.ref,
|
|
|
|
'before': instance.before,
|
2019-12-20 15:41:38 +01:00
|
|
|
'head': instance.head,
|
2019-12-20 13:52:49 +01:00
|
|
|
'commits': instance.commits,
|
|
|
|
'forkee': instance.forkee,
|
|
|
|
};
|
|
|
|
|
|
|
|
GithubEventIssue _$GithubEventIssueFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEventIssue()
|
|
|
|
..title = json['title'] as String
|
|
|
|
..user = json['user'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventUser.fromJson(json['user'] as Map<String, dynamic>)
|
|
|
|
..number = json['number'] as int
|
|
|
|
..body = json['body'] as String
|
2019-12-20 15:41:38 +01:00
|
|
|
..pullRequest = json['pull_request']
|
|
|
|
..state = json['state'] as String
|
|
|
|
..comments = json['comments'] as int
|
|
|
|
..merged = json['merged'] as bool;
|
2019-12-20 13:52:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GithubEventIssueToJson(GithubEventIssue instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'title': instance.title,
|
|
|
|
'user': instance.user,
|
|
|
|
'number': instance.number,
|
|
|
|
'body': instance.body,
|
|
|
|
'pull_request': instance.pullRequest,
|
2019-12-20 15:41:38 +01:00
|
|
|
'state': instance.state,
|
|
|
|
'comments': instance.comments,
|
|
|
|
'merged': instance.merged,
|
2019-12-20 13:52:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
GithubEventComment _$GithubEventCommentFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEventComment()
|
|
|
|
..body = json['body'] as String
|
|
|
|
..user = json['user'] == null
|
|
|
|
? null
|
|
|
|
: GithubEventUser.fromJson(json['user'] as Map<String, dynamic>);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GithubEventCommentToJson(GithubEventComment instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'body': instance.body,
|
|
|
|
'user': instance.user,
|
|
|
|
};
|
|
|
|
|
|
|
|
GithubEventCommit _$GithubEventCommitFromJson(Map<String, dynamic> json) {
|
|
|
|
return GithubEventCommit()
|
|
|
|
..sha = json['sha'] as String
|
|
|
|
..message = json['message'] as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GithubEventCommitToJson(GithubEventCommit instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'sha': instance.sha,
|
|
|
|
'message': instance.message,
|
|
|
|
};
|
|
|
|
|
2019-12-12 07:02:48 +01:00
|
|
|
GithubTrendingItem _$GithubTrendingItemFromJson(Map<String, dynamic> 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<String, dynamic> _$GithubTrendingItemToJson(GithubTrendingItem instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'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,
|
|
|
|
};
|