// GENERATED CODE - DO NOT MODIFY BY HAND part of 'github_commits.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** GithubCommits _$GithubCommitsFromJson(Map json) { return GithubCommits() ..repository = json['repository'] == null ? null : GithubCommitsRepository.fromJson( json['repository'] as Map); } Map _$GithubCommitsToJson(GithubCommits instance) => { 'repository': instance.repository?.toJson(), }; GithubCommitsRepository _$GithubCommitsRepositoryFromJson( Map json) { return GithubCommitsRepository() ..defaultBranchRef = json['defaultBranchRef'] == null ? null : GithubCommitsRef.fromJson( json['defaultBranchRef'] as Map) ..ref = json['ref'] == null ? null : GithubCommitsRef.fromJson(json['ref'] as Map) ..resolveType = json['__typename'] as String; } Map _$GithubCommitsRepositoryToJson( GithubCommitsRepository instance) => { 'defaultBranchRef': instance.defaultBranchRef?.toJson(), 'ref': instance.ref?.toJson(), '__typename': instance.resolveType, }; GithubCommitsRef _$GithubCommitsRefFromJson(Map json) { return GithubCommitsRef() ..target = json['target'] == null ? null : GithubCommitsGitObject.fromJson( json['target'] as Map) ..resolveType = json['__typename'] as String; } Map _$GithubCommitsRefToJson(GithubCommitsRef instance) => { 'target': instance.target?.toJson(), '__typename': instance.resolveType, }; GithubCommitsGitObject _$GithubCommitsGitObjectFromJson( Map json) { return GithubCommitsGitObject()..resolveType = json['__typename'] as String; } Map _$GithubCommitsGitObjectToJson( GithubCommitsGitObject instance) => { '__typename': instance.resolveType, }; GithubCommitsCommit _$GithubCommitsCommitFromJson(Map json) { return GithubCommitsCommit() ..oid = json['oid'] as String ..url = json['url'] as String ..messageHeadline = json['messageHeadline'] as String ..committedDate = json['committedDate'] == null ? null : DateTime.parse(json['committedDate'] as String) ..author = json['author'] == null ? null : GithubCommitsGitActor.fromJson(json['author'] as Map) ..status = json['status'] == null ? null : GithubCommitsStatus.fromJson(json['status'] as Map) ..history = json['history'] == null ? null : GithubCommitsCommitHistoryConnection.fromJson( json['history'] as Map) ..resolveType = json['__typename'] as String; } Map _$GithubCommitsCommitToJson( GithubCommitsCommit instance) => { 'oid': instance.oid, 'url': instance.url, 'messageHeadline': instance.messageHeadline, 'committedDate': instance.committedDate?.toIso8601String(), 'author': instance.author?.toJson(), 'status': instance.status?.toJson(), 'history': instance.history?.toJson(), '__typename': instance.resolveType, }; GithubCommitsGitActor _$GithubCommitsGitActorFromJson( Map json) { return GithubCommitsGitActor() ..name = json['name'] as String ..avatarUrl = json['avatarUrl'] as String ..user = json['user'] == null ? null : GithubCommitsUser.fromJson(json['user'] as Map); } Map _$GithubCommitsGitActorToJson( GithubCommitsGitActor instance) => { 'name': instance.name, 'avatarUrl': instance.avatarUrl, 'user': instance.user?.toJson(), }; GithubCommitsUser _$GithubCommitsUserFromJson(Map json) { return GithubCommitsUser() ..login = json['login'] as String ..resolveType = json['__typename'] as String; } Map _$GithubCommitsUserToJson(GithubCommitsUser instance) => { 'login': instance.login, '__typename': instance.resolveType, }; GithubCommitsAuditEntryActor _$GithubCommitsAuditEntryActorFromJson( Map json) { return GithubCommitsAuditEntryActor(); } Map _$GithubCommitsAuditEntryActorToJson( GithubCommitsAuditEntryActor instance) => {}; GithubCommitsNode _$GithubCommitsNodeFromJson(Map json) { return GithubCommitsNode()..resolveType = json['__typename'] as String; } Map _$GithubCommitsNodeToJson(GithubCommitsNode instance) => { '__typename': instance.resolveType, }; GithubCommitsActor _$GithubCommitsActorFromJson(Map json) { return GithubCommitsActor() ..login = json['login'] as String ..resolveType = json['__typename'] as String; } Map _$GithubCommitsActorToJson(GithubCommitsActor instance) => { 'login': instance.login, '__typename': instance.resolveType, }; GithubCommitsRegistryPackageOwner _$GithubCommitsRegistryPackageOwnerFromJson( Map json) { return GithubCommitsRegistryPackageOwner() ..resolveType = json['__typename'] as String; } Map _$GithubCommitsRegistryPackageOwnerToJson( GithubCommitsRegistryPackageOwner instance) => { '__typename': instance.resolveType, }; GithubCommitsRegistryPackageSearch _$GithubCommitsRegistryPackageSearchFromJson( Map json) { return GithubCommitsRegistryPackageSearch() ..resolveType = json['__typename'] as String; } Map _$GithubCommitsRegistryPackageSearchToJson( GithubCommitsRegistryPackageSearch instance) => { '__typename': instance.resolveType, }; GithubCommitsProjectOwner _$GithubCommitsProjectOwnerFromJson( Map json) { return GithubCommitsProjectOwner() ..resolveType = json['__typename'] as String; } Map _$GithubCommitsProjectOwnerToJson( GithubCommitsProjectOwner instance) => { '__typename': instance.resolveType, }; GithubCommitsRepositoryOwner _$GithubCommitsRepositoryOwnerFromJson( Map json) { return GithubCommitsRepositoryOwner() ..login = json['login'] as String ..resolveType = json['__typename'] as String; } Map _$GithubCommitsRepositoryOwnerToJson( GithubCommitsRepositoryOwner instance) => { 'login': instance.login, '__typename': instance.resolveType, }; GithubCommitsUniformResourceLocatable _$GithubCommitsUniformResourceLocatableFromJson(Map json) { return GithubCommitsUniformResourceLocatable() ..resolveType = json['__typename'] as String; } Map _$GithubCommitsUniformResourceLocatableToJson( GithubCommitsUniformResourceLocatable instance) => { '__typename': instance.resolveType, }; GithubCommitsProfileOwner _$GithubCommitsProfileOwnerFromJson( Map json) { return GithubCommitsProfileOwner() ..login = json['login'] as String ..resolveType = json['__typename'] as String; } Map _$GithubCommitsProfileOwnerToJson( GithubCommitsProfileOwner instance) => { 'login': instance.login, '__typename': instance.resolveType, }; GithubCommitsSponsorable _$GithubCommitsSponsorableFromJson( Map json) { return GithubCommitsSponsorable()..resolveType = json['__typename'] as String; } Map _$GithubCommitsSponsorableToJson( GithubCommitsSponsorable instance) => { '__typename': instance.resolveType, }; GithubCommitsStatus _$GithubCommitsStatusFromJson(Map json) { return GithubCommitsStatus() ..state = _$enumDecodeNullable(_$GithubCommitsStatusStateEnumMap, json['state']) ..resolveType = json['__typename'] as String; } Map _$GithubCommitsStatusToJson( GithubCommitsStatus instance) => { 'state': _$GithubCommitsStatusStateEnumMap[instance.state], '__typename': instance.resolveType, }; T _$enumDecode( Map enumValues, dynamic source, { T unknownValue, }) { if (source == null) { throw ArgumentError('A value must be provided. Supported values: ' '${enumValues.values.join(', ')}'); } final value = enumValues.entries .singleWhere((e) => e.value == source, orElse: () => null) ?.key; if (value == null && unknownValue == null) { throw ArgumentError('`$source` is not one of the supported values: ' '${enumValues.values.join(', ')}'); } return value ?? unknownValue; } T _$enumDecodeNullable( Map enumValues, dynamic source, { T unknownValue, }) { if (source == null) { return null; } return _$enumDecode(enumValues, source, unknownValue: unknownValue); } const _$GithubCommitsStatusStateEnumMap = { GithubCommitsStatusState.EXPECTED: 'EXPECTED', GithubCommitsStatusState.ERROR: 'ERROR', GithubCommitsStatusState.FAILURE: 'FAILURE', GithubCommitsStatusState.PENDING: 'PENDING', GithubCommitsStatusState.SUCCESS: 'SUCCESS', }; GithubCommitsCommitHistoryConnection _$GithubCommitsCommitHistoryConnectionFromJson(Map json) { return GithubCommitsCommitHistoryConnection() ..pageInfo = json['pageInfo'] == null ? null : GithubCommitsPageInfo.fromJson( json['pageInfo'] as Map) ..nodes = (json['nodes'] as List) ?.map((e) => e == null ? null : GithubCommitsCommit.fromJson(e as Map)) ?.toList(); } Map _$GithubCommitsCommitHistoryConnectionToJson( GithubCommitsCommitHistoryConnection instance) => { 'pageInfo': instance.pageInfo?.toJson(), 'nodes': instance.nodes?.map((e) => e?.toJson())?.toList(), }; GithubCommitsPageInfo _$GithubCommitsPageInfoFromJson( Map json) { return GithubCommitsPageInfo() ..hasNextPage = json['hasNextPage'] as bool ..endCursor = json['endCursor'] as String; } Map _$GithubCommitsPageInfoToJson( GithubCommitsPageInfo instance) => { 'hasNextPage': instance.hasNextPage, 'endCursor': instance.endCursor, }; GithubCommitsPullRequestTimelineItem _$GithubCommitsPullRequestTimelineItemFromJson(Map json) { return GithubCommitsPullRequestTimelineItem(); } Map _$GithubCommitsPullRequestTimelineItemToJson( GithubCommitsPullRequestTimelineItem instance) => {}; GithubCommitsSubscribable _$GithubCommitsSubscribableFromJson( Map json) { return GithubCommitsSubscribable() ..resolveType = json['__typename'] as String; } Map _$GithubCommitsSubscribableToJson( GithubCommitsSubscribable instance) => { '__typename': instance.resolveType, }; GithubCommitsPinnableItem _$GithubCommitsPinnableItemFromJson( Map json) { return GithubCommitsPinnableItem(); } Map _$GithubCommitsPinnableItemToJson( GithubCommitsPinnableItem instance) => {}; GithubCommitsStarrable _$GithubCommitsStarrableFromJson( Map json) { return GithubCommitsStarrable()..resolveType = json['__typename'] as String; } Map _$GithubCommitsStarrableToJson( GithubCommitsStarrable instance) => { '__typename': instance.resolveType, }; GithubCommitsRepositoryInfo _$GithubCommitsRepositoryInfoFromJson( Map json) { return GithubCommitsRepositoryInfo() ..resolveType = json['__typename'] as String; } Map _$GithubCommitsRepositoryInfoToJson( GithubCommitsRepositoryInfo instance) => { '__typename': instance.resolveType, }; GithubCommitsArguments _$GithubCommitsArgumentsFromJson( Map json) { return GithubCommitsArguments( owner: json['owner'] as String, name: json['name'] as String, ref: json['ref'] as String, hasRef: json['hasRef'] as bool, after: json['after'] as String, ); } Map _$GithubCommitsArgumentsToJson( GithubCommitsArguments instance) => { 'owner': instance.owner, 'name': instance.name, 'ref': instance.ref, 'hasRef': instance.hasRef, 'after': instance.after, };