1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-24 06:42:07 +01:00
git-touch-android-ios-app/lib/models/gitlab.g.dart
2019-12-04 22:00:39 +08:00

116 lines
3.7 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'gitlab.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
GitlabUser _$GitlabUserFromJson(Map<String, dynamic> json) {
return GitlabUser()
..id = json['id'] as int
..username = json['username'] as String
..name = json['name'] as String
..avatarUrl = json['avatar_url'] as String;
}
Map<String, dynamic> _$GitlabUserToJson(GitlabUser instance) =>
<String, dynamic>{
'id': instance.id,
'username': instance.username,
'name': instance.name,
'avatar_url': instance.avatarUrl,
};
GitlabRepository _$GitlabRepositoryFromJson(Map<String, dynamic> json) {
return GitlabRepository()
..id = json['id'] as int
..owner = json['owner'] == null
? null
: GitlabUser.fromJson(json['owner'] as Map<String, dynamic>)
..name = json['name'] as String
..description = json['description'] as String
..starCount = json['star_count'] as int
..forksCount = json['forks_count'] as int;
}
Map<String, dynamic> _$GitlabRepositoryToJson(GitlabRepository instance) =>
<String, dynamic>{
'id': instance.id,
'owner': instance.owner,
'name': instance.name,
'description': instance.description,
'star_count': instance.starCount,
'forks_count': instance.forksCount,
};
GitlabTodoProject _$GitlabTodoProjectFromJson(Map<String, dynamic> json) {
return GitlabTodoProject()
..pathWithNamespace = json['path_with_namespace'] as String;
}
Map<String, dynamic> _$GitlabTodoProjectToJson(GitlabTodoProject instance) =>
<String, dynamic>{
'path_with_namespace': instance.pathWithNamespace,
};
GitlabTodo _$GitlabTodoFromJson(Map<String, dynamic> json) {
return GitlabTodo()
..author = json['author'] == null
? null
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
..project = json['project'] == null
? null
: GitlabTodoProject.fromJson(json['project'] as Map<String, dynamic>)
..actionName = json['action_name'] as String
..targetType = json['target_type'] as String
..target = json['target'] == null
? null
: GitlabIssue.fromJson(json['target'] as Map<String, dynamic>);
}
Map<String, dynamic> _$GitlabTodoToJson(GitlabTodo instance) =>
<String, dynamic>{
'author': instance.author,
'project': instance.project,
'action_name': instance.actionName,
'target_type': instance.targetType,
'target': instance.target,
};
GitlabIssue _$GitlabIssueFromJson(Map<String, dynamic> json) {
return GitlabIssue()
..iid = json['iid'] as int
..projectId = json['project_id'] as int
..title = json['title'] as String
..author = json['author'] == null
? null
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
..description = json['description'] as String
..createdAt = json['created_at'] as String;
}
Map<String, dynamic> _$GitlabIssueToJson(GitlabIssue instance) =>
<String, dynamic>{
'iid': instance.iid,
'project_id': instance.projectId,
'title': instance.title,
'author': instance.author,
'description': instance.description,
'created_at': instance.createdAt,
};
GitlabIssueNote _$GitlabIssueNoteFromJson(Map<String, dynamic> json) {
return GitlabIssueNote()
..author = json['author'] == null
? null
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
..body = json['body'] as String;
}
Map<String, dynamic> _$GitlabIssueNoteToJson(GitlabIssueNote instance) =>
<String, dynamic>{
'author': instance.author,
'body': instance.body,
};