git-touch-android-ios-app/lib/models/gogs.g.dart

228 lines
7.5 KiB
Dart
Raw Normal View History

2021-01-23 15:08:05 +01:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'gogs.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
GogsUser _$GogsUserFromJson(Map<String, dynamic> json) {
return GogsUser()
2021-05-16 09:16:35 +02:00
..id = json['id'] as int?
..username = json['username'] as String?
..fullName = json['full_name'] as String?
..avatarUrl = json['avatar_url'] as String?
..email = json['email'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsUserToJson(GogsUser instance) => <String, dynamic>{
'id': instance.id,
'username': instance.username,
'full_name': instance.fullName,
'avatar_url': instance.avatarUrl,
'email': instance.email,
};
GogsRepository _$GogsRepositoryFromJson(Map<String, dynamic> json) {
return GogsRepository()
2021-05-16 09:16:35 +02:00
..id = json['id'] as int?
..fullName = json['full_name'] as String?
..private = json['private'] as bool?
2021-01-23 15:08:05 +01:00
..owner = json['owner'] == null
? null
: GogsUser.fromJson(json['owner'] as Map<String, dynamic>)
2021-05-16 09:16:35 +02:00
..htmlUrl = json['html_url'] as String?
..description = json['description'] as String?
..defaultBranch = json['default_branch'] as String?
2021-01-23 15:08:05 +01:00
..createdAt = json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String)
..updatedAt = json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String)
2021-05-16 09:16:35 +02:00
..starsCount = json['stars_count'] as int?
..forksCount = json['forks_count'] as int?
..website = json['website'] as String?
..watchersCount = json['watchers_count'] as int?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsRepositoryToJson(GogsRepository instance) =>
<String, dynamic>{
'id': instance.id,
'full_name': instance.fullName,
'private': instance.private,
'owner': instance.owner,
'html_url': instance.htmlUrl,
'description': instance.description,
'default_branch': instance.defaultBranch,
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
'stars_count': instance.starsCount,
'forks_count': instance.forksCount,
'website': instance.website,
'watchers_count': instance.watchersCount,
};
GogsOrg _$GogsOrgFromJson(Map<String, dynamic> json) {
return GogsOrg()
2021-05-16 09:16:35 +02:00
..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?
..location = json['location'] as String?
..website = json['website'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsOrgToJson(GogsOrg instance) => <String, dynamic>{
'id': instance.id,
'username': instance.username,
'full_name': instance.fullName,
'avatar_url': instance.avatarUrl,
'description': instance.description,
'location': instance.location,
'website': instance.website,
};
GogsTree _$GogsTreeFromJson(Map<String, dynamic> json) {
return GogsTree()
2021-05-16 09:16:35 +02:00
..type = json['type'] as String?
..name = json['name'] as String?
..path = json['path'] as String?
..size = json['size'] as int?
..downloadUrl = json['download_url'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsTreeToJson(GogsTree instance) => <String, dynamic>{
'type': instance.type,
'name': instance.name,
'path': instance.path,
'size': instance.size,
'download_url': instance.downloadUrl,
};
GogsBlob _$GogsBlobFromJson(Map<String, dynamic> json) {
return GogsBlob()
2021-05-16 09:16:35 +02:00
..type = json['type'] as String?
..name = json['name'] as String?
..path = json['path'] as String?
..size = json['size'] as int?
..downloadUrl = json['download_url'] as String?
..content = json['content'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsBlobToJson(GogsBlob instance) => <String, dynamic>{
'type': instance.type,
'name': instance.name,
'path': instance.path,
'size': instance.size,
'download_url': instance.downloadUrl,
'content': instance.content,
};
GogsBranch _$GogsBranchFromJson(Map<String, dynamic> json) {
2021-05-16 09:16:35 +02:00
return GogsBranch()..name = json['name'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsBranchToJson(GogsBranch instance) =>
<String, dynamic>{
'name': instance.name,
};
GogsCommit _$GogsCommitFromJson(Map<String, dynamic> json) {
return GogsCommit()
..author = json['author'] == null
? null
: GogsUser.fromJson(json['author'] as Map<String, dynamic>)
..commit = json['commit'] == null
? null
: GogsCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
2021-05-16 09:16:35 +02:00
..sha = json['sha'] as String?
..htmlUrl = json['html_url'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsCommitToJson(GogsCommit instance) =>
<String, dynamic>{
'author': instance.author,
'commit': instance.commit,
'sha': instance.sha,
'html_url': instance.htmlUrl,
};
GogsCommitDetail _$GogsCommitDetailFromJson(Map<String, dynamic> json) {
return GogsCommitDetail()
2021-05-16 09:16:35 +02:00
..message = json['message'] as String?
2021-01-23 15:08:05 +01:00
..author = json['author'] == null
? null
: GogsCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
..committer = json['committer'] == null
? null
: GogsCommitAuthor.fromJson(json['committer'] as Map<String, dynamic>);
}
Map<String, dynamic> _$GogsCommitDetailToJson(GogsCommitDetail instance) =>
<String, dynamic>{
'message': instance.message,
'author': instance.author,
'committer': instance.committer,
};
GogsCommitAuthor _$GogsCommitAuthorFromJson(Map<String, dynamic> json) {
return GogsCommitAuthor()
2021-05-16 09:16:35 +02:00
..name = json['name'] as String?
..email = json['email'] as String?
2021-01-23 15:08:05 +01:00
..date =
json['date'] == null ? null : DateTime.parse(json['date'] as String);
}
Map<String, dynamic> _$GogsCommitAuthorToJson(GogsCommitAuthor instance) =>
<String, dynamic>{
'name': instance.name,
'email': instance.email,
'date': instance.date?.toIso8601String(),
};
GogsIssue _$GogsIssueFromJson(Map<String, dynamic> json) {
return GogsIssue()
2021-05-16 09:16:35 +02:00
..number = json['number'] as int?
..state = json['state'] as String?
..title = json['title'] as String?
..body = json['body'] as String?
2021-01-23 15:08:05 +01:00
..user = json['user'] == null
? null
: GogsUser.fromJson(json['user'] as Map<String, dynamic>)
2021-05-16 09:16:35 +02:00
..labels = (json['labels'] as List<dynamic>?)
?.map((e) => GogsLabel.fromJson(e as Map<String, dynamic>))
.toList()
2021-01-23 15:08:05 +01:00
..createdAt = json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String)
..updatedAt = json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String)
2021-05-16 09:16:35 +02:00
..comments = json['comments'] as int?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsIssueToJson(GogsIssue instance) => <String, dynamic>{
'number': instance.number,
'state': instance.state,
'title': instance.title,
'body': instance.body,
'user': instance.user,
'labels': instance.labels,
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
'comments': instance.comments,
};
GogsLabel _$GogsLabelFromJson(Map<String, dynamic> json) {
return GogsLabel()
2021-05-16 09:16:35 +02:00
..name = json['name'] as String?
..color = json['color'] as String?;
2021-01-23 15:08:05 +01:00
}
Map<String, dynamic> _$GogsLabelToJson(GogsLabel instance) => <String, dynamic>{
'name': instance.name,
'color': instance.color,
};