2019-12-04 15:02:22 +01:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'gitea.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
GiteaUser _$GiteaUserFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaUser()
|
|
|
|
..id = json['id'] as int
|
|
|
|
..login = json['login'] as String
|
|
|
|
..fullName = json['full_name'] as String
|
2020-01-29 11:00:48 +01:00
|
|
|
..avatarUrl = json['avatar_url'] as String
|
|
|
|
..created = json['created'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['created'] as String);
|
2019-12-04 15:02:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaUserToJson(GiteaUser instance) => <String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'login': instance.login,
|
|
|
|
'full_name': instance.fullName,
|
|
|
|
'avatar_url': instance.avatarUrl,
|
2020-01-29 11:00:48 +01:00
|
|
|
'created': instance.created?.toIso8601String(),
|
2019-12-04 15:02:22 +01:00
|
|
|
};
|
|
|
|
|
2020-02-01 11:51:33 +01:00
|
|
|
GiteaOrg _$GiteaOrgFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaOrg()
|
|
|
|
..id = json['id'] as int
|
|
|
|
..username = json['username'] as String
|
|
|
|
..fullName = json['full_name'] as String
|
|
|
|
..avatarUrl = json['avatar_url'] as String
|
|
|
|
..description = json['description'] as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaOrgToJson(GiteaOrg instance) => <String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'username': instance.username,
|
|
|
|
'full_name': instance.fullName,
|
|
|
|
'avatar_url': instance.avatarUrl,
|
|
|
|
'description': instance.description,
|
|
|
|
};
|
|
|
|
|
2019-12-04 15:02:22 +01:00
|
|
|
GiteaRepository _$GiteaRepositoryFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaRepository()
|
|
|
|
..id = json['id'] as int
|
|
|
|
..owner = json['owner'] == null
|
|
|
|
? null
|
|
|
|
: GiteaUser.fromJson(json['owner'] as Map<String, dynamic>)
|
|
|
|
..name = json['name'] as String
|
|
|
|
..description = json['description'] as String
|
2020-01-29 11:00:48 +01:00
|
|
|
..starsCount = json['stars_count'] as int
|
|
|
|
..forksCount = json['forks_count'] as int
|
|
|
|
..updatedAt = json['updated_at'] == null
|
|
|
|
? null
|
2020-01-29 11:50:17 +01:00
|
|
|
: DateTime.parse(json['updated_at'] as String)
|
|
|
|
..website = json['website'] as String
|
|
|
|
..size = json['size'] as int
|
|
|
|
..openIssuesCount = json['open_issues_count'] as int
|
|
|
|
..openPrCounter = json['open_pr_counter'] as int;
|
2019-12-04 15:02:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaRepositoryToJson(GiteaRepository instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'owner': instance.owner,
|
|
|
|
'name': instance.name,
|
|
|
|
'description': instance.description,
|
2020-01-29 11:00:48 +01:00
|
|
|
'stars_count': instance.starsCount,
|
|
|
|
'forks_count': instance.forksCount,
|
|
|
|
'updated_at': instance.updatedAt?.toIso8601String(),
|
2020-01-29 11:50:17 +01:00
|
|
|
'website': instance.website,
|
|
|
|
'size': instance.size,
|
|
|
|
'open_issues_count': instance.openIssuesCount,
|
|
|
|
'open_pr_counter': instance.openPrCounter,
|
2019-12-04 15:02:22 +01:00
|
|
|
};
|
2020-01-30 08:04:29 +01:00
|
|
|
|
|
|
|
GiteaTree _$GiteaTreeFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaTree()
|
|
|
|
..type = json['type'] as String
|
|
|
|
..name = json['name'] as String
|
2020-01-30 08:31:46 +01:00
|
|
|
..path = json['path'] as String
|
2020-01-31 09:40:20 +01:00
|
|
|
..size = json['size'] as int
|
|
|
|
..downloadUrl = json['download_url'] as String;
|
2020-01-30 08:04:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaTreeToJson(GiteaTree instance) => <String, dynamic>{
|
|
|
|
'type': instance.type,
|
|
|
|
'name': instance.name,
|
|
|
|
'path': instance.path,
|
2020-01-30 08:31:46 +01:00
|
|
|
'size': instance.size,
|
2020-01-31 09:40:20 +01:00
|
|
|
'download_url': instance.downloadUrl,
|
2020-01-30 08:04:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
GiteaBlob _$GiteaBlobFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaBlob()
|
|
|
|
..type = json['type'] as String
|
|
|
|
..name = json['name'] as String
|
|
|
|
..path = json['path'] as String
|
2020-01-30 08:31:46 +01:00
|
|
|
..size = json['size'] as int
|
2020-01-31 09:40:20 +01:00
|
|
|
..downloadUrl = json['download_url'] as String
|
2020-01-30 08:04:29 +01:00
|
|
|
..content = json['content'] as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaBlobToJson(GiteaBlob instance) => <String, dynamic>{
|
|
|
|
'type': instance.type,
|
|
|
|
'name': instance.name,
|
|
|
|
'path': instance.path,
|
2020-01-30 08:31:46 +01:00
|
|
|
'size': instance.size,
|
2020-01-31 09:40:20 +01:00
|
|
|
'download_url': instance.downloadUrl,
|
2020-01-30 08:04:29 +01:00
|
|
|
'content': instance.content,
|
|
|
|
};
|
2020-02-01 08:21:42 +01:00
|
|
|
|
|
|
|
GiteaCommit _$GiteaCommitFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaCommit()
|
|
|
|
..number = json['number'] as int
|
|
|
|
..author = json['author'] == null
|
|
|
|
? null
|
|
|
|
: GiteaUser.fromJson(json['author'] as Map<String, dynamic>)
|
|
|
|
..title = json['title'] as String
|
|
|
|
..body = json['body'] as String
|
|
|
|
..commit = json['commit'] == null
|
|
|
|
? null
|
|
|
|
: GiteaCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
|
|
|
..sha = json['sha'] as String
|
|
|
|
..htmlUrl = json['html_url'] as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaCommitToJson(GiteaCommit instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'number': instance.number,
|
|
|
|
'author': instance.author,
|
|
|
|
'title': instance.title,
|
|
|
|
'body': instance.body,
|
|
|
|
'commit': instance.commit,
|
|
|
|
'sha': instance.sha,
|
|
|
|
'html_url': instance.htmlUrl,
|
|
|
|
};
|
|
|
|
|
|
|
|
GiteaCommitDetail _$GiteaCommitDetailFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaCommitDetail()
|
|
|
|
..message = json['message'] as String
|
|
|
|
..author = json['author'] == null
|
|
|
|
? null
|
|
|
|
: GiteaCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
|
|
|
..committer = json['committer'] == null
|
|
|
|
? null
|
|
|
|
: GiteaCommitAuthor.fromJson(json['committer'] as Map<String, dynamic>);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaCommitDetailToJson(GiteaCommitDetail instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'message': instance.message,
|
|
|
|
'author': instance.author,
|
|
|
|
'committer': instance.committer,
|
|
|
|
};
|
|
|
|
|
|
|
|
GiteaCommitAuthor _$GiteaCommitAuthorFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaCommitAuthor()
|
|
|
|
..name = json['name'] as String
|
|
|
|
..email = json['email'] as String
|
|
|
|
..date =
|
|
|
|
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaCommitAuthorToJson(GiteaCommitAuthor instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'name': instance.name,
|
|
|
|
'email': instance.email,
|
|
|
|
'date': instance.date?.toIso8601String(),
|
|
|
|
};
|
2020-02-01 08:42:10 +01:00
|
|
|
|
|
|
|
GiteaIssue _$GiteaIssueFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaIssue()
|
|
|
|
..title = json['title'] as String
|
|
|
|
..body = json['body'] as String
|
|
|
|
..number = json['number'] as int
|
|
|
|
..user = json['user'] == null
|
|
|
|
? null
|
|
|
|
: GiteaUser.fromJson(json['user'] as Map<String, dynamic>)
|
|
|
|
..comments = json['comments'] as int
|
|
|
|
..updatedAt = json['updated_at'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['updated_at'] as String)
|
|
|
|
..htmlUrl = json['html_url'] as String;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaIssueToJson(GiteaIssue instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'title': instance.title,
|
|
|
|
'body': instance.body,
|
|
|
|
'number': instance.number,
|
|
|
|
'user': instance.user,
|
|
|
|
'comments': instance.comments,
|
|
|
|
'updated_at': instance.updatedAt?.toIso8601String(),
|
|
|
|
'html_url': instance.htmlUrl,
|
|
|
|
};
|
2020-10-05 10:07:07 +02:00
|
|
|
|
|
|
|
GiteaHeatmapItem _$GiteaHeatmapItemFromJson(Map<String, dynamic> json) {
|
|
|
|
return GiteaHeatmapItem()
|
|
|
|
..timestamp = json['timestamp'] as int
|
|
|
|
..contributions = json['contributions'] as int;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GiteaHeatmapItemToJson(GiteaHeatmapItem instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'timestamp': instance.timestamp,
|
|
|
|
'contributions': instance.contributions,
|
|
|
|
};
|