PullRequest.fromJson constructor
PullRequest.fromJson(
- Map<String, dynamic> json
)
Implementation
factory PullRequest.fromJson(Map<String, dynamic> json) {
return PullRequest(
approvalRules: (json['approvalRules'] as List?)
?.whereNotNull()
.map((e) => ApprovalRule.fromJson(e as Map<String, dynamic>))
.toList(),
authorArn: json['authorArn'] as String?,
clientRequestToken: json['clientRequestToken'] as String?,
creationDate: timeStampFromJson(json['creationDate']),
description: json['description'] as String?,
lastActivityDate: timeStampFromJson(json['lastActivityDate']),
pullRequestId: json['pullRequestId'] as String?,
pullRequestStatus:
(json['pullRequestStatus'] as String?)?.toPullRequestStatusEnum(),
pullRequestTargets: (json['pullRequestTargets'] as List?)
?.whereNotNull()
.map((e) => PullRequestTarget.fromJson(e as Map<String, dynamic>))
.toList(),
revisionId: json['revisionId'] as String?,
title: json['title'] as String?,
);
}