import 'package:json_annotation/json_annotation.dart'; part 'gogs.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class GogsUser { GogsUser(); factory GogsUser.fromJson(Map json) => _$GogsUserFromJson(json); int? id; String? username; String? fullName; String? avatarUrl; String? email; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsRepository { GogsRepository(); factory GogsRepository.fromJson(Map json) => _$GogsRepositoryFromJson(json); int? id; String? fullName; bool? private; GogsUser? owner; String? htmlUrl; String? description; String? defaultBranch; DateTime? createdAt; DateTime? updatedAt; int? starsCount; int? forksCount; String? website; int? watchersCount; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsOrg { GogsOrg(); factory GogsOrg.fromJson(Map json) => _$GogsOrgFromJson(json); int? id; String? username; String? fullName; String? avatarUrl; String? description; String? location; String? website; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsTree { GogsTree({required this.type, required this.name}); factory GogsTree.fromJson(Map json) => _$GogsTreeFromJson(json); String type; String name; String? path; int? size; String? downloadUrl; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsBlob extends GogsTree { GogsBlob({required String type, required String name}) : super(name: name, type: type); factory GogsBlob.fromJson(Map json) => _$GogsBlobFromJson(json); String? content; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsBranch { GogsBranch(); factory GogsBranch.fromJson(Map json) => _$GogsBranchFromJson(json); String? name; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsCommit { GogsCommit(); factory GogsCommit.fromJson(Map json) => _$GogsCommitFromJson(json); GogsUser? author; GogsCommitDetail? commit; String? sha; String? htmlUrl; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsCommitDetail { GogsCommitDetail(); factory GogsCommitDetail.fromJson(Map json) => _$GogsCommitDetailFromJson(json); String? message; GogsCommitAuthor? author; GogsCommitAuthor? committer; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsCommitAuthor { GogsCommitAuthor(); factory GogsCommitAuthor.fromJson(Map json) => _$GogsCommitAuthorFromJson(json); String? name; String? email; DateTime? date; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsIssue { GogsIssue(); factory GogsIssue.fromJson(Map json) => _$GogsIssueFromJson(json); int? number; String? state; String? title; String? body; GogsUser? user; List? labels; DateTime? createdAt; DateTime? updatedAt; int? comments; } @JsonSerializable(fieldRename: FieldRename.snake) class GogsLabel { GogsLabel(); factory GogsLabel.fromJson(Map json) => _$GogsLabelFromJson(json); String? name; String? color; }