Class ReviewInput
- java.lang.Object
-
- com.google.gerrit.extensions.api.changes.ReviewInput
-
public class ReviewInput extends Object
Input passed toPOST /changes/[id]/revisions/[id]/review.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReviewInput.CommentInputstatic classReviewInput.DraftHandlingstatic classReviewInput.RobotCommentInput
-
Field Summary
Fields Modifier and Type Field Description List<AttentionSetInput>addToAttentionSetUsers that should be added to the attention set of this change.Map<String,List<ReviewInput.CommentInput>>commentsList<String>draftIdsToPublishA list of draft IDs that should be published.ReviewInput.DraftHandlingdraftsHow to process draft comments already in the database that were not also described in this input request.booleanignoreAutomaticAttentionSetRulesUsers in the attention set will only be added and removed based onaddToAttentionSetandremoveFromAttentionSet.Map<String,Short>labelsStringmessageNotifyHandlingnotifyWho to send email notifications to after review is stored.Map<RecipientType,NotifyInfo>notifyDetailsbooleanomitDuplicateCommentsIf true check to make sure that the comments being posted aren't already present.StringonBehalfOfAccount ID, name, email address or username of another user.booleanreadyIf true mark the change as ready for review.List<AttentionSetInput>removeFromAttentionSetUsers that should be removed from the attention set of this change.List<ReviewerInput>reviewersReviewers that should be added to this change or removed from it.Map<String,List<ReviewInput.RobotCommentInput>>robotCommentsStringtagbooleanworkInProgressIf true mark the change as work in progress.
-
Constructor Summary
Constructors Constructor Description ReviewInput()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReviewInputaddUserToAttentionSet(String user, String reason)static ReviewInputapprove()ReviewInputblockAutomaticAttentionSetRules()static ReviewInputcreate()static ReviewInputdislike()ReviewInputlabel(String name)ReviewInputlabel(String name, int value)ReviewInputlabel(String name, short value)ReviewInputmessage(String msg)static ReviewInputnoScore()ReviewInputpatchSetLevelComment(String message)static ReviewInputrecommend()static ReviewInputreject()ReviewInputremoveUserFromAttentionSet(String user, String reason)ReviewInputreviewer(String reviewer)ReviewInputreviewer(String reviewer, ReviewerState state, boolean confirmed)ReviewInputsetReady(boolean ready)ReviewInputsetWorkInProgress(boolean workInProgress)
-
-
-
Field Detail
-
message
public String message
-
tag
public String tag
-
comments
public Map<String,List<ReviewInput.CommentInput>> comments
-
robotComments
public Map<String,List<ReviewInput.RobotCommentInput>> robotComments
-
drafts
public ReviewInput.DraftHandling drafts
How to process draft comments already in the database that were not also described in this input request.If not set, the default is
ReviewInput.DraftHandling.KEEP. IfonBehalfOfis set, then no other value besidesKEEPis allowed.
-
draftIdsToPublish
public List<String> draftIdsToPublish
A list of draft IDs that should be published.
-
notify
public NotifyHandling notify
Who to send email notifications to after review is stored.
-
notifyDetails
public Map<RecipientType,NotifyInfo> notifyDetails
-
omitDuplicateComments
public boolean omitDuplicateComments
If true check to make sure that the comments being posted aren't already present.
-
onBehalfOf
public String onBehalfOf
Account ID, name, email address or username of another user. The review will be posted/updated on behalf of this named user instead of the caller. Caller must have the labelAs-$NAME permission granted for each label that appears inlabels. This is in addition to the named user also needing to have permission to use the labels.
-
reviewers
public List<ReviewerInput> reviewers
Reviewers that should be added to this change or removed from it.
-
workInProgress
public boolean workInProgress
If true mark the change as work in progress. It is an error for bothworkInProgressandreadyto be true.
-
ready
public boolean ready
If true mark the change as ready for review. It is an error for bothworkInProgressandreadyto be true.
-
addToAttentionSet
public List<AttentionSetInput> addToAttentionSet
Users that should be added to the attention set of this change.
-
removeFromAttentionSet
public List<AttentionSetInput> removeFromAttentionSet
Users that should be removed from the attention set of this change.
-
ignoreAutomaticAttentionSetRules
public boolean ignoreAutomaticAttentionSetRules
Users in the attention set will only be added and removed based onaddToAttentionSetandremoveFromAttentionSet. Normally, they are also added and removed when some events occur. E.g, adding/removing reviewers, marking a change ready for review or work in progress, and replying on changes.
-
-
Method Detail
-
message
public ReviewInput message(String msg)
-
patchSetLevelComment
public ReviewInput patchSetLevelComment(String message)
-
label
public ReviewInput label(String name, short value)
-
label
public ReviewInput label(String name, int value)
-
label
public ReviewInput label(String name)
-
reviewer
public ReviewInput reviewer(String reviewer)
-
reviewer
public ReviewInput reviewer(String reviewer, ReviewerState state, boolean confirmed)
-
addUserToAttentionSet
public ReviewInput addUserToAttentionSet(String user, String reason)
-
removeUserFromAttentionSet
public ReviewInput removeUserFromAttentionSet(String user, String reason)
-
blockAutomaticAttentionSetRules
public ReviewInput blockAutomaticAttentionSetRules()
-
setWorkInProgress
public ReviewInput setWorkInProgress(boolean workInProgress)
-
setReady
public ReviewInput setReady(boolean ready)
-
recommend
public static ReviewInput recommend()
-
dislike
public static ReviewInput dislike()
-
noScore
public static ReviewInput noScore()
-
approve
public static ReviewInput approve()
-
reject
public static ReviewInput reject()
-
create
public static ReviewInput create()
-
-