2019-12-04 15:00:39 +01:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'gitlab.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2019-12-11 16:09:39 +01:00
|
|
|
GitlabUser _$GitlabUserFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabUser()
|
2021-05-16 09:16:35 +02:00
|
|
|
..id = json['id'] as int?
|
|
|
|
..username = json['username'] as String?
|
|
|
|
..name = json['name'] as String?
|
|
|
|
..avatarUrl = json['avatar_url'] as String?
|
|
|
|
..bio = json['bio'] as String?
|
2020-01-29 06:45:22 +01:00
|
|
|
..createdAt = json['created_at'] == null
|
|
|
|
? null
|
2020-02-01 05:14:03 +01:00
|
|
|
: DateTime.parse(json['created_at'] as String)
|
2021-05-16 09:16:35 +02:00
|
|
|
..accessLevel = json['access_level'] as int?;
|
2019-12-11 16:09:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabUserToJson(GitlabUser instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'username': instance.username,
|
|
|
|
'name': instance.name,
|
|
|
|
'avatar_url': instance.avatarUrl,
|
2020-01-29 06:45:22 +01:00
|
|
|
'bio': instance.bio,
|
|
|
|
'created_at': instance.createdAt?.toIso8601String(),
|
2020-02-01 05:14:03 +01:00
|
|
|
'access_level': instance.accessLevel,
|
2019-12-11 16:09:39 +01:00
|
|
|
};
|
|
|
|
|
2020-01-31 15:45:40 +01:00
|
|
|
GitlabGroup _$GitlabGroupFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabGroup()
|
2021-05-16 09:16:35 +02:00
|
|
|
..id = json['id'] as int?
|
|
|
|
..path = json['path'] as String?
|
|
|
|
..name = json['name'] as String?
|
|
|
|
..avatarUrl = json['avatar_url'] as String?
|
|
|
|
..description = json['description'] as String?
|
|
|
|
..projects = (json['projects'] as List<dynamic>?)
|
|
|
|
?.map((e) => GitlabProject.fromJson(e as Map<String, dynamic>))
|
|
|
|
.toList();
|
2020-01-31 15:45:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabGroupToJson(GitlabGroup instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'path': instance.path,
|
|
|
|
'name': instance.name,
|
|
|
|
'avatar_url': instance.avatarUrl,
|
|
|
|
'description': instance.description,
|
|
|
|
'projects': instance.projects,
|
|
|
|
};
|
|
|
|
|
2019-12-04 15:00:39 +01:00
|
|
|
GitlabTodoProject _$GitlabTodoProjectFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabTodoProject()
|
2021-05-16 09:16:35 +02:00
|
|
|
..pathWithNamespace = json['path_with_namespace'] as String?;
|
2019-12-04 15:00:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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>)
|
2021-05-16 09:16:35 +02:00
|
|
|
..actionName = json['action_name'] as String?
|
|
|
|
..targetType = json['target_type'] as String?
|
2019-12-04 15:00:39 +01:00
|
|
|
..target = json['target'] == null
|
|
|
|
? null
|
2020-01-28 16:39:26 +01:00
|
|
|
: GitlabTodoTarget.fromJson(json['target'] as Map<String, dynamic>);
|
2019-12-04 15:00:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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,
|
|
|
|
};
|
|
|
|
|
2020-01-28 16:39:26 +01:00
|
|
|
GitlabTodoTarget _$GitlabTodoTargetFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabTodoTarget()
|
2021-05-16 09:16:35 +02:00
|
|
|
..iid = json['iid'] as int?
|
|
|
|
..projectId = json['project_id'] as int?
|
|
|
|
..title = json['title'] as String?
|
2019-12-04 15:00:39 +01:00
|
|
|
..author = json['author'] == null
|
|
|
|
? null
|
|
|
|
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
2021-05-16 09:16:35 +02:00
|
|
|
..description = json['description'] as String?
|
2020-01-30 11:57:39 +01:00
|
|
|
..createdAt = json['created_at'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['created_at'] as String);
|
2019-12-04 15:00:39 +01:00
|
|
|
}
|
|
|
|
|
2020-01-28 16:39:26 +01:00
|
|
|
Map<String, dynamic> _$GitlabTodoTargetToJson(GitlabTodoTarget instance) =>
|
2019-12-04 15:00:39 +01:00
|
|
|
<String, dynamic>{
|
|
|
|
'iid': instance.iid,
|
|
|
|
'project_id': instance.projectId,
|
|
|
|
'title': instance.title,
|
|
|
|
'author': instance.author,
|
|
|
|
'description': instance.description,
|
2020-01-30 11:57:39 +01:00
|
|
|
'created_at': instance.createdAt?.toIso8601String(),
|
2019-12-04 15:00:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
GitlabIssueNote _$GitlabIssueNoteFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabIssueNote()
|
|
|
|
..author = json['author'] == null
|
|
|
|
? null
|
|
|
|
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
2021-05-16 09:16:35 +02:00
|
|
|
..body = json['body'] as String?
|
|
|
|
..system = json['system'] as bool?
|
2020-01-30 11:57:39 +01:00
|
|
|
..createdAt = json['created_at'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['created_at'] as String);
|
2019-12-04 15:00:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabIssueNoteToJson(GitlabIssueNote instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'author': instance.author,
|
|
|
|
'body': instance.body,
|
2020-01-30 11:57:39 +01:00
|
|
|
'system': instance.system,
|
|
|
|
'created_at': instance.createdAt?.toIso8601String(),
|
2019-12-04 15:00:39 +01:00
|
|
|
};
|
2019-12-11 16:09:39 +01:00
|
|
|
|
|
|
|
GitlabProject _$GitlabProjectFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabProject()
|
2021-05-16 09:16:35 +02:00
|
|
|
..id = json['id'] as int?
|
|
|
|
..name = json['name'] as String?
|
|
|
|
..avatarUrl = json['avatar_url'] as String?
|
|
|
|
..description = json['description'] as String?
|
|
|
|
..starCount = json['star_count'] as int?
|
|
|
|
..forksCount = json['forks_count'] as int?
|
|
|
|
..visibility = json['visibility'] as String?
|
|
|
|
..readmeUrl = json['readme_url'] as String?
|
|
|
|
..webUrl = json['web_url'] as String?
|
2019-12-11 16:09:39 +01:00
|
|
|
..namespace = json['namespace'] == null
|
|
|
|
? null
|
|
|
|
: GitlabProjectNamespace.fromJson(
|
|
|
|
json['namespace'] as Map<String, dynamic>)
|
2020-01-31 15:36:58 +01:00
|
|
|
..owner = json['owner'] == null
|
|
|
|
? null
|
|
|
|
: GitlabUser.fromJson(json['owner'] as Map<String, dynamic>)
|
2021-05-16 09:16:35 +02:00
|
|
|
..issuesEnabled = json['issues_enabled'] as bool?
|
|
|
|
..openIssuesCount = json['open_issues_count'] as int?
|
|
|
|
..mergeRequestsEnabled = json['merge_requests_enabled'] as bool?
|
2020-01-28 14:01:06 +01:00
|
|
|
..statistics = json['statistics'] == null
|
|
|
|
? null
|
|
|
|
: GitlabProjectStatistics.fromJson(
|
2020-01-29 07:38:27 +01:00
|
|
|
json['statistics'] as Map<String, dynamic>)
|
|
|
|
..lastActivityAt = json['last_activity_at'] == null
|
|
|
|
? null
|
2020-01-31 15:36:58 +01:00
|
|
|
: DateTime.parse(json['last_activity_at'] as String)
|
|
|
|
..createdAt = json['created_at'] == null
|
|
|
|
? null
|
2020-02-02 03:58:42 +01:00
|
|
|
: DateTime.parse(json['created_at'] as String)
|
2021-05-16 09:16:35 +02:00
|
|
|
..defaultBranch = json['default_branch'] as String?;
|
2019-12-11 16:09:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabProjectToJson(GitlabProject instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'name': instance.name,
|
|
|
|
'avatar_url': instance.avatarUrl,
|
|
|
|
'description': instance.description,
|
|
|
|
'star_count': instance.starCount,
|
|
|
|
'forks_count': instance.forksCount,
|
|
|
|
'visibility': instance.visibility,
|
|
|
|
'readme_url': instance.readmeUrl,
|
|
|
|
'web_url': instance.webUrl,
|
|
|
|
'namespace': instance.namespace,
|
2020-01-31 15:36:58 +01:00
|
|
|
'owner': instance.owner,
|
2019-12-11 16:09:39 +01:00
|
|
|
'issues_enabled': instance.issuesEnabled,
|
|
|
|
'open_issues_count': instance.openIssuesCount,
|
|
|
|
'merge_requests_enabled': instance.mergeRequestsEnabled,
|
2020-01-28 14:01:06 +01:00
|
|
|
'statistics': instance.statistics,
|
2020-01-29 07:38:27 +01:00
|
|
|
'last_activity_at': instance.lastActivityAt?.toIso8601String(),
|
2020-01-31 15:36:58 +01:00
|
|
|
'created_at': instance.createdAt?.toIso8601String(),
|
2020-02-02 03:58:42 +01:00
|
|
|
'default_branch': instance.defaultBranch,
|
2019-12-11 16:09:39 +01:00
|
|
|
};
|
|
|
|
|
2020-01-28 15:10:44 +01:00
|
|
|
GitlabProjectBadge _$GitlabProjectBadgeFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabProjectBadge()
|
2021-05-16 09:16:35 +02:00
|
|
|
..renderedImageUrl = json['rendered_image_url'] as String?;
|
2020-01-28 15:10:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabProjectBadgeToJson(GitlabProjectBadge instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'rendered_image_url': instance.renderedImageUrl,
|
|
|
|
};
|
|
|
|
|
|
|
|
GitlabProjectStatistics _$GitlabProjectStatisticsFromJson(
|
|
|
|
Map<String, dynamic> json) {
|
|
|
|
return GitlabProjectStatistics()
|
2021-05-16 09:16:35 +02:00
|
|
|
..commitCount = json['commit_count'] as int?
|
|
|
|
..repositorySize = json['repository_size'] as int?;
|
2020-01-28 15:10:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabProjectStatisticsToJson(
|
|
|
|
GitlabProjectStatistics instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'commit_count': instance.commitCount,
|
|
|
|
'repository_size': instance.repositorySize,
|
|
|
|
};
|
|
|
|
|
2019-12-11 16:09:39 +01:00
|
|
|
GitlabProjectNamespace _$GitlabProjectNamespaceFromJson(
|
|
|
|
Map<String, dynamic> json) {
|
|
|
|
return GitlabProjectNamespace()
|
2021-05-16 09:16:35 +02:00
|
|
|
..id = json['id'] as int?
|
|
|
|
..name = json['name'] as String?
|
|
|
|
..path = json['path'] as String?
|
|
|
|
..kind = json['kind'] as String?;
|
2019-12-11 16:09:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabProjectNamespaceToJson(
|
|
|
|
GitlabProjectNamespace instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'name': instance.name,
|
2020-01-29 07:38:27 +01:00
|
|
|
'path': instance.path,
|
2020-01-31 15:36:58 +01:00
|
|
|
'kind': instance.kind,
|
2019-12-11 16:09:39 +01:00
|
|
|
};
|
2019-12-11 16:37:29 +01:00
|
|
|
|
|
|
|
GitlabTreeItem _$GitlabTreeItemFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabTreeItem()
|
2021-05-16 09:16:35 +02:00
|
|
|
..type = json['type'] as String?
|
|
|
|
..path = json['path'] as String?
|
|
|
|
..name = json['name'] as String?;
|
2019-12-11 16:37:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabTreeItemToJson(GitlabTreeItem instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'type': instance.type,
|
|
|
|
'path': instance.path,
|
2019-12-11 17:07:12 +01:00
|
|
|
'name': instance.name,
|
2019-12-11 16:37:29 +01:00
|
|
|
};
|
2019-12-11 16:58:25 +01:00
|
|
|
|
|
|
|
GitlabBlob _$GitlabBlobFromJson(Map<String, dynamic> json) {
|
2021-05-16 09:16:35 +02:00
|
|
|
return GitlabBlob()..content = json['content'] as String?;
|
2019-12-11 16:58:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabBlobToJson(GitlabBlob instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'content': instance.content,
|
|
|
|
};
|
2019-12-14 17:08:45 +01:00
|
|
|
|
|
|
|
GitlabEvent _$GitlabEventFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabEvent()
|
|
|
|
..author = json['author'] == null
|
|
|
|
? null
|
|
|
|
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
2021-05-16 09:16:35 +02:00
|
|
|
..actionName = json['action_name'] as String?
|
|
|
|
..targetType = json['target_type'] as String?
|
2019-12-14 17:08:45 +01:00
|
|
|
..note = json['note'] == null
|
|
|
|
? null
|
|
|
|
: GitlabEventNote.fromJson(json['note'] as Map<String, dynamic>);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabEventToJson(GitlabEvent instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'author': instance.author,
|
|
|
|
'action_name': instance.actionName,
|
|
|
|
'target_type': instance.targetType,
|
|
|
|
'note': instance.note,
|
|
|
|
};
|
|
|
|
|
|
|
|
GitlabEventNote _$GitlabEventNoteFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabEventNote()
|
2021-05-16 09:16:35 +02:00
|
|
|
..body = json['body'] as String?
|
|
|
|
..noteableType = json['noteable_type'] as String?
|
|
|
|
..noteableIid = json['noteable_iid'] as int?;
|
2019-12-14 17:08:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabEventNoteToJson(GitlabEventNote instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'body': instance.body,
|
|
|
|
'noteable_type': instance.noteableType,
|
|
|
|
'noteable_iid': instance.noteableIid,
|
|
|
|
};
|
2020-01-28 15:10:44 +01:00
|
|
|
|
|
|
|
GitlabCommit _$GitlabCommitFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabCommit()
|
2021-05-16 09:16:35 +02:00
|
|
|
..id = json['id'] as String?
|
|
|
|
..shortId = json['short_id'] as String?
|
|
|
|
..title = json['title'] as String?
|
2020-01-28 15:10:44 +01:00
|
|
|
..createdAt = json['created_at'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['created_at'] as String)
|
2021-05-16 09:16:35 +02:00
|
|
|
..authorName = json['author_name'] as String?
|
|
|
|
..message = json['message'] as String?;
|
2020-01-28 15:10:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabCommitToJson(GitlabCommit instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'short_id': instance.shortId,
|
|
|
|
'title': instance.title,
|
|
|
|
'created_at': instance.createdAt?.toIso8601String(),
|
|
|
|
'author_name': instance.authorName,
|
|
|
|
'message': instance.message,
|
|
|
|
};
|
2020-01-28 16:39:26 +01:00
|
|
|
|
2020-02-29 10:06:47 +01:00
|
|
|
GitlabDiff _$GitlabDiffFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabDiff()
|
2021-05-16 09:16:35 +02:00
|
|
|
..diff = json['diff'] as String?
|
|
|
|
..newPath = json['new_path'] as String?
|
|
|
|
..oldPath = json['old_path'] as String?;
|
2020-02-29 10:06:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabDiffToJson(GitlabDiff instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'diff': instance.diff,
|
|
|
|
'new_path': instance.newPath,
|
|
|
|
'old_path': instance.oldPath,
|
|
|
|
};
|
|
|
|
|
2020-01-28 16:39:26 +01:00
|
|
|
GitlabIssue _$GitlabIssueFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabIssue()
|
2021-05-16 09:16:35 +02:00
|
|
|
..title = json['title'] as String?
|
|
|
|
..iid = json['iid'] as int?
|
|
|
|
..projectId = json['project_id'] as int?
|
2020-01-28 16:39:26 +01:00
|
|
|
..author = json['author'] == null
|
|
|
|
? null
|
|
|
|
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
2021-05-16 09:16:35 +02:00
|
|
|
..userNotesCount = json['user_notes_count'] as int?
|
2020-01-28 16:39:26 +01:00
|
|
|
..updatedAt = json['updated_at'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['updated_at'] as String)
|
2021-05-16 09:16:35 +02:00
|
|
|
..labels =
|
|
|
|
(json['labels'] as List<dynamic>?)?.map((e) => e as String).toList();
|
2020-01-28 16:39:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabIssueToJson(GitlabIssue instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'title': instance.title,
|
|
|
|
'iid': instance.iid,
|
|
|
|
'project_id': instance.projectId,
|
|
|
|
'author': instance.author,
|
|
|
|
'user_notes_count': instance.userNotesCount,
|
|
|
|
'updated_at': instance.updatedAt?.toIso8601String(),
|
|
|
|
'labels': instance.labels,
|
|
|
|
};
|
2020-04-06 08:48:50 +02:00
|
|
|
|
|
|
|
GitlabStarrer _$GitlabStarrerFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabStarrer()
|
|
|
|
..starredSince = json['starred_since'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['starred_since'] as String)
|
|
|
|
..user = json['user'] == null
|
|
|
|
? null
|
|
|
|
: GitlabUser.fromJson(json['user'] as Map<String, dynamic>);
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabStarrerToJson(GitlabStarrer instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'starred_since': instance.starredSince?.toIso8601String(),
|
|
|
|
'user': instance.user,
|
|
|
|
};
|
2021-01-18 17:46:31 +01:00
|
|
|
|
|
|
|
GitlabBranch _$GitlabBranchFromJson(Map<String, dynamic> json) {
|
|
|
|
return GitlabBranch()
|
2021-05-16 09:16:35 +02:00
|
|
|
..name = json['name'] as String?
|
|
|
|
..merged = json['merged'] as bool?;
|
2021-01-18 17:46:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> _$GitlabBranchToJson(GitlabBranch instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'name': instance.name,
|
|
|
|
'merged': instance.merged,
|
|
|
|
};
|